
APPENDIX
S3C9654/C9658/P9658
19-6
BOUNDARY CONDITION PROBLEM.
Application:
KS86P/C6104, KS86P/C6504, KS86P/C6408.
Direction:
Boundary condition arise from IN (DEV
→ HOST) direction.
Condition :
1) Happen in Control transfer.
2) Host want the data exactly the multiple of MAX Packet number.
ex) Assume the max packet number is 8 and host want 2 bytes.
Problem:
SPEC does not define Exact protocol in this case.
case 1, 1) Host send setup transaction.
2) Host send IN packet and Device reply 8 bytes.
3) Host send IN packet and Device reply 8 bytes (16 bytes).
4) Host send IN packet and Device reply 8 bytes (24 bytes).
5) Host send OUT packet for status stage.
case 2, 1) Host send setup transaction.
2) Host send IN packet and Device reply 8 bytes.
3) Host send IN packet and Device reply 8 bytes (16 bytes).
4) Host send IN packet and Device reply 8 bytes (24 bytes).
5) Host send IN packet and Device reply zero-length packet.
6) Host send OUT packet for status stage.
Solution:
Samsung USB controller should reply both cases in one firmware.
Samsung USB controller can work with two cases like below.
(1) Usage : in_pkt_rdy, data_end flag.
(2) MCU should set these two flag between 4) and 5) in above cases.
example) 1. Setup transaction. Load data to FIFO and set in_pkt_rdy..
2. IN-Data1-ACK, Generate interrupt. Load second data to FIFO.
And set in_pkt_rdy. (Send 8 bytes, load 8 bytes).
3. IN-Data0-ACK, Generate interrupt. Load third data to FIFO.
And set in_pkt_rdy. (Send 16 bytes, load 8 bytes).
4. IN-Data1-ACK, Generate interrupt. (Send 24 bytes).
MCU should set in_pkt_rdy and data_end flag at the same time.
5. If host send IN packet then device send zero-length packet.
And do the status stage.
If host send OUT packet then device send ACK.
NOTE: If MCU does set in_pkt_rdy in 4 of example then device send STALL when received
another IN Packet.