AnsweredAssumed Answered

MQX Performance with MQX Bootloader

Question asked by Steve Janisch on Nov 19, 2013
Latest reply on Dec 10, 2013 by Steve Janisch

I am evaluating MQX 4.0 on a TWR-MCF5441x evaluation kit.

 

For several weeks I have been evaluating MQX 4.0 performance for a future application.  The application is for precision control of some high speed servo motors and to accomplish this I have created a high priority timer interrupt.  I am using the MQX function _time_diff_microseconds to evaluate the jitter for the high priority interrupt.  I log and record peaks and averages for the jitter and display them on a telnet debug screen I have incorporated on a lower priority task.

 

I am building the project for external Ram Release.

 

When I launch the application from CodeWarrior (CTRL+F11 Run ) the jitter is minimal.  I do get some, but mostly all are within within +/- 50 microseconds of expected.

 

My next step was to launch the application via the MQX bootloader included as an example application.  This application runs a small program that accepts binary image files via TFTP and stores them in flash.  It can be configured to automatically read a binary from flash and copy it to RAM and launch it, so is a viable option for production.

 

I would have expected the two approaches to have identical or at least very close results.  But the application launched by the bootloader show a lot more jitter -- both in frequency and amplitude.  There are many interrupts outside of +/- 500 microsecond.

 

Has anyone else witnessed this sort of phenomenon, or have any idea why the two environments have drastically different results?

 

I have the following thoughts but really cannot seem to come up with a good theory, or even a good starting point to correcting the problem:

(1) The bootloader itself runs as a low priority task (lower than any of the tasks in my application).  It exits after copying and launching the application with the mqx function _mqx_exit.  Should it shut down differently?

(2) Is there some "clean-up" required of the MQX bootloader program and the lack of this is messing up the application tasks?

(3) I'm not sure exactly what happens with the CodeWarrior launch, but I assume it uses the ELF file.  The bootloader is copying and launching a binary image -- are these two files not functionally equivalent?

 

Any ideas, pointers -- even snide remarks -- appreciated...

Outcomes