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.

LP5562: Configure LP5562 to perform blink operation

Part Number: LP5562

Hello,

I have connected this LED controller with STM controller on I2C.

The requirment is to make LP5562 work independent of STM controller. For example, If my controller(STM) is estimating that there is no activity going to perform in next 33 seconds then STM will go in sleep mode for better battery life. Here the requiment is to blink the LED after each 8 seconds for 1 second in its 33 second of sleep mode. If I can configure LP5562 to perform such a task then I can do that exectly before going in to sleep mode and we can achive our goal.

So is it possible to configure/program LP5562 to perform above task( to blink the LED after each 8 seconds for 1 second ) ? If yes then how?

Thank you,

Rohit

  • Hi Rohit,
    It is easy to get this effect by the LP5562 engine instruction, would you mind to check the datasheet and EVM user guide for the example, thanks!
    Summer
  • RE: LP5562: Configure LP5562 to perform blink operation
    Hi Summer,

    I went through the datasheet and followed the same sequence which is as follows:

    – Write to address 00h 0100 0000b (enable device)
    – Wait 500 μs (startup delay)
    – Write to address 01h 0001 0000b (configure engine 1 into 'Load program to SRAM' mode)
    • Program load to SRAM
    – Write to address 10h 0000 0011b (1st ramp command 8MSB)
    – Write to address 11h 0111 1111b (1st ramp command 8 LSB)
    – Write to address 12h 0100 1101b (1st wait command 8 MSB)
    – Write to address 13h 0000 0000b (1st wait command 8 LSB)
    – Write to address 14h 0000 0011b (2nd ramp command 8 MSB)
    – Write to address 15h 1111 1111b (2nd ramp command 8 LSB)
    – Write to address 16h 0110 0000b (2nd wait command 8 MSB)
    – Write to address 17h 0000 0000b (2nd wait command 8 LSB)
    • Enable Power Save and use external 32 kHz clock
    – Write to address 08h 0010 0000b (enable powersave, use external clock)
    • Run program
    – Write to address 01h 0010 0000b (Configure LED controller operation mode to "Run program" in engine 1)

    – Write to address 00h 0110 0000b (Configure program execution mode from "Hold" to "Run" in engine 1)


    As per datasheet this will generate a 1100 ms long LED pattern which will be repeated infinitely.

    But, In my Hardware no external clock is connected to CLK32 PIN and it is grounded. So in above sequence I changed selection of clock to internal clock.( Write to address 08h 0000 0001b ). But I am not able to see any pattern of LED.

    Am I following right sequence?

    Thank you,

    Rohit
  • Hi Rohit,

    Could you map the LED to the engine firstly before load engine to SRAM as datasheet showing in page 38?

    Could you also put the infinite loop with branch instruction or go to start instruction in page 39?

    Any more question please let me know, thanks!

    Summer

  • Thanks Summer.

    After mapping LED to engine above sequence worked.