Skip to main content
spark
Associate II
April 10, 2019
Question

I2C problem with STM32L476RGT6(NUCLEO-L476RG)

  • April 10, 2019
  • 2 replies
  • 912 views

Hi,

I am using NUCLEO-L476RG. I have wrote below code using HAL library to toggle an LED via I2C. But I cant find my board address.

Kindly let me know how to find it.

MX_I2C1_Init();

 /* USER CODE BEGIN 2 */

 if (HAL_I2C_IsDeviceReady(&hi2c1,????????,2,10) == HAL_OK)

 {

 HAL_GPIO_TogglePin(GPIOA,GPIO_PIN_5);

 }

 /* USER CODE END 2 */

This topic has been closed for replies.

2 replies

Jack Peacock_2
Associate II
April 10, 2019

On an 'L476 or 'L496 Disco the MFX address is 0x84 (0x42 plus r/w bit). Try that, likely the same part. ST usually marks the schematic with the MFX bus address.

Jack Peacock

spark
sparkAuthor
Associate II
April 10, 2019

Thank you for answering. Unfortunately, It doesn't work.