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

boards/same51-curiosity-nano: add support for the board #21111

Merged
merged 5 commits into from
Jan 8, 2025

Conversation

benpicco
Copy link
Contributor

@benpicco benpicco commented Dec 25, 2024

Contribution description

The SAM E51 Curiosity Nano is a cheap evaluation board for the SAM E51 family of MCUs. This family is pretty much identical with the SAM E54 family, except that it does not feature an Ethernet peripheral.

It does however feature two CAN peripherals.

Testing procedure

tests/periph/uart
2025-01-07 07:04:37,247 # main(): This is RIOT! (Version: 2025.01-devel-342-gfad857-cpu/same51)
2025-01-07 07:04:37,247 # 
2025-01-07 07:04:37,252 # Manual UART driver test application
2025-01-07 07:04:37,253 # ===================================
2025-01-07 07:04:37,258 # This application is intended for testing additional UART
2025-01-07 07:04:37,264 # interfaces, that might be defined for a board. The 'primary' UART
2025-01-07 07:04:37,270 # interface is tested implicitly, as it is running the shell...
2025-01-07 07:04:37,271 # 
2025-01-07 07:04:37,276 # When receiving data on one of the additional UART interfaces, this
2025-01-07 07:04:37,282 # data will be outputted via STDIO. So the easiest way to test an 
2025-01-07 07:04:37,288 # UART interface, is to simply connect the RX with the TX pin. Then 
2025-01-07 07:04:37,294 # you can send data on that interface and you should see the data 
2025-01-07 07:04:37,295 # being printed to STDOUT
2025-01-07 07:04:37,295 # 
2025-01-07 07:04:37,301 # NOTE: all strings need to be '\n' terminated!
2025-01-07 07:04:37,301 # 
2025-01-07 07:04:37,558 # UARD_DEV(0): test uart_poweron() and uart_poweroff()  ->  [OK]
2025-01-07 07:04:37,559 # 
2025-01-07 07:04:37,559 # UART INFO:
2025-01-07 07:04:37,561 # Available devices:               4
2025-01-07 07:04:37,566 # UART used for STDIO (the shell): UART_DEV(0)
2025-01-07 07:04:37,566 # 

2025-01-07 07:04:38,945 # test 1
2025-01-07 07:04:38,946 # [START]
2025-01-07 07:04:39,077 # [SUCCESS]

2025-01-07 07:05:04,084 # test 2
2025-01-07 07:05:04,085 # [START]
2025-01-07 07:05:04,216 # [SUCCESS]

2025-01-07 07:05:31,107 # test 3
2025-01-07 07:05:31,108 # [START]
2025-01-07 07:05:31,240 # [SUCCESS]
tests/periph/spi
2025-01-07 07:09:39,003 # main(): This is RIOT! (Version: 2025.01-devel-342-gfad857-cpu/same51)
2025-01-07 07:09:39,010 # Manual SPI peripheral driver test (see README.md)
2025-01-07 07:09:39,015 # There are 1 SPI devices configured for your platform.

2025-01-07 07:09:42,588 # init 0 0 0
2025-01-07 07:09:42,591 # Trying to initialize SPI_DEV(0): mode: 0, clk: 0, cs_port: 0, cs_pin: 0
2025-01-07 07:09:42,603 # (if below the program crashes with a failed assertion, then it means the configuration is not supported)
2025-01-07 07:09:42,603 # Success.

2025-01-07 07:09:44,361 # send test
2025-01-07 07:09:44,363 # Sent bytes
2025-01-07 07:09:44,364 #    0    1    2    3 
2025-01-07 07:09:44,366 #   0x74 0x65 0x73 0x74
2025-01-07 07:09:44,367 #     t    e    s    t 
2025-01-07 07:09:44,368 # 
2025-01-07 07:09:44,369 # Received bytes
2025-01-07 07:09:44,370 #    0    1    2    3 
2025-01-07 07:09:44,379 #   0x74 0x65 0x73 0x74
2025-01-07 07:09:44,380 #     t    e    s    t 
2025-01-07 07:09:44,380 # 
tests/periph/i2c

Issues/PRs references

