SPI program Loader

Post here first, or if you can't find a relevant section!
Post Reply
madhavan
Posts: 29
Joined: Fri May 21, 2021 1:22 am

SPI program Loader

Post by madhavan »

hi, it's possible to load the compiled program - binary file into stm32 chip via flash card . like how program loaded into Nextion Display .
hobbya
Posts: 49
Joined: Thu Dec 19, 2019 3:27 pm
Answers: 1

Re: SPI program Loader

Post by hobbya »

Are you talking about in-application programming?
https://www.st.com/resource/en/applicat ... ronics.pdf
ag123
Posts: 1655
Joined: Thu Dec 19, 2019 5:30 am
Answers: 24

Re: SPI program Loader

Post by ag123 »

that is called a 'sd boot loader', a boot loader is just a program (sketch) that loads and flash another (sketch) firmware into flash.
you'd either have to write it yourself or you can try to search around the forum or github for existing implementations.

but seriously, it is probably easier just setting boot0 and program using uart or usb dfu (stm32f4). otherwise, use a st-link v2 for the programming.
many other jtag/swd programmers would work just as well.
madhavan
Posts: 29
Joined: Fri May 21, 2021 1:22 am

Re: SPI program Loader

Post by madhavan »

Hi. I do agree link or rs232 is good option for development . In filed firmware update by flash card boot will be easy.. Other wise for field engineering looks complicated..
ag123
Posts: 1655
Joined: Thu Dec 19, 2019 5:30 am
Answers: 24

Re: SPI program Loader

Post by ag123 »

they (custom boot loaders) aren't very far away, there is a whole section here about it
viewforum.php?f=56
then if you google it, u'd find more on github etc.
be sure to credit the authors and check the terms. 'legally' for 'commercial' apps, one would need to write your own to avoid the legal issues.
if it is a stm32f4, some does that by setting some registers and doing a reset, and it fall into the on chip usb dfu boot loader. everything built in.
i think that is a decent solution in some settings.
mrburnette
Posts: 633
Joined: Thu Dec 19, 2019 1:23 am
Answers: 7

Re: SPI program Loader

Post by mrburnette »

madhavan wrote: Sat Jul 17, 2021 1:43 pm Hi. I do agree link or rs232 is good option for development . In filed firmware update by flash card boot will be easy.. Other wise for field engineering looks complicated..

... from an FE perspective, eliminating any flash bootloader is a good idea as bootloaders in flash can be corrupted. The in-silicon serial bootloader is a significant advantage, IMO.

https://circuitdigest.com/microcontroll ... g-usb-port

As an added benefit, from my personal experiences, it just works.
Post Reply

Return to “General discussion”