Hi,
Setup: I am using C8051F124 MCU. I have configured UART0 for serial communication to acquire real time data.
Problem: When I do hardware reset (i.e. pulling down the RST pin on the MCU), the system halts and does not come up again. On the other hand when I do a power cycle with a pause of almost a sec, then the system restarts and is up and running again. Repeating the power cycle with the pause is of short duration, like about 200msec or lower the system again fails to come up.
Other Details: The system is running at 50MHz RSTSRC = 0x06 on initialization
Please help to identify the mistake I am doing.
Kind Regards, CM
there are other people here who are bigger experts than me on this one, but you can verify: * that your watchdog is not resetting your device. * that you are using a proper reset circuit - something like a MAX1232 will do. have you checked that your device is powering up correctly, compared to the requirements of the data sheet?
The watchdog is not resetting my device. I did check that by disabling the watchdog and running the test again. The reset chip I am using is MICREL 2776N.
Also, when there is reset the RST line comes up almost 200msec after the voltage ramps up to maximum. Thus there is good enough time cushion.
Thanks
The RST Line from the 2776N or the /MR line The 2776N is an output In may not like you pulsing it.
for the SILabs f12x/f13x i do not use any external reset, just a 4k7 pullup on the reset pin (do NOT add the blasted 'noise suppression capacitor').
another possibility is a missed SFRPAGE set that makes something fiddle with/depend on the RSTSRC STR
Erik
After series of experiments, I have found out that the the serial interrupt is one that is giving me problem.
In the while(1) loop, I see that the flag suposed to be set in serial ISR (UART0) never gets updated and hence the function to respond to incoming serial data is never called. Thus there is no communication between the board and the PC.
I am still not sure, what the reset does to the serial peripheral.
I also made sure that the system is looping and control does do to the end of the while loop. I did this by toggling the I/O line. This means the system is not dead only the serial communication through UART0 is goofed up.
Any thoughts on that?
have a look at ALL involved SFRs (timers, UART, interrupt enables ....) in the situation where it does not work.
One of the things the SILabs people did right is that the debugger (at least when run from the SILabs IDE) does not 'die' because of an external reset.
Guys,
I was able to fix the problem, but saw some interesting behavior from the MCU.
I used to check RSTSRC register before I initiate any communication over the UART. I would check if the source of last reset was a power-on or VDD monitor reset. This check failed everytime I did a quick powercycle or pulled the RST pin low. But, it passed when there was a normal powercycle with more than 200msec duration between the voltage going down and coming up again. So, removing that check from my source code, I was able to solve the problem.
As of now I have found the root of the problem I was facing, but the behavior is not clear to me. Have you guys ever come across such condition or can you explain why this would happen?
Thanks for all the replies.
Kind Regards
if the source of last reset was a power-on or VDD monitor reset. But, it passed when there was a normal powercycle with more than 200msec duration between the voltage going down and coming up again. Here applies the law of unintended consequences. Someone got the not so brilliant idea to add a cap on the SILabs reset pin for 'noise suppression'. This, in effect, changes your reset from a Vdd monotor to a RC reset. I have thousand of units running with SILabs chips an no 'noise supprssion cap' they have none, zero, nada reset problems. just add a 4k7 or so from the reset pin to Vdd
Thanks mate.
Erik,
I appreciate your thoughts. I apparently do not have noise suppressant cap on the RST line of SILabs chip.
My RST line does have a 4k7 resistor to Vdd. I still saw this effect, hence the question.
The reset chip I am using is MICREL 2776N. remove