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

Add SAMD5x/E5x and all missing SAMx7x devices #827

Merged
merged 35 commits into from
Sep 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
eac9863
[ext] Update sam and modm-devices submodules
chris-durand Feb 8, 2022
3e5a611
[repo] Enable SAMD5x/SAME5x device family
chris-durand Oct 19, 2021
b4a28a8
[sam] Add minimum GCLK support for D5x/E5x devices
chris-durand Oct 19, 2021
316ba50
[sam] Rename UART drivers
chris-durand Feb 3, 2022
460f189
[sam] Add SAMx7x U(S)ART support, fix data reception
chris-durand Feb 4, 2022
264218e
[repo] Enable complete SAMx7x device family
chris-durand Feb 8, 2022
50e4c63
[board] Add SAMV71 Xplained Ultra
chris-durand Feb 3, 2022
d4be10a
[example] Add SAMV71 Xplained Ultra blink example
chris-durand Feb 3, 2022
d31b550
[core] Fix SAMx5x and SAMx7x delay
chris-durand Feb 9, 2022
045fda4
[sam] Fix SAME5x gpio config
chris-durand Feb 9, 2022
84f5b8e
[sam] Fix ADC gpio data for D/E5x and x7x devices
chris-durand Feb 15, 2022
2941190
[sam] Fix macro name collision in ITM driver
chris-durand Feb 16, 2022
527b319
[sam] Add API to enable peripheral APB clocks on devices with GCLK
chris-durand Mar 18, 2022
3b93f87
[sam] Generate GCLK sources and peripheral clocks from device data
chris-durand Apr 5, 2022
c048c90
[sam] Implement more complete GCLK driver for D2x/D5x/E5x devices
chris-durand Apr 5, 2022
52e5a95
[sam] Add DPLL driver with automatic coefficient calculation
chris-durand Apr 5, 2022
88eabef
[sam] Add SAMD5x/E5x USB support
chris-durand Apr 4, 2022
99e9362
[sam] Adapt peripheral drivers to GCLK changes
chris-durand Mar 18, 2022
bdfb831
[board] Add SAME54 Xplained Pro board
chris-durand Oct 19, 2021
22a5d31
[example] Add SAME54 Xplained Pro blink example
chris-durand Oct 19, 2021
3ec9f1e
[sam] Fix systick frequency on SAMD5x/E5x
chris-durand Apr 4, 2022
bbf3cc1
[board] Adapt SAMD21 boards to GCLK changes
chris-durand Apr 5, 2022
facfe48
[example] Add SAME54 Xplained PRO USB example
chris-durand Apr 4, 2022
d8f369e
[sam] Enable PMC clock driver for all devices with PMC
chris-durand Apr 4, 2022
a705b67
[sam] Fix inconsistent macros for SAME70 "B"-variant
chris-durand Apr 4, 2022
e22ab45
[board] Fix compilation of samd-mini bsp when using USB
chris-durand Apr 5, 2022
fcbd455
[sam] Adapt to new family naming scheme
chris-durand Aug 22, 2022
8a0ac8a
[ci] Split SAM hal compile all job
chris-durand Aug 31, 2022
a73ba09
[sam] Fix SERCOM UART pin remapping
chris-durand Sep 15, 2022
30b73aa
[sam] Fix SAMD1x/D2x/DAx input pull-up configuration
chris-durand Sep 15, 2022
060c22f
[board] Add SAMD21 Xplained Pro
chris-durand Sep 15, 2022
9adb9fa
[example] Add SAMD21 Xplained Pro blink example
chris-durand Sep 15, 2022
8c9b4d8
[example] Add SAMD21 Xplained Pro usb serial example
chris-durand Sep 16, 2022
95e3f74
[sam] Fix device header selection
chris-durand Sep 29, 2022
83fbc1c
[sam] Do not use deprecated uart defines on x7x b-variant devices
chris-durand Sep 29, 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
58 changes: 55 additions & 3 deletions .github/workflows/compile-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
name: avr-compile-all
path: test/all/log

sam-compile-all:
sam-d0x-d1x-d2x-compile-all:
if: github.event.label.name == 'ci:hal'
runs-on: ubuntu-20.04
container:
Expand All @@ -47,9 +47,61 @@ jobs:
- name: Update lbuild
run: |
pip3 install --upgrade --upgrade-strategy=eager modm
- name: Compile HAL for all SAM
- name: Compile HAL for SAMD0x, SAMD1x, SAMD2x
run: |
(cd test/all && python3 run_all.py sam --quick-remaining)
(cd test/all && python3 run_all.py samd0 samd1 samd2 --quick-remaining)
- name: Upload log artifacts
if: always()
uses: actions/upload-artifact@v2
with:
name: sam-compile-all
path: test/all/log

sam-x5x-compile-all:
if: github.event.label.name == 'ci:hal'
runs-on: ubuntu-20.04
container:
image: ghcr.io/modm-ext/modm-build-cortex-m:2022-09-27
steps:
- name: Check out repository
uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Fix Git permission/ownership problem
run: |
git config --global --add safe.directory /__w/modm/modm
- name: Update lbuild
run: |
pip3 install --upgrade --upgrade-strategy=eager modm
- name: Compile HAL for SAMD5x, SAME5x, SAMG5x
run: |
(cd test/all && python3 run_all.py samd5 same5 samg5 --quick-remaining)
- name: Upload log artifacts
if: always()
uses: actions/upload-artifact@v2
with:
name: sam-compile-all
path: test/all/log

sam-x7x-compile-all:
if: github.event.label.name == 'ci:hal'
runs-on: ubuntu-20.04
container:
image: ghcr.io/modm-ext/modm-build-cortex-m:2022-09-27
steps:
- name: Check out repository
uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Fix Git permission/ownership problem
run: |
git config --global --add safe.directory /__w/modm/modm
- name: Update lbuild
run: |
pip3 install --upgrade --upgrade-strategy=eager modm
- name: Compile HAL for SAME7x, SAMS7x, SAMV7x
run: |
(cd test/all && python3 run_all.py same7 sams7 samv7 --quick-remaining)
- name: Upload log artifacts
if: always()
uses: actions/upload-artifact@v2
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,19 @@ jobs:
- name: Examples SAMD Devices
if: always()
run: |
(cd examples && ../tools/scripts/examples_compile.py samd)
(cd examples && ../tools/scripts/examples_compile.py samd samd21_xplained_pro)
- name: Examples SAMG Devices
if: always()
run: |
(cd examples && ../tools/scripts/examples_compile.py samg55_xplained_pro)
- name: Examples SAME5x Devices
if: always()
run: |
(cd examples && ../tools/scripts/examples_compile.py same54_xplained_pro)
- name: Examples SAMV Devices
if: always()
run: |
(cd examples && ../tools/scripts/examples_compile.py samv)
(cd examples && ../tools/scripts/examples_compile.py samv samv71_xplained_ultra)
- name: Examples RP20 Devices
if: always()
run: |
Expand Down
57 changes: 40 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ git clone --recurse-submodules --jobs 8 https://github.com/modm-io/modm.git

## Microcontrollers

modm can create a HAL for <!--allcount-->3304<!--/allcount--> devices of these vendors:
modm can create a HAL for <!--allcount-->3534<!--/allcount--> devices of these vendors:

- STMicroelectronics STM32: <!--stmcount-->2729<!--/stmcount--> devices.
- Microchip SAM: <!--samcount-->186<!--/samcount--> devices.
- Microchip SAM: <!--samcount-->416<!--/samcount--> devices.
- Microchip AVR: <!--avrcount-->388<!--/avrcount--> devices.
- Raspberry Pi: <!--rpicount-->1<!--/rpicount--> device.

