industrialNETworXnetx

poddw

poddw

| 19.01.2010 | 22:54 | 5 replies

FIQ configuration

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,

Andreas Jacob

Andreas Jacob

Hilscher Gesellschaft fuer Systemautomation mbH

| 20.01.2010 | 16:37

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)},

poddw

poddw

| 20.01.2010 | 17:06

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[] ?

Andreas Jacob

Andreas Jacob

Hilscher Gesellschaft fuer Systemautomation mbH

| 21.01.2010 | 09:03

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.

Krasi Gichev

Krasi Gichev

AMK

| 13.01.2011 | 10:57

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,

Andreas Jacob

Andreas Jacob

Hilscher Gesellschaft fuer Systemautomation mbH

| 14.01.2011 | 10:05

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

Login