BSP_ALARM_RESOLUTION < 1ms in K70

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

BSP_ALARM_RESOLUTION < 1ms in K70

552 Views
jessg_
Contributor II

Dear all,

Is it possible in K70 BSP Library to have BSP_ALARM_RESOLUTION < 1ms?

In twrk70f120m.h, it is defined:

#define BSP_ALARM_RESOLUTION                (1000 / BSP_ALARM_FREQUENCY)

I have worked with BSP_ALARM_FREQUENCY = 1000 in order to have 1 tick = 1ms, and I don't find any problems. But now I need to have 1 tick < 1 ms (for example, 500 ns). How can this be done?

Tags (4)
0 Kudos
2 Replies

379 Views
DavidS
NXP Employee
NXP Employee

Hi Jessica,

Don't know the lower limit but yes you can lower the tick rate.  Many RTOS/OS's default to 5ms.  With higher performance and higher frequency devices you can lower more.  The trade off is spending more and more time in the OS code rather than in your application code and if you try to make it to low you don't have time to do real application work.

I've had customer go down to 1ms on our lower-end Kinetis devices so will guess you can do 500us but 500ns seems likely not to work from a gut feel point of view.

Have you tried and did it work?

Regards,

David


379 Views
jessg_
Contributor II

Thanks David!

I was thinking on 500us but  I wrote 500ns... You are right, I think 500ns is out of scope in my project!

I will consider the possibility of lower BSP_ALARM_RESOLUTION, but must say I have been thinking more on this and I am not sure at all if this is really what I need... Thank you anyway, it is good to know this.

0 Kudos