Changeset 3166
- Timestamp:
- Aug 14, 2012 1:19:12 AM (9 months ago)
- File:
-
- 1 edited
-
cpu/arm/olpc/edi.fth (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cpu/arm/olpc/edi.fth
r3157 r3166 19 19 : efcfg ( -- reg# ) kb9010? if h# fead else h# fea0 then ; 20 20 : efcmd ( -- reg# ) kb9010? if h# feac else h# fea7 then ; 21 : efdat ( -- reg# ) kb9010? if h# feab else h# feaa then ; 21 : efdat ( -- reg# ) kb9010? if h# feab else h# feaa then ; \ io3731 has different read and write regs 22 h# feab constant efdat-in 22 23 : rst8051 ( -- reg# ) kb9010? if h# ff14 else h# f010 then ; 23 24 : ecreboot ( -- reg# ) kb9010? if h# ff01 else h# f018 then ; 24 25 25 \ Issues with .py code 26 26 \ A14:A8 should be A15:A8 several places … … 141 141 142 142 : finished? ( b -- flag ) 143 kb9010? if 2 and 0= else h# 80 = then143 kb9010? if 2 and 0= else h# 80 and h# 80 = then 144 144 ; 145 145 : wait-flash-busy ( -- ) \ Wait for an erase/programming operation to complete … … 221 221 h# 90 flash-cmd 222 222 wait-flash-busy 223 efdat edi-b@ \ reg: efdat 224 ; 223 efdat-in edi-b@ \ reg: efdat 224 ; 225 225 226 : trim-tune ( -- ) 226 227 \ firmware-id 0= if … … 335 336 then 336 337 ; 338 339 \ Does a dummy ready and throws away the result. 340 \ required to get the EDI interface enabled 341 : edi-start ( -- ) 342 h# ff22 ['] edi-b@ catch if noop else drop then 343 ; 344 337 345 : edi-open ( -- ) 338 346 \ slow-edi-clock \ Target speed between 1 and 2 MHz 339 347 spi-start 340 348 341 \ dummy read, to activate EDI and can fail so ignore the fail 342 h# ff22 ['] edi-b@ catch if noop else drop then 343 349 edi-start 350 344 351 set-chip-id 345 352
Note: See TracChangeset
for help on using the changeset viewer.
