infineon4engineers Facebook

infineon@google+ Google+

infineon@linkedin linkedin

infineon4engi@twitter twitter

infineon@youtube youtube

+ Reply to Thread
Results 1 to 4 of 4

Thread: Xmc1200 systm001

  1. #1
    Jurgen
    Guest

    Xmc1200 systm001

    in DAVE v 3.1.10 there is a SYSTM001 timer app. The app GUI shows three settings: SysTick, SWTimers and Interrupt Configuration.

    What does 'Number of Software Timers' mean? It's not described in the documentation. I assumed that it means you can have for example 32 timers, each of which can be created/started/stopped/deled individually. The app is however not behaving like that. If I set more than one timer in the 'Number of Software Timers' field, none of my timers works. A 18ms delay timer would just appear to be hanging.

    I need 3 timers, one with a 1ms timeout, one with a 18ms timeout, one with a 250ms timeout and they need to operate simultaneously.
    the 250ms timeout calls a non-blocking function when it hits the callback function
    the 18ms timeout is a delay
    the 1ms timeout increments a variable.


    If I set the 'Number of Software Timers' field to 1, I can use these timers individually and the timeout is correct..ish.

    Is my assumption incorrect?

  2. #2
    Jurgen
    Guest
    some more observation:

    If a 1ms timer gets started whilst a lets say 900ms timer is already started, the 1ms timer never expires and the code hangs.

    This is with the 'Number of software timers' field in the SYSTM001 GUI set to 3.

  3. #3
    sophia
    Guest
    Hi Jurgen,

    I've built a simple project with 3 periodic timers (1ms, 18ms & 250ms) and it worked without problem. Would you be able to provide some more project details or even provide your project for our analysis?

    Best regards,
    Sophia

  4. #4
    Jurgen
    Guest
    Hi Sophia,

    I don't think providing the project will help you unless I also send the hardware to you.
    I am starting a 500ms timer. After that timer has started, I need occasional random delays and I use my WaitMS() function. This causes the whole application to hang, waiting for my WaitMS() function to finish. The callback function 'my_tmr_a' doesn't seem to get called.
    The WaitMS() function works fine if it is called before the 500ms timer.

    I am starting a 500ms timer this way:

    void active_scan_tmr(void* Temp)
    {
    uint32_t Status = SYSTM001_ERROR;
    if(UZ2400Channel>26)
    {
    Status = SYSTM001_StopTimer(ScanTimerId);
    if(Status == DAVEApp_SUCCESS)
    {
    SYSTM001_DeleteTimer(ScanTimerId);
    }
    MAC_STATE=SCAN_DONE;
    LED1_CLOSE();
    MLME_SCAN_confirm (MAC_SUCCESS,ACTIVE,0,UZ2400Channels,node_number,N ULL,PANDescriptorList,0,NULL);
    }
    else MLME_SCAN_request(ACTIVE, UZ2400Channels, scan_duration, 0, 0, 0, 0, 0);
    }

    void ScanTimerStart(uint16_t count, SYSTM001_TimerCallBackPtr TimerCallBack)
    {
    ScanTimerId = SYSTM001_CreateTimer(count,SYSTM001_PERIODIC,Timer CallBack,NULL);
    if(ScanTimerId != 0)
    {
    SYSTM001_StartTimer(ScanTimerId);
    LED1_OPEN(); //for scan indication
    }

    }


    This is my second timer that gets called at random intervals after the first timer has started:

    void my_tmr_a(void* Temp)
    {
    TimerExpired=TRUE;
    }

    void WaitMS (uint16_t count, SYSTM001_TimerCallBackPtr TimerCallBack)
    {
    //handle_t TimerId;
    uint32_t Status = SYSTM001_ERROR;
    DelayTimerId = SYSTM001_CreateTimer(count,SYSTM001_PERIODIC,Timer CallBack,NULL);
    if(DelayTimerId != 0)
    {
    TimerExpired=FALSE;
    //Timer is created successfully
    Status = SYSTM001_StartTimer(DelayTimerId);
    if(Status == DAVEApp_SUCCESS)
    {
    // Wait till timer is expired
    while(TimerExpired == FALSE)
    {}
    //stop the timer
    Status = SYSTM001_StopTimer(DelayTimerId);
    if(Status == DAVEApp_SUCCESS)
    {
    SYSTM001_DeleteTimer(DelayTimerId);
    }
    }
    }
    }


    Best Regards
    Jurgen

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