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

Nrf52840 UART device compatibility

I have 3 devices that can communicate via UART:
1) nRF52840-DK (PCA10056)
2) FTDI (set to 5v logic)
3) BLE HM-19

I'm using the example in ./nRF5_SDK_16/nRF5SDK160098a08e2/examples/peripheral/serial_uartes

If I connect the FTDI to the NRF, I'm able to send and receive data.
ftdi.5v to nrf.5v
ftdi.gnd to nrf.gnd
ftdi.rx to P0.27
ftdi.tx to P0.26

If I connect the FTDI to the HM-19, I'm able to send and receive data.
ftdi.5v to hm.5v
ftdi.gnd to hm.gnd
ftdi.rx to hm.tx
ftdi.tx to hm.rx

But if I connect the NRF to the HM-19, it doesn't work.
hm.5v to nrf.5v
hm.gnd to nrf.gnd
hm.rx to P0.27
hm.tx to P0.26

I have set the baudrate to 9600 on every device.

I tried swapping RX, TX.
I also tried first connecting RX,TX followed by power. Also the other way around power first and then connect RX, TX.

This is how I configure the uart:

NRF_SERIAL_DRV_UART_CONFIG_DEF(m_uarte0_drv_config,
                      ARDUINO_SDA_PIN, ARDUINO_SCL_PIN,
                      RTS_PIN_NUMBER, CTS_PIN_NUMBER,
                      NRF_UART_HWFC_DISABLED, NRF_UART_PARITY_EXCLUDED,
                      NRF_UART_BAUDRATE_9600,
                      UART_DEFAULT_CONFIG_IRQ_PRIORITY);

  • No, I was using J2 USB originally.

    I just tried using the J3 and set the switch to USB power source. So basically I'm now using both J2 and J3 USB ports.
    The result is the same. FTDI works fine with the DK, but the DK is unable to communicate with the DSD TECH HM-19.

    I haven't tried LLC yet. Which pin on the DK is 3.6V I can use?

  • Hi Philip

    If the HM-19 is set to 3.6V it should be sufficient to set the DK in normal operating mode, powering it from J2 and having the power select switch set to VDD. Please check if you have any luck here, or else I'm not quite sure on what to look at next. I still suggest trying with a logic analyzer to see what's going on on the TX/RX lines themselves. Are there any differences in how the FTDI and HM-19 transmit and receive?

    Best regards,

    Simon

  • I don't have a logic analyzer.

    On the DSD TECH HM-19 it's written 3.6 .. 6V which means it should work with 3.6V but also 5V.

    I also just tried to connect the DSD TECH HM-19 to a Arduino Uno, and that is also working fine.
    The Arduino Uno is 5V logic.

    I also have a Wemos D1 Mini with a ESP8266, which is running on 3.3v.
    I tried connecting this as well and it's working fine with the DSD TECH HM-19.

    Then I also tried connecting the FTDI to the DSD TECH HM-19, but this time I set the jumper to 3.3v. And also that is working fine.

    So I think maybe the problem is in the software settings on the NRF?
    I'm pretty new to Nordic, so I could've easily overlooked things?

  • Hi Philip

    That might be the case, but it is strange that the communication works with the FTDI if there are any software issues on the nRF side. You can try using the regular UART example
    \<SDK-FOLDER>\examples\peripheral\uart to communicate between the HM-19 and the nRF as well, as that is a very straight forward example that should make it work. Remember to set the baud rate to 9600 if that's what you want though, as the SDK examples are set to 115200 by default.

    Are you able to provide the datasheet for your HM-19 so I can take a look at it? I haven't been able to find the datasheet for the correct one I think.

    Best regards,

    Simon

  • I tried the example, but I don't get any output in the output window?

    I don't have a datasheet for the HM-19

Related