3
\$\begingroup\$

I drive a common-cathode three digit 7-segment display (JSD-2832AUR) with an MCU (TM4C123GH6PGE).

The circuit looks as follows:
enter image description here

Distribution of the signals on the MCU ports: enter image description here

All 7SEG_* signals are directly connected to output pins of the MCU. The supply voltage is 3.3 V.

At any given time only one of the common-cathode pins (7SEG_DIG1, 7SEG_DIG2, 7SEG_DIG3) are driven LOW.
For this measurement I'm driving all anode pins (7SEG_a, .., 7SEG_DP) with a permanent HIGH signal, and switch the three cathode pins periodically.

DCO plot: enter image description here

Measurements:
enter image description here

If these were driven by hard signals (0 V, 3.3 V) instead of the output of an MCU, the current per LED would be:

\$I_{LED} = \frac{V_{DD} - V_{LED}}{R} = \frac{3.3V - 2.0V}{150Ω} = 8.667mA\$

Calculating the current using the measured values:

\$I_{LED} = \frac{V_R}{R} = \frac{3.24V - 3.09V}{150Ω} = 1mA\$

My question:
As can be seen in the DCO plot, when the cathode-signal is pulled LOW, the actual voltage is 1.37 V. Could this pose a problem for the microcontroller? Could this cause the MCU to fail? Nothing gets hot, not even slightly. But we have some random MCU failures[‡] occurring, so I'm considering every possibility.

[‡] With MCU failure I mean that the MCU is totally dead (the internal core 1.2 V LDO and the oscillator both remain at 0 V). It's not typical for this MCU family to be so fragile. We're using the TM4C family for years, and if anything, we've come to the conclusion that they're very robust.


EDIT: additional info from the comments*

The drive strength of all MCU outputs is 8 mA:

// config 7SEG_a .. 7SEG_f outputs
MAP_GPIODirModeSet(GPIO_PORTA_BASE, (GPIO_PIN_2 | GPIO_PIN_3 | GPIO_PIN_4 | GPIO_PIN_5 | GPIO_PIN_6 | GPIO_PIN_7), GPIO_DIR_MODE_OUT);
MAP_GPIOPadConfigSet(GPIO_PORTA_BASE, (GPIO_PIN_2 | GPIO_PIN_3 | GPIO_PIN_4 | GPIO_PIN_5 | GPIO_PIN_6 | GPIO_PIN_7), GPIO_STRENGTH_8MA, GPIO_PIN_TYPE_STD);
MAP_GPIOPinTypeGPIOOutput(GPIO_PORTA_BASE, (GPIO_PIN_2 | GPIO_PIN_3 | GPIO_PIN_4 | GPIO_PIN_5 | GPIO_PIN_6 | GPIO_PIN_7));
MAP_GPIOPinWrite(GPIO_PORTA_BASE, (GPIO_PIN_2 | GPIO_PIN_3 | GPIO_PIN_4 | GPIO_PIN_5 | GPIO_PIN_6 | GPIO_PIN_7), 0);

// config 7SEG_g .. 7SEG_DP outputs
MAP_GPIODirModeSet(GPIO_PORTC_BASE, (GPIO_PIN_4 | GPIO_PIN_5), GPIO_DIR_MODE_OUT);
MAP_GPIOPadConfigSet(GPIO_PORTC_BASE, (GPIO_PIN_4 | GPIO_PIN_5), GPIO_STRENGTH_8MA, GPIO_PIN_TYPE_STD);
MAP_GPIOPinTypeGPIOOutput(GPIO_PORTC_BASE, (GPIO_PIN_4 | GPIO_PIN_5));
MAP_GPIOPinWrite(GPIO_PORTC_BASE, (GPIO_PIN_4 | GPIO_PIN_5), 0);

// config 7SEG_DIG1 .. 7SEG_DIG3 outputs
MAP_GPIODirModeSet(GPIO_PORTH_BASE, (GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2), GPIO_DIR_MODE_OUT);
MAP_GPIOPadConfigSet(GPIO_PORTH_BASE, (GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2), GPIO_STRENGTH_8MA, GPIO_PIN_TYPE_STD);
MAP_GPIOPinTypeGPIOOutput(GPIO_PORTH_BASE, (GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2));
MAP_GPIOPinWrite(GPIO_PORTH_BASE, (GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2), (GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2));

7SEG_a to 7SEG_f are connected to PORT_A.
7SEG_g and 7SEG_DP are connected to PORT_C.
7SEG_DIG1 to 7SEG_DIG3 are connected to PORT_H.

I have evaluated the "per-side" current limits on the datasheet, for example (section 24.3). We're far below the maximum ratings.

