[MQX4.1] K20D50M Problem Exiting VLPR mode

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

[MQX4.1] K20D50M Problem Exiting VLPR mode

ソリューションへジャンプ
998件の閲覧回数
huishao2
Contributor IV

Hi-

My board is based on MK20DX128VFM5 and powered my MQX4.1.1.

Testing low power mode using VLPR by following demo code from Freescale_MQX_4_1\mqx\examples\lowpower. What I can see is the current consumption is decreased by 20mA on entering VLPR mode. But I can't get it back to RUN mode by using MQX APIs in the demo code. Here are what I used:

enter VLPR:

_lpm_set_clock_configuration(BSP_CLOCK_CONFIGURATION_2MHZ);

_lpm_set_operation_mode (LPM_OPERATION_MODE_WAIT);

exit  VLPR:

_lpm_set_operation_mode (LPM_OPERATION_MODE_RUN);

_lpm_set_clock_configuration(BSP_CLOCK_CONFIGURATION_DEFAULT);

THe code above crashed in API _lpm_set_clock_configuration(BSP_CLOCK_CONFIGURATION_DEFAULT), what is the reason for it?

How can I verify the ARM core is running at 4MHz?

Another question is, since my application enters VLPR mode immediately  after power on, the IAR used can't JTAG it to load a new code in because VLPR prevents from FLASH programming. Any solution to it?

Thanks!

Hui

タグ(1)
0 件の賞賛
1 解決策
629件の閲覧回数
huishao2
Contributor IV

Hi Sol

Thanks for your help. I worked around it by setting MCG_G2 to 0x25U (high gain to low power) so that my external crystal circuit can start oscillation again on the way back to RUN mode.

regards

Hui

元の投稿で解決策を見る

0 件の賞賛
3 返答(返信)
629件の閲覧回数
huishao2
Contributor IV

some more info I just got from debugging:

My silicon SIM_SDID is 0x3012

prints on silicon is 3N86B

On resuming back to RUN mode, the processor hangs when it migrates  from FBI to FBE mode in Cpu_SetMCGModePBE() of bsp_cm.c:

...

      /* MCG_C1: CLKS=2,FRDIV=3,IREFS=0,IRCLKEN=0,IREFSTEN=0 */

      MCG_C1 = (uint8_t)0x98U;

...

0 件の賞賛
629件の閲覧回数
soledad
NXP Employee
NXP Employee

Hello,

Please check the below thread: MQX Low Power Mode: stop from wait

Let me know if this helps!!!

Have a great day,
Sol

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
630件の閲覧回数
huishao2
Contributor IV

Hi Sol

Thanks for your help. I worked around it by setting MCG_G2 to 0x25U (high gain to low power) so that my external crystal circuit can start oscillation again on the way back to RUN mode.

regards

Hui

0 件の賞賛