-
Notifications
You must be signed in to change notification settings - Fork 7.6k
boards: peregrine: Introduce sam4l_wm400_cape #83310
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
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
d25ce14
soc: atmel: sam4l: Enable RC32K osc
nandojve 11597e0
drivers: counter: sam: tc: Update sam4l freq idx 0
nandojve 0b681fa
dts: bindings: Add Peregine vendor prefix
nandojve 737b51f
boards: arm: atmel: Add sam4l_wm400_cape board
nandojve 6579c5c
MAINTAINERS.yml: Add Peregrine platform
nandojve File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
.. _boards-peregrine: | ||
|
||
Peregrine | ||
######### | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
:glob: | ||
|
||
**/* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Copyright (c) 2020-2025 Gerson Fernando Budke <nandojve@gmail.com> | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
if BOARD_SAM4L_WM400_CAPE | ||
|
||
if NETWORKING | ||
|
||
config IEEE802154_RF2XX | ||
default y | ||
depends on IEEE802154 | ||
|
||
endif # NETWORKING | ||
|
||
# By default the board uses BOSSA bootloader and require that to zephyr relocate | ||
# the code_partition. This should be disabled when using the whole flash without | ||
# bootloader. | ||
config USE_DT_CODE_PARTITION | ||
default y | ||
|
||
source "boards/common/usb/Kconfig.cdc_acm_serial.defconfig" | ||
|
||
endif # BOARD_SAM4L_WM400_CAPE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Copyright (c) 2020-2025 Gerson Fernando Budke <nandojve@gmail.com> | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
config BOARD_SAM4L_WM400_CAPE | ||
select SOC_SAM4LC4B |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Copyright (c) 2020-2025 Gerson Fernando Budke <nandojve@gmail.com> | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
board_runner_args(jlink "--device=atsam4lc4b") | ||
board_runner_args(jlink "--speed=4000") | ||
board_runner_args(jlink "--reset-after-load") | ||
board_runner_args(jlink "-rtos GDBServer/RTOSPlugin_Zephyr") | ||
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake) | ||
|
||
board_runner_args(bossac "--bossac-port=/dev/ttyACM0") | ||
board_runner_args(bossac "--erase") | ||
include(${ZEPHYR_BASE}/boards/common/bossac.board.cmake) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
board: | ||
name: sam4l_wm400_cape | ||
full_name: SAM4L WM-400 Cape Board | ||
vendor: peregrine | ||
socs: | ||
- name: sam4lc4b |
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,153 @@ | ||
.. zephyr:board:: sam4l_wm400_cape | ||
|
||
Overview | ||
******** | ||
|
||
The SAM4L WM-400 Cape is a full featured design to enable IEEE 802.15.4 low | ||
power nodes. It is a Beaglebone Black cape concept with an Atmel AT86RF233 | ||
radio transceiver. User can develop Touch interface and have access to many | ||
sensors and conectivity buses. | ||
|
||
Hardware | ||
******** | ||
|
||
- ATSAM4LC4B ARM Cortex-M4 Processor | ||
- 12 MHz crystal oscillator | ||
- 32.768 kHz crystal oscillator | ||
- 1 RS-232 interface | ||
- 1 RS-485 full duplex interface | ||
- Micro-AB USB OTG host/device | ||
- 1 user touch button and One user pushbutton | ||
- 4 user LEDs | ||
- 1 AT86RF233 IEEE 802.15.4 transceiver | ||
- 1 MPL115A2 I²C Barometric Pressure/Temperature Sensor | ||
- 1 VCNL4010 Proximity/Light Sensor | ||
- 1 CC2D33S Advanced Humidity Temperature Sensor | ||
- 1 NCP18WF104J03RB NTC Temperature Sensor | ||
- 1 TEMT6000X01 Ambient Light Sensor | ||
|
||
Supported Features | ||
================== | ||
|
||
The ``sam4l_wm400_cape`` board supports the following hardware features: | ||
|
||
+-----------+------------+-------------------------------------+ | ||
| Interface | Controller | Driver/Component | | ||
+===========+============+=====================================+ | ||
| NVIC | on-chip | nested vector interrupt controller | | ||
+-----------+------------+-------------------------------------+ | ||
| SYSTICK | on-chip | systick | | ||
+-----------+------------+-------------------------------------+ | ||
| COUNTER | on-chip | counter | | ||
+-----------+------------+-------------------------------------+ | ||
| GPIO | on-chip | gpio | | ||
+-----------+------------+-------------------------------------+ | ||
| HWINFO | on-chip | Unique 120 bit serial number | | ||
+-----------+------------+-------------------------------------+ | ||
| RADIO | on-chip | ieee802154 | | ||
+-----------+------------+-------------------------------------+ | ||
| SPI | on-chip | spi | | ||
+-----------+------------+-------------------------------------+ | ||
| TRNG | on-chip | entropy | | ||
+-----------+------------+-------------------------------------+ | ||
| TWIM | on-chip | i2c master port-interrupt | | ||
+-----------+------------+-------------------------------------+ | ||
| USART | on-chip | serial port | | ||
+-----------+------------+-------------------------------------+ | ||
| USB | on-chip | USB device | | ||
+-----------+------------+-------------------------------------+ | ||
|
||
Other hardware features are not currently supported by Zephyr. | ||
|
||
The default configuration can be found in the Kconfig | ||
:zephyr_file:`boards/peregrine/sam4l_wm400_cape/sam4l_wm400_cape_defconfig`. | ||
|
||
Connections and IOs | ||
=================== | ||
|
||
For detailed information see `SAM4L WM-400 Cape`_ Information. | ||
|
||
System Clock | ||
============ | ||
|
||
The SAM4L MCU is configured to use the 12 MHz internal oscillator on the board | ||
with the on-chip PLL to generate an 48 MHz system clock. | ||
|
||
Serial Port | ||
=========== | ||
|
||
The ATSAM4LC4B MCU has 4 USARTs. One of the USARTs (USART3) is shared between | ||
RS-232 and RS-485 interfaces. The default console terminal is available at | ||
RS-232 onboard port or via USB device. | ||
|
||
Programming and Debugging | ||
************************* | ||
|
||
The SAM4L WM-400 Cape board has a 10-pin header to connect to a Segger JLink. | ||
Using the JLink is possible to program and debug the SAM4LC4B chip. The board | ||
came with a SAM-BA bootloader that only can be used to flash the software. | ||
|
||
Flashing | ||
======== | ||
|
||
#. For JLink instructions, see :ref:`jlink-debug-host-tools`. | ||
|
||
#. Run your favorite terminal program to listen for output. Under Linux the | ||
terminal should be :code:`/dev/ttyACM0`. For example: | ||
|
||
.. code-block:: console | ||
|
||
$ minicom -D /dev/ttyACM0 -o | ||
|
||
The -o option tells minicom not to send the modem initialization | ||
string. Connection should be configured as follows: | ||
|
||
- Speed: 115200 | ||
- Data: 8 bits | ||
- Parity: None | ||
- Stop bits: 1 | ||
|
||
#. Connect the SAM4L WM-400 Cape board to your host computer using the | ||
USB debug port. Then build and flash the :zephyr:code-sample:`hello_world` | ||
application. | ||
|
||
.. zephyr-app-commands:: | ||
:zephyr-app: samples/hello_world | ||
:board: sam4l_wm400_cape | ||
:goals: build flash | ||
|
||
You should see ``Hello World! sam4l_wm400_cape`` in your terminal. | ||
|
||
#. For SAM-BA bootloader instructions, see :ref:`atmel_sam_ba_bootloader`. | ||
|
||
#. Connect the SAM4L WM-400 Cape board to your host computer using the | ||
USB debug port pressing the S1 button. Then build and flash the | ||
:zephyr:code-sample:`hello_world` application. After programming the board | ||
the application will start automatically. | ||
|
||
.. zephyr-app-commands:: | ||
:zephyr-app: samples/hello_world | ||
:board: sam4l_wm400_cape | ||
:goals: build flash | ||
:flash-args: -r bossac | ||
|
||
|
||
Debugging | ||
========= | ||
|
||
You can debug an application in the usual way. Here is an example for the | ||
:zephyr:code-sample:`hello_world` application. | ||
|
||
.. zephyr-app-commands:: | ||
:zephyr-app: samples/hello_world | ||
:board: sam4l_wm400_cape | ||
:maybe-skip-config: | ||
:goals: debug | ||
|
||
References | ||
********** | ||
|
||
.. target-notes:: | ||
|
||
.. _SAM4L WM-400 Cape: | ||
https://gfbudke.wordpress.com/2014/04/30/modulo-wireless-ieee-802-15-4zigbee-wm-400-e-wm-400l-bbbs |
60 changes: 60 additions & 0 deletions
60
boards/peregrine/sam4l_wm400_cape/sam4l_wm400_cape-pinctrl.dtsi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
/* | ||
* Copyright (c) 2022-2025 Gerson Fernando Budke <nandojve@gmail.com> | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#include <dt-bindings/pinctrl/sam4lcXb-pinctrl.h> | ||
|
||
&pinctrl { | ||
spi0_default: spi0_default { | ||
group1 { | ||
pinmux = <PA21A_SPI_MISO>, | ||
<PA22A_SPI_MOSI>, | ||
<PA23A_SPI_SCK>, | ||
<PA13C_SPI_NPCS1>, | ||
<PA14C_SPI_NPCS2>; | ||
}; | ||
}; | ||
|
||
twi1_default: twi1_default { | ||
group1 { | ||
pinmux = <PB1A_TWIMS1_TWCK>, | ||
<PB0A_TWIMS1_TWD>; | ||
}; | ||
}; | ||
|
||
usart0_default: usart0_default { | ||
group1 { | ||
pinmux = <PB14A_USART0_RXD>, | ||
<PB15A_USART0_TXD>; | ||
}; | ||
}; | ||
|
||
usart0_hw_ctrl_flow: usart0_hw_ctrl_flow { | ||
group1 { | ||
pinmux = <PB14A_USART0_RXD>, | ||
<PB12A_USART0_RTS>; | ||
bias-pull-up; | ||
}; | ||
|
||
group2 { | ||
pinmux = <PB15A_USART0_TXD>, | ||
<PB11A_USART0_CTS>, | ||
<PB13A_USART0_CLK>; | ||
}; | ||
}; | ||
|
||
usart1_default: usart1_default { | ||
group1 { | ||
pinmux = <PA15A_USART1_RXD>, | ||
<PA16A_USART1_TXD>; | ||
}; | ||
}; | ||
|
||
usbc_default: usbc_default { | ||
group1 { | ||
pinmux = <PA25A_USBC_DM>, | ||
<PA26A_USBC_DP>; | ||
}; | ||
}; | ||
}; |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.