mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-11-29 07:24:13 +01:00
flash: don't call vTaskDelay() before OS init
PIOS_Flash_Jedec_EraseChip is called during early init when the table_magic has changed. This call happens on CC/CC3D prior to the OS being initialized so it is not OK to call vTaskDelay() yet. This was leading to boards locking up (no flashing blue LED) immediately after jumping to the application when the table_magic had changed or was being init'd for the very first time.
This commit is contained in:
parent
d43afddd14
commit
154d971d4d
@ -331,10 +331,10 @@ int32_t PIOS_Flash_Jedec_EraseChip()
|
||||
// Keep polling when bus is busy too
|
||||
int i = 0;
|
||||
while(PIOS_Flash_Jedec_Busy() != 0) {
|
||||
#if defined(PIOS_INCLUDE_FREERTOS)
|
||||
#if defined(FLASH_FREERTOS)
|
||||
vTaskDelay(1);
|
||||
#endif
|
||||
if ((i++) % 100 == 0)
|
||||
if ((i++) % 10000 == 0)
|
||||
PIOS_LED_Toggle(PIOS_LED_HEARTBEAT);
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user