Couple of newcomer questions

petr
Wed Jul 15, 2015 10:58 am
Hi all,

I’m coming from Arduino world. I bought a Maple Mini clone (for $4) and a noname “STM32F103C8T6 ARM STM32 Minimum System Development Board Module Forarduino” with PCB of the same shape as the Maple Mini (for $3.75) – actually here’s the photo: http://www.rogerclark.net/stm32f103-and … 1-5-x-ide/

I’d like to ask you a couple of questions that would help me jump into this ARM world world faster:

– the noname STM32F103C8T6 board got two yellow jumpers. What do they do? Don’t you happen to have a schematics of the board, please?

– I managed to flash the “generic_boot20_pc13.bin” to the noname board and it’s now working nicely and DFU is faster than on the maple mini. Is it a good idea to flash the maple mini with a new bootloader (“maple_mini_boot20.bin”) as well? It could release 3 kB of RAM and some flash space, I’ve read.

– which one of these two boards is “better”? The maple has twice the flash but is missing the 32 kHz oscillator, right?

– what is those four header pins on the side of the noname board good for? They’re marked GND, VCC, DIO and CLK.

– I plan on making a wrist watch with this STM32. The goal is thus to minimize the number of components. Do you think it’s a good idea to run without external crystals/oscillators? Will the internal 8 MHz and 40 kHz ones be sufficient? I know USB will not work without external 8 MHz but I can live with that. Any idea if the RTC will be OK (and accurate) with the internal 40 kHz?

– programming in Linux: are there good reasons for NOT using the Arduino IDE 1.6.x with STM32 support? Are there any good libraries? I suppose there’s a gcc for arm in stock Ubuntu/Debian so the compiler would not be an issue. Doesn’t the Arduino way add too much overhead? I’ve noticed that pure Blink example is almost 20 kB of binary. Is it OK? What kind of code is there included by default?

– in the latest STM32 support for Arduino IDE I can’t find “upload into RAM” that used to be in the original hacked Arduino 1.5.x for Maple. Can’t the RAM option be added back? Or is it better to always upload to the flash? It’s got only 10 thousand rewrites until it wears out, is it enough when one starts to learn ARM coding? :-)

– RTOS: do you use any “realtime OS” or at least a library that would allow for running concurrent tasks without spending unnecessary time in delays()?

OK, I’ve got couple more questions regarding the level of HW support (displays, ethernet cards etc) but I’ll leave it for later.

Thank you in advance for your answers, tips and help.


madias
Wed Jul 15, 2015 2:49 pm
Hello to STM32duino world,

here some quick infos:
your “noname board” is well known in this forum: use the search function for “blue pill” and/or “red pill” (insider knowlege ;) )
Flash size of the STM32F103C8T6: If you have luck, you have the same flash size than on mini (there is a thread about the “hidden” flash memory, other user please help out with the link)
bootloader for mini: Yes, I see only advantages installing the new bootloader (a little bit more ram/flash, faster while upload…). Be sure to have a serial USB-converter or a ST-Link V2, so you can heal a broken mini.
maple vs blue pill: meanwhile there is no big difference since we have the universal bootloader (maple mini has a slight different HW layout for USB/bootloader)
GND, VCC, DIO and CLK: sounds like the st-link upload pins. (didn’t have one)
wrist watch: the internal timing is bad, REAL bad, even with 8MHZ, so a add. 32khz would be necessary.
upload to ram: was deleted by Roger a few months ago. Search for threads. Conclusio: total waste of time on a small STM32F1xx, even a simple blink wouldn’t fit into RAM
RTOS: use RTOS :) There is a build in timer library: see -> http://leaflabs.com/docs/timers.html —> hardware timer

OK, I’ve got couple more questions regarding the level of HW support (displays, ethernet cards etc)
Please use the search function before posting or read the library section first (we have some good libraries for ILI9341, ILI9163C, OLED’s (SSD1306), the rusty Nokia 5510,…)
I've noticed that pure Blink example is almost 20 kB of binary


victor_pv
Wed Jul 15, 2015 3:43 pm
petr wrote:Hi all,

I’m coming from Arduino world. I bought a Maple Mini clone (for $4) and a noname “STM32F103C8T6 ARM STM32 Minimum System Development Board Module Forarduino” with PCB of the same shape as the Maple Mini (for $3.75) – actually here’s the photo: http://www.rogerclark.net/stm32f103-and … 1-5-x-ide/

