Skip to content

Add warning about Control task timer source in Blinky LED example #57

@pierre-haessig

Description

@pierre-haessig

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:

  1. add a link that doc in the source ode
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions