This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

basic UART sample for nRF Connect SDK

Hi,

I am struggling to find a basic sample for UART communication in NCS. As an experienced Nrf5 SDK programmer, I find it very hard to convert my firmware to nRF Connect and Zephyr. There is no small and simple example in the NCS, the Zephyr website just lists of bunch of declarations, and searching the internet and devzone yields a bewildering amount of different solutions, dead links, with or without FIFO, UART or UARTE, incomprehensible config settings and lots of code that is documented as "not running", "unreliable" etc. I just need 2 UARTs to transmit commands  to sensors and receive data from them, preferably under interrupt.

thx,

Henk

  • That is strange. The same code works just fine here using NCS version 1.6.0. I'm compiling for the nrf9160dk_nrf9160ns target though.

    Can you please zip the project including the build directory and post it here? Thanks.

  • print screen of uart.huarttest.ZIP

    hi Stian,

    here is the ZIP and a printscreen of uart.h after compilation, showing flag is not active.

  • Hi, I ran your project and it compiles fine and the CONFIG_xx flags are set as expected. I ran this through the developers and they can not find anything wrong with your build output. The project includes the file autoconf.h which should set the correct configs. We have seen problems with the "long path name"-issue in Windows earlier, but it doesn't look like a very long path in your project. I can't explain this other than that you have a broken NCS install, or changed some code. Maybe you can try to checkout the newest NCS tag on git, removing any local changes, and use "west update" to get all subrepos to the correct commit.

  • Hi Stian,

    after updating the toolchain to 1.6.1 the IDE got so fucked up I had to uninstall the whole set. Basic problem seemed to be that the compiler kept searching and finding files in other places then where they really were. Uninstalling nRF Connect did nog work either: I had to make a clean Windows install to get the IDE running again. GRUMBLE!!! Anyway, after all these hours of work, the problem with the UART flag has disappeared, so I consider this issue closed.

    It is also closed because we have decided to give up on nRF Connect that, in our humble opinion, sucks big time. We are going to redesign the board with TI or Microchip processors so that in the future we will not be forced to throw away all our development just because Nordic has come up with yet another fancy IDE.

    Thanks anyway for your help,

    Henk

  • Hi, I'm sorry to hear you had such a hard time getting nRF Connect SDK up and running. Sad to hear you are leaving.

Related