2024-04-08 03:25 AM
Hello everyone,
I'm currently working with the AEK-AUD-C1D9031 development board and utilizing the "AVAS Compact 2.0 - Test Application" example code from AutoDevKitStudio2.2.1. I'm seeking assistance in extending this example code with FreeRTOS. However, upon including FreeRTOS_RLA, I'm encountering issues with CAN communication. During debugging, I noticed that the flow gets stuck at osalThreadDelayMilliseconds(500). Could anyone offer guidance on resolving this issue? Any help would be greatly appreciated. Thank you.
Here integrated the freeRTOS into project. | Added Break point. |
4 break points added | It is hitting 1,3,2 break points |
it is hitting osalThreadDelayMilliseconds(500);(2 break point) | heat the program is stopped. |
2024-04-09 07:59 AM
Hello Shiva ,
You are limited to the number of breakpoints with PLS
i recommend to switch in assembler mode and reduce the number of breakpoints.
if you want to use FreeRTOS you should have a main.c like that :
SPC582Bxx_RLA FreeRTOS SERIAL Test Application for Discovery (cf example)
FreeRTOS is using the tick too
uint8_t message_task1[]= "Task1...\r\n";
uint8_t message_task2[]= "Task2...\r\n";
/* Demo tasks */
portTASK_FUNCTION( vTaskOne, pvParameters )
{
( void ) pvParameters;
TickType_t xLastWakeTime = xTaskGetTickCount();
for ( ;; ) {
vTaskSuspendAll();
sd_lld_write(&SD2,message_task1,(uint16_t)(sizeof(message_task1)/sizeof(message_task1[0])));
xTaskResumeAll();
pal_lld_togglepad(PORT_E, LED_4);
vTaskDelayUntil( &xLastWakeTime, 200 );
}
}
/* Demo tasks */
portTASK_FUNCTION( vTaskTwo, pvParameters )
{
( void ) pvParameters;
TickType_t xLastWakeTime = xTaskGetTickCount();
for ( ;; ) {
vTaskSuspendAll();
sd_lld_write(&SD2,message_task2,(uint16_t)(sizeof(message_task2)/sizeof(message_task2[0])));
xTaskResumeAll();
vTaskDelayUntil( &xLastWakeTime, 200 );
pal_lld_togglepad(PORT_D, LED_5);
}
}
/*
* Application entry point.
*/
int main(void) {
/* Initialization of all the imported components in the order specified in
the application wizard. The function is generated automatically.*/
componentsInit();
/* Enable Interrupts */
irqIsrEnable();
/*
* Activates the serial driver 1 using the driver default configuration.
*/
sd_lld_start(&SD2, NULL);
/* Creating first task to blink LED0 */
xTaskCreate( vTaskOne,
(const char * const)"task #1",
configMINIMAL_STACK_SIZE,
NULL,
tskIDLE_PRIORITY + 1,
NULL );
/* Creating second task to blink LED1 */
xTaskCreate( vTaskTwo,
(const char * const)"task #2",
configMINIMAL_STACK_SIZE,
NULL,
tskIDLE_PRIORITY + 1,
NULL );
/* Start the FreeRTOS scheduler */
vTaskStartScheduler();
Best regards
Erwan
2024-04-09 07:37 PM
Hi Erwan,
I hope you're doing well.
I'm encountering an issue with osalThreadDelayMilliseconds(500) in the code. It seems that the flow is getting stuck at this line and not progressing further. Despite my efforts, I haven't been able to resolve it.
Could you please lend me a hand with this? Any insights or suggestions you have would be greatly appreciated.
Looking forward to your assistance.
2024-04-09 09:10 PM
Hi Erwan,
I hope you're doing well.
I'm encountering an issue with osalThreadDelayMilliseconds(500) in the code. It seems that the flow is getting stuck at this line and not progressing further. Despite my efforts, I haven't been able to resolve it.
Could you please lend me a hand with this? Any insights or suggestions you have would be greatly appreciated.
Looking forward to your assistance.