I am trying to find out if a software reset would cause the GPIO state to default back to a reset states on PIC24F?
The reset command i would like to use:
asm ("reset");
I could not find the answer in the documentation so i tried the following tests.
Test 1:
(pseudo code).
start firmware
wait 5 sec
turn LED on
wait 2 sec
reset soft using the code -> asm ("reset");
When this reset method is use, the behavior is as follow.
power on
LED off for 5 seconds
LED on for 2 seconds
...
LED off for 5 seconds
LED on for 2 seconds
Test 2:
(pseudo code).
start firmware
wait 5 sec
turn LED on
wait 2 sec
reset soft using the code -> ((void(*)())NULL)();
When this "reset" (jump) method is use, the behavior is as follow.
power on
LED off for 5 seconds
LED on indefinitelly after
Can someone answer the initial question and explain why the PIC behave this way ?