Clone this wiki locally
|Alt Functions||External Conn Chassis||MCU Pinout||Pin||-||Pin||MCU Pinout||External Conn Chassis||Alt Functions|
In order to access the peripherals, you need to reprogram the MCU with the desired functions using one of your favourite frameworks/language:
Using PlatformIO (with ST STM32 extension), 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:
- Example to test the internal 40 pin header for the MCU and USB communication with the WHL-U SoC
- 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:
;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_build.f_cpu = 48000000L build_flags = -D HSE_VALUE=8000000 -D HAL_PCD_MODULE_ENABLED -D PIO_FRAMEWORK_ARDUINO_ENABLE_CDC -D USBCON -D USBD_USE_CDC -D USBD_VID=0X160D -D USBD_PID=0X9991 -D USB_MANUFACTURE="Unknown"
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 by pressing the "upload" button on PlatformIO.
Once the upload process is complete the MCU will reset itself and start the uploaded sketch.