I’d like to ask you a couple of questions that would help me jump into this ARM world world faster:

– the noname STM32F103C8T6 board got two yellow jumpers. What do they do? Don’t you happen to have a schematics of the board, please?

– I managed to flash the “generic_boot20_pc13.bin” to the noname board and it’s now working nicely and DFU is faster than on the maple mini. Is it a good idea to flash the maple mini with a new bootloader (“maple_mini_boot20.bin”) as well? It could release 3 kB of RAM and some flash space, I’ve read.

– which one of these two boards is “better”? The maple has twice the flash but is missing the 32 kHz oscillator, right?

– what is those four header pins on the side of the noname board good for? They’re marked GND, VCC, DIO and CLK.

– I plan on making a wrist watch with this STM32. The goal is thus to minimize the number of components. Do you think it’s a good idea to run without external crystals/oscillators? Will the internal 8 MHz and 40 kHz ones be sufficient? I know USB will not work without external 8 MHz but I can live with that. Any idea if the RTC will be OK (and accurate) with the internal 40 kHz?

– programming in Linux: are there good reasons for NOT using the Arduino IDE 1.6.x with STM32 support? Are there any good libraries? I suppose there’s a gcc for arm in stock Ubuntu/Debian so the compiler would not be an issue. Doesn’t the Arduino way add too much overhead? I’ve noticed that pure Blink example is almost 20 kB of binary. Is it OK? What kind of code is there included by default?

– in the latest STM32 support for Arduino IDE I can’t find “upload into RAM” that used to be in the original hacked Arduino 1.5.x for Maple. Can’t the RAM option be added back? Or is it better to always upload to the flash? It’s got only 10 thousand rewrites until it wears out, is it enough when one starts to learn ARM coding? :-)

– RTOS: do you use any “realtime OS” or at least a library that would allow for running concurrent tasks without spending unnecessary time in delays()?

OK, I’ve got couple more questions regarding the level of HW support (displays, ethernet cards etc) but I’ll leave it for later.

Thank you in advance for your answers, tips and help.


petr
Wed Jul 15, 2015 3:48 pm
Thanks, madias!

I’ve been reading forum in the meantime and found out that the blue pill’s yellow jumpers are BOOT0 (the upper) and BOOT1 (the lower) (in Roger’s video). Will check the microcontroller pinout if it helps me to figure out what the BOOTx is good for.

I also found the information about removing support for uploading code into RAM for those 20 kB STM32F1x.

The Roger’s video also mentioned the ST Link pins on the header. Not sure what that is good for, maybe debugging, dunno. Will find out.

I’m still interested if there are any good reasons for programming the boards outside of Arduino IDE, just with gcc and make. With the AVRs you don’t really need any initial code, the CPU is ready to run instantly after power up. With ARM it might be far more complicated to set the hardware up to a reasonable state so that GPIO, I2C, SPI, DMA, timers and interrupts work, no idea.

EDIT: thanks, victor_pv. I’ve seen the thread about rotating cubes. Will give it a try once I attach one of my LCDs.


mrburnette
Wed Jul 15, 2015 4:12 pm
The Roger’s video also mentioned the ST Link pins on the header. Not sure what that is good for, maybe debugging, dunno. Will find out.

ST Link is a hardware device… USB on one side, and pin connections on the other. You would use this to upload code if you do not wish to use the bootloader. Of course, you then get the benefit of the additional (small) flash that exists where the bootloader would have been located.

I’m still interested if there are any good reasons for programming the boards outside of Arduino IDE, just with gcc and make. With the AVRs you don’t really need any initial code, the CPU is ready to run instantly after power up. With ARM it might be far more complicated to set the hardware up to a reasonable state so that GPIO, I2C, SPI, DMA, timers and interrupts work, no idea.

… if you program outside the Arduino IDE (This Forum is titled Arduino for STM32), but just want to use a makefile, I think one of the threads addressed that. https://github.com/sudar/Arduino-Makefile
But you can build arduino with make and do the same things that are done in the IDE. Now, if you go off and write assembler… you must provide everything.

I know you are enthusiastic, but you simply must start using the forum Search as Google indexes this full site. When you have a technical question or when you hit a brick wall, we can be here to help. Do not get all clammy: I tell every newbie here the same thing! :shock:

