cancel
Showing results for 
Search instead for 
Did you mean: 

Images from SD Card: STM32F746ZG

Ray Mendoza
Associate II

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!

10 REPLIES 10
Posted on October 10, 2017 at 02:44

My point is not that you can't use fseek, just that the typical use case is inefficient, ie seek to random byte offset, read some odd number of bytes. You have to be cognizant of the underlying structure of the media, where you are currently, and if it is more effective to read a block larger than you want and discard the unused data, or not.

As I've said advancing a pointer in a memory has near zero cost, seeking to random spots on a block device, and pulling in some non ideal group of byte is very expensive. We're talking about methods which are most efficient, vs least efficient. We're also talking about how things work in embedded vs a 3 GHz PC with 8GB of memory free and 1 Gbps buses.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..