diff --git a/flight/RevoMini/System/pios_board.c b/flight/RevoMini/System/pios_board.c index d46f25610..1fc2eaa8a 100644 --- a/flight/RevoMini/System/pios_board.c +++ b/flight/RevoMini/System/pios_board.c @@ -307,9 +307,11 @@ void PIOS_Board_Init(void) { PIOS_DEBUG_Assert(0); } +#if defined(PIOS_INCLUDE_FLASH) /* Connect flash to the approrpiate interface and configure it */ - PIOS_Flash_Jedec_Init(pios_spi_telem_flash_id, 0, &flash_m25p_cfg); + PIOS_Flash_Jedec_Init(pios_spi_telem_flash_id, 1, &flash_m25p_cfg); PIOS_FLASHFS_Init(&flashfs_m25p_cfg); +#endif /* Initialize UAVObject libraries */ EventDispatcherInitialize(); diff --git a/flight/board_hw_defs/revomini/board_hw_defs.c b/flight/board_hw_defs/revomini/board_hw_defs.c index d5e3ff58a..66532e0cc 100644 --- a/flight/board_hw_defs/revomini/board_hw_defs.c +++ b/flight/board_hw_defs/revomini/board_hw_defs.c @@ -285,16 +285,8 @@ static const struct pios_spi_cfg pios_spi_telem_flash_cfg = { .GPIO_PuPd = GPIO_PuPd_NOPULL }, }, - .slave_count = 1, - .ssel = { { // Flash - .gpio = GPIOB, - .init = { - .GPIO_Pin = GPIO_Pin_3, - .GPIO_Speed = GPIO_Speed_50MHz, - .GPIO_Mode = GPIO_Mode_OUT, - .GPIO_OType = GPIO_OType_PP, - .GPIO_PuPd = GPIO_PuPd_UP - } }, + .slave_count = 2, + .ssel = { { // RFM22b .gpio = GPIOA, .init = { @@ -303,7 +295,16 @@ static const struct pios_spi_cfg pios_spi_telem_flash_cfg = { .GPIO_Mode = GPIO_Mode_OUT, .GPIO_OType = GPIO_OType_PP, .GPIO_PuPd = GPIO_PuPd_UP - } }, + } }, + { // Flash + .gpio = GPIOB, + .init = { + .GPIO_Pin = GPIO_Pin_3, + .GPIO_Speed = GPIO_Speed_50MHz, + .GPIO_Mode = GPIO_Mode_OUT, + .GPIO_OType = GPIO_OType_PP, + .GPIO_PuPd = GPIO_PuPd_UP + } }, }, };