2024-01-03 05:43 AM
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.
Here's the scope.
Could anyone help me, please?
2024-01-04 10:58 AM
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.
2024-01-04 10:55 PM - edited 2024-01-04 11:00 PM
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
2024-01-05 03:36 AM
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.