Page 1 of 1

SPI based Serial Flash (External Memory)

Posted: Tue Aug 28, 2018 8:53 am
by karthickefy
Hi Matrix Team,
Do you have any plan to add SPI based Serial Flash (External Memory) components (Similar like SD Card) with FC8? It will be more useful for us while we choose small size ROM MCU for cost effective application. Please support Thanks.

Karthick.

Re: SPI based Serial Flash (External Memory)

Posted: Tue Aug 28, 2018 11:56 am
by Benj
Hello Karthick,

Do you have any specific devices you would like to see supported in Flowcode?

There is also the extra complication of pre-programming the devices assuming you don't just want it as a read/write scratch area.

This might have to be done using a loader firmware to pass values into the flash from say a serial connection to a PC or to Flowcode?

Re: SPI based Serial Flash (External Memory)

Posted: Wed Aug 29, 2018 5:49 am
by karthickefy
Dear Ben,
Thanks. Winbond W25Q64FVS is the most common 64MB Serial flash and low cost device. Better add W25Q series SPi flash in the component list. Below is the datasheet for your reference.

http://www.winbond.com/hq/product/code- ... o=W25Q64FV

Re: SPI based Serial Flash (External Memory)

Posted: Tue Apr 09, 2019 6:15 am
by karthickefy
Hi Ben,
Any plan to update the Flowcode to support Winbond W25Q64FVS or any other SPI based flash IC? Please advice.

Thanks,
Karthick.

Re: SPI based Serial Flash (External Memory)

Posted: Tue Apr 09, 2019 10:02 am
by Benj
Hello Karthick,

Let me have a look for you.

Re: SPI based Serial Flash (External Memory)

Posted: Tue Apr 09, 2019 5:59 pm
by Benj
Hello Karthick,

I've now added a new component to the update system.

You need to be running 8.1 and then change "Files in use" to "Full database" in the update dialogue to get new components.

The file is then located inside the Data -> Storage

The component should simulate, but note you have to enable the write before you can actually do any writing or erasing. This also gets reset every time you write or erase and needs re-enabling.

I may add a force parameter to the write and erase macros so it will check the setting and auto enable it if not already.

Let me know how you get on.

Re: SPI based Serial Flash (External Memory)

Posted: Wed Apr 10, 2019 9:27 am
by karthickefy
Hi Ben,
Thanks for the update. I will test the Serial Flash and update you the result later. Thanks

Karthick

Re: SPI based Serial Flash (External Memory)

Posted: Tue Apr 16, 2019 5:30 pm
by Benj
Any joy with the component?

Re: SPI based Serial Flash (External Memory)

Posted: Fri Apr 26, 2019 9:37 am
by karthickefy
Dear Benj,
Sorry. I'm bit busy with other project and don't have enough time to test this component. I have the Demo board with Winbond W25Q128 Flash which connected with STM32F407 ARM through SPI. I will try it tomorrow and update you the result.
I would like to confirm with you whether can we boot and run the application (Firmware) with STM32 (Arm) or any other MCU's through Flash (Just program the external flash instead of MCU)? and also can we store the pictures on the Flash and read it through " Bitmap Drawer external flash" (Need to be add if possible) ?

Thanks for your kind support.

Karthick.

Re: SPI based Serial Flash (External Memory)

Posted: Sun May 12, 2019 8:15 am
by karthickefy
Hi Ben,
I have found the build error issue while compile the code with W25Q128 flash component. See the attached details for your info. I think some issue in SPI1, SPI2 and SPI3 channel configuration on the STM Component. Please help to look into this.

Thanks,
karthick

Re: SPI based Serial Flash (External Memory)

Posted: Wed May 15, 2019 10:50 am
by karthickefy
Hi Ben,
Please help to check the above issues while your free time.

Thanks,
Karthick

Re: SPI based Serial Flash (External Memory)

Posted: Thu May 16, 2019 3:50 pm
by Benj
Hi Karthick,

Compiling ok for me in a quick test.

Can you attach your program that's generating the error and I'll have a look for you.

Re: SPI based Serial Flash (External Memory)

Posted: Mon May 20, 2019 7:28 am
by karthickefy
Hi Ben,
It is working fine. I made a mistake in pin configuration. Now I have cleared that and now I can access the Flash without any issues. Thanks.

I have three suggestions. Please help to check if it is possible or not.
1. Command module for Copy Data /Files from SD card to Serial Flash. (Through SPI)
2. Read the Pictures from Flash using " GLCD Bitmap Drawer from Flash" ( instead of SD card). I feel picture updates from Flash will be faster than SD Card.
3. Boot from Flash. Program the Hex files directly to Flash and MCU to get boot through Flash. STM32 has the HW boot selection option.

Please help to check the possibilities.

Thanks,
Karthik.

Re: SPI based Serial Flash (External Memory)

Posted: Thu May 23, 2019 11:42 am
by Benj
HI Karthick,

Number 1 should be fairly easy for you to do yourself using either the FAT component or the Embed File component. Create a program to erase the flash and then copy the contents of the files you want on the flash reading a byte at a time until you get to the end of the file. Make a note of the various start addresses of each file stored into the flash so you can access them later.

Number 2 is possible, though there is no current file system on the flash so you might have to use an absolute offset address instead of a filename. If you want me to make a new component then let me know and I'll give it a go.

Adding a file system is possible and may be the way to go but this would likely slow things down a bit and be complex to write due to the paging of the memory, specifically performing erases to allow the FAT table to be easily updated.

Number 3 sounds possible though the boot from flash may be slow? I'm not sure how much I can help with this one.

Re: SPI based Serial Flash (External Memory)

Posted: Thu May 23, 2019 12:00 pm
by LeighM
Hi Karthik
3. Boot from Flash. Program the Hex files directly to Flash and MCU to get boot through Flash. STM32 has the HW boot selection option.
The STM32 boot from serial peripherals can only be used to download the code to the internal Flash memory.
It does not execute the code from external flash, if that is what you were hoping for?

Re: SPI based Serial Flash (External Memory)

Posted: Fri May 24, 2019 8:24 am
by karthickefy
HI Ben / LeighM,
Thanks for the clarifictaion. Now I have an idea to move the files from SD card to SFLASH (Item1).
It will be good if you update the component for File system on the Flash (Item 2) as standard component.
Item3: I understand the logic. So every time MCU download the Firmware from external Flash and store into internal memory and then start the process. So it take bit time for booting.

Thanks,
Karthick.