Receive data via uart with nrf5340

hello, I am currently working on a project that involves sending data via serial from a device to the nordic nr5340.

but I can't find an example that shows how it would be in this case, in the course it tells me to use the asynchronous api, but in this case it is to enter the parameters in the console, so I would like you to please tell me an example so that I can make the configuration.

Currently what I know is that a configuration must be made to specify the pins since by default the nrf5340 receives is through the gpios that are connected to the usb, however in the case of how the data is handled it is still confusing for me

So could you please tell me where to start.

Parents
  • Hello,

    What will you be communicating with? What are the requirements for your application? If low power is important, then I suggest you have a look at the Low Power UART(lpuart) sample.

    As you may know, if you click 'Browse' next to "Application template" in VS Code you can search for 'uart' to get a long list of relevant samples. However, we are happy to guide you further.

    Currently what I know is that a configuration must be made to specify the pins since by default the nrf5340 receives is through the gpios that are connected to the usb, however in the case of how the data is handled it is still confusing for me

    You may use an .overlay file to specify which pins to use for the UART on the nRF5340 DK. I could get back to you with an example.

  • hello, thanks for answering me, the connection will be with another board which transmits the information given by a sensor connected to it, through uart, at the moment they are a numerical data, my idea is that the nordic receives the information and prints it on the console at the moment.

  • It sounds like lpuart should be suitable for this application. Any questions so far?

  • hello, thanks for the reply and sorry for the delay in responding, well What I really want to do is the following:

    1) I have a sensor that sends the following numerical data through uart:

    2) What I want to do is use one of the sdk apis, preferably the asynchronous one that is the one I use in the course to be able to access that data using the nrf5340.

    Currently I already managed to configure so that the rx and tx pins are in the gpio P1.14 and P1.15 respectively, and I have them connected, and I tried the connection and the interface indicates that it is online.

    However, what is not clear to me is how to receive the data, so I would like to know if there is not a simple example with that api for this type of case.

    I am new to using the device and any information you can provide me would be greatly appreciated.

Reply
  • hello, thanks for the reply and sorry for the delay in responding, well What I really want to do is the following:

    1) I have a sensor that sends the following numerical data through uart:

    2) What I want to do is use one of the sdk apis, preferably the asynchronous one that is the one I use in the course to be able to access that data using the nrf5340.

    Currently I already managed to configure so that the rx and tx pins are in the gpio P1.14 and P1.15 respectively, and I have them connected, and I tried the connection and the interface indicates that it is online.

    However, what is not clear to me is how to receive the data, so I would like to know if there is not a simple example with that api for this type of case.

    I am new to using the device and any information you can provide me would be greatly appreciated.

Children
Related