Page 2 of 2

Re: I2C4 issue on STM32F76xx

Posted: Sat Aug 19, 2023 6:56 am
by Giovanni
Could be an electrical glitch or noise on those lines.

Do you have external pull-up resistors?

Giovanni

Re: I2C4 issue on STM32F76xx

Posted: Sat Aug 19, 2023 8:42 pm
by dflogeras
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.

Re: I2C4 issue on STM32F76xx

Posted: Tue Aug 22, 2023 1:08 am
by dflogeras
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.

:|

Re: I2C4 issue on STM32F76xx

Posted: Tue Aug 22, 2023 12:40 pm
by dflogeras
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!