S32K148 - IEEE 1588 output compare

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

S32K148 - IEEE 1588 output compare

675 Views
jakub_mielczare
Contributor III

Hello,

I want to use the S32K148 IEEE1588 output compare functionality. As I understand, the IEEE1588 time counts nanoseconds in the range 0-999999999 is this correct?

Then suppose the current IEEE1588 timer value is 999999000 and I program the compare value of the timer to 100. What will happen now? Will the compare event be fired right away or first roll-over of the IEEE1588 timer will happen to 0, keep counting from 0 and trigger compare event at the programmed 100.

Another question: if the increment of the IEEE1588 timer is 25 ns and I program the compare register with a value which is not integer multiple of 25, e.g. 55, will the compare event trigger when timer reaches 75?

Best regards,

Jakub

0 Kudos
2 Replies

580 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

this is a feedback I can give to your questions....

1) could be correct if ATINC[INC] and ATPER value will be set according the selected ENET_1588_CLKIN clock.

The timer period and increment are configurable. At each ENET_1588_CLKIN clock cycle ATINC[INC] value is added to the current timer value. The period, configured in ATPER, defines the modulo when the counter wraps.

For example, if ENET_1588_CLKIN  = 100 MHz, setting the ATINC[INC] = 10 represents 10 ns at which timer increments.

2) The compare occurs one 1588 clock cycle after the counter increments past the programmed compare value.

3) Based on previous the compare event should happen when timer increases to 100. 

BR, Petr

0 Kudos

580 Views
jakub_mielczare
Contributor III

Hi Petr,

Can you confirm that  IEEE1588 time counts nanoseconds in the range 0-999999999?

Best regards,

Jakub

0 Kudos