Hello all,
I configured the UART Receive interrupt (149) as shown below. I am using the C6678 evaluation board. when I use
CpIntc_postSysInt(0, 149);
to post interrupt, everything works fine, but when I disable this line and use a hyperterminal to communicate with the board (UART over mini-USB connector), NO interrupt occurs? Any idea?
Void UART_Rx_hwi(UArg arg)
{
platform_uart_write('H');
// System_printf("in event15Fxn(0x%x)\n", (Int)arg);
}
int UART_init(void)
{
Hwi_Params params;
Int hostInt, sysInt;
int eventId;
(void) platform_uart_init();
(void) platform_uart_set_baudrate(115200);
(void) platform_write_configure(PLATFORM_WRITE_ALL);
sysInt = 149;
hostInt = 32;
CpIntc_mapSysIntToHostInt(0, sysInt, hostInt);
CpIntc_dispatchPlug(sysInt, UART_Rx_hwi, sysInt, TRUE);
CpIntc_enableHostInt(0, hostInt);
eventId = CpIntc_getEventId(hostInt);
Hwi_Params_init(¶ms);
params.arg = hostInt;
params.eventId = eventId;
params.enableInt = TRUE;
params.priority = 2;
Hwi_create(5, &CpIntc_dispatch, ¶ms, NULL);
Hwi_enableInterrupt(5);
Hwi_enable();
return 1;
}
Void idle0Fxn(Void)
{
System_printf("setting event 15 ...\n");
// CpIntc_postSysInt(0, 149);
}