cancel
Showing results for 
Search instead for 
Did you mean: 

stm32 I2C3 master: wont transfer data

casey wojcik
Associate
Posted on June 26, 2018 at 00:02

I am having difficulty transmitting on my stm32l071k8. I am using a STM32l073RZ nucleo board for benchtop development.

my lab setup is just a nucleo board connected to an oscilloscope for SCL and SDA. Currently my device sending out the address (0xFF) and then it waits in the code snippet:

      // wait for transmit to occur

      while( (I2Cx->ISR & 0x1) == 0)

      {

         LL_mDelay(1);

      }

Which i believe means it is waiting to send the data already in the TXDR register.

However, the TXE bit never goes high (data is still in TXDR) and i dont see any further transmission on the o-scope.

I have attached a scope shot of my address write and my two snippets of init and transmit code. Hopefully somebody sees my glaring mistake.

From the scope shot it looks like i just never get an acknowledge? or clock stretching isn't happening? but honestly at this point i'm not really sure so i figured i would get some help from this community.!

Thanks

Casey

2 REPLIES 2
john doe
Lead
Posted on June 26, 2018 at 00:20

0xFF isnt a valid I2C address

Posted on June 26, 2018 at 00:57

you are correct, this was just hte last o-scope shot i took. my eyes were crossing looking at the waveform so i went with 0x7F (7-bit) to make sure it was doing what i wanted.