SPI DRIVER STM32F4

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

Moderator: RoccoMarco

Post Reply
mathias2286
Posts: 1
Joined: Sat Aug 20, 2016 9:14 pm

SPI DRIVER STM32F4

Post by mathias2286 »

Hi, im working in a project with the stm32f4 baseboard and I want to change the SPI mode, how can that be possible? I have a problem with the reading and I want to know how to change de frequency if its possible, thank you very much!

static const SPIConfig ls_spicfg = {
NULL,
GPIOB,
14,
SPI_CR1_BR_2 | SPI_CR1_BR_1 | SPI_CR1_CPHA
};
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: SPI DRIVER STM32F4

Post by Giovanni »

Hi,

You have to initialize the CR1 register into the configuration structure according to the STM32 Reference Manual, all definitions come from there.

Giovanni
Post Reply