Introduction: Small But Powerful: STM32

About: Do you like technology? Follow my channel on Youtube and my Blog. In them I put videos every week of microcontrollers, arduinos, networks, among other subjects.

One chip that I really like is the STM32. Today, we’ll talk again about this chip, which is extremely impressive compared to Arduinos, as you can see in this video: SpeedTest. Faster than the Mega Arduino. It physically looks like the Arduino Nano, but with more IOs. I’ll then introduce you to the STM32 Maple Mini, and I’ll perform its installation on the Arduino IDE.

Step 1: Introduction

The Maple Mini is the second of the "two original panels" of STM32F103s manufactured by LeafLabs. It was released in 2011.

The original Maple Mini is no longer available, but several companies create clones, which have nearly identical functionality.

It is reliable and cheap.

Step 2: Characteristics

• STM32F103CBT6 Microcontroller

• Flash 128 KB

• 20 KB RAM

• 72 MHz Clock

• Mini USB

• 34 GPIOs

• 12 PWM (16 Bits)

• 9 Analog Inputs (12 Bits)

• 0 Analog Outputs

Step 3: Installation on the Arduino IDE

Before you start, make sure the drivers are installed.

If they are not installed, we will need to install the drivers for the Serial and DFU upload devices.

(check to see: https://wiki.stm32duino.com/index.php?title=Windows_driver_installation)

1 - Install the support for the Arduino Duo boards, with an ARM Cortex-M3 compiler

Tools >> Board >> Board Manager

(just type "Due" in the search)

2 - Download the Arduino STM32 .zip at: https://github.com/rogerclarkmelbourne/Arduino_STM32/ or via the direct link: https://github.com/rogerclarkmelbourne/Arduino_STM32/archive/master.zip.

3 - Unzip the file and paste it into the folder:

Documents / Arduino / hardware.

If the "hardware" folder does not exist, just create it manually.

Note: If you installed the Arduino IDE from the Microsoft application store, I suggest you uninstall it and do as I show in the video.

4 - Restart the Arduino IDE.

5 - Select Maple Mini in:

Tools >> Plate

Note

If your Mini Maple is not appearing on the COM port, do the following:

Open a program sketch of any of the STM32 examples (it may be blink, for example), then click to upload the program even without indicating the Maple Mini COM Port.

While charging, hold the "user" button until it is finished.

The “user button” can be used to boot the board in perpetual boot loader mode, which can be useful when installing drivers, or for when the sketch has completely blocked the core.

After the procedure is finished, press the "reset" button. Then the Maple Mini COM port will appear.

Step 4: Maple Mini

Step 5: Maple Mini - Pinage

Pins marked on:

• Red >> 3V3 Tolerant

• Green >> 5V Tolerants

Step 6: Blink

I made a Blink using the D18 nomenclature. But if you want to use the SMT32 nomenclature, put PB4. It will work the same way.

const int led = D18; //pino do led (equivale ao PB4)
//const int led = PB4; //pino do led (equivale ao D18) //para utilizar o LED interno, utilize PB1 ou D33 void setup() { pinMode(led, OUTPUT); } void loop() { digitalWrite(led,!digitalRead(led));// inverte o estado atual do LED (on/off) delay(1000); // aguarda um segundo (1000 milliseconds) }

Step 7: File

Download PDF