Skip to content

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

Closed
@nuket

Description

@nuket

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions