nrf-rs / nrf-hal

A Rust HAL for the nRF family of devices
Apache License 2.0
503 stars 139 forks source link

Radio on nRF52832 #483

Open arnobert opened 1 month ago

arnobert commented 1 month ago

Hello,

I would like to use the radio peripheral on the nRF52 DK board, just like on the nRF52840 dongle, but the lib is not available, yet. Is there any special reason for that?

Thank you!

BartMassey commented 1 month ago

Can Embassy's nrf-softdevice work for you here?

arnobert commented 1 month ago

I am using RTIC and would prefer to use the HAL, just like on the 52840.

BartMassey commented 1 month ago

Sorry, I'm new to this. Perhaps @Dirbaio would be able to help? You might also want to try on #rust-embedded:matrix.org for someone more knowledgeable than I.

In the meantime, can you point me to example code for using nRF Softdevice with embedded-hal on the 52840? I'm curious.

Dirbaio commented 1 month ago

There's examples here, both for nrf52840 and nrf52832.

I am using RTIC and would prefer to use the HAL, just like on the 52840.

both nrf52840-hal and embassy-nrf are HALs, you can use one or the other with RTIC. There's an example for it.

BartMassey commented 1 month ago

@Dirbaio thanks!

@arnobert is there code somewhere for using nRF SoftDevice with nrf52840-hal? I couldn't find any.

arnobert commented 1 month ago

@BartMassey I don't know. I simply used: https://github.com/nrf-rs/nrf-hal/blob/master/nrf-hal-common/src/ieee802154.rs