2016-08-17 05:06 AM
Hi!
I have been writing my own I2C driver to play well with the RTOS and I have been using a I2C analyser to help me out. After a lot of frustration I have gotten most of it working but what I have discovered is that I sometimes get corrupt transactions. This happens randomly bug generally not more often then once every thousand transactions. As my frustration grew I decided to test the CubeMX HAL I2C driver on my board just verify that it is my code that is doing something strange. However I found out the the HAL I2C driver generates even more corrupt transactions.The hardware is a custom board with STM32F405 using I2C3 to talk to a MPU9250 sensor with 4.7k pullups at 400kHz I2C clock. Signals looks good on scope so no electrical problem.Any suggestions?2016-08-17 11:49 PM
As the image didn't turn out so well I'm adding two new images so it is easier to see what is going on. The test I'm running is just reading 2 bytes from address 0x69 over and over again using the polling function HAL_I2C_Master_Receive (V1.5.1). For this test using CubeMX driver this is the only thing the MCU does. I have verified the same problem on two different boards and next thing would be to test it on a discovery F4 board.
And this is how it looks like when a random transaction error error occures:2016-08-18 07:16 AM
After further investigations it looks like it is the analyzer that is the problem. I'm running data center software from totalphase with a beagle I2C analyser in virtualbox and win7 because it doesn't run on Ubuntu. I have now tested running it on a MAC and I don't get these corrupt transactions. Problem solved.