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.

[参考译文] MCU018

Guru**** 2455360 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/1465306/mcu018

器件型号:EVM430-FR6047

工具与软件:

GPIO_setAsPeripheralModuleFunctionInputPin (GPIO_PORT_PJ、
GPIO_PIN1 | GPIO_PIN2、GPIO_PRIMARY_MODULE_FUNCTION);

我在代码中使用上述函数将 MCLK 和 SMCLK 路由到端口 J.1和端口 J.2的引脚。 但在 DSO 上无法看到这些时钟。 这两个时钟都配置为8MHz。 我正在使用内部时钟。

如何解决此问题?

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好!  

    请按照如下步骤初始化 GPIO 以实现 MCLK 输出功能、这来自 SPI 示例:

        /*
        * Select Port 1
        * Set Pin 5 to input Secondary Module Function, (UCA0CLK).
        */
        GPIO_setAsPeripheralModuleFunctionInputPin(
            GPIO_PORT_P1,
            GPIO_PIN5,
            GPIO_SECONDARY_MODULE_FUNCTION
        );
    
        /*
        * Select Port 2
        * Set Pin 0, 1 to input Secondary Module Function, (UCA0TXD/UCA0SIMO, UCA0RXD/UCA0SOMI).
        */
        GPIO_setAsPeripheralModuleFunctionInputPin(
            GPIO_PORT_P2,
            GPIO_PIN0 + GPIO_PIN1,
            GPIO_SECONDARY_MODULE_FUNCTION
        );
    
        /*
        * Disable the GPIO power-on default high-impedance mode to activate
        * previously configured port settings
        */
        PMM_unlockLPM5();

    此致、

    Helic

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    GPIO_setAsPeripheralModuleFunctionInputPin (GPIO_PORT_PJ、GPIO_PIN1 | GPIO_PIN2、GPIO_PRIMARY_MODULE_FUNCTION);

    要获得 SMCLK/MCLK、需要将引脚配置为输出[请参阅数据表(SLASEB7D)表9-42]。 请尝试改用:

    > GPIO_setAsPeripheralModuleFunctionOutputPin (GPIO_PORT_PJ、 GPIO_PIN1 | GPIO_PIN2、GPIO_PRIMARY_MODULE_FUNCTION);

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、 

    好的、感谢您的提及。

    并且关键点需要运行一个额外的 PMM_unlockLPM5 ();函数。

    此致、

    Helic