newAM / stm32wl-lightswitch-demo

Demo project for the stm32wlxx-hal
MIT License
7 stars 2 forks source link

stm32wlxx_hal::subghz::wakeup loops forever on NUCLEO-WL55JC1 #124

Open rickpayne opened 3 months ago

rickpayne commented 3 months ago

I'm attempting to get this nice demo running on my NUCLEO-WL55JC1 boards. I've made the following change to the code to account for regulations here....

diff --git a/shared/src/lib.rs b/shared/src/lib.rs
index 302ac2d..de3e965 100644
--- a/shared/src/lib.rs
+++ b/shared/src/lib.rs
@@ -23,7 +23,7 @@ pub const TIMEOUT_100_MILLIS: Timeout = Timeout::from_duration_sat(Duration::fro

 pub const PREAMBLE_LEN: u16 = 256;

-pub const RF_FREQ: RfFreq = RfFreq::F433;
+pub const RF_FREQ: RfFreq = RfFreq::F915;
 pub const IMG_CAL: CalibrateImage = CalibrateImage::ISM_430_440;

 pub const SYNC_WORD: [u8; 8] = [0x79, 0x80, 0x0C, 0xC0, 0x29, 0x95, 0xF8, 0x4A];

When I start the client, it gets stuck in stm32wlxx_hal::subghz::wakeup, with this backtrace:

(gdb) bt
#0  stm32wlxx_hal::subghz::wakeup () at /Users/rickp/.cargo/registry/src/index.crates.io-6f17d22bba15001f/stm32wlxx-hal-0.6.1/src/subghz/mod.rs:151
#1  stm32wlxx_hal::subghz::SubGhz<stm32wlxx_hal::dma::Dma1Ch1, stm32wlxx_hal::dma::Dma1Ch2>::new_with_dma_no_reset<stm32wlxx_hal::dma::Dma1Ch1, stm32wlxx_hal::dma::Dma1Ch2> (
    rcc=0x2000ffd7, miso_dma=..., mosi_dma=...) at /Users/rickp/.cargo/registry/src/index.crates.io-6f17d22bba15001f/stm32wlxx-hal-0.6.1/src/subghz/mod.rs:590
#2  stm32wlxx_hal::subghz::SubGhz<stm32wlxx_hal::dma::Dma1Ch1, stm32wlxx_hal::dma::Dma1Ch2>::new_with_dma<stm32wlxx_hal::dma::Dma1Ch1, stm32wlxx_hal::dma::Dma1Ch2> (rcc=0x2000ffd7, 
    miso_dma=..., mosi_dma=...) at /Users/rickp/.cargo/registry/src/index.crates.io-6f17d22bba15001f/stm32wlxx-hal-0.6.1/src/subghz/mod.rs:555
#3  client::app::init () at client/src/main.rs:214
#4  client::app::rtic_ext::main::{closure#0} () at client/src/main.rs:143
#5  client::app::rtic_ext::main::__rtic_init_resources<client::app::rtic_ext::main::{closure_env#0}> (f=...) at client/src/main.rs:143
#6  0x08002130 in client::app::rtic_ext::main () at client/src/main.rs:143

Any ideas?

rickpayne commented 3 months ago

I will note that occasionally I can get it to go further (I think when its had a erase-then-powercycle), and then I hit this:

