AnsweredAssumed Answered

Using STM32CubeMX to generate LCD/SDRAM code for STM32F746-DISCO board

Question asked by Peter M on Jun 4, 2018
Latest reply on Jun 4, 2018 by Peter M

I'm trying to generate some working code for a STM32F746-DISCO board using STM32CubeMX Rev 4.25.1


What I was expecting to happen is that I select all the peripherals, configure them how I'd like them to work, hit "generate code" and it would make me a project that had everything initialised properly, ready to go. I could then write my application to use the peripherals as required.


So I go "new project", select the STM32F746-DISCO board, say "yes" to "Initialise all peripherals with their default mode", disable camera, sound, ethernet and USB (I don't need them and it chokes at startup if the Ethernet isn't plugged in), generate code for EWARM and open the project in IAR. I then turn off compiler optimisation and change the debugger to J-Link (I reflashed the board with the Segger firmware because the ST/Link one wouldn't work properly).


I then program the board and let it run - the screen starts off white then goes black.


If I go to memory adfdress 0xc0000000 then IAR doesn't think there is anything there (it should be the SDRAM). Given that the frame buffer for the LCD is at this address that could explain that part of the problem.


Am I expecting too much from STM32CubeMX? Is it meant to generate a working app with working peripherals that I can then modify? Or am I expected to pull together code from the various example projects (eg SDRAM init code from the SDRAM project, LCD init code from the LCD project, etc) to make something that works.