Hi I have a question is the following
What is the difference between _delay_cycles (x) and __ delay_cycles (x) or is the same because it works well but when I put __ delay_cycles (x) I get a sign detectig SW delay loop
Thanks
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi I have a question is the following
What is the difference between _delay_cycles (x) and __ delay_cycles (x) or is the same because it works well but when I put __ delay_cycles (x) I get a sign detectig SW delay loop
Thanks
void __delay_cycles(unsigned long cycles);
What it shows me is:
Detected SW delay loop using __delay_cycles .
Thanks
Hi David,
as Brian already pointed out, the proper prototype for the intrinsic function is void __delay_cycles(unsigned long cycles); (two leading underscores).
However, it sounded like your question was more related to the remark "Detected SW delay loop using __delay_cycles" generated by the compiler. If so, this remark is generated if you have ULP Advisor enabled in your compiler (CCS or IAR). This tool detects areas in your code that might have potential for power saving optimization. For example, a software delay loop (CPU active) can be substituted by a hardware timer countdown with CPU sleeping, if it makes sense for your application. If interested, you can find out more information on ULP Advisor here: http://processors.wiki.ti.com/index.php/ULP_Advisor?DCMP=MSP430&HQS=Other+OT+ulpadvisor
Regards,
Dung
**Attention** This is a public forum