Test Elapsed time based on CTimer module

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Test Elapsed time based on CTimer module

Test Elapsed time based on CTimer module

Test Elapsed time based on CTimer module

 

Sometimes, It is required to test the time which an api function takes when the function is executed, for example, some users want to test the flash erasing time and flash programming time. User can use GPIO to set/clear and use scope to test the GPIO timing to measure the time an api function takes, the method is very simple and straightforward but inaccurate.

The document describes to configure CTimer as a 32bits  free-running counter, user can read the counter value before and after an api function and compute the counter value difference to get the time the api function takes.

The CTimer of LPC54xxx family counts the APB bus clock, the APB bus clock Is driven by 12 MHz FRO, user can use the following code to measure the elapsed time.

For example, we test the elaped time of  delayTimer(10000); function, we get the variable tPoint1, tPoint2. The actual time is (tPoint2- tPoint1)*(1/12000000).

In the example, the tPoint2=110127, the tPoint1=53, the elapsed time is (110127-53)*(1/12000000)=9.172us.

pastedImage_3.png

//the souce code focuses on LPC54xxx family

uint32_t tPoint1,tPoint2,tPoint3,tDiff;

void test(void)

{

    tPoint1=CTIMER_GetTimerCountValue(CTIMER2);

    //simulate elapsed time

    delayTimer(10000);

    tPoint2=CTIMER_GetTimerCountValue(CTIMER2);

    tDiff=tPoint2-tPoint1;

 

    //simulate elapsed time

    delayTimer(20000);

    tPoint3=CTIMER_GetTimerCountValue(CTIMER2);

    tDiff=tPoint3-tPoint2;

     PRINTF("Time instand:tPoint1=%d, tPoint2=%d, tPoint3=%d \r\n",tPoint1,tPoint2,tPoint3);

}

Snippet of simple source code based on MCUXpresso tools and LPC54618 board developed by XiangJun Rong

#include "fsl_ctimer.h"

void test(void);

void CTimerInit(void);

void delayTimer(uint32_t elapsedTimer);

uint32_t tPoint1,tPoint2,tPoint3,tDiff;

void CTimerInit(void)

{

    ctimer_config_t config;

    ctimer_match_config_t matchConfig;

    /*CTimer use APB bus clock as Timer tick, set the APB bus clock as 12MHz internal FRO */

     CLOCK_AttachClk(kFRO12M_to_ASYNC_APB);

    CTIMER_GetDefaultConfig(&config);

 

    CTIMER_Init(CTIMER2, &config);

 

    matchConfig.enableCounterReset = true;

    matchConfig.enableCounterStop = false;

    matchConfig.matchValue = 0xFFFFFFFF;

    matchConfig.outControl = kCTIMER_Output_NoAction;

    matchConfig.outPinInitState = true;

    matchConfig.enableInterrupt = false;

    CTIMER_SetupMatch(CTIMER2, kCTIMER_Match_3, &matchConfig);

    CTIMER_StartTimer(CTIMER2);

}

 

void test(void)

{

    tPoint1=CTIMER_GetTimerCountValue(CTIMER2);

    //simulate elapsed time

    delayTimer(10000);

    tPoint2=CTIMER_GetTimerCountValue(CTIMER2);

    tDiff=tPoint2-tPoint1;

 

    //simulate elapsed time

    delayTimer(20000);

    tPoint3=CTIMER_GetTimerCountValue(CTIMER2);

    tDiff=tPoint3-tPoint2;

     PRINTF("Time instand:tPoint1=%d, tPoint2=%d, tPoint3=%d \r\n",tPoint1,tPoint2,tPoint3);

}

 

void delayTimer(uint32_t elapsedTimer)

{

    uint32_t i;

    for(i=0; i<elapsedTimer; i++)

    {

        __asm("nop");

    }

}

 

int main(void)

{

   …………………………………………………………………………………………………..

    PRINTF("Elapse time test start: \r\n");

    CTimerInit();

    test();

    for(;;) {}

…………………………………………

}

 