Program received signal SIGTRAP, Trace/breakpoint trap.
0x080065c0 in HardFaultTrampoline ()
(gdb) bt
#0  0x080065c0 in HardFaultTrampoline ()
#1  <signal handler called>
#2  lib::inline::__udf () at asm/inline.rs:181
#3  lib::__udf () at asm/lib.rs:51
#4  0x0800258e in cortex_m::asm::udf () at /Users/rickp/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cortex-m-0.7.7/src/asm.rs:43
#5  panic_probe::hard_fault () at src/lib.rs:86
#6  0x08002576 in panic_probe::imp::panic (info=0x2000fe34) at src/lib.rs:54
#7  0x08005142 in core::panicking::panic_fmt () at library/core/src/panicking.rs:72
#8  0x080051a8 in core::panicking::panic_display<&str> () at library/core/src/panicking.rs:196
#9  core::panicking::panic_explicit () at library/core/src/panicking.rs:179
#10 0x08004fb8 in defmt::default_panic::panic_cold_explicit () at /rustc/aedd173a2c086e558c2b66d3743b344f977621a7/library/core/src/panic.rs:87
#11 0x08004f90 in defmt::default_panic () at src/lib.rs:368
#12 0x080003d0 in defmt::export::panic () at /Users/rickp/.cargo/registry/src/index.crates.io-6f17d22bba15001f/defmt-0.3.6/src/export/mod.rs:133
#13 stm32wlxx_hal::subghz::SubGhz<stm32wlxx_hal::dma::Dma1Ch1, stm32wlxx_hal::dma::Dma1Ch2>::poll_not_busy<stm32wlxx_hal::dma::Dma1Ch1, stm32wlxx_hal::dma::Dma1Ch2> (
    self=<optimized out>) at /Users/rickp/.cargo/registry/src/index.crates.io-6f17d22bba15001f/stm32wlxx-hal-0.6.1/src/fmt.rs:102
#14 0x0800066c in stm32wlxx_hal::subghz::SubGhz<stm32wlxx_hal::dma::Dma1Ch1, stm32wlxx_hal::dma::Dma1Ch2>::read<stm32wlxx_hal::dma::Dma1Ch1, stm32wlxx_hal::dma::Dma1Ch2> (
    self=<optimized out>, opcode=<optimized out>, data=...) at /Users/rickp/.cargo/registry/src/index.crates.io-6f17d22bba15001f/stm32wlxx-hal-0.6.1/src/subghz/mod.rs:427
#15 0x08001136 in stm32wlxx_hal::subghz::SubGhz<stm32wlxx_hal::dma::Dma1Ch1, stm32wlxx_hal::dma::Dma1Ch2>::read_n<stm32wlxx_hal::dma::Dma1Ch1, stm32wlxx_hal::dma::Dma1Ch2, 3> (
    opcode=stm32wlxx_hal::subghz::OpCode::GetIrqStatus, self=<optimized out>)
    at /Users/rickp/.cargo/registry/src/index.crates.io-6f17d22bba15001f/stm32wlxx-hal-0.6.1/src/subghz/mod.rs:451
#16 stm32wlxx_hal::subghz::SubGhz<stm32wlxx_hal::dma::Dma1Ch1, stm32wlxx_hal::dma::Dma1Ch2>::irq_status<stm32wlxx_hal::dma::Dma1Ch1, stm32wlxx_hal::dma::Dma1Ch2> (self=<optimized out>)
    at /Users/rickp/.cargo/registry/src/index.crates.io-6f17d22bba15001f/stm32wlxx-hal-0.6.1/src/subghz/mod.rs:1233
#17 client::locked_radio (rtc=0x20000260 <client::app::__rtic_internal_shared_resource_time_sync_nonce>, aes=0x20000254 <client::app::__rtic_internal_shared_resource_aes>, 
    lptim1=0x20000258 <client::app::__rtic_internal_shared_resource_lptim1>, time_sync_nonce=0x20000260 <client::app::__rtic_internal_shared_resource_time_sync_nonce>, 
    buf=0x20000140 <client::app::__rtic_internal_local_radio_buf>, sg=<optimized out>, rfs=<optimized out>, time_sync_requested=<optimized out>) at client/src/main.rs:59
#18 client::app::radio::{closure#0} (rtc=0x20000260 <client::app::__rtic_internal_shared_resource_time_sync_nonce>, aes=0x20000254 <client::app::__rtic_internal_shared_resource_aes>, 
    lptim1=0x20000258 <client::app::__rtic_internal_shared_resource_lptim1>, time_sync_nonce=0x20000260 <client::app::__rtic_internal_shared_resource_time_sync_nonce>, 
    sg=<optimized out>, rfs=<optimized out>, time_sync_requested=<optimized out>) at client/src/main.rs:478
#19 rtic_core::prelude::{impl#6}::lock::{closure#0}::{closure#0}::{closure#0}::{closure#0}::{closure#0}::{closure#0}::{closure#0}<client::app::shared_resources::sg_that_needs_to_be_locked, client::app::shared_resources::rfs_that_needs_to_be_locked, client::app::shared_resources::rtc_that_needs_to_be_locked, client::app::shared_resources::aes_that_needs_to_be_locked, client::app::shared_resources::lptim1_that_needs_to_be_locked, client::app::shared_resources::time_sync_nonce_that_needs_to_be_locked, client::app::shared_resources::time_sync_requested_that_needs_to_be_locked, (), client::app::radio::{closure_env#0}> (T7=0x20000264 <client::app::__rtic_internal_shared_resource_time_sync_requested>)
    at /Users/rickp/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rtic-core-1.0.0/src/lib.rs:173
#20 0x08001066 in rtic::export::lock<bool, (), 0, rtic_core::prelude::{impl#6}::lock::{closure#0}::{closure#0}::{closure#0}::{closure#0}::{closure#0}::{closure#0}::{closure_env#0}<client::app::shared_resources::sg_that_needs_to_be_locked, client::app::shared_resources::rfs_that_needs_to_be_locked, client::app::shared_resources::rtc_that_needs_to_be_locked, client::app::shared_resources::aes_that_needs_to_be_locked, client::app::shared_resources::lptim1_that_needs_to_be_locked, client::app::shared_resources::time_sync_nonce_that_needs_to_be_locked, client::app::shared_resources::time_sync_requested_that_needs_to_be_locked, (), client::app::radio::{closure_env#0}>> (priority=0x2000ff97, ceiling=1, nvic_prio_bits=4, f=..., 
    ptr=<optimized out>, _mask=<optimized out>) at /Users/rickp/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cortex-m-rtic-1.1.4/src/export.rs:235
#21 client::app::{impl#15}::lock<(), rtic_core::prelude::{impl#6}::lock::{closure#0}::{closure#0}::{closure#0}::{closure#0}::{closure#0}::{closure#0}::{closure_env#0}<client::app::shared_resources::sg_that_needs_to_be_locked, client::app::shared_resources::rfs_that_needs_to_be_locked, client::app::shared_resources::rtc_that_needs_to_be_locked, client::app::shared_resources::aes_that_needs_to_be_locked, client::app::shared_resources::lptim1_that_needs_to_be_locked, client::app::shared_resources::time_sync_nonce_that_needs_to_be_locked, client::app::shared_resources::time_sync_requested_that_needs_to_be_locked, (), client::app::radio::{closure_env#0}>> (f=..., self=<optimized out>) at client/src/main.rs:143
#22 rtic_core::prelude::{impl#6}::lock::{closure#0}::{closure#0}::{closure#0}::{closure#0}::{closure#0}::{closure#0}<client::app::shared_resources::sg_that_needs_to_be_locked, client::app::shared_resources::rfs_that_needs_to_be_locked, client::app::shared_resources::rtc_that_needs_to_be_locked, client::app::shared_resources::aes_that_needs_to_be_locked, client::app::shared_resources::lptim1_that_needs_to_be_locked, client::app::shared_resources::time_sync_nonce_that_needs_to_be_locked, client::app::shared_resources::time_sync_requested_that_needs_to_be_locked, (), client::app::radio::{closure_env#0}> (T6=<optimized out>) at /Users/rickp/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rtic-core-1.0.0/src/lib.rs:129
#23 rtic::export::lock<u32, (), 0, rtic_core::prelude::{impl#6}::lock::{closure#0}::{closure#0}::{closure#0}::{closure#0}::{closure#0}::{closure_env#0}<client::app::shared_resources::sg_that_needs_to_be_locked, client::app::shared_resources::rfs_that_needs_to_be_locked, client::app::shared_resources::rtc_that_needs_to_be_locked, client::app::shared_resources::aes_that_needs_to_be_locked, client::app::shared_resources::lptim1_that_needs_to_be_locked, client::app::shared_resources::time_sync_nonce_that_needs_to_be_locked, client::app::shared_resources::time_sync_requested_that_needs_to_be_locked, (), client::app::radio::{closure_env#0}>> (priority=<optimized out>, ceiling=1, nvic_prio_bits=4, f=..., ptr=<optimized out>, 
    _mask=<optimized out>) at /Users/rickp/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cortex-m-rtic-1.1.4/src/export.rs:235
