I have a problem in using FreeRTOSv10.1.1.
The MCU is iteratively rebooting and not executing task function.
I am using dsPIC33CK256mp508 MCU. The development tool is MPLAB X IDE v5.10.
The freeRTOS supports dsPIC33FJ256GP710 MCU and not supports dsPIC33CK256mp508 MCU.
So, I changed the FreeRTOS as follows for the dsPIC33CK256mp508 MCU.
- In port.c and portasm_dsPIC.S, I added ” || defined( dsPIC33C )” in the source code.
- The PIC33CK has not PSVPAG register. So I replaced the PSVPAG with DSRPAG register.
The MCU is rebooing after executing main() -> vTaskStartScheduler(() -> xPortStartScheduler() -> portRESTORE_CONTEXT().
If I add extra code after portRESTORE_CONTEXT(), the MCU does not rebooting but does not execute task functions.
I used the stack size of LED task function as 512 (which is sufficient).
I used the STACK GROWTH definition as follows. Would you check it is right?
#define portSTACK_GROWTH 1
I will really appreciate if I can be given any advice and solutions.
Thank you very much.
Sincerely Yours,
Ick-Sung Choi.