cancel
Showing results for 
Search instead for 
Did you mean: 

How to configure SMBUS in stm32h7?

MDeva.1
Associate II

Hello,

I am working on Nucleo-h745ziq board.I have to configure the ADM1032 which is temperature sensor and SMBUS compatiable IC.How I can configure the SMBUS in STM32CUBIDE.Which libabry that I have to use.Can you help me.

6 REPLIES 6
TDK
Guru

Create a CubeMX project starting with that board. Enable the I2C peripheral that you want, select SMBus mode, hit generate code.

Where are you getting stuck?

If you feel a post has answered your question, please click "Accept as Solution".

Which library function that I have to use there is some information documents for smbus stm32 ​

From the ADM1032 data sheet, it does not use any smbus specific functionality, besides of supporting ALERT. So, just use "normal" I2C library functions unless this device has the ALERT output connected.

I have use the ALERT signal. But also I have to configure the LOCAL and TEMP register but in SMBUS function how I can read and write the register.

means in I2c we use these function for particular read and write into register.

HAL_I2C_Mem_Read(hi2c, DevAddress, MemAddress, MemAddSize, pData, Size, Timeout);

but in SMBUS doenot have that functionality then how I can read or write in particular register.

HAL_SMBUS_Master_Receive_IT(&hsmbus1, DevAddress, pData, Size, XferOptions) I am getting confused.which functionality I have to use

Assume initially that it will be I2C connectable, address (0x4C << 1)

Try that address, and show some actual code.

Check that the device gives you an NACK for the correct address.

Check signals on scope.

Internal registers 8-bit wide, read data sheet.

Then query/dump the registers within the device.

https://www.onsemi.com/pdf/datasheet/adm1032-d.pdf

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

But which I have to configure I2c libabry or smbus libabry.Because in the DevAddress we have to Give the deviceaddress 0x4C and in the MemAddress we give the register that we have to acceess.But in smbus How I can configure?