Closed plaes closed 9 months ago
yep it's RNG. If you check the ASM it's writing to 0x4000d004 which is a RNG reg.
You have to use this instead of RNG directly https://docs.rs/nrf-softdevice/latest/nrf_softdevice/fn.random_bytes.html
yep it's RNG. If you check the ASM it's writing to 0x4000d004 which is a RNG reg.
You have to use this instead of RNG directly https://docs.rs/nrf-softdevice/latest/nrf_softdevice/fn.random_bytes.html
Thanks, I'll cook up a PR for some README improvements.
@plaes Also note that LoRa and the softdevice both need exclusive access to the radio peripheral, so there's really no way to use them together in the same firmware.
I'm currently trying to set up an application with nrf52832 which uses both softdevice and LoRa and there seems to be some kind of timer-related clash happening due to "shared" peripherals.
Softdevice memory access violation. Your program accessed registers for a peripheral reserved to the softdevice. PC=2a644 PREGION=8192
Relevant code in my application seems to be setting up the "embassy timer": https://github.com/lora-rs/lora-rs/blob/6895fcd227b44cf5359801d96527f2fe4b1b432e/lorawan-device/src/async_device/embassy_time.rs#L11-L14
[Edit:] Could it be RNG that is the issue?