Porting USB Stack example projects to CrossWorks

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Porting USB Stack example projects to CrossWorks

Jump to solution
1,059 Views
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

Labels (1)
0 Kudos
1 Solution
719 Views
gaminn
Contributor IV

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

View solution in original post

0 Kudos
5 Replies
719 Views
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 Kudos
719 Views
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 Kudos
719 Views
chuckh
Contributor III

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

0 Kudos
720 Views
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 Kudos
719 Views
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 Kudos