Tower KV31F120M LPUART clock is always disabled

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

Tower KV31F120M LPUART clock is always disabled

Jump to solution
1,036 Views
GaryOlmstead
Senior Contributor I

Hi --

I am trying to use the LPUART on a KV31F120M.  I loaded the LPUART polling program.  It appears to run OK, but no characters are ever generated.  The LPUART clock details window says that the clock select is disabled and the frequency is inactive even though "Initialize LPUART clock" is set to "yes".

How do I activate the clock?

 

Gary Olmstead

 

0 Kudos
1 Solution
1,003 Views
GaryOlmstead
Senior Contributor I

Hi Jing --

I got it working.  I'm not sure exactly what the problem was.  I resoldered my USB converter board, and created a brand new program, and it works. 

I verified the USB board connections with an ohm meter when I built it, but some of the connections still didn't look 110%, so I reworked it. 

I had single stepped through the previous program, and it looked OK.  I made a new version, mostly because I didn't know what else to do.

I hadn't noticed the readme file until you pointed it out, but I was doing everything it said.

Thanks for your help.

Gary Olmstead

 

View solution in original post

0 Kudos
3 Replies
1,015 Views
GaryOlmstead
Senior Contributor I

Hi Jing --

Well, but it doesn't.  The program does have a line that says CLOCK_SetLpuartClock(1U); which sets SIM_SOPT2, but no characters come off the pins.  I used the PINS configuration to steer the output to pins 5 (Tx) and 6 (Rx) because they aren't used for anything else.  

If I run the program, and single step through, it is picking up the characters and sticking them in the output buffer.  

If I stop the program, and select the Clocks icon in the upper right corner, I get a window that has two tabs, Details and Clock Consumers.  Selecting Details and scrolling down to "LPUART clock", it says "inactive" and "Initialize LPUART clock" is set to "No".  "LPUART clock output frequency" is "inactive" and "LPUART clock select" is "Disabled".

If I select Config Tools, Peripherals, LPUART0, I get the configuration window, but "Clock source" has several selections that all say "Inactive", and no other choices are possible.  "Clock source frequency" also has several choices that are all  "inactive".

So, somewhere there has to be another register bit to set, but I can't find it.

I am using MCUxpresso 11.3, and the SDK for the KV31 is 2.9.

0 Kudos
1,021 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi Gray,

The demo has already configure the clock. What do you mean of the " LPUART clock details window"? Do you mean the clock ConfigTools? This tool will not read information from demo or other source code. Please follow the readme in the demo.

Connect pin:
- RX of USB2COM to J4-6
- TX of USB2COM to J2-19
- GND of USB2COM to J2-14

 

Regards,

Jing

0 Kudos
1,004 Views
GaryOlmstead
Senior Contributor I

Hi Jing --

I got it working.  I'm not sure exactly what the problem was.  I resoldered my USB converter board, and created a brand new program, and it works. 

I verified the USB board connections with an ohm meter when I built it, but some of the connections still didn't look 110%, so I reworked it. 

I had single stepped through the previous program, and it looked OK.  I made a new version, mostly because I didn't know what else to do.

I hadn't noticed the readme file until you pointed it out, but I was doing everything it said.

Thanks for your help.

Gary Olmstead

 

0 Kudos