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.

SYS/BIOS overhead on 'F28069

I am evaluating SYS/BIOS for use in a servo control project where highest sample rate would be 40uS.  I used CCS Wizard to create a new 'typical' SYS/BIOS project  and wrote a very simple LED toggle program that repeatedly toggles an LED during the IDLE time and then toggles a second LED once each time the system services a CLOCK event (this is all on the DRV8312-69M-KIT).  The CLOCK Tick period is set to  200uS and the instance that toggles this second LED has a period of 1 (so it should toggle every 200uS).  When I look at the signals driving these two LED's on a scope I see that the IDLE LED stops toggling some 110uS before the CLOCK instance LED toggles, and then starts up again about 25uS after.  Assuming the time during which the IDLE LED is not toggling is SYS/BIOS overhead, that suggests an overhead of around 135uS to handle the HWI and SWI and whatever other processing is associated with the CLOCK event.  This is on a 90MHz 'F28069.  If these numbers are real, SYS/BIOS has too much overhead to be used with a system with my clock rate and sample rate. Do I have something set up wrong or should I expect this kind of overhead from SYS/BIOS?

Thanks,

Mitch H. 

  • Hi Mitch H.

    Mitch Hanks said:
    Do I have something set up wrong or should I expect this kind of overhead from SYS/BIOS?

    Maybe ...

    Are you running out of flash?  If so, there is a known issue regarding a high number of wait states are required for flash memory accesses.  This increases the number of cycles it takes to do work in the program.  If you're running out of flash you should try to run out of RAM instead and see if that improves the times you are seeing.

    By the way, another customer just had a very similar issue in this thread.

    Mitch Hanks said:
    The CLOCK Tick period is set to  200uS and the instance that toggles this second LED has a period of 1 (so it should toggle every 200uS).

    This is pretty fast, so you're going to have a lot of interrupts hitting.  Also, if you have multiple Clock objects then BIOS must go through the queue of each one.  This would add additional overhead.  Furthermore, there is also the overhead of running the Clock function you have configured, which toggles the LED.  So that time is included in this, as well.

    Most SYS/BIOS operations are pretty fast.  Looking at the SYS/BIOS timing benchmarks for the ezdsp28335, taking Hwi dispatcher prologue for example, it takes 219 cycles to complete.  Assuming that the number of cycles would be the same for the 28069 device you are on, this would be:

    219 cycles * (1 sec / 90,000,000 cycles) * (1 us / 10^-6 s) = 2.43 us

    Similarly, for Hwi epilogue -> 164 cycles at 90MHz = 1.82 us

    Finally, the benchmark that probably applies most closely to this scenario, "Hardware Interrupt to Software Interrupt", would come out to: 451 cycles at 90MHz = 5.01 ms.

    (Benchmarks results are linked in the SYS/BIOS release notes, descriptions of the benchmarks are found in the SYS/BIOS user's guide, Appendix B Timing Benchmarks).

    Steve