I2C4 issue on STM32F76xx

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

Moderators: RoccoMarco, barthess

User avatar
Giovanni
Site Admin
Posts: 14458
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: I2C4 issue on STM32F76xx

Postby Giovanni » Sat Aug 19, 2023 6:56 am

Could be an electrical glitch or noise on those lines.

Do you have external pull-up resistors?

Giovanni

dflogeras
Posts: 212
Joined: Tue Sep 03, 2013 8:16 pm
Has thanked: 7 times
Been thanked: 19 times

Re: I2C4 issue on STM32F76xx

Postby dflogeras » Sat Aug 19, 2023 8:42 pm

Absolutely, and they are the same ones as when I had it fly-wired to I2C1. My scope shows me no reason to suspect anything in analog-land.

dflogeras
Posts: 212
Joined: Tue Sep 03, 2013 8:16 pm
Has thanked: 7 times
Been thanked: 19 times

Re: I2C4 issue on STM32F76xx

Postby dflogeras » Tue Aug 22, 2023 1:08 am

I found some time tonight to wire up a MCP23017 to I2C4 of my STM32F769-DISCO kit, which thankfully was conveniently on a header.

It works as expected on this board, using the same code (except for the board.h which I reused from the one in os/hal/boards/STM32F769-DISCOVERY, and changed just pins relating to the I2C4 peripheral).

That is, I didn't have to trick it by starting the driver twice, or commenting out the NACKF handling code in the ISR.

:|

dflogeras
Posts: 212
Joined: Tue Sep 03, 2013 8:16 pm
Has thanked: 7 times
Been thanked: 19 times

Re: I2C4 issue on STM32F76xx

Postby dflogeras » Tue Aug 22, 2023 12:40 pm

Arrrrg, I think I found it.

On the initial test, I didn't notice that the pin GPIOB_AUDIO_SDA (from the STM32F769-DISCO board.h) was also configured to mux to the I2C4 peripheral, and was set as PUSHPULL. Not sure if this is correct for its original intended use?

Either way, my problem was completely a PEBCAK situation, thanks for bearing with me.

I just looked back through my working test from last night and compared it to the non-working one and bang!


Return to “STM32 Support”

Who is online

Users browsing this forum: No registered users and 6 guests