aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam <[email protected]>2024-10-25 15:03:26 +0200
committerWilliam <[email protected]>2024-10-25 15:03:26 +0200
commit45e7a7a55aa6b5b8d41d81949b75b1b4a154f9bd (patch)
tree9e4f584be399198e82ec05c300ad0b5fcfd4d771
parent8803128707b8bd9fc9dcea392a62dfd42aa822d2 (diff)
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)
-rw-r--r--embassy-stm32/src/ltdc.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/embassy-stm32/src/ltdc.rs b/embassy-stm32/src/ltdc.rs
index 4c5239971..e25c4f3fb 100644
--- a/embassy-stm32/src/ltdc.rs
+++ b/embassy-stm32/src/ltdc.rs
@@ -395,7 +395,10 @@ impl<'d, T: Instance> Ltdc<'d, T> {
395 // framebuffer pitch and line length 395 // framebuffer pitch and line length
396 layer.cfblr().modify(|w| { 396 layer.cfblr().modify(|w| {
397 w.set_cfbp(width * bytes_per_pixel); 397 w.set_cfbp(width * bytes_per_pixel);
398 #[cfg(not(stm32u5))]
398 w.set_cfbll(width * bytes_per_pixel + 7); 399 w.set_cfbll(width * bytes_per_pixel + 7);
400 #[cfg(stm32u5)]
401 w.set_cfbll(width * bytes_per_pixel + 3);
399 }); 402 });
400 403
401 // framebuffer line number 404 // framebuffer line number