MCU018

Part Number: EVM430-FR6047

Tool/software:

GPIO_setAsPeripheralModuleFunctionInputPin(GPIO_PORT_PJ,
GPIO_PIN1 | GPIO_PIN2, GPIO_PRIMARY_MODULE_FUNCTION);

I used above function in my code to route MCLK & SMCLK to PINs of Port J.1 & Port J.2. I but on DSO not able to see these clocks. Both the clocks configured to 8MHz. I am using the internal clocks.

How to resolve this?

  • Hi, 

    Please follow such steps to init GPIO for MCLK output function, this is from spi example:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    /*
    * 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
    );
    /*
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Regards,

    Helic

  • GPIO_setAsPeripheralModuleFunctionInputPin(GPIO_PORT_PJ,GPIO_PIN1 | GPIO_PIN2, GPIO_PRIMARY_MODULE_FUNCTION);

    To get SMCLK/MCLK, the pin needs to be configured as output [Ref datasheet (SLASEB7D) Table 9-42]. Try instead:

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

  • Hi, 

    Yes, thank you for your mention.

    And the key point is need to run a additional PMM_unlockLPM5(); function.

    Regards,

    Helic

**Attention** This is a public forum