Skip to content

Commit 515c4a0

Browse files
committed
Fix for external SPI CS for STM32F4.
1 parent ca37d9e commit 515c4a0

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

hal/spi/spi_drv_stm32f4.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
/** SPI settings **/
55

66
#define SPI1 (0x40013000)/* SPI1 base address */
7-
#define SPI_CS_FLASH 3 /* Flash CS connected to GPIOE1 */
8-
#define SPI_CS_TPM 1 /* TPM CS connected to GPIOE0 */
7+
#define SPI_CS_FLASH 1 /* Flash CS connected to GPIOE1 */
8+
#define SPI_CS_TPM 0 /* TPM CS connected to GPIOE0 */
99
#define SPI1_PIN_AF 5 /* Alternate function for SPI pins */
1010
#define SPI1_CLOCK_PIN 3 /* SPI_SCK: PB3 */
1111
#define SPI1_MISO_PIN 4 /* SPI_MISO PB4 */
@@ -40,7 +40,7 @@
4040
#define SPI1_APB2_CLOCK_ER_VAL (1 << 12)
4141

4242

43-
#define CLOCK_SPEED (168000000)
43+
#define CLOCK_SPEED (168000000)
4444

4545

4646
#define AHB1_CLOCK_ER (*(volatile uint32_t *)(0x40023830))

0 commit comments

Comments
 (0)