renode
renode copied to clipboard
BLE mesh network using Zephyr framework on the NRF52840
Description
I want to create a BLE mesh network on NRF52840, for the first step i followed the Nordicsemi HR example link this works as described
The next step i tried to run the mesh_demo or other BLE sample example from zephry but i get the following error
Error behaviour
UART0
Initializing...
Unicast address: 0x0b0c
Bluetooth init failed (err -33)
Renode log
08:49:50.1127 [INFO] Loaded monitor commands from: /home/csir/renode/renode/scripts/monitor.py
08:49:55.3417 [INFO] Including script: /home/csir/renode/renode/scripts/multi-node/BLE_test_mesh2.resc
08:49:55.6404 [INFO] System bus created.
08:49:56.4221 [INFO] sysbus: Loaded SVD: /tmp/renode-110622/b6b74157-d005-4579-a31e-e5298c8ae0b1.tmp. Name: nrf52840. Description: nRF52840 reference description for radio MCU with ARM 32-bit Cortex-M4 Microcontroller .
08:49:56.5028 [INFO] sysbus: Loading segment of 105008 bytes length at 0x0.
08:49:56.5139 [INFO] sysbus: Loading segment of 2376 bytes length at 0x19A30.
08:49:56.5140 [INFO] sysbus: Loading segment of 22111 bytes length at 0x20000948.
08:49:58.3141 [INFO] cpu: Guessing VectorTableOffset value to be 0x0.
08:49:58.3176 [INFO] cpu: Setting initial values: PC = 0x2599, SP = 0x20004280.
08:49:58.3192 [INFO] machine-0: Machine started.
08:49:58.3731 [WARNING] sysbus: [cpu: 0xEF04] (tag: 'FICR') ReadDoubleWord from non existing peripheral at 0x10000130, returning 0x0.
08:49:58.3739 [WARNING] sysbus: [cpu: 0xEED0] (tag: 'FICR') ReadDoubleWord from non existing peripheral at 0x10000130, returning 0x0. (4)
08:49:58.3740 [WARNING] sysbus: [cpu: 0xF000] (tag: 'FICR') ReadDoubleWord from non existing peripheral at 0x10000130, returning 0x0.
08:49:58.3740 [WARNING] sysbus: [cpu: 0xF042] (tag: 'PSELRESET') ReadDoubleWord from non existing peripheral at 0x10001200, returning 0x0.
08:49:58.3744 [WARNING] sysbus: [cpu: 0xF04E] ReadDoubleWord from non existing peripheral at 0x10001204.
08:49:58.3826 [WARNING] nvic: Unhandled write to offset 0xD28, value 0xFFFFFFFF.
08:49:58.3827 [WARNING] nvic: Unhandled write to offset 0xD2C, value 0xFFFFFFFF.
08:49:58.3828 [WARNING] nvic: Unhandled write to offset 0xD94, value 0x0.
08:49:58.3828 [WARNING] nvic: Unhandled write to offset 0xD98, value 0x0.
08:49:58.3828 [WARNING] nvic: Unhandled write to offset 0xD9C, value 0x10.
08:49:58.3829 [WARNING] nvic: Unhandled write to offset 0xDA0, value 0x2020027.
08:49:58.3829 [WARNING] nvic: Unhandled write to offset 0xD98, value 0x1.
08:49:58.3829 [WARNING] nvic: Unhandled write to offset 0xD9C, value 0x20000011.
08:49:58.3830 [WARNING] nvic: Unhandled write to offset 0xDA0, value 0x110B0023.
08:49:58.3830 [WARNING] nvic: Unhandled write to offset 0xD94, value 0x5.
08:49:58.3835 [WARNING] sysbus: Write of value 0x1 to an unimplemented register NVMC:ICACHECNF (0x4001E540) generated from SVD.
08:49:58.3842 [WARNING] clock: Unhandled write to offset 0x578, value 0x1.
08:49:58.3842 [WARNING] sysbus: [cpu: 0x27A2] (tag: 'FICR') ReadDoubleWord from non existing peripheral at 0x10000130, returning 0x0.
08:49:58.3843 [WARNING] clock: Unhandled write to offset 0x580, value 0x1.
08:49:58.3935 [WARNING] rng: Unhandled write to offset 0x504. Unhandled bits: [0] when writing value 0x1. Tags: DERCEN (0x1).
08:49:58.3954 [WARNING] uart1: Unhandled write to offset 0x514. Unhandled bits: [1-4, 6-31] when writing value 0x21. Tags: PIN (0x1E), RESERVED (0x1FFFFFF), CONNECT (0x1).
08:49:58.3989 [WARNING] uart1: Unhandled write to offset 0x50C. Unhandled bits: [0, 2-4, 6-31] when writing value 0x22. Tags: PIN (0x1D), RESERVED (0x1FFFFFF), CONNECT (0x1).
08:49:58.3992 [WARNING] gpio1: Trying to write pin #2 that is not configured as output
08:49:58.4040 [ERROR] ppi: Failed to register PPI from 0x40028120 for channel 19
08:49:58.4060 [WARNING] uart0: Unhandled write to offset 0x50C. Unhandled bits: [0, 3-31] when writing value 0x6. Tags: PIN (0x19), PORT (0x1), RESERVED (0x1FFFFFF), CONNECT (0x1).
08:49:58.4061 [WARNING] gpio0: Trying to write pin #6 that is not configured as output
08:49:58.4061 [WARNING] uart0: Unhandled write to offset 0x508. Unhandled bits: [1, 3-31] when writing value 0x5. Tags: PIN (0x1A), PORT (0x1), RESERVED (0x1FFFFFF), CONNECT (0x1).
08:49:58.4062 [WARNING] gpio0: Trying to write pin #5 that is not configured as output
08:49:58.4062 [WARNING] uart0: Unhandled write to offset 0x514. Unhandled bits: [0-2, 4-31] when writing value 0x8. Tags: PIN (0x17), PORT (0x1), RESERVED (0x1FFFFFF), CONNECT (0x1).
08:49:58.4063 [WARNING] uart0: Unhandled write to offset 0x510. Unhandled bits: [3-31] when writing value 0x7. Tags: PIN (0x18), PORT (0x1), RESERVED (0x1FFFFFF), CONNECT (0x1).
08:49:58.4063 [ERROR] ppi: Failed to register PPI from 0x40002120 for channel 18
08:49:58.4069 [WARNING] rtc1: Unhandled write to offset 0x304. Unhandled bits: [1] when writing value 0x2. Tags: OVRFLW (0x1).
08:49:58.4106 [WARNING] clock: Unhandled read from offset 0x414.
08:49:58.4127 [WARNING] nvic: Unhandled write to offset 0xD98, value 0x2.
08:49:58.4128 [WARNING] nvic: Unhandled write to offset 0xD9C, value 0x20004092.
08:49:58.4128 [WARNING] nvic: Unhandled write to offset 0xDA0, value 0x150B000B.
08:49:58.4129 [WARNING] nvic: Unhandled write to offset 0xD98, value 0x3.
08:49:58.4129 [WARNING] nvic: Unhandled write to offset 0xDA0, value 0x0.
08:49:58.4129 [WARNING] nvic: Unhandled write to offset 0xD98, value 0x4.
08:49:58.4130 [WARNING] nvic: Unhandled write to offset 0xDA0, value 0x0.
08:49:58.4130 [WARNING] nvic: Unhandled write to offset 0xD98, value 0x5.
08:49:58.4130 [WARNING] nvic: Unhandled write to offset 0xDA0, value 0x0.
08:49:58.4131 [WARNING] nvic: Unhandled write to offset 0xD98, value 0x6.
08:49:58.4131 [WARNING] nvic: Unhandled write to offset 0xDA0, value 0x0.
08:49:58.4132 [WARNING] nvic: Unhandled write to offset 0xD98, value 0x7.
08:49:58.4132 [WARNING] nvic: Unhandled write to offset 0xDA0, value 0x0.
08:49:58.4163 [INFO] Pseudorandom Number Generator was created with seed: 1546243080
08:49:58.4207 [WARNING] nvic: Unhandled write to offset 0xD98, value 0x2.
08:49:58.4208 [WARNING] nvic: Unhandled write to offset 0xD9C, value 0x200042D2.
08:49:58.4208 [WARNING] nvic: Unhandled write to offset 0xDA0, value 0x150B000B.
08:49:58.4209 [WARNING] nvic: Unhandled write to offset 0xD98, value 0x3.
08:49:58.4209 [WARNING] nvic: Unhandled write to offset 0xDA0, value 0x0.
08:49:58.4209 [WARNING] nvic: Unhandled write to offset 0xD98, value 0x4.
08:49:58.4210 [WARNING] nvic: Unhandled write to offset 0xDA0, value 0x0.
08:49:58.4210 [WARNING] nvic: Unhandled write to offset 0xD98, value 0x5.
08:49:58.4210 [WARNING] nvic: Unhandled write to offset 0xDA0, value 0x0.
08:49:58.4211 [WARNING] nvic: Unhandled write to offset 0xD98, value 0x6.
08:49:58.4211 [WARNING] nvic: Unhandled write to offset 0xDA0, value 0x0.
08:49:58.4211 [WARNING] nvic: Unhandled write to offset 0xD98, value 0x7.
08:49:58.4212 [WARNING] nvic: Unhandled write to offset 0xDA0, value 0x0.
08:49:58.4212 [WARNING] nvic: Unhandled write to offset 0xD98, value 0x2.
08:49:58.4213 [WARNING] nvic: Unhandled write to offset 0xD9C, value 0x20004092.
08:49:58.4213 [WARNING] nvic: Unhandled write to offset 0xDA0, value 0x150B000B.
08:49:58.4213 [WARNING] nvic: Unhandled write to offset 0xD98, value 0x3.
08:49:58.4214 [WARNING] nvic: Unhandled write to offset 0xDA0, value 0x0.
08:49:58.4214 [WARNING] nvic: Unhandled write to offset 0xD98, value 0x4.
08:49:58.4214 [WARNING] nvic: Unhandled write to offset 0xDA0, value 0x0.
08:49:58.4215 [WARNING] nvic: Unhandled write to offset 0xD98, value 0x5.
08:49:58.4215 [WARNING] nvic: Unhandled write to offset 0xDA0, value 0x0.
08:49:58.4215 [WARNING] nvic: Unhandled write to offset 0xD98, value 0x6.
08:49:58.4216 [WARNING] nvic: Unhandled write to offset 0xDA0, value 0x0.
08:49:58.4216 [WARNING] nvic: Unhandled write to offset 0xD98, value 0x7.
08:49:58.4216 [WARNING] nvic: Unhandled write to offset 0xDA0, value 0x0.
08:49:58.4217 [WARNING] sysbus: [cpu: 0x1751A] (tag: 'FICR') ReadDoubleWord from non existing peripheral at 0x10000014, returning 0x0.
08:49:58.4217 [WARNING] sysbus: [cpu: 0x17512] (tag: 'FICR') ReadDoubleWord from non existing peripheral at 0x10000010, returning 0x0.
08:49:58.4218 [WARNING] sysbus: Write of value 0x13 to an unimplemented register QSPI:SCK (0x40029524) generated from SVD.
08:49:58.4218 [WARNING] sysbus: Write of value 0x14 to an unimplemented register QSPI:IO0 (0x40029530) generated from SVD.
08:49:58.4219 [WARNING] sysbus: Write of value 0x15 to an unimplemented register QSPI:IO1 (0x40029534) generated from SVD.
08:49:58.4219 [WARNING] sysbus: Write of value 0x16 to an unimplemented register QSPI:IO2 (0x40029538) generated from SVD.
08:49:58.4219 [WARNING] sysbus: Write of value 0x17 to an unimplemented register QSPI:IO3 (0x4002953C) generated from SVD.
08:49:58.4220 [WARNING] sysbus: Write of value 0x11 to an unimplemented register QSPI:CSN (0x40029528) generated from SVD.
08:49:58.4220 [WARNING] gpio0: Trying to write pin #17 that is not configured as output
08:49:58.4220 [WARNING] sysbus: Write of value 0x0 to an unimplemented register QSPI:XIPOFFSET (0x40029540) generated from SVD.
08:49:58.4221 [WARNING] sysbus: Write of value 0x1C to an unimplemented register QSPI:IFCONFIG0 (0x40029544) generated from SVD.
08:49:58.4221 [WARNING] sysbus: Read from an unimplemented register QSPI:IFCONFIG1 (0x40029600), returning a value from SVD: 0x40480.
08:49:58.4222 [WARNING] sysbus: Write of value 0x30040400 to an unimplemented register QSPI:IFCONFIG1 (0x40029600) generated from SVD.
08:49:58.4222 [WARNING] sysbus: Write of value 0x1 to an unimplemented register QSPI:INTENCLR (0x40029308) generated from SVD.
08:49:58.4222 [WARNING] sysbus: Write of value 0x1 to an unimplemented register QSPI:ENABLE (0x40029500) generated from SVD.
08:49:58.4223 [WARNING] sysbus: Write of value 0x0 to an unimplemented register QSPI:EVENTS_READY (0x40029100) generated from SVD.
08:49:58.4223 [WARNING] sysbus: Write of value 0x1 to an unimplemented register QSPI:TASKS_ACTIVATE (0x40029000) generated from SVD.
08:49:58.4278 [WARNING] sysbus: Read from an unimplemented register QSPI:EVENTS_READY (0x40029100), returning a value from SVD: 0x0. (100)
08:49:58.4344 [WARNING] nvic: Unhandled write to offset 0xD98, value 0x2.
08:49:58.4345 [WARNING] nvic: Unhandled write to offset 0xD9C, value 0x20004092.
08:49:58.4346 [WARNING] nvic: Unhandled write to offset 0xDA0, value 0x150B000B.
08:49:58.4346 [WARNING] nvic: Unhandled write to offset 0xD98, value 0x3.
08:49:58.4346 [WARNING] nvic: Unhandled write to offset 0xDA0, value 0x0.
08:49:58.4347 [WARNING] nvic: Unhandled write to offset 0xD98, value 0x4.
08:49:58.4347 [WARNING] nvic: Unhandled write to offset 0xDA0, value 0x0.
08:49:58.4348 [WARNING] nvic: Unhandled write to offset 0xD98, value 0x5.
08:49:58.4348 [WARNING] nvic: Unhandled write to offset 0xDA0, value 0x0.
08:49:58.4349 [WARNING] nvic: Unhandled write to offset 0xD98, value 0x6.
08:49:58.4349 [WARNING] nvic: Unhandled write to offset 0xDA0, value 0x0.
08:49:58.4350 [WARNING] nvic: Unhandled write to offset 0xD98, value 0x7.
08:49:58.4350 [WARNING] nvic: Unhandled write to offset 0xDA0, value 0x0.
08:49:58.4413 [WARNING] nvic: Unhandled write to offset 0xD98, value 0x2.
08:49:58.4413 [WARNING] nvic: Unhandled write to offset 0xD9C, value 0x20003F12.
08:49:58.4414 [WARNING] nvic: Unhandled write to offset 0xDA0, value 0x150B000B.
08:49:58.4414 [WARNING] nvic: Unhandled write to offset 0xD98, value 0x3.
08:49:58.4414 [WARNING] nvic: Unhandled write to offset 0xDA0, value 0x0.
08:49:58.4415 [WARNING] nvic: Unhandled write to offset 0xD98, value 0x4.
08:49:58.4415 [WARNING] nvic: Unhandled write to offset 0xDA0, value 0x0.
08:49:58.4415 [WARNING] nvic: Unhandled write to offset 0xD98, value 0x5.
08:49:58.4416 [WARNING] nvic: Unhandled write to offset 0xDA0, value 0x0.
08:49:58.4416 [WARNING] nvic: Unhandled write to offset 0xD98, value 0x6.
08:49:58.4417 [WARNING] nvic: Unhandled write to offset 0xDA0, value 0x0.
08:49:58.4417 [WARNING] nvic: Unhandled write to offset 0xD98, value 0x7.
08:49:58.4418 [WARNING] nvic: Unhandled write to offset 0xDA0, value 0x0.
comparing logs between working HR BLE and the mesh_demo example are the non existing peripheral and the unimplemented register shown below
08:49:58.4217 [WARNING] sysbus: [cpu: 0x1751A] (tag: 'FICR') ReadDoubleWord from non existing peripheral at 0x10000014, returning 0x0.
08:49:58.4217 [WARNING] sysbus: [cpu: 0x17512] (tag: 'FICR') ReadDoubleWord from non existing peripheral at 0x10000010, returning 0x0.
08:49:58.4220 [WARNING] sysbus: Write of value 0x0 to an unimplemented register QSPI:XIPOFFSET (0x40029540) generated from SVD.
08:49:58.4221 [WARNING] sysbus: Write of value 0x1C to an unimplemented register QSPI:IFCONFIG0 (0x40029544) generated from SVD.
08:49:58.4221 [WARNING] sysbus: Read from an unimplemented register QSPI:IFCONFIG1 (0x40029600), returning a value from SVD: 0x40480.
08:49:58.4222 [WARNING] sysbus: Write of value 0x30040400 to an unimplemented register QSPI:IFCONFIG1 (0x40029600) generated from SVD.
08:49:58.4222 [WARNING] sysbus: Write of value 0x1 to an unimplemented register QSPI:INTENCLR (0x40029308) generated from SVD.
08:49:58.4222 [WARNING] sysbus: Write of value 0x1 to an unimplemented register QSPI:ENABLE (0x40029500) generated from SVD.
08:49:58.4223 [WARNING] sysbus: Write of value 0x0 to an unimplemented register QSPI:EVENTS_READY (0x40029100) generated from SVD.
08:49:58.4223 [WARNING] sysbus: Write of value 0x1 to an unimplemented register QSPI:TASKS_ACTIVATE (0x40029000) generated from SVD.
08:49:58.4278 [WARNING] sysbus: Read from an unimplemented register QSPI:EVENTS_READY (0x40029100), returning a value from SVD: 0x0. (100)
how to add these peripheral and the unimplemented register
How to reproduce?
build the following MESH_DEMO project Zephyr mesh_demo link
use the following .resc file ((make sure you point the $bin to the binary file you built above))
using sysbus
emulation CreateBLEMedium "wireless"
$name=server
$bin=@/home/csir/renode/builds/mesh/zephyr/zephyr.elf
i @scripts/single-node/nrf52840.resc
connector Connect sysbus.radio wireless
emulation SetGlobalQuantum "0.00001"
emulation LogBLETraffic
Environment
- OS ubuntu 20 LTE
- Renode version , 1.13.0.16695 (a0e719dc-202207181423)
Do you plan to address this issue and file a PR?
I need support for this