#24 client::app::{impl#14}::lock<(), rtic_core::prelude::{impl#6}::lock::{closure#0}::{closure#0}::{closure#0}::{closure#0}::{closure#0}::{closure_env#0}<client::app::shared_resources::sg_that_needs_to_be_locked, client::app::shared_resources::rfs_that_needs_to_be_locked, client::app::shared_resources::rtc_that_needs_to_be_locked, client::app::shared_resources::aes_that_needs_to_be_locked, client::app::shared_resources::lptim1_that_needs_to_be_locked, client::app::shared_resources::time_sync_nonce_that_needs_to_be_locked, client::app::shared_resources::time_sync_requested_that_needs_to_be_locked, (), client::app::radio::{closure_env#0}>> (f=..., self=<optimized out>) at client/src/main.rs:143
#25 rtic_core::prelude::{impl#6}::lock::{closure#0}::{closure#0}::{closure#0}::{closure#0}::{closure#0}<client::app::shared_resources::sg_that_needs_to_be_locked, client::app::shared_resources::rfs_that_needs_to_be_locked, client::app::shared_resources::rtc_that_needs_to_be_locked, client::app::shared_resources::aes_that_needs_to_be_locked, client::app::shared_resources::lptim1_that_needs_to_be_locked, client::app::shared_resources::time_sync_nonce_that_needs_to_be_locked, client::app::shared_resources::time_sync_requested_that_needs_to_be_locked, (), client::app::radio::{closure_env#0}> (T5=<optimized out>) at /Users/rickp/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rtic-core-1.0.0/src/lib.rs:129
#26 0x080020e0 in rtic::export::lock<stm32wlxx_hal::lptim::LpTim1, (), 0, rtic_core::prelude::{impl#6}::lock::{closure#0}::{closure#0}::{closure#0}::{closure#0}::{closure_env#0}<client::app::shared_resources::sg_that_needs_to_be_locked, client::app::shared_resources::rfs_that_needs_to_be_locked, client::app::shared_resources::rtc_that_needs_to_be_locked, client::app::shared_resources::aes_that_needs_to_be_locked, client::app::shared_resources::lptim1_that_needs_to_be_locked, client::app::shared_resources::time_sync_nonce_that_needs_to_be_locked, client::app::shared_resources::time_sync_requested_that_needs_to_be_locked, (), client::app::radio::{closure_env#0}>> (ptr=0x0, priority=0x2000ff97, ceiling=1, nvic_prio_bits=4, f=..., 
    _mask=<optimized out>) at /Users/rickp/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cortex-m-rtic-1.1.4/src/export.rs:235
