nathancrum 21 Posted September 18, 2014 Share Posted September 18, 2014 Just as an FYI - I was concerned about using the built in DCO in the FR5969 for UART because the spec sheet says although it's factory trimmed, it's still +/-3.5%. Generally it needs to be within 2% for a UART to work correctly so I measured the two FR5969's I have on our 2.4GHz frequency counter and this is what I got. 2 is obviously not a big sample size, but the frequency trimmed DCO on the FR series looks pretty good @ room temp and 8MHz or under. I found another doc from TI that's a comparison between F5xxx and FR5xxx and it mentions the DCO is generally within 2% "within a restricted temperature range" and within 3.5 in the full temperature range (-40C to 85C). I may need to re-measure at 4C because that's typically where our project will be operating. tripwire 1 Quote Link to post Share on other sites
nimblemotors 23 Posted September 25, 2014 Share Posted September 25, 2014 In my R/C controller the DCO clock changes quite a lot over temperature, and when it got warm, the servo signal kept changing. So I used the 32k crystal to adjust the DCO to keep it consistent. Quote Link to post Share on other sites
nathancrum 21 Posted September 26, 2014 Author Share Posted September 26, 2014 @@nimblemotors Is that an FRAM MCU? I wasn't aware you could trim the DCO in FRAM chips...? Quote Link to post Share on other sites
spirilis 1,265 Posted September 26, 2014 Share Posted September 26, 2014 I don't think you can. Can't recall if there is an ext. resistor feature though. Sent from my Galaxy Note II with Tapatalk 4 Quote Link to post Share on other sites
enl 227 Posted September 27, 2014 Share Posted September 27, 2014 Depending what you are doing with the UART, it may not matter if you can trim the DCO to match a crystal. You CAN change the UART timer to match, as long as the bit rate isn't high enough that you are running fewer than about 50 DCO clocks per bit (for approx 2% adjustment per UART timer step) and you can do better than that with the clock dithering feature as long as the UART rate is lower than about 8 DCO clocks. Quote Link to post Share on other sites
nimblemotors 23 Posted September 28, 2014 Share Posted September 28, 2014 @@nimblemotors Is that an FRAM MCU? I wasn't aware you could trim the DCO in FRAM chips...? It looks like you can't trim the clock with the same level of adjustments as the older chips. Quote Link to post Share on other sites
Rickta59 589 Posted September 28, 2014 Share Posted September 28, 2014 What I did was make a simple cpu.h file that lets you set different frequencies. In the header below I just set it to the standard freq * say 16000000 * then I measure the actually clock speed by enabling smclk out. Then I just changed the F_CPU value in the header file to match the actual number I measured with a frequency meter on P3.4. I provided a range of number for each standard frequency. Just include this code in your cpp file and then access the static class methods with something like this: #include "cpu.h" ALWAYS_INLINE void setup(void) { CPU::init_clocks(); CPU::enable_smclkout(); // measure on P3.4 P1DIR |= BIT0; P1OUT |= BIT0; PM5CTL0 &= ~LOCKLPM5; // FRAM thing, let the GPIO pins begin } void loop() { P1OUT ^= BIT0; delay_msecs(500); } int main(void) { setup(); while (1) { loop(); } return 0; } /* * cpu.h - abstract CPU clock initialization, timing and sleeping * * Created: Nov-12-2012 * Author: rick@kimballsoftware.com * Date: 08-23-2014 * Version: 1.0.3 * * ========================================================================= * Copyright Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.