Hi,
Recently I need to include file operation under FreeRTOS, which means I need to start simplelink task before using API such as FsOpen, FsWrite, FsRead.
And it works fine after I combined Mqtt-Client example code and file-opertation example code.
Additionally, I want to add one function which includes push button interrupt handler.
Idea is to access FsOpen & FsWrite when press SW2 button.
I put WriteFileToDevice API into pushButtonInterruptHandler2, but it stuck in sl_FsOpen() before sl_FsWrite(), even if I add sl_start() before sl_FsOpen(), it stuck in sl_start().
Could anyone help?
Thanks!
void pushButtonInterruptHandler2()
{
if(WriteFileToDevice(&ulToken, &lFileHandle) < 0)
{
GPIO_IF_LedOn(MCU_RED_LED_GPIO);
}
// Restart system
MAP_PRCMHibernateIntervalSet(330);
MAP_PRCMHibernateWakeupSourceEnable(PRCM_HIB_SLOW_CLK_CTR);
MAP_PRCMHibernateEnter();
}