Hello OwnTech,
In the Blinky LED example, it is suggested that a critical task can be launched by uncommenting the following two lines, see
https://github.com/owntech-foundation/examples/blob/main/SPIN/LED/blinky/main.cpp#L65
task.createCritical(loop_critical_task, 500);
task.startCritical();
However, this is in contradiction with the way the critical task works (thanks @jalinei for the link): https://docs.owntech.org/latest/core/docs/task_introduction/#the-control-task-sources. This only works if the PWM timer is started, which is not the case in the Blinky LED example.
I suggest to:
- add a link that doc in the source ode
- make the timer source explicit in this example
In the longer run, it may be good to make the timer source explicit in most examples.
Hello OwnTech,
In the Blinky LED example, it is suggested that a critical task can be launched by uncommenting the following two lines, see
https://github.com/owntech-foundation/examples/blob/main/SPIN/LED/blinky/main.cpp#L65
task.createCritical(loop_critical_task, 500); task.startCritical();However, this is in contradiction with the way the critical task works (thanks @jalinei for the link): https://docs.owntech.org/latest/core/docs/task_introduction/#the-control-task-sources. This only works if the PWM timer is started, which is not the case in the Blinky LED example.
I suggest to:
In the longer run, it may be good to make the timer source explicit in most examples.