Ray


RogerClark
Wed Jul 15, 2015 9:38 pm
I think most questions have been answered, except perhaps.

Jump links on Boot0 and Boot1. They control whether the internal Hardware Serial bootloader in the chip, is run after reset. This is nothing to do with our bootloader its a feature of the chip. Boot0 high enables the bootloader, and Boot1 controls some options to do with the internal bootloader.
Its all documented by STM.

Ray has already mentioned the other 4 pins. They are ARM SWD connections, which you can upload via an SWD programmer like Black Magic Probe, STLink or other programmers.
This allows in circuit debugging, however at the moment only the command line GDB (GNU Debugger) works for all platforms. Linux users can use the Eclipse CDT Standalone Debugger, or possibly DDD, however we do not have an easy setup for in circuit debugging at the moment.

Re: RAM uploads by the bootloader

I took the decision to remove this as its generally useless, because only sketches like blink fit into RAM. I even went back to the old Maple IDE and tried with the old bootloader to see which original LeafLabs examples would upload to RAM and as far as i could tell, it was only Blink that would fit.
Additionally, because the way the bootloader has to reset itself after upload, there were issues about reliably determining whether there was a sketch in RAM that the bootloader should run, and i experienced a lot of false positives in my testing.

If you really want upload to RAM, feel free to modify the bootloader code. most of the RAM code is just commented out, but I’d recommend you go back and look at the initial commit to the github repo of the new bootloader, as I doubt just uncommenting things to do with the RAM upload will now make it work again.
But you really will be wasting your time, unless you have some special small program you need to upload more than 10,000 times.
BTW. 10,000 is the minimum guaranteed number of uploads to the chip. In reality is suspect the number is much much higher.


petr
Wed Jul 15, 2015 11:39 pm
RogerClark wrote:
Additionally, because the way the bootloader has to reset itself after upload

RogerClark
Thu Jul 16, 2015 12:03 am
That reminds me: is it normal that I have to press RESET after every sketch upload in order to run it? Both on Maple Mini and on Blue Pill.

No.

The board should get reset via the IDE

Depending when you downloaded the repo and what OS you are running on, you may need to download a newer version

Basically the board sketch has some code in the background waiting for a special reset sequence to be sent via serial usb. On windows this is done in the jar file, however I don’t have the source for the jar so I had to write separate upload-reset utilities for OSX and Linux (which I did about 2 weeks ago)

If your serial port is selected correctly in the IDE the board should reset its self prior to upload.
Enable verbose for uploads in the preferences and look at the messages

Re: Uploading via Ethernet etc

You could probably get a device like an ESP8266 to do this, in fact I think there is a project for ESP8266 that may already do this

Just using Bluetooth serial would be problematic, as you’d need to find a way of setting boot0 from the external device.

I guess you could do some sort of hack, like attach a capactor via a diode to a GPIO to Boot0, then in the sketch pull boot0 high via GPIO then reset the cpu, and as long as the RC constant was correct on the cap / resistor on Boot0 it would hold Boot0 high for long enough to reset the board and enter its hardware bootloader.

Ethernet uploads would need a completely different bootloader that could communicate via ethernet etc.

I’ve not seen an ethernet bootloader to Maple boards. But you could search for “STM32F103 ethernet bootloader” in case someone has already written one
Don’t search for “STM32 ethernet bootloader” as some processors have onboard ethernet hence you’ll get a load of useless results as the F103 doesnt have onboard ethernet.

Personally I’d go for the ESP8266 option.


mrburnette
Thu Jul 16, 2015 1:00 am
For Bluetooth, this STM video clip explains how an application can call the bootloader directly without needing to change onboard jumpers:
https://youtu.be/cvKC-4tCRgw

Ray


RogerClark
Thu Jul 16, 2015 1:08 am
Ray

Very interesting.

I didn’t realise that was possible.

Edit.

This is the code that currently does the reset into the bootloader

It doesn’t look like it changes any off the PLL settings, so I suspect some different code would need to be used to enter the hardware bootloader

