USB CDC problem

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
1,417件の閲覧回数
raduansarif
Contributor I

Hello, my frdmkl27z_dev_cdc_vcom_bm code stopped in the following part, what I need to do to work on this part..?

raduansarif_0-1648111046457.jpeg

 

0 件の賞賛
返信
1 解決策
1,404件の閲覧回数
bobpaddock
Senior Contributor III

 

Possibilities:

A) The structure pointer khciState is not initialize correctly.

B) The Buffer Description Table (BDT) is not aligned on a 512 byte boundary as I explained in other thread (It is best to keep everything in one thread, rather than starting many about the same subject).

As the BDT is part of a structure in this code the structure must start on a boundary, which may or many not account for structure packing and it matters here, that will place the BDT on that 512 byte boundary.

C) Something about the USB is not initialized correctly (->registerbase->).  Probably would not have gotten this far in the code if that is the case.  Using USB1 rather than USB0 on a part with only one USB.

Find out exactly where BDT is in the address map by looking at the listing, .sym or .map file.
Keeping in mind it is part of the larger structure containing it.





元の投稿で解決策を見る

0 件の賞賛
返信
3 返答(返信)
1,369件の閲覧回数
raduansarif
Contributor I

Hello thank you i could solve the problem.

 

0 件の賞賛
返信
1,405件の閲覧回数
bobpaddock
Senior Contributor III

 

Possibilities:

A) The structure pointer khciState is not initialize correctly.

B) The Buffer Description Table (BDT) is not aligned on a 512 byte boundary as I explained in other thread (It is best to keep everything in one thread, rather than starting many about the same subject).

As the BDT is part of a structure in this code the structure must start on a boundary, which may or many not account for structure packing and it matters here, that will place the BDT on that 512 byte boundary.

C) Something about the USB is not initialized correctly (->registerbase->).  Probably would not have gotten this far in the code if that is the case.  Using USB1 rather than USB0 on a part with only one USB.

Find out exactly where BDT is in the address map by looking at the listing, .sym or .map file.
Keeping in mind it is part of the larger structure containing it.





0 件の賞賛
返信
1,381件の閲覧回数
raduansarif
Contributor I

hello bobpaddock 

Thanks for the reply.

In my MCU MKL27Z128LH4, this example ( frdmkl27z_hello_world_virtual_com) is working.

I try with frdmkl27z_dev_cdc_vcom_bm but I fails in 

if (kStatus_USB_Success != USB_DeviceClassInit(CONTROLLER_ID, &s_cdcAcmConfigList, &s_cdcVcom.deviceHandle))
{
usb_echo("USB device init failed\r\n");
}

this part. 

I try with frdmkl43z_dev_cdc_vcom_bm, it's also connected with the port.

What is the actual problem, I do not understand 

0 件の賞賛
返信