2025-06-05 4:22 AM
I want to write data to an external flash (w25q128 with SPI) by sending a hex file from a PC to the STM32 over UART using tools such as Realterm or a python script
I have seen examples using the external loader with STM32CubeProgrammer, but I want to avoid doing it this way and just use UART.
The reason being is that for production I want the user to be able to simply flash new data without the need for ST programming hardware and software tools.
Are the any examples or can anyone help me achieve this ?
I am using the NUCLEO-L433RC-P board with the w25qxx driver....
https://stm32world.com/wiki/STM32_W25Qxx
2025-06-05 12:42 PM
No any special examples are needed. Just make a "driver" for the flash, then make the communication part via the UART, then glue both together. That simple. Of course, be sure to test well.
2025-06-05 12:49 PM - edited 2025-06-05 12:53 PM
@freeflyer wrote:Are the any examples or can anyone help me achieve this
Examples of what, exactly?
Certainly, there are plenty of examples for using the UART.
Also examples of using SPI.
Intel-Hex is well-established and well-documented; decoding it would not be specific to STM32.
Once SPI is working, writing to the Flash should be easy ...
PS:
It seems you already have the SPI driver:
Don't forget to mark the solution in that thread.