etpuUART problem
Posted: Mon Feb 01, 2010 10:36 am
Dear Sir,
I am using interrupts and an RS232 port. The interrupt works fine.
The RS232 is not working if I include
ETPU_Interrupt_Routine = ENC_ETPU_ISR;
kindly advice.
Regards
Rajasekar
int ENC_ETPU_ISR(int channel)
{
switch(channel){
case ENCA_P1:{
break;
}
}
eTPUEventClear(channel); // Clear event so cahnnel can interrupt again
return 0;
}
void InitETPUIntr(void){
ETPU_Interrupt_Routine = ENC_ETPU_ISR;
fs_etpu_gpio_cfg_input_trans(ENCA_P1, FS_ETPU_OP_LOW);
eTPUInterruptEnable(ENCA_P1);
}
#define ATXCH 14
#define ARXCH 15
#define UART_RX_CHANNEL (15) // Defines which eTPU channel will be UART RX
#define UART_TX_CHANNEL (14) // Defines which eTPU channel will be UART TX
void SerialInit(void){
eTPUfdx = eTPUFDUartOpen(ARXCH, ATXCH);
}
I am using interrupts and an RS232 port. The interrupt works fine.
The RS232 is not working if I include
ETPU_Interrupt_Routine = ENC_ETPU_ISR;
kindly advice.
Regards
Rajasekar
int ENC_ETPU_ISR(int channel)
{
switch(channel){
case ENCA_P1:{
break;
}
}
eTPUEventClear(channel); // Clear event so cahnnel can interrupt again
return 0;
}
void InitETPUIntr(void){
ETPU_Interrupt_Routine = ENC_ETPU_ISR;
fs_etpu_gpio_cfg_input_trans(ENCA_P1, FS_ETPU_OP_LOW);
eTPUInterruptEnable(ENCA_P1);
}
#define ATXCH 14
#define ARXCH 15
#define UART_RX_CHANNEL (15) // Defines which eTPU channel will be UART RX
#define UART_TX_CHANNEL (14) // Defines which eTPU channel will be UART TX
void SerialInit(void){
eTPUfdx = eTPUFDUartOpen(ARXCH, ATXCH);
}