In this project I'm using the STM32F207 uC to copy images from a USB disk to an On board NOR FLash chip (M29W128). The images are also display on a 7" LCD. Images can then be displayed on the LCD direct from the NOR IC either using the DMA controller of the STM32F207 or using direct transfer.
The problem however is that for some reason the images uses double the amount of space in the NOR Flash ic than what is needed. And this can also be seen when displaying the images from the NOR IC, halve of the data is not used.
I'm including the project code (This is not the complete project, i created a new project with only the code required for you to fix the bug)
In usbh_usr.c is a big case statement, that is used after checking file names on the flash disk to display the image and save it in NOR flash. In each case a function calles Show_Image is called which is where the save to nor happens.
In file ME-ALSMS-Images.c is a DisplayImage function that is used to display the image from NOR to LCD. in here the size of each image can be seen in terms of pixels. So size of the image can be calculcated (RGB565) and you will see that double the amount of NOR memory is used to save the image. This is also causing problems with DMA transfer of the image to LCD.
I need all the functions te be fixed so that images only use space required and then DMA transfer must do whole image size. Also i want to make the functions more usable. The image should not only have a number assigned to it, all detail must be difned for each image in defines so that it could be easily updated. Also all display functions must be updated after the double space issue is sorted out, because all the display functions now have the double space issue built in.
Please contact me if you need more detail.