Hi,
I have a project I'm working on using the GCC compiler.
And noticed the code was blocking on CPUDelay, a close inspection revealed that the inline assembly for GCC is wrong
void __attribute__((naked)) CPUdelay(uint32_t ui32Count) { // Loop the specified number of times __asm volatile (" subs %0, #1\n" " bne NOROM_CPUdelay\n" " bx lr\n" : /* No output */ : "r" (ui32Count) ); }
I've fixed it by adding a label to the subs instruction and jumping to that, the rest of the implementations seem to have the label and jump to label.
void __attribute__((naked)) CPUdelay(uint32_t ui32Count) { // Loop the specified number of times __asm volatile ("%=: subs %0, #1\n" " bne %=b\n" " bx lr\n" : /* No output */ : "r" (ui32Count) ); }
I think the driverlib for CC1310 should be fixed in the next SDK