rcsim opened a new pull request, #22513:
URL: https://github.com/apache/nuttx/pull/22513
## Summary
* Adds the Silicon Labs EFR32 Series 2 family (Cortex-M33) with the
EFR32MG24B210F1536IM48 part, and its first board, the EFR32xG24 Explorer
Kit (xG24-EK2703A, BRD2703A).
* A new `arch/arm/src/efr32` directory: the existing `efm32` code covers
Series 0/1 only, and the Series 2 CMU, GPIO routing and interrupt map are
different.
* Chip (`arch/arm/efr32`):
* Start-up, NVIC (76 interrupts) and SysTick.
* Clocks: HFXO 39 MHz (CTUNE from the user data page, else
`CONFIG_EFR32_HFXO_CTUNE`) locked by the DPLL to 78 MHz SYSCLK, with
PCLK = HCLK / 2 and one flash wait state.
* GPIO, with pin interrupts on pins 0-11 through the EXTI lines
(`CONFIG_EFR32_GPIO_IRQ`).
* USART0 in asynchronous mode, usable as the console.
* Register definitions written from the EFR32xG24 Reference Manual
(rev. 1.1) and checked against the device SVD.
* Board (`boards/arm/efr32/xg24-ek2703a`):
* Console on USART0 (PA5/PA6), on the virtual COM port of the on-board
J-Link.
* LED0/LED1 (PA4/PA7) as auto LEDs or user LEDs; BTN0/BTN1 (PB2/PB3)
with interrupts.
* `nsh` and `ostest` configurations. `BOARD_LOOPSPERMSEC` was measured
with `calib_udelay` on the board.
* `tools/ci/testlist/arm-other.dat` builds the efr32 boards.
* Documentation: the EFR32 family page and the board page, in their own
commit.
* Not included: the radio, EUSART, I2C, SPI, timers, DMA and low-power
modes.
## Impact
* New or changed feature: YES, a new chip family and board.
* User impact (must users adapt?): NO.
* Build impact: YES, new configurations only (`xg24-ek2703a:nsh`,
`xg24-ek2703a:ostest`), added to the `arm-other` CI list.
* Hardware impact (arch / board / driver): YES, new arch/arm/efr32 and
boards/arm/efr32 only; no existing chip or board is changed.
* Documentation: YES, provided in this PR.
* Security: NO.
* Compatibility: NO.
## Testing
* Build host: Ubuntu 26.04.1 LTS, x86_64 (Intel Core i9-11950H),
arm-none-eabi-gcc 14.2.1 20241119, CMake 4.2.3.
* Target: xG24-EK2703A (EFR32MG24B210F1536IM48, die revision A1), flashed
with Simplicity Commander through the on-board J-Link. Console on the
J-Link virtual COM port, 115200 8N1.
* Builds: `xg24-ek2703a:nsh` and `xg24-ek2703a:ostest` with Make and CMake,
`-Wno-cpp -Werror`; `tools/testbuild.sh` on the new `arm-other.dat` line.
* The `nsh` and `ostest` logs are from the PR head, rebased on
upstream master `06dfc8794e`. The buttons and `calib_udelay` logs are
from the same code before that rebase.
* `sleep 10` took 10.01 s measured on the host.
* Not tested: protected and kernel builds (flat only), other EFR32
Series 2 parts, `CONFIG_ARCH_LEDS`, clang.
Testing logs before change:
```
N/A: new chip and board.
```
Testing logs after change:
`xg24-ek2703a:nsh`, boot after a reset:
```
NuttShell (NSH) NuttX-13.1.1-RC0
nsh>
```
`xg24-ek2703a:nsh` session:
```
nsh> uname -a
NuttX 13.1.1-RC0 a048c8aa95 Nov 27 2026 18:06:43 arm xg24-ek2703a
nsh> free
total used free maxused maxfree nused nfree name
251512 7016 244496 7784 244096 26 2 Umem
nsh> ps
TID PID PPID PRI POLICY TYPE NPX STATE EVENT SIGMASK
STACK USED FILLED COMMAND
0 0 0 0 FIFO Kthread - Ready
0000000000000000 0002016 0000296 14.6% Idle_Task
2 2 0 100 RR Task - Running
0000000000000000 0003016 0001556 51.5% nsh_main
nsh> ls /dev
/dev:
buttons
console
null
ttyS0
userleds
zero
nsh> sleep 10
nsh>
```
`xg24-ek2703a:ostest`:
```
nsh> uname -a
NuttX 13.1.1-RC0 a048c8aa95 Nov 27 2026 18:07:58 arm xg24-ek2703a
nsh> ostest
stdio_test: write fd=1
stdio_test: Standard I/O Check: printf
stdio_test: write fd=2
stdio_test: Standard I/O Check: fprintf to stderr
ostest_main: putenv(Variable1=BadValue3)
ostest_main: setenv(Variable1, GoodValue1, TRUE)
ostest_main: setenv(Variable2, BadValue1, FALSE)
ostest_main: setenv(Variable2, GoodValue2, TRUE)
ostest_main: setenv(Variable3, GoodValue3, FALSE)
[... 1033 lines omitted; the full log is attached ...]
sched_lock: PASSED No pre-emption occurred while scheduler was locked.
sched_lock: Finished
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 3c9f0 3c9f0
ordblks 3 3
mxordblk 35a20 35a20
uordblks 4ea0 4ea0
fordblks 37b50 37b50
Final memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 3c9f0 3c9f0
ordblks 1 3
mxordblk 37c10 35a20
uordblks 4de0 4ea0
fordblks 37c10 37b50
user_main: Exiting
ostest_main: Exiting with status 0
nsh>
```
Buttons, `nsh` with `CONFIG_EXAMPLES_BUTTONS`, pressing BTN1 and BTN0
twice each, twice:
```
nsh> buttons
buttons_main: Starting the button_daemon
buttons_main: button_daemon started
button_daemon: Running
button_daemon: Opening /dev/buttons
button_daemon: Supported BUTTONs 0x03
nsh> BTN1 was pressed
BTN1 was released
BTN1 was pressed
BTN1 was released
BTN0 was pressed
BTN0 was released
BTN0 was pressed
BTN0 was released
BTN1 was pressed
BTN1 was released
BTN1 was pressed
BTN1 was released
BTN0 was pressed
BTN0 was released
BTN0 was pressed
BTN0 was released
```
`calib_udelay` (source of `CONFIG_BOARD_LOOPSPERMSEC=7795`):
```
nsh> calib_udelay
Calibrating timer for main calibration...
Performing main calibration for udelay.This will take approx. 172.800
seconds.
Calibration slope for udelay:
Y = m*X + b, where
X is loop iterations,
Y is time in nanoseconds,
b is base overhead,
m is nanoseconds per loop iteration.
m = 128.29824561 nsec/iter
b = -5489473.68421077 nsec
Correlation coefficient, R² = 1.0000
Without overhead, 0.00779434 iterations per nanosecond and 7794.34
iterations per millisecond.
Recommended setting for CONFIG_BOARD_LOOPSPERMSEC:
CONFIG_BOARD_LOOPSPERMSEC=7795
nsh>
```
## PR verification Self-Check
* [X] This PR introduces only one functional change.
* [X] I have updated all required description fields above.
* [X] My PR adheres to Contributing Guidelines and Documentation.
* [ ] My PR is still work in progress (not ready for review).
* [X] My PR is ready for review and can be safely merged into a codebase.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]