I am using FreeRTOS v. 7.02 and an EFM32 microcontroller with IAR. I have a task that executes periodically by timing out waiting for a semaphore. The task collects some data and writes it to the internal flash of the microcontroller. Without the write to flash functionality, I have confirmed that the task executes as expected (correct timing, data collection, etc.). However when I put the flash functionality in place, the task executes once (i.e., writes one set of data to flash) and then appears to get lost in the scheduler. From the RTOS plugin I can see that when things get lost the scheduler lists the task as in the running state.
I know that writting to flash means that the code needs to execute from RAM. The EFM32 memory module does this already. I am also disabling interrupts prior to writing to flash and re-enabling when done. Is it possible that by dissabling the interrupts that the RTOS RTC tick interrupt is not executing and therefore the scheduler gets confused?
Any insight would be appreciated.