Thread Tools
This thread is privately moderated by Jack Crossfire, who may elect to delete unwanted replies.
Mar 19, 2013, 05:04 AM
Registered User
Jack Crossfire's Avatar
Thread OP
Discussion

ARM programming notes


On an 8 bit PIC, the interrupt vector is a table of assembly language jumps. On ARM, the interrupt vector is a table of bare addresses. This fact is overlooked by many programmers when moving from PIC to ARM, in the race to copy example files over to bring up the ARM as fast as possible.

Jumping to the interrupt vector actually works, sometimes, leading you to put up with random crashes for an entire year before finally viewing the interrupt table you hurriedly copied a year ago in a hex editor.

The assembly language interrupt vector for ARM GCC looks like random noise, but a hex editor reveals it's just the addresses of the interrupt handlers. On reset, the ARM jumps to the address stored at 0x08000004, the reset function. It's not actually an interrupt, but it's stored in the table.


Using optical flow to dampen horizontal movement was very discouraging. It oscillated for a while, seemed to sometimes delay the onset of the inevitable, but always eventually flew away. The time has come to calculate bearings & distances on the ARM.

The code is definitely a monument of fixed point functions which probably run faster than floating point. Bearings & distances are where most people give up on fixed point & start banging away on the compiler problems to make floating point work. The pythagorean therum is where fixed point falls apart. The numbers are too big to handle in fixed point. Output from the PX4/pixhawk compiler works until it hits the network initialization, then it crashes.
Sign up now
to remove ads between posts
Mar 19, 2013, 01:19 PM
just Some Useless Geek
I don't understand. How come you can't use fixed point with big numbers if you split the math up into the lower byte/word/long facilities and upper B/W/L stuff? That way you have the speed of working with smaller quantities, but, with the carry, you take the same math up to the larger orders of the values under math.

Am I missing something? Most of the stuff I've done used 8- or 16-bit math for almost everything. For those systems with larger numbers involved the math usually was left to a dedicated co or relegated to a background process with floating point. I've never had to worry about math speed on something as small as an ATMega328. Heh.

- Marty, scratching head -


Quick Reply
Message:
Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Sold Real Flight Plus controller and Real Flight 4 Program Plus Expansion Programs hadawayj Aircraft - General - Miscellaneous (FS/W) 2 Feb 16, 2013 05:34 PM
Discussion DX6i & DX8, Program a Arming Switch for Motor? gva1956 Radios 1 Aug 30, 2012 05:19 PM
Question How to program a DX7 to prevent motor start when arming the system retiredjb Power Systems 22 Apr 09, 2012 11:40 AM
Arming/programming sequence Phoenix 25 bipeflyer Castle Creations 2 Aug 11, 2003 06:19 PM