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 have a pretty big file that during it's performance, in a specific place of the code flow, I would like to wait for exactly 4 clock cycles. The best way for me to do this, is using the empty line command (; // nop). Unfortunately, this doesn't produce any ASM code line (why ? maybe it was optimized ?) Next, I tried to add an the following lines: #pragma asm NOP; NOP; NOP; NOP; #pragma endasm and have enabled the SRC directive for this particular file from the Keil uVision. This works, but with one limitation: the whole file was translated into assembler file, not just these 4 lines, and this cause the debug operation to be much harder (when runing step-by-step, for example). Is there a way to tell the complier to create an assembler code for this NOP section only ? Can you think of any other (better) way to achive the required goal ? Thanks, Amit A.
Is there a way to tell the complier to create an assembler code for this NOP section only ? How about the _nop_ library function? Jon