- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is the 1st time that I am using FreeRTOS in WICED (on an STM32F429) and I want to make sure that I am initializing tasks in the best place. I did it right after wiced_init() in the application start.
void application_start( )
{
wiced_init( );
TaskConfigID_handle = xTaskCreateStatic( TaskConfigID, "AssignID", CONFIG_TASK_STACK_SIZE, NULL, WICED_PRIORITY_TO_NATIVE_PRIORITY(WICED_APPLICATION_PRIORITY), ConfigIDStack, &ConfigID_buffer );
TaskICM20948_handle = xTaskCreateStatic( TaskICM20948, "IMU", IMU_TASK_STACK_SIZE, NULL, WICED_PRIORITY_TO_NATIVE_PRIORITY(WICED_APPLICATION_PRIORITY), ICM20948Stack, &ICM20948_buffer );
TaskBQ27411_handle = xTaskCreateStatic( TaskBQ27411, "FuelGauge", BAT_TASK_STACK_SIZE, NULL, WICED_PRIORITY_TO_NATIVE_PRIORITY(WICED_APPLICATION_PRIORITY), BQ28411Stack, &BQ27411_buffer );
TaskUI_handle = xTaskCreateStatic( TaskUI, "UserLED", UI_TASK_STACK_SIZE, NULL, WICED_PRIORITY_TO_NATIVE_PRIORITY(WICED_APPLICATION_PRIORITY), UIStack, &UI_buffer );
TaskSFlash_handle = xTaskCreateStatic( TaskSFlash, "SFlash", SFLASH_TASK_STACK_SIZE, NULL, WICED_PRIORITY_TO_NATIVE_PRIORITY(WICED_APPLICATION_PRIORITY), SFlashStack, &SFlash_buffer );
TaskDebug_handle = xTaskCreateStatic( TaskDebug, "Debug", DEBUG_TASK_STACK_SIZE, NULL, WICED_PRIORITY_TO_NATIVE_PRIORITY(WICED_APPLICATION_PRIORITY), DebugStack, &Debug_buffer );
TaskUSB_HS_handle = xTaskCreateStatic( TaskUSB, "USB_HS",USB_TASK_STACK_SIZE, NULL, WICED_PRIORITY_TO_NATIVE_PRIORITY(WICED_APPLICATION_PRIORITY), USB_HS_Stack, &USB_HS_buffer );
TaskWIFI_handle = xTaskCreateStatic( TaskWIFI, "WIFI", WIFI_TASK_STACK_SIZE, NULL, WICED_PRIORITY_TO_NATIVE_PRIORITY(WICED_APPLICATION_PRIORITY), WIFIStack, &WIFI_buffer );
TaskBlue_handle = xTaskCreateStatic( TaskWIFI, "Blue", BLUE_TASK_STACK_SIZE, NULL, WICED_PRIORITY_TO_NATIVE_PRIORITY(WICED_APPLICATION_PRIORITY), BlueStack, &Blue_buffer );
TaskRTC_handle = xTaskCreateStatic( TaskWIFI, "RTC", RTC_TASK_STACK_SIZE, NULL, WICED_PRIORITY_TO_NATIVE_PRIORITY(WICED_APPLICATION_PRIORITY), RTCStack, &RTC_buffer );
TaskOTA_handle = xTaskCreateStatic( TaskWIFI, "OTA", OTA_TASK_STACK_SIZE, NULL, WICED_PRIORITY_TO_NATIVE_PRIORITY(WICED_APPLICATION_PRIORITY), OTAStack, &OTA_buffer );
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello mroberts_arrow
Yes, the correct place to initialize tasks is after wiced_init(). This will make sure that all the required peripherals are initialized before any thread starts.
You can also go through this RTOS tutorial series for more information and learning - https://www.cypress.com/training/wiced-wi-fi-101-chapter-3-wiced-rtos-features
Thanks,
Yeshwanth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello mroberts_arrow
Yes, the correct place to initialize tasks is after wiced_init(). This will make sure that all the required peripherals are initialized before any thread starts.
You can also go through this RTOS tutorial series for more information and learning - https://www.cypress.com/training/wiced-wi-fi-101-chapter-3-wiced-rtos-features
Thanks,
Yeshwanth