SWRZ101B December   2021  – December 2023 AM2732 , AM2732-Q1

 

  1.   1
  2.   Abstract
  3. 1Silicon Usage Notes and Advisories Matrices
    1.     Devices Supported
  4. 2 Usage Notes and Advisories
    1.     Silicon Usage Notes
      1.      i2293
      2.      i2295
      3.      i2300
      4.      i2324
      5.      i2364
      6.      i2389
      7.      i2390
    2.     Silicon Advisories
      1.      i2162
      2.      i2288
      3.      i2289
      4.      i2294
      5.      i2297
      6.      i2298
      7.      i2299
      8.      i2301
      9.      i2302
      10.      i2309
      11.      i2315
      12.      i2318
      13.      i2329
      14.      i2336
      15.      i2337
      16.      i2338
      17.      i2339
      18.      i2340
      19.      i2341
      20.      i2342
      21.      i2344
      22.      i2345
      23.      i2387
      24.      i2392
      25.      i2394
      26.      i2386
  5.   Trademarks
  6. 3Revision History

i2162


R5FSS: The Same Interrupt Cannot be Nested Back-2-Back Within Another Interrupt

Details:

The nesting (preemption) of the same high priority interrupt inside a low priority interrupt is not possible for the second and subsequent times. The second occurrence of the high priority interrupt has to wait until the program exits the lower priority interrupt service routine (ISR). The issue only occurs if the high priority interrupt following a current preemption is the same as the one which caused the original preemption. If a different interrupt preempts the low priority ISR before the second occurrence of the original higher priority interrupt then there is no issue. This issue impacts both Vector Interface Method and MMR Interface Method of interrupt handling in VIM. The issue impacts both FIQ and IRQ interrupts.

Workaround(s):

A software workaround exists. The objective of the SW workaround is to prevent back-2-back activation of the same interrupt, thereby removing the necessary condition of the bug. This can be achieved by reserving the highest priority level (Priority-0), and using that priority for a dummy interrupt (any one out of 512 interrupts available in R5FSS), and calling this dummy interrupt inside every ISR. Further, the R5FSS core itself need not enter this dummy ISR (it can be masked), only the handshake with VIM around this dummy ISR needs to happen.

A sample pseudo-code is shown below. If required, TI can provide the necessary drivers which implement this workaround.

any_isr_routine {
...
1:      set I/F bit in CPSR ; //so R5FSS cannot be interrupted again. I for irq, F for fiq
2:      Trigger dummy_intr; //writing 1'b1 to Interrupt RAW Status/Set Register bit in VIM corresponding to the chosen dummy_intr
3:       rd_irqvec; //Read IRQVEC register in VIM to acknowledge dummy_isr
4:       clear dummy_isr; //writing 1'b0 to Interrupt RAW Status/Set Register bit in VIM corresponding to the chosen dummy_intr
5:       wr_irqvec;//Write to IRQVEC register in VIM to denote end of interrupt
6:       clear I/F bit in CPSR;
…
}
Note: Depending on where the workaround code is inserted in the ISR, step 1 & 6 may not be needed.

The draw-backs with this workaround are, Priority-0 cannot be used (only Priority 1-15 are available), and the added latency in ISR execution.