STM32U083 LCD Controller generates unexpected High Voltage (5V) - and kills its own GPIO pins
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

