I work with FreeRTOSV9 for the HCS12 family.
I added a code to manipulate the LEDs in the main function, and it worked well, and when I joined this snippet of code into tasks, the project compiles, but the LEDs fail to light up, I don’t really know if it’s a problem with the management of interrruption or not, if that is the case how can I solve it?
I must inform you that I created a new project, and I integrated the different files necessary to have a FreeRTOS kernel following the steps of creating a new project under the FreeRTOS website.
Can you use an in-circuit debugger and see if MyTask1 is called?
Can you confirm that main() is called?
In case main() is not called: does you project need a separate startup-code, maybe an assembler source file that calls your main()?
Are you using C-only or mixed with C++?
If the code is placed in a C++ file, add the calling type:
extern "C" void MyTask1(void* pvParameters);
Can you check if vPortTickInterrupt() is called in either:
Yes indeed the three points you made, describes perfectly my problem. So what can I use instead of PTP = 0x08 in the task?
I tried the function you suggested me Mr.Hein, but it didn’t work.
I work with the CodeWarrior IDE 5.9.0 compiler, and I just created a project with C.
I compiled step by step, and it actually made the call of different functions that I used, and enters the main function.
I check if the vPortTickInterrupt () function is called in the port.c file path: FreeRTOS/Source/portable/CodeWarrior/HCS12/port.c
and indeed it is already integrated and developed down the file port.c
/ * Tick context switch function. This is the timer ISR. * /
vPortTickInterrupt void interrupt (void);