Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds Challenger RP2040 NFC board #846

Merged
merged 61 commits into from
Sep 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
72d3fc2
Adds support for Challenger RP2040 WiFi boards
PontusO Jul 29, 2021
979fc88
Merge branch 'master' into master
earlephilhower Jul 29, 2021
3b034ba
Added Challenger board to makeboards build script
PontusO Jul 29, 2021
0bfc29a
Merge branch 'master' of https://github.com/PontusO/arduino-pico
PontusO Jul 29, 2021
879b43c
Merge branch 'earlephilhower:master' into master
PontusO Aug 8, 2021
c8a204f
Adds new challenger board with LTE modem.
PontusO Aug 8, 2021
07d53ba
Updated after getting approved PID from Raspberry Pi
PontusO Aug 11, 2021
d5aae8e
Merge branch 'earlephilhower:master' into master
PontusO Aug 14, 2021
15654a4
Add support for reverse numbering of analog pins.
PontusO Aug 14, 2021
dc6f62e
Merge branch 'earlephilhower:master' into master
PontusO Aug 23, 2021
d050746
Added minimal HW support for onboard WiFi modem.
PontusO Aug 23, 2021
afdc1a0
Merge branch 'earlephilhower:master' into master
PontusO Sep 11, 2021
6ed65fc
Merge branch 'earlephilhower:master' into master
PontusO Oct 4, 2021
fb18726
Merge branch 'earlephilhower:master' into master
PontusO Nov 1, 2021
640dfa4
Added challenger-nb-rp2040-wifi and RPICO32 module.
PontusO Nov 1, 2021
b2eb00d
Merge branch 'earlephilhower:master' into master
PontusO Dec 6, 2021
804a467
Updated PID for RPICO32
PontusO Dec 6, 2021
c9601f1
Added a simple support class for challenger LTE boards
PontusO Dec 7, 2021
3a6d4d5
Merge branch 'earlephilhower:master' into master
PontusO Dec 8, 2021
5630575
Merge branch 'challenger-lte-support-class'
PontusO Dec 9, 2021
3705a0d
Update ChallengerLTE.cpp
PontusO Dec 9, 2021
f18e530
Adds option for setting USB max power in makeboards.py
PontusO Dec 9, 2021
d635331
Merge branch 'earlephilhower:master' into master
PontusO Dec 10, 2021
08ab410
Merge branch 'dev-add-usbpower-option'
PontusO Dec 10, 2021
acdcb57
Conflicts resolved
PontusO Feb 17, 2022
d834b02
Merge branch 'earlephilhower-master'
PontusO Feb 17, 2022
dbc2b8a
Added new board Challenger RP2040 LoRa
PontusO Feb 19, 2022
59fe2ae
Added new lora board to readme.
PontusO Feb 19, 2022
e906da8
Added missing SERIAL2 and LoRa module GIO pins.
PontusO Feb 21, 2022
5261504
Fixed conflicts
PontusO Feb 21, 2022
a688bad
Merge branch 'earle-master'
PontusO Feb 21, 2022
7d63ad9
Added support for enabling UART CTS and RTS pins.
PontusO Feb 21, 2022
8563a09
Updated boards.txt after merge conflict of makeboards.py
PontusO Feb 21, 2022
5b9eab1
Fixed incorrect indention
PontusO Feb 21, 2022
5404767
Fixed PR comments
PontusO Feb 22, 2022
0da1318
Merge conflict resolved.
PontusO May 20, 2022
16133da
Add new Challenger RP2040 WiFi/BLE board (https://ilabs.se/challenger…
PontusO May 20, 2022
70c5643
Merge branch 'earlephilhower:master' into master
PontusO May 24, 2022
19cd308
* Updated PID for WiFi/BLE board
PontusO May 24, 2022
83493cc
Fixed spelling errors.
PontusO May 24, 2022
a9f414c
Merge branch 'earlephilhower:master' into master
PontusO Jun 10, 2022
e0a58a1
Merge branch 'earlephilhower:master' into master
PontusO Jun 15, 2022
ea14e61
Updated helper class for Challenger NB board.
PontusO Jun 15, 2022
4e6a5a6
Merge branch 'master' into master
earlephilhower Jun 15, 2022
bb33887
Merge branch 'earlephilhower:master' into master
PontusO Jun 17, 2022
e9c8cc4
Added Challenger sdrtc and subghz boards.
PontusO Jun 29, 2022
afb148f
Merge branch 'earlephilhower:master' into master
PontusO Jun 29, 2022
410edba
Merge branch 'master' of https://github.com/PontusO/arduino-pico
PontusO Jun 29, 2022
e189781
Updated readme.
PontusO Jun 29, 2022
f1988dd
Merge branch 'earlephilhower:master' into master
PontusO Jun 30, 2022
54f3245
Re ran makeboards to generate new index.
PontusO Jun 30, 2022
44b56c2
Merge branch 'earlephilhower:master' into master
PontusO Jul 13, 2022
c6cea3b
Merge branch 'earlephilhower:master' into master
PontusO Jul 20, 2022
b071244
Merge branch 'earlephilhower:master' into master
PontusO Jul 26, 2022
78fea36
Added to possibility to have extra compiler directives for a board.
PontusO Jul 26, 2022
f038fdc
Added extra compiler options to JSON generation.
PontusO Jul 26, 2022
7bfb545
Allows having a list of extra macros to define
PontusO Jul 27, 2022
b48408f
Fixed incorrect USB PID for Challenger NB board.
PontusO Jul 27, 2022
ef79b49
Added board initialization for all wifi boards.
PontusO Jul 27, 2022
01c7f84
Resolved merge conflict
PontusO Sep 9, 2022
dc15e05
Added Challenger RP2040 NFC board.
PontusO Sep 9, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
589 changes: 589 additions & 0 deletions boards.txt

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions package/package_pico_index.template.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@
{
"name": "iLabs Challenger 2040 SD/RTC"
},
{
"name": "iLabs Challenger 2040 NFC"
},
{
"name": "iLabs RPICO32"
},
Expand Down
54 changes: 54 additions & 0 deletions tools/json/challenger_2040_nfc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"build": {
"arduino": {
"earlephilhower": {
"boot2_source": "boot2_w25q080_2_padded_checksum.S",
"usb_vid": "0x2E8A",
"usb_pid": "0x1036"
}
},
"core": "earlephilhower",
"cpu": "cortex-m0plus",
"extra_flags": "-D ARDUINO_CHALLENGER_NB_2040_NFC_RP2040 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250",
"f_cpu": "133000000L",
"hwids": [
[
"0x2E8A",
"0x00C0"
],
[
"0x2E8A",
"0x1036"
]
],
"mcu": "rp2040",
"variant": "challenger_2040_nfc"
},
"debug": {
"jlink_device": "RP2040_M0_0",
"openocd_target": "rp2040.cfg",
"svd_path": "rp2040.svd"
},
"frameworks": [
"arduino"
],
"name": "Challenger 2040 NFC",
"upload": {
"maximum_ram_size": 270336,
"maximum_size": 8388608,
"require_upload_port": true,
"native_usb": true,
"use_1200bps_touch": true,
"wait_for_upload_port": false,
"protocol": "picotool",
"protocols": [
"cmsis-dap",
"jlink",
"raspberrypi-swd",
"picotool",
"picoprobe"
]
},
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",
"vendor": "iLabs"
}
1 change: 1 addition & 0 deletions tools/makeboards.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ def MakeBoardJSON(name, vendor_name, product_name, vid, pid, pwr, boarddefine, f
MakeBoard("challenger_2040_wifi_ble", "iLabs", "Challenger 2040 WiFi/BLE", "0x2e8a", "0x102C", 500, "CHALLENGER_2040_WIFI_BLE_RP2040", 8, "boot2_w25q080_2_padded_checksum", ["WIFIESPAT2"])
MakeBoard("challenger_nb_2040_wifi", "iLabs", "Challenger NB 2040 WiFi", "0x2e8a", "0x100d", 500, "CHALLENGER_NB_2040_WIFI_RP2040", 8, "boot2_w25q080_2_padded_checksum", ["WIFIESPAT2"])
MakeBoard("challenger_2040_sdrtc", "iLabs", "Challenger 2040 SD/RTC", "0x2e8a", "0x102d", 250, "CHALLENGER_NB_2040_SDRTC_RP2040", 8, "boot2_w25q080_2_padded_checksum")
MakeBoard("challenger_2040_nfc", "iLabs", "Challenger 2040 NFC", "0x2e8a", "0x1036", 250, "CHALLENGER_NB_2040_NFC_RP2040", 8, "boot2_w25q080_2_padded_checksum")
MakeBoard("ilabs_rpico32", "iLabs", "RPICO32", "0x2e8a", "0x1010", 250, "ILABS_2040_RPICO32_RP2040", 8, "boot2_w25q080_2_padded_checksum")

# Melopera
Expand Down
34 changes: 34 additions & 0 deletions variants/challenger_2040_nfc/board_init.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
Board init for the Challenger RP2040 NFC

Copyright (c) 2022 P. Oldberg <[email protected]>

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <Arduino.h>

/**
* Setup control pins for the NFC chip.
*/
void initVariant() {
// Initialize the interrupt pin to be an input.
// Setting it to an interrupt and connecting a call back is up to the app.
pinMode(PIN_PN7150_IRQ_B, INPUT);

// Initialize the reset pin to an output and hold the device in reset.
// It is up to the application to release it.
pinMode(PIN_PN7150_RST_B, OUTPUT);
digitalWrite(PIN_PN7150_RST_B, LOW);
}
67 changes: 67 additions & 0 deletions variants/challenger_2040_nfc/pins_arduino.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
#pragma once

#define PINS_COUNT (26u)
#define NUM_DIGITAL_PINS (26u)
#define NUM_ANALOG_INPUTS (4u)
#define NUM_ANALOG_OUTPUTS (0u)
#define ADC_RESOLUTION (12u)

// LEDs
#define PIN_LED (24u)
#define NEOPIXEL (14u)
#define PIN_NEOPIXEL NEOPIXEL

// Serial
#define PIN_SERIAL1_TX (16u)
#define PIN_SERIAL1_RX (17u)

// SPI
#define PIN_SPI0_MISO (20u)
#define PIN_SPI0_MOSI (23u)
#define PIN_SPI0_SCK (22u)
#define PIN_SPI0_SS (21u)

// Wire
#define PIN_WIRE0_SDA (0u)
#define PIN_WIRE0_SCL (1u)

// Connected to PN7150 NFC controller on I2C channel 2
#define PIN_WIRE1_SDA (10u)
#define PIN_WIRE1_SCL (11u)
#define PIN_PN7150_IRQ_B (9u)
#define PIN_PN7150_RST_B (12u)
#define PN7150_I2C_ADDR (0x28)

// Not pinned out
#define PIN_SERIAL2_RX (31u)
#define PIN_SERIAL2_TX (31u)

#define SERIAL_HOWMANY (1u)
#define SPI_HOWMANY (1u)
#define WIRE_HOWMANY (2u)

#define LED_BUILTIN PIN_LED

static const uint8_t D0 = (16u);
static const uint8_t D1 = (17u);
static const uint8_t D2 = (20u);
static const uint8_t D3 = (23u);
static const uint8_t D4 = (22u);
static const uint8_t D5 = (2u);
static const uint8_t D6 = (3u);
static const uint8_t D7 = (0u);
static const uint8_t D8 = (1u);
static const uint8_t D9 = (4u);
static const uint8_t D10 = (5u);
static const uint8_t D11 = (6u);
static const uint8_t D12 = (7u);
static const uint8_t D13 = (8u);
static const uint8_t D14 = (13u);
static const uint8_t D18 = (24u);

static const uint8_t A0 = (26u);
static const uint8_t A1 = (27u);
static const uint8_t A2 = (28u);
static const uint8_t A3 = (29u);
static const uint8_t A4 = (19u);
static const uint8_t A5 = (21u);