Commercial Boards
The following is a list of commercial boards that are either ported or planned to be ported to run the nanoFramework
RP2040
The Raspberry Pi Pico is a high-performance microcontroller chip designed by Raspberry Pi in the United Kingdom
The Chip features
Dual-core Arm Cortex M0+ processor, flexible clock running up to 133 MHz
264kB of SRAM, and 2MB of on-board flash memory
USB 1.1 with device and host support
Low-power sleep and dormant modes
Drag-and-drop programming using mass storage over USB
26 × multi-function GPIO pins
2 × SPI, 2 × I2C, 2 × UART, 3 × 12-bit ADC, 16 × controllable PWM channels
Accurate clock and timer on-chip
Temperature sensor
Accelerated floating-point libraries on-chip
8 × Programmable I/O (PIO) state machines for custom peripheral support
SWD Debugging the RP2040
To allowing porting the nanoFramework to the RP2040, a native C/C++ debugging facility is required. ( unless you can write perfect code)
There a couple of ways to do this, the following describes the Picoprobe method.
For the complete description you can find the relevant information in the documentation at in Chapter 6. Debugging with SWD and the Appendix A: Using Picoprobe.
The complete official Picoprobe source can be found at GITHUB.
At the time of starting the porting of the native C/C++ code for nanoFramework to the RP2040 I had the following two boards, the official Pico board and one from Seeed the XIAO RP2040. I decided to use the board as the picoprobe which only uses a couple of pins.
After downloading the code from , I made some modifications to the picoprobe_config.h file to match the GPIO ports I have chosen to connect to the SWD debugging port.
// PIO config
// Target reset config
PICO | PICOW | ||
---|---|---|---|
STM32F769IDiscovery
This discovery board utilizes the STM32F769NIH6 Arm® Cortex®‑M7 core-based microcontroller with 2 MBytes of flash memory and 532 Kbytes of RAM.
4-inch 800 x 472‑pixel capacitive touch TFT color LCD with serial interface (on STM32F769I-DISCO only)
Optional display accessories: HDMI and DSI adapters
SAI audio codec
Four digital ST MEMS microphones on DFSDM inputs
128‑Mbit SDRAM
512‑Mbit Quad-SPI flash memory
Reset and user push-buttons
Pin Outs
CN9
PIN GPIO_PORT CONNECTOR PIN 1 PC0 A0 2 PH2 A1 3 PA0 A2 4 PA1 A3 5 PC2 A4 6 PC3 A5
PIN | GPIO_PORT | CONNECTOR PIN |
---|---|---|
1 | PC0 | A0 |
2 | PH2 | A1 |
3 | PA0 | A2 |
4 | PA1 | A3 |
5 | PC2 | A4 |
6 | PC3 | A5 |
CN8
PIN GPIO_PORT CONNECTOR 1 PB15 D0 2 PB14 D1 3 PG3 D2 4 PA0 D3 5 PG4 D4 6 PE14 D5 7 PD15 D6 8 PG5 D7
PIN | GPIO_PORT | CONNECTOR |
---|---|---|
1 | PB15 | D0 |
2 | PB14 | D1 |
3 | PG3 | D2 |
4 | PA0 | D3 |
5 | PG4 | D4 |
6 | PE14 | D5 |
7 | PD15 | D6 |
8 | PG5 | D7 |
CN5
PIN CONNECTOR NAME 1 E5V 2 IOREF 3 NRST 4 3V3 5 5V 6 GND 7 GND 8 VIN
PIN | CONNECTOR NAME |
---|---|
1 | E5V |
2 | IOREF |
3 | NRST |
4 | 3V3 |
5 | 5V |
6 | GND |
7 | GND |
8 | VIN |
CN4
PIN GPIO_PORT CONNECTOR NAME 1 PE3 D8 2 PB7 D9 3 PF6 D10 4 PF9 D11 5 PF8 D12 6 PF7 D13 7 GND 8 AVDD 9 I2C_SDA 10 I2C_SCL
PIN | GPIO_PORT | CONNECTOR NAME |
---|---|---|
1 | PE3 | D8 |
2 | PB7 | D9 |
3 | PF6 | D10 |
4 | PF9 | D11 |
5 | PF8 | D12 |
6 | PF7 | D13 |
7 | GND | |
8 | AVDD | |
9 | I2C_SDA | |
10 | I2C_SCL |
CN11(Mikrobus)
PIN CONNECTOR NAME PIN CONNECTOR NAME 1 AN 1 PWM 2 RST 2 INT 3 CS 3 RX 4 SCK 4 TX 5 MISO 5 SCL 6 MOSI 6 SDA 7 3V3 7 5V 8 GND 8 GND
PIN | CONNECTOR NAME | PIN | CONNECTOR NAME |
---|---|---|---|
1 | AN | 1 | PWM |
2 | RST | 2 | INT |
3 | CS | 3 | RX |
4 | SCK | 4 | TX |
5 | MISO | 5 | SCL |
6 | MOSI | 6 | SDA |
7 | 3V3 | 7 | 5V |
8 | GND | 8 | GND |
CN3(Grove)
PIN GPIO_PORT SIGNAL 1 PF14 I2C_SCL 2 PF15 I2C_SDA 3 Vcc 4 GND
PIN | GPIO_PORT | SIGNAL |
---|---|---|
1 | PF14 | I2C_SCL |
2 | PF15 | I2C_SDA |
3 | Vcc | |
4 | GND |
CN4
PIN GPIO_PORT SIGNAL 1 PF7 RX 2 PF9 TX 3 Vcc 4 GND
PIN | GPIO_PORT | SIGNAL | |
---|---|---|---|
1 | PF7 | RX | |
2 | PF9 | TX | |
3 | Vcc | ||
4 | GND |
Arduino
GPIO_PORT SIGNAL PF14 - I2C4_SCL D15 SCL PF15 - I2C4_SDA D14 SDA AVDD AVDD GND GND 5 Volts, 800ma PF7 - SPI5_SCK E5V D13 SCK connected to 3.3V D12 MISO PF8 - SPI5_MISO MCU Reset PF9 - TIM32_CH4,SPI5_MOSI NRST D11 PWM/MOSI 3.3 Volts, 1.3 Amps PF6 - TIM32_CH1,SPI5_NSS 3V3 D10 PWM/CS 5 Volt source from one of (E5V,USB,POE) PB7 - TIM4_CH2 5V D9 PWM Ground PE3 GND D8 Ground GND External Supply must be < 11.5 Volts PG5 VIN D7 PD15 - TIM4_CH4 D6 PWM PC0 - ADC123_INP10 PE14 - TIM1_CH4 A0 D5 PWM PH2 - ADC3_INP13 PG4 A1 D4 PA0_C ADC12_INP0 PA0 - TIM5_CH4 A2 D3 PWM PA1_C ADC12_INP1 PG3 A3 D2 PC2_C ADC3_INP0 PB14 - USART1_TX A4 D1 TX PC3_C PB15 - USART1_RX A5 D0 RX
GPIO_PORT | SIGNAL | ||||
---|---|---|---|---|---|
PF14 - I2C4_SCL | D15 | SCL | |||
PF15 - I2C4_SDA | D14 | SDA | |||
AVDD | AVDD | ||||
GND | GND | ||||
5 Volts, 800ma | PF7 - SPI5_SCK | E5V | D13 | SCK | |
connected to 3.3V | D12 | MISO | PF8 - SPI5_MISO | ||
MCU Reset | PF9 - TIM32_CH4,SPI5_MOSI | NRST | D11 | PWM/MOSI | |
3.3 Volts, 1.3 Amps | PF6 - TIM32_CH1,SPI5_NSS | 3V3 | D10 | PWM/CS | |
5 Volt source from one of (E5V,USB,POE) | PB7 - TIM4_CH2 | 5V | D9 | PWM | |
Ground | PE3 | GND | D8 | ||
Ground | GND | ||||
External Supply must be < 11.5 Volts | PG5 | VIN | D7 | ||
PD15 - TIM4_CH4 | D6 | PWM | |||
PC0 - ADC123_INP10 | PE14 - TIM1_CH4 | A0 | D5 | PWM | |
PH2 - ADC3_INP13 | PG4 | A1 | D4 | ||
PA0_C ADC12_INP0 | PA0 - TIM5_CH4 | A2 | D3 | PWM | |
PA1_C ADC12_INP1 | PG3 | A3 | D2 | ||
PC2_C ADC3_INP0 | PB14 - USART1_TX | A4 | D1 | TX | |
PC3_C | PB15 - USART1_RX | A5 | D0 | RX |
Azure-RTOS and startup
When the Azure-RTOS kernel is started, the first call is tx_initialize_low_level.s. The code does not have any specific STM32H7 code and appears to be CORTEX-M common ( to followup). This is where the SysTick frequency is setup as the base timer for the RTOS. There are two variables that define the frequency. SYSTEM_CLOCK = 520000000 <-- This value should be changed to match your CPU clock configuration