Reassigning an LTDC pin to DAC after MspInit — is this safe?
Hello ST Community,
I am working on a custom PCB using the STM32H743ZIT.
My project uses the LTDC to generate a VGA signal.
I also need at least 1 DAC output and USB_FS.
The issue is, in this specific MCU, the only 2 DAC’s are on:
PA4 (conflicts with LTDC_VSYNC)
PA5 (possibly conflicts with LTDC_R4)
Now, I can move LTDC_R4 to PA11 but now it conflicts with USB_FS pins.
Importantly, LTDC_R4 is not physically connected on our PCB. We only use 8 simple colors so I can use any LTDC pin to connect it to VGA signal. I’m completely fine losing LTDC_R4 altogether because we don’t use it at all.
Question:
If I do the following, will it cause any conflict issues due to the way the MCU works internally?
1- Assign LTDC_R4 to PA5 in CubeMX to satisfy the configurator
2- Immediately after HAL_LTDC_MspInit() completes, override PA5 to analog mode using HAL_GPIO_Init() for DAC use
3- Configure DAC1 channel 2 manually in code and importantly, I call it AFTER HAL_LTDC_MspInit()
Note: We are not reinitializing LTDC at runtime, so MspInit will only be called once at startup.
Thanks in advance :)
