Porting USB Stack example projects to CrossWorks

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Porting USB Stack example projects to CrossWorks

跳至解决方案
1,064 次查看
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 解答
724 次查看
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 回复数
724 次查看
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 项奖励
724 次查看
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 项奖励
724 次查看
chuckh
Contributor III

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

0 项奖励
725 次查看
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 项奖励
724 次查看
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 项奖励