This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Mixing Bios and non Bios code in a real time application

Other Parts Discussed in Thread: TMS320F28069

In my application I am using the TMS320F28069 

The processors has few tasks (communication with the host, monitoring , generating the timing and controlling the current )

The only critical task is the loop control : reading the ADC (current measurement), calculate the PID   and update the PWM signal.

The PWM frequency is 100 kHz and the sampling frequency is also 100 kHz 

I like to:

  •  Use your TI-RTOS for all tasks except the loop control.
  •  Use the CLA for loop control  running independently .

Can I mix the BIOS with non-Bios code?   For example CLA and ISR related to current control with non-Bios code.  

Or I have to forget Ti-RTOS.

Any ideas ?

  • What about using timers ( TA0,TA1,TA2) to do the task and inbetween them do the loop control?. Of course you will have to take in count the time to update of the loop.
    Gastón
  • Thanks Gaston

    But I like to use TI-RTOS  that avoid me to write a lot of software that is not critical. 

  • I don't see any issues with doing what you've described. The CLA should be pretty much unaffected by the RTOS and there are ways to keep your ISRs outside of RTOS control if needed.

    Here's a nice wiki page about using TI-RTOS on a 28x: processors.wiki.ti.com/.../BIOS_for_the_28x

    Whitney
  • Thank you very much Whitney  for your support

    I don't have experience with TI-RTOS , I am learning !! I did few workshops and few labs. 

    By any chance do you have any document that explains the ways to keep ISR outside RTOS control? any example ?

    How to communicate between CLA and other tasks controlled by RTOS  ?

  • That wiki page I sent a link for in my last message talks a bit about the Hwi_plug() function. It allows you to put your own ISR into the vector table and bypass the TI-RTOS Hwi dispatcher. It is recommended that you avoid calling any RTOS code from within an ISR that is not managed by the TI-RTOS kernel, so it's important to keep that in mind when you're deciding whether or not to use Hwi_plug().

    This wiki page has a lot of FAQ for the CLA. See the section on communicating between the CLA and CPU. It's not RTOS specific, but the same information should apply.

    Whitney

  • Thank you again for the help Whitney
    They are a lot of applications for motor control and power supply control but no one use RTOS I am just wondering why ? is RTOS not fast enough for this job? In my application I am using the F28069 (90Mhz) ( sampling at 100khz , PID algorithm , updating the PWM) is that can be managed also by RTOS ?
  • If you look in the SYS/BIOS release notes there are links to benchmarks that may help you make some decisions whether or not it's fast enough for you.

    If you want to use the RTOS and you have concerns about speed, there are strategies to make sure your more time critical code isn't being hampered by the RTOS. I know this workshop gives you some tips on prioritizing and masking interrupts and using the Swi module, and I already mentioned Hwi_plug to bypass the Hwi dispatcher.

    Whitney

  • Thank you for your support