#27 client::app::{impl#12}::lock<(), rtic_core::prelude::{impl#6}::lock::{closure#0}::{closure#0}::{closure#0}::{closure#0}::{closure_env#0}<client::app::shared_resources::sg_that_needs_to_be_locked, client::app::shared_resources::rfs_that_needs_to_be_locked, client::app::shared_resources::rtc_that_needs_to_be_locked, client::app::shared_resources::aes_that_needs_to_be_locked, client::app::shared_resources::lptim1_that_needs_to_be_locked, client::app::shared_resources::time_sync_nonce_that_needs_to_be_locked, client::app::shared_resources::time_sync_requested_that_needs_to_be_locked, (), client::app::radio::{closure_env#0}>> (f=..., self=<optimized out>) at client/src/main.rs:143
#28 rtic_core::prelude::{impl#6}::lock::{closure#0}::{closure#0}::{closure#0}::{closure#0}<client::app::shared_resources::sg_that_needs_to_be_locked, client::app::shared_resources::rfs_that_needs_to_be_locked, client::app::shared_resources::rtc_that_needs_to_be_locked, client::app::shared_resources::aes_that_needs_to_be_locked, client::app::shared_resources::lptim1_th--Type <RET> for more, q to quit, c to continue without paging--
at_needs_to_be_locked, client::app::shared_resources::time_sync_nonce_that_needs_to_be_locked, client::app::shared_resources::time_sync_requested_that_needs_to_be_locked, (), client::app::radio::{closure_env#0}> (T4=<optimized out>) at /Users/rickp/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rtic-core-1.0.0/src/lib.rs:129
#29 rtic::export::lock<stm32wlxx_hal::aes::Aes, (), 0, rtic_core::prelude::{impl#6}::lock::{closure#0}::{closure#0}::{closure#0}::{closure_env#0}<client::app::shared_resources::sg_that_needs_to_be_locked, client::app::shared_resources::rfs_that_needs_to_be_locked, client::app::shared_resources::rtc_that_needs_to_be_locked, client::app::shared_resources::aes_that_needs_to_be_locked, client::app::shared_resources::lptim1_that_needs_to_be_locked, client::app::shared_resources::time_sync_nonce_that_needs_to_be_locked, client::app::shared_resources::time_sync_requested_that_needs_to_be_locked, (), client::app::radio::{closure_env#0}>> (ptr=<optimized out>, priority=0x2000ff97, ceiling=1, nvic_prio_bits=4, f=..., _mask=<optimized out>)
    at /Users/rickp/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cortex-m-rtic-1.1.4/src/export.rs:235
#30 client::app::{impl#11}::lock<(), rtic_core::prelude::{impl#6}::lock::{closure#0}::{closure#0}::{closure#0}::{closure_env#0}<client::app::shared_resources::sg_that_needs_to_be_locked, client::app::shared_resources::rfs_that_needs_to_be_locked, client::app::shared_resources::rtc_that_needs_to_be_locked, client::app::shared_resources::aes_that_needs_to_be_locked, client::app::shared_resources::lptim1_that_needs_to_be_locked, client::app::shared_resources::time_sync_nonce_that_needs_to_be_locked, client::app::shared_resources::time_sync_requested_that_needs_to_be_locked, (), client::app::radio::{closure_env#0}>> (f=..., self=<optimized out>) at client/src/main.rs:143
#31 rtic_core::prelude::{impl#6}::lock::{closure#0}::{closure#0}::{closure#0}<client::app::shared_resources::sg_that_needs_to_be_locked, client::app::shared_resources::rfs_that_needs_to_be_locked, client::app::shared_resources::rtc_that_needs_to_be_locked, client::app::shared_resources::aes_that_needs_to_be_locked, client::app::shared_resources::lptim1_that_needs_to_be_locked, client::app::shared_resources::time_sync_nonce_that_needs_to_be_locked, client::app::shared_resources::time_sync_requested_that_needs_to_be_locked, (), client::app::radio::{closure_env#0}> (T3=<optimized out>) at /Users/rickp/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rtic-core-1.0.0/src/lib.rs:129
#32 rtic::export::lock<stm32wlxx_hal::rtc::Rtc, (), 0, rtic_core::prelude::{impl#6}::lock::{closure#0}::{closure#0}::{closure_env#0}<client::app::shared_resources::sg_that_needs_to_be_locked, client::app::shared_resources::rfs_that_needs_to_be_locked, client::app::shared_resources::rtc_that_needs_to_be_locked, client::app::shared_resources::aes_that_needs_to_be_locked, client::app::shared_resources::lptim1_that_needs_to_be_locked, client::app::shared_resources::time_sync_nonce_that_needs_to_be_locked, client::app::shared_resources::time_sync_requested_that_needs_to_be_locked, (), client::app::radio::{closure_env#0}>> (ptr=<optimized out>, priority=0x2000ff97, ceiling=1, nvic_prio_bits=4, f=..., _mask=<optimized out>)
    at /Users/rickp/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cortex-m-rtic-1.1.4/src/export.rs:235
#33 client::app::{impl#13}::lock<(), rtic_core::prelude::{impl#6}::lock::{closure#0}::{closure#0}::{closure_env#0}<client::app::shared_resources::sg_that_needs_to_be_locked, client::app::shared_resources::rfs_that_needs_to_be_locked, client::app::shared_resources::rtc_that_needs_to_be_locked, client::app::shared_resources::aes_that_needs_to_be_locked, client::app::shared_resources::lptim1_that_needs_to_be_locked, client::app::shared_resources::time_sync_nonce_that_needs_to_be_locked, client::app::shared_resources::time_sync_requested_that_needs_to_be_locked, (), client::app::radio::{closure_env#0}>> (f=..., self=<optimized out>) at client/src/main.rs:143
#34 rtic_core::prelude::{impl#6}::lock::{closure#0}::{closure#0}<client::app::shared_resources::sg_that_needs_to_be_locked, client::app::shared_resources::rfs_that_needs_to_be_locked, client::app::shared_resources::rtc_that_needs_to_be_locked, client::app::shared_resources::aes_that_needs_to_be_locked, client::app::shared_resources::lptim1_that_needs_to_be_locked, client::app::shared_resources::time_sync_nonce_that_needs_to_be_locked, client::app::shared_resources::time_sync_requested_that_needs_to_be_locked, (), client::app::radio::{closure_env#0}> (T2=<optimized out>) at /Users/rickp/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rtic-core-1.0.0/src/lib.rs:129
#35 rtic::export::lock<nucleo_wl55jc_bsp::RfSwitch, (), 0, rtic_core::prelude::{impl#6}::lock::{closure#0}::{closure_env#0}<client::app::shared_resources::sg_that_needs_to_be_locked, client::app::shared_resources::rfs_that_needs_to_be_locked, client::app::shared_resources::rtc_that_needs_to_be_locked, client::app::shared_resources::aes_that_needs_to_be_locked, client::app::shared_resources::lptim1_that_needs_to_be_locked, client::app::shared_resources::time_sync_nonce_that_needs_to_be_locked, client::app::shared_resources::time_sync_requested_that_needs_to_be_locked, (), client::app::radio::{closure_env#0}>> (ptr=<optimized out>, priority=0x2000ff97, ceiling=1, nvic_prio_bits=4, f=..., _mask=<optimized out>)
    at /Users/rickp/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cortex-m-rtic-1.1.4/src/export.rs:235
#36 client::app::{impl#8}::lock<(), rtic_core::prelude::{impl#6}::lock::{closure#0}::{closure_env#0}<client::app::shared_resources::sg_that_needs_to_be_locked, client::app::shared_resources::rfs_that_needs_to_be_locked, client::app::shared_resources::rtc_that_needs_to_be_locked, client::app::shared_resources::aes_that_needs_to_be_locked, client::app::shared_resources::lptim1_that_needs_to_be_locked, client::app::shared_resources::time_sync_nonce_that_needs_to_be_locked, client::app::shared_resources::time_sync_requested_that_needs_to_be_locked, (), client::app::radio::{closure_env#0}>> (f=..., self=<optimized out>) at client/src/main.rs:143
#37 rtic_core::prelude::{impl#6}::lock::{closure#0}<client::app::shared_resources::sg_that_needs_to_be_locked, client::app::shared_resources::rfs_that_needs_to_be_locked, client::app::shared_resources::rtc_that_needs_to_be_locked, client::app::shared_resources::aes_that_needs_to_be_locked, client::app::shared_resources::lptim1_that_needs_to_be_locked, client::app::shared_resources::time_sync_nonce_that_needs_to_be_locked, client::app::shared_resources::time_sync_requested_that_needs_to_be_locked, (), client::app::radio::{closure_env#0}> (
    T1=<optimized out>) at /Users/rickp/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rtic-core-1.0.0/src/lib.rs:129
