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.

Timing difference for running from Flash and RAM in Picolo



Hi,

 

I want to run a time critical function in an ISR routine. It is generally said that when you run the code from RAM, it is faster than running from FLASH. I m using 28035 processor. Is there any document available for this.

 

How much is the difference in execution time between the two?

 

Thanks in advance.

 

with warm regards,

K.Sugantha

  • Sugantha,

     

    The flash has a minimum access time of 40ns for F28035 which has to be met at all times. The correct flash wait state (which depends on the system frequency) has to be used in order to meet the access time requirements. Please refer to the "Flash timing" section in the F28035 data sheet for flash wait state calculation based on the system frequency. Where as the RAM access is always a 0-wait state access, hence the RAM access is faster than flash.

    This document describes method to run code from flash : http://www.ti.com/lit/pdf/spra958

     

     

    Regards

    Vaish

  • Sugantha,

    To add to what Vaish said, the flash does have a prefetch mechanism which will speed up the effective speed of the flash of linear code. The actual speed you can acheive is based on how linear your code is. The more jumps, the more times the prefetch buffers will need to be flushed. You will never be able to attain 0-wait state performance though. However, at 60MHz, you may be able to get 50 or 55 MIPS out of the flash.

    Regards,
    Dave Foley