This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

A problem about UART output (Redboot porting for Versatile/ARM926EJ-S)


Hi All,

	I'am porting eCos/RedBoot to Versatile/ARM926EJ-S with Integrator/ARM966E as baseline. Thanks to this Saturday. It's the first time my HyperTerminal got characters came from RedBoot. They were showed belowing. 

	RedBoot(tm)
		
    Only 12 characters! I debug it and found that it got into a loop in hal_diag.c:cyg_hal_plf_serial_putc().
 
	After transmit the first 12 characters, the value of AMBA_UARTFR register changed from 0x18 to 0x38.
So it cann't get out of the loop.
	
	The Release version of UART is PL011 r1p3. The flowing is the relevant code. 

--------------------------------------------------------
	#define AMBA_UARTFR_TXFF                0x20
	#define AMBA_UARTFR_RXFE                0x10
	#define AMBA_UARTFR_BUSY                0x08

	// AMBA uart access macros
	#define GET_STATUS(p)		(IO_READ((p) + AMBA_UARTFR))
	#define TX_READY(s)		(((s) & AMBA_UARTFR_TXFF) == 0)

	void
	cyg_hal_plf_serial_putc(void *__ch_data, char c)
	{
    	...

    	do {
      	status = GET_STATUS(base);
    	} while (!TX_READY(status));	// wait until ready
    
		PUT_CHAR(base, c);
		...
	}
--------------------------------------------------------

 	Any help about this?
	
Best regards,
Tim     
        

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]