2022-06-01 01:39 AM
Hello
Attached is my i2c ioc file and I have connected an ADXL sensor to the stm32mp1 on its Arduino connector(I2C5). ( address: 3A, Chip id value : E5, Chip ID read register : 0x00)
I am trying to read this chip id but getting an error at the below line always
if (I2C_WaitOnTXISFlagUntilTimeout(hi2c, Timeout, Tickstart) != HAL_OK)
Can you please tell me what's wrong in the code or ioc file?
attached is my main.c and ioc file as well.
Do I need any changes I the device tree file on the A7 side?
Thanks !,
P
2022-06-10 07:37 AM
Hi @PVaaz.1 ,
Sorry to come quite late in this thread.
Where did you stand today ?
Didn't dig into code yet but as a first comment i can answer yes to question "Do I need any changes I the device tree file on the A7 side?"
You have to care i2C5 ( and maybe other peripherals) properly assigned on M4 side.
Olivier
2022-06-13 12:15 AM
Hello @Community member ,
Thanks it got resolved,
CubeMX generates the I2C hal msp code with below I2C configuration by default :
PD1 ------> I2C5_SCL
PZ1 ------> I2C5_SDA
but in actuality works with PA11, and PA12 respectively.
I forget to mention in am using only CM4 with engineering mode.
I think in production as well this holds true and I don't need to change in the device tree change settings in A7 side
Thanks !
Regards,
R