1

RPICO32 Evaluation Kit (With 5 sample modules)

The RPICO32 Evaluation Kit is an evaluation system for our own RP2040 based WiFi module RPICO32 !

The RPICO32 module is a powerful embedded systems module based on the RP2040, from the Raspberry Pi foundation, connected to a ESP8285 WiFi chip from Espressif Systems. The module is also equipped with 8Mbyte of FLASH memory for the RP2040 as well as all the required crystals and a properly tuned antenna.

More information and technical details on this module are available here.

Also included with the kit is 5 samples of the RPICO32 module, allowing you to kickstart your next design.

Evaluation board description

This evaluation board contains all the necessary electronics (which is not much) needed to get the module running so that you can start downloading and debug code.

In addition to this, it also includes circuitry for charging and managing a LiPo battery cell allowing you to test the system in battery-operated situations. We also included a current measurement resistor to simplify measuring the actual current used by the module in different scenarios.

USB Type C

To communicate with the device there is a USB-C connector on the board. This is connected directly to the USB pins of the module which allows you to connect to the module to download code or do any other type of communication as required by your system.

GPIO pin headers

Two rows of pin headers are available that are directly connected to the GPIO pins of the module. This allows you to access all the GPIO pins and other hardware block to start testing your stuff out.

Aref can can be left connected to 3.3V or supplied separately if required.

Buttons

Two buttons are available on the board to be able to force a reset or to move the module into UF2 boot loader mode.

JTAG

A 10-pin narrow pitch JTAG header is available on the board allowing you to hook a proper JTAG debugger to the device and do some heavy lifting debugging on it.

Weight 0.009 kg
Dimensions 5.07 × 2.28 × 0.72 cm

Using the Arduino environment

We’ve teamed up with Earle F. Philhower over at his Github page to provide Arduino support for our Raspberry Pi Pico based boards. All instructions on how to install the board support packaged as well as multiple examples on how to use the Raspberry Pi Pico processor.

CircuitOython

The RPICO32 module (and of course this eval kit) is fully compatible with Adafruits CircuitPython. Instruction are available on how to install the python interpreter of your choice is available on respective web site.

Short initialization example

To simplify the hardware aspect of the WiFi modem we have included a small helper class in the Arduino IDE that is always available to you as a developer. This new class replaces the previous examples on how to do a proper reset and sync.

The first thing you need to do in your sketch is to include the support library by entering:

#include <ChallengerWiFi.h>

After this basically all you need to do before starting the WiFi manager is the following:

if (Challenger2040WiFi.reset())
    Serial.println(F("WiFi Chip reset OK !"));
else
    Serial.println(F("Could not reset WiFi chip !"));

After these step the modem is initialized and is ready to accept your commands. The reset() function of the built in Challenger2040WiFi library will perform a HW reset of the WiFi modem and wait for it to return the “ready” prompt. After this a WiFi manager can be started and start communicating with the modem. Here at iLabs we use the WiFiEspAT library and initializing the stack is as easy as

WiFi.init(ESP_SERIAL_PORT);

At this point you can also do a check to make sure that the data link is setup properly.

if (WiFi.status() == WL_NO_MODULE) {
    Serial.println("Communication with WiFi module failed!");
    // don't continue
    while (true);
}

You are now good to go, so doing something like this:

Serial.println("Waiting for connection to WiFi");
while (WiFi.status() != WL_CONNECTED) {
    delay(1000);
    Serial.print('.');
}
Serial.println();
Serial.println("Connected to WiFi network.");

will work as expected.

Changing the baudrate

The default baudrate between the RP2040 micro controller and the ESP8285 WiFi modem is 115200 and while this is probably good for most IoT applications that normally don’t send very much data it can sometimes be useful to increase the baudrate. The Challenger2040WiFi contains a method for doing this and again it is super simple to use. Just do the following and the baud rate will be altered on both systems and the devices will be synced up.

Challenger2040WiFi.changeBaudRate(921600);

After this you can proceed to communicate with the device as normal.

Sending and AT command

After the modem has been initialized and it has reported that it is ready you can now send a command to it. Here’s an example on how a simple command can be sent.

Serial2.println("ATE0");

This command simply tells the modem not to repeat everything back that you send to it. If you want to enable this again you would simply send the following command:

Serial2.println("ATE1");

Pass through example

This example Arduino program creates a USB2Serial pass through to the ESP8285. This can be used to flash the ESP with new upgraded software or you can write your own code and use this short snippet to flash the device.

/*
  Challenger USB to serial port.

  This is an example on how to flash the onboard ESP8285.
  TinyUSB must be selected in the Arduino IDE for this sketch to work.

  The ESP8285 should to flashed with the following command:
  esptool.py --port <port> --baud <rate> write_flash -e -fm dout -fs 1MB <filename.bin>

  This program must be compiled with tinyUSB to work.
*/

#include <Arduino.h>

#ifdef USE_TINYUSB
#include <Adafruit_TinyUSB.h>
#define USE_OVERRIDE_LINE_STATE_CB 1
#endif

// Sets the level of debug info that is printed on the serial output
// 0 = No debug information at all
// 1 = Basic debug information
// 2 = Full debug information
#define DEBUG_LVL 0

