projects
/
my-code
/
arm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f99ed5c
)
go-to-bed-push, partid/bootcode version still wrong!
author
hackbard
<hackbard@staubsauger.localdomain>
Sat, 28 Jul 2007 03:39:35 +0000
(
05:39
+0200)
committer
hackbard
<hackbard@staubsauger.localdomain>
Sat, 28 Jul 2007 03:39:35 +0000
(
05:39
+0200)
betty/lpcload.c
patch
|
blob
|
history
diff --git
a/betty/lpcload.c
b/betty/lpcload.c
index
e2bef73
..
bdb3948
100644
(file)
--- a/
betty/lpcload.c
+++ b/
betty/lpcload.c
@@
-189,6
+189,7
@@
int main(int argc,char **argv) {
/* auto baud sequence */
/* auto baud sequence */
+ printf("auto baud sequence ...\n");
write(tts_fd,"?",1);
len=0;
txrx(tts_fd,buf,&len,info);
write(tts_fd,"?",1);
len=0;
txrx(tts_fd,buf,&len,info);
@@
-198,6
+199,8
@@
int main(int argc,char **argv) {
}
/* tell bl that we are synchronized (it's allready in buf) */
}
/* tell bl that we are synchronized (it's allready in buf) */
+
+ printf("sync sequence ...\n");
len=14;
txrx(tts_fd,buf,&len,info);
if(strncmp(buf,"OK\r\n",4)) {
len=14;
txrx(tts_fd,buf,&len,info);
if(strncmp(buf,"OK\r\n",4)) {
@@
-206,6
+209,8
@@
int main(int argc,char **argv) {
}
/* tell bl the crystal frequency */
}
/* tell bl the crystal frequency */
+
+ printf("frequency setting sequence ...\n");
len=strlen(cfreq)+2;
strncpy(buf,cfreq,BUFSIZE);
buf[len-2]='\r';
len=strlen(cfreq)+2;
strncpy(buf,cfreq,BUFSIZE);
buf[len-2]='\r';
@@
-216,6
+221,24
@@
int main(int argc,char **argv) {
return -1;
}
return -1;
}
+ /* read part id */
+ printf("read part id ...\n");
+ len=3;
+ memcpy(buf,"J\r\n",3);
+ txrx(tts_fd,buf,&len,info);
+ buf[len]='\0';
+ printf("part id: %d (0x%x)\n",atoi(buf),atoi(buf+3));
+
+ /* read boot code version */
+ printf("read boot code version ...\n");
+ len=3;
+ memcpy(buf,"K\r\n",3);
+ txrx(tts_fd,buf,&len,info);
+ buf[len]='\0';
+ printf("boot code version: %c %c\n",(buf),atoi(buf));
+
+
+
// to be continued ... (parsing fw file and poking it to ram)
// to be continued ... (parsing fw file and poking it to ram)