cancel
Showing results for 
Search instead for 
Did you mean: 

DISEST bit in MC_PCR1

chucksoft
Associate II
Posted on March 30, 2009 at 22:52

DISEST bit in MC_PCR1

1 REPLY 1
chucksoft
Associate II
Posted on May 17, 2011 at 09:58

Hello, I'm using a STR912FAW44, and I'm trying to set the DISEST bit in the MC_PCR1 register, to disable emergency stop of the PWM, since I'm just using the PWM to trigger ADC conversions. However, I cannot get the DISEST bit set - either programmatically, or even just using the IAR debugger. I am not accessing the MC_LOK bits either. I tried calling MC_EmergencyCmd(DISABLE) right after the clock inits in main(), but no luck. I did find and fix a bug in MC_EmergencyCmd() - the original code was:

void MC_EmergencyCmd(FunctionalState NewState)

{

if(NewState == ENABLE)

{

/* Reset the DISEST Bit in the PCR1 Register to enable the emergency stop input */

MC->PCR1 &= MC_DISEST_Reset;

}

else

{

/* Set the DISEST Bit in the PCR1 Register to disable the emergency stop input */

MC->PCR1 |= MC_DISEST_Reset;

}

}

I changed the disable case to:

MC->PCR1 |= MC_DISEST_Set;

Any ideas why I cannot disable the emergency stop?

Thanks in advance

Chuck Smith