English
Language : 

ASX340AT Datasheet, PDF (33/75 Pages) ON Semiconductor – Color CMOS NTSC/PAL Digital Image
ASX340CS: 1/4-Inch Color CMOS NTSC/PAL Digital Image Sensor
External Signal Processing
Command Flow
The host issues a command by writing (through a two-wire interface bus) to the
command register. All commands are encoded with bit 15 set, which automatically
generates the host command (doorbell) interrupt to the microprocessor.
Assuming initial conditions, the host first writes the command parameters (if any) to the
parameters pool (in the command handler's logical page), then writes the command to
command register. The firmware interrupt handler then signals the Command Handler
task to process the command.
Note:
If the host wishes to determine the outcome of the command, it must poll the command
register waiting for the doorbell bit to be cleared. This indicates that the firmware
completed processing the command. When the doorbell bit is cleared, the contents of
the command register indicate the command's result status. If the command generated
response parameters, the host can now retrieve these from the parameters pool.
The host must not write to the parameters pool, nor issue another command, until
the previous command completes. This is true even if the host does not care about the
result of the previous command. Therefore, the host must always poll the command
register to determine the state of the doorbell bit, and ensure the bit is cleared before
issuing a command.
For a complete command list and further information consult the Host Command Inter-
face Specification.
An example of how (using DevWare) a command may be initiated in the form of a
“Preset” follows.
Issue the SYSMGR_SET_STATE Command
All DevWare presets supplied by ON Semiconductor poll and test the doorbell bit after
issuing the command. Therefore there is no need to check if the doorbell bit is clear
before issuing the next command.
# Set the desired next state in the parameters pool(SYS_STATE_ENTER_CON-
FIG_CHANGE)
REG= 0xFC00, 0x2800 // CMD_HANDLER_PARAMS_POOL_0
# Issue the HC_SYSMGR_SET_STATE command
REG= 0x0040, 0x8100 // COMMAND_REGISTER
# Wait for the FW to complete the command (clear the Doorbell bit)
POLL_FIELD= COMMAND_REGISTER, DOORBELL,!=0, DELAY=10, TIMEOUT=100
# Check the command was successful
ERROR_IF= COMMAND_REGISTER, HOST_COMMAND,!=0, "Set State command
failed",
ASX340AT/D Rev. H, 8/15 EN
33
©Semiconductor Components Industries, LLC, 2015.