// Got the magic sequence -> reset, presumably into the bootloader.
// Return address is wait_reset, but we must set the thumb bit.
uintptr_t target = (uintptr_t)wait_reset | 0x1;
asm volatile("mov r0, %[stack_top] \n\t" // Reset stack
"mov sp, r0 \n\t"
"mov r0, #1 \n\t"
"mov r1, %[target_addr] \n\t"
"mov r2, %[cpsr] \n\t"
"push {r2} \n\t" // Fake xPSR
"push {r1} \n\t" // PC target addr
"push {r0} \n\t" // Fake LR
"push {r0} \n\t" // Fake R12
"push {r0} \n\t" // Fake R3
"push {r0} \n\t" // Fake R2
"push {r0} \n\t" // Fake R1
"push {r0} \n\t" // Fake R0
"mov lr, %[exc_return] \n\t"
"bx lr"
:
: [stack_top] "r" (STACK_TOP),
[target_addr] "r" (target),
[exc_return] "r" (EXC_RETURN),
[cpsr] "r" (DEFAULT_CPSR)
: "r0", "r1", "r2");


mrburnette
Thu Jul 16, 2015 1:52 am
RogerClark wrote:Ray

Very interesting.
I didn’t realise that was possible.
Edit.
<…>
It doesn’t look like it changes any off the PLL settings, so I suspect some different code would need to be used to enter the hardware bootloader
<…>


RogerClark
Thu Jul 16, 2015 2:07 am
I watched the video, and I can see what needs to be done, but we’d need to code it from first principals as it looks like the Keil code is using the Standard Perhipheral Lib to do things like set the PLL etc and we don’t have those functions

Edit.

Looks like there is code here

https://my.st.com/public/STe2ecommuniti … views=5344

And there are various other bits of code scattered around the web that describe how to do this


mrburnette
Thu Jul 16, 2015 2:46 am
RogerClark wrote:
<….>
Looks like there is code here

https://my.st.com/public/STe2ecommuniti … views=5344

And there are various other bits of code scattered around the web that describe how to do this


RogerClark
Thu Jul 16, 2015 2:52 am
Ray

No worries

I’ll leave it for the OP to use the code to do this and report back. ;-)


petr
Thu Jul 16, 2015 6:29 am
RogerClark wrote:That reminds me: is it normal that I have to press RESET after every sketch upload in order to run it? Both on Maple Mini and on Blue Pill.
No.
The board should get reset via the IDE
Basically the board sketch has some code in the background waiting for a special reset sequence to be sent via serial usb. On windows this is done in the jar file, however I don’t have the source for the jar so I had to write separate upload-reset utilities for OSX and Linux (which I did about 2 weeks ago)

If your serial port is selected correctly in the IDE the board should reset its self prior to upload.
Enable verbose for uploads in the preferences and look at the messages


mrburnette
Thu Jul 16, 2015 12:30 pm
@Petr,

Clearly you have your own ideas regarding the STM32F1xx bootloader for Ethernet uploads; based upon your success with the 8-bit AVR family in the Arduino line. That’s great, but… I’m having a very difficult time following your posts because the theme of each is scattered with needs: in the initial post you discuss the STM32F1xx use in a timepiece, then a bit later you are wanting to use an Ethernet shield to flash the user application in another STM32 board.

As you are obviously experienced and technically competent, you may find the link below to an application note by STM of some interest. The uC being targeted in the note is a more advanced controller than the STM32F103; that is, the STM32F107 has built-in MAC. Abstracting the thought process to using an external Ethernet controller may however assist you and shed some insight into how to morph the existing bootloaders to work with an external Ethernet “shield.”
http://www.st.com/st-web-ui/static/acti … 275365.pdf

Unless your post has stirred the appetite of some of the others in our group, I suspect however that you are pretty much on your own in the coding of the new bootloader. In fact, you may be the group’s residing expert on Ethernet bootloading as you have AVR experience. This is a rather interesting project and I think maybe even most useful, but I have not found any pertinent literature directly related to the STM32F103 controller.

Best of luck,

Ray


petr
Thu Jul 16, 2015 2:02 pm
mrburnette wrote:@Petr,
I’m having a very difficult time following your posts because the theme of each is scattered with needs: in the initial post you discuss the STM32F1xx use in a timepiece, then a bit later you are wanting to use an Ethernet shield to flash the user application in another STM32 board.

mrburnette
Thu Jul 16, 2015 2:42 pm
petr wrote:
<…>
That’s OK. I’ve been given lost of useful pointers in this thread so I can start. Thank you all.
BTW, the bluetooth bootloader would be used for the wrist watch, so I could update the firmware without attaching any cables :)
Petr

