SysTick usage in MKV46F256VLL16

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

SysTick usage in MKV46F256VLL16

632 次查看
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

标记 (3)
0 项奖励
3 回复数

621 次查看
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 项奖励

617 次查看
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

 

标记 (1)
0 项奖励

609 次查看
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 项奖励