Générique STM32 conseil avec Arduino

Described here is a simple way to load a program without bootloader. An additional thing needed is a USB to Serial/UART/TTL adapter (3.3V level). Connect the USB to Serial board as follows, and power up the STM32 board from a USB port/power supply.

Generic STM32 board (1)

• RXD – A9
• TXD – A10
• GND – GND

I assume you have already installed the Arduino IDE. Next, you need to go to ‘Board Manager’ under ‘Tools’ and install the support for SAM boards. Download the necessary files as well as the “Arduino_STM32’ (from the link). Extract “Arduino_STM32’ and copy the folder ‘Arduino_STM32-master’ to your Arduino ‘Hardware’ folder. Finally, restart the Arduino IDE, choose correct board settings, compile the given sketch, and upload it. Before uploading, set the onboard ‘BOOT0’ jumper to 1, and press ‘reset’ button. After upload completed, the sketch will run. If you want the uploaded sketch to run automatically after next power on/reset, set ‘BOOT0‘ jumper back to 0.

[stextbox id=”grey”]

#define pinLED PC13
void setup() {
Numéro de série.begin(9600);
pinMode(pinLED, OUTPUT);
Serial.println(“START”);
}
void loop() {
digitalWrite(pinLED, HIGH);
delay(1000);
digitalWrite(pinLED, LOW);
Serial.println(“Hello World”);
}

[/stextbox]

How to use the onboard USB interface?

While the STM32F103 board is very popular and inexpensive, getting up and running is a knotty task. Since, the generic STM32 board comes only with the default USART boot loader, you cannot use its onboard USB interface to program it. However, if you are ready to program the board with a USB boot loader via USART, you can program it directly through the USB interface thereafter!

Board Manager Window

Board Manager Window

Arduino SAM Board download progress window

Arduino SAM Board download progress window

Fully installed Arduino SAM board notification window

Fully installed Arduino SAM board notification window

The ‘STM32duino bootloader’, is an experimental bootloader, based on the Maple bootloader (developed by LeafLabs), however it also works with most Generic STM32 board. There are 2 main versions of the bootloader, and within the generic bootloaders (versions starting with the word “generic”) there are different versions depending on the location of the LED on the generic board. For example, ‘generic_boot20_pc13.bin’ is suitable for the most common generic boards with an LED on pin PC13. Note that there is already a page in the wiki about the bootloader which includes how to flash it – link. Also refer this link

Read More Detail:Générique STM32 conseil avec Arduino


A Propos De L'Auteur

Ibrar Ayyub

Je suis expérimenté, rédacteur technique, titulaire d'une Maîtrise en informatique de BZU Multan, Pakistan à l'Université. Avec un arrière-plan couvrant diverses industries, notamment en matière de domotique et de l'ingénierie, j'ai perfectionné mes compétences dans la rédaction claire et concise du contenu. Compétent en tirant parti de l'infographie et des diagrammes, je m'efforce de simplifier des concepts complexes pour les lecteurs. Ma force réside dans une recherche approfondie et de présenter l'information de façon structurée et logique format.

Suivez-Nous:
LinkedinTwitter

Laisser un Commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *

fr_FRFrench
Faire défiler vers le Haut