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.

MSPM0L1306: Pin setting switching

Part Number: MSPM0L1306
Other Parts Discussed in Thread: SYSCONFIG

Tool/software:

CLK_OUT is set in syscfg as shown in the attached image. The pins used are "PA9/14".
In this case, is it possible to set the initial setting for "PA9/14" when power is applied as a GPIO output, and then set "PA9/14" to CLK_OUT at a certain timing?
The operation is as follows.
-Power ON → "PA9/14" set to output → "PA9/14" output inverted when input is detected → "PA9/14" set to CLK_OUT when it has been inverted 10 times.

  • Hi Ryota,

    I think it could.

    You could fisrtly set it as GPIO, and toggle it when input signal detected.

    And then, switch it to CLK_OUT when you requires.

    B.R.

    Sal

  • Specifically, what kind of program would this be?

    If the initial setting is GPIO output,

    "#define GPIO_CLKOUT_PORT GPIOA

    #define GPIO_CLKOUT_PIN DL_GPIO_PIN_9

    #define GPIO_CLKOUT_IOMUX (IOMUX_PINCM10)

    DL_GPIO_initDigitalOutput(GPIO_CLKOUT_IOMUX);

    DL_GPIO_clearPins(GPIO_CLKOUT_PORT, GPIO_CLKOUT_PIN);

    DL_GPIO_enableOutput(GPIO_CLKOUT_PORT, GPIO_CLKOUT_PIN);"

    The code would probably look something like the above.

    And if I want to change it to CLK_OUT midway through the program, what kind of code should I add?

  • Hi Ryota,

    You can check the code when you configure it as CLK_OUT generated by sysconfig.

    Then the switch step could refer to below:

    disable output -> swithc the function from gpio to clk -> enable clk and clk_output.

    B.R.

    Sal