K22F: No UART output after setting clocks to allow VLPR-mode

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

K22F: No UART output after setting clocks to allow VLPR-mode

Jump to solution
1,039 Views
asfarley
Contributor IV

Hi,

I'm trying to set up a K22F project to allow the MCU to enter VLPR mode while still being able to transmit UART output. 

I've run into a couple of issues. 

1) If I call the function Cpu_VLPModeEnable(), I don't see any UART output afterwards. 

2) If I attempt to step over the function Cpu_VLPModeEnable() using the debugger, I get the following from gdb:

Disconnected from "127.0.0.1" via 127.0.0.1
PE-ERROR: GDB Client Processing : Exception Occured : PROGRAM EXCEPTION!
EXCEPTION CLASS: EIDCONNCLOSEDGRACEFULLY
MESSAGE: CONNECTION CLOSED GRACEFULLY.
ADDRESS 0X0046EE0D

Disconnected from "127.0.0.1" via 127.0.0.1
Target Disconnected.

Any idea why this might be happening? As I understand, both the UART and the debugger should be able to function in VLPR mode. I suspect this is related to my clock settings but I'm not sure where to start. 

One thing that sticks out, is that in the configuration for UART0 in Processor Expert, I see some drop-down boxes for selecting whether the component is enabled in "Low speed mode" or "Slow speed mode". I selected "This component enabled", but the message to the right of the drop-down says "This speed more is disabled in the processor". 

Labels (1)
Tags (2)
0 Kudos
Reply
1 Solution
918 Views
asfarley
Contributor IV

Hi, just wanted to follow up on this for any future readers. I was able to get the UART (and ADC, and DAC) working in VLPR mode, so I'm pretty happy with the outcome. The MCU uses around the specified current (~1mA) in this mode according to my measurements.  

I did not have to resort to the SDK package; my project is built entirely using Processor Expert, so I wanted to stick with PE as much as possible. 

A couple of key points:
1) The EIDCONNCLOSEDGRACEFULLY error was unrelated to my VLPR-mode experimentation. This seems to have been the result of a bad programming cable. 

2) I was never able to get Cpu_VLPModeEnable() working; the MCU just seems to go dead when I call that function. I got VLPR mode working by setting it as the power-up default for the MCU.

View solution in original post

0 Kudos
Reply
2 Replies
919 Views
asfarley
Contributor IV

Hi, just wanted to follow up on this for any future readers. I was able to get the UART (and ADC, and DAC) working in VLPR mode, so I'm pretty happy with the outcome. The MCU uses around the specified current (~1mA) in this mode according to my measurements.  

I did not have to resort to the SDK package; my project is built entirely using Processor Expert, so I wanted to stick with PE as much as possible. 

A couple of key points:
1) The EIDCONNCLOSEDGRACEFULLY error was unrelated to my VLPR-mode experimentation. This seems to have been the result of a bad programming cable. 

2) I was never able to get Cpu_VLPModeEnable() working; the MCU just seems to go dead when I call that function. I got VLPR mode working by setting it as the power-up default for the MCU.

0 Kudos
Reply
918 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi Alexander,

UART and SWD can run in VLPR mode. VLPR use internal 4M IRC. UART must switch clock setting before go into VLPR mode. There is a demo power_mode_swich in SDK package. It shows how to switch to all of the power mode including VLPR. You can reuse its code directly. And you will also find SWD work properly at VLPR mode.

Regards,

Jing

0 Kudos
Reply