chiark / gitweb /
Send HELLO as a result of all slaves being online. Do not crash if slave is slow...
[trains.git] / detpic / morse.messages
1 # This is the list of morse panic messages.  Each line consists of:
2 #    <morse>  [<address>,<address>...]   [; <description>]
3 # This file is converted to morse.asm by the Perl script morse.asm-gen.
4 # See morse.asm-gen for information about the format of the data stored
5 # in flash.  Only addresses in the Access Bank are supported.
6
7 # Suggested output by on the per-pic-led is:
8 #    morse (red/black)   contents of one address
9 #    morse (red/black)   contents of next address
10 #    ...
11 #    morse (red/black)   contents of last address
12 #    long pause
13 #    go back to start
14 # Contents of addresses should preferably be read into a temporary
15 # buffer space somewhere so that each one is read once and that value
16 # remembered.
17
18 # Temporary entries for testing and development
19 TM      PIE1,SSPSTAT,SSPCON1,SSPCON2 ; Master got I2C interrupt
20 TI0                             ; for iwj
21 TI1                             ; for iwj
22 TI2                             ; for iwj
23 TI3                             ; for iwj
24 TI4                             ; for iwj
25 TI5                             ; for iwj
26 TI6                             ; for iwj
27 TI7                             ; for iwj
28 TI8                             ; for iwj
29 TI9                             ; for iwj
30
31 # Main message listing.  Kept sorted by section for easy reference.
32 # -----------------------------------------------------------------
33
34 # Miscellaneous
35 E                               ; `expected'; we were told to panic
36 T                               ; master paniced because slave paniced
37
38 # Regarding communications from the host
39 HX      ::t                     ; host sent unknown command
40 HW      ::t                     ; host sent message which was too long
41 HO                              ; host RS232 read overrun
42 HF                              ; host RS232 framing error
43 HN                              ; host sent too much NMRA - buffers full
44 HM                              ; host sent too much NMRA - ack count overflow
45 HB                              ; data for host overran buffer
46 HP                              ; host sent >2-byte PING command
47
48 # Regarding communications by master with slaves
49 MX                              ; slave (or intern) sent bad extra byte
50 MR      mascan:b,mascan:cslot   ; reversers set byte with zz bit set
51 MD                              ; i2cmu_done !
52
53 # Problematic interrupts
54 IH      INTCON,INTCON3,PIR1,PIR2,PIR3 ; Interrupt source not found (high pri.)
55 IL      INTCON,INTCON3,PIR1,PIR2,PIR3 ; Interrupt source not found (low pri.)
56
57 # W - watchdog
58 WX                                      ; bad watchdog command
59
60 # Messages for i2clib, S*
61 SM      i2clib+panic:st,:sspstat,:sspcon1,:sspcon2 ; m.,i., ctrlr bad state
62 SS      SSPSTAT,SSPCON1                 ; s.,i., controller bad state
63 SW      i2clib+panic:slave              ; m.: slave didn't ack addr for write
64 SN      i2clib+panic:slave              ; improper slave number
65 SO      i2clib+panic:slave              ; improper next slave number
66 SB      i2clib+panic:st                 ; improper i2cm_{read,write}_start
67 SF      i2clib+panic:st                 ; improper i2cmu_write_next_byte Z
68 SA      i2clib+panic:st                 ; improper i2cm_read_another
69 SD      i2clib+panic:st                 ; impr. i2cm_read_done/i2cs_read_data
70 # used in mascan.asm
71 SC      i2clib+panic:slave              ; slave didn't ack read: crashed
72 ST      i2clib+panic:slave              ; slave didn't ack read: didn't start
73 SP      i2clib+panic:slave              ; slave didn't ack read: in panic read
74
75 # Messages for slave detection/i2c
76 DQ      FSR2L,::outmsg_end              ; previous slave read incomplete
77 DR      FSR2L,::outmsg_end              ; slave read overrun
78 DX      ::t                             ; slave received wrong message byte
79 DB      detect:message_buffer           ; slave_add_short_message overrun
80 DF      ::t                             ; slave pic2detinfo[0] invalid bits
81 DG      ::t                             ; too many slaves in pic2detinfo
82 DJ      mascan:cslot,mascan:cbyte,::v   ; det msg 2nd byte has top bit set
83 DM      detect:buf0                     ; master has MM bit set in buf0
84
85 # Messages for specific peripherals:
86 # R - Reversers (polarity)
87 RS      FSR0L                           ; POLARITY message too short
88 RL      FSR0L                           ; POLARITY message too long
89 RF                                      ; master board has no reversers
90 RG                                      ; too many reversers boards
91
92 # P - Points
93 PB      points:pointmsg                 ; Firing point when already busy
94 PI      points:pointmsg,T3CON           ; Unexpected Timer 3 interrupt
95 PU      points:pointmsg                 ; Firing nonexistent point
96 PC                                      ; Firing point when CDU empty
97 PS      points:pointslave,points:pointmsg ; Firing point on nonexistent board
98 PF      ::t                             ; Flash mentions point not on board
99 PX                                      ; Host sent >2-byte POINT command
100 PM                                      ; Firing point when master/CDU busy
101 PQ                                      ; POINTED when already charging
102 PA                                      ; POINTED when already firing