Introducing an updated Sample set for Xiao nRF54L15 / and NRF CONNECT

Hey makers,
What features do you want to see covered?

The majority of the samples are now tested, and should work with no configuration after copying the board definition to the correct folder, and adding the sample folder to nrf connect as a existing application.

Marked with a test tube = still in testing

Nrf54L15 Zephyr Sample Projects for nrf Connect:

  • :white_check_mark: adc/ - Analog-to-Digital Converter sample
    -:white_check_mark: battery/ - Battery monitoring sample
  • :test_tube: ble/ - Bluetooth Low Energy sample
  • :white_check_mark: blink/ - Basic LED blinking sample
  • :white_check_mark: button/ - Button input sample (working - builds, flashes, and runs correctly)
    :white_check_mark: dmic/ - Digital Microphone sample
    :white_check_mark: dmic-recorder/ - Digital Microphone recorder sample
  • :test_tube: epaper/ - E-paper display sample
  • :test_tube: gps/ - GPS module sample (needs verification, I don’t have a gps module.)
    :white_check_mark: imu/ - Inertial Measurement Unit sample
    :white_check_mark: lowpower/ - Low power consumption sample
    :white_check_mark: pwm/ - Pulse Width Modulation sample
    :white_check_mark: pwm_rgb/ - 3 channel Pulse Width Modulation sample for RGB LED
  • :test_tube: HPF-mspi/ - High Performance Framework MSPI sample (uses CPUFLPR core)
    :white_check_mark: uart/ - UART communication sample

Expansion Base Samples (xiao_expanded/):

  • :white_check_mark: xiao_expanded/attitude_monitor-ncs/ - IMU attitude monitor with OLED display (Tested & working)
  • :white_check_mark: xiao_expanded/sd_card/ - Working with Spi bitbang work-around
  • :white_check_mark: xiao_expanded/buzzer/ - Buzzer control sample for expansion base
  • :white_check_mark: xiao_expanded/grove_relay/ - Expansion base Grove relay control sample (requires expansion base hardware & a grove relay connected on port a0/d0)
  • :white_check_mark: xiao_expanded/oled/ - OLED display sample for expansion base
  • :white_check_mark: xiao_expanded/rtc/ - Real-time clock sample for expansion base
2 Likes

5 of the listed samples are fully tested and working.
I’ll be working on updating this further over the weeknd.

The point of these samples is to be able to load them with as little user configuration required as possible to give people new to the nrf54l15 a working starting point.

To use them:

  1. Install nrf connect, and have it install sdk 3.1.1 & the toolchain for it.
  2. copy the seeed board defs into the zephyr sdk folder
  3. select add application in NRF connect, and select the sample folder for the sample you want
  4. create a build configuration selecting xiao_nrf54l15_nrf54l15_cpuapp & choose “use sysbuild”
  5. leave all board def & prj,conf stuff blank, it’s auto filled by the xiao_ named files in the boards subfolder of each sample.

Copying the seeed board contents of the sdk folder folder:
grab this git repo, either as a zip or with git, then

