Uploaded image for project: 'Embedded Software & Tools'
  1. Embedded Software & Tools
  2. EXT_EP-9703

CC13XX-CC26XX: ADCBuf HWI do not check for FIFO overflows, causing possible ISR hangups.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium
    • TI Device Drivers
    • TIDRIVERS-4068
    • TIDRIVERS_4_30_01
    • TIDRIVERS_5_10_00
    • Hide
      CC13x2
      CC26x2
      Show
      CC13x2 CC26x2

      Issue:

      If there (for any reason really) happens to be a starvation for the ADC DMA channel or the ADC ISR, the ADC could end up overflowing the internal FIFO.

      As the overflow/underflow flags are part of the the combined ADC_IRQ event, this would cause the ADCBuf driver to get stuck in an forever Hwi loop as the ADCBuf driver do not handle these events. In order for the ADC_IRQ to be cleared again, the driver need to flush the FIFO following an overflow/underflow.

      How to reproduce:

      Run the ADCBuf example from the SDK, put a breakpoint down inside the callback function. After hitting the breakpoint, the callback will not be invoked again and the serial port will be silent. Stepping into the driver one can see it spins around the Hwi function.

      Possible solution:

      **Check for overflow/underflow events, and when needed, flush the ADC FIFOs before continuing, e.g:

      /* Was there an ADC overflow? */
      int32_t status = AUXADCGetFifoStatus();
      if (status & AUXADC_FIFO_OVERFLOW_M)

      {     AUXADCFlushFifo(); }

      Another option would be to abort with an error (but there is no good way of doing this as of today).

            syncuser TI User
            syncuser TI User
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: