I2C Demo for STM32L4R5ZI

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

Post Reply
Tabulous
Posts: 518
Joined: Fri May 03, 2013 12:02 pm
Has thanked: 7 times
Been thanked: 18 times

I2C Demo for STM32L4R5ZI

Post by Tabulous »

Is there a demo for STM32L4R5ZI ?
I'm running into MasterTimeout Halt

Looked at the F3 as this is v2 driver but clock tree is different.
Also have GPIO set as OD
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: I2C Demo for STM32L4R5ZI

Post by Giovanni »

Hi,

What is the message passed to chSysHalt()? note there is a pointer to string passed as parameter.

Giovanni
Tabulous
Posts: 518
Joined: Fri May 03, 2013 12:02 pm
Has thanked: 7 times
Been thanked: 18 times

Re: I2C Demo for STM32L4R5ZI

Post by Tabulous »

it fails on this
osalDbgAssert(i2cp->state == I2C_READY, "not ready");

First time around is ok as state is I2C_READY, but the second time it is I2C_LOCKED.

Reason is 0x8016b24 <__func__.3.lto_priv.5> "i2cMasterTransmitTimeout"

Also does not look to be any clock on the SCL line..... Almost like the peripheral is not running / been clocked
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: I2C Demo for STM32L4R5ZI

Post by Giovanni »

Hi,

Make sure that clock settings in the configuration structure are correct for considering the input clock, there is a chapter in the RM about this.

Also possible, a GPIO problem make sure to program correctly both lines.

Giovanni
Post Reply