SysTick usage in MKV46F256VLL16

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

SysTick usage in MKV46F256VLL16

861 Views
soaring_sun
Contributor III

Hi,

I want to use a free running timer to capture the time stamp between the functions. I understand that I need to use Systick function to achieve it. Can someone let me know how I should be using it? Is there any sample example code to achieve it?

Regards

0 Kudos
Reply
3 Replies

850 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi soaring_sun,

You can download KL82 SDK from mcuxpresso.nxp.com. In this SDK, there is a wolfssl_benchmark example. It use systick to count encryption/decryption time.

 

Regards,

Jing

0 Kudos
Reply

846 Views
soaring_sun
Contributor III

Hi,

I have downloaded the KL82 SDK that you have mentioned. But I don't find the example that you quoted. Should I be downloading the corresponding IDE as well? Then again, I'm working on KV4x board whose SDK and IDE is already with me. Is there an example of SysTick for this particular board?

Regards

 

Tags (1)
0 Kudos
Reply

838 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi,

Please refer to wolfssl_benchmark. You can see the code like this

 

    start = current_time(1);
    BEGIN_INTEL_CYCLES

    for (i = 0; i < numBlocks; i++)
        wc_AesCbcEncrypt(&enc, plain, cipher, sizeof(plain));

    END_INTEL_CYCLES
    total = current_time(0) - start;

 

 

All ARM cortex device have same systick. 

Regards,

Jing

0 Kudos
Reply