cancel
Showing results for 
Search instead for 
Did you mean: 

STM8S I2C master crashing on I2C_GenerateSTART(ENABLE);

SSaro.1
Associate II

I am trying to run example code for i2c master and slave, provided in Stm standard peripheral library from https://www.st.com/en/embedded-software/stsw-stm8069.html

But the master keeps crahing at I2C_GenerateSTART API call.

I2C_ITConfig 
enableInterrupts 
TxBuffer 
I2C_GenerateSTART �I2C_DeInit 
I2C_ITConfig 
enableInterrupts 
TxBuffer 
I2C_GenerateSTART �I2C_DeInit 
I2C_ITConfig 
enableInterrupts 
TxBuffer 
I2C_GenerateSTART �I2C_DeInit 
I2C_ITConfig 
enableInterrupts 
TxBuffer 
I2C_GenerateSTART �I2C_DeInit 
I2C_ITConfig 
enableInterrupts 
TxBuffer 
I2C_GenerateSTART �I2C_DeInit 
I2C_ITConfig 
enableInterrupts 
TxBuffer 
I2C_GenerateSTART

The code I am trying is available at below locations

https://github.com/spsarolkar/stm8s-i2c-slave

https://github.com/spsarolkar/stm8s-i2c-master

Can someone please help me where I am going wrong. I am using SDCC compiler with platformIO. The actual processor is STM8S003F3P6

0 REPLIES 0