@github-actions github-actions bot added Platform: ARM Platform: This PR/issue effects ARM-based platforms Area: doc Area: Documentation Area: boards Area: Board ports Area: cpu Area: CPU/MCU ports labels Dec 25, 2024
@benpicco benpicco requested a review from maribu December 25, 2024 23:46
Copy link
Member

@dylad dylad left a comment

Choose a reason for hiding this comment

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

It looks good at first glance.
Could you please add this family to cpu/sam0_common/include/vendor/readme.md ? It would be good to know which atpack version you used here and if you had modified any of them.

boards/same51-curiosity-nano/doc.txt Outdated Show resolved Hide resolved
boards/same51-curiosity-nano/doc.txt Outdated Show resolved Hide resolved
@dylad
Copy link
Member

dylad commented Jan 7, 2025

LGTM.
Please squash.

@maribu
Copy link
Member

maribu commented Jan 7, 2025

What about the I2C test? Just forgot to paste the result, or is it an open todo?

My board also arrived now, so I also could give it a spin.

@benpicco
Copy link
Contributor Author

benpicco commented Jan 7, 2025

I don't have a I2C device with me at the moment

Atmel Software Framework (ASF) provides a set of low-level header
files that give access to different hardware peripherals of Atmel's
ICs.

Origin: Atmel SAME51 Series Device Support (1.1.139)
License: Apache-2.0
URL: http://packs.download.atmel.com/Atmel.SAME51_DFP.1.1.139.atpack
cpu/sam0_common/include/vendor/fix_headers.sh
@dylad
Copy link
Member

dylad commented Jan 8, 2025

@maribu Do you want to give I2C a quick try for this board ?
Otherwise I think we can move this forward.

@maribu
Copy link
Member

maribu commented Jan 8, 2025

I tested I2C with an SHT3x first and an BME280 aferwards.

2025-01-08 11:25:13,080 # saul read 2
2025-01-08 11:25:13,081 # [bmx280] _do_measurement: measurement data ready
2025-01-08 11:25:13,093 # Reading from #2 (bme280|SENSE_TEMP)
2025-01-08 11:25:13,093 # Data:	         20.60 °C
> saul read 3
2025-01-08 11:25:15,552 # saul read 3
2025-01-08 11:25:15,559 # [bmx280] _do_measurement: measurement data ready
2025-01-08 11:25:15,560 # Reading from #3 (bme280|SENSE_PRESS)
2025-01-08 11:25:15,564 # Data:	        9961e1 Pa
> saul read 4
2025-01-08 11:25:18,815 # saul read 4
2025-01-08 11:25:18,815 # [bmx280] _do_measurement: measurement data ready
2025-01-08 11:25:18,828 # Reading from #4 (bme280|SENSE_HUM)
2025-01-08 11:25:18,829 # Data:	         51.31 %

Interestingly, I failed to read from the SHT3x unless I set ENABLE_DEBUG to 1 in sht3x.c. That looked a lot like some race condition, but I cannot tell whether this is in the SHT3x driver of the I2C driver. In any case, I think the issue is not related to this PR.

Copy link
Member

@dylad dylad left a comment

Choose a reason for hiding this comment

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

ACK.

@dylad dylad added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Jan 8, 2025
@riot-ci
Copy link

riot-ci commented Jan 8, 2025

Murdock results

✔️ PASSED

bb49638 pkg/wolfssl: add SAME51 to name collision hack

Success Failures Total Runtime
10249 0 10249 19m:32s

Artifacts

@maribu maribu added this pull request to the merge queue Jan 8, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 8, 2025
@dylad
Copy link
Member

dylad commented Jan 8, 2025

CI catches an issue with wolfssl.
We need an extra entry into pkg/wolfssl/include/user_settings.h to add #define _SAME51_AES_COMPONENT_

@github-actions github-actions bot added the Area: pkg Area: External package ports label Jan 8, 2025
@benpicco benpicco enabled auto-merge January 8, 2025 18:23
@benpicco benpicco added this pull request to the merge queue Jan 8, 2025
Merged via the queue into RIOT-OS:master with commit f8b41eb Jan 8, 2025
25 checks passed
@benpicco benpicco deleted the cpu/same51 branch January 9, 2025 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: boards Area: Board ports Area: cpu Area: CPU/MCU ports Area: doc Area: Documentation Area: pkg Area: External package ports CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Platform: ARM Platform: This PR/issue effects ARM-based platforms
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants