This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TM4C123GE6PMI dying on battery powered product!

Other Parts Discussed in Thread: TL7700

I have a battery powered product with a TM4C123GE6PMI chip on it.  Everything works fine most of the time, but it looks like when the battery drops out after being on for a long time the Tiva part dies on me and won't come back to life. 

The battery is a 4.V NiMH going into a buck regulator.  When the product is left on for an extended period of time the Vcc (3.3V) voltage rail drops out (the Tiva is connected/powered by this) and it looks like the Tiva part dies and wont' come back to life.  This is a pretty big problem for me.  Has anyone seen anything like this before?  Any recommendations? 


The buck regulator tries to power the system until the battery is dead.  I don't have any battery monitoring circuits on there to manage a low battery, brown out etc....  I was hoping when the battery got too low the buck would just stop outputting.

Thanks for any input!

  • Hi Robbie,

    I don't quite understand, have you tried to power the Tiva again with a new battery? If so, does the 3.3V voltage rail is still bellow that value?
    You seem to say if you power the Tiva bellow 3.3V the chip get's destroyed and it won't work again in any way.
    The Tiva has a recommended operating voltage from 3.15V to 3.63V so if the voltage get's bellow 3.15V it's normal that it stops working.

    A voltage regulator will still have an output. Most won't cut off if the voltage input is bellow normal. Note that it's not like the buck knows what it's powering it, it doesn't know the battery is discharged...
    You can't just "hope" and make a product based on that.
  • Hi Luis,

    Yes I've powered it with the same battery and a new battery.  Vcc comes up to 3.4V no problem.  The voltage rail looks fine, but the Tiva part is non-functional.  Does not work and is dead.  It never comes back to life.  I can't program it or communication with it etc....  When it is powered up the Tiva is supposed to blink an LED on my board indicating it is alive.  Normally this works fine.  Upon letting it run off battery until the battery pack dies it appears the Tiva part dies and doesn't come back to life. The battery pack is a 4.8 volt pack and the buck regulates this down to 3.3.  If I replace the Tiva part with a new one and program it everything works fine. 


    I thought if the voltage got BELOW 3.15V the chip would just stop working, basically shut off, until the voltage returned to a normal level.  I realize now that this is not a  great design.    I never thought this would kill the Tiva part though.

    I've attached a block diagram of my system.  Because I'm charging a 4.8V battery pack from USB I had to use a boost regulator unless there is a simple charging solution chip that can use 5 volts as Vin to charge 4 NiMH cells. 

    Block diagram.pdf

  • That's the problem. Out of the recommended conditions you never know what will happen :/

    I will have to get you back on that.
    Maybe other users will know a solution but it's actually the first time I've seen this. I had a Tiva being powered by a battery that later died off to 3V and it didn't occur what you described.

    Anyway, can you program your Tiva still? No errors, no nothing?
    Your board is custom, correct?
  • Ok. I cannot program the chip. It does not work. Correct, my board is custom. I have all recommended caps per the data sheet though.
  • Hello Robbie,

    When a new battery is put, does the VDDC voltage rail come to 1.2V. If yo are using an external oscillator, then can you check if the crystal is oscillating?

    Regards
    Amit
  • Hey Amit,

    Great idea!  I put a new battery pack on and checked both VDD and VDDC.  Vdd is 3.3V as expected and VDDC is 1.2V just like normal.  I also checked my oscillator and it is dead.   Unfortunately replacing the oscillator doesn't bring the TIva part back to life :(

  • Hello Robbie,

    Were you trying to use EEPROM for the application running on the device?

    Regards
    Amit
  • I am using EEPROM to store some configuration variables.
  • Hello Robbie,

    I am suspecting that the EEPROM Errata is causing the trouble and device has got locked up. Are these configuration variables regularly updated or are they read only with programmed only once?

    Regards
    Amit
  • When the device is running I can change them via software app through USB. In this situation the part just powers up, reads the variables from EEPROM and configures itself. They are not re-written on power up but ARE read.
  • Hello Robbie,

    If you connect a scope on the JTAG TDO pin (w/o a debugger connected) what do you see? What I am trying to identify is the possible cause of the lock up (and this one which is rendering the device unusable). Also I may inclined to ask if the device is a rev-6 or a rev-7, so that I can narrow down possible causes.

    Regards
    Amit
  • When I power up the device and look at the TDO pin I see a square wave with a magnitude of ~4.5V and a period of ~65mS.  I'm not sure where to check the rev.  The exact part number I am using is TM4C123GE6PMI.  Printed on the chip above the part number is 980  YF.  Printed on the chip under the part number is 37C9QQW and underneath that is printed G4.  Does this tell you the rev?

  • Hello Robbie,

    It seems that the device has hit the EEPROM errata MEM#04. There should be a number TM4C123GE6PMI6 or TM4C123GE6PMI7. By looking at the 37C9QQW it seems that it would be a rev-6

    Regards
    Amit
  • I guess I can see MEM#4. So do you think the battery is draining enough that the part is resetting over and over because my Vcc dips down to ~3.15V causing constant resets? This is the only thing that makes sense to me. Also, if that is the case does that require me to implement some kind of hysteresis based enable/disable to the 3.3V switching regulator so it shuts down before the battery pack is totally dead? Any ideas on the simplest approach to remedy a problem like this?

    Also, thank you very much for that find! That was a good find in the errata and it would have taken me a MUCH longer time to get to this conclusion! :)
  • Hello Robbie

    The issue is with the program/erase of EEPROM when the voltage dips to a reset condition. My suggestion would be to use BOR as a NMI/Interrupt condition to inform the CPU that voltage is low to not cause a reset but for the CPU to stop any EEPROM operation. If every TM4C devices behaves the same then I would be concerned far much more than the errata. On the other hand if this is one of many TM4C's that failed then it would be time to change the BOR conditioning of the device.

    Regards
    Amit
  • Amit,

    Could you elaborate on what you mean by "On the other hand if this is one of many TM4C's that failed then it would be time to change the BOR conditioning of the device."?  This happens on every device because my battery pack eventually drains down to the point where the output voltage of the regulator is dipping from lack of battery power and causing the system (Tiva part) to power up, drawing current which  causes Vcc to dip, resets the chip etc....over and over.  This is at least what I'm thinking.


    Could I set brown out detection to detect if Vcc is less than 3.3 nominal to interrupt, shut everything down and not communicate to eeprom.  When the battery is recharged the regulator will output 3.3V plus and the BOR detction will not trip and allow the chip to run the normal code?  Do you see what I'm getting at? 

  • Hello Robbie,

    But when this dip is happening does the EEPROM get Programmed/Erased or does it only get Read only. From the description before, it seems that Program/Erase is happening only under user control and not by the application program.
    Also since this is Rev-6 Silicon (you can alternatively check the SYSCTL.DID0 on a fresh part), the MEM#04 has a major influence and I would suggest replacing the devices with Rev-7 Silicon

    As for BOR detection, you cannot change the threshold. You can only change the BOR circuit to generate an interrupt or reset. Alternatively an external Voltage Supervisory circuit may be needed to detect the voltage droop.

    Regards
    Amit
  • Correct. The device reads eeprom only on power up to get configuration data. It does not write, only reads from it. You are correct that programming of EEPROM is happening under user control which is not applicable to our current discussion. At least I don't think it is.

    I will look into rev7. If I enable the brown out detection will this trap the arm in an NMI when the voltage (Vcc) is too low? This could be a good fix becasue if so it would prevent the device from reading from eeprom until the battery is recharged.

    If I want the device to trap in the isr for BOR at ~3V do I just set BOR0 in the brown out reset control register on page 240 of the data sheet? This will cause an NMI? Is it that simple? 1 bit to set? I'm hoping so :)
  • Hello Robbie

    You would need to check the BOR0 as that is the higher of the two BOR levels. Also I was wrong on the NMI part. It will be a System Control Module Interrupt

    Regards
    Amit
  • Ok. So the datasheet seems to say setting bor0 or bor1 causes the part to generate a reset. Clearing these bits generates an interrupt. I want the part to generate an interrupt so the CPU stays in the isr and can't execute anymore program code. This should prevent it from getting to the read from eeprom section on power up. To get the interrupt functionality do I just clear bor0 and bor1?

    Also do I have to enable bor interrupt capability in the nvic or is it always enabled?
  • May I note that much complexity & uncertainty has been added in your "non-standard" attempt to produce an, "orderly MCU shut-down!"   And - very well designed and implemented ICs have long existed - designed to that exact purpose!

    Reinventing a known good wheel - via great complexity and some degree of "hope" may not best serve you long-term.

    It should not be too hard nor expensive to order your MCU into an orderly shut-down when your primary power supply decays below an appropriate voltage level.   That's a long standard/practiced technique.   The many winding gyrations presented here - unfortunately - not so much...

  • Hello Robbie

    The registers will be reset as well if the voltage goes too low and hence on power up it will go back to reset capability. The action that must be taken is to inform the user of a battery changeover/charge,

    Regards
    Amit
  • I agree, but I need a way to make sure the part doesn't lock up if the user doesn't listen :)  Would something like this work:

    The first thing I do is enable the BOR0 and BOR1 interrupt setting in the PBORCTL register then the next instruction is to enable their interrupts using the below code:

    	HWREG(SYSCTL_PBORCTL) &=~ 0x06;		// Enable BOR to trigger Sys interrupt
    	HWREG(SYSCTL_IMC) |= 0x802;			// Enable BOR interrupts
    
        //
        // Enable Global processor interrupts
        //
        IntMasterEnable();

    So this way if there are any power dips that cause resets the cpu will see the voltage is low and get stuck in the while(1) of the fault handler?  If this is the case then it would never reach my EEPROM code.  Does this seem like a possible solution?  Also, is this the correct way to enable BOR reset functionality?

  • Hello Robbie,

    This is a possible solution, but since the battery is still draining it will still reset. I would suggest two alternate solutions to save battery

    1. Put it in Deep Sleep Mode with lowest current drain w/o a wakeup source, so that the device shall remain in the low current drain till the battery is not changed
    2. If Hibernate option is available then use the same instead of #1

    I would re-consider cb1's point. If it is possible to have a voltage supervisory circuit, then hold the device in reset.

    Regards
    Amit
  • I agree with you and cb1 regarding the voltage supervisor circuit. I've looked into that and have only found the LTC3631 part that looks like it would work. Does TI have a simple part or family of parts that could do this same function?

    I am curious about your sleep mode idea. Are you saying when the BOR interrupt trips I should put the CPU into deep sleep via a deep sleep call in the interrupt service handler routine?
  • Hello Robbie,

    Once the interrupt has been cleared, set a flag and ask the main application to put it in Deep Sleep with lower power consumption setting.

    There are similar products from TI like TL7700. Just go on to www.ti.com and search for voltage supervisor (especially the ultra low power)

    Regards
    Amit
  • Bravo Amit! Several of our clients have used your TL7700 - and each reported great success.

    One client - desperate to "save pennies" implemented a "poor man's version" via a quad, voltage comparator - with 2 free comparator sections "left over."

    Rejecting the "known" (MCU/Voltage supervisor) for a far more complex (and incompletely tested/verified) "Multi-Register, sequenced MCU shut-down solution" seems not to satisfy, "Risk - Reward!"