This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

No RX on UART

Hi,

I'm using 51822 to control GSM module via UART (57600, no flow control). My device is USB and battery powered. After I program the chip I HAVE to disconnect all the power in order to start system clean and have it working. If I don't completely remove power on start nrf will send commands to GSM module, GSM module will recognize them and send a reply to nrf, but nrf won't get anything on RX (I'm using simple UART without interrupt and without softdevice).

What could it be? I also don't use 32khz xtal, so it synthesises clock from hf crystal.

Parents
  • UART needs HFCLK, not the Low frequency clock. Look at the image below from nRF51 Product Specification V3.1

    image description

    There is not enough information for us to narrow down the problem. Is your nRF device having any BLE activity along with UART traffic? If so then without flowcontrol it is bound to miss packets.

  • Yes thats what I tried to do. The thing is that Im actually trying to actively read UART (using the simple UART method) and I have a timer to prevent hanging. So the timeout is set to 3 seconds, if i dont receive anything in 3 seconds I send a command again to GSM and try to read.

    So you are saying i have to read the RX data, but there is nothing coming out of RX, basically I get stuck on this line:

    while (NRF_UART0->EVENTS_RXDRDY != 1 && !gsmTimeout){};

    I also make sure that GSM module is up and doesnt send anything at all before I clear UART, so it seems like UART cant recover from that problem and I dont understand why.

Reply
  • Yes thats what I tried to do. The thing is that Im actually trying to actively read UART (using the simple UART method) and I have a timer to prevent hanging. So the timeout is set to 3 seconds, if i dont receive anything in 3 seconds I send a command again to GSM and try to read.

    So you are saying i have to read the RX data, but there is nothing coming out of RX, basically I get stuck on this line:

    while (NRF_UART0->EVENTS_RXDRDY != 1 && !gsmTimeout){};

    I also make sure that GSM module is up and doesnt send anything at all before I clear UART, so it seems like UART cant recover from that problem and I dont understand why.

Children
No Data
Related