Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
8 years, 8 months ago.
Software Reset
Hi,
is there a command which causes a software reset?
I would like to produce a reset with a if-loop.
-------
int main()
{
while(1) {
z=z++;
myled = 1;
wait(0.2);
myled = 0;
wait(0.2);
if(z==10){
SOFTWARERESET
}}}
-------
Is there a command?
Thank you for help,
Marvin
2 Answers
8 years, 8 months ago.
I use mbed_reset() (with a C declaration : extern "C" void mbed_reset(); )
To note the difference: The one I mentioned will reset only the target and works always on each target.
This one works only on original two mbeds (which the poster has, so that's fine), and performs reset by asking the interface chip to do a reset. This will also load a new binary file if you drag and dropped it on the disk.
posted by 31 Aug 2015