petr
Thu Jul 16, 2015 9:49 pm
mrburnette wrote:Bluetooth update for the watch seems very sensible, although current breakout boards are rather large.

petr
Thu May 18, 2017 5:27 am
Two years later, I figured out how this “remote OTA update” would work: I’d attach an external memory to a SPI interface of STM32. Then, my application would receive the OTA update over Ethernet, Bluetooth, WiFi, 433 MHz wireless or any other way and store the blob in the external memory. At last, a bootloader would (upon rebooting) check if there’s a new version of firmware waiting in the external memory and if yes then it’d flash it before booting into it.

Actually, this is not my idea. This is how an OTA update is implemented in AVR over 2.4 GHz wireless.

If you happened to hear about a bootloader modification for stm32duino that would be doing this please let me know.


ag123
Thu May 18, 2017 12:13 pm
i think for stm32 it is possible to write directly into the on-chip flash as well, that may be useful as an ‘OTA’ update as codes can’t directly run off SPI flash, for this direct to flash OTA updates, i’d think the various smart watches & fitness trackers are actually using it ;)

petr
Thu May 18, 2017 12:29 pm
Then the flash would have to be divided into two halves, just like OTA on ESP8266. That would be applicable only if the application fit in 64 kB of flash. The plus side is no external components and no soldering, just a very small change in bootloader.

RogerClark
Thu May 18, 2017 8:42 pm
Have a look at the stm32duino-bootloader in my github account, there is an “updater” sketch, which replaces the bootloader binary kn flash

To do OTA, I suspect you best approach would be to build it into the bootloader.
You can use the NVRAM to pass a command / flag to the bootloader, and there is already partial support for this.

The bootloader would end up being larger, but if you can keep the size below 0x5000, you can use the existing setting in the IDE which supports the old (larger) bootloader


petr
Thu May 18, 2017 9:05 pm
Sure, the OTA code is to be in bootloader, but my current idea is to fetch the new firmware from an external flash memory attached to a SPI interface (instead of reading it from USB/serial).

RogerClark
Thu May 18, 2017 10:12 pm
Just Add some code to the bootloader for the functionality to get the OTA via SPI, and retain the existing functionality.

Like I said, although you need to reset the processor to enter the bootloader, the data in the NVRAM addresses get retained.

So you must put a magic number for your load from OTA into NVRAM, get the code to reset into the bootloader as normal.

The bootloader checks the NVRAM, and if it finds the OTA command, it doesnt init the USB and DFU etc, it calls your new OTA via SPI function, which reads in the data from your external memory ( or whatever…)


ag123
Fri May 19, 2017 7:48 am
the hard part of ‘OTA’ update isn’t the flashing (writing into flash) itself really, it is the wireless stack that does downloading the image and saving in flash.
one of the rather fun possibility is that you have a ‘sketch’ that does that OTA, this sketch is *shrewd* in that it is divided into 2 big parts, the first part is simply to start at the normal entry point(0x8002000 (stm32duino bootloader) or 0x8005000 (maple bootloader)), then it ‘reserve’ all that space and say jump to another location say e.g. 0x8018000 96k into the flash and run the OTA code there. this would need some manipulation with the ld (‘scatter loading’) scripts to make such an image

the OTA code can then ‘download’ the image and write it back at 0x8002000 in that 96k block that you ‘reserved’ earlier, assuming that u’ve got 128k flash on it :lol:


RogerClark
Fri May 19, 2017 8:05 am
Yes.

The downloading of the update bin file is going to be far more work than flashing it.

There are various strategies about which chuck of code does the downloading, and it depends if you want to have the ability to update the downloader and bootloader code, what you end up doing

Including the downloader as part of the sketch is probably the easiest to write, as you can make use of the SPI and other libs, and write to external flash

Then reboot using the NVRAM (Its actually called a BPK register i think), to use the external flash data to flash the sketch


petr
Fri May 19, 2017 8:10 am
Receiving of the new firmware is of course done by my sketch, I mentioned that. It’s far easier than trying to fit drivers for various hardware, TCP/IP stack and FTP or HTTP in a bootloader since these bits will be part of the sketch, anyway.

Also, this is totally universal approach since it’s up to the user and their sketch how they get a new firmware stored in the external flash – if via wired or wireless connection or by any other way. The bootloader just checks if there’s a new version and doesn’t care where it came from and how.

