Missing interrupts

Discussion around AT91RM9200 and SAM9 Series Products.

Moderator: nferre

rumcajs666
Posts: 3
Joined: Fri Dec 14, 2007 9:33 am

Missing interrupts

Wed Mar 02, 2016 10:51 am

Hi,

I've a problem with a missing interrupts.
My device is based on g25 and 3.10 kernel.
During usart transmissions there where many missing bytes. After doing some tests, it came that all data is leaving transmitter,
but not all data is receving by my device. The situation is on a first attached picture. Upper line shows RXRDY interrupts, bottom line shows incoming data. At some point interruts are missing for a some time (up to 20ms), after i'm receiving OVRE, and then RXRDY appears again. It's not periodically. It can happen few times per second or once per few seconds.

http://postimg.org/image/xgizh405n/

I thought this situation is specific only for serial port driver, but no.
There are an interrupts from timer (should be every 4ms), and gap is visible again.
http://postimg.org/image/5jh6k0k09/

When using i2c the same thing is happening.

My question is: how can i debug it?
blue_z
Location: USA
Posts: 1560
Joined: Thu Apr 19, 2007 10:15 pm

Re: Missing interrupts

Thu Mar 03, 2016 10:40 pm

rumcajs666 wrote:During usart transmissions there where many missing bytes. After doing some tests, it came that all data is leaving transmitter, but not all data is receving by my device.
Then you mean the issue is during USART reception.
Why are you using PIO rather than DMA?
rumcajs666 wrote:There are an interrupts from timer (should be every 4ms), and gap is visible again.
http://postimg.org/image/5jh6k0k09/
What is that depicting?
That doesn't look like an interrupt every 4msec. Why the ~50% duty cycle?

Regards
rumcajs666
Posts: 3
Joined: Fri Dec 14, 2007 9:33 am

Re: Missing interrupts

Fri Mar 04, 2016 5:31 pm

Thanky You for an answer.
Then you mean the issue is during USART reception.
Not only during USART reception, but i found this issue there.
Why are you using PIO rather than DMA?
USART was configured this way.
Driver is slightly modified and adjusting it to DMA requires work i'd like to avoid.
What is that depicting?
That doesn't look like an interrupt every 4msec. Why the ~50% duty cycle?
I'm running hardware timer, and gpio is being toggled in its interrupt handler, every 4ms.
That's the 50% duty.

http://postimg.org/image/oe041b4z3/
This is the same signal as before, but chart is magnified.
You can see line inside red circle in the middle, also signal width value in upper right corner.

One more thing. Event if usart is not in use, interrupts are also disappearing.

I know i can use DMA.
But problem with interrupt will stay, and can be an obstacle in future.

Regards.
blue_z
Location: USA
Posts: 1560
Joined: Thu Apr 19, 2007 10:15 pm

Re: Missing interrupts

Sat Mar 05, 2016 1:41 am

rumcajs666 wrote:I'm running hardware timer, and gpio is being toggled in its interrupt handler, every 4ms.
That's the 50% duty.
So you're inconsistent?
The event that happens every millisecond turns the GPIO on and off, but the less-frequent event just toggles the GPIO?
rumcajs666 wrote:One more thing. Event if usart is not in use, interrupts are also disappearing.
So what applications, services, daemons are executing on the system?
What changes have you made to the kernel, esp. to ISRs?

Use the occurrence counters in /proc/interrupts to find the active interrupts.
Then use GPIO pins to profile the active states of those ISRs.
If you cannot identify the high-priority interrupt that's causing the blocking, then you may have to instrument at91_irq_suspend() and at91_irq_resume().

Regards

Return to “SAM9 ARM9 MPU”

Who is online

Users browsing this forum: Google [Bot] and 2 guests