Changeset 2944
- Timestamp:
- Apr 17, 2012 3:04:04 AM (13 months ago)
- Location:
- cpu/arm/mmp2
- Files:
-
- 2 edited
-
dramrecal.fth (modified) (1 diff)
-
thermal.fth (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cpu/arm/mmp2/dramrecal.fth
r2924 r2944 870 870 resume-usb 871 871 enable-interrupts 872 init-thermal-sensor 872 873 ; 873 874 : strp ( -- ) ec-rst-pwr str ec-max-pwr .d ." mW " soc .% space ; -
cpu/arm/mmp2/thermal.fth
r2570 r2944 2 2 purpose: Driver for the MMP2 thermal sensor 3 3 4 \ See also cforth:src/app/arm-xo-1.75/thermal.fth 4 5 h# 013200 value thermal-base 6 : room-temp@ ( -- n ) thermal-base io@ ; 7 : room-temp! ( n -- ) thermal-base io! ; 8 thermal-base h# 4 + value wd-thresh 9 : wd-thresh@ ( -- n ) wd-thresh io@ ; 10 : wd-thresh! ( n -- ) wd-thresh io! ; 11 \ thermal-base h# 8 + value lo-thresh 12 \ thermal-base h# c + value hi-thresh 13 thermal-base h# 10 + value ts-ctrl 14 : ts-ctrl! ( n -- ) ts-ctrl io! ; 15 5 16 : init-thermal-sensor ( -- ) 6 17 thermal-base io@ h# 400 and if exit then 7 18 7 h# 90 apbc! 3 h# 90 apbc! \ Enable clocks to thermal sensor 8 h# 10000 thermal-base io! \ Enable sensing 19 h# 10000 room-temp! \ Enable sensing 20 d# 696 wd-thresh! \ Set thermal watchdog threshold to 85C 21 h# 88 ts-ctrl! \ Clear thermal watchdog reset status 22 \ Set thermal watchdog reset enable 9 23 ; 10 24 … … 46 60 wdtpcr io! 47 61 ; 48 49 thermal-base h# 4 + value wd-thresh50 : wd-thresh@ ( -- n ) wd-thresh io@ ;51 : wd-thresh! ( n -- ) wd-thresh io! ;52 62 53 63 : .c ( n -- ) (.) type ." C " ;
Note: See TracChangeset
for help on using the changeset viewer.
