Setting of GPIO PUPDR and OTYPER for SPI pins
Hello,
I know it sounds like a basic and dumb question but I actually didn't find the answer.
I have communication issues between 2 STM32H743 based Nucleos.
On the master I use SPI1.
If I use SPI1 on the Slave it works fine (repeated send/receive communications).
If I use SPI2 on the Slave, I have communication issues: the Slave receives data correctly but the Master receives crap (CRC error).
The settings are:
- for the master: GPIOs PA5,6,7 in Alternate Function, Very High Speed, PullDown set in PUPDR, OTYPER not modified (so push pull by default). SPI in simplex mode (I disable SPI between send and receive phase as described in errata sheet, prescaler to 8 (so should not be any issue of SPI clock frequency). All clocks are maximum as in code examples provided by STMicro (400Mhz fo Sysclock etc...)
- for the slave: exactly same config for SPI1 or SPI2 (I'm using pins PB13, PC2 and PB15 for GPIO, GPIOB and GPIOC have been clocked)
So my question: when using alternate function for a GPIO, does the pullup/pulldown setting matter ? Same question for output type (push-pull / open drain) ? And what settings should be used for SPI pins ? HAL examples from ST set all SPI pins with pull-down and push-pull. Is it correct ?
