I have become a bit stuck in my work with CC3200.
After getting it running and trying the exosite demo, I reverted to the OOB demo, which works as expected.
Now I want to add a task to run some other code, but adding this task makes the code stop just after it :/
I changed the priority of OOB to 5 (hoping that 0 is idle and 9 is high) and set my own task to 1.
// // Create OOB Task // lRetVal = osi_TaskCreate(OOBTask, (signed char*)"OOBTask", OSI_STACK_SIZE, NULL, OOB_TASK_PRIORITY, NULL ); if(lRetVal < 0) { ERR_PRINT(lRetVal); LOOP_FOREVER(); } osi_TaskCreate(MQTTTask, (signed char*)"MQTTTask", OSI_STACK_SIZE, NULL, 1, NULL ); //I added this one // // Start OS Scheduler // osi_start(); while (1) { }
I have tried slimming the task down to nothing, but even writing one string to the UART with no while loop or sleeps stops the program.
I tried making it a while loop that just sleeps, but it still halts the oob example.
static void MQTTTask(void *pvParameters) { while(1) //{ /* while (g_iInternetAccess != 0) { UART_PRINT("Sleeping"); osi_Sleep(1000); } while (g_iInternetAccess == 0) { UART_PRINT("Hello from mqtt"); osi_Sleep(1000); } */ osi_Sleep(1000); //UART_PRINT("Hello \r\n"); } }
Any help and suggestions is most welcome.
At the moment I am compiling in the code composer and then uploading with uniflash, since I havent figured out how to flash directly from code compiler yet, which makes the process a bit more tiresome, since I have to add/remove the jumper each time and stop/start serial debug.