DSPRelated.com
Forums

How to invoke ISR for UART in DM6437

Started by saravana muthu January 27, 2009
Hi,

I am using TMS320DM6437 EVM for my project application. I need to do some task on UART (mainly receive routine).

My UART module is working fine in polling method at Baud 115200, But I need to use interrupt service based on my application. I have read the SPRA544 Application report and they have given a formula to calculate the vector address as follows Address = ISTP + 32* . In the Device specific datasheet it is stated that the '84' is the event number for UART0. I have configured the UART IER register to enable the Receive interrupt(ERBI = 1).

My query is :

1. Is it necessary to set the Global Interrupt Enable bit ? If so please guide me in which register I need to configure to do so.

2. # How to calculate ISTP value for UART0 Rx. After calculating the address of the ISR where should i configure ?

3. interrupt void {....}. Is this format for an ISR? If not, please correct me for the same

Note: Chip Support Library are not available for my target (DM6437)

_____________________________________
ersara,

On Tue, Jan 27, 2009 at 6:55 AM, saravana muthu wrote:
> Hi,
>
> I am using TMS320DM6437 EVM for my project application. I need to do some
> task on UART (mainly receive routine).
>
> My UART module is working fine in polling method at Baud 115200, But I need
> to use interrupt service based on my application. I have read the SPRA544
> Application report and they have given a formula to calculate the vector
> address as follows Address = ISTP + 32* . In the Device
> specific datasheet it is stated that the '84' is the event number for UART0.
> I have configured the UART IER register to enable the Receive interrupt(ERBI
> = 1).
>
> My query is :
>
> 1. Is it necessary to set the Global Interrupt Enable bit ? If so please
> guide me in which register I need to configure to do so.


Yes, you need to set GIE.
GIE == all interrupts on [or off]
If GIE == 1, individual IE bits determine which ones are on.
GIE is in the CSR.

>
> 2. # How to calculate ISTP value for UART0 Rx. After calculating the address
> of the ISR where should i configure ?

There are 12 hw interrupts - you must map the event [84] to an
interrupt and then apply the formula.
At that location, you have 32 bytes to branch to your ISR [or service
your interrupt].
>
> 3. interrupt void {....}. Is this format for an ISR? If not, please correct
> me for the same


You can use the interrupt pragma or keyword.
If an interrupt handler is time critical and uses minimal variables,
you should code it as a single function. [Any function calls from the
ISR will cause all regs to be saved/restored].
Refer to the compiler user's guide for details.

mikedunn
>
> Note: Chip Support Library are not available for my target (DM6437)

--
www.dsprelated.com/blogs-1/nf/Mike_Dunn.php

_____________________________________