Board Support Package For Raspberry Pi Pico & Arduino RP2040 Nano Connect

Introduction

 

Raspberry Pi Pico

 

 

Arduino RP2040 Nano Connect

 

This board support package (BSP) supports Raspberry Pi Pico and Arduino RP2040 Nano Connect development boards. It is based on Raspberry Pi Pico SDK and uses ARM compiler tool chain for generating required binaries. This BSP supports multi-core programming on these boards. Most of the processing blocks are executed on Core-0 and the communication blocks (Serial, SPI and I2C) are provided with an option (_Execution Thread) for selecting execution core 

Getting Started

·       Create model and build to generate required binary.

·       Refer below for programming and debugging support.

General Usage Notes

·       PWM resolution can be adjustable for individual PWM slices during modeling.

Arduino RP2040 Usage Notes

·       WiFi NINA latest firmware version used is 1.4.5 with corresponding library version 1.8.10.

·       Refer Arduino RP2040 Nano Connect OEM reference documentation for any booting or programming related issues.

·       If user wants to execute USB serial on core-2 of Arduino RP2040 Nano Connect board then he/she has to add DISABLE_DEFAULT_SERIAL pre-processor definition in Setup Simulation > Pre-Proc Defs. label.

·       During debugging, user has to connect to serial terminal from PC within 5sec from pressing the reset button on the board.

·       LEDRGB on WiFiNINA works best when simulation time step is less than 5 msec.

·       PWM resolution is 8-bit for WiFiNINA  LEDR, LEDG & LEDB.

·       On some boards +5V is available on pin VIN instead of pin marked as +5V.

Board Configuration

·      General Configuration

Configuration Parameter

Parameter Values for RaspberryPi_Pico

Parameter Values for Arduino RP2040 Nano Connect

Board Title

RaspberryPi_Pico

Arduino RP2040 Connect

Tool Chain Type

Local Build

Local Build

Board Preprocessor Symbol

_BUILD_BRD_RPI_PICO

_BUILD_BRD_ARD_RP2040_CONNECT

Platform Preprocessor Symbol

_BUILD_PLT_ARD

_BUILD_PLT_ARD

Compiler Preprocessor Symbol

_BUILD_CMP_ARM_GCC

_BUILD_CMP_ARM_GCC

C++11 Standard Support

No

No

Debug Support

Yes

Yes

File System Support

No

No

OpenMP/OpenCL/CUDA Support

No/No/No

No/No/No

Simulation Panel Support

No

No

 

·      Hardware Configuration

Configuration Parameter

Parameter Values for RaspberryPi_Pico

Parameter Values for Arduino RP2040 Nano Connect

Number of CPU cores

2

2

Dynamic Memory Support

Yes

Yes

Prefer Fixed/Floating Point

Floating Point

Floating Point

DI/DO Pins

GP0[0], GP1[1], GP2[2], GP3[3], GP4[4], GP5[5], GP6[6], GP7[7], GP8[8], GP9[9], GP10[10], GP11[11], GP12[12], GP13[13], GP14[14], GP15[15], GP16[16], GP17[17], GP18[18], GP19[19], GP20[20], GP21[21], GP22[22], GP25(LED)[25]

D0[D0], D1[D1], D2[D2], D3[D3], D4[D4], D5[D5], D6[D6], D7[D7], D8[D8], D9[D9], D10[D10], D11[D11], D12[D12], D13 (LED)[D13], D14[D14], D15[D15], D16[D16], D17[D17], LEDR (WiFiNINA)[27], LEDG (WiFiNINA)[25], LEDB (WiFiNINA)[26]

ADC Default Resolution

12

12

ADC Pins

GP26(A0)[26], GP27(A1)[27], GP28(A2)[28], TEMP(A3)[29]

A0[A0], A1[A1], A2[A2], A3[A3],

A4 (WiFiNINA)[A4],

A5 (WiFiNINA)[A5],

A6 (WiFiNINA)[A6],

A7 (WiFiNINA)[A7]

PWM Default Resolution

10

12

PWM Pins

GP0[0], GP1[1], GP2[2], GP3[3], GP4[4], GP5[5], GP6[6], GP7[7], GP8[8], GP9[9], GP10[10], GP11[11], GP12[12], GP13[13], GP14[14], GP16[16], GP17[17], GP18[18], GP19[19], GP20[20], GP21[21], GP22[22], GP25(LED)[25]

D0[D0], D1[D1], D2[D2], D3[D3], D4[D4], D5[D5], D6[D6], D7[D7], D8[D8], D9[D9], D10[D10], D11[D11], D12[D12], D13 (LED)[D13], D14[D14],

D15[D15], D16[D16], D17[D17], LEDR (WiFiNINA)[LEDR],

LEDG (WiFiNINA)[LEDG],

LEDB (WiFiNINA)[LEDB]

DAC Default Resolution

-

-

DAC Pins

-

-

UART0 Pins

Via USB Programmer Port

Via USB Programmer Port

UART1 Pins

TX1(GP0), RX1(GP1)

Refer above figure

UART2 Pins

TX2(GP4), RX2(GP5)

-

UART3 Pins

-

-

SPI0 Pins

SCK(GP18), MOSI(GP19), MISO(GP20), SS(21)

Refer above figure

SPI1 Pins

SCK(GP10), MOSI(GP11), MISO(GP12), SS(13)

-

I2C0 Pins

SCL(GP17), SDA(GP16)

Refer above figure

I2C1 Pins

SCL(GP3), SDA(GP2)

-

Onboard IMU and Microphone on Arduino RP2040 Nano Connect

-

Supported with dedicated block.

Onboard WiFi

-

Implemented through TargetHw_Wifi101 block

 

Programmer

CASP supports Programmer0 (using python3.exe) for uploading generated binary file to the board.

Debugging

Debugging is supported over USB serial.

Known Issues & Limitations

·       These boards seldom freeze and may even fail to be recognized by USB from the host computer. Please refer to manufacturer web site on how to trouble shoot during such situation.  When such situation occurs for Raspberry Pi Pico boards then typical workaround to make the board work again is as described below

     - Press the reset button on the board while powering it up.

     - The board’s flash memory should now appear as a drive on the host computer.

     - Take a valid binary file with extension *.uf2 or make a simple LED blink model in CASP and copy the generated uf2 file from the project /build/bin directory to the drive.

     - The board should now automatically reset and should work again.

 

·       Raspberry Pi Pico compiler has issues with some of the CASP’s data routing blocks. This may at times result in freezing of the board. In such cases refer above procedure on how make the board work again. Workaround the make such blocks work is to manually order these blocks to run at starting or ending in the block execution order. Option for manual ordering is available on the right click block options.