I2C Demo for STM32L4R5ZI

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

Moderators: barthess, RoccoMarco

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

I2C Demo for STM32L4R5ZI

Postby Tabulous » Mon Jan 13, 2025 4:35 pm

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: 14565
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1112 times
Been thanked: 937 times
Contact:

Re: I2C Demo for STM32L4R5ZI

Postby Giovanni » Mon Jan 13, 2025 5:49 pm

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

Postby Tabulous » Mon Jan 13, 2025 6:07 pm

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: 14565
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1112 times
Been thanked: 937 times
Contact:

Re: I2C Demo for STM32L4R5ZI

Postby Giovanni » Mon Jan 13, 2025 7:04 pm

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


Return to “STM32 Support”

Who is online

Users browsing this forum: No registered users and 13 guests