Difference between revisions of "Blue Pill"

From SEGGER Wiki
Jump to: navigation, search
(Preparing for J-Link)
(Preparing for J-Link)
Line 34: Line 34:
 
The resulting connection will then look like this:
 
The resulting connection will then look like this:
   
[[File:blue-pill-02.png|650px]]
+
[[File:blue-pill-02.png|450px]]
 
* Power the board via the USB port.
 
* 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:
 
* 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:CS32F103xx_Connect.PNG|400px]]
+
[[File:CS32F103xx_Connect.PNG|600px]]
   
 
== Debugging in SEGGER Embedded Studio ==
 
== Debugging in SEGGER Embedded Studio ==

Revision as of 12:46, 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.

blue-pill-01.png

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:

blue-pill-02.png

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

CS32F103xx 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:

Hello World sample