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.

AM2634: How to set CONTROLSS_CTRL_SDFM1_CLK0_SEL

Part Number: AM2634

Tool/software:

Hi,

What is the best way to set CONTROLSS_CTRL_SDFM1_CLK0_SEL to "source is SDFM0 CK0 from Pinmux"?

(from https://www.ti.com/lit/ug/spruj42e/spruj42e.pdf?ts=1756786931208 2.7.2.4 CONTROLSS_CTRL_SDFM1_CLK0_SEL Register)

(from TRM Figure 7-319. SDFM Clock Control)

I found SOC_selectSdfm1Clk0Source in the MCU sdk, but it seems to crash the application when i call it after:

```

System_init();
Board_init();
Drivers_open();
Board_driversOpen();

````

https://github.com/TexasInstruments/mcupsdk-core/blob/85477ff8c96d871fdd94772fcc2d4a6416049841/source/drivers/soc/am263x/soc.c#L417-L429 

Is there a best time to call this?

  • Little more color, there does not seem to be a syscfg setting for this mux, so I am trying to set it in software. 

    Is there a setting in syscfg that sets this mux so the sdfm1 clk source is that of sdfm0 clk input?

    If not, every time I call SOC_selectSdfm1Clk0Source(1), it crashes the program, regardless of where I call it in the configuration. It may have something to do with the unlocking and locking of CONTROLSS_CTRL. Removing the unlock/lock function calls does not change the behavior - still crashes.

    Any help is appreciated. Thanks!

  • Hi Justin, 

    This API Call shouldn't have crashed the system. could you share the error you are seeing exactly, like the Console output / aborts etc.?

    And as for when to call this API, I suggest this to be called before the SDFM drivers open and make sure the pinmux for the SDFM0_CLK0 is setup. 

    thanks and regards,

    Madhava