Skip to content

Commit

Permalink
Added SPI flash definitions for nv14 target.
Browse files Browse the repository at this point in the history
  • Loading branch information
richardclli committed Oct 13, 2023
1 parent 6fcf8d0 commit 6f091d6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions radio/src/targets/nv14/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,9 @@ set(FIRMWARE_SRC
targets/common/arm/stm32/trainer_driver.cpp
targets/common/arm/stm32/pwr_driver.cpp
targets/common/arm/stm32/diskio_sdio.cpp
targets/common/arm/stm32/spi_flash.cpp
targets/common/arm/stm32/diskio_spi_flash.cpp
drivers/frftl.cpp
targets/common/arm/stm32/vs1053b.cpp
)

Expand Down
9 changes: 9 additions & 0 deletions radio/src/targets/nv14/hal.h
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,15 @@
#define SD_SDIO_TRANSFER_CLK_DIV SD_SDIO_CLK_DIV(24000000)
#define STORAGE_USE_SDIO

// SPI NOR Flash
#define FLASH_SPI SPI6
#define FLASH_SPI_CS_GPIO GPIOG
#define FLASH_SPI_CS_GPIO_PIN LL_GPIO_PIN_6 // PG.06
#define FLASH_SPI_GPIO GPIOG
#define FLASH_SPI_SCK_GPIO_PIN LL_GPIO_PIN_13 // PG.13
#define FLASH_SPI_MISO_GPIO_PIN LL_GPIO_PIN_12 // PG.12
#define FLASH_SPI_MOSI_GPIO_PIN LL_GPIO_PIN_14 // PG.14

// SDRAM
#define SDRAM_RCC_AHB1Periph (RCC_AHB1Periph_GPIOC | RCC_AHB1Periph_GPIOD | RCC_AHB1Periph_GPIOE | RCC_AHB1Periph_GPIOF | RCC_AHB1Periph_GPIOG | RCC_AHB1Periph_GPIOH)
#define SDRAM_RCC_AHB3Periph RCC_AHB3Periph_FMC
Expand Down

0 comments on commit 6f091d6

Please sign in to comment.