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

Example serial_uartes does not work in SDK 15.3

Hello,

I am in the process of integrating a project where I need 3 uarts to work concurrently in different configurations.  This will eventually migrate to an application where the nrf52840 will also serve as a beacon.

I have individually proven I can talk to and control each of the 3 peripherals over UART by using the ..examples/peripheral/uart example in sdk 15.3.  I am using the Segger development environment.

I was hoping it would be simple to migrate to controlling all three uart peripherals in a non-blocking mode using the serial_uartes example as a starting point.  My objective is to also include handlers that will capture and parse each uart receive port.

However, I cannot get the basic serial_uartes example to work in the first place.  I have read many of the other Devzone cases and do not see one that conclusively corrects the issue with the example.  

One of my peripherals works in handshake mode the other 2 are asynchronous.   I have also had some issues with getting handshake to function as expected (the nrf52840 must work as a DTE.  Can you tell me if the Nordic implementation  follows the "normal" set of rules as indicated below (except for the DTR) which I need to handle manually.

1.The data terminal equipment (DTE) puts the RTS line into the “On” state.

2.The data communications equipment (DCE) puts the CTS line into the “On” state.

3.The DTE puts the DTR line into the “On” state.

4.The DTR line remains in the “On” state while data is being transmitted.

I need to demo this capability to my customer as soon as possible since I have already been able to successfully talk to all three peripherals independently.  I have spent more than a week attempting to resolve this issue.

Thank you in advance for the normally quick responses from your support team.

Parents
  • Hi Gary

    Some work was done a while back to implement an additional UART using the PWM and SAADC peripherals for TX and RX. 

    This gives you an additional UART assuming you can accept the limitations of this library, which only supports limited baudrate and no flow control or parity. 

    To check it out please refer to the following case, which also lists all the limitations:
    https://devzone.nordicsemi.com/f/nordic-q-a/49844/how-to-simulate-uart-with-gpio

    For a full description of the flow control feature please refer to the Transmission and Reception chapters in the UARTE chapter in the datasheet

    Essentially communication will only take place if both the RTS and CTS lines are asserted (low), and the RTS signal will be automatically de-asserted if you either stop the UART RX or if you only have 4 bytes left in the RX buffer (since some UART devices send a couple of bytes after the RTS line is de-asserted). 

    Best regards
    Torbjørn

  • another option is to use an external UART chip - they are available with I2C and SPI interfaces - or, perhaps even a separate (small) microcontroller ...

  • I have thought of both options you mentioned but would like to minimize the need for external components at this time.

Reply Children
No Data