Closed gkecskes78 closed 6 months ago
The following code I am using on the other dongle to connect and activate UART: main.zip
If you remove the PWMOut
use, does it make any difference?
Do you only have nRF52840 dongles to try, or do you also have, say, a Feather nRF52840? The latter uses external flash for CIRCUITPY.
Style note:
if x:
in this context can be used instead of if x == True:
. It is idiomatic in Python. Similarly, one would say if not x:
instead of if x==False:
.
Thanks for the style note hint, I updated my code accordingly. Unfortunately no difference without PWMOut. We are working with nordic dongles(PCA10059) only but we have some nordic DK (PCA10056) as well. Could it be helpful to check on them ?
We are working with nordic dongles(PCA10059) only but we have some nordic DK (PCA10056) as well. Could it be helpful to check on them ?
Yes, please try. The CircuitPython build for PCA10059 uses on-board external flash chips for CIRCUITPY. If there is some issue with the chip-internal-flash CIRCUITPY code, then that would be a clue and differentiator.
I can confirm the same behaviour on PCA10056, CP version 9.0.4 (pca10056_bootloader-0.8.3_s140_6.1.1) and without PWMOut :( Let me know if I can help further.
I have reproduced this problem. with a simplified version of your test programs on a Feather and ItsyBitsy nRF52840 I see that it's looping forever in ble_drv_add_event_handler_entry()
. I think this may be due to insufficient locking around a data structure, but need to look further.
EDIT: it was a gc problem.
CircuitPython version
Code/REPL
Behavior
I am periodically setting up a BLE connection between 2 nordic dongles, both having the same CPO version 9.0.4. Recently a bug relating setting up a BLE connection and activating UART service was fixed - this is working now perfect. https://github.com/adafruit/Adafruit_CircuitPython_BLE/issues/192
The current issue now is related to the dongle, which gets connected. The dongle which gets connected, suddenly stops working after a short time. When it stops working, is random, it could happen after 20 loops, but also after 120. This is a resulting screenshot:
Description
might be related to 192
Additional information