This is basically an embedded C. Is there anything called processor loading where your c program for example 100ms tasks etc will some time load heavily that your processor resets?
This is basically an embedded C. Is there anything called processor loading where your c program for example 100ms tasks etc will some time load heavily that your processor resets?
If your microcontroller overheats and the embedded system has an automatic thermal shutdown system, then sure. But nothing should be taken for granted in these situations.
Devoted my life to programming...
Perhaps you could uniformly run the processor at a lower clock speed.
Or add better thermal management (add heatsinks) to your hardware.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
I am not saying anything in terms of thermal, but the way software code is distributed.
Some microcontrollers have an watchdog timer which can be used in the same maner as SIGALRM signal, interrupting the flow of normal process and executing an interrupt service routine periodically. How you implement this depends on your microcontroller, your compiler and what you want to do...
I'm guessing that you are getting a reset while using freeRTOS?...will some time load heavily that your processor resets?
There are a few different ways that a device can reset - In the device that I am currently using (PIC16F15325) there are ways of determining the cause of the reset (by reading the STATUS and PCON registers). This is explained in the section of the data sheet called, "8.13 - Determining the Cause of a Reset".
Have a look in your devices datasheet and see if there is a way to read what the last reset was on startup.
From there, see if there is a way of implementing a start up routine with freeRTOS.
Fact - Beethoven wrote his first symphony in C
It is embedded c so it should be in continuous while(1). But major doubt is should a basic scheduler must always be implemented and run all my functionality in the tasks? I cannot run my functionality in a continuous while loop? I know i can run but i am getting the reviews that i should never do it. Is it correct?
Sure you can run a while(1) loop.
But you either need to disable the watchdog functionality on your chip, or make sure you call whatever 'watchdog reset' mechanism is provided at least once every time around your forever loop.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
The Arduino runs this way, and that is very popular - You have 2 functions that you must implement: Setup and Loop. Setup runs once, and then the loop... Well.. Loops forever.
It's what you do from there that makes it a good or crappy!