MCF52259 as USB device

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

MCF52259 as USB device

900件の閲覧回数
xinzhoutang
Contributor I

Hello ,

 

I am now using MCF52259 as an USB device .  It's the first time to use usb peripheral .I am a little confused about the meaning of  tok_dne bit .

 

If  this bit is set only after receiving a token packet ?

 

For example if it's an out token ,  what will happen after receiving a data packet from the host  ?  A bit will be set to indicate the receiving of a data packet ?

 

Also , if the device wants to send a status packet . What will the device do ?

 

thanks a lot .

 

tangxinzhou@gmail.com

ラベル(1)
0 件の賞賛
返信
1 返信

715件の閲覧回数
mjbcswitzerland
Specialist V

Hi

 

The tok_dne bit means that a token has completed. Depending on whether the pipe is an IN or OUT pipe determines which direction it is, but the TX_TRANSACTION bit in the STAT register will also indicate the direction (an IN transaction will have this set to 0).

 

When the user wants to send data (or zero data) the Tx buffer descriptor needs to be set up and the OWN bt set so that the device then sends the content. Otherwise the controller handles all tokens like ACK and NAK automatically.

 

See also http://www.utasker.com/docs/uTasker/USB_User_Guide.PDF (there is some M522XX specific stuff in the appendix).

 

Regards

 

Mark

 

 

0 件の賞賛
返信