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.

LP5523 - What causes the ENGINE_BUSY flag in the status register to be set?

The datasheet doesn't say much about it, but sort of implies that the ENGINE_BUSY flag will only be set for short amounts of time after an LED sequence finishes.  Recently I've been seeing a scenario where the flag is set for 15+ seconds, causing a watchdog reset while waiting for it to clear. 

I've made a couple observations about this scenario:

  • It seems to usually (but not always) happen when a previous sequence has ended but still left LEDs on
  • Manually turning those LEDs off seems to usually clear the ENGINE_BUSY flag.

What causes the flag to be set?  And are there any definite actions I can take to help the flag clear?


Thanks

  • Hello,

    ENGINE_BUSY flag is set when:

    1. chip_en rising edge
    2. CHX_MODE bit 1 changes from 1 to 0 (CHX_MODE 10 => 00/01, CHX_MODE 11 => 00/01)
    3. Program counter is written

    So it is little weird that it stays high for 15 seconds. Do you have the CLK_32K running all the time?

    Thanks.

    Best Regards,

    Tomi Koskela

  • Hi Tomi,

    Thanks for your help.  I don't see anything about CHX_MODE in the datasheet.  Do you have any more info about that?

    We're using the internal clock the whole time.

    Going off your comment about the program counter, I put a delay after each time we change the engine control registers, and that seems to have resolved the problem.  I guess I was writing to another register without checking the status flag, could that have caused the flag to get stuck?  Do you have any info on how long that delay should be?  I'm using 500us, but I don't know if I can safely reduce that

    Thanks,

    Austin

  • Hi Austin,

    Yes, sorry. Bits are named ENGINEx_MODE in datasheet.

    It could be because of the delay you said. In datasheet we have "Serial bus master should check the busy bit before writing to program memory or allow at least 1ms delay after entering to load mode before memory write, to ensure initalization." So it seems as 1ms delay is needed.

    Thanks,

    Best Regards,

    Tomi Koskela