MPC5748G how to modify "eMIOS CNT register" in frezze mode

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MPC5748G how to modify "eMIOS CNT register" in frezze mode

381 Views
mahoneinsh
Contributor I

Dear NXP supportors:

   I've encounterred an issue troubled me for a long time:

   Development enviroment of the project is:S32DS_Power_v2017.R1, PE multilink universal

   As mentioned in the datasheet below, i would like to modify  "eMIOS CNT register" in freeze mode and have written a routine to realize that. It can modify the register with debugger successfully , but fail to modify the register when i removed debugger and restart board.

  The related code and project are attatched below.

  Could you give me some hints for the issue? Thank you in advance~

mahoneinsh_0-1663661124445.png

void EMIOS_ResetUCCnt(void)
{
eMIOS_MCR_SET_FRZ(INST_EMIOS0_MC,1);
REG_WRITE32(&eMIOS[0]->UC[PWM1_eMIOS_CHN].CNT,150);
REG_WRITE32(&eMIOS[0]->UC[PWM2_eMIOS_CHN].CNT,period_value/2+150);
eMIOS_MCR_SET_FRZ(INST_EMIOS0_MC,0);
}

I've made some further tests, found that the root cause was focused on the following 2 instructions. It appears that this 2 instructions are not excuted successfully without debugger.

 REG_WRITE32(&eMIOS[0]->UC[PWM1_eMIOS_CHN].CNT,0);
 REG_WRITE32(&eMIOS[0]->UC[PWM2_eMIOS_CHN].CNT,500);

0 Kudos
1 Reply

372 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport
0 Kudos