SN32F260 Series
32-Bit Cortex-M0 Micro-Controller
SONiX TECHNOLOGY CO., LTD
Page 106
Version 1.5
10.6 USB MACHINE
The USB machine allows the microcontroller to communicate with the USB host. The hardware handles the following
USB bus activity independently of the microcontroller.
The USB machine will do:
–
Translate the encoded received data and format the data to be transmitted on the bus.
–
CRC checking and generation by hardware. If CRC is not correct, hardware will not send any response to USB
host.
–
Send and update the data toggle bit (Data1/0) automatically by hardware.
–
Send appropriate ACK/NAK/STALL handshakes.
–
SETUP, IN, or OUT Token type identification. Set the appropriate bit once a valid token is received.
–
Place valid received data in the appropriate endpoint FIFOs.
–
Bit stuffing/unstuffing.
–
Address checking. Ignore the transactions not addressed to the device.
–
Endpoint checking. Check the endpoint’s request from USB host, and set the appropriate bit of registers.
Firmware is required to handle the rest of the following tasks:
–
Coordinate enumeration by decoding USB device requests.
–
Fill and empty the FIFOs.
–
Reset/Suspend/Resume coordination.
–
Remote wake up function.
–
Determine the right interrupt request of USB communication
10.7 USB INTERRUPT
The USB function will accept the USB host command and generate the relative interrupts, and enter
USB_IRQ_Handler. Firmware is required to check the USB status bit to realize what request comes from the USB host.
The USB function interrupt is generated when:
–
The endpoint 0 is set to accept a SETUP token.
–
The device receives an ACK handshake after a successful read transaction (IN) from the host.
–
If the endpoint is in ACK OUT modes, an interrupt is generated when data is received.
–
The USB host sends USB suspend request to the device.
–
USB bus reset/resume event occurs.
–
The USB endpoints interrupt after a USB transaction complete is on the bus.
–
The NAK handshaking when the NAK interrupt enables.
Содержание SN32F260 Series
Страница 132: ...SN32F260 Series 32 Bit Cortex M0 Micro Controller SONiX TECHNOLOGY CO LTD Page 132 Version 1 5 16 2 QFN 46 PIN ...
Страница 136: ...SN32F260 Series 32 Bit Cortex M0 Micro Controller SONiX TECHNOLOGY CO LTD Page 136 Version 1 5 16 6 QFN 33 PIN ...
Страница 137: ...SN32F260 Series 32 Bit Cortex M0 Micro Controller SONiX TECHNOLOGY CO LTD Page 137 Version 1 5 16 7 SSOP 24 PIN ...