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.

Reply
  • 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.

Children
  • Im not using SoftDevice as I wrote before, so no BLE communications and there is no other interrupts happening before the first UART communication completes.

  • Hmm, have you checked if the nRF chip has generated any error like framing error or so? If you are not using softdevice, then this is the only explanation i can think of that there are some errors while receiving the data.

  • Actually I just checked and I get 13 in ERRORSRC. How do I deal with it? It doesnt happen if after programming I completely power off the system and then turn it on again.

  • if you received 1101'b This means that you have got

    1. overrun error. Which means that your RXD FIFO was full and yet there was new character received. Means your application is not reading bytes fast enough from uart. This happens if you transmit bytes from GSM larger than UART RX fifo size (6 bytes) and have not read anything from your nRF51 side.

    2. Framing error. Your GSM module and nRF chip got out of sync as no valid stop bit was detected.

    3. break condition detected.

    error 2) and 3) occurred as the RX line was low for more than it should. you should check why your GSM module is sending such data!!

  • Is there anything on nrf side that I could do to fix that? Can I reset UART somehow to recover from this? If I connect the output to a terminal on PC I dont see any extra data being sent, so i cant say that GSM does something wrong.

    GSM might send a corrupted character when it reboots, but then afterwards it doesnt send anything unless it gets a request from nrf. But nrf seems unable to recover from erroneous state.

Related