BTW, now when we have Roger’s attention – have you noticed the HID USB improvement in another thread? viewtopic.php?f=13&t=576 Will you include it in the main repo?


ag123
Fri May 19, 2017 8:12 am
this OTA loader at the ‘top’ strategy is also somewhat shrewd in the sense that you would have the sketch that possibly have the option to jump to OTA each time u want to do the OTA update. the OTA codes can stay there at the ‘top’ just like an ordinary boot loader without needing to overwrite it :lol:

the usb hid updates would need various tests to see that it is after all working ok, the use of composite devices can lead to various compatibility surprises.
in addition to that, a hid device can say function as a *mouse*, it can directly ‘interfere’ with desktop operation if it is programmed to do so, making the use of the real mouse difficult / impossible.

but the main thing would be the composite devices which may require some ‘special’ support on the desktop (windows, linux, etc side), the standard drivers may not work, this require testing


RogerClark
Fri May 19, 2017 10:29 am
petr wrote:Receiving of the new firmware is of course done by my sketch, I mentioned that. It’s far easier than trying to fit drivers for various hardware, TCP/IP stack and FTP or HTTP in a bootloader since these bits will be part of the sketch, anyway.

Also, this is totally universal approach since it’s up to the user and their sketch how they get a new firmware stored in the external flash – if via wired or wireless connection or by any other way. The bootloader just checks if there’s a new version and doesn’t care where it came from and how.

BTW, now when we have Roger’s attention – have you noticed the HID USB improvement in another thread? viewtopic.php?f=13&t=576 Will you include it in the main repo?


petr
Fri May 19, 2017 10:37 am
You talk about USB branch, but “libarra” talks about “his repo”:
viewtopic.php?f=13&t=576&start=120#p28041

I was asking if you’d include “libarra”‘s improvements in your USB HID branch (it’s actually called addMidiHID, if I am not mistaken).

Just making sure you’ve noticed that he seems to solved the composite issue. Frankly, I don’t know where “his repo” is so I haven’t checked myself. I just thought it would be a pity if some progress with USB on STM32 got “lost”.


aster
Fri May 19, 2017 1:32 pm
I see that from the 2015 the newcomers questions didn t changed, when i arrived here i did exactly the same questions. Maybe you could add a faq page to the wiki

The only information i didn t see here (that solved my problem of reset during the upload under ubuntu) was to increment the reset time

“${DIR}/upload-reset” ${dummy_port_fullpath} 1500


stevestrong
Fri May 19, 2017 1:36 pm
“newcomer” == “cannot use the forum search function”

aster
Fri May 19, 2017 4:44 pm
stevestrong wrote:“newcomer” == “cannot use the forum search function”

RogerClark
Fri May 19, 2017 9:39 pm
petr wrote:You talk about USB branch, but “libarra” talks about “his repo”:
viewtopic.php?f=13&t=576&start=120#p28041

I was asking if you’d include “libarra”‘s improvements in your USB HID branch (it’s actually called addMidiHID, if I am not mistaken).


petr
Fri May 26, 2017 7:12 am
I looked at the bootloader code, it seems clear to me. I have a code reading from external flash in a .ino sketch. It’s using SPI, naturally. Now I’d like to hear your suggestion how to include the flash reading code in bootloader in the most space efficient way: do you think it’s better to initialize the SPI HW (I haven’t looked into SPI.cpp yet to see what is required for that) or is it OK to use bit banging (software SPI) instead? Speed of the transfer is not an issue… but I thought it would be great if I managed to squeeze my additions into 1052 bytes so the OTA-update enhanced bootloader would still fit into 8 kB.

stevestrong
Fri May 26, 2017 7:36 am
petr, I think this question should be posted elsewhere.

petr
Fri May 26, 2017 8:02 am
It’s actually direct continuation of two year old thread but if you think a new thread is more appropriate I’ll happily create one.

stevestrong
Fri May 26, 2017 8:39 am
petr, sorry, I just saw that USB HID is mixed with OTA and didn’t realize that this is about OTA.
The name of this thread is at least confusing.

Regarding the SPI for loading the update, I would take the software SPI version instead of the HW SPI, because it would fit into less code space. And the bit-banding can also be done pretty fast using direct register accesses.


Leave a Reply

Your email address will not be published. Required fields are marked *