usage of target interface block for Piccolo f28069

Altair Forum User
Altair Forum User
Altair Employee
edited November 2020 in Community Q&A

Submitted by ATHIESH on Sun, 12/29/2013 - 19:48 

 

 

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.

Unable to find an attachment - read this blog

Tagged:

Answers

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited November 2020

    Submitted by Anders89 on Mon, 12/30/2013 - 11:41.

    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.

    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.

    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.

    You are using a TAN and ATAN function. They are very slow.

    You are using numerical integration with RK2. This is also slow. Normally you avoid numerical integration for embedded systems.

    Your program runs at 30% utilization at 100 Hz sample rate. The fastest it can sample is 300 Hz.

    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.

    Unable to find an attachment - read this blog