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.

LP55231: Trouble writing to program memory and switching LEDs on

Part Number: LP55231

Hello,

I am writing a driver for the LP55231, and I am facing trouble trying to write to program memory. I am able to read/write the control registers and can read the temperature, Vout ADC values etc and get reasonable values. But when I try to write to the the program memory the I2C transaction succeeds but then when I try to read the same memory location I get a value of 0. So my I2C API seems to work correctly(works for ADC, control registers), so I am not sure if I am missing any configuration settings before writing to program memory. My pseudocode is like this:

set REG_CTRL1 with ENABLE bit

set MISC register with AUTO_INC bit, internal CLK bit

clear interrupt

select page 0 for programming

write one byte to 0x50 program memory location

read byte at 0x50 --> gives a value of zero

Also, 

OUTPUT ON/OFF CONTROL MSB and OUTPUT ON/OFF CONTROL LSB says its ON/OFF control. So setting it should turn on the LEDs? But I set 0x05 (ON/OFF CONTROL LSB) to 0xff but the LEDs did not turn on. What am I missing here?

  • Hi, Agusta,

    How about try using the LP55231 software to read the value?
    www.ti.com/.../LP55231SQEVM

    Please let me know if this solves your problem.
    Thanks.
    Regards,
    Kenneth
  • Hi Kenneth, I do not have the EVM, but a breakout board so I am not sure if I can use this software. I am able to provide PWM inputs to the LEDs by setting the PWM register to blink them etc. So that's in order. But I am still having trouble writing to the program memory. Reading the program memory after a write gives me the default value of 0. I make sure that :
    - The engine busy bit in status register(0x3A) is 0
    - Register control 2 has engine 0 selected by writing 0x10
    - Select the page 0
    - Write to 0x50
    - Read from 0x50 --> still zero