Porting USB Stack example projects to CrossWorks

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

Porting USB Stack example projects to CrossWorks

ソリューションへジャンプ
2,340件の閲覧回数
gaminn
Contributor IV

Hello,

is there any information how to port existing projects in Freescale USB Stack 4.0.3 to Rowley CrossWorks for ARM? For example this project: Freescale USB Stack v4.0.3\Source\Device\app\hid\cw10\kinetis_k70 . I can build it in CrossStudio, however the enumeration fails. I did no modification to the original code, only startup code differs.

MCU clock is OK (120 MHz), ISRs are working.

Thanks

ラベル(1)
0 件の賞賛
返信
1 解決策
2,000件の閲覧回数
gaminn
Contributor IV

  We finally did it – the whole magic is that „LITTLE_ENDIAN“ symbol wasn’t defined for CrossStudio project. Codewarrior has it.

元の投稿で解決策を見る

0 件の賞賛
返信
5 返答(返信)
2,000件の閲覧回数
HagaiCohen
Contributor I

Hi,

Sorry for reviving this old thread but i have the same issue while writing my own stack,

when connecting USB, i get ERR Interrupt, ERRSTAT is 1 (PIDERR)

this is the only thread i found about this issue.

Currently i'm compiling the code with arm-none-eabi- toolchain, all i have to do is add #define LITTLE_ENDIAN ?

or how do i set this little-endian mentioned?

EDIT:

I tried both #define LITTLE_ENDIAN in the .c file

and -mlittle-endian in the gcc command line, no help.

also, there is a PLL mentioned, im pretty sure i'm using the right PLL, because reset interrupt is working, but what pll should be used?

0 件の賞賛
返信
2,000件の閲覧回数
chuckh
Contributor III

I added the define to my project settings.  The PLL was because of how the clocks are configured.  Make sure that the USB is getting a 48MHZ clock one way or another.  It doesn't necessarily have to be the PLL, but it does have to be 48MHZ.  I'm no expert, but I know that once I looked into how the clocks worked, I was able to also get it working without the PLL.

0 件の賞賛
返信
2,000件の閲覧回数
chuckh
Contributor III

Figured it out...it was a PLL thing plus the LITTLE_ENDIAN.

0 件の賞賛
返信
2,001件の閲覧回数
gaminn
Contributor IV

  We finally did it – the whole magic is that „LITTLE_ENDIAN“ symbol wasn’t defined for CrossStudio project. Codewarrior has it.

0 件の賞賛
返信
2,000件の閲覧回数
chuckh
Contributor III

I'm having similar issues porting to Atollic IDE.  The LITTLE_ENDIAN was an issue, but I'm still having problems.  I'm getting a USB error PIDERR.  Any thoughts?

0 件の賞賛
返信