AnsweredAssumed Answered

KL28Z  LPI2C TX hanging on STOP cmd?

Question asked by M I on Jun 7, 2019
Latest reply on Jun 13, 2019 by M I

Hello,

 

The last couple of days, I just started using the LPI2C SDK projects for KL28Z-based target-custom board we are developing.    The only examples are labeled b&b (board-to-board).

 

The KL28Z MCU is the master and the slave device is the PCA8561 LCD display driver IC and they are both mounted on the same custom board we are developing. These 2 IC's are the only 2 devices talking with each other on our custom board.

 

I think I have setup all device address, sub-address (registers), buffer, count and all other pertinent parameters in order to complete an I2C transmit message.

 

I've tried adapting both polling_master and interrupt_master SDK code  - to transmit from KL28 MCU to a slave device which is NXP PCA8561 LCD display driver IC.   

I need to transmit control settings & data to the LCD driver in order for it to display to our 6 character x 7 segment LCD.

 

When I do breakpoint tracing inside MCUXpresso, all parts of the message from START command & payload "succeed" in getting to the LPI2C 4-word "FIFO".   (Not sure if they went out the bus because the PC-based logic analyzer I'm using does not trigger on any signal, whether rising, falling, or low or high signal.)

    However, the code hangs on "STOP"  (auto-stop has been disabled in the SDK code).  Even when I tried enabling STOP right before the STOP command is put on FIFO, it just hangs.   Based on the comments on the code, it the "master remains busy so it can't detect the stop".

 

Even without touching any of the original code except changing the ports & pins pinmux.c values to use those on our custom board, the code hangs on "STOP".   The original code has 33 bytes to transmit.   I have 12 bytes to send to the LCD driver.   I reduced the byte count to only 1 thinking it might be the size of the FIFO that's causing trouble.   Still the STOP command not detected persists so the transmission "hangs".

 

So I'm not sure if the SDK code example I'm using is correct, or if I'm missing to setup something else besides what's on the base code.

 

I'm not sure if the slave driver IC is hosed if that's what's causing the MCU to not send out something & I'm not detecting any trigger on the logic analyzer PC-tool.

 

I have to admit, I have not thoroughly read through all the LPI2C control & status registers settings so I am ignorant to most of those bits.  Can someone please tell me where to look or investigate in order to know how I can fix this problem?  

 

Thank you very much for the help.

 

MI

Outcomes