AnsweredAssumed Answered

Writing UART Interrupt Handler for T104xRDB

Question asked by unknown issuee on Jun 24, 2019
Latest reply on Aug 8, 2019 by unknown issuee

I'm working on T1042RDB and The board have duart for serial communication.  I dont want to use polling method to receive or transmit data and  because of that i try to write an interrupt handler for UART but i am also new to powerpc family. I'll tell what I tried to write an interrupt handler but i'm sold i'm wrong : )

btw, i dont use any operating systems, the application which i try to write is standalone.


I firstly read the T1040 reference manual  and chapter 5 is about Interrupt Assignments.


in that chapter ;

there is a table for internal interrupt sources and it says 20th internal interrupt corresponds to DUART 1 interrrupt source.


the explanation for IVPR from e5500 reference manual ; 

"IVPR[0-47] provides the high-order 484 bits of the address of the exception processing routines. the 16-bit vector offsets(IVORs) are concatenated to the right of IVPR to form the address of the exception processing routine."


the explanation for IVOR from e5500 reference manual;

" ....... but use only IVORn[48-59], as shown in figure 2-5, to hold the quad-word index from the base address provided by the IVPR for each interrupt type".


then, let's assume i set IVOR20 register to 0x190 and IVPR register to 0.


IVPR + IVOR20 = 0.....0 + 000110010000 + 0000 = 0x1900 is interrupt service routine address or interrupt handler address. 


and then i should place my interrupt service routine to 0x1900 memory address when i initialize some basic stuff.


by the way, there is a IVOR20 register, isnt it ? i have doubt it's a register which we can access or not .


and my question is rising, i'm wrong or not ? if i'm wrong, engliht me, and please , if dont use sophisticated word to explain, i will appericate you.


thanks in advance.