Update CFBLR configuration

As per section "43.7.23 LTDC layer x color frame buffer length register (LTDC_LxCFBLR)" of Reference manual for STM32U5 RM0456, CFBLL has to be set to the length of one pixel line plus 3 (instead of plus 7 as for H7)
This commit is contained in:
William 2024-10-25 15:03:26 +02:00
parent 8803128707
commit 45e7a7a55a

View File

@ -395,7 +395,10 @@ impl<'d, T: Instance> Ltdc<'d, T> {
// framebuffer pitch and line length // framebuffer pitch and line length
layer.cfblr().modify(|w| { layer.cfblr().modify(|w| {
w.set_cfbp(width * bytes_per_pixel); w.set_cfbp(width * bytes_per_pixel);
#[cfg(not(stm32u5))]
w.set_cfbll(width * bytes_per_pixel + 7); w.set_cfbll(width * bytes_per_pixel + 7);
#[cfg(stm32u5)]
w.set_cfbll(width * bytes_per_pixel + 3);
}); });
// framebuffer line number // framebuffer line number