Banner_AURIX_Security-Solution Banner_AURIX_Security-Solution Banner_AURIX_Security-Solution


infineon4engineers Facebook

infineon@google+ Google+

infineon@linkedin linkedin

infineon4engi@twitter twitter

infineon@youtube youtube

+ Reply to Thread
Results 1 to 9 of 9

Thread: QSPI BACON calculation of delays

  1. #1
    New Member New Member Kumaresh is on a distinguished road
    Join Date
    May 2019
    Posts
    8
    Points
    77.5

    QSPI BACON calculation of delays

    Hi,

    I am trying to execute sample program from the vendor for driving external eeprom (25LC640A) using tc234 QSPI0. The below parameters are configured as follows:

    BACON.LPRE = 1
    BACON.LEAD = 3

    fBaud = 200/((49+1)*(1+1+1+1)) = 1 MHz

    when I am using the formula as given in user manual TLEAD = TBAUD2 * 4^LPRE * (LEAD+1) I am getting TLEAD as 80 us (10^-6 * 4^4 * 5) but when I measured through oscilloscope I am getting the TLEAD as 2.56 us (approx.). Could you please let me know what I am doing wrong? I believe I am missing something in the calculation.

    Thanks for your time.

    Many Thanks,
    Kumaresh

  2. #2
    Advanced Advanced cwunder is on a distinguished road
    Join Date
    Feb 2015
    Location
    USA
    Posts
    101
    Points
    1897.5
    Assuming 200MHz (fBAUD2), I calculate 80 nsec not 80 usec. You should also check the output driver strength for SPI0 pins are set to speed grade 1.

  3. #3
    New Member New Member Kumaresh is on a distinguished road
    Join Date
    May 2019
    Posts
    8
    Points
    77.5
    Hi,

    I checked the output driver strength and it set to 1. I believe I am confused with the calculation. Could you please elaborate on how you arrived at 80 ns. Thanks for your time.

    Regards,
    Kumaresh

  4. #4
    Advanced Advanced cwunder is on a distinguished road
    Join Date
    Feb 2015
    Location
    USA
    Posts
    101
    Points
    1897.5
    From the User’s Manual
    TLEAD = TBAUD2 * BACON.LPRE * BACON.LEAD

    For the calculation of the delay:
    TBAUD2 = 1 / fBAUD2
    TLEAD = TBAUD2 * 4^LPRE * (LEAD+1)

    You provided the following parameters
    BACON.LPRE = 1
    BACON.LEAD = 3
    fBAUD2 = 200MHz

    Therefore:
    TBAUD2 = 1/200MHz = 5e-9 or 5nsec
    LPRE = 4^1 = 4
    LEAD = 3 + 1 = 4
    The value of the LEAD delay is 5e-9 * 4 * 4 = 80e-9 or 80nsec

  5. #5
    New Member New Member Kumaresh is on a distinguished road
    Join Date
    May 2019
    Posts
    8
    Points
    77.5
    Thanks for your detailed reply. I believe I have misunderstanding in substituting the values in BACON.LPRE * BACON.LEAD. As per the manual from my understanding when LPRE = 001b I need to use 4 and TPRE = 3 I need to plug in 4 (pg no 1841 Basic Configuration Register Table). So I plugged in the values as 5e-9 * 4^4 * (4 + 1) and calculated the value as 640 microsec. Could you please comment on how to infer the values from the attached image? In other words my query is what does the value of 0D means in LEAD. Thanks for your time.
    Click image for larger version

Name:	LPRE.PNG
Views:	2
Size:	27.3 KB
ID:	4097

  6. #6
    Advanced Advanced cwunder is on a distinguished road
    Join Date
    Feb 2015
    Location
    USA
    Posts
    101
    Points
    1897.5
    The Formula:

    Click image for larger version

Name:	qspi_delay.png
Views:	3
Size:	35.8 KB
ID:	4100

    This what you asked:
    BACON.LPRE = 1
    BACON.LEAD = 3



    Now you ask
    Could you please comment on how to infer the values from the attached image? In other words my query is what does the value of 0D means in LEAD


    See the calculation of the LEAD delay above.

    If the LEAD is 0 decimal, then this what is used in the formula (i.e. LEAD + 1 which is 0 + 1) while the BACON.LEAD = 0 is the register value
    Last edited by cwunder; Aug 14th, 2019 at 06:54 PM.

  7. #7
    New Member New Member Kumaresh is on a distinguished road
    Join Date
    May 2019
    Posts
    8
    Points
    77.5
    Thanks Chris for the detailed clarification. It gave me more clearer inference.

  8. #8
    Intermediate Intermediate KDN is on a distinguished road
    Join Date
    Oct 2017
    Posts
    36
    Points
    552.5
    Quote Originally Posted by cwunder View Post
    From the User’s Manual
    TLEAD = TBAUD2 * BACON.LPRE * BACON.LEAD

    For the calculation of the delay:
    TBAUD2 = 1 / fBAUD2
    TLEAD = TBAUD2 * 4^LPRE * (LEAD+1)

    You provided the following parameters
    BACON.LPRE = 1
    BACON.LEAD = 3
    fBAUD2 = 200MHz

    Therefore:
    TBAUD2 = 1/200MHz = 5e-9 or 5nsec
    LPRE = 4^1 = 4
    LEAD = 3 + 1 = 4
    The value of the LEAD delay is 5e-9 * 4 * 4 = 80e-9 or 80nsec
    Hi,

    Can you help me to know fBAUD2 is SPI operating frequency or aurix operating frequency.

  9. #9
    Advanced Advanced cwunder is on a distinguished road
    Join Date
    Feb 2015
    Location
    USA
    Posts
    101
    Points
    1897.5
    For the TC2xx devices the fBAUD2 is derived from either the fPLL or fBACK and you can also divide it. It depends on the settings in the CCUCON0 register.

+ Reply to Thread

Tags for this Thread

Disclaimer

All content and materials on this site are provided “as is“. Infineon makes no warranties or representations with regard to this content and these materials of any kind, whether express or implied, including without limitation, warranties or representations of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. No license, whether express or implied, is granted by Infineon. Use of the information on this site may require a license from a third party, or a license from Infineon.


Infineon accepts no liability for the content and materials on this site being accurate, complete or up- to-date or for the contents of external links. Infineon distances itself expressly from the contents of the linked pages, over the structure of which Infineon has no control.


Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Usage Terms of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Usage Terms of this site. Infineon reserves the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.