Proper SX reset when power applied
Tony Leyland
Posts: 71
Hi all,
Can anyone help me with a strange problem I'm experiencing.
I have 3 SXs linked together via a common serial bus and all connected to a BS2.
The power for the whole lot is coming from the STAMP BOE.
When power is applied (thru BOE switch), the STAMP resets correctly but 50% of the time all the
SXs don't reset and hence don't run properly. The SXs are running from their own 50Mhz resonators.
Each SX has a 10K pull up resistor on MCLR. I've even tried putting a capacitor between MCLR and ground
hoping that it would bring it low for a short time. 0.1uF decoupling caps are present and 10 uF cap is also
across the supply lines on my development board.
Any ideas ?
Thanks in advance for your help.
Tony
Can anyone help me with a strange problem I'm experiencing.
I have 3 SXs linked together via a common serial bus and all connected to a BS2.
The power for the whole lot is coming from the STAMP BOE.
When power is applied (thru BOE switch), the STAMP resets correctly but 50% of the time all the
SXs don't reset and hence don't run properly. The SXs are running from their own 50Mhz resonators.
Each SX has a 10K pull up resistor on MCLR. I've even tried putting a capacitor between MCLR and ground
hoping that it would bring it low for a short time. 0.1uF decoupling caps are present and 10 uF cap is also
across the supply lines on my development board.
Any ideas ?
Thanks in advance for your help.
Tony
Comments
the three additional SXes clocked @ 50 MHz "eat" some remarkable power. Are you sure that the STAMP BOE regulator is capable of this additional load? Maybe, it is an idea that you measure the total current drawn by the three SXes.
Do you have brownout detection active in the SXes? Maybe, the supply voltage drops for a short moment when you power up, but long enough for the brownout detection.
Here is a "reset phenomenon" I once had:
A while ago, I had real trouble with an SX application (just one SX on board). It did a proper reset only about every second try. I added the external RC reset circuit - no success, I tried an external reset controller - no success. Days later, I again looked at the source code. Usually, at the beginning of the main program, I add code to clear all RAM locations, like shown below:
In most cases, I copy these lines from some other program, and paste it into the new code. So I also did for this application but I forgot to copy the very first line
This means that the fsr contained some random value when the loop was entered, causing that not all RAM locations were cleared, and this again caused code executed later to run wild because it was assuming a "clean" RAM. IOW, the SX always did a reset (I only thought it didn't) but got locked somewhere else in the program.
As a matter of fact, I never could reproduce this with the SX-Key debugger because the debugger always clears the FSR when you start it.
I learned that copy/paste is a nice feature but it can cost you a lot of hairs too. Since then, I use an include file containing this clear RAM stuff .
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Greetings from Germany,
G
The power to the whole circuit comes from an AC adapter. I've just disconnected 2 SXs and left 1 remaining.
The SX still does not reset properly. I have even tried leaving the BOE on and switching power to the SX board.
Still no proper reset.
Hi G
I use the brownout BOR42 (for a 5v unit) and it works fine.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Check out· the "SX-Video Display Module"
www.sxvm.com
·
Tony
make a difference is changing the device directive from BOROFF to BOR42. The SXs now all reset
properly when power is applied.
Thanks guys.
P.S. One thing I did notice however, is that the BOR42 directive needs to be on ALL 3 SXs. If just one
has the BOROFF directive then all 3 SXs won't reset after power is applied !
Do you have de-coupling caps at each SX ?
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Check out· the "SX-Video Display Module"
www.sxvm.com
·
I'm not too worried by what I've seen, I'll just remember to use BOR42 in all my projects !
Thanks,
Tony