The uart driver example from dev academy does not run correctly

Hello, I am currently working on a connection project between two boards through uart, for this I want to guide myself in the asynchronous api example provided by the dev academy course.

I followed the same steps and built the application for the nrf5340 model, however, despite the fact that it builds well, every time I pass it to the board, the following window opens:

I really don't understand why it happens, since the result of the example should allow me to enter some data through the console.

I already tried reinstalling the entire environment, but the error persists, any idea why it happens?

  • Hello,

    Thank you for contacting DevZone at NordicSemi.

    What you are experiencing is not an error.

    The DK may appear as mass-storage-device (MSD) in which case you can directly program the device by putting the hex file in the drive. This MSD could sometime cause some issues while booting the system and could be disabled using MSDDISABLE in J-Link Commander.

    You can see below that my DK is appearing as JLINK drive as yours. Nonetheless, we can straight forward program the DK using the VSCode.

    To see the output, you need to Connect to the serial Com Port in NRF Terminal by pressing the icon appearing on the right hand side of the VCOM port (just above the RTT)

    Regards,

    Naeem

  • Thank you for answering me, but before checking this answer, I was currently able to run the course code and it works fine.


    Now I would like to do the following:

    I have 2 boards, one is the nordic nrf5340 and the other is a board that sends data via uart using some pins that it has, what I want to know is:


    1) How to configure the nordic to receive this data, I know that you have to configure a new uart interface in an .overlay file, but I would like to know how it would be for the uart case, since the course only shows for i2c?

    2) How can I receive and manipulate the data sent from the other board, for now I would like the data to be printed on the screen when it arrives at the nordic?

    For now that would be ideal, since the example of the course is only to send data from the console.

  • Hello,

    In "nRF Connect SDK Fundamentals" course on the DevAcademy, UART is discussed in Lesson#5, and I2C is discussed in Lesson#6.

    You may follow the example from the DevAcademy and see how pinctrl and overlays could be used for UART here

    You can use Zephyr Devicetree API macro like DEVICE_DT_GET in your C program to get the uart device from the DTS and manipulate data.

    Regards

Related