#38 rtic::export::lock<stm32wlxx_hal::subghz::SubGhz<stm32wlxx_hal::dma::Dma1Ch1, stm32wlxx_hal::dma::Dma1Ch2>, (), 0, rtic_core::prelude::{impl#6}::lock::{closure_env#0}<client::app::shared_resources::sg_that_needs_to_be_locked, client::app::shared_resources::rfs_that_needs_to_be_locked, client::app::shared_resources::rtc_that_needs_to_be_locked, client::app::shared_resources::aes_that_needs_to_be_locked, client::app::shared_resources::lptim1_that_needs_to_be_locked, client::app::shared_resources::time_sync_nonce_that_needs_to_be_locked, client::app::shared_resources::time_sync_requested_that_needs_to_be_locked, (), client::app::radio::{closure_env#0}>> (ptr=<optimized out>, priority=0x2000ff97, ceiling=1, nvic_prio_bits=4, 
    f=..., _mask=<optimized out>) at /Users/rickp/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cortex-m-rtic-1.1.4/src/export.rs:235
#39 client::app::{impl#7}::lock<(), rtic_core::prelude::{impl#6}::lock::{closure_env#0}<client::app::shared_resources::sg_that_needs_to_be_locked, client::app::shared_resources::rfs_that_needs_to_be_locked, client::app::shared_resources::rtc_that_needs_to_be_locked, client::app::shared_resources::aes_that_needs_to_be_locked, client::app::shared_resources::lptim1_that_needs_to_be_locked, client::app::shared_resources::time_sync_nonce_that_needs_to_be_locked, client::app::shared_resources::time_sync_requested_that_needs_to_be_locked, (), client::app::radio::{closure_env#0}>> (f=..., self=<optimized out>) at client/src/main.rs:143
#40 rtic_core::prelude::{impl#6}::lock<client::app::shared_resources::sg_that_needs_to_be_locked, client::app::shared_resources::rfs_that_needs_to_be_locked, client::app::shared_resources::rtc_that_needs_to_be_locked, client::app::shared_resources::aes_that_needs_to_be_locked, client::app::shared_resources::lptim1_that_needs_to_be_locked, client::app::shared_resources::time_sync_nonce_that_needs_to_be_locked, client::app::shared_resources::time_sync_requested_that_needs_to_be_locked, (), client::app::radio::{closure_env#0}> (self=0x2000ff98, f=...)
    at /Users/rickp/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rtic-core-1.0.0/src/lib.rs:160
