We are running in a Fatal Error during System Startup if we are introducing the second interface of EDD (this is a project of HP). Maybe there is an issue using the wrong instances (The basic ping and tcp/ip demo runs on this board, so it should be a sw issue).
Could someone have a look to the following definitions? The second interface is controlled by the symbol USE_EDD2.
Thanks.
Defines.h
=========
#define TSK_STACK_SIZE_EDD 512 // Memory ass. Ethernet Task
#define TSK_STACK_SIZE_EDD_IRQ 1024 // Memory ass. Ethernet IRQ Task
#define INT_PRIO_EDD1 11
#define INT_PRIO_EDD2 10
#define TSK_PRIO_EDD1_IRQ TSK_PRIO_10
#define TSK_PRIO_EDD2_IRQ TSK_PRIO_11
#define TSK_PRIO_EDD1 TSK_PRIO_46
#define TSK_PRIO_EDD2 TSK_PRIO_47
#define TSK_TOK_EDD1_IRQ TSK_TOK_10
#define TSK_TOK_EDD2_IRQ TSK_TOK_11
#define TSK_TOK_EDD1 TSK_TOK_46
#define TSK_TOK_EDD2 TSK_TOK_47
System_Startup.c
================
STATIC CONST FAR RX_INTERRUPT_SET_T atrXInt[] =
{
{
{"SYSTIMER",RX_PERIPHERAL_TYPE_INTERRUPT,0}, // System Timer interrupt
SRT_NETX_VIC_IRQ_STAT_timer0, // Use external Timer0 Interrupt
INT_PRIO_SYSTIMER, // Priority, defined in defines.h
RX_INTERRUPT_MODE_SYSTEM, // Allow interrupt to be a thread
RX_INTERRUPT_EOI_AUTO, // EOI self by RX
RX_INTERRUPT_TRIGGER_RISING_EDGE, // Edge triggered
RX_INTERRUPT_PRIORITY_STANDARD, // Normal Priority
RX_INTERRUPT_REENTRANCY_DISABLED, // Interrupt itself is not reentrant
}
// Edd interupts
#ifdef USE_EDD1
,
{{"COM0",RX_PERIPHERAL_TYPE_INTERRUPT,0}, /* Communication Channel, Instance 0 */
SRT_NETX_VIC_IRQ_STAT_com0, /* Use external communication channel 0 Interrupt */
INT_PRIO_EDD1, /* Priority */
RX_INTERRUPT_MODE_TASK, /* Allow interrupt to be a thread */
RX_INTERRUPT_EOI_AUTO, /* EOI self by RX */
RX_INTERRUPT_TRIGGER_RISING_EDGE, /* Edge triggered */
RX_INTERRUPT_PRIORITY_STANDARD, /* Normal Priority */
RX_INTERRUPT_REENTRANCY_DISABLED, /* Interrupt itself is not reentrant */
TSK_PRIO_EDD1_IRQ, /* Task Mode Priority */
TSK_TOK_EDD1_IRQ, /* Task Token */
TSK_STACK_SIZE_EDD_IRQ /* Task Stack Size */
}
#endif
#ifdef USE_EDD2
,
{{"COM1",RX_PERIPHERAL_TYPE_INTERRUPT,1}, /* Communication Channel, Instance 0 */
SRT_NETX_VIC_IRQ_STAT_com1, /* Use external communication channel 0 Interrupt */
INT_PRIO_EDD2, /* Priority */
RX_INTERRUPT_MODE_TASK, /* Allow interrupt to be a thread */
RX_INTERRUPT_EOI_AUTO, /* EOI self by RX */
RX_INTERRUPT_TRIGGER_RISING_EDGE, /* Edge triggered */
RX_INTERRUPT_PRIORITY_STANDARD, /* Normal Priority */
RX_INTERRUPT_REENTRANCY_DISABLED, /* Interrupt itself is not reentrant */
TSK_PRIO_EDD2_IRQ, /* Task Mode Priority */
TSK_TOK_EDD2_IRQ, /* Task Token */
TSK_STACK_SIZE_EDD_IRQ /* Task Stack Size */
}
#endif
};
// Edd instances
#ifdef USE_EDD1
STATIC CONST FAR RX_EDD_MAC_ADDR_T tMyMac0={0x00,0x6e,0x65,0x74,0x78,0xCE};
CONST FAR RX_EDD_PARAMETERS_T atrXEdd0Param[]=
{
{RX_EDD_PARAM_MAC_ADDR, &tMyMac0, 0}, /* eParamType, pvParam, ulInstance */
{RX_EDD_PARAM_XPEC_NAME, "XPEC", 0},
{RX_EDD_PARAM_XMAC_RPU_NAME, "XMACRPU", 0},
{RX_EDD_PARAM_XMAC_TPU_NAME, "XMACTPU", 0},
{RX_EDD_PARAM_INTERRUPT_NAME, "COM0", 0},
{RX_EDD_PARAM_PHY_NAME, "PHY", 0},
{RX_EDD_PARAM_END_OF_LIST}
};
#endif
#ifdef USE_EDD2
STATIC CONST FAR RX_EDD_MAC_ADDR_T tMyMac1={0x00,0x6e,0x65,0x74,0x78,0xCF};
CONST FAR RX_EDD_PARAMETERS_T atrXEdd1Param[]=
{
{RX_EDD_PARAM_MAC_ADDR, &tMyMac1, 1}, /* eParamType, pvParam, ulInstance */
{RX_EDD_PARAM_XPEC_NAME, "XPEC", 1},
{RX_EDD_PARAM_XMAC_RPU_NAME, "XMACRPU", 1},
{RX_EDD_PARAM_XMAC_TPU_NAME, "XMACTPU", 1},
{RX_EDD_PARAM_INTERRUPT_NAME, "COM1", 1},
{RX_EDD_PARAM_PHY_NAME, "PHY", 1},
{RX_EDD_PARAM_END_OF_LIST}
};
#endif
STATIC CONST FAR RX_EDD_SET_T atrXEdd[] = {
#ifdef USE_EDD1
{{"EDD1",RX_PERIPHERAL_TYPE_EDD,0}, /* Ethernet Device Driver */
0, /* Number of Edd Unit to use */
"SD2 EDD1", /* NIC name */
RX_EDD_MODE_DEFAULT, /* edd mode */
FALSE, /* resource control enabled? */
(RX_EDD_PARAMETERS_T FAR*) atrXEdd0Param, /* pointer to parameter array */
&trXEddHalNetX /* pointer to hal operations */
}
#ifdef USE_EDD2
,
#endif
#endif
#ifdef USE_EDD2
{{"EDD2",RX_PERIPHERAL_TYPE_EDD,1}, /* Ethernet Device Driver */
1, /* Number of Edd Unit to use */
"SD2 EDD2", /* NIC name */
RX_EDD_MODE_DEFAULT, /* edd mode */
FALSE, /* resource control enabled? */
(RX_EDD_PARAMETERS_T FAR*) atrXEdd1Param, /* pointer to parameter array */
&trXEddHalNetX /* pointer to hal operations */
}
#endif
};
STATIC CONST FAR RX_DRIVER_PERIPHERAL_CONFIG_T atrXDrvCfgPost[] =
{
{DrvPioInit, RX_PERIPHERAL_TYPE_PIO,atrXPio,MAX_CNT(atrXPio)},
{DrvHifPioInit, RX_PERIPHERAL_TYPE_HIFPIO,atrXHifPio,MAX_CNT(atrXHifPio)},
// {DrvXcInit, RX_PERIPHERAL_TYPE_XC, NULL, 0},
{DrvUrtInit, RX_PERIPHERAL_TYPE_UART, NULL, 0},
{DrvPhyInit, RX_PERIPHERAL_TYPE_PHY,atrXPhy, MAX_CNT(atrXPhy)},
{DrvXcInit,RX_PERIPHERAL_TYPE_XC,atrXXc,MAX_CNT(atrXXc)},
{DrvFifInit, RX_PERIPHERAL_TYPE_FIFOCHANNEL, atrXFif, MAX_CNT(atrXFif)},
{(DrvInitF)DrvEddInit, RX_PERIPHERAL_TYPE_EDD, atrXEdd, MAX_CNT(atrXEdd)}
};
OK, at least there a some hints to check something.
Let's see ;-)
Thanks
It's working now. As expected and shown in your snippet the problem was in defining the instances and their ids. I do have problems to understand the concept behind (looks a little bit redundant) but OK.
Martin
Hilscher Gesellschaft fuer Systemautomation mbH
Hi,
the most important message is, that it is now running on your side :D
Andreas Jacob
Hilscher Gesellschaft fuer Systemautomation mbH
Hi,
enclosed are some config.c file settings:
Please note, this is only an example.