Skip to content

Help, my task doesn't work!

Richard Arthurs edited this page May 20, 2018 · 2 revisions

There are several things to check when you think your task isn't working.

  1. If you run the code and hit the debugger's pause button, where does it take you? This can provide a hint as to what's going wrong.

  2. Is your task implemented correctly? Your code should be inside an infinite loop, for example.

  3. Are your task handles declared properly? You will probably get a compiler warning or error if this isn't the case.

  4. Task stack. Sizing the task stack can be a bit of an art. Try increasing it. We have not seen tasks require more than 1000 words.

  5. If you've confirmed all of the steps above and it's still not working, the RTOS is probably out of heap, or you have an issue with some function your task is calling.

    • RTOS heap is set in platform/include/FreeRTOSConfig.h
    • #define configTOTAL_HEAP_SIZE ( ( size_t ) 38000 ) is the RTOS heap setting. Increase it.