1
0
mirror of git://projects.qi-hardware.com/nn-usb-fpga.git synced 2025-01-22 13:01:06 +02:00

fixing xmode initial delay

This commit is contained in:
carlos 2010-10-16 11:34:36 -05:00
parent 43de1a582c
commit ee10724112
3 changed files with 77 additions and 112 deletions

View File

@ -9,11 +9,11 @@ f8000003
781c0000 781c0000
3b9c0ffc 3b9c0ffc
781a0000 781a0000
3b5a0710 3b5a06c0
78010000 78010000
38210708 382106c0
78030000 78030000
3863070c 386306c4
44230004 44230004
58200000 58200000
34210004 34210004
@ -57,7 +57,7 @@ c3a00000
5b9d0004 5b9d0004
b820d800 b820d800
78010000 78010000
38210498 3821046c
f800006a f800006a
37820014 37820014
b8406000 b8406000
@ -102,27 +102,27 @@ f8000032
780d0000 780d0000
e0000004 e0000004
b9a00800 b9a00800
382104d0 382104a4
f800003d f800003d
b9800800 b9800800
3821049c 38210470
f800003a f800003a
f8000027 f8000027
5c2bfff9 5c2bfff9
34012000 34010800
f8000058 f8000058
b8207000 b8207000
ba000800 ba000800
382104b8 3821048c
f8000032 f8000032
b9c00800 b9c00800
fbffffbe fbffffbe
b9e00800 b9e00800
382104c4 38210498
f800002d f800002d
e3fffff0 e3fffff0
78020000 78020000
38420700 384206b8
3803c350 3803c350
28420000 28420000
88230800 88230800
@ -136,7 +136,7 @@ e3fffff0
4420fffe 4420fffe
c3a00000 c3a00000
78010000 78010000
38210700 382106b8
28210000 28210000
3802c350 3802c350
58220004 58220004
@ -147,7 +147,7 @@ c3a00000
c3a00000 c3a00000
c3a00000 c3a00000
78010000 78010000
382106fc 382106b4
28220000 28220000
28410000 28410000
20210001 20210001
@ -156,7 +156,7 @@ c3a00000
202100ff 202100ff
c3a00000 c3a00000
78020000 78020000
384206fc 384206b4
28430000 28430000
202100ff 202100ff
28620000 28620000
@ -167,7 +167,7 @@ c3a00000
40240000 40240000
4480000b 4480000b
78020000 78020000
384206fc 384206b4
28430000 28430000
28620000 28620000
20420010 20420010
@ -183,7 +183,7 @@ b8204000
c3a00000 c3a00000
34010000 34010000
78070000 78070000
38e704fc 38e704b4
b8201800 b8201800
b5032000 b5032000
40840000 40840000
@ -198,52 +198,42 @@ b4e42000
2081ffff 2081ffff
5c62fff5 5c62fff5
c3a00000 c3a00000
379cffdc 379cffe0
5b8b0024 5b8b0020
5b8c0020 5b8c001c
5b8d001c 5b8d0018
5b8e0018 5b8e0014
5b8f0014 5b8f0010
5b900010 5b90000c
5b91000c 5b910008
5b920008
5b9d0004 5b9d0004
780b0002
b9601800
b8206000 b8206000
38630000 fbffffc2
34010000 78020400
34000000
34210001
5c23fffe
78010000
382104e0
fbffffca
fbffffb7
b9601000
38420000 38420000
34010000 34010000
34000000 34000000
34210001 34210001
5c22fffe 5c22fffe
34010043 34010043
34110001 340f0001
780d0000 780d0000
fbffffb6 fbffffc1
ba209000 b9e08800
39ad04fc 39ad04b4
34100000 34100000
340e0082 340e0082
fbffffa8 fbffffb3
5c320027 5c310028
fbffffa6 fbffffb1
b8207800 b8205800
fbffffa4 fbffffaf
a42f0800 a4200800
202b00ff 202100ff
5d600023 5d610024
5df10022 5deb0023
fbffff9f 340b0000
fbffffa9
b58b1000 b58b1000
30410000 30410000
356b0001 356b0001
@ -269,29 +259,28 @@ b4220800
5c23000a 5c23000a
35ef0001 35ef0001
34010006 34010006
21f100ff 21ef00ff
36100080 36100080
fbffff96
fbffff8c fbffff8c
fbffff82 4431ffda
4432ffdb
34020004 34020004
4422000e 4422000d
34100000 34100000
ba000800 ba000800
2b9d0004 2b9d0004
2b8b0024 2b8b0020
2b8c0020 2b8c001c
2b8d001c 2b8d0018
2b8e0018 2b8e0014
2b8f0014 2b8f0010
2b900010 2b90000c
2b91000c 2b910008
2b920008 379c0020
379c0024
c3a00000 c3a00000
34010006 34010006
fbffff79 fbffff84
e3fffff2 e3fffff3
30780000 30780000
0a313a20 0a313a20
55706c6f 55706c6f
@ -310,13 +299,6 @@ e3fffff2
6c696420 6c696420
696e7075 696e7075
740d0a00 740d0a00
52656365
6976696e
6720586d
6f64656d
20747261
6e736665
720a0000
00001021 00001021
20423063 20423063
408450a5 408450a5
@ -1022,3 +1004,21 @@ f0020000
00000000 00000000
00000000 00000000
00000000 00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000

