cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F1 - __nop()

ee06091
Associate III
Posted on September 06, 2013 at 03:54

The code I'm porting use the __nop() function the delay but I don't have that function on F1, should I use the systick instead?

https://github.com/metropt/STM32StepperDriver/blob/master/Source/main.c#L28

thanks :)
1 REPLY 1
Posted on September 06, 2013 at 04:21

Which F1 library are you using?

STM32F10x_StdPeriph_Lib_V3.5.0\Libraries\CMSIS\CM3\CoreSupport\core_cm3.h

This has __NOP defined for 3 compiler architectures, __nop is Keil/RealView specific

Software loops are notoriously poor solutions, SysTick perhaps has too large a granularity, DWT_CYCCNT has less. If signal placement is important one should use hw timers.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..