Closed dkonigsberg closed 2 years ago
It turns out that the real reason the LEDs were turning on at full power in system bootloader mode was not due to floating pins. Rather, it was due to the behavior of the STM bootloader as documented in AN2606. When the bootloader is running, USART1, USART2, and USB peripherals are all enabled. The pins used for TLED_EN
and RLED_EN
are the same pins respectively used for USART2_RX
and USART2_TX
. As such, they were being deliberately driven high.
Thus, there are two options:
EN
pins to PB3 (TIM2_CH2)
and PA15 (TIM2_CH1)
, and reroute accordingly.Additionally, as the AP2502 LED driver won't turn on unless its EN
pin is above 2V, adding pull-downs is probably unnecessary. However, adding 10k pulldowns anyways, simply as a matter of extra precaution, is likely a good idea.
I have not found any examples of boards using this kind of display with any sort of pull-down on the RESET pin. However, bench testing has shown that adding a 10k pulldown resistor to it is probably also a good idea. This is because:
When the microcontroller firmware has not started up, or has started using a system bootloader (e.g. USB DFU), most of its GPIO pins (except SWCLK and SWDIO) may be set to an analog input mode. In this mode, things connected to them without external pull-up/pull-down resistors may float and have undesired behavior.
To make sure all the corner cases are covered, this situation should be dealt with:
TLED_EN
andRLED_EN
nets most likely need pull-down resistors. Without these, the LEDs may turn on at full power if the firmware hasn't been able to configure the GPIOs. Bench testing should be done to determine the exact behavior, and the appropriate resistor values to use.