Quadcopter Programming Part 2: Using the CMSIS Library and First Takeoff
1–10 of 20 posts
Re: Quadcopter Programming Part 2: Using the CMSIS Library and First Takeoff
#2 *(volatile uint32_t *)0x40021018 = 0x00000004;
Why is a pointer being created and dereferenced at the same time?Re: Quadcopter Programming Part 2: Using the CMSIS Library and First Takeoff
#3What does this line of code mean? *(volatile uint32_t *)0x40021018 = 0x00000004; Why is a pointer being created and dereferenced at the same time?
Re: Quadcopter Programming Part 2: Using the CMSIS Library and First Takeoff
#4Re: Quadcopter Programming Part 2: Using the CMSIS Library and First Takeoff
#5What does this line of code mean? *(volatile uint32_t *)0x40021018 = 0x00000004; Why is a pointer being created and dereferenced at the same time?
Re: Quadcopter Programming Part 2: Using the CMSIS Library and First Takeoff
#6What does this line of code mean? *(volatile uint32_t *)0x40021018 = 0x00000004; Why is a pointer being created and dereferenced at the same time?
volatile uint32_t* p = (volatile uint32_t *)0x40021018;
*p = 0x00000004;Re: Quadcopter Programming Part 2: Using the CMSIS Library and First Takeoff
#7Embedded code is a lot of fun, but if you want to safely work on the "really fun" stuff it's important to maintain a high level of quality and correctness for fundamental but lame utility functions like this. Otherwise you could literally build a ticking time bomb!
Re: Quadcopter Programming Part 2: Using the CMSIS Library and First Takeoff
#8Re: Quadcopter Programming Part 2: Using the CMSIS Library and First Takeoff
#9What does this line of code mean? *(volatile uint32_t *)0x40021018 = 0x00000004; Why is a pointer being created and dereferenced at the same time?
Re: Quadcopter Programming Part 2: Using the CMSIS Library and First Takeoff
#10Not sure if OP is here, but I'd be interested in hearing about which debug options are easily exposed on that board. Can you use the port you are flashing the drone with as a standard serial port after your code is loaded? Looking forward to the future post about SWD that is introduced at the end of this post as well.
[0]: https://www.joshmcguigan.com/blog/betafpv-drone-flight-contr...
[1]: https://www.joshmcguigan.com/blog/betafpv-drone-flight-contr...