STM32F746 Discovery SD RAM

An area to discuss ARM specific problems and examples

Moderator: Benj

Post Reply
User avatar
STibor
Posts: 263
Joined: Fri Dec 16, 2011 3:20 pm
Has thanked: 116 times
Been thanked: 113 times
Contact:

STM32F746 Discovery SD RAM

Post by STibor »

Hello,

I tested the graphics capabilities of the STM32F746 Disco.
It's amazingly fast if I load the image from RAM or ROM.
Unfortunately, RAM is small, only one image has enough 16bit R5G6B5 variable space.
I tried the SD card (old project GLCD_FAT (thanks Benj!)) Approx. It's capable of 200kB / s, this is a full screen shot of 2 seconds. When I load the image into RAM, it is quickly drawn.
I tried downloading the image to a ROM, but it's also very fast to display.
Unfortunately, RAM and ROM are finite in size, I remembered the SD RAM.
I see that Flowcode uses SD RAM for the screen and if I think of the camera interface (camera interface has no Flowcode component).
The point:
If so, can you give an example of using SD RAM? (Code C would also help)
If it was working, the complete GUI would fit on a memory card, and full load would be loaded into the SD RAM at power up. The program must address the memory vectors only.
If you're interested, I'll upload SD + RAM, ROMs.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: STM32F746 Discovery SD RAM

Post by Benj »

Hello,

Sounds like you've been making good progress :D

I can send you the component source for the display if that would help things. STARM family is not my speciality so I'm not 100% up to speed on how everything's been done. I made the display component but from C code that was provided to me :wink: Leigh might be able to help you further.

If you think this is worth a go then let me know and I'll send you the component source via PM.

User avatar
STibor
Posts: 263
Joined: Fri Dec 16, 2011 3:20 pm
Has thanked: 116 times
Been thanked: 113 times
Contact:

Re: STM32F746 Discovery SD RAM

Post by STibor »

It would be great if you shared the source.
Thanks!
I'm thinking about programming RLE decoding, saving little memory.
Great little picture conversion program: http://www.riuson.com/lcd-image-converter/
I attach a ROM and SD Card + RAM framebuffer based 16bit image viewer.
Attachments
GLCD_FAT_16bit_RAM.zip
(567.53 KiB) Downloaded 325 times
GLCD_FAT_BMP_16bit_bitrom_menu.zip
(300.77 KiB) Downloaded 278 times

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: STM32F746 Discovery SD RAM

Post by LeighM »

Hi,
I've not tried using the SDRAM of the Disco board, but this should be possible via the HAL, something like this ...

Add the HAL structures in the Supplementary Code

Code: Select all

SDRAM_HandleTypeDef     SDRAM_Handle;
FMC_SDRAM_TimingTypeDef SDRAM_Timing;
Initialize the HAL in a C icon at the start of main
You will probably need to read up on the HAL interface to see if any of the structures need any initialized data settings

Code: Select all

HAL_StatusTypeDef SDRAM_Status = HAL_SDRAM_Init(&SDRAM_Handle, &SDRAM_Timing);
Write or read from SDRAM using the HAL functions in a C icon

Code: Select all

HAL_SDRAM_Read_8b(&SDRAM_Handle, SrcAddress, &DstBuffer, sizeof(DstBuffer));
Hope that helps and gets you started
Leigh

User avatar
STibor
Posts: 263
Joined: Fri Dec 16, 2011 3:20 pm
Has thanked: 116 times
Been thanked: 113 times
Contact:

Re: STM32F746 Discovery SD RAM

Post by STibor »

Thanks!
I try ...

Post Reply