from inside the repo copy the folder zephyr/boards/arm/*
to the location you installed the 3.1.1 sdk to in the first step, example:
C:\yourSDKpath\3.1.1\zephyr\boards\arm*

1 Like

This is absolutely amazing, thank you for your hard work! This will be really helpful for Makers! :clap:

1 Like

New tested & Updated ADC sample!
Uses the xiao nrf54l15’s onboard user led to show a potentiometer value via the led blink rate. uses an intuitive inverted scale, where more light = more volts (3300ms delay = 0v, no delay = full 3.3v)
I would have used PWM, but the pin the user led is attached to is not hardware pwm capable.

[00:59:30.421,749] <inf> adc_blink_example: ADC Raw = 3761 (3305 mV)    Blink Delay = 25 ms

The majority of the samples in this set have now been tested, and working. I found a work-around for the SD-card reader on the xiao expansion base using the zephyr spi bitbang driver.

The Sd card sample will write testing.txt with the contents “Hello from Xiao nRF54l15” in it to the inserted fat formatted sd card.

I’m not sure why the regular spi driver refuses to initailize with the SDcard reader on the xiao expansion base, but this works so, it’s at least access to sdhc!

I tested the SD card sample and confirmed it works. Thank you.
Since bit-banging is used, the SCK clock is only 450kHz. Can the clock frequency be increased? Is there any possibility of using hardware SPI?

2 Likes

I’m sure it’s possible to get the hardware SPI working, but I’m not sure why it doesn’t work now. It gets really upset during initialization about… I’m not sure. I’ll post over on the Nordic forums and ask.

I think it might have something to do with the mix of p2 and p1 pins requiring the constant latency setting when used in the same device.

You can probably run the bit -Bang at a higher frequency,I just left it at defaults.

*** Booting nRF Connect SDK v3.1.1-e2a97fe2578a ***
*** Using Zephyr OS v4.1.99-ff8f0c579eeb ***
[00:28:01.958,611] main: ========================================
[00:28:01.958,616] main: XIAO nRF54L15 SD Card Sample
[00:28:01.958,620] main: ========================================
[00:28:01.958,624] main: Checking SD card…
[00:28:01.958,633] main: Block count: 0
[00:28:01.958,641] main: Block size: 0 bytes
[00:28:01.958,646] main: Total size: 0 MB
[00:28:01.984,539] sd: Maximum SD clock is under 25MHz, using clock of 24000000Hz
[00:28:02.016,750] main: Filesystem mounted at /SD:
[00:28:02.075,279] main: Created test file: /SD:/test.txt
[00:28:02.075,733] main: SD card unmounted
[00:28:02.075,739] main: ========================================
[00:28:02.075,743] main: Sample completed
[00:28:02.075,748] main: ========================================

I can write data to it, but I can’t retrieve any information from my FAT32 SD card. Is there anything I can try?

Check out today’s update in the SD_CARD_HW folder, I got the hardware spi working with fat32 cards today.

NOTE: this requires using &uart21, the external pins, as the SD card reader appears to be wired to &spi20

I’m using a rp2040 xiao to read the console

Booting nRF Connect SDK v3.1.1-e2a97fe2578a 
 Using Zephyr OS v4.1.99-ff8f0c579eeb 
[00:35:06.516,444] <inf> main: ========================================
[00:35:06.516,448] <inf> main: XIAO nRF54L15 SD Card + ZMS Sample
[00:35:06.516,452] <inf> main: ========================================
[00:35:06.516,456] <inf> main: Initializing SD card...
[00:35:06.668,538] <inf> sd: Maximum SD clock is under 25MHz, using clock of 24000000Hz
[00:35:06.669,499] <inf> main: SD Card - Block count: 7741440
[00:35:06.669,508] <inf> main: SD Card - Sector size: 512 bytes
[00:35:06.669,512] <inf> main: SD Card - Total size: 3780 MB
[00:35:06.669,628] <inf> main: Mounting SD card filesystem...
[00:35:06.821,309] <inf> sd: Maximum SD clock is under 25MHz, using clock of 24000000Hz
[00:35:06.825,899] <inf> main: SD card mounted at /SD:
[00:35:06.825,905] <inf> main: Testing unmount/remount...
[00:35:06.977,666] <inf> sd: Maximum SD clock is under 25MHz, using clock of 24000000Hz
[00:35:06.982,246] <inf> main: Unmount/remount test successful

Listing dir /SD: ...
[DIR ] System Volume Information
[00:35:06.983,426] <inf> main: Creating sample files and directories...
[00:35:06.983,448] <inf> main: Creating some dir entries in /SD:
[00:35:07.021,221] <inf> main: Sample entries created, listing again:

Listing dir /SD: ...
[DIR ] System Volume Information
[FILE] some.dat (size = 0)
[DIR ] some
[00:35:07.046,995] <inf> main: Created test file: /SD:/test.txt
[00:35:07.047,099] <inf> main: SD card unmounted
[00:35:07.047,109] <inf> main: ========================================
[00:35:07.047,113] <inf> main: Sample completed. System will idle.
[00:35:07.047,117] <inf> main: ========================================

here’s how I’m reading uart21:

2 Likes

SCK frequency confirmed.
Initialization is at 400kHz, data transfer is at 8MHz. It would be nice if you could change it to 24MHz.

Monitoring via FTDI is a bit of a hassle.

We can try binding a soft UART driver to UART 20’s pins. That should give us fast SD, and a less annoying console.

Anyway, it’s great that the SD card works with HW_SPI now. Thank you!

By the way,
I’m unsure whether to post issues or information on the forum or on GitHub.

I’ll see it here first, but seeed will work on it if you post issues to git hub. I actually emailed a Nordic engineer for help on this one! And helpful they were indeed.

I’m confused about which CONFIG entries in prj.conf should be set to =n to prevent hangs when running on battery. I don’t fully understand the minimum CONFIG required to run the SD card.

CONFIG_SOC_NRF_FORCE_CONSTLAT=y
and
CONFIG_SPI=y

are the critical ones.
I updated the repo a few minutes ago with a bunch of unnecessary ones commented out.

I’m testing the latest sd_card_hw. It works fine.
SCK was 400kHz during initialization and 8MHz during data transfer. Unfortunately, it doesn’t work at 24MHz. Is it supposed to operate at 24MHz?

EDIT:
The latest sd_card for PlatformIO at the link below worked as usual with the serial monitor via USB. However, the SCK was 8MHz.
GitHub - Seeed-Studio/platform-seeedboards: Seeed Boards: development platform for PlatformIO

According to the datasheet, I understand that for the SPIM20, the maximum SCK frequency is 8MHz.
For the SPIM00, I also found that SCK can only be divided down to 1 MHz.

1 Like