USB Receive Problem

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

USB Receive Problem

807件の閲覧回数
georgschmidt
Contributor III

Hi,

I'm using the USBOTG-Module of the Kinetis MK60FN1M0VLQ12 in Device Mode.

By now I only got single-byte-packets from the host and everything worked fine, even if I transfered packets with several bytes to the host.

Now I tried to transfer several bytes in one packet from the host to the device and it failed.

After some debugging I found out, that the transmitted data is stored completely in the appropriate Buffer, but the Cnt-field (BC) in the BDT-Stat-Register will not be updated - I allways get a '1' when I read it.

So I only get the first byte of the transfered data.

Can you give me some hints what could be the reason that the USB-FS does not update the byte count?

Regards,

Georg

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

636件の閲覧回数
georgschmidt
Contributor III

Little update:

If I reinitialize the BC-field after every OUT-transfer by setting it to the endpoint-size I get the right data count even at a multi-byte transfer.

But immediately after leaving the USB-ISR I get a bus-fault exception.

Again single-byte transfers work fine...

How can I find the cause of the bus fault?

Regards,

Georg

0 件の賞賛
返信

636件の閲覧回数
Kan_Li
NXP TechSupport
NXP TechSupport

Hi,

Are you using the baremetal USB stack 4.1.1 or your custom USB application? If you are using FSL USB stack 4.1.1 or something like that, please tell us the example you run and the device you are using, if you implemented your own application, you may also install the FSL USB stack 4.1.1 and refer to the OTG examples in folder of "C:\Freescale\Freescale USB Stack v4.1.1\Source\OTG\examples". From my understanding, you may check if OWN bit of BD is set correctly to let SIE or mircoprocessor have exclusive access to the BD.

Hope that helps,

B.R
Kan

0 件の賞賛
返信