ble_app_uart can not start advertising

Hi everyone,

I implement nrf5_SDK_17.0.2 ble_app_uart example, but when I connect both GND wire and TX wire of the external device to my nRF52840 DK first, my nRF52840 DK cannot start advertising even the external device is off. So I have to turn my nRF52840 DK on first, and then I connect the external device.
The most important problem is that when I press the reset button on my nRF52840 DK I need to reconnect the common GND or TX wire, otherwise my nRF52840 DK cannot start advertising.
Note: the external device's logic level is +5V so I have to use a lever shifter.

Thanks.

Parents
  • I suggest to try a fail a bit, for instance look at a logic analyzer trace, does something look off? Maybe try with pull-ups on both RX and TX, and the pull up's can be large >100kohm. Look at the timing when working vs. failing, and also it should be possible to debug your program (e.g. in DEBUG build) to check for faults, asserts, or if the program just hang (e.g. wait) somewhere.

    Kenneth

  • Hi Kenneth,

    I try to measure RX Pin in some cases:

    1- Before connecting the external device to my nRF DK, RX Pin voltage is +2.74V.

    2- After connecting the external device to my nRF DK:

    • When the external device is off RX Pin voltage is +0.72V. In this case the nRF DK cannot start advertising.
    • If you add a 2kOhm pull-up resister RX pin voltage is +1.45V. In this case the nRF DK can start advertising.
    • When the external device is on, at the beginning RX Pin voltage is +3.45V. After a few minutes RX Pin voltage is +2.88V ~ +2.93V. In this case the nRF DK cannot start advertising.
    • Now, if you first disconnect the common ground and then connect your app to the nRF DK you can see the data in your app after connecting the common ground later. In this case RX Pin voltage is +2.90V ~ +2.95V.

    Note: You shouldn't add a pull-down resister because by doing that, advertising cannot be started at all even if you disconnect the common ground. I added a 4kOhm pull-down resister and saw that RX Pin voltage has been +1.42 ~ +1.45. And also I added a 14kOhm pull-down resister and saw that RX Pin voltage has been +2.76 ~ +2.81V. But, it stopped advertising.

    Could you guess what the problem is?

    Thank you for your answer.

  • The GPIO voltages should not at any time exceed 0.3V above/below power supply rails, doing to may damage the device over time (since the ESD protection diodes on the GPIO pads will sink or source current when this occurs, they are designed to handle short ESD transients only). 

    I am not sure what you mean by device if off? If you mean there is no voltage applied to the device, then I assume the device will try to sink current through GPIOs, this may explain why RX pin is 0.72V (since it is sinking current through the pull-up on RX). This won't work well, since the RX input will handle this as logic low, and assume there is incomming data, and will quickly assert due to framing errors on the RX pin. My suggestion in this case is that the nRF52840 monitor if the peer device is sufficient powered before init the UART.

    Kenneth 

  • Classic phantom power issue; the pull-up is powering the external device from nRF52 VCC via 2k pull-up into external device input pin via external device schottky diode protection to external device internal power Vcc.

    We know this because the Rx pin is dragged down to 1.45 volts by the external device power rail loading.

    When the external device is off RX Pin voltage is +0.72V. In this case the nRF DK cannot start advertising.
    If you add a 2kOhm pull-up resister RX pin voltage is +1.45V

    In general two devices with different power rails sharing a common ground must be correctly isolated if one is powered up at a different time to the other.

    Test this theory by removing any connection between Rx and the external device, keep Rx pullup in place,  power up both devices, then connect the Rx line to the external device. It should work fine.

Reply
  • Classic phantom power issue; the pull-up is powering the external device from nRF52 VCC via 2k pull-up into external device input pin via external device schottky diode protection to external device internal power Vcc.

    We know this because the Rx pin is dragged down to 1.45 volts by the external device power rail loading.

    When the external device is off RX Pin voltage is +0.72V. In this case the nRF DK cannot start advertising.
    If you add a 2kOhm pull-up resister RX pin voltage is +1.45V

    In general two devices with different power rails sharing a common ground must be correctly isolated if one is powered up at a different time to the other.

    Test this theory by removing any connection between Rx and the external device, keep Rx pullup in place,  power up both devices, then connect the Rx line to the external device. It should work fine.

Children
No Data
Related