2025-07-28 6:17 AM - last edited on 2025-07-28 6:37 AM by Andrew Neil
Hello
hope some one can shed some light please,
I have a STM32F446RE board with SPI1 setup for 8pin SPI FRAM memory
I have written my own firmware using DMA / SPI1 to read and write to this FRAM IC
This is a very fast no volatile memory IC that does not have the limitations of standard FLASH memory
Reading and Writing continuously SPI1 40MHz speed
It does not require or use Block / Page / Sector , polling, time delays for write etc.
Its just continually allows write at very high speed, so eliminates all the pain of poor endurance, latency of normal serial flash memory.
Can I find an external flash loader routine for this type of memory so I can use STcube programmer to load the FRAM with my custom data, of course not ????
Could someone please advise in very basic steps how to create a flash loader for my ST32446
I have tried looking at various flash files / github etc. but there is so much code relative to page size, block size, sector size etc. None of that is applicable for me
Just need to be able to read and write to the SPI, from cube programmer
please can someone advise how to make a simple external loader
Thank you
2025-07-28 8:17 AM
Just create as a SPI_FLASH or I2C_EEPROM type loader, at a pseudo-address you want it the live in within STM32 Cube Programmers interface.
Implement Init(), Write() and Read() functions using your BSP/CSP code, you can use whatever UART/Serial interface you want for diagnosis/telemetry like output to understand how it is interacting.
SectorErase() and MassErase() can basically just return SUCCESS immediately, not sure if I2C_EEPROM model would call or not, easy enough to check / observe, or just succeed.
Mask the address passed into Read/Write however is appropriate for your memory device, it's just not that complicated.
Create your input linker script so linker builds the content for your chosen pseudo-address, or go to the programming tab/pane and plug in this address for the .BIN you want to push in.
2025-07-28 8:30 AM
Thank you for the reply
but as a newbe to this, I have limited knowledge on what you are suggesting, I guess everything is easy when you know how,
But really need much more basic steps
Thank you
2025-07-28 9:06 AM
I'm saying to look at the other External Loader examples and tutorials, and stop focusing on the specifics of FRAM vs others. The memories in most of these instances are just perceived as large linear regions. If they are 256MB or less than can appear to live in an 0x70000000 or 0x90000000 type address space for the purpose of programming.
2025-07-28 3:03 PM
Thank you for the reply Tesla Delorean
If I'm reading correctly what you ar saying my FM25V05 is a 512-Kbit nonvolatile memory is mapped between 0x70000000 or 0x90000000
1) surley I can not access my FRAM memory by ST programming softwre directly on the SPI1 bus ?
2) As i understand it, I will need some additional code runing on my Nucleo board to allow ST programmer software to run various FRAM SPI routines to Read / Write ?
3) Looking at all the examples of external loaders I see a lot more complication on bulk erase, page size, sector size, block size all of which is not really applicable in my case.
4) I also use segger probes ?
5) I also debug in Visual GDB not CUBE IDE ?? though I could debug I Cube IDE if this is the only way ?
6) Does the Cube Programmer software cause an interrupt trigger in my nucleo 446 board when I try to read or write to address 9000000 in cube programmer, which would then launch the FRAM read / write code
7) I know what I am trying to acheive but having problems putting it all together, my FRAM functions work perfectly well via DMA & SPI1, I can read and write utra fast at 40mhz on SPI1 with no issues. just not sure how to get the CUBE programmer software to do the same
Thank you, please forgive my lack of understanding
2025-07-29 12:59 AM
Hello
One other question please,
Does the ST Cube Programmer software work with the Segger Debug Probes J-link ??
or am I wasting my time, I use these professional probes over the STlink probes
Just wondered if I can still use the J-Link probes with Cube Programmer and an external SPI loader
Thank you for help
Regards
2025-07-29 2:32 AM
> surley I can not access my FRAM memory by ST programming softwre directly on the SPI1 bus ?
SPI or Quad-SPI? Please get this straight first. Only QSPI can be memory mapped.
> Just wondered if I can still use the J-Link probes with Cube Programmer
Yes, CubeProgrammer should work with J-Link. But J-Link has its own (Segger's) system of external loaders. Not sure how CubeProgrammer copes with this. Thus my advice: avoid any "external loaders" and move to your own software ASAP.
2025-07-29 2:41 AM
Thank you for the reply appreciated,
Thus my advice: avoid any "external loaders" and move to your own software ASAP.
I guess this will avoid any memory re-mapping and simply work forever as the processor stays in it current working configuration and I am in control of the programming code.
would you suggest using uart peripheral as the preferred method of sending a hex file to the FRAM, it seems the simplest method to me, but always open for suggestions.
I take onboard your advice and will steer away from external loaders
Thank you
2025-07-29 3:01 AM
> I guess this will avoid any memory re-mapping and simply work forever as the processor stays in it current working configuration and I am in control of the programming code.
QSPI interface on STM32F4 cannot write in memory-mapped mode. Otherwise you are free to do whatever you need.
2025-07-29 3:09 AM
I'm using my FRAM IC on a single SPI bus which works fine, albeit I cannot memory map the SPI1, I was intending to use an external loader but I'm guessing the STM32 programmer will write my hex data for FRAM to an area of the 446 Flash memory and then the loader would copy that hex data to the FRAM and vice versa for reading ?
I guess the best way to program the FRAM is NOT change any configuration of the 446 and simply use peripherals such as UART and write a small set of code to do this job and steer away from STM cube programmer software