I using ASCLIN module in usart mode. After Tx, calling interrupt with priority 10, as i sets in OIL and iLLD configuration. The first byte is sent by the microcontroller is normally received by the PC. After that, microcontroller has cycled by " osEE_tc_core0_isr_dummy_entry_10". This dummy entry does not contain a jump instruction to asclin0TxISR.
My question: why is my interrupt handler not called there?
Interrupt mechanism type is Hardware, by commented define in Ifx_Cfg.h
Code: Select all
//#define IFX_USE_SW_MANAGED_INT
Code: Select all
CPU test_application {
ALARM AlarmMaster_500ms {
ACTION = ACTIVATETASK {
TASK = TaskTempMeasureMaster;
};
AUTOSTART = TRUE {
ALARMTIME = 50;
CYCLETIME = 50;
};
COUNTER = system_timer_master;
};
APPDATA tricore_mc {
APP_SRC = "master.c";
APP_SRC = "slave1.c";
APP_SRC = "slave2.c";
};
COUNTER system_timer_master {
CPU_ID = 0x0;
MINCYCLE = 1;
MAXALLOWEDVALUE = 2147483647;
TICKSPERBASE = 1;
SECONDSPERTICK = 0.01;
TYPE = HARDWARE {
PRIORITY = 2;
DEVICE = "STM_SR0";
SYSTEM_TIMER = TRUE;
};
};
EVENT RemoteEvent {
MASK = AUTO;
};
ISR asclin0Tx {
CPU_ID = 0x0;
CATEGORY = 2;
SOURCE = "ASCLIN0TX";
PRIORITY = 10;
HANDLER = "asclin0TxISR";
};
OS EE {
EE_OPT = "OSEE_DEBUG";
EE_OPT = "OSEE_ASSERT";
EE_OPT = "OS_EE_APPL_BUILD_DEBUG";
EE_OPT = "OS_EE_BUILD_DEBUG";
STATUS = EXTENDED;
ERRORHOOK = TRUE;
USERESSCHEDULER = FALSE;
USEORTI = TRUE;
KERNEL_TYPE = OSEK {
CLASS = ECC1;
RQ = LL;
};
CPU_DATA = TRICORE {
ID = 0x0;
CPU_CLOCK = 300.0;
COMPILER = GCC;
MULTI_STACK = TRUE {
IRQ_STACK = FALSE;
SHARED_STACK = FALSE;
};
IDLEHOOK = TRUE {
HOOKNAME = "idle_hook_core0";
};
};
CPU_DATA = TRICORE {
ID = 0x1;
COMPILER = GCC;
MULTI_STACK = TRUE {
IRQ_STACK = FALSE;
SHARED_STACK = FALSE;
};
IDLEHOOK = TRUE {
HOOKNAME = "idle_hook_core1";
};
};
CPU_DATA = TRICORE {
ID = 0x2;
COMPILER = GCC;
MULTI_STACK = TRUE {
IRQ_STACK = FALSE;
SHARED_STACK = FALSE;
};
IDLEHOOK = TRUE {
HOOKNAME = "idle_hook_core2";
};
};
BOARD_DATA = NO_BOARD;
MCU_DATA = TC29X {
DERIVATIVE = "tc299tf";
REVISION = "DC";
};
USEDYNAMICAPI = FALSE;
USEEXTENSIONAPI = FALSE;
STACKMONITORING = FALSE;
};
TASK TaskTempMeasureMaster {
PRIORITY = 7;
CPU_ID = 0x0;
ACTIVATION = 1;
SCHEDULE = FULL;
AUTOSTART = TRUE;
STACK = SHARED;
};
TASK TaskSlave1 {
PRIORITY = 8;
CPU_ID = 0x1;
ACTIVATION = 1;
SCHEDULE = FULL;
AUTOSTART = TRUE;
STACK = PRIVATE {
SIZE = 256;
};
EVENT = RemoteEvent;
};
TASK TaskSlave2 {
PRIORITY = 9;
CPU_ID = 0x2;
ACTIVATION = 1;
SCHEDULE = FULL;
AUTOSTART = TRUE;
STACK = PRIVATE {
SIZE = 256;
};
};
};
Code: Select all
#define IFX_INTPRIO_ASCLIN0_TX 10
#define IFX_INTPRIO_ASCLIN0_RX 11
#define IFX_INTPRIO_ASCLIN0_ER 12
IFX_INTERRUPT(asclin0TxISR, 0, IFX_INTPRIO_ASCLIN0_TX);
IFX_INTERRUPT(asclin0RxISR, 0, IFX_INTPRIO_ASCLIN0_RX);
IFX_INTERRUPT(asclin0ErISR, 0, IFX_INTPRIO_ASCLIN0_ER);
void asclin0TxISR()
{
IfxAsclin_Asc_isrTransmit(&asc);
}
void asclin0RxISR()
{
IfxAsclin_Asc_isrReceive(&asc);
}
void asclin0ErISR()
{
IfxAsclin_Asc_isrError(&asc);
}
Code: Select all
// used globally
IfxAsclin_Asc asc;
void initASC0()
{
// create module config
IfxAsclin_Asc_Config ascConfig;
IfxAsclin_Asc_initModuleConfig(&ascConfig, &MODULE_ASCLIN0);
// set the desired baudrate
ascConfig.baudrate.prescaler = 1;
ascConfig.baudrate.baudrate = 115200; // FDR values will be calculated in initModule
// ISR priorities and interrupt target
ascConfig.interrupt.txPriority = IFX_INTPRIO_ASCLIN0_TX;
ascConfig.interrupt.rxPriority = IFX_INTPRIO_ASCLIN0_RX;
ascConfig.interrupt.erPriority = IFX_INTPRIO_ASCLIN0_ER;
ascConfig.interrupt.typeOfService = IfxCpu_Irq_getTos(IfxCpu_getCoreIndex());
// FIFO configuration
ascConfig.txBuffer = &ascTxBuffer;
ascConfig.txBufferSize = ASC_TX_BUFFER_SIZE;
ascConfig.rxBuffer = &ascRxBuffer;
ascConfig.rxBufferSize = ASC_RX_BUFFER_SIZE;
// pin configuration
const IfxAsclin_Asc_Pins pins = {
NULL, IfxPort_InputMode_pullUp, // CTS pin not used
&IfxAsclin0_RXB_P15_3_IN, IfxPort_InputMode_pullUp, // Rx pin
NULL, IfxPort_OutputMode_pushPull, // RTS pin not used
&IfxAsclin0_TX_P15_2_OUT, IfxPort_OutputMode_pushPull, // Tx pin
IfxPort_PadDriver_cmosAutomotiveSpeed1
};
ascConfig.pins = &pins;
// initialize module
IfxAsclin_Asc_initModule(&asc, &ascConfig);
}