Page 1 of 1

RESET_CPU()

Posted: Thu Mar 16, 2017 4:38 pm
by stefan.erni
Hi Ben
Is there a way to reset the cpu like an another compiler?

///////////////////////////////////////////////////////////////// Control
// Control Functions: RESET_CPU(), SLEEP(), RESTART_CAUSE()
// Prototypes:
_bif int8 restart_cause(void);
_bif void reset_cpu(void);
_bif void sleep(void);
_bif void sleep(int8 type);

Re: RESET_CPU()

Posted: Thu Mar 16, 2017 5:26 pm
by Benj
Hello,

Yes there is usually a way. Mostly depends on which micro you're using?

If you look at the CAL ICD C file for the family you're interested in then right at the end is a software reset routine you can use via C code.

Re: RESET_CPU()

Posted: Thu Mar 16, 2017 6:01 pm
by stefan.erni
Hi Ben
Thank You. I saw it in the ICD-File. I have to enable the watchdog an run a whileloop for ever.

something else I have.
I used the eeprom in the chip.The bad side effect is, that if I download the program to the chip, it's takes 40seconds time to
write EEdatamemory. But I use only 3Byte in the eeprom and I write it in a (setup setting programpart). do I have to wait every time I Programm it or can I choose "only burn program" somewhere

Re: RESET_CPU()

Posted: Fri Mar 17, 2017 9:14 am
by stefan.erni
Hi Ben

I found the "Problem". I removed the Initial Value (0,1,0x2,0x03,'A','b',"Hello") from the EEprom-properties and now there is no 40seconds waiting time for programing anymore.