S
ERIAL
I
NTERFACE
D
EVELOPERS
G
UIDE
Argument: None
Note: Use of this command assumes that the host knows the current state of the shadow register in
the global configuration structure
6 Camera Electronics Side Interface
The communications on the camera side is carried out by a PC Master Device driver that is part of the
Motorola SDK targeted for the DSP 56F80X family. After transfer of execution from the bootloader,
the software initializes a driver that in effect will ‘take control’ of the serial port. Once initialized the
serial port will be in a listening mode, awaiting commands from the connected host. When an
incoming command is detected, an interrupt occurs, and the command is parsed.
Standard commands (such as the reading and writing of DSP data memory) are executed and
acknowledged immediately.
When a custom defined command (such as those listed in paragraph 5.3) is received, a command
busy flag is set. This prevents the host from sending another command before the current one has
been executed. The embedded software is responsible for polling the command status to establish if
the host has requested some type of operation be performed. The command index is parsed, the task
is performed, and then the command status flag is reset.
Initially the protocol baud rate is configured for 115200 bps. Shortly after the peripheral device drivers
have been initialized, a check of the static configuration is done. If the camera electronics have been
configured for a different baud rate then the serial configuration is modified appropriately.
6.1 DSP Data Memory
Using the PC Master Protocol direct access to the DSP data memory is permissible. There is however
no direct access to the flash portion of the DSP data memory. This can be done indirectly to specific
locations as described in paragraphs
X
5.3.4
X
-
X
5.3.7
X
. The Motorola DSP56F807 has a data memory
space as listed below.
Data Memory Map (Word Addresses):
0x0000 – 0x0FFF Data RAM
0x1000 – 0x17FF DSP Peripherals
0x1800 – 0x1FFF Reserved
0x2000 – 0x3FFF Data Flash
0x4000 – 0xFF7F External Memory
0xFF80 – 0xFFFF Core Registers
What Lumitron has done is to map various camera configuration and status data into pre-defined
addresses so that the host can monitor/modify the camera electronics behavior. The paragraphs that
follow will describe where the data is mapped and define the associated structure.
6.2 Global Configuration Structure (CAMERA_CONFIG)
The global configuration structure houses the current status of the camera electronics as well as
information about the embedded application. This data structure has been mapped to address
0x0040 and has been allocated a length of 128 words. The structure is listed in
X
Appendix A
X
. As
further updates to the embedded code are required the structure may be modified, but only by adding
data members to the end of the structure. This way existing host applications can continue to access
data members without updating code.
20