Unreliable power up when VBAt in use

robws

Member
I have a board with various IO's connected to a Teensy 4.1. In addition I have a CR2032 battery connected to the VBAT pin.

The RTC works just fine.

All system functions are powered independent of the teensy. So for example I have a separate 3.3V regulator which provides power to the 3.3 peripherals (and is NOT connected to the teensy 3.3V rail). The 5V system rail powers the teensy on the VCC pin.

However, I have very strange behavior when applying system power after a power down.

With the system powered down, if I apply power via the USB (or 5V direct from an external power supply to VCC) then the Teensy will NOT restart. Power draw on the VCC pin is 0ma.

If I apply main board power, enabling my 3.3V and 5V system rails then the teensy will restart about 80% of the time. But sometimes not.

I suspect there is something on one of the pins causing the Teensy to not come out of SNVS mode (as described in application note: AN12245) with the hardware reset.

Does anyone know what Teensy 4.1 Pin I need to start looking at? I use about 80% of them.
 
I have a board with various IO's connected to a Teensy 4.1. In addition I have a CR2032 battery connected to the VBAT pin.

The RTC works just fine.

All system functions are powered independent of the teensy. So for example I have a separate 3.3V regulator which provides power to the 3.3 peripherals (and is NOT connected to the teensy 3.3V rail). The 5V system rail powers the teensy on the VCC pin.

However, I have very strange behavior when applying system power after a power down.

With the system powered down, if I apply power via the USB (or 5V direct from an external power supply to VCC) then the Teensy will NOT restart. Power draw on the VCC pin is 0ma.

If I apply main board power, enabling my 3.3V and 5V system rails then the teensy will restart about 80% of the time. But sometimes not.

Problems of this kind are often caused by different turn-on times of the two independent supplies. If your external 3.3V supply turns on before the 3.3V of the Teensy, peripheral outputs powered from the external supply and connected to the Teensy can feed current into the Teensy, causing problems. If your external supply isn't stable when the Teensy enables peripheral outputs, those outputs can be overloaded.

On the Teensy side, you can insert a few hundred milliseconds of delay in setup() before you switch pins to outputs with pinMode() or by initializing peripherals, like serial ports or SPI. That should allow time for the external supply to stabilize.

When you power the Teensy directly, (with a separate 5V supply, or USB), you should check one of the peripheral connections that is normally high, to make sure that the external supply is on and stable before you enable peripherals connected to the external system

A more sophisticated, and safer, approach is to connect the external 3.3V supply to a Teensy ADC pin through a 10K resistor. You can read that pin voltage to find out when the external 3.3V supply is stable. After the external supply is stable, you can proceed with the setup items that turn on Teensy peripherals.

If the external 3.3V supply turns on more quickly than that of the Teensy, you may need to add a power control output from the Teensy to turn on the external 3.3V after the Teensy is up and running. A quick fix might be to add a lot more capacitance on the external 3.3V supply to slow down its rise time.

A 2-channel oscilloscope connected to the two 3.3V supplies is the best diagnostic tool for troubleshooting issues like this.
 
Back
Top