Creating a new task for HW interaction
Hello,
I'm trying to extend the example given in 'Method 2 - From other task', given here: https://touchgfx.zendesk.com/hc/en-us/articles/205074561-Connecting-the-UI-to-your-system
I am using the 746-Disco board and the example works just fine on my hardware.
My end goal is to have a task in the RTOS that can handle serial communication and send along info to the screen model (or transmit data entered on the screen).
to get started I have created a new task (serial_task) and placed it in serial.c (and serial.h). Basically I have just copied the 'condenser.c/.h' file combo and renamed the functions.
I have added serial.h to main.cpp and serial.c to the makefile.
I can compile just fine and I can even swap the two tasks around.
what I can NOT do is get them to work side by side.
In my main.cpp I have this:
xTaskCreate(condenser_task, (TASKCREATE_NAME_TYPE)"CondenserTask",
512,
NULL,
configGUI_TASK_PRIORITY+1,
NULL);
xTaskCreate(serial_task, (TASKCREATE_NAME_TYPE)"SerialTask",
512,
NULL,
configGUI_TASK_PRIORITY+1,
NULL);but when I program the hardware the button is not responsive. If I don't start my serial task The system works just fine.
This is my serial task:
void serial_task(void* params)
{
BSP_LED_Init(LED_GREEN);
for(;;)
{
vTaskDelay(1000);
BSP_LED_Toggle(LED_GREEN);
}
}I have removed the calls to the LED init and toggle from the condenser task.
Funny thing is that even if I don't start my serial task (which should handle the LED blinking stuff) the LED is still blinking (very fast)
I've also included serial.h into the model.cpp. I have no compiler problems but the system freezes.
Does someone know something obvious that I'm missing?