#41 client::app::radio (ctx=...) at client/src/main.rs:467
#42 client::app::RADIO_IRQ_BUSY::{closure#0} () at client/src/main.rs:143
#43 rtic::export::run<client::app::RADIO_IRQ_BUSY::{closure_env#0}> (priority=1, f=...)
    at /Users/rickp/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cortex-m-rtic-1.1.4/src/export.rs:68
#44 client::app::RADIO_IRQ_BUSY () at client/src/main.rs:143
#45 <signal handler called>
#46 cortex_m::asm::nop () at /Users/rickp/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cortex-m-0.7.7/src/asm.rs:35
#47 client::app::rtic_ext::main () at client/src/main.rs:143

So we've received an IRQ but then fail in stm32wlxx_hal::subghz::SubGhz<stm32wlxx_hal::dma::Dma1Ch1, stm32wlxx_hal::dma::Dma1Ch2>::read<stm32wlxx_hal::dma::Dma1Ch1, stm32wlxx_hal::dma::Dma1Ch2> at the self.poll_not_busy() call...

rickpayne commented 3 months ago

For the record, the STM32CubeWL demo app LocalNetwork/Collector and Sensor work well, so I think the boards are ok - Id just like to use rust :)

newAM commented 3 months ago

Yeah this is broken for me too... Even older commits that I recall testing on the physical hardware don't work anymore :(

I don't have time to debug more right now, here's some short term solutions:

rickpayne commented 3 months ago

Ok, thanks for the info. I was comparing the code with what the STM HAL does, but no solutions yet. If I stumble on something I'll let you know. Guess its time to look at embassy and async :)