infineon4engi@twitter infineon@linkedin infineon4engineers infineon@youtube
twitter Facebook Linkedin Youtube

+ Reply to Thread
Results 1 to 4 of 4

Thread: TIMER 4.1.6 with DAVE 4.1.4 and XMC4500 Step AB - Possible Bug

  1. #1
    zoompig will become famous soon enough zoompig's Avatar
    Join Date
    Mar 2013
    Location
    San Diego, CA USA
    Posts
    53
    Points
    63.75

    TIMER 4.1.6 with DAVE 4.1.4 and XMC4500 Step AB - Possible Bug

    Using the DAVE4 Timer app, I configured a CCU4 slice to have a period of 50 microseconds in the App GUI:
    Click image for larger version

Name:	50 us timer.PNG
Views:	0
Size:	5.2 KB
ID:	1844
    Its event is connected to an interrupt in which I toggle a GPIO line high and low. When I execute the code I can
    see with an oscilloscope that the interrupt arrives with a period of 50 us, just as I requested. This much works nicely.

    However, If I then examine that timer's TIMER struct instance at runtime, I find that the .time_interval_value_us field
    of the structure has been set to 5000. The trailing '_us' in the field name leads me to believe that the value stored in this
    field has units of microseconds, but it actually has a unit value of 10ns.

    A text search through the project finds the following line in timer_confc.tmpl:
    Code:
      .time_interval_value_us = ${((appIns.gfloat_time_interval.value * 100)).toLong()}U,
    Here it appears that the GUI code is deliberately multiplying the user entered value in microseconds by 100.

    There appears to be an inconsistency here. Either the units label on the form is incorrect, or the suffix of the TIMER struct
    field name is incorrect. Other code that I wrote that assumes units of this field to be in microseconds becomes incorrect in this case.
    Which is meant to be right? Or, are they both meant to have units of microseconds, and the factor of 100 in the GUI code is wrong.

    Please advise regarding the intended behavior, and please add it to the bug fix list if it is a bug. I will code around this for now.

    Best Regards,
    Kurt J.

  2. #2
    Daryl Neo
    Guest
    Hi Kurt,

    The scaling by a factor of 100 is intended for the APP as the APP is intended to be used on XMC4000 and XMC1000 device. On the XMC1000 device, this represents a fixed-point implementation of the timer calculation. (i.e. in the UI if the entry is 21.34us, the value in the configuration is 2134)
    In this way, this has allowed a better resolution of the timer to be implemented as it is supported by the CCU hardware.

    Let me know if this is clear for you. If you think that this is still misleading, I can file an e-Ticket to emphasis the "scaling factor of 100" in the APP documentation.
    Please let me know your thoughts on this.

    Regards,
    Daryl

  3. #3
    zoompig will become famous soon enough zoompig's Avatar
    Join Date
    Mar 2013
    Location
    San Diego, CA USA
    Posts
    53
    Points
    63.75
    Hi Daryl,

    If the intent of the TIMER app authors is that the unit values of these variables is 10ns, I would recommend that the App
    documentation make this clear. I would also suggest that the misleading '_us' suffix on the variable names implying units
    of microseconds be removed.

    I appreciate the opportunity to give my feedback. Thanks!

    -Kurt
    Last edited by zoompig; Dec 2nd, 2015 at 01:57 PM.

  4. #4
    Daryl Neo
    Guest
    Hi Kurt,

    Thanks for the feedback. We appreciate your feedback too!

    I have filed the e-Ticket (#173084162) as requested.

    Regards,
    Daryl

+ 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.