ProductivityOpen P1AM-100

The ProductivityOpen P1AM-100 automation platform compatible with Productivity1000 Series I/O modules, P1AM Series shields, and Arduino MKR format shields. It is based on the Microchip SAMD21G18 family of processors. It also has a NINA-W102 chip onboard which provides an wireless communication abilities based on the popular ESP32 family of wireless chips from Espressif.

Interfaces

Interface Hardware Supported TinyGo Support
GPIO YES YES
UART YES YES
SPI YES YES
I2C YES YES
ADC YES YES
PWM YES YES
USBDevice YES YES

Pins

Pin Hardware pin Alternative names
D0 PA22
D1 PA23
D2 PA10 I2S_SCK_PIN
D3 PA11 I2S_WS_PIN
D4 PB10
D5 PB11
D6 PA20
D7 PA21
D8 PA16 SPI0_SDO_PIN
D9 PA17 SPI0_SCK_PIN
D10 PA19 SPI0_SDI_PIN
D11 PA08 SDA_PIN
D12 PA09 SCL_PIN
D13 PB23 UART_RX_PIN
D14 PB22 UART_TX_PIN
D15 PA02 A0
D16 PB02 A1
D17 PB03 A2
D18 PA04 A3, BASE_SLAVE_SELECT_PIN
D19 PA05 A4, BASE_SLAVE_ACK_PIN
D20 PA06 A5
D21 PA07 A6, I2S_SD_PIN
SWITCH PA28
LED PB08
ADC_BATTERY PB09 BASE_ENABLE_PIN
USBCDC_DM_PIN PA24
USBCDC_DP_PIN PA25
USBCDC_HOST_ENABLE_PIN PA18
SDCARD_SDI_PIN PA15
SDCARD_SDO_PIN PA12
SDCARD_SCK_PIN PA13
SDCARD_SS_PIN PA14
SDCARD_CD_PIN PA27

Machine Package Docs

Documentation for the machine package for the ProductivityOpen P1AM-100

Installing BOSSA

In order to flash your TinyGo programs onto the ProductivityOpen P1AM-100 board, you will need to install the “bossac” command line utility which is part of the BOSSA command line utilities.

macOS

You can use Homebrew to install the BOSSA command line interface by using the following command:

brew install bossa

Or if you prefer, you can also download the installer from https://github.com/shumatech/BOSSA/releases/download/1.9.1/bossa-1.9.1.dmg

Once you have downloaded it, double click on the .dmg file to perform the installation.

Linux

On Linux, install from source:

sudo apt install libreadline-dev libwxgtk3.0-gtk3-dev
git clone https://github.com/shumatech/BOSSA.git
cd BOSSA
make
sudo cp bin/bossac /usr/local/bin

Windows

You can download BOSSA from https://github.com/shumatech/BOSSA/releases/download/1.9.1/bossa-x64-1.9.1.msi

VERY IMPORTANT: During the installation, you must choose to install into c:\Program Files. The installer might have the wrong path, so edit it to match c:\Program Files.

After the installation, you must add BOSSA to your PATH:

set PATH=%PATH%;"c:\Program Files\BOSSA";

Test that you have installed “BOSSA” correctly by running this command:

bossac --help

Flashing

Once you have installed the needed BOSSA command line utility, as in the previous section, you are ready to build and flash code to your ProductivityOpen P1AM-100 board.

CLI Flashing

  • Plug your ProductivityOpen P1AM-100 board into your computer’s USB port.

  • Build and flash your TinyGo code using the tinygo flash command. This command flashes the ProductivityOpen P1AM-100 with the blinky1 example:

    tinygo flash -target=p1am-100 examples/blinky1
    
  • The ProductivityOpen P1AM-100 board should restart and then begin running your program.

Troubleshooting

If you have troubles getting your ProductivityOpen P1AM-100 board to receive code, try this:

  • Press the “RESET” button on the board two times to get the ProductivityOpen P1AM-100 board ready to receive code.

  • Now try running the tinygo flash command as above:

    tinygo flash -target=p1am-100 [PATH TO YOUR PROGRAM]
    

Once you have updated your ProductivityOpen P1AM-100 board the first time, after that you should be able to flash it entirely from the command line.

Notes

You can use the USB port to the ProductivityOpen P1AM-100 as a serial port. UART0 refers to this connection.

For information on how to use the built-in NINA-W102 wireless chip with the default firmware, please see the “wifinina” driver in the TinyGo drivers repository located at https://github.com/tinygo-org/drivers/tree/release/wifinina.

You can also use the Espressif ESP-AT firmware, although you will need to flash it yourself. Please see the “espat” driver in the TinyGo drivers repository located at https://github.com/tinygo-org/drivers/tree/release/espat.