cancel
Showing results for 
Search instead for 
Did you mean: 

STM32U083 LCD Controller generates unexpected High Voltage (5V) - and kills its own GPIO pins

miho
Associate

I use STM32U083RCT6 on (my own) simple development board powered by 3.3V (VDD=VDDA=3.3V). I am using small LCD display glass with 4x8 segments.

 

Initialisation code - the first problem

Fist problem is that STM32CubeIDE does generates wrong/incomplete initialisation code:

 

/* Initialize all configured peripherals */
MX_GPIO_Init();
MX_LCD_Init();  // Never returns (LCD CLK is not enabled yet)
MX_RTC_Init();

 

The MX_LCD_Init() failes internally with HAL_TIMOUT beceause LCD controller does not have enabled clocks (clock signal is the same as for RTC). If you have running RTC the initialisation of LCD will succeds.

You must have something like this:

 

/* Initialize all configured peripherals */
MX_GPIO_Init();
MX_RTC_Init();
MX_LCD_Init();

 

 

Step Up Voltage Generator - generates almost 5V!

If you configure LCD controller's internal step-up voltage generator without buffer (LCD_CR.BUFEN=0) the voltage generator generates on PC3=VLCD unexpected high voltage, typicaly 4.9V. This is configuration STM32CubeIDE generates.

If you configure LCD controller's internal step-up voltage generator with buffer (LCD_CR.BUFEN=1) the voltage generator generates on PC3=VLCD voltage in correct rage accordibg to LCD_FCR.CC field (2.6 to 3.5V).

Not perfect workaround:

 

  /* USER CODE BEGIN SysInit */

  MX_RTC_Init();   // Enable Clk for LCD

  /* USER CODE END SysInit */

  /* Initialize all configured peripherals */
  MX_GPIO_Init();
  MX_LCD_Init();
  MX_RTC_Init();
  /* USER CODE BEGIN 2 */

  __HAL_LCD_DISABLE(&hlcd);
  HAL_Delay(10);
  __HAL_LCD_VOLTAGE_BUFFER_ENABLE(&hlcd);
  __HAL_LCD_ENABLE(&hlcd);    // Switch now from 5V to correct voltage

  /* USER CODE END 2 */

 

 

Killed processor

I am afraid that that the generated voltage is internaly limited by ESC circuit on GPIO. It does not withstand long. My processor has now broken GPIO PA9. It is somehow shortened inside. The PA9 pin now generates wrong voltages (instead of expected 4 levels, only 2 levels is generated).

VDD=3.3V VLCD=2.73V, LCD_FCR.CC=1, LCD_CR.BUFEN=1
PA10: 0V, 0.92V, 2.04V, 3.1V (more or less expected)
PA9: 2.56V, 3.72V (not expected)

After reset I can see 4.9V on pin PA9 (and high-Z on PC3=VLCD). LCD step-up convertor is not deactivated by reset signal. I think reset disables LCD_CR.BUFEN but does not stop step-up convertor.

 

Datasheet - VLCD voltages

2.62/2.76/2.89/3.04/3.19/3.32/3.46/3.62   Datasheet DS14463 - Rev 2 table 81 on page 102
2.60/2.73/2.86/2.99/3.12/3.26/3.40/3.55   STM32CubeIDE 1.16.1 (more close to reality)
2.59/2.73/2.86/3.00/3.12/3.22/3.35/3.46   My processor

1 ACCEPTED SOLUTION

Accepted Solutions

You are absolutely right. The problem is in schematics. I thought that there is nothing but CPU and then I stared to think - thank to you. In short the problem is resistor from USB VBUS (+5V if plugged in) to PA9=LCD_COM1. Because development board is more or less universal the PA9 is connected to USB VBUS (VBUS sensing, USB_OTG_FS_VBUS for some processors) via resistor R1.

miho_0-1736771890663.png

Resume:

be aware of USB_VBUS sensing connected to PA9 on universal development boards which is not compatible with LCD.

 

View solution in original post

3 REPLIES 3

For a custom board, behaving oddly, might I strongly suggest you attach a schematic. You can redact sensitive parts as you wish, but show STM32 it's connectivity, especially power, regulation/supply, and LCD

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
CMYL
ST Employee

Hi Miho,

Internal support Ticket is created to share this issue.

 

Best regards

 

You are absolutely right. The problem is in schematics. I thought that there is nothing but CPU and then I stared to think - thank to you. In short the problem is resistor from USB VBUS (+5V if plugged in) to PA9=LCD_COM1. Because development board is more or less universal the PA9 is connected to USB VBUS (VBUS sensing, USB_OTG_FS_VBUS for some processors) via resistor R1.

miho_0-1736771890663.png

Resume:

be aware of USB_VBUS sensing connected to PA9 on universal development boards which is not compatible with LCD.