Skip to content
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

UART Rx hangs after a few seconds when BLEPeripheral.begin(); is called on nRF51802 #299

Open
doh38 opened this issue Nov 15, 2023 · 0 comments

Comments

@doh38
Copy link

doh38 commented Nov 15, 2023

Hey,
I hope to get some help there... getting grey hairs ^^
I have a nrf51802, got it to work nicely on UART at 115200 (cannot use lower)
Anyway, as soon as I start the BLEPeripheral, the RX will work (totally) randomly for 10-->360 messages (at 50ms) and suddenly stops/hangs for ever. The nrf works, Tx works too... just the buffer not being "populated" it seems.
I checked the uart and ringbuffer libs and it seems that the RXD interrupt is triggered, but the delta remains after at 0. and therefore.. well not available.
I also tried to stop the Serial after the rx stopped to respond by calling Serial.end(); and it instantly crashes the code.
This is a bit very deep code for me. I must admit having absolutely no idea where the problem could be.
*if that may help, I tried a while ago to set the UART at 9600... and in this case, it was working.
I tried (without success):

  • increase buffer size
  • increase read speed
  • change uart irq priority
  • remove all the rest of the code

I really hope to get a bit of help there, I have no idea where to search anymore.

@doh38 doh38 changed the title UART Rx hangs after a few seconds when BLEPeripheral.begin(); is called. UART Rx hangs after a few seconds when BLEPeripheral.begin(); is called on nRF51802 Nov 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant