SPI based Serial Flash (External Memory)
Moderator: Benj
-
- Posts: 74
- Joined: Thu Nov 30, 2017 3:21 am
- Has thanked: 4 times
- Been thanked: 9 times
- Contact:
SPI based Serial Flash (External Memory)
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.
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.
- 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: SPI based Serial Flash (External Memory)
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?
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?
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 74
- Joined: Thu Nov 30, 2017 3:21 am
- Has thanked: 4 times
- Been thanked: 9 times
- Contact:
Re: SPI based Serial Flash (External Memory)
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
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
-
- Posts: 74
- Joined: Thu Nov 30, 2017 3:21 am
- Has thanked: 4 times
- Been thanked: 9 times
- Contact:
Re: SPI based Serial Flash (External Memory)
Hi Ben,
Any plan to update the Flowcode to support Winbond W25Q64FVS or any other SPI based flash IC? Please advice.
Thanks,
Karthick.
Any plan to update the Flowcode to support Winbond W25Q64FVS or any other SPI based flash IC? Please advice.
Thanks,
Karthick.
- 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: SPI based Serial Flash (External Memory)
Hello Karthick,
Let me have a look for you.
Let me have a look for you.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- 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: SPI based Serial Flash (External Memory)
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 74
- Joined: Thu Nov 30, 2017 3:21 am
- Has thanked: 4 times
- Been thanked: 9 times
- Contact:
Re: SPI based Serial Flash (External Memory)
Hi Ben,
Thanks for the update. I will test the Serial Flash and update you the result later. Thanks
Karthick
Thanks for the update. I will test the Serial Flash and update you the result later. Thanks
Karthick
- 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: SPI based Serial Flash (External Memory)
Any joy with the component?
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 74
- Joined: Thu Nov 30, 2017 3:21 am
- Has thanked: 4 times
- Been thanked: 9 times
- Contact:
Re: SPI based Serial Flash (External Memory)
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.
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.
-
- Posts: 74
- Joined: Thu Nov 30, 2017 3:21 am
- Has thanked: 4 times
- Been thanked: 9 times
- Contact:
Re: SPI based Serial Flash (External Memory)
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
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
- Attachments
-
- STM32F407VET6 sCHEMATIC.pdf
- (607.92 KiB) Downloaded 192 times
-
- Build Error with W25Q128.txt
- (5.71 KiB) Downloaded 197 times
-
- W25Code.PNG
- (234.96 KiB) Downloaded 2356 times
-
- Posts: 74
- Joined: Thu Nov 30, 2017 3:21 am
- Has thanked: 4 times
- Been thanked: 9 times
- Contact:
Re: SPI based Serial Flash (External Memory)
Hi Ben,
Please help to check the above issues while your free time.
Thanks,
Karthick
Please help to check the above issues while your free time.
Thanks,
Karthick
- 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: SPI based Serial Flash (External Memory)
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 74
- Joined: Thu Nov 30, 2017 3:21 am
- Has thanked: 4 times
- Been thanked: 9 times
- Contact:
Re: SPI based Serial Flash (External Memory)
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.
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.
- Attachments
-
- Sflash project.fcfx
- (12.4 KiB) Downloaded 164 times
- 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: SPI based Serial Flash (External Memory)
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: SPI based Serial Flash (External Memory)
Hi Karthik
It does not execute the code from external flash, if that is what you were hoping for?
The STM32 boot from serial peripherals can only be used to download the code to the internal Flash memory.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.
It does not execute the code from external flash, if that is what you were hoping for?
-
- Posts: 74
- Joined: Thu Nov 30, 2017 3:21 am
- Has thanked: 4 times
- Been thanked: 9 times
- Contact:
Re: SPI based Serial Flash (External Memory)
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.
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.