Hi!
We need to configurate SPI bus with the following ports:
PB14 ---> CS
PB10 ---> SSCK
PC2-----> MISO
PC3---->MOSI
In the spi example we have the next struct config:
static const SPIConfig hs_spicfg = {
NULL,
GPIOB,
14,
0
};
My doubt is that in the second field of the configuration struct has only one port(GPIOB) but I have to use two ports (GPIOB and GPIOC). How can I creat the struct configuration with my requeriments?
Thanks!
SPI Config STM32F4 Embest BB
Moderator: RoccoMarco
- Giovanni
- Site Admin
- Posts: 14893
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: SPI Config STM32F4 Embest BB
Hi,
The SPI configuration is not involved with setting up the GPIO pins, you have to use the PAL driver in order to configure them (palSetPadMode or palSetLineMode). In the first two fields you are just telling the driver which pin to use as CS but it must have been already configured.
Giovanni
The SPI configuration is not involved with setting up the GPIO pins, you have to use the PAL driver in order to configure them (palSetPadMode or palSetLineMode). In the first two fields you are just telling the driver which pin to use as CS but it must have been already configured.
Giovanni