mirror of
git://projects.qi-hardware.com/xburst-tools.git
synced 2024-11-22 13:25:20 +02:00
when set rUBRDIV=0x11 can output correct.
This commit is contained in:
parent
f410b994a9
commit
67335c833f
@ -30,9 +30,6 @@ void serial_init (const int ubrdiv_val,const int uart)
|
||||
case UART0:
|
||||
rULCON0 = 0x3;
|
||||
rUCON0 = 0x245;
|
||||
rGPHCON = rGPHCON & ~(3 << 16);
|
||||
delay(1);
|
||||
rGPHCON = rGPHCON & ~(3 << 16)|(1 << 17);
|
||||
rUFCON0 = 0x0;
|
||||
rUMCON0 = 0x0;
|
||||
rUBRDIV0 = ubrdiv_val;
|
||||
@ -47,10 +44,7 @@ void serial_init (const int ubrdiv_val,const int uart)
|
||||
case UART2:
|
||||
rULCON2 = 0x3;
|
||||
rUCON2 = 0x245;
|
||||
rGPHCON = rGPHCON & ~(3 << 16);
|
||||
delay(1);
|
||||
rGPHCON = rGPHCON & ~(3 << 16)|(1 << 17);
|
||||
rUFCON2 = 0x0;
|
||||
rUFCON2 = 0x1;
|
||||
rUBRDIV2 = ubrdiv_val;
|
||||
break;
|
||||
default:
|
||||
|
@ -89,8 +89,8 @@ start_code:
|
||||
# define UPLLCON 0x4c000008
|
||||
# define MPLLCON_val ((142 << 12) + (7 << 4) + 1)
|
||||
# define UPLLCON_val (( 88 << 12) + (8 << 4) + 2)
|
||||
/*# define MPLLCON_val ((0x7d << 12) + (0x2 << 4) + 0x1)
|
||||
# define UPLLCON_val ((0x38 << 12) + (0x2 << 4) + 0x2)*/
|
||||
/* # define MPLLCON_val ((0x7d << 12) + (0x2 << 4) + 0x1)
|
||||
# define UPLLCON_val ((0x38 << 12) + (0x2 << 4) + 0x2) */
|
||||
|
||||
ldr r0, =UPLLCON
|
||||
ldr r1, =UPLLCON_val
|
||||
|
@ -40,9 +40,9 @@ unsigned char buf[2*1024];
|
||||
int start_kboot(void)
|
||||
{
|
||||
port_init();
|
||||
serial_init(0x7,UART0);
|
||||
serial_init(0x11,UART2);
|
||||
while(1){
|
||||
serial_putc (UART0,'0');
|
||||
serial_putc (UART2,'2');
|
||||
blue_on(1);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user