This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Strange behaviour of nrf52840-DK with NUS

I have some experience working with nrf52840-dk and the SDK working in custom projects taking as initial point the different examples of the SDK. 

The problem is that I have just bought two new nrf52840-dk and these board have a strange behaviour that the rest of my dk boards doesn't have with the standard NUS example (SDK version 15).

With the new boards if I write something (ending with CR and LF) through a uart terminal the message doesn't print in the other terminal. It only appears when I write a new message but this new message only will appear with a new one. 

This doesn't happen with the rest of my boards with the same hex application and softdevice. 

Any idea that bring light on this?

Many thanks. 

Parents
  • Hi,

    It only appears when I write a new message but this new message only will appear with a new one.

    I am having problems understanding the conditions. Can you elaborate?

  • Of course, sorry.  I'll try to summarise:

    - I turn on the two boards (one central and one peripheral with NUS example of SDK version 15)

    - Using a terminal program (putty, Coolterm) I write a string array to peripheral board ending with CR and LF. For example: hi world\r\n

    -This message don't appear in central board. (If I use other pair of nrf52840-DK boards with the same application and softdevice it does).

    - If I write a new string array (for example: I said hi world\r\n) to peripheral board the last message will appear in the terminal of central boards. In this case hi world\r\n.  

    The same happens in the direction central -> peripheral with this pair of boards. If I replace one with other nrf52840-DK that I have this problem remain only in one direction.

    any idea? Thanks!

  • Hi,

    I see. That seems very odd, and I don't have any explanation at this point. Which version are the boards you are testing with (both the old and new)? You can see the version printed on the white sticker on the largest IC on the DK.

Reply Children
  • All my old boards are revision 0.12.0 and the new ones are 1.0.0 

  • Hi,

    I was not able to reproduce this myself and find it puzzling. Therefore, I have even more questions:

    • Is it correct that one direction when you combine one new and one old DK (e.g. central -> peripheral)? And if you switch the roles of the boards, then you suddenly have it working in the other direction only (peripheral -> central)?
    • Does the missing UART message appear if you look at it on the board where it should have been transmitted but is missing using a logic analyzer? You should measure between the onboard debugger and the nRF (see the backside of PCB for an explanation of pin configuration).
    • Does UART communication work on the boards with other examples, for instance, the basic UART Example?
  • I was doing some test more. With a logic analyser I monitored 4 lines (TX, RX of board 1 and TX, RX of board 2) and all seems to work properly. The digital signals appears in the correct order but the message didn't appear in the terminal screen until the following arrives. 

    After that I tried to communicate via UART using a STM microcontroller and everything works fine. Definitely it's a problem of my terminal programs and my PC. 

    But I don't still know why a pair of BLE boards works well with my computer and the other pair don't with the same application and softdevice. Is any difference between them?

    Thanks a lot for your help

  • Hi,

    pdcampo said:
    But I don't still know why a pair of BLE boards works well with my computer and the other pair don't with the same application and softdevice. Is any difference between them?

    The 0.12.0 version does not have the production chip.

    The 1.0.0 version is the first version with the production chip, and some minor changes to the board (adapted to final reference layout, and some changes to the power system:

    • Connection added so that VDD level tracks the level of "External supply" when VEXT→nRF = ON. On earlier revisions, this was 3V or Coin-Cell voltage regardless of nRF voltage. It can be reverted by cutting SB58.
    • Because of the new reference layout, VDD_nRF is used as reference voltage for P18 and P25, previously this was VDD. It can be reverted by cutting SB60 and soldering SB59.

    I do not see why any of these should have such an impact, though.

    pdcampo said:

    I was doing some test more. With a logic analyser I monitored 4 lines (TX, RX of board 1 and TX, RX of board 2) and all seems to work properly. The digital signals appears in the correct order but the message didn't appear in the terminal screen until the following arrives. 

    After that I tried to communicate via UART using a STM microcontroller and everything works fine. Definitely it's a problem of my terminal programs and my PC. 

    It seems so. But at the same time, there must be some difference that triggers it. Does cutting SB58 and SB60 and soldering SB59 have any effect?

Related