n LIN sample code, What is the function "timerGetTimeIntervalCallback0" operating?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

n LIN sample code, What is the function "timerGetTimeIntervalCallback0" operating?

699件の閲覧回数
hewei03
Contributor III

In LIN sample code, I want to know operation of the function "timerGetTimeIntervalCallback0".

What is purpose of the function?

0 件の賞賛
1 返信

591件の閲覧回数
dianabatrlova
NXP TechSupport
NXP TechSupport

Hello,

The function returns a number of nanoseconds passed since the last call of the function.

I would like to add some information from the SDK team.

This function must return time period between two consecutive calls in nanoseconds and if this function is called for the first time, it will start the timer to measure time. When an event (such as detecting a falling edge of a dominant signal while a node is in sleep mode) occurs, LIN driver will call timerGetTimeIntervalCallback to start time measurement. Then on the rising edge of that signal, LIN driver will call the timerGetTimeIntervalCallback function to get time interval of that dominant signal in nanoseconds. If Autobaud feature is enabled, LIN driver uses timerGetTimeIntervalCallback to measure two bit time length between two consecutive falling edges of the sync byte in order to evaluate Master's baudrate.

I hope it helps you.

Best Regards,

Diana

0 件の賞賛