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

NRF_SERIAL_EVENT_DRV_ERR on initialization

Using SDK15.3 on 52840.  I've got a UART set up talking to something at 9600 baud..

The short course here is that imediately after init, I get an IRQ with a NRF_SERIAL_EVENT_DRV_ERR.  I can send things on the UART but it's not seeing things coming in.

Setup of the UART is:

NRF_SERIAL_DRV_UART_CONFIG_DEF(m_uart0_drv_config,
                     RX_PIN, TX_PIN,
                      NRF_UART_PSEL_DISCONNECTED, NRF_UART_PSEL_DISCONNECTED,       // no flow control pins
                      NRF_UART_HWFC_DISABLED, NRF_UART_PARITY_EXCLUDED,
                      NRF_UART_BAUDRATE_9600,
                      UART_DEFAULT_CONFIG_IRQ_PRIORITY);

#define SERIAL_FIFO_TX_SIZE 32
#define SERIAL_FIFO_RX_SIZE 32

NRF_SERIAL_QUEUES_DEF(serial_queues, SERIAL_FIFO_TX_SIZE, SERIAL_FIFO_RX_SIZE);

#define SERIAL_BUFF_TX_SIZE 1
#define SERIAL_BUFF_RX_SIZE 20                // this is plenty slow so let's make this not huge anyway

NRF_SERIAL_BUFFERS_DEF(serial_buffs, SERIAL_BUFF_TX_SIZE, SERIAL_BUFF_RX_SIZE);
//
// we're going to run this thing in IRQ mode and deal with it from there.  This is slow
NRF_SERIAL_CONFIG_DEF(serial_config, NRF_SERIAL_MODE_IRQ,
                      &serial_queues, &serial_buffs, Xbee_ISR_Interrupt, NULL);


NRF_SERIAL_UART_DEF(serial_uart, 0);

Call to Init is:

    ret = nrf_serial_init(&serial_uart, &m_uart0_drv_config, &serial_config);

which is returning 0...

Right after this I get an IRQ with that NRF_SERIAL_EVENT_DRV_ERR.  After this I can send out (correctly) stuff on the TX pin (correct baud rates and everything) but it's completely missing anything on the that is coming back in.  I get no IRQs on it at all.

Any hints at what to look for here?

Parents
  • Hi there,

    What is the state of the RX pin when you initialize the module, and have you verified that you're using the same setup on both sides(flow control, baud rate etc). You can read out what kind of error that you're getting by checking the ERRORSRC register in debug mode. 

    regards

    Jared 

  • RX pin is low for awhile and then comes up when I release the reset pin on the device I'm talking to.  It is doing hardware flow control but I'm bit banging that because of the particular behaviour it does.

    Nothing really strange really.

    If I had to guess it's showing a break condition.  No big deal.  The problem is that the driver then never comes back from that and allows the this to receive the traffic.

    So the central question here is this: How do I reset the RX part of this thing when it gets bent out of shape because the line isn't what it expects at that point.   What's the API call to get it to ignore things?

Reply
  • RX pin is low for awhile and then comes up when I release the reset pin on the device I'm talking to.  It is doing hardware flow control but I'm bit banging that because of the particular behaviour it does.

    Nothing really strange really.

    If I had to guess it's showing a break condition.  No big deal.  The problem is that the driver then never comes back from that and allows the this to receive the traffic.

    So the central question here is this: How do I reset the RX part of this thing when it gets bent out of shape because the line isn't what it expects at that point.   What's the API call to get it to ignore things?

Children
Related