K10 PE_Generated Cpu_VLPModeEnable() issue

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

K10 PE_Generated Cpu_VLPModeEnable() issue

ソリューションへジャンプ
1,381件の閲覧回数
ScottW
Contributor II

I'm trying to use the Kinetis VLP modes, and having an issue with the processor expert generated function "Cpu_VLPModeEnable()" not honoring the setting for "VLP exit on interrupt".  I'm using the MK10DN512ZVLK10 CPU & CodeWarrior for MicroControllers v10.1.

 

In the PE settings for the CPU component, I have VLP mode entry set to "User" (as I wish to control the mode) and "VLP exit on interrupt" set to Disabled.  These settings are under Clock configurations/Clock configuration 0/Very low power mode.

 

Here's the generated code:

LDD_TError Cpu_VLPModeEnable(void)
{
  /* MC_PMCTRL: LPWUI=1,RUNM=2,??=0,??=0,LPLLSM=0 */
  MC_PMCTRL = (uint8_t)0xC0U;          /* Enable very low power mode */
  while((PMC_REGSC & PMC_REGSC_VLPRS_MASK) == 0x00U) { /* Wait until in the Very Low Power run mode */
  }
  return ERR_OK;
}

This shows LPWUI=1, but I think it should have been 0 since I chose "Disabled".  The generated code doesn't change if I chose "Enabled" instead.

 

If I change the VLP mode entry setting to "Auto", then it adds this code to the end of PE_low_level_init():

   /* MC_PMCTRL: LPWUI=0,RUNM=2,??=0,??=0,LPLLSM=0 */
  MC_PMCTRL = (uint8_t)0x40U;          /* Enable Very low power mode */

 

This looks like what I expected: the LPWUI setting is 0.

 

So, am I missing something?  Is this an issue with processor expert?

 

Here's my processor expert version:

**     This file was created by Processor Expert 5.2 [04.49]
**     for the Freescale Kinetis series of microcontrollers.

 

And up at the top of cpu.c it says this:

**     Filename  : Cpu.c
**     Project   : ProcessorExpert
**     Processor : MK10DN512ZVLK10
**     Component : MK10N512LK100
**     Version   : Component 01.002, Driver 01.03, CPU db: 3.00.001
**     Datasheet : K10P144M100SF2RM, Rev. 4, 1 Mar 2011
**     Compiler  : CodeWarrior ARM C Compiler
**     Date/Time : 2011-11-16, 14:08, # CodeGen: 4

 

 Thanks.

ラベル(1)
タグ(1)
0 件の賞賛
返信
1 解決策
1,076件の閲覧回数
ProcessorExpert
Senior Contributor III

Hello,

thanks for reporting this. I have reproduced the behaviour and it is a bug in the latest version of ProcessorExpert. It will be fixed in the next release of CodeWarrior (CW V10.2).

For now as workaround please add additional speed mode in the CPU component. After this step, the value of LPWUI bit will be generated according to value of "VLP exit on interrutp" property correctly. I hope that this workaround will be sufficient for you.

 

We are sorry for the inconvenience.

 

best regards
Vojtech Filip
Processor Expert Support Team


元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
1,077件の閲覧回数
ProcessorExpert
Senior Contributor III

Hello,

thanks for reporting this. I have reproduced the behaviour and it is a bug in the latest version of ProcessorExpert. It will be fixed in the next release of CodeWarrior (CW V10.2).

For now as workaround please add additional speed mode in the CPU component. After this step, the value of LPWUI bit will be generated according to value of "VLP exit on interrutp" property correctly. I hope that this workaround will be sufficient for you.

 

We are sorry for the inconvenience.

 

best regards
Vojtech Filip
Processor Expert Support Team


0 件の賞賛
返信