Closed natrow closed 1 year ago
So I'm finally testing this crate on some hardware and I've run into an issue. I've done some digging and I've found two problems:
1) Converting from nb::Result<> makes the processor hang, I suspect calling .into() is causing infinite recursion. It's happening here: https://github.com/ryankurte/embedded-hal-compat/blob/main/src/forward.rs#L190 2) Implementation of SpiBus::read() calls non-blocking code, potentially returning nb::Error::WouldBlock, then triggering problem 1. Happening here: https://github.com/ryankurte/embedded-hal-compat/blob/main/src/forward.rs#L212
nb::Result<>
.into()
SpiBus::read()
nb::Error::WouldBlock
I'm running this on an STM32L476-RG with stm32l4xx_hal but I'm sure its possible to derive a minimal test scenario for this.
stm32l4xx_hal
So I'm finally testing this crate on some hardware and I've run into an issue. I've done some digging and I've found two problems:
1) Converting from
nb::Result<>
makes the processor hang, I suspect calling.into()
is causing infinite recursion. It's happening here: https://github.com/ryankurte/embedded-hal-compat/blob/main/src/forward.rs#L190 2) Implementation ofSpiBus::read()
calls non-blocking code, potentially returningnb::Error::WouldBlock
, then triggering problem 1. Happening here: https://github.com/ryankurte/embedded-hal-compat/blob/main/src/forward.rs#L212I'm running this on an STM32L476-RG with
stm32l4xx_hal
but I'm sure its possible to derive a minimal test scenario for this.