I have a piece of example code for the ATmega644 which behaves, in my opinion, somewhat unexpectedly. When the system starts up, I want to run the system with idle task only and see how many times the hook is called. After this, the system can continue initialization. For this reason, I create the task to init the system but request it to delay for 100 milliseconds right away.
In the tick hook, I keep track of some support info (not included in the code I intend to post) but also check to see when the 100 milliseconds have passed and I can continue initialization.
My problem is that the tick hook is called only once, during the entire execution of the program. Thus, the idle task remains the only task running and the rest of the firmware is never inited. From what I can gather, after executing the hook and the code in vPortYieldFromTick function, the “reti” command is not executed so the tick interrupt is not re-enabled.
In the next post I will attach a sample AVR Studio project which (for me) causes the problem.