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.

AM263P4-Q1: SDFM synchronisation

Part Number: AM263P4-Q1
Other Parts Discussed in Thread: UNIFLASH, SYSCONFIG

Tool/software:

Hey Experts,
ive some question regarding the SDFM module.

As SW i am using:
CCS 12.8.1.00005
SDK 10_00_00_35
Uniflash 8.8.1.4983

1)I found this in the reference manual:

Is there any way to enable/disable this feature in sysconfig?

2) In sysconfig i turned on PWM synchronisation:

what exactly is meant by this?

If i check the examples, i want something like ->sdfm_epwm_sync_cpuread

But this example doesnt use sysconfig to program sdfm and if i compare my generated code out of sysconfig:
It uses the function SDFM_enableWaitForSync(CONFIG_SDFM0_BASE_ADDR, SDFM_FILTER_1);
and the example uses this function: SDFM_enableExternalReset(sdfmInstance, SDFM_FILTER_1);

Are this two different functions doing the same thing as a result?

Best regards,

Marcel

  • Hello Marcel,

    SysConfig uses "SDFM_enableSynchronizer" to set input synchronizer.

    These are different SDFM synchronization options: Wait for sync mode (SDFM_enableWaitForSync), External reset mode (SDFM_enableExternalReset), both can achieve synchronization. "Wait for sync" makes SDFM wait for PWM sync signal before starting next conversion and used when you want synchronized sampling with PWM events. "External reset" allows PWM to reset the SDFM filter and provides more direct control over filter reset timing.

    Indeed, "Wait for sync" synchronizes sampling start but "External reset" resets filter on PWM event.

    SysConfig generated code uses wait-for-sync by default.

    Best Regards,

    Masoud

  • Hey Masoud,

    thanks for your answer, that answered my second question.

    Is the input qualification feature which synchronizes data and clock to pll also enabled by default?
    Is there any way to turn it on and off?

    Best Regards,

    Marcel 

  • Hello Marcel,

    As mentioned, the SysConfig uses "SDFM_enableSynchronizer" to set input synchronizer. By default, when you enable a filter channel for SDFM in SysConfig, it is generating a code like:

    	    // Set Input Synchronizer
    	    //
    	SDFM_enableSynchronizer(CONFIG_SDFM0_BASE_ADDR, SDFM_FILTER_1, SDFM_CLOCK_SYNCHRONIZER | SDFM_DATA_SYNCHRONIZER);

    This function enables both synchronizers by default. You have the option to modify it according to your application needs and select either data, clock, or both.

    Best Regards,

    Masoud