2398130_en-US

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

2398130_en-US

2398130_en-US

NXPS32K358: FreeRTOS Tasks Not Running After Bootloader Jumps to Application

We have created a sample application project and are using it as the bootloader. The actual application project is identical, with the only difference being the flash start address.

The bootloader successfully jumps to the application, and the application starts executing. However, within the application, the xTaskCreate() function does not executed.

Is there any additional configuration required when jumping from a bootloader to a FreeRTOS-based application? For example, are there any startup, interrupt, vector table, stack pointer, or scheduler-related configurations that must be performed before the application can create and execute FreeRTOS tasks?

I referred the Unified bootloader Demo ticket from community. I didn't get the solution. Issue is only when we include FreeRTOS, without RTOS the application is working fine.

 Its working for S32K344 not for NXPS32K358.


Please let me know if any additional information is required.

Re: NXPS32K358: FreeRTOS Tasks Not Running After Bootloader Jumps to Application

Hi @Indhumathi,

This "xTaskCreate() does not execute" is ambiguous and could mean different things.

Can you check the following?

1. Execution never reaches xTaskCreate()
The application starts, but something hangs or faults before the call.

2. xTaskCreate() is called but returns an error
The function is called and returns an error, for example errCOULD_NOT_ALLOCATE_REQUIRED_MEMORY.

3. Tasks are created, but the scheduler never runs them
xTaskCreate() succeeds (returns pdPASS) and the tasks are created, but vTaskStartScheduler() is never called, fails, or SysTick/PendSV are not operating correctly after the bootloader jump. As a result, the tasks remain in the Ready state and never get CPU time.

Also, is vApplicationMallocFailedHook() called?

Which heap implementation are you using?

What is the state of CM7_2? Is it running, held in reset, or started by the bootloader?


Thank you,

BR, Daniel

Re: NXPS32K358: FreeRTOS Tasks Not Running After Bootloader Jumps to Application

Bootloader-to-Application Jump Code Used in Our Project:

void Boot_JumpToApp(uint32 i_AppAddr)
{
uint32_t appStack;
uint32_t func;
uint8 i;
 
DisableAllInterrupts();
 
S32_SysTick->CSRr = 0;
S32_SysTick->RVR = 0;
S32_SysTick->CVR = 0;
 
    for(i = 0; i < 10; i++)
    {
    S32_NVIC->ICER[i] = 0xFFFFFFFFU;
    S32_NVIC->ICPR[i] = 0xFFFFFFFFU;
    }
    appStack = *(volatile uint32_t *)0x00442000;
__set_MSP(appStack);
S32_SCB->VTOR = 0x00442000;
func = *(uint32_t volatile *)(((uint32_t)0x00442004));
(* (void (*) (void)) func)();
}


标记 (1)
无评分
版本历史
最后更新:
17 小时之前
更新人: