Skip to content

[Scheduling] Critical task with source_tim6 timer doesn't work #143

@pierre-haessig

Description

@pierre-haessig

Describe the bug

As a follow up of owntech-foundation/examples#57 where the critical task of the Blinky example cannot start unless the tim6 source is specified.

I've created a Blinky example with a simple critical task with timer source set to source_tim6, see blinky+critical branch https://github.com/pierre-haessig/owntech-examples/blob/blinky%2Bcritical/src/main.cpp. However , I believe that the critical task is not starting. Perhaps timer 6 is not initialized?

To Reproduce
Steps to reproduce the behavior:

  1. Load blinky example
  2. Replace main.cpp by the one from the blinky+critical branch at e0841bd commit https://github.com/pierre-haessig/owntech-examples/blob/e0841bd5cbac7a21b99c3d4bf70e54d092c9f8c8/src/main.cpp
  3. Build and Upload code

Expected behavior

The critical task, if it runs at least one, should set the boolean flag flag = true;

Then the loop_background_task is blinking the LED at a speed which depends on the flag. If flag were true, the blinking should be fast (100ms). However, it is slow (1000 ms), proving that flag=false.

Metadata

Metadata

Labels

bugSomething isn't workingdocumentationImprovements or additions to documentationenhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions