cancel
Showing results for 
Search instead for 
Did you mean: 

I2C reads FF and stucks

malb0794
Associate II

Hi everyone! 

I'm using two uC, STM32F105VCT7TR and MSP430G2452, and I'm establishong an I2C communication between them, with the STM32F105 being the master and MSP430 the slave. For the write operation, the communication works fine. However, when performing a read operation, things do not go as expected - I can't read the data (every time I get FF data) and the bus gets stuck.

Here's what I'm doing to read the MSP data.

 

print1.png

print2.png

 Here's the scope.

scope_0.png

 

Could anyone help me, please?

12 REPLIES 12
malb0794
Associate II

Hi everyone! 

I managed to read the data following the application note AN2824 (Figure 2, with N = 2). 

However, I can only perform one reading because, after the reading is finished, it is no longer possible to send the START.

 

What's content of status registers at that point?

Also note, that debugging is intrusive, and looking at the registers in debugger may change the internal state machine's state.

JW

I needed to take a little trip, I won't be able to check until next week. 

As soon as I arrive, I will send a print with the status of the I2C-related registers.

However, there is a change only in registering DR and CR1. In CR1 I cannot set the ACK bit at the end and the PE bit is cleared after setting the POS bit, making it impossible to set it or start a new communication, as the START is not generated.

Below the code used.

malb0794_1-1704454586156.png