Maximum DTnIN external Clock

Discussion to talk about hardware related topics only.
Post Reply
MarkLeichty
Posts: 3
Joined: Tue Nov 30, 2021 8:03 am

Maximum DTnIN external Clock

Post by MarkLeichty » Tue Nov 30, 2021 8:16 am

When using the external clock as the source for a DMA Timer for a MOD54417 board is the maximum clock frequency for this source 25 MHz? I found one location in the Reference Manual were it indicated that the maximum frequency was (Fsys/2)/5. I have used the DTnIN external clock for a UART baud clock and have successfully used faster clocks than 25 MHz for that use, so is this just a limitation of the DMA timer peripheral or the input itself?

User avatar
pbreed
Posts: 1043
Joined: Thu Apr 24, 2008 3:58 pm

Re: Maximum DTnIN external Clock

Post by pbreed » Wed Dec 01, 2021 11:20 am

Short answer is I don't know.
Where (exact paragraph) in the manual did you find the limit?

I would suspect that the Baud clock is a differnt circuit.
I'd suspect the DMA timer has a syncronizer internal;ly to cross clock domains....
Given that 25Mhz seems slow.

MarkLeichty
Posts: 3
Joined: Tue Nov 30, 2021 8:03 am

Re: Maximum DTnIN external Clock

Post by MarkLeichty » Mon Dec 06, 2021 8:40 am

Paul,

In the MCF4418RM document they mention in section 39.4 on page 39-12 under one of the bullet points for Initialization/Application Information they mention that DTnIN, the maximum value of DTnIN is 1/5 of the internal bus clock, as described in the device's electrical characteristics. This would calculate to 125 MHz/5 = 25 MHz.

This seems to suggest that there is another document that explains this in more detail. The only other document I could find was MCF54418 Data Sheet that has a table in section 4.23 (Page 50) that states that DTnIN cycle time can have a minimum of 3, which I think would be 3 * 1/125MHz = 24 ns = 41.667 MHz.

Maybe the key is for me to fully understood the implications described in section 39.3.1 (Page 39.3) of MCF54418RM under Prescaler where it states "DTnIN is synchronized to the internal bus clock, and the synchronization delay is between two and three internal bus clocks."

My goal here is to output a very accurate output pulse rate controlled by a speed value that is being passed to me from another serial device connected to the Netburner module. We have done this before using a PIC processor running at 64 MHz driven by a crystal with very low temperature drift and we were pretty satisfied with the results. We were hoping to do something very similar with the Netburner feeding the DTnIN pin with a very low temperature drift oscillator as the clock source for the DMA timer. When I calculate the acceptable error in the output pulse due to the resolution of the match register/oscillator combination I realized that if I don't have something close to 50 MHz for the clock source on DTnIN then my error is unacceptable.

We are considering having the Netburner pass the speed information on to a PIC as described above to do the output pulses if this is the better approach, which appears to be the case if I'm understanding the maximum input clock and the synchronization delay issues.

User avatar
pbreed
Posts: 1043
Joined: Thu Apr 24, 2008 3:58 pm

Re: Maximum DTnIN external Clock

Post by pbreed » Mon Dec 06, 2021 12:58 pm

I'd do it this way....
I'd take your super stable clock... run through a big divider...(down to say ~1pps)
Or use a GPS reciever 1pps...
Then set the Dtimer to run off the CPU clock and use DTIN as a capture of the free running cpu clock.
This should give you a "Scale" factor for the CPU clock.

My guess is that the 20ppm CPU clock will show very slow drift over a period of seconds....

User avatar
pbreed
Posts: 1043
Joined: Thu Apr 24, 2008 3:58 pm

Re: Maximum DTnIN external Clock

Post by pbreed » Mon Dec 06, 2021 12:58 pm

What is your ppb precision specification?

MarkLeichty
Posts: 3
Joined: Tue Nov 30, 2021 8:03 am

Re: Maximum DTnIN external Clock

Post by MarkLeichty » Tue Dec 07, 2021 2:30 pm

Paul,

Thanks for you help, I like your idea of using the compare on DTIN to scale the CPU clock, or use a GPS 1pps. I may use that technique in the future, but I now realize that the error in the temperature drift in the oscillator on the MOD54417 is much better than I thought, and the error in my ability to divide that clock down to produce the correctly spaced pulses is the bigger of the two errors. After you mentioned that the oscillator is 20ppm I checked the part that was on my MOD54417, and it is actually 25ppm, but still much better than I had expected. I think the MOD5270's that we have used on previous projects has a much poorer temperature drift and I was expecting similar issues with the MOD54417. Do you happen to know what the specs are for the crystal used in the MOD5270?

In any case, 25ppm is good enough and if I can run the timer with a 125 MHz clock I should have almost half the error I had with the PIC running at 64MHz.

Thanks again for your help!

User avatar
pbreed
Posts: 1043
Joined: Thu Apr 24, 2008 3:58 pm

Re: Maximum DTnIN external Clock

Post by pbreed » Tue Dec 07, 2021 4:45 pm

I believe the MOD5270 was 50ppm.

Post Reply