Changeset 3039
- Timestamp:
- Jul 6, 2012 9:46:38 AM (12 months ago)
- File:
-
- 1 edited
-
cpu/arm/olpc/bsl.fth (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cpu/arm/olpc/bsl.fth
r3034 r3039 42 42 43 43 : bsl-baud ( baud-rate -- ) \ 9600,8,e,1 44 uart-base >r bsl-uart-base to uart-base baud h# 1b 3 uart! r> to uart-base 44 uart-base >r ( baud-rate r: uart-base ) 45 bsl-uart-base to uart-base 46 h# 13 h# 30 apbc! \ enable the uart2 clocks 47 h# 40 1 uart! \ uart unit enable 48 baud h# 1b 3 uart! ( r: uart-base ) 49 r> to uart-base ( ) 45 50 ; 46 51 … … 89 94 bsl-test-gpio# gpio-clr 90 95 ; 91 : flush-bsl ( -- ) begin receive? while drop repeat ; 96 97 : flush-bsl 98 get-msecs d# 2000 + ( limit ) 99 begin 100 receive? 0= if exit then ( limit char ) 101 drop dup get-msecs - 0< ( limit timeout? ) 102 until 103 drop true abort" BSL flush timeout" 104 ; 105 92 106 : rst-bsl ( -- ) msp430-off start-bsl flush-bsl ; 93 107 … … 103 117 drop true abort" BSL data timeout" 104 118 ; 119 105 120 : ack? ( -- okay? ) 106 121 get-msecs timeout + ( limit ) … … 263 278 264 279 : force-erase ( -- ) 265 ." Resetting/erasing" cr266 280 rst-bsl 267 281 ['] 00-password catch drop … … 369 383 $read-open ( ) 370 384 set-bsl-file-format ( ) 385 ." Resetting/erasing" cr 371 386 force-erase ( ) 372 387 ." Programming" cr … … 429 444 ." Writing ..." bsl-test-data h# 8000 bsl-write cr ( ) 430 445 ." Verifying ..." bsl-test-data h# 8000 bsl-verify cr ( okay? ) 431 if ." FAILED!" else ." Good" then cr446 if ." Good" else ." FAILED!" then cr 432 447 ; 433 448
Note: See TracChangeset
for help on using the changeset viewer.
