-
Notifications
You must be signed in to change notification settings - Fork 978
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
Intermittent issues with i2c interface and interrupt line on microbit v2.21 #1068
Comments
This looks like a question for @microbit-carlos |
Hi @relia1, I think I understand more or less the issue, but need to confirm some things from your description:
Is there a battery pack connected to the micro:bit in this scenario. Or does disconnect and reconnect the USB cable mean the board fully power cycled?
Is that from the lsm303agr?
When trying to communicate with the LSM?
Unable to get interrupts? What does that mean exactly?
Just to double check, this is an I2C read from the Interface MCU running DAPLink? As you have already noticed, there are some events in the Interface MCU that will assert the interrupt signal and keep it asserted until an I2C read operation is performed. Mostly pressing the reset button for 5 seconds, or inserting the USB cable when battery powered. The interrupt signal will stay asserted until an I2C read is done, so any other interrupts from other devices in the shared pin will be "lost". Assuming you are doing a sleep and dummy read on startup, it might also be important to ensure the sleep is around 1 second, as it might take that long for DAPLink to fully startup. |
|
Ah, I see, thanks for the clarification.
So just to confirm, sometimes when trying to do an I2C transmission to address 0x70, there is a NACK after the address, which would indicate no device has responded, is that right? So, how often are you trying to communicate with the Interface via I2C? From the link to the repo you've posted it looks like it's only done once during startup? |
Configuration
Operating System: MacOS 14.3.1 (although also seen on windows and linux)
Device: Microbit v2.21 (nrf52833)
Device DETAILS.TXT
Steps to reproduce
Results
Intermittently getting unending busy being returned (0x39)
Intermittently I am getting addressnack back from the i2c interface with the user program unable to get interrupts
Upon disconnecting and reconnecting I consistently run into the above issue
Expected results
Expected the interrupt line to be released so interrupts from the lsm303agr are able to occur
Expected microbit to be able to run user software even when unplugging and plugging it back in
Additional Notes
Adding a sleep and a dummy read on the i2c interface has seemed to help a decent bit, but it does not help with the unplugging and plugging back in scenario.
Rust program I have been using for testing these scenarios
https://github.com/relia1/state_machine
The text was updated successfully, but these errors were encountered: