Skip to content

boards/serpente: add serpente board#13654

Merged
benpicco merged 2 commits intoRIOT-OS:masterfrom
benpicco:serpente-r2
May 20, 2020
Merged

boards/serpente: add serpente board#13654
benpicco merged 2 commits intoRIOT-OS:masterfrom
benpicco:serpente-r2

Conversation

@benpicco
Copy link
Contributor

Contribution description

The Serpente boards are low-cost development boards designed to be used with Adafruit’s CircuitPython.

Three versions of the board board exist, but they all the same except for the USB connector.
The standard Serpente board contains a female USB Type-C connector, the Serpente Plug C
contains a male USB Type-C connector, and the Serpente Plug uses the board itself as a Type-A USB plug.

Serptene R2 pinout

The board comes with the UF2 bootloader that works very much like the arduino bootloader from #12304, but uses a different memory address & magic.

Testing procedure

Use BOARD=serpente with the make command.

Example with micropython application:

     make BOARD=serpente -C examples/micropython flash

RIOT will automatically trigger a reset to the bootloader, but this only works if RIOT is still running on the board.
If your application has crashed or got erased, make flash will not be able to trigger a bootloader reset.

To manually enter the bootloader, quickly press the Reset button twice.
You know you've successfully entered the bootloader when the LED begins flashing blue.

Sometimes flashing fails and the board gets stuck in the bootloader.
In this case, just run make flash again when the device is not busy anymore.

Issues/PRs references

requires #13652 for proper USB ID.

@benpicco benpicco requested review from dylad and keestux as code owners March 18, 2020 17:19
@benpicco benpicco added Area: boards Area: Board ports Type: new feature The issue requests / The PR implemements a new feature for RIOT labels Mar 18, 2020
@benpicco benpicco requested a review from aabadie March 18, 2020 17:20
@benpicco benpicco changed the title Serpente r2 boards/serpente: add serpente board Mar 18, 2020
@benpicco benpicco added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Apr 1, 2020
@benpicco benpicco force-pushed the serpente-r2 branch 2 times, most recently from 52c9990 to 1d0440d Compare April 1, 2020 22:02
@fjmolinas
Copy link
Contributor

@benpicco can you provide some test output?

@benpicco
Copy link
Contributor Author

benpicco commented Apr 26, 2020

@benpicco can you provide some test output?

tests/periph_uart

I connected UART0 TX with UART1 RX and UART0 RX with UART1 TX

2020-04-26 20:26:01,282 # ================================
2020-04-26 20:26:01,284 # This application is intended for testing additional UART
2020-04-26 20:26:01,284 # 
2020-04-26 20:26:01,285 # Available devices:               2
> init 0 115200
2020-04-26 20:26:06,239 #  init 0 115200
2020-04-26 20:26:06,241 # Success: Initialized UART_DEV(0) at BAUD 115200
2020-04-26 20:26:06,491 # UARD_DEV(0): test uart_poweron() and uart_poweroff()  ->  [OK]
> ini1 1152000
2020-04-26 20:26:09,927 #  init 1 115200
2020-04-26 20:26:09,929 # Success: Initialized UART_DEV(1) at BAUD 115200
2020-04-26 20:26:10,179 # UARD_DEV(1): test uart_poweron() and uart_poweroff()  ->  [OK]
> send 0 Hello\ UART1
2020-04-26 20:26:21,703 #  send 0 Hello\ UART1
2020-04-26 20:26:21,704 # UART_DEV(0) TX: Hello UART1
2020-04-26 20:26:21,705 # Success: UART_DEV(1) RX: [Hello UART1]\n
> send 1 Hello\ UART0
2020-04-26 20:26:27,511 #  send 1 Hello\ UART0
2020-04-26 20:26:27,512 # UART_DEV(1) TX: Hello UART0
2020-04-26 20:26:27,514 # Success: UART_DEV(0) RX: [Hello UART0]\n

A patch was needed to fix tests/periph_uart for the non STDIO_UART_DEV case that will be in a separate PR (#13956).

tests/pkg_littlefs2

2020-04-26 20:44:08,474 # START
2020-04-26 20:44:08,476 # main(): This is RIOT! (Version: 2020.04-devel-1859-gd2fef8-serpente-r2)
2020-04-26 20:44:11,342 # ........
2020-04-26 20:44:11,342 # 8 tests)

tests/periph_spi

2020-04-26 20:55:03,154 # Refer to the README.md file for more information.
2020-04-26 20:55:03,155 # There are 2 SPI devices configured for your platform.
> init 1 0 0 0 7
2020-04-26 20:55:24,221 #  init 1 0 0 0 7
2020-04-26 20:55:24,223 # SPI_DEV(1) initialized: mode: 0, clk: 0, cs_port: 0, cs_pin: 7
> send abcd
2020-04-26 20:56:47,182 #  send abcd
2020-04-26 20:56:47,183 # Sent bytes
2020-04-26 20:56:47,183 #    0    1    2    3 
2020-04-26 20:56:47,184 #  0x61 0x62 0x63 0x64
2020-04-26 20:56:47,185 #    a    b    c    d 
2020-04-26 20:56:47,185 # Received bytes
2020-04-26 20:56:47,186 #    0    1    2    3 
2020-04-26 20:56:47,186 #  0x61 0x62 0x63 0x64
2020-04-26 20:56:47,187 #    a    b    c    d

i2c_scan

I connected a GY-85 module to the I2C bus

2020-04-26 21:07:29,081 #  i2c_scan 0
2020-04-26 21:07:29,082 # Scanning I2C device 0...
2020-04-26 21:07:29,084 # addr not ack'ed = "-", addr ack'ed = "X", addr reserved = "R", error = "E"
2020-04-26 21:07:29,085 # 0x00 R R R R R R R R R R R R R R - -
2020-04-26 21:07:29,087 # 0x10 - - - - - - - - - - - - - - - -
2020-04-26 21:07:29,088 # 0x20 - - - - - - - - - - - - - - - -
2020-04-26 21:07:29,089 # 0x30 - - - - - - - - - - - - - - - -
2020-04-26 21:07:29,090 # 0x40 - - - - - - - - - - - - - - - -
2020-04-26 21:07:29,092 # 0x50 - - - X - - - - - - - - - - - -
2020-04-26 21:07:29,094 # 0x60 - - - - - - - - X - - - - - - -
2020-04-26 21:07:29,095 # 0x70 - - - - - - - - R R R R R R R R

@benpicco benpicco force-pushed the serpente-r2 branch 2 times, most recently from 240fba0 to fffd519 Compare May 3, 2020 16:23
Copy link
Contributor

@fjmolinas fjmolinas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks, good some nitpicks below.

Also when I generated the docs the image for the board is way to big, not sure how to re-size images in doxygen.

@benpicco
Copy link
Contributor Author

I rebased because the MTD API now requires additional parmaters

@fjmolinas
Copy link
Contributor

Only the doxygen image issue remains, I tried a couple of things but was not succesfull..

@benpicco
Copy link
Contributor Author

This should fix it.

@fjmolinas
Copy link
Contributor

Looks good now, please squash!

@benpicco
Copy link
Contributor Author

squashed.

Copy link
Contributor

@fjmolinas fjmolinas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK, code looks good and @benpicco provided some test output!

@benpicco benpicco merged commit e7bf1ef into RIOT-OS:master May 20, 2020
@benpicco benpicco deleted the serpente-r2 branch May 20, 2020 09:31
@benpicco
Copy link
Contributor Author

Thank you for the review!

@miri64 miri64 added this to the Release 2020.07 milestone Jun 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: boards Area: Board ports CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: new feature The issue requests / The PR implemements a new feature for RIOT

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants