Sign in

username:

password:



Not a member?

Search c54x



Search tips

Subscribe to c54x



c54x by Keywords

5409 | 5416 | AD5 | ADC | BIOS | Boot | Booting | Bootloader | C540 | C5402 | C5409 | C5416 | CCS | Codec | DMA | Dmad | DSK | DSKPlus | Dsplib | EVM | FFT | FIR | Flash | GPIO | HPI | Initialization | Interrupt | JTAG | LOG_printf | MCBSP | RFFT | RTDX | Sampling | STLM | UART | VC540

Discussion Groups

Discussion Groups | TMS320C54x | interrupts of uart

Technical discussions about the TI C54x DSPs (including the c5401, c5402, c5402a, c5404, c5407, c5409, c5409a, c5410, c5410a, c5416, c5420, c5421, c5441, c549, c5470 and c5471).

  

Post a new Thread

interrupts of uart - Roberto Espinosa - Nov 15 19:44:00 2003



Hello,
I am using the uart in the 5402. I would like to have a program (in C code if
possible) that triggers an interrupt when it has received a data.
Could you help?
I have connected 2 with 3, 3 with 2 and 5 with 5. Does I need to use any more
connections?
I have used this program but my isr does not execute.
Could you provide a program for my purpose?

UartBaud baud= UART_BAUD_9600; //set 1 stop bit
parity = UART_EVEN_PARITY; //enable even parity
fifoControl = UART_FIFO_ENABLE; //enable FIFO control
loopEnable = UART_LOOPBACK;
UartWordLen wlen=UART_WORD8
UartStopBits stopBits=UART_STOP1;
UartFifoControl fifoControl=UART_FIFO_ENABLE;
UartLoop loopEnable = UART_NOLOOPBACK;
uart_init()
uart_reset();
uart_setup(UartBaud baud, UartWordLen wlen, UartStopBits stopBits, UartParity
parity, UartFifoControl fifoControl, UartLoop loopenable);
port4&=0xffef; /*associate int1 with uart*/
if( uart_interrupt_control(uart_rint, True) == OK )
{printf( “UART interrupt enabled\n");
}
if( uart_interrupt_hook(uartIsr) == OK )
{printf( “UART interrupt hook created\n\n” );
}
while(1)/*waiting for interrupts*/
{
} void uartIsr(void)
{
printf( “ ***** Interrupt occurred ***** \n”);
return;
}

I can see in the screen the two first printf but I do not see the printf of the
Isr.
Yours faithfully,
Roberto Espinosa
Espeleologic Devices.
---------------------------------

    Antivirus • Filtros antispam • 6 MB gratis
    ¿Todavía no tienes un correo inteligente?




(You need to be a member of c54x -- send a blank email to c54x-subscribe@yahoogroups.com )