Skip to main content
Edwin Schmid
Visitor II
November 20, 2017
Question

HAL_I2C_Master_Transmit OR HAL_I2C_Mem_Write

  • November 20, 2017
  • 1 reply
  • 1055 views
Posted on November 20, 2017 at 16:23

Dear all we have stm32f373xx chip.

MAX7313 Chip for LEDs. The connection is via I2C interface.

We need to ON an LED or group of them depending on some Interrupt.

We need to read the value about the LED status stored in the register.

What is the best function to use for this purpose?

HAL_I2C_Master_Receive/HAL_I2C_Master_Transmit

OR HAL_I2C_Mem_Read/HAL_I2C_Mem_Write

Below is the code we are using at the moment. To write to the Max7313 chip♯

HAL_I2C_Master_Transmit(&hi2c1, MAX_UI2_ADDRESS,MAXwrite,3, 100);

If possible provide an example code.

Thanks in advance.

#interrupt-driven #registers #stm32f373xx
This topic has been closed for replies.

1 reply

Tesla DeLorean
Guru
August 10, 2018

Sorry, bumping old zombie unanswered threads off my feed

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