?? protocol.txt
字號:
Update to SHARC EZ-KIT Lite Message Packet Protocols.
=====================================================
Except where noted, the information contained herein comes from the
EZ-KIT Lite Reference Manual, an understanding of RS-232C communications,
and a review of the kernel source code contained in the files
'ez-kit\ezsharc\kernel\*.asm'.
Throughout this document, 'kernel' refers to the monitor kernel program
which runs on the EZ-KIT when booted from EPROM. The term 'board' refers
to the EZ-KIT Lite board, and 'host' or 'host PC' refer to the host device.
When transferring a 32-bit word across the RS-232C interface, the least
significant byte is transmitted first.
If the RS-232C interface gets corrupted due to lost bytes or other problems,
it is generally required that the host serial port be closed, the EZ-KIT
Lite be manually reset, and then communications re-established.
Experience during the EZ-KIT development indicated that initializing a
PC serial port or connecting the cable could generate undesired characters
to the EZ-KIT. Thus following power-on, board reset, and processor reset,
the kernel does not know the status of data from the RS-232C interface.
To remedy this, the kernel looks for the word '0xBADC0DB4' ("Host Resync
Command") to be transmitted from the host. Further, after sending the board
reset (or processor reset) command packet and receiving the response
message, the host should pause two seconds (one second for processor reset)
before sending the Host Resync Command, to allow the board time to perform
the command. All of this will be spelled out in the more detailed command
PDL to follow.
After the kernel boots from EPROM, its own power-on self-tests run and then
it resets and reconfigures the UART. Since the default configuration is 9600
baud, no parity, 8-bits, 1 stop bit (9600-N81), a user program must set
its own baud rate to 9600 when first establishing communication with the
EZ-KIT Lite. Also, to leave the interface in a known recoverable state,
the user program must set the host and EZ-KIT Lite to 9600 baud prior to
sending the board reset command packet, and prior to ending communications
with the board. Again, this will be spelled out in the more detailed command
PDL to follow.
Changing the RS-232C interface speed can be tricky. After sending the
Set Serial Port Speed command packet, the user must be sure that the entire
packet has gone from the host UART's fifo and transmit shift register before
changing the host UART speed. However, the wait cannot be too long, because
the change must occur before the EZ-KIT board starts sending the response
at the new speed to avoid data corruption. Upon receipt of the change speed
packet, the EZ-KIT immediately changes it's own UART's speed, then waits
about 3/4 of a second (0x2000000 NOPs to be exact) before sending the
response packet at the new speed. Empirically, executing an arbitrary
delay of 1000000 NOPs on the the host PC immediately before and after
changing its host baud rate works on host PCs from 20-MHz 386s to
266-MHz Pentium IIs.
Command PDL
===========
Establish communications with the board
---------------------------------------
Perform implementation specific actions to initialize the host serial port
to 9600 baud, no parity, 8 data bits, 1 stop bit, no handshake, and a
timeout of 2 seconds.
Send the Host Resync Command ("0xBADC0DB4") to the board.
Reset the board
---------------
Set the interface speed to 9600 baud.
Send the Reset Board packet and receive the response.
Wait 2 seconds.
Send the Host Resync Command ("0xBADC0DB4") to the board.
Set the interface speed to the desired baud rate.
Reset the processor
-------------------
Send the Reset Processor packet and receive the response.
Wait 1 second.
Send the Host Resync Command ("0xBADC0DB4") to the board.
Set the interface speed
-----------------------
Send the Set Serial Port Speed packet at the old baud rate.
Wait for the entire packet to be transmitted.
Set the host serial port to the desired baud rate.
Wait for the board to change speed.
Get the Set Serial Port Speed response packet at the new baud rate.
Start the processor
-------------------
Send the Start Processor packet and receive the response.
(The processor will start executing code at address 0x20005).
Read or Write a 32- or 48-bit word
----------------------------------
Send the Read/Write DM32/PM48 packet and receive the response.
End communications with the board
---------------------------------
Set the interface speed to 9600 baud.
Send the Resynchronize Communications packet and receive the response.
(Do not send the host response ("0xBADC0DB4") to the board. This
will be sent the next time communications are established with
the board).
Perform any implementation specific actions to free the host serial port.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -