0
\$\begingroup\$

My STM32F429 project works fine before I added the LTDC module generated by CubeMx. After I added LTDC, the FMC interface began to lost data occasionally which was good before. I thought it may be caused by HSE instability. In order to test the HSE clock, I measured the MCO signal which shows the greate difference after LTDC is added.

Before: enter image description here

After: enter image description here

I comment HAL_LTDC_MspInit() line by line and find the cause of HSE instability is LTDC_DE signal initialization. When I comment following code off(PF10: LTDC_DE), the MCO clock show correct.

GPIO_InitStruct.Pin = GPIO_PIN_10;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
GPIO_InitStruct.Alternate = GPIO_AF14_LTDC;
HAL_GPIO_Init(GPIOF, &GPIO_InitStruct);

However, I still cannot understand why this signal makes HSE failure and how can I fix this issue because LTDC is needed in my design?

This is clock configuration enter image description here

Edit1: Add zoomed-in waveform before and after LTDC added.

Before: enter image description here

After: enter image description here

\$\endgroup\$
  • \$\begingroup\$ First set your scope so that you can actually see the waveform of the signal... you have it drastically misconfigured. If the issue you see is real and not a scope sampling artifact, you'll be able to still trigger on it by amplitude or possibly by a pulse width criteria. \$\endgroup\$ – Chris Stratton Aug 6 at 5:14
  • \$\begingroup\$ Which exact STM32F4 model is it? I Can't even open the datasheet if I don't know that. What is on PF10 pin, it goes to LCD_DE? Driving the display will draw supply current in peaks and they happen in respect to DE, are you sure this isn't just supply voltage variation? \$\endgroup\$ – Justme Aug 6 at 5:47
  • \$\begingroup\$ @Justme It is STM32F429 which I have added a link to datasheet in the post. It is connected to LCD_DE. I don't reckon it is voltage variation because without this signal, the clock waveform is good and I have measured it several times. \$\endgroup\$ – Ross Aug 6 at 6:05
  • \$\begingroup\$ But the clock waveform of MCO is not good, it is garbage on the scope pictures you posted. It should be 25 MHz square wave at 3.3 volts. Just measure the 3.3V supply voltage waveform when driving the LCD. Or the DE is incorrectly connected or has a short somewhere. \$\endgroup\$ – Justme Aug 6 at 8:33
  • \$\begingroup\$ @Justme I added some zoomed-in waveform image in this post. By comparing these images, you can see after the LTDC is added, the MCO vibrate greatly sometimes, looks like overshoot. However, until now, I've not connected LCD screen yet, so I guess maybe it is the LTDC module itself draw supply current from the STM32? \$\endgroup\$ – Ross Aug 6 at 23:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.