|
From: | Michele Bavaro |
Subject: | [Discuss-gnuradio] Re: firmware, did anyone verify hook_fgv ? |
Date: | Mon, 3 Dec 2007 17:34:02 +0100 |
Dear all,
I modified a little the firmware of a usrp-based device.
I wanted to check the buffer overrun event on the BULK IN EP2 FIFO, but the interrupt autovectoring mechanism doesn't work.
The following code
static void
isr_EP2FULLFLAG (void) interrupt
{
clear_fifo_gpif_irq ();
IOD ^= 0x01;
_usb_rx_overrun++;
}
void install_handlers (void)
{
setup_descriptors (); // ensure that they're set before use
hook_uv (UV_SUDAV, (WORD) isr_SUDAV);
hook_uv (UV_USBRESET, (WORD) isr_USBRESET);
hook_uv (UV_HIGHSPEED, (WORD) isr_HIGHSPEED);
hook_fgv (FGV_EP2FF, (WORD) isr_EP2FULLFLAG);
SYNCDELAY; EP2FIFOIE = 0x01; /* The FF on the EP2, which is BULK IN */
SYNCDELAY;
USBIE = bmSUDAV | bmURES | bmHSGRANT;
}
I don't see any changes in the port D bit 0 or _usb_rx_overrun variable, even in case of the EP2 overrun, which I can less efficiently verify with EP2468STAT or EP24FIFOFLGS (and maybe EP2CS as well).
Any clue? Did someone ever try hook_fgv?
Regards,
Mic
[Prev in Thread] | Current Thread | [Next in Thread] |