You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First discovered this with a stm32wb55cgu on a custom board, but have noticed it is also an issue with the gatt_server example on a stm32 nucleo.
Using two different BLE testing apps (ST BLE Toolbox and my custom app), I can successfully write to the characteristic Uuid16(0x502) 16 times, but the 17th does not show up in the trace and Bluetooth stops responding entirely. trace.txt
I'm thinking its an issue with how the copro is initially configured, such as an incorrect buffer size / one that isn't being cleared since it works 16 times before the copro stops responding and ipcc receive gets stuck on Pending in embassy-stm32/src/ipcc.rs?
pubasyncfnreceive<R>(channel:IpccChannel,mutf:implFnMut() -> Option<R>) -> R{let regs = IPCC::regs();loop{// This is a race, but is nice for debuggingif !regs.cpu(1).sr().read().chf(channel asusize){trace!("ipcc: ch {}: wait for rx occupied", channel asu8);}poll_fn(|cx| {IPCC::state().rx_waker_for(channel).register(cx.waker());// If bit is set to 1 then interrupt is disabled; we want to enable the interrupt
regs.cpu(0).mr().modify(|w| w.set_chom(channel asusize,false));compiler_fence(Ordering::SeqCst);if regs.cpu(1).sr().read().chf(channel asusize){// If bit is set to 1 then interrupt is disabled; we want to disable the interrupt
regs.cpu(0).mr().modify(|w| w.set_chfm(channel asusize,true));Poll::Ready(())}else{Poll::Pending}}).await;trace!("ipcc: ch {}: read data", channel asu8);matchf(){Some(ret) => return ret,None => {}}trace!("ipcc: ch {}: clear rx", channel asu8);compiler_fence(Ordering::SeqCst);// If the channel is clear and the read function returns none, fetch more data
regs.cpu(0).scr().write(|w| w.set_chc(channel asusize,true));}}
I'll continue investigating but thought I'd put this out there in case someone more experienced sees an obvious issue.
The text was updated successfully, but these errors were encountered:
First discovered this with a stm32wb55cgu on a custom board, but have noticed it is also an issue with the gatt_server example on a stm32 nucleo.
Using two different BLE testing apps (ST BLE Toolbox and my custom app), I can successfully write to the characteristic
Uuid16(0x502)
16 times, but the 17th does not show up in the trace and Bluetooth stops responding entirely.trace.txt
I'm thinking its an issue with how the copro is initially configured, such as an incorrect buffer size / one that isn't being cleared since it works 16 times before the copro stops responding and ipcc receive gets stuck on Pending in
embassy-stm32/src/ipcc.rs
?I'll continue investigating but thought I'd put this out there in case someone more experienced sees an obvious issue.
The text was updated successfully, but these errors were encountered: