usage of target interface block for Piccolo f28069

I had generated a pulse with varying frequency. And I created a debug file for it. I used target interface block, but when I run the -d file it shows an error. The error is " TI driver error-1142, PTI_ERR_QUAL(OTIS Error-1) "

please check the attached files and help me as soon as possible.

There are many problems with

There are many problems with your diagram. You are trying to sample at a high frequency (100 kHz) so you must take care to be efficient. You are using a clever but very inefficient method to create a variable frequency square wave.

  1. You specified external oscillator in the f28x config block. Many TI boards do not have an external oscillator for the 28069 boards. Switching to internal oscillator will fix this.
  2. You have 2 divides. Divides are very slow. You can remove the first divide that calculates period from specified frequency and specify period directly instead. This moves the divide from your "pulse" compound running on the target to the PC running your -d diagram.
  3. You are using a TAN and ATAN function. They are very slow.
  4. You are using numerical integration with RK2. This is also slow. Normally you avoid numerical integration for embedded systems.
  5. Your program runs at 30% utilization at 100 Hz sample rate. The fastest it can sample is 300 Hz.
  6. A variable pulse can be done in VisSim by adding 2 inputs to the VisSim pulse block. The lower pin is the period. The attached diagram gives the same variable frequency square wave output as your diagram, but is 2000 times faster and can sample at 100 kHz.