cancel
Showing results for 
Search instead for 
Did you mean: 

I2C Interrupts

JGóme.1
Associate II

Hello everyone!

I would like to know what requirements are needed to work with sensors in a STM32 core F401RE using I2C Interrupts, and if that is possible.

Thanks.

I was searching in Internet but I don't find nothing.

7 REPLIES 7
TDK
Guru

There is quite a lot of information within the HAL source.

https://github.com/STMicroelectronics/STM32CubeF4/blob/master/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_i2c.c#L64

As well as many examples in the CubeMX repository.

https://github.com/STMicroelectronics/STM32CubeF4/blob/2f3b26f16559f7af495727a98253067a31182cfc/Projects/STM32F413ZH-Nucleo/Examples/I2C/I2C_TwoBoards_AdvComIT/Src/main.c

If you feel a post has answered your question, please click "Accept as Solution".
JGóme.1
Associate II

D

JGóme.1
Associate II

I have already tried with the repository examples, however it only shows examples of communication between two cards, which I have not been able to make work either.

I also want to know if something in particular is needed to read the data from a sensor, specifically a DLHR-F50D pressure sensor

> which I have not been able to make work either.

Doesn't bode well for interfacing with another sensor then.

> I also want to know if something in particular is needed to read the data from a sensor, specifically a DLHR-F50D pressure sensor

Just an I2C or SPI interface, power, appropriate hardware and wiring, and a workable code.

If you feel a post has answered your question, please click "Accept as Solution".
JGóme.1
Associate II

CAN YOU HELP ME WITH AN EXAMPLE

JGóme.1
Associate II

And thank you in fact

Imen.D
ST Employee

Hi @Julian Gómez​ ,

Have a look at this FAQ STM32 I2C does not work, describes few tips related to I2C peripheral on STM32 devices.

When your question is answered, please close this topic by choosing Select as Best.

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen