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

nRF51-DK printf() causes hang when PC serial port not active / not opened. #25

Closed
nuket opened this issue Aug 23, 2016 · 5 comments
Closed

Comments

@nuket
Copy link

nuket commented Aug 23, 2016

Already reported this once in the mbed OS codebase, here's another concrete example of this happening.

The problem is that, with the nRF51-DK hooked up to my computer, if I don't connect to and open the serial port exposed as /dev/ttyACM0, whatever software is running on the DK board will just hang. It seems like the Nordic serial port code locks up because it always expects some hardware flow control of some sort, so that if I don't have minicom running, it doesn't work. Also, if I run minicom then exit from it, the DK board will keep running for a while, then eventually hangs.

The Nordic serial port code simply does not work properly. Where, in the HAL (pun intended), do I fix that?

Here's a video of this happening.

The video shows the code example from my fork here, which is running:

  • At the start, the board is hung, because I don't have minicom open.
  • I open minicom, the board starts printing "Alive." again.
  • I close minicom, the board eventually hangs again.
@nuket nuket changed the title nRF51-DK printf() causes hang when PC serial port not active / opened nRF51-DK printf() causes hang when PC serial port not active / not opened. Aug 23, 2016
@nuket
Copy link
Author

nuket commented Aug 23, 2016

Here's the .mbed configuration I'm using:

$ cat .mbed
TARGET=NRF51_DK
TOOLCHAIN=GCC_ARM
GCC_ARM_PATH=/home/max/devtools/gcc-arm-none-eabi-5_4-2016q2/bin
ROOT=.

I've tried with GCC 4.9 and 5.4, both exhibit identical behavior.

@nuket
Copy link
Author

nuket commented Aug 23, 2016

Related issue, possibly: ARMmbed/mbed-os#2474

@sg-
Copy link
Contributor

sg- commented Aug 25, 2016

Can you confirm is #2535 resolved this issue?

@nuket
Copy link
Author

nuket commented Aug 26, 2016

I will take a look.

@nuket
Copy link
Author

nuket commented Aug 30, 2016

Confirmed ARMmbed/mbed-os#2535 resolved the issue after adding to mbed_app.json:

"NRF51_DK": {
    "target.uart_hwfc": 0
}

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

2 participants