View File

@ -47,9 +47,6 @@ int main(int argc, char **argv)
// Initialize UART // Initialize UART
uart_init(); uart_init();
while(1){ /* loop forever until u-boot gets booted or the board is reset */ while(1){ /* loop forever until u-boot gets booted or the board is reset */
if(dispmenu){ if(dispmenu){
uart_putstr("\n1: Upload program to RAM\r\n"); uart_putstr("\n1: Upload program to RAM\r\n");
@ -60,12 +57,10 @@ int main(int argc, char **argv)
// uart_putstr("6: Memory test\r\n"); // uart_putstr("6: Memory test\r\n");
dispmenu = 0; dispmenu = 0;
} }
key = uart_getchar(); key = uart_getchar();
autoboot = 0; autoboot = 0;
if(key == '1'){ if(key == '1'){
len = rxmodem((unsigned char *)0x2000); len = rxmodem((unsigned char *)0x800);
uart_putstr("Received "); uart_putstr("Received ");
hexprint(len); hexprint(len);
uart_putstr(" bytes\r\n"); uart_putstr(" bytes\r\n");
@ -81,34 +76,5 @@ int main(int argc, char **argv)
} }
c = '*'; // print msg on first iteration
for(;;) {
uint32_t start, size;
switch (c) {
case 'u': // upload
start = read_uint32();
size = read_uint32();
for (p = (int8_t *) start; p < (int8_t *) (start+size); p++)
*p = uart_getchar();
break;
case 'd': // download
start = read_uint32();
size = read_uint32();
for (p = (int8_t *) start; p < (int8_t *) (start+size); p++)
uart_putchar( *p );
break;
case 'g': // goto
start = read_uint32();
jump(start);
break;
default:
uart_putstr("**SAKC/bootloader** > \r\n");
break;
};
c = uart_getchar();
}
} }

View File

@ -77,17 +77,16 @@ int rxmodem(unsigned char *dest)
unsigned short crc, tcrc; unsigned short crc, tcrc;
int i, pid = 1, len = 0; int i, pid = 1, len = 0;
for(i = 0; i < 0x20000; i++) { asm("nop;"); }
uart_putstr("Receiving Xmodem transfer\n");
uart_getchar (); uart_getchar ();
for(i = 0; i < 0x20000; i++) { asm("nop;"); } for(i = 0; i < 0x4000000; i++) { asm("nop;"); }
uart_putchar ('C'); uart_putchar ('C');
while(1) while(1)
{ {
int c, pid1, pid2; char c, pid1, pid2;
c = uart_getchar();
c = uart_getchar ();
if (c != SOH) if (c != SOH)
{ {
if (c == EOT) if (c == EOT)