Freescale Semiconductor Microcontrollers User Manual

Page 323

Advertising
background image

HC08 Full Chip Simulation

Configuration Procedure

323

Microcontrollers Debugger Manual

To replicate this stage in the simulator, enter the SETUP packet as shown in

Figure 11.56

and the DATA0 packet as shown in

Figure 11.58

, 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

Figure 11.59

. 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

Figure 11.60

. 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.

Figure 11.61

shows the USB IN window.

Figure 11.62

shows the current appearance of the USB OUT window.

Advertising