Approximately 15% of all devices failed. Tbh, it could be a bad batch of MCUs. But that's not the first option I want to consider. They don't fail immediately, usually after a couple of weeks. All of these cases are from a single production batch of 200 pieces.


TM4C123GH6PGE digital output specifications:

enter image description here

enter image description here
Source: TM4C123GH6PGE Datasheet


JSD-2832AUR specifications:

enter image description here

enter image description here

enter image description here
Source: JSD-2832AUR Datasheet

\$\endgroup\$
22
  • 1
    \$\begingroup\$ @jonathanjo Yes the blue plot is C3. That's the point, it doesn't go to 0V as expeted. \$\endgroup\$
    – Velvet
    Commented Jul 21, 2023 at 10:05
  • 1
    \$\begingroup\$ @Justme Yes, the problem of the fried MCUs could be something other than the LED display. The main differences from the product that has this issue is the LED display. And the power supply. I'm also verifying the power supply. \$\endgroup\$
    – Velvet
    Commented Jul 21, 2023 at 10:07
  • 1
    \$\begingroup\$ @jonathanjo "any estimate of what percentage or any other characterisation?" Approximately 15% of all devices failed. Tbh, it could be a bad batch of MCUs. But that's not the first option I want to consider. \$\endgroup\$
    – Velvet
    Commented Jul 21, 2023 at 10:10
  • 1
    \$\begingroup\$ @jonathanjo "I notice the "per-side" limits on the datasheet, for example (section 24.3)" I've verified these values. We're far from the max rating. Most of the remaining pins are configured as inputs or for communication (SPI, CAN, USB). But nothing that draws much current. \$\endgroup\$
    – Velvet
    Commented Jul 21, 2023 at 10:12
  • 1
    \$\begingroup\$ @jonathanjo We're considering troubles in assembly, soldering, PCB, and components. But haven't found anything glaringly obvious so far. I'm actively configuring a drive strength of 8mA. \$\endgroup\$
    – Velvet
    Commented Jul 21, 2023 at 10:38

2 Answers 2

1
\$\begingroup\$

Assuming the single measurement for one resistor can be assumed to hold true for all resistors and LEDs, there will be 1mA for each LED and as each digit has max 8 LEDs then max 8mA total current can flow into cathode drive pin.

That's certainly within absolute maximum ratings.

In the recommended limits it says the pin should be able to drive at least 8mA with 0.4V voltage in 8mA drive mode, and with relaxed IO parameters, in 8mA drive mode it can drive at least 18mA with a voltage of 1.2V.

Your measurements indicate the values are clearly nowhere near the expected 8mA drive mode values, if there's already 1.37V with 8mA current.

So while I don't see how this could be a problem, the MCU pin drive strength does seem to be set incorrectly and you should set all the LED anode and cathode drive pins to highest strength, just to be sure and rule out it is not a problem.

Perhaps also measure all voltages in the LED circuit to determine that no excessive currents flow accidentally. This also includes verifying with a multimeter that all the resistor are really 150 ohms instead of something else.

\$\endgroup\$
2
  • \$\begingroup\$ Thanks for your feedback. I already configured all of these pins for a drive strength of 8 mA. The part I don't understand is how the voltage rises to 0.4V and 1.2V when sinking 8mA and 18mA, respectively. And if this could have some implications for my problem (because the voltage reaches 1.37V). \$\endgroup\$
    – Velvet
    Commented Jul 21, 2023 at 10:21
  • 3
    \$\begingroup\$ @Velvel If resistors are really 150 ohms, total current really 8mA, and drive stregth really set to 8mA, then the IO pin voltage should not be 1.37V. Double check everything, for schematic errors, and then for PCB design errors, and then PCB manufacture errors, and then errors in component BOM and then errors in pick&place. For example if any supply or ground pins are left unconnected on PCB or some ferrite bead is missing to half of the MCU is unpowered or bypass caps missing on MCU built-in LDO, glitches on regulator that powers MCU, etc. \$\endgroup\$
    – Justme
    Commented Jul 21, 2023 at 10:40
0
\$\begingroup\$

Thanks to your answers and comments, I'm 100% sure that I wasn't operating the microcontroller within specs. And thus it could very possibly be the cause of the MCU deaths.

I measured \$V_{LED,anode}\$, which is an MCU output pulled LOW (current sink).

enter image description here

enter image description here

As @Justme answered "it can drive at least 18mA with a [low] voltage of 1.2V."

enter image description here

I've now modified the firmware to only allow 2 active segments at any given time.

A single segment is (theoretically) the equivalent of ~8.9mA. The datasheet specifies that any 4 outputs may source or sink up to 18mA (when configured as 8mA outputs). So with two active segments, I'm still below this threshold.

Only further tests will show whether this is actually the cause of the problem.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.