%3CLINGO-SUB%20id%3D%22lingo-sub-1117051%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ETest%20Elapsed%20time%20based%20on%20CTimer%20module%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1117051%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CSPAN%3ETest%20Elapsed%20time%20based%20on%20CTimer%20module%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3ESometimes%2C%20It%20is%20required%20to%20test%20the%20time%20which%20an%20api%20function%20takes%20when%20the%20function%20is%20executed%2C%20for%20example%2C%20some%20users%20want%20to%20test%20the%20flash%20erasing%20time%20and%20flash%20programming%20time.%20User%20can%20use%20GPIO%20to%20set%2Fclear%20and%20use%20scope%20to%20test%20the%20GPIO%20timing%20to%20measure%20the%20time%20an%20api%20function%20takes%2C%20the%20method%20is%20very%20simple%20and%20straightforward%20but%20inaccurate.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EThe%20document%20describes%20to%20configure%20CTimer%20as%20a%2032bits%20%26nbsp%3Bfree-running%20counter%2C%20user%20can%20read%20the%20counter%20value%20before%20and%20after%20an%20api%20function%20and%20compute%20the%20counter%20value%20difference%20to%20get%20the%20time%20the%20api%20function%20takes.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EThe%20CTimer%20of%20LPC54xxx%20family%20counts%20the%20APB%20bus%20clock%2C%20the%20APB%20bus%20clock%20Is%20driven%20by%2012%20MHz%20FRO%2C%20user%20can%20use%20the%20following%20code%20to%20measure%20the%20elapsed%20time.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EFor%20example%2C%20we%20test%20the%20elaped%20time%20of%20%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3EdelayTimer(10000)%3B%20function%2C%20we%20get%20the%20variable%20tPoint1%2C%20tPoint2.%20The%20actual%20time%20is%20(tPoint2-%20tPoint1)*(1%2F12000000).%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EIn%20the%20example%2C%20the%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3EtPoint2%3D110127%2C%20the%20tPoint1%3D53%2C%20the%20elapsed%20time%20is%20(110127-53)*(1%2F12000000)%3D9.172us.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22pastedImage_3.png%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22pastedImage_3.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F85534i4BBC283B866FADD1%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22pastedImage_3.png%22%20alt%3D%22pastedImage_3.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%2F%2Fthe%20souce%20code%20focuses%20on%20LPC54xxx%20family%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20%233f7f5f%3B%20background%3A%20blue%3B%22%3Euint32_t%20tPoint1%2CtPoint2%2CtPoint3%2CtDiff%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSTRONG%20style%3D%22color%3A%20%237f0055%3B%20font-size%3A%2010.0pt%3B%20%22%3Evoid%3C%2FSTRONG%3E%20%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%3CSTRONG%3Etest%3C%2FSTRONG%3E(%3C%2FSPAN%3E%3CSTRONG%20style%3D%22color%3A%20%237f0055%3B%20font-size%3A%2010.0pt%3B%20%22%3Evoid%3C%2FSTRONG%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E)%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%7B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20tPoint1%3DCTIMER_GetTimerCountValue(CTIMER2)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20%233f7f5f%3B%22%3E%2F%2Fsimulate%20elapsed%20time%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20delayTimer(10000)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20tPoint2%3DCTIMER_GetTimerCountValue(CTIMER2)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20tDiff%3DtPoint2-tPoint1%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20%233f7f5f%3B%22%3E%2F%2Fsimulate%20elapsed%20time%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20delayTimer(20000)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20tPoint3%3DCTIMER_GetTimerCountValue(CTIMER2)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20tDiff%3DtPoint3-tPoint2%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%26nbsp%3BPRINTF(%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20%232a00ff%3B%22%3E%22Time%20instand%3AtPoint1%3D%25d%2C%20tPoint2%3D%25d%2C%20tPoint3%3D%25d%20%5Cr%5Cn%22%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%2CtPoint1%2CtPoint2%2CtPoint3)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%7D%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3ESnippet%20of%20simple%20source%20code%20based%20on%20MCUXpresso%20tools%20and%20LPC54618%20board%20developed%20by%20XiangJun%20Rong%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%23include%20%22fsl_ctimer.h%22%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSTRONG%20style%3D%22color%3A%20%237f0055%3B%20font-size%3A%2010.0pt%3B%20%22%3Evoid%3C%2FSTRONG%3E%20%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%3CSTRONG%3Etest%3C%2FSTRONG%3E(%3C%2FSPAN%3E%3CSTRONG%20style%3D%22color%3A%20%237f0055%3B%20font-size%3A%2010.0pt%3B%20%22%3Evoid%3C%2FSTRONG%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSTRONG%20style%3D%22color%3A%20%237f0055%3B%20font-size%3A%2010.0pt%3B%20%22%3Evoid%3C%2FSTRONG%3E%20%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%3CSTRONG%3ECTimerInit%3C%2FSTRONG%3E(%3C%2FSPAN%3E%3CSTRONG%20style%3D%22color%3A%20%237f0055%3B%20font-size%3A%2010.0pt%3B%20%22%3Evoid%3C%2FSTRONG%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSTRONG%20style%3D%22color%3A%20%237f0055%3B%20font-size%3A%2010.0pt%3B%20%22%3Evoid%3C%2FSTRONG%3E%20%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%3CSTRONG%3EdelayTimer%3C%2FSTRONG%3E(uint32_t%20elapsedTimer)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20%233f7f5f%3B%22%3Euint32_t%20tPoint1%2CtPoint2%2CtPoint3%2CtDiff%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSTRONG%20style%3D%22color%3A%20%237f0055%3B%20font-size%3A%2010.0pt%3B%20%22%3Evoid%3C%2FSTRONG%3E%20%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%3CSTRONG%3ECTimerInit%3C%2FSTRONG%3E(%3C%2FSPAN%3E%3CSTRONG%20style%3D%22color%3A%20%237f0055%3B%20font-size%3A%2010.0pt%3B%20%22%3Evoid%3C%2FSTRONG%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E)%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%7B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20ctimer_config_t%20config%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3Ectimer_match_config_t%20matchConfig%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20%233f7f5f%3B%22%3E%2F*CTimer%20use%20APB%20bus%20clock%20as%20Timer%20tick%2C%20set%20the%20APB%20bus%20clock%20as%2012MHz%20internal%20FRO%20*%2F%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20CLOCK_AttachClk(kFRO12M_to_ASYNC_APB)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20CTIMER_GetDefaultConfig(%26amp%3Bconfig)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20CTIMER_Init(CTIMER2%2C%20%26amp%3Bconfig)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20matchConfig.enableCounterReset%20%3D%20true%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20matchConfig.enableCounterStop%20%3D%20false%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20matchConfig.matchValue%20%3D%200xFFFFFFFF%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20matchConfig.outControl%20%3D%20kCTIMER_Output_NoAction%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20matchConfig.outPinInitState%20%3D%20true%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20matchConfig.enableInterrupt%20%3D%20false%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20CTIMER_SetupMatch(CTIMER2%2C%20kCTIMER_Match_3%2C%20%26amp%3BmatchConfig)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20CTIMER_StartTimer(CTIMER2)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%7D%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSTRONG%20style%3D%22color%3A%20%237f0055%3B%20font-size%3A%2010.0pt%3B%20%22%3Evoid%3C%2FSTRONG%3E%20%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%3CSTRONG%3Etest%3C%2FSTRONG%3E(%3C%2FSPAN%3E%3CSTRONG%20style%3D%22color%3A%20%237f0055%3B%20font-size%3A%2010.0pt%3B%20%22%3Evoid%3C%2FSTRONG%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E)%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%7B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20tPoint1%3DCTIMER_GetTimerCountValue(CTIMER2)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20%233f7f5f%3B%22%3E%2F%2Fsimulate%20elapsed%20time%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20delayTimer(10000)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20tPoint2%3DCTIMER_GetTimerCountValue(CTIMER2)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20tDiff%3DtPoint2-tPoint1%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20%233f7f5f%3B%22%3E%2F%2Fsimulate%20elapsed%20time%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20delayTimer(20000)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20tPoint3%3DCTIMER_GetTimerCountValue(CTIMER2)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20tDiff%3DtPoint3-tPoint2%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%26nbsp%3BPRINTF(%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20%232a00ff%3B%22%3E%22Time%20instand%3AtPoint1%3D%25d%2C%20tPoint2%3D%25d%2C%20tPoint3%3D%25d%20%5Cr%5Cn%22%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%2CtPoint1%2CtPoint2%2CtPoint3)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%7D%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSTRONG%20style%3D%22color%3A%20%237f0055%3B%20font-size%3A%2010.0pt%3B%20%22%3Evoid%3C%2FSTRONG%3E%20%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%3CSTRONG%3EdelayTimer%3C%2FSTRONG%3E(uint32_t%20elapsedTimer)%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%7B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20uint32_t%20i%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%20%3CSTRONG%20style%3D%22color%3A%20%237f0055%3B%20font-size%3A%2010.0pt%3B%20%22%3Efor%3C%2FSTRONG%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E(i%3D0%3B%20i%3CELAPSEDTIMER%3E%3C%2FELAPSEDTIMER%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%20%3CSTRONG%20style%3D%22color%3A%20%237f0055%3B%20font-size%3A%2010.0pt%3B%20%22%3E__asm%3C%2FSTRONG%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E(%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20%232a00ff%3B%22%3E%22%3CSPAN%20style%3D%22text-decoration%3A%20underline%3B%22%3Enop%3C%2FSPAN%3E%22%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%7D%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSTRONG%20style%3D%22color%3A%20%237f0055%3B%20font-size%3A%2010.0pt%3B%20%22%3Eint%3C%2FSTRONG%3E%20%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%3CSTRONG%3Emain%3C%2FSTRONG%3E(%3C%2FSPAN%3E%3CSTRONG%20style%3D%22color%3A%20%237f0055%3B%20font-size%3A%2010.0pt%3B%20%22%3Evoid%3C%2FSTRONG%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E)%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%7B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%20%E2%80%A6%E2%80%A6%E2%80%A6%E2%80%A6%E2%80%A6%E2%80%A6%E2%80%A6%E2%80%A6%E2%80%A6%E2%80%A6%E2%80%A6%E2%80%A6%E2%80%A6%E2%80%A6%E2%80%A6%E2%80%A6%E2%80%A6%E2%80%A6%E2%80%A6%E2%80%A6%E2%80%A6%E2%80%A6%E2%80%A6%E2%80%A6%E2%80%A6%E2%80%A6%E2%80%A6%E2%80%A6%E2%80%A6%E2%80%A6%E2%80%A6%E2%80%A6%E2%80%A6%E2%80%A6%E2%80%A6%E2%80%A6%E2%80%A6..%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3EPRINTF(%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20%232a00ff%3B%22%3E%22Elapse%20time%20test%20start%3A%20%5Cr%5Cn%22%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20CTimerInit()%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20test()%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%20%3CSTRONG%20style%3D%22color%3A%20%237f0055%3B%20font-size%3A%2010.0pt%3B%20%22%3Efor%3C%2FSTRONG%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E(%3B%3B)%20%7B%7D%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%E2%80%A6%E2%80%A6%E2%80%A6%E2%80%A6%E2%80%A6%E2%80%A6%E2%80%A6%E2%80%A6%E2%80%A6%E2%80%A6%E2%80%A6%E2%80%A6%E2%80%A6%E2%80%A6%E2%80%A6%E2%80%A6%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%7D%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
No ratings
Version history
Last update:
‎06-06-2019 02:30 AM
Updated by: