AnsweredAssumed Answered

MCF51JM  USB (CDC) and Processor Expert.

Question asked by Robert Bailey on Mar 4, 2012
Latest reply on Apr 17, 2012 by Erich Styger

Hello all,

 

I have an existing project,  built with the MCF51JM part,  and it functions quite well.  I am at the point of adding additional features,  and the JM part was originally chosen so that the USB could be "easily" added.

 

The project is built in Codewarrior 6.3 with Processor Expert.  Many of PE's features work extremely well,  and I have grown accustomed to using it.  It is the main reason I stick with Freescale's parts.

 

Integrating the CDC class "should" be a straightforward task.  put the required files in an appropriate spot,  and add them to the project.  add a few "include" lines and then call the functions. 

 

All of the USB app notes,  sample code, etc are all built around the non-PE environment.   So lots of 'manipulations' of the files becomes necessary.

 Well,  after searching around for all the stuff in target.c  target.h, and the low-level assembler stuff that the USB functions seem to want,  and modifying the code as required,  I can get it to compile with no errors (there were several warnings, however)

 

Simple,  right?    Not so much.  PE takes control of the interrupt vectors.   So,  I add an interrupt vector bean,  and call the USB interrupt function from there.  Ok,  fine.  it all compiles,  and the init calls seem to return without error,  the software is executing.

 

Great?   Nope.  The usb init functions have shut off all the peripherals that Processor Expert initializes.  I can move the USB init to before the PE_Init,  or after.  The timers are not running.

 

Sure I can dig thru it all,  and figure out how to "patch" this "proven code",  but this is getting old fast. 

 

Do I really have to pay big bucks for the PE 'Bean' just so I can spit data out the USB? 

 

Sorry for the tirade,  its been a long afternoon.   Has anyone sucessfully made the CDC class easily integrated into PE based projects?

 

Thanks for listening.

 

Bob Bailey

Outcomes