Reference clock and sync_to_pps

Why does the config_mimo(MC_WE_SYNC_TO_SMA) always return true, even
when there is no reference signal connected to the SMA connector?

From what I understand, the sync_to_pps() feature works as follows:
when the next rising edge of the PPS is encountered, the timestamps
are set to zero. But the streaming is started before this, so that you
have to manually deduce from the timestamps when the PPS occurs. Is
this correct?

If so, I think there is one nasty special case, that occurs with a
1/2^32 probability, where you would have to store 1 s of data to be
sure that the PPS leading edge has in fact (by accident) occurred
exactly at the same time as the 32-bit sample counter has flipped from
2^32 -1 to 0. This could be avoided, if the sample counter is set to

0 and <2^32-10^8 - 1 initially. But anyway, I’m not that worried
about this. The possibility of such an event is a thousand times less
likely than winning in the lottery.

juha

On Tue, Apr 28, 2009 at 02:06:01PM +0000, Juha V. wrote:

Why does the config_mimo(MC_WE_SYNC_TO_SMA) always return true, even
when there is no reference signal connected to the SMA connector?

It just configures the clocks. It doesn’t check to see the PLL locks.

From what I understand, the sync_to_pps() feature works as follows:
when the next rising edge of the PPS is encountered, the timestamps
are set to zero. But the streaming is started before this, so that you
have to manually deduce from the timestamps when the PPS occurs. Is
this correct?

Yes.

If so, I think there is one nasty special case, that occurs with a
1/2^32 probability, where you would have to store 1 s of data to be
sure that the PPS leading edge has in fact (by accident) occurred
exactly at the same time as the 32-bit sample counter has flipped from
2^32 -1 to 0. This could be avoided, if the sample counter is set to

0 and <2^32-10^8 - 1 initially. But anyway, I’m not that worried
about this. The possibility of such an event is a thousand times less
likely than winning in the lottery.

juha

In the future we’re moving to a 64-bit time value.

Eric

Why does the config_mimo(MC_WE_SYNC_TO_SMA) always return true, even
when there is no reference signal connected to the SMA connector?

It just configures the clocks. It doesn’t check to see the PLL locks.

Is there any way to know if the PLL is locked? A PLL lock is critical
for most of our applications.

juha