SPI on STM32F1x
Posted: Wed Nov 27, 2013 12:20 am
Hello,
by looking at the example board config (olimex p107), I can see that spi miso and mosi are configured as follows:
however, when looking in testhal/STM32F1xx/SPI/main.c I see the following commands:
I'm using the 2.6.1 release. Can you please clarify which config is correct? I suppose the one with digital input, but I would rather have it confirmed.
by looking at the example board config (olimex p107), I can see that spi miso and mosi are configured as follows:
Code: Select all
* PC11 - Input with PU (SPI3 MISO).
* PC12 - Alternate output (SPI3 MOSI).however, when looking in testhal/STM32F1xx/SPI/main.c I see the following commands:
Code: Select all
palSetPadMode(IOPORT1, 6, PAL_MODE_STM32_ALTERNATE_PUSHPULL); /* MISO.*/
palSetPadMode(IOPORT1, 7, PAL_MODE_STM32_ALTERNATE_PUSHPULL); /* MOSI.*/I'm using the 2.6.1 release. Can you please clarify which config is correct? I suppose the one with digital input, but I would rather have it confirmed.