[MCF51JM128] USB Problem

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

[MCF51JM128] USB Problem

437 Views
Pogo
Contributor III

Hi All,

 

I used MCF51JM128 to measure pulse width of input signal and send the result to PC with USB port.

 

The following list is my brief hardware structure.

 

Signal -> Input Capture -> MCF51JM128 -> USB -> PC

 

I used usb.c,usb.h on AN3690 to send data to PC through USB port. But I encountered one problem, when I send data to PC through USB port. It will lower priority of other interrupt and I will lost some pulse of input signal.

 

How do I send data through USB but will not disturb the interrupt of input signal??

Labels (1)
0 Kudos
1 Reply

263 Views
TomE
Specialist II

The Coldfire supports seven different interrupt priority levels.

You should set the priority of the data collection interrupt to be higher than the USB one.

The USB code may be disabling all interrupts. You'll have to check for that and fix it if it is.

If it is doing that and you can't fix it you can always (very carefully) run your data collection interrupt at IPL7, which can't be masked.

So you need to find out how your development system supports your specifying different interrupt levels. It may not be as simple as setting it in just one place.


Tom