2019-04-10 05:01 AM
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 */
2019-04-10 05:56 AM
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
2019-04-10 06:44 AM
Thank you for answering. Unfortunately, It doesn't work.