nordic-auko / nRF5-ble-timesync-demo

nRF52 clock synchronization demo code
55 stars 50 forks source link

TIME_SYNC_TIMER_MAX_VAL ambiguity #25

Closed David140 closed 9 months ago

David140 commented 1 year ago

Hi all, I am working to merge this tool into my project.

I noticed something weird with the TIME_SYNC_TIMER_MAX_VAL parameter, probably I am missing some details. If I set TIME_SYNC_TIMER_MAX_VAL = 20000, since the main clock is 16MHz, I am expected to see a debug toggling every 1.25ms but I see a synchronous toggling with 2.5ms of period. It is the double of what should be and I can't get why.

Moreover, if I set TIME_SYNC_TIMER_MAX_VAL = 16000, the debug toggling starts correctly but then the two boards start toggling asynchronously and then crash. I made some tests and it seems that if I set TIME_SYNC_TIMER_MAX_VAL smaller than 20000 the platform can't work in stable way for long time.

Any ideas about that? Thanks, Alessio

nordic-auko commented 1 year ago

Hi Alessio,

do you also see this behavior with the latest branch?

Thanks, Audun