Bug in the RT-STM32F429-DISCOVERY-DMA2D demo Topic is solved

Report here problems in any of ChibiOS components. This forum is NOT for support.
wpaul
Posts: 16
Joined: Wed Oct 12, 2016 10:06 pm
Been thanked: 3 times

Bug in the RT-STM32F429-DISCOVERY-DMA2D demo  Topic is solved

Postby wpaul » Thu Jun 04, 2020 9:17 pm

I apologize if this isn't the right place to report this: the RT-STM32F429-DISCOVERY-DMA2D demo is part of the community supported code, but there doesn't seem to be an STM32 board in the community support section.

The problem is pretty simple. This demo is intended to exercise the LCD and DMA2D graphics support on the STM32F429 Discovery board. However if you compile and run it, the graphics display doesn't work. It flashes slightly and sometimes fades to an odd pattern or just stays white.

The problem is that the clock for the LCD controller is derived from the SAI PLL, but this PLL is not being enabled. The RT-STM32F429-DISCOVERY-DMA2D doesn't actually use the SAI blocks, so it doesn't enable SAI support explicitly, but because of this the LCD controller also doesn't function correctly either.

I suspect that at one point ChibiOS did enable the SAI PLL as a side effect of some other configuration setting (maybe the STM32_SAISRC macro?), but it doesn't seem to work the same way anymore, and now the demo is stale with respect to the latest ChibiOS CPU support code.

Note that this was observed with ChibiOS release 19.1.3, but I think the problem is still evident with the latest repo code too.

I fixed this by adding the following one-line patch to the mcuconf.h file:

Code: Select all

--- a/software/firmware/ChibiOS/community/demos/STM32/RT-STM32F429-DISCOVERY-DMA2D/mcuconf.h
+++ b/software/firmware/ChibiOS/community/demos/STM32/RT-STM32F429-DISCOVERY-DMA2D/mcuconf.h
@@ -64,6 +64,7 @@
 #define STM32_PLS                           STM32_PLS_LEV0
 #define STM32_BKPRAM_ENABLE                 FALSE
 #define STM32_SAISRC                        STM32_SAISRC_PLL
+#define STM32_SAI2SEL                       STM32_SAI2SEL_PLLSAI
 #define STM32_PLLSAIN_VALUE                 192
 #define STM32_PLLSAIQ_VALUE                 7
 #define STM32_PLLSAIR_VALUE                 4


With this change the demo works as expected.

-Bill

User avatar
Giovanni
Site Admin
Posts: 12962
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 735 times
Been thanked: 610 times
Contact:

Re: Bug in the RT-STM32F429-DISCOVERY-DMA2D demo

Postby Giovanni » Fri Jun 05, 2020 6:53 am

Hi,

Thanks, moving in bug reports.

Giovanni

User avatar
Giovanni
Site Admin
Posts: 12962
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 735 times
Been thanked: 610 times
Contact:

Re: Bug in the RT-STM32F429-DISCOVERY-DMA2D demo

Postby Giovanni » Fri Jun 26, 2020 8:59 am

Hi,

This is a problem in the demo which is located in the community repository, you should do a pull request on the community project (not handled by me).

Giovanni


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 5 guests