We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi,
I'm trying to use inline assembler code but the keyword '__asm' is not accepted. I can create an '__asm' function with no compiler warnings but when calling this function the uC restarts. Using Cortex M3 device.
Regards,
Henk
Use only this format - called embedded assembly:
__asm void delay(int32u a_microseconds) { loop SUB R0, R0, #1 CMP R0, #0 BNE loop BX LR }
Forget about inline assembly altogether! See your manuals for details about the differences.