I want to change an IRQ to an FIQ in my system.
The steps I've done are:
- create a RX_FIQ_SET_T array just like the RX_INTERRUPT_SET_T array with an object for the new item:
static const RX_FIQ_SET_T atrXFiqInt[] = {
{
{"WATCHDOG",RX_PERIPHERAL_TYPE_FIQ,0}, /* Watchdog 1st Stage Interrupt */
SRT_NETX_VIC_FIQ_STAT_watchdog, /* Use Watchdog Interrupt */
},
};
- Added this to the peripherals list:
static const RX_PERIPHERAL_CONFIG_T atrXCfgPre[] = {
{(RX_PERIPHERAL_TYPE)RX_PERIPHERAL_TYPE_TIMER,atrXHwTim,MAX_CNT(atrXHwTim)},
{(RX_PERIPHERAL_TYPE)RX_PERIPHERAL_TYPE_INTERRUPT,atrXInt,MAX_CNT(atrXInt)},
{(RX_PERIPHERAL_TYPE)RX_PERIPHERAL_TYPE_FIQ,atrXFiqInt,MAX_CNT(atrXFiqInt)},
};
- When I call:
erXRes = Drv_FiqIdentifyInterrupt("WATCHDOG",0,&hMyInt);
I get DRV_FIQ_UNKNOWN.
What am I not doing correctly ?
Thanks,
Thank you. That resolved the issue.
How do I figure that out from the documentation or code ? Are interrupt and timers exceptions and everything else goes in the atrXDrvCfgPost[] ?
Hilscher Gesellschaft fuer Systemautomation mbH
Hi,
good question. I assume it is not really good documented in the manuals.
The only drivers you put into the atrXCfgPre structure are the Timer and the Interrupt.
All the others you put into the atrXDrvCfgPost structure.
Hi, I am also interested in using FIQ. Where is the documentation, are there any examples for this - nothing is found in the last rcX_Driver.pdf and rest of the PDF's in the rcX OS download archive (even in 2.0.8.0 beta release)?
Drv_FiqIdentifyInterrupt() is not documented. Are there any more limits about the rcX functions that are allowed to be called in the FIQ handler, or the limitations are same like defined for vectored interrupts?
A small example will be very helpful ...
Best regards,
Hilscher Gesellschaft fuer Systemautomation mbH
Hi,
the functions of the FIQ-driver are comparable with the ones from the IRQ-drivers.
If you have already an IRQ example you only need to change the IRQ into FIQ.
IMPORTANT: It is not allowed to call any rcX function inside of the FIQ handler!
The atrXDrvCfgPre is not an exception block.
It is just referring to a block of resources which can be initialized without a
Drv*Init function.
Regards
AJ
Andreas Jacob
Hilscher Gesellschaft fuer Systemautomation mbH
Hi poddw,
you call the DrvFiqInit on the wrong structure.
Wrong call:
/* Wrong structure for the FIQ driver */ static const RX_PERIPHERAL_CONFIG_T atrXCfgPre[] = { {(RX_PERIPHERAL_TYPE)RX_PERIPHERAL_TYPE_TIMER,atrXHwTim,MAX_CNT(atrXHwTim)}, {(RX_PERIPHERAL_TYPE)RX_PERIPHERAL_TYPE_INTERRUPT,atrXInt,MAX_CNT(atrXInt)},/* remove the following line */
{(RX_PERIPHERAL_TYPE)RX_PERIPHERAL_TYPE_FIQ,atrXFiqInt,MAX_CNT(atrXFiqInt)},
};
Please add the following line into the "atrXDrvCfgPost" structure:
{DrvFiqInit, (RX_PERIPHERAL_TYPE)RX_PERIPHERAL_TYPE_FIQ,atrXFiqInt,MAX_CNT(atrXFiqInt)},