-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issues with PDM_NS & I2S on nrf9160 #323
Comments
It looks like this error originates in probe-run. I have no idea whether probe-run is at fault here or if something is wrong in this HAL (or if it's something completely different), but I suggest opening an issue in the probe-run repository. At least the maintainers there might have a better idea of what could be causing this. Have you tried running the same code without probe-run, for example using cargo embed? That could be useful in narrowing down the cause of the problem. |
I have opened knurling-rs/probe-run#216 to fix the probe-run issue, it would be great if you could test that as I don't have any thumbv8 hardware at hand |
I'll look into testing your probe-run changes when I can. However, I don't believe probe-run is the root cause of the issue. It seems to be handling the crash differently, but using cargo-embed doesn't get any further. 13:46:06.110 initializing
13:46:06.110 getting peripherals
13:46:06.110 configuring data buffer
13:46:06.110 activating pdm
13:46:06.110 configuring pin gpio settings
13:46:06.110 enabling pdm and then nothing further. |
If the bug in probe-run is fixed, it should print a backtrace, which might help diagnose what's wrong |
replicating your changes in my local probe run simply changes the error to: I don't see a backtrace |
Thanks for testing, I've pushed another commit to that PR that should hopefully fix this. |
Now getting:
None of the fixes mentioned are relevant - I have debug = 2, cortex-m 0.6.7, and I don't believe there's any C code linked. |
To test if the issue was specific to the pdm peripheral, I bought some i2s microphones. I'm getting similar errors there. Within rtic, as soon as I call I2S::new_controller(), it crashes with the same error. Outside of rtic, it doesn't crash, but just stalls at the same point. Has anybody successfully used the i2s or pdm modules on the nrf9160? |
It looks like the root cause is in the SPM. I followed this guide, and it seems to have gotten me there. However, this feels like a hacky solution. The SPM has been updated since then, and it looks like there are I2S0_NS and PDM0_NS already listed, and I would expect would work. |
Yay, security! Which version of SPM are you using? |
Assuming the version of SPM maps to the version of the nrf connect sdk: 1.5.1. |
I'm having issues when interacting with the pdm peripheral via this library. Whatever I do, it results in an error:
Error: bug? LR (0xffffffb8) didn't have the Thumb bit set
which I've had little luck figuring out so far.I couldn't find any examples of how to use the pdm peripheral in this library, so it's entirely possible that I've misinterpreted something important when combining the nrf9160 documentation and the documentation of this library. I'm pretty new to embedded development in Rust, any help would be appreciated.
The "lib" referred to here is the base file from the knurling application template
The text was updated successfully, but these errors were encountered: