AnsweredAssumed Answered

MPC5744P turn off Sine Wave Generator

Question asked by Thomas Gureborg on Jan 10, 2017
Latest reply on Jan 10, 2017 by Petr Stancik

Hi,

I am trying to switch off the Sine Wave Generator in a MPC5744P.

According to Reference Manual V5; "To operate D[7] as GPIO, disable the Sine Wave Generator (SGEN) and the peripheral bus clock of the SGEN: Program the MC_ME_PCTL239 register to select an MC_ME_RUN_PCn (or MC_ME_LP_PCn) configuration where the field for the desired mode is 0."
I have done this, as I want to use D7 as DSPI1_CS3.

If I never turn on SGEN, D7 works fine as CS3.
If I turn on SGEN and then later tries to turn it off, D7 doesn't work as CS3.

SW:

    Mcu_Arc_SwitchMode(MODE_DRUN);

    MC_ME.RUN_PC[0].R = 0x00000000;   /* SGEN_0 frozen in all run modes */
    MC_ME.LP_PC[0].R = 0x00000000;    /* SGEN_0 frozen in all non-run modes */
    MC_ME.PCTL239.R = 0;              /* Select RUN_PC 0 and LP_PC 0 for SGEN_0. Disable SGEN_0 */
    Mcu_Arc_SwitchMode(MODE_RUN0);

 

Is there something more I have to do to make D7 work as CS3?

Thanks in advance.

 

/Thomas

Outcomes