This topic describes how to connect a microcontroller (MCU) to a demo board that includes a communication module. It also describes how to build a development environment, create a project, import a device SDK, and configure the project.
Background information
The following figure shows the demo boards.
NUCLEO-F103RB
The following figure shows pins for the demo board.
SIM800C mini v2.0
The following figure shows pins for the demo board.
Pin
Description
PWR
Power switch. Automatic power-on is enabled by default.
STA
Status.
GND
Ground.
RXD
Receive data.
TXD
Transmit data.
EN
Enable.
VIN
5 V to 18 V input.
Connect demo boards
Connect the RXD pin of each demo board to the TXD pin of each demo board. This allows you to establish a connection and run AT commands. The following figure shows how to connect the demo boards.
Build a development environment
This topic uses the STM32CubeMX tool as an example. For more information, see STM32Cube Ecosystem.
Open the STM32CubeMX tool and click New Project.
On the Board Selector tab, search for NUCLEO-F103RB and click STM32F103RBTx.
In the upper-right corner, click Start Project.
In the left-side navigation pane, click Connectivity, and select USART1 as the port for communication between an MCU and a communication module. Proceed as follows.
Set Mode to Asynchronous.
In the Configuration section, set the following parameters.
On the GPIO Settings tab, select PA9 and PA10 in the Pin field.
On the NVIC Settings tab, set USART1 global interrupt to Enabled.
In the left-side navigation pane, click Middleware, select FREERTOS, set USE_COUNTING_SEMAPHORES to Enabled, and set TOTAL_HEAP_SIZE. Each thread can share the heap.
On the Project Manager tab, complete the settings in the Project section.
In the upper-right corner of the page, click GENERATE CODE to generate code for the project.