Skip to main content
Ray Mendoza
Associate II
August 30, 2017
Question

Images from SD Card: STM32F746ZG

  • August 30, 2017
  • 10 replies
  • 3045 views

Posted on August 31, 2017 at 00:41

Hello!

I was wondering how to load only half of a bmp image from an sd card. I am capable to loading a full image from a header file using the examples provided for the STM32F746G-Discovery. The reason I am asking this is because our hardware is set in a way where the SRAM is not big enough to store the entire bmp file from the sd card. I'm talking about a customized board created here at work. It uses a STM32F746ZG chip. I was able to understand which details had to be changed in the STM32F746G-Discovery files for those examples to work.

Also I was wondering if instead of doing this, then is it better to pull the images from flash memory. Is it faster than the method above? Or do they not matter because they are both fast?

There is a QSPI chip on the board but I'm a little confused on setting it up on Keil. It is 16MB. The part is :

http://www.issi.com/WW/pdf/25LP-WP016D.pdf

I have made the connections on CubeMX but I'm unsure what the parameters settings should be in order to run with the QSPI chip on board.

Thank you!

This topic has been closed for replies.

10 replies

Ray Mendoza
Associate II
October 6, 2017
Posted on October 06, 2017 at 03:07

As an update, I decided to not use the qspi. But I am still trying to load parts of an image located in a SD Card.

Tesla DeLorean
Guru
October 6, 2017
Posted on October 06, 2017 at 04:09

Well typically you pull the header, and then walk the rasters, you step a line at a time, pull out the portion you want to display/use, and only index through the lines you want.

You can use fseek() to step through the file, but is often more efficient to load a fixed sized block (4KB, 8KB ?), and walk a pointer through the memory buffer.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
Ray Mendoza
Associate II
October 7, 2017
Posted on October 07, 2017 at 00:26

So if I'm understanding this correctly, you're saying to find the location of the bitmap file in the SD card, store that value in separate variable, and then extract a certain chunk of (4KB,etc.) and display that portion of the image?