cancel
Showing results for 
Search instead for 
Did you mean: 

HAL SMBUS on STM32L071xxx, how to set up correctly

ANaum.1
Associate II

I configured I2C SMBUS in cubemx and reimplement HAL_SMBUS_MasterTxCpltCallback, then I called MX_I2C1_SMBUS_Init() and HAL_SMBUS_Master_Transmit_IT().

After that i had no any events: not called callback and no any data transmited. In fact on sda and scl pins i had only straight lines (saw in oscilloscope). The same hardware configuration but with I2C at least generate clock an data signals. SMBUS config you can see below. 0693W00000NpRaUQAV.png

3 REPLIES 3
MFran.4
Senior

Did you enable the SMBUS (or I2Cx) interrupt in the NVIC peripheral?

ANaum.1
Associate II

if You mean NVIC_settings than yes, i enabled it

ANaum.1
Associate II

Seemed i found the problem. there were troubles with XferOptions