#define ESP_PORT Serial2
#define PC_PORT Serial
#define DEBUG_PORT Serial1

#define PACKET_SIZE 64

int led = LED_BUILTIN; // the PWM pin the LED is attached to
int led_state = 0;
int wifi_rst = 19;
int wifi_mode = 13;
uint32_t baud_rate = 115200;
static int port = -1;
static int words = 0;
uint8_t ch;
char buffer[PACKET_SIZE];
size_t received;

void tud_cdc_line_coding_cb(uint8_t itf, cdc_line_coding_t const* coding) {
  (void) itf;
#if DEBUG_LVL >= 1
  DEBUG_PORT.printf("n");
#endif 
  if (coding->bit_rate != baud_rate) {
    ESP_PORT.begin(coding->bit_rate);
    baud_rate = coding->bit_rate;
#if DEBUG_LVL >= 1
    DEBUG_PORT.printf("Setting new baudrate to %d ", baud_rate);
#endif 
  }
}

//
// This overrides the stack functionality to capture cdc line state
// changes.
//
#if defined(USE_OVERRIDE_LINE_STATE_CB)
void tud_cdc_line_state_cb(uint8_t itf, bool dtr, bool rts) {
  (void) itf; // interface ID, not used

  if (rts) {
    digitalWrite(wifi_rst, LOW);
#if DEBUG_LVL >= 1
    DEBUG_PORT.printf("RST=low ");
#endif 
  } else {
    digitalWrite(wifi_rst, HIGH);
#if DEBUG_LVL >= 1
    DEBUG_PORT.printf("RST=high ");
#endif 
  }

  if (dtr) {
    digitalWrite(wifi_mode, LOW);
#if DEBUG_LVL >= 1
    DEBUG_PORT.printf("MODE=low");
#endif 
  } else {
    digitalWrite(wifi_mode, HIGH);
#if DEBUG_LVL >= 1
    DEBUG_PORT.printf("MODE=high");
#endif 
  }
#if DEBUG_LVL >= 1
  DEBUG_PORT.printf("n");
#endif

// DTR = false is counted as disconnected
  if (!dtr) {
// touch1200 only with first CDC instance (Serial)
    if (itf == 0) {
      cdc_line_coding_t coding;
      tud_cdc_get_line_coding(&coding);

      if (coding.bit_rate == 1200) {
        TinyUSB_Port_EnterDFU();
      }
    }
  }
}
#endif

// the setup routine runs once when you press reset:
void setup()
{
  pinMode(led, OUTPUT);
  digitalWrite(led, 0);

#if DEBUG_LVL >= 1
  DEBUG_PORT.begin(921600);
  DEBUG_PORT.println("nnnnnnDebug monitor !");
#endif

// Set default baudrates
  ESP_PORT.begin(baud_rate);
  ESP_PORT.setTimeout(10);

  PC_PORT.begin(baud_rate);
  PC_PORT.setTimeout(10);

// Set initial state of control pins
// Normal start when the reset pin is released
  digitalWrite(wifi_rst, LOW);
  pinMode(wifi_rst, OUTPUT);
  digitalWrite(wifi_mode, HIGH);
  pinMode(wifi_mode, OUTPUT);
// delay(1);
// digitalWrite(wifi_rst, HIGH);

  while (!PC_PORT);
  digitalWrite(led, HIGH);
}

//
// The main loop were data is received from the host and then forwarded
// to the ESP8285 and vice versa.
//
void loop() {

  // Handle data from the USB port ment for the ESP8285
  if (PC_PORT.available()) {
    received = PC_PORT.readBytes(buffer, PACKET_SIZE);
    ESP_PORT.write(buffer, received);

#if DEBUG_LVL >= 2
    if (port != 1) {
      port = 1;
      words = 0;
      DEBUG_PORT.println("nFrom USB to ESP8285 ==================================");
    }
    for (int i=0;i<received;i++) {
      DEBUG_PORT.printf("%02x ", buffer[i]);
      if (++words > 15) {
        words = 0;
        DEBUG_PORT.println();
      }
    }
#endif
  }

  // Handle response data from the ESP8285
  if (ESP_PORT.available()) {
    received = ESP_PORT.readBytes(buffer, PACKET_SIZE);
    PC_PORT.write(buffer, received);

#if DEBUG_LVL >= 2
    if (port != 2) {
      port = 2;
      words = 0;
      DEBUG_PORT.println("nFrom ESP8285 to USB ==================================");
    }
    for (int i=0;i<received;i++) {
      DEBUG_PORT.printf("%02x ", buffer[i]);
      if (++words > 15) {
        words = 0;
        DEBUG_PORT.println();
      }
    }
#endif
  }
}

Documentation for the RPICO32 evaluation module.

CircuitPython by Adafruit

The RPICO32 module fully supports circuitpython and should be supported shortly by the official releases. But until then we have created a beta release of the circuitpython image which can be downloaded from here.

Please go ahead and put it through its paces and feel free to report back any issues that you may find.

You can always get our products from your local reseller if you like. Here is a list of current resellers.

  • The Pi Hut Raspberry Pi Superstore
  • The largest maker shop in Switzerland

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.