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.

Potentially infinite loop found

Other Parts Discussed in Thread: HALCOGEN

What does this mean when the code says

/*SAFETYMCUSW 28 D MR:NA <APPROVED> "Potentially infinite loop found - Hardware Status check for execution sequence" */

is it violating a safety rule or justifying that such loops are permitted to be used?

  • Hi Akshay,
    Normally you see this comment when HalCoGen generated code is polling certain status register and waiting for the status to change before moving on. If the status does not change then the CPU will keep waiting. For example, the CPU might be waiting for the I2C transmit register to be ready so it can write a new data to it to start a new transmission. If there is any issue in the I2C communication, the transmit register is never ready to accept new data. In this case the CPU is stuck. Normally, the overall system will employ some type of watchdog to detect and break out from this type of situation.
  • Hi Akshay,
    Is your question is answered can you please click the 'Verify Answer' button? Thanks.
  • What do you mean by APPROVED? is it like its approved by a safety standard like MISRA?