This is a protocol to interface RS232 to an A16 D32 bus SLOWLY! - 115200 BAUD, no parity, 1 stop bit, no flow control. o Data arranged in 8 byte messages (MSGs). o A message sent always generates a message reply. o To overcome message failures a timeout will reset the serial RX unit byte counter if it does not recieve all out bytes in "long" time. The software should do the same. o Keep in mind a message sent could be used to reset a module and hence no reply message will be recieved. MESSAGE FORMAT: =============== TX_MSG = TARGET, COMMAND, ADDR(7:0), ADDR(15:8), DATA(7:0), DATA(15:8), DATA(23:16), DATA(31:24) RX_MSG = same as OUT_MSG, except with new data (if generated) and with COMMAND LSbit = 1 TARGET: ------- 0x00-0x07 = FE module 0-7 0x08 = BE module 0x09 = BE-trigger module 0x10-0x11 = Development board, two memories Selects module to act on serial bit stream. In the current configuration no routing is done - the data goes to every module, but they should have a hardwired number that allow only one to answer. I doubt this will be a problem as we'll only use one module, and the trigger will have a very different number Unused destinantions will be ignored. If 2 modules reply to the same request, code in the BE-FPGA should only route the correct ones to the serial module. COMMAND: -------- Reply (DATA): 0x00 = Test 0x01 (0xA110A110) 0x02 = Write 0x03 (write data) 0x04 = Read 0x05 (read data) 0x06 = ReadRO 0x07 (read-only-mem read data) 0x08 = Status 0x09 (non-memory mapped flags/data) 0x10 = Trigger 0x11 (0xEEEEAAAA) 0x80 = User defined 0 0x81 (undefined) 0x82 = User defined 1 0x83 (undefined) 0x84 = User defined 2 0x85 (undefined) 0x86 = User defined 3 0x87 (undefined) 0x88 = User defined 4 0x89 (undefined) 0x8a = User defined 5 0x8b (undefined) 0x8c = User defined 6 0x8d (undefined) 0x8e = User defined 7 0x8f (undefined) 0xYY = All others 0xYY+1 (0xDEADD0D0) ADDRESS: -------- Address of the data - maximum 64kBytes ADDR(1:0) is ignored and assumed 00 (due to 4 byte wide data) DATA: ----- Always 4 bytes. Examples: --------- For TX=0x0000010203040506 (Test) RX=0x00010102All0All0 For TX=0x0002010203040506 (Write) RX=0x0003010203040506 For TX=0x0004010203040506 (Read - data=0x12345678) RX=0x0005010212345678