Difference between revisions of "Blue Pill"

From SEGGER Wiki
Jump to: navigation, search
(Created page with "The Blue Pill board is a Arduino nano like board, named Blue Pill. Older versions of the Blue Pill board featured a ST STM32F103 as target MCU while the latest version of the...")
 
Line 1: Line 1:
  +
__TOC__
  +
  +
This article describes specifics for the Blue Pill (STM32Duino) board based on a ST STM32F103 or CKS CS32F103.
 
The Blue Pill board is a Arduino nano like board, named Blue Pill. Older versions of the Blue Pill board featured a ST STM32F103 as target MCU while the latest version of the board is shipped with a CKS CS32F103 (CS32F103CB) instead. The board does not come with an standard debug connector but with 4 pins which can be used to connect an J-Link to the MCU.
 
The Blue Pill board is a Arduino nano like board, named Blue Pill. Older versions of the Blue Pill board featured a ST STM32F103 as target MCU while the latest version of the board is shipped with a CKS CS32F103 (CS32F103CB) instead. The board does not come with an standard debug connector but with 4 pins which can be used to connect an J-Link to the MCU.
  +
  +
XXX
  +
[[File:SiPeed_Lingan_Nano.jpg|250px]]
  +
  +
== Minimum requirements ==
  +
* All current J-Link models. In case of doubt, please check [[Software and Hardware Features Overview | Overview about which models / revisions support RISC-V]]
  +
* Embedded Studio Version 6.00 or later
  +
* J-Link software V6.61a or later
  +
  +
== Preparing for J-Link ==
  +
The Blue Pill board does not come with a standard debug connector but populates the debug JTAG signals on a 4 header that can be found on the opposite of the USB interface. Therefore, it can be manually wired in case J-Link shall be connected to it.
  +
  +
The following guide will describe how the Blue Pill can be connected to your J-Link.
  +
  +
* Now connect the board with e.g. jumperwires to your J-Link probe.
  +
* The following table shows how the Signals should be connected on both the board and [https://www.segger.com/products/debug-probes/j-link/technology/interface-description/ J-Link] side.
  +
  +
{| class="wikitable"
  +
|-
  +
! J-Link 20 pin debug interface !! Pin on eval board pads
  +
|-
  +
| Pin 1 (VTref) || 3V3
  +
|-
  +
| Pin 7 (TMS) || SWIO
  +
|-
  +
| Pin 9 (TCK) || SWCLK
  +
|-
  +
| Pin 4 (GND) || GND
  +
|-
  +
|}
  +
The resulting connection will then look like this:
  +
  +
XXX
  +
[[File:Longan_Nano.png|450px]]
  +
* Power the board via the USB port.
  +
* Verify the Connection with e.g. [https://wiki.segger.com/J-Link_cannot_connect_to_the_CPU#Verify_functionality_using_J-Link_Commander J-Link Commander]. The output should look as follows:
  +
  +
[[File:GD32VF1xx_Connect.PNG|400px]]
  +
  +
== Debugging in SEGGER Embedded Studio ==
  +
  +
=== Example projects for SEGGER Embedded Studio===
  +
The following example project was created with the SEGGER Embedded Studio project wizard and runs out-of-the-box on the Blue Pill (CS32F103 MCU) board. It is a simple Hello World sample and can be downloaded here:
  +
  +
XXX
  +
[[Media: CS32F103_Hello_World.zip | Hello World sample ]]

Revision as of 11:35, 19 December 2019

This article describes specifics for the Blue Pill (STM32Duino) board based on a ST STM32F103 or CKS CS32F103. The Blue Pill board is a Arduino nano like board, named Blue Pill. Older versions of the Blue Pill board featured a ST STM32F103 as target MCU while the latest version of the board is shipped with a CKS CS32F103 (CS32F103CB) instead. The board does not come with an standard debug connector but with 4 pins which can be used to connect an J-Link to the MCU.

XXX SiPeed Lingan Nano.jpg

Minimum requirements

Preparing for J-Link

The Blue Pill board does not come with a standard debug connector but populates the debug JTAG signals on a 4 header that can be found on the opposite of the USB interface. Therefore, it can be manually wired in case J-Link shall be connected to it.

The following guide will describe how the Blue Pill can be connected to your J-Link.

  • Now connect the board with e.g. jumperwires to your J-Link probe.
  • The following table shows how the Signals should be connected on both the board and J-Link side.
J-Link 20 pin debug interface Pin on eval board pads
Pin 1 (VTref) 3V3
Pin 7 (TMS) SWIO
Pin 9 (TCK) SWCLK
Pin 4 (GND) GND

The resulting connection will then look like this:

XXX Longan Nano.png

  • Power the board via the USB port.
  • Verify the Connection with e.g. J-Link Commander. The output should look as follows:

GD32VF1xx Connect.PNG

Debugging in SEGGER Embedded Studio

Example projects for SEGGER Embedded Studio

The following example project was created with the SEGGER Embedded Studio project wizard and runs out-of-the-box on the Blue Pill (CS32F103 MCU) board. It is a simple Hello World sample and can be downloaded here:

XXX Hello World sample