AnsweredAssumed Answered

Programming the registers of p4080

Question asked by sumanth mushigeri on Sep 10, 2013
Latest reply on Sep 10, 2013 by sumanth mushigeri

Hello all, I am new to embedded world, I am  completing the half done proting FreeRTOS on P4080 (half done by someother person), my task is to build the vPortEnableInterrupts, vPortDisableInterrupts & write UART driver for it. I am able to access the SPRs by defining them in cpuregister.h file like this -

 

#define CDCSR0  696

#define HID0    1008

#define hid0    1008

#define srr1    27 ... etc etc..

 

and the I could easily load these registers using instruction set nemonics like for example

mtspr r5, srr1

 

But now to write the UART driver, how do I define its registers ?

in the reference manual they have given the description like this

 

17.5.1 UART1 receiver buffer register (DUARTx_URBR)

These registers contain the data received from the transmitter on the UART buses. In

FIFO mode, when read, they return the first byte received. For FIFO status information,

refer to the UDSR[RXRDY] description.

Except for the case when there is an overrun, URBR returns the data in the order it was

received from the transmitter.

Addresses:      DUART1_URBR1 is 11C000h base + 500h offset = 11C500h

                      DUART1_URBR2 is 11C000h base + 600h offset = 11C600h

 

and also where do I have define them?

 

Please provide me with P4080 UART driver with its supporting files. Or atleast an example script of how can I use these registers.

 

Since this is my 1st project on embedded systems. your help will greatly appreciated.

 

regards,

 

Sam

Outcomes