AnsweredAssumed Answered

Core Access to an External Port Buffer (EPBx) is Hung

Question asked by tsuki on Sep 16, 2009
Latest reply on May 23, 2011 by Mitesh



I'm using a SHARC 21160 chip, and I'm seeing some kind of interrupt-related problem which *usually* causes the processor to lock up with the error message "Core Access to an External Port Buffer (EPBx) is Hung".


The chip is on a board with an FPGA, and the two communicate using shared memory.  (My knowledge is a bit hazy here as I wasn't involved with the board design or the FPGA code.)  The function that is causing issues is receiving from a serial UART.  The FPGA manages this - when it receives a character, it places it in a certain location in shared memory, then fires an interrupt at the SHARC to let it know that new data has arrived.


On the SHARC, I associate that interrupt with a particular function, i.e. "interrupt(SIG_IRQ0, UARTInterrupt);" where UARTInterrupt is the name of my function.  This problem does not occur when the interrupt is ignored (after "interrupt(SIG_IRQ0, SIG_IGN);"), only when it is associated with a function.  The problem *does* occur even if UARTInterrupt is empty (i.e. "void UARTInterrupt(void) {}").


It seems to be related to the rate at which the interrupt is called.  If I set a serial client on a PC to send one character every 0.2 seconds, I never see the problem.  If, however, I hold down a key causing characters to be sent faster, I get this problem within a few seconds.  If I paste in a big block of text and send it all at once, the problem happens immediately.


The baud rate is set at 38400b/s, could it be that this causes interrupts to fire too quickly (maybe one's firing before it's finished dealing with UARTInterrupt() from last time - but in which case, why does the problem persist when UARTInterrupt() is empty)?  Unfortunately, I have no access to change the baud rate that the FPGA uses.


Is there an interrupt queue, some kind of stack of interrupts-waiting-to-happen that we're overfilling?  The fact that the problem does not happen immediately when a key is held down would seem to suggest that something somewhere is filling up.  (If there's no such thing in the SHARC, it could of course be in the FPGA.)


To add further confusion, the "Core Access Hung" problem is not the only thing that can happen - sometimes, the chip resets itself instead.  This is rarer, happening 5 or so of the two dozen times I've caused this problem to occur.


If anyone has any clue what might be happening here, I'd be very grateful!




Ian Renton