From: ian Date: Fri, 30 Dec 2005 18:11:45 +0000 (+0000) Subject: watchdog turns off cdu as required X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ijackson/git?a=commitdiff_plain;h=e660c0c79700af01fe2756b324acc84744583599;p=trains.git watchdog turns off cdu as required --- diff --git a/TODO b/TODO index 87f4d5a..8aaaf35 100644 --- a/TODO +++ b/TODO @@ -2,14 +2,6 @@ nmra watchdog seems to lose a byte of idle from the beginning somehow (don't know if this happens with host-supplied data) -residual stuff from CDU is present and changes pt0 when you - * turn on - * say `+' to master to turn on CDU - * switch to programming mode - pt0 on pic2 is the one nearest the switch box, moving to hacker's right - (we think - I haven't checked this yet) - - layout polarity diagram colourful segment encoding: make moveable feature selection in subseg2display bitwise rather than setwise diff --git a/cebpic/README.protocol b/cebpic/README.protocol index cbe015b..54cfdc2 100644 --- a/cebpic/README.protocol +++ b/cebpic/README.protocol @@ -58,7 +58,7 @@ From PIC to host: < 1 0001 XXX 0 XXXXXXX (88+) PONG Pong `X' (reply to Ping `X') < 0 000 1001 (HT) HELLO I am booted < 0 000 1011 (VT) AAARGH Followed by debug chars (only) - < 0 000 1101 (CR) WATCHDOG Timeout happenedbn + < 0 000 1101 (CR) WATCHDOG Timeout happened < 0 000 0111 (BEL) FAULT Fault exists < 0 000 0110 (ACK) FIXED Fault now fixed < 0 0100 PPP (20+) POINTED Point change done using capacitor P diff --git a/detpic/watchdog.asm b/detpic/watchdog.asm index 9204e46..78b9d1a 100644 --- a/detpic/watchdog.asm +++ b/detpic/watchdog.asm @@ -15,6 +15,10 @@ command_watchdog @ mov_fw INDF0 ; W = OMMMMMMM bra_n command_watchdog_bad mov_wf watchdog ; watchdog = OMMMMMMM + + pinlat_ifl p0_booster_shutdown + call cdu_on + goto nmra_sendwatchdog_stop command_watchdog_bad panic morse_WX @@ -27,6 +31,7 @@ watchdog_tickdiv @ ; oops, we've timed out call nmra_sendwatchdog_start + call cdu_off mov_lw 0x0d goto serial_addbyte