Difference between revisions of "Pinout Xtreme MCU"

From UpWiki
Jump to: navigation, search
(Platformio Projects)
(Platformio Projects)
 
Line 58: Line 58:
  
 
We provide 2 generic samples to test the MCU I/O:
 
We provide 2 generic samples to test the MCU I/O:
* [https://bit.ly/39ITJSl Example to test the internal 40 pin header for the MCU and USB communication with the WHL-U SoC]  
+
* [https://bit.ly/3dG4g1n Example to test the internal 40 pin header for the MCU and USB communication with the WHL-U SoC]  
* [https://bit.ly/37AWyDg Example to test the external 16 pin header for the MCU and USB communication with the WHL-U SoC]
+
* [https://bit.ly/2BUlwDa Example to test the external 16 pin header for the MCU and USB communication with the WHL-U SoC]
  
 
In order to configure your project correctly, the platform.ini file included in the project should be as follows:
 
In order to configure your project correctly, the platform.ini file included in the project should be as follows:

Latest revision as of 07:08, 30 June 2020

Pinout MCU

Alt Functions External Conn Chassis MCU Pinout Pin - Pin MCU Pinout External Conn Chassis Alt Functions
1 3.3V 1 2 3.3V 2
GND 3 4 GND
13 GPIO_PB1 5 6 VBAT
3 GPIO_PB7 7 8 GPIO_PB8 15
4 GPIO_PB6 9 10 GPIO_PB9 16
GPIO_PB5 11 12 GPIO_PC15 14
GPIO_PB4 13 14 NRST
GPIO_PB3 15 16 GPIO_PA0 WKUP
GPIO_PA15 17 18 GPIO_PA1 5
SWDCLK GPIO_PA14 19 20 GPIO_PA2 6
SWDIO GPIO_PA13 21 22 GPIO_PA3 7
USB_DP GPIO_PA12* 23 24 GPIO_PA4 8
USB_DN GPIO_PA11* 25 26 GPIO_PA5 9
GPIO_PA10 27 28 GPIO_PA6 10
GPIO_PA9 29 30 GPIO_PA7 11
12 GPIO_PA8 31 32 GPIO_PB0
GPIO_PB15 33 34 GPIO_PB2
GPIO_PB14 35 36 GPIO_PB10 I2C_SCL
GPIO_PB13 37 38 GPIO_PB11 I2C_SDA
GPIO_PB12 39 40 5V


Accessing the peripherals on the MCU on UP Xtreme

In order to access the peripherals, you need to reprogram the MCU with the desired functions using one of your favourite frameworks/language:

Platformio Projects

Using Platformio, it is easy to setup a project and code with your preferred language and framework for UP Xtreme MCU.

We provide 2 generic samples to test the MCU I/O:

In order to configure your project correctly, the platform.ini file included in the project should be as follows:

;PlatformIO Project Configuration File
;
;   Build options: build flags, source filter
;   Upload options: custom upload port, speed and extra flags
;   Library options: dependencies, extra library storages
;   Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html

[env:bluepill_f103c8]
platform = ststm32
board = bluepill_f103c8
framework = arduino
upload_protocol = stlink
lib_ldf_mode = deep+
board_f_cpu = 48000000L
build_flags =
    -D HSE_VALUE=12000000
    -D HAL_PCD_MODULE_ENABLED
    -D PIO_FRAMEWORK_ARDUINO_ENABLE_CDC
    -D USBCON
    -D USBD_USE_CDC
    -D USBD_VID=0X0483
    -D USB_MANUFACTURE="Unknown"
    -D USB_PRODUCT="\"BLUEPILL_F103C8\""

Once your project is ready to be flashed, connect the USB STM32 Programmer to the Host PC where you have the Platformio IDE and use the available programming adapter cable to connect the STM32 Programmer to the MCU internal header. Then you can program the MCU pressing the "upload" button on Platformio.

Once the upload process is complete the MCU will reset itself and start the uploaded sketch.