Expand All @@ -103,7 +103,7 @@ Please [discover modm's peripheral drivers for your specific device][discover].
<tr>
<th align="center"></th>
<th align="center" colspan="13">STM32</th>
<th align="center" colspan="3">SAM</th>
<th align="center" colspan="4">SAM</th>
<th align="center" colspan="1">RP</th>
<th align="center" colspan="3">AT</th>
</tr><tr>
Expand All @@ -121,9 +121,10 @@ Please [discover modm's peripheral drivers for your specific device][discover].
<th align="center">L1</th>
<th align="center">L4</th>
<th align="center">L5</th>
<th align="center">D21</th>
<th align="center">G55</th>
<th align="center">V70</th>
<th align="center">D1x<br/>D2x<br/>DAx</th>
<th align="center">D5x<br/>E5x</th>
<th align="center">E7x<br/>S7x<br/>V7x</th>
<th align="center">G5x</th>
<th align="center">20</th>
<th align="center">90</th>
<th align="center">Mega</th>
Expand All @@ -144,8 +145,9 @@ Please [discover modm's peripheral drivers for your specific device][discover].
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">○</td>
<td align="center">✅</td>
<td align="center">○</td>
<td align="center">○</td>
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">○</td>
<td align="center">✅</td>
Expand All @@ -166,8 +168,9 @@ Please [discover modm's peripheral drivers for your specific device][discover].
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">✕</td>
<td align="center">✕</td>
<td align="center">○</td>
<td align="center">○</td>
<td align="center">✕</td>
<td align="center">✕</td>
<td align="center">○</td>
<td align="center">○</td>
Expand All @@ -188,8 +191,9 @@ Please [discover modm's peripheral drivers for your specific device][discover].
<td align="center">✅</td>
<td align="center">○</td>
<td align="center">○</td>
<td align="center">✕</td>
<td align="center">○</td>
<td align="center">○</td>
<td align="center">✕</td>
<td align="center">✕</td>
<td align="center">○</td>
<td align="center">○</td>
Expand All @@ -210,10 +214,11 @@ Please [discover modm's peripheral drivers for your specific device][discover].
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">○</td>
<td align="center"></td>
<td align="center"></td>
<td align="center">○</td>
<td align="center">✕</td>
<td align="center">✕</td>
<td align="center">✕</td>
<td align="center">○</td>
<td align="center">✕</td>
</tr><tr>
Expand All @@ -232,8 +237,9 @@ Please [discover modm's peripheral drivers for your specific device][discover].
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">○</td>
<td align="center">✕</td>
<td align="center">○</td>
<td align="center">○</td>
<td align="center">✕</td>
<td align="center">✅</td>
<td align="center">✕</td>
<td align="center">✕</td>
Expand All @@ -254,7 +260,8 @@ Please [discover modm's peripheral drivers for your specific device][discover].
<td align="center">✕</td>
<td align="center">✕</td>
<td align="center">✕</td>
<td align="center">✕</td>
<td align="center">○</td>
<td align="center">○</td>
<td align="center">✕</td>
<td align="center">✕</td>
<td align="center">✕</td>
Expand All @@ -278,6 +285,7 @@ Please [discover modm's peripheral drivers for your specific device][discover].
<td align="center">✅</td>
<td align="center">○</td>
<td align="center">○</td>
<td align="center">○</td>
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">✅</td>
Expand All @@ -300,6 +308,7 @@ Please [discover modm's peripheral drivers for your specific device][discover].
<td align="center">✕</td>
<td align="center">✕</td>
<td align="center">○</td>
<td align="center">✕</td>
<td align="center">○</td>
<td align="center">✕</td>
<td align="center">✕</td>
Expand All @@ -326,6 +335,7 @@ Please [discover modm's peripheral drivers for your specific device][discover].
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">✅</td>
</tr><tr>
<td align="left">I<sup>2</sup>C</td>
<td align="center">✅</td>
Expand All @@ -344,6 +354,7 @@ Please [discover modm's peripheral drivers for your specific device][discover].
<td align="center">○</td>
<td align="center">○</td>
<td align="center">○</td>
<td align="center">○</td>
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">✅</td>
Expand All @@ -366,6 +377,7 @@ Please [discover modm's peripheral drivers for your specific device][discover].
<td align="center">○</td>
<td align="center">○</td>
<td align="center">○</td>
<td align="center">○</td>
<td align="center">✕</td>
<td align="center">✕</td>
<td align="center">✕</td>
Expand All @@ -386,8 +398,9 @@ Please [discover modm's peripheral drivers for your specific device][discover].
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">✕</td>
<td align="center">✕</td>
<td align="center">○</td>
<td align="center">○</td>
<td align="center">✕</td>
<td align="center">✕</td>
<td align="center">✕</td>
<td align="center">✕</td>
Expand All @@ -408,8 +421,9 @@ Please [discover modm's peripheral drivers for your specific device][discover].
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">○</td>
<td align="center">✅</td>
<td align="center">○</td>
<td align="center">○</td>
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">✅</td>
Expand All @@ -433,6 +447,7 @@ Please [discover modm's peripheral drivers for your specific device][discover].
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">✕</td>
<td align="center">✕</td>
<td align="center">✕</td>
Expand All @@ -452,9 +467,10 @@ Please [discover modm's peripheral drivers for your specific device][discover].
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">○</td>
<td align="center">✅</td>
<td align="center">○</td>
<td align="center">○</td>
<td align="center">✅</td>
<td align="center">○</td>
<td align="center">○</td>
<td align="center">○</td>
<td align="center">○</td>
Expand All @@ -475,7 +491,8 @@ Please [discover modm's peripheral drivers for your specific device][discover].
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">○</td>
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">✅</td>
Expand All @@ -502,6 +519,7 @@ Please [discover modm's peripheral drivers for your specific device][discover].
<td align="center">✕</td>
<td align="center">✕</td>
<td align="center">✕</td>
<td align="center">✕</td>
</tr><tr>
<td align="left">USB</td>
<td align="center">✅</td>
Expand All @@ -521,6 +539,7 @@ Please [discover modm's peripheral drivers for your specific device][discover].
<td align="center">✅</td>
<td align="center">○</td>
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">✕</td>
<td align="center">✕</td>
<td align="center">✕</td>
Expand Down Expand Up @@ -613,11 +632,15 @@ We have out-of-box support for many development boards including documentation.
<td align="center"><a href="https://modm.io/reference/config/modm-rp-pico">Raspberry Pi Pico</a></td>
</tr><tr>
<td align="center"><a href="https://modm.io/reference/config/modm-samd21-mini">SAMD21-MINI</a></td>
<td align="center"><a href="https://modm.io/reference/config/modm-samd21-xplained-pro">SAMD21-XPLAINED-PRO</a></td>
<td align="center"><a href="https://modm.io/reference/config/modm-same54-xplained-pro">SAME54-XPLAINED-PRO</a></td>
<td align="center"><a href="https://modm.io/reference/config/modm-samg55-xplained-pro">SAMG55-XPLAINED-PRO</a></td>
</tr><tr>
<td align="center"><a href="https://modm.io/reference/config/modm-samv71-xplained-ultra">SAMV71-XPLAINED-ULTRA</a></td>
<td align="center"><a href="https://modm.io/reference/config/modm-srxe">Smart Response XE</a></td>
<td align="center"><a href="https://modm.io/reference/config/modm-stm32_f4ve">STM32-F4VE</a></td>
</tr><tr>
<td align="center"><a href="https://modm.io/reference/config/modm-stm32f030_demo">STM32F030-DEMO</a></td>
</tr><tr>
<td align="center"><a href="https://modm.io/reference/config/modm-thingplus-rp2040">THINGPLUS-RP2040</a></td>
</tr>
</table>
Expand Down
2 changes: 1 addition & 1 deletion examples/samd/interrupt/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ int
main()
{
Board::initialize();
ExternalInterrupt::initialize();
ExternalInterrupt::initialize(Board::SystemClock::ClockGen32kHz);
ExtInt<3>::initialize(&isr);
ExtInt<3>::connect<D12>();
while (1)
Expand Down
39 changes: 39 additions & 0 deletions examples/samd21_xplained_pro/blink/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
* Copyright (c) 2016-2017, Niklas Hauser
*
* This file is part of the modm project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
// ----------------------------------------------------------------------------

#include <modm/board.hpp>

using namespace Board;

int
main()
{
Board::initialize();

// Use the logging streams to print some messages.
// Change MODM_LOG_LEVEL above to enable or disable these messages
MODM_LOG_DEBUG << "debug" << modm::endl;
MODM_LOG_INFO << "info" << modm::endl;
MODM_LOG_WARNING << "warning" << modm::endl;
MODM_LOG_ERROR << "error" << modm::endl;

uint32_t counter(0);

while (true)
{
Led0::toggle();
modm::delay(Button::read() ? 500ms : 100ms);

MODM_LOG_INFO << "loop: " << counter++ << modm::endl;
}

return 0;
}
9 changes: 9 additions & 0 deletions examples/samd21_xplained_pro/blink/project.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<library>
<extends>modm:samd21-xplained-pro</extends>
<options>
<option name="modm:build:build.path">../../../build/samd21_xplained_pro/blink</option>
</options>
<modules>
<module>modm:build:scons</module>
</modules>
</library>
Loading