Freescale Semiconductor Microcontrollers User Manual
Page 323
![background image](/manuals/106159/323/background.png)
HC08 Full Chip Simulation
Configuration Procedure
323
Microcontrollers Debugger Manual
To replicate this stage in the simulator, enter the SETUP packet as shown in
and the DATA0 packet as shown in
, using the USBIN command. The USB
peripheral automatically sends out the ACK after the code services the other packets,
which are received in the simulator. Once the SETUP and DATA0 packets are entered, the
USBIN window looks as shown in
. The user can then step through the setup
stage by typing t in the simulator. At this point, use the USBOUT command to see that the
ACK packet was sent out by the device, as shown in
. This completes the
setup stage.
We can utilize the same commands for the data stage, using the USBIN command to
create IN and ACK packets. Once the code receives the IN packet, it sends out the
descriptor information with data packets through endpoint 0. The ACK packet then is
needed to end that data stage transfer. Several data stage transfers are needed to send out
all of the device descriptor information. Each data packet can hold only eight bytes, so we
need three transfers in this case.
shows the USB IN window.
shows the current appearance of the USB OUT window.