This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430FR2433: 使用DCO时,是否需要对DCOFFG进行处理?

Part Number: MSP430FR2433

使用eusci_a_uart_ex1_loopbackAdvanced例程,学习MSP430FR2433的时钟,在debug模式下运行一段时间暂停,看到的关于CS模块的寄存器如下:

片子运行时钟SMCLK = MCLK = BRCLK = DCOCLKDIV = ~1MHz, ACLK = 32.768kHz;

即这里使用了DCO作为SMCLK的时钟源,又使用SMCLK作为波特率的时钟源,但是在初始化的时候并未对DCO进行配置;

但实际上DCOFFG显示是有错误的,这里不需要对该错误进行处理吗?

附main.c中的代码:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* --COPYRIGHT--,BSD
* Copyright (c) 2016, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* * Neither the name of Texas Instruments Incorporated nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • 您好,我们已收到您的问题并升级到英文论坛,如有答复将尽快回复您。谢谢!

  • 您好,您需要在代码中添加 DCO Software Trim routine:


  • 1. 我对eusci_a_uart_ex1_loopbackAdvanced例程没有做任何改动,且我是从main.c中line39的DCOCLKDIV = ~1MHz推断出启用了DCO;

    2. 我想确定,这个例程有没有启用DCO?

    3. 我想知道,如果是启用了DCO,不对DCO寄存器做配置可以直接用吗?即使DCOFFG显示有错误也不影响使用吗?

    4. 我是基于这个例程的运行效果发表了我的疑惑,为什么需要我在代码中添加 DCO Software Trim routine呢?

  • 您好,DCO 无需配置就可以使用。 不过我们不太建议这样做。 建议您先配置 DCO ,然后添加 DCO 软件修整例程(DCO software trim routine) 。