The Snickerdoodle Book/PlatformController

From krtkl wiki
Jump to navigation Jump to search

Platform Controller

Introduction

Snickerdoodle's platform controller is a STM32F0 series 32-bit ARM®Cortex-A0® microcontroller connected to and in control of various signals. See "Chapter 9" for a bit of an introduction.

15. Peripherals

ADC

Several 12-bit analog to digital converters (ADC) on the platform controller are used to monitor the on-board systems. The power supply levels are monitored using the ADCs.

TODO: insert Table 15.1: ADC Port Connection

I2C

SPI

LEDs

The platform controller is connected to 5 LEDs that are used to indicate various states and events of the board. These LEDs are connected to peripherals that are configured as PWM timers for brightness control on the LEDs through the PWM duty cycle.

Table 15.2: LED PWM Timer Channels
PA8 D11 TIM1 CH1 Red (fault)
PC6 E12 TIM3 CH1 Green (USB/Power)
PC7 E11 TIM3 CH2 Blue (Bluetooth)
PC8 E10 TIM3 CH3 White (Application)
PC9 D12 TIM3 CH4 Orange (Wireless Link)

USART

USART1

USART1 is connected to the Zynq processing subsystem on UART0 and is normally used to bridge the Zynq console output to the USB device peripheral. Normally the USB device is configured as a communications device class (CDC) interface.

Table 15.3: Platform Controller USART1 Configuration
Mode Asynchronous
Hardware Flow Control (RS-232) Disabled
Baud Rate 115200
Word Length 8 bits
Parity None
Stop Bits 1
Data Direction Receive and Transmit
Over Sampling 16 Samples
Single Sample Disable
USART2

USART2 is connected to the Bluetooth HCI interface of the Wilink 8 module.

TODO: insert Table 15.4: Platform Controller USART2

USB Device

The USB device peripheral is normally configured as a communications device class (CDC) interface to provide access to the Zynq console by bridging to USART1 which is connected to UART0 on the Zynq.

During certain boot modes, the USB device is configured for device firmware upgrade (DFU) and can be used to program the platform controller by writing directly to the embedded flash memory.

Basic Parameters

TODO: insert Table 15.5: USB Parameters

GPIO

Table 15.6: GPIO Pin Configuration
STM32 Port Pin Zynq Pin I/O Description
PA9 D10 Output ANT_SELECT_1
PA10 C12 Output ANT_SELECT_2
PC1 J2 Output ZYNQ_JTAG_NRST
PD1 B9 Output ZYNQ_POWER_EN
PD2 C8 Output WDI
PD7 A5 Output WL_32KHZ_CLK_EN
PD8 K9 Output ZYNQ_CLK_EN
PE2 B2 Output MIO4_BOOT_SELECT
PE3 A1 Output MIO5_BOOT_SELECT
PE4 B1 Input SELECT_BUTTON
PE5 C2 Input RESET_BUTTON
PE7 M7 Input ZYNQ_POWER_GOOD
PF10 G2 Output WL18xx_BT_EN
PD15 H10 Output SMB_NRESET

EXTI

Table 15.7: GPIO External Interrupt Pin Configuration
STM32 Port Pin Zynq Pin I/O Description
PD10 J12 EXTI10 JA1_P2
PD11 J11 EXTI11 JA2_P2
PD12 J10 EXTI12 JB1_P2
PD13 H12 EXTI13 JB2_P2
PD14 H11 EXTI14 JC1_P2

16. Firmware

The platform controller firmware provides the logic for handling the tasks of the...

Development Environment

The integrated development environment used to target the platform controller is the ARM® Keil microcontroller development kit (MDK). The MDK can be downloaded from http://www2.keil.com/stmicroelectronics-stm32/ mdk. After registering and activating the MDK, custom platform controller firmware can be developed and compiled

17. Device Firmware Upgrade (DFU)

For full customization of the Snickerdoodle system the firmware on the platform controller can be modified and upgraded.

For more details see Chapter 17 here.

18. USB Interface (Virtual COM Port)

The USB interface is most commonly specified as a communications class device and used to bridge the UART (RS-232) connection between the platform controller and the application processor.

For more details see Chapter 18 here.