How to use PTD0 for LLWU in MQX?

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

How to use PTD0 for LLWU in MQX?

1,095 Views
danielchai
Senior Contributor I

Hi All,

I am using CW10.4, MQX4.0.1 and MK60FN1M0VLQ12.

How could I use PTD0 for LLWU?

Thank you.

-Daniel

0 Kudos
6 Replies

374 Views
albertovargas
NXP Employee
NXP Employee

Hi Daniel,

PTD1 can't be selected as input for LLWU module. The inputs for this unit are fixed, so you can only choose those defined as LLWU inputs. You can see them in the following table.

K61P256M150SF3RM - LLWU inputs.PNG.png

I hope this helps.

374 Views
danielchai
Senior Contributor I

Hi,

Thank you.

In this case, how should I do to use PTD0 for LLWU?

Thank you.

0 Kudos

374 Views
albertovargas
NXP Employee
NXP Employee

Create a BitIO component

Set the component as Input

Select PTD0 as your source input

Good Luck

0 Kudos

374 Views
danielchai
Senior Contributor I

Hi Alberto,

Thank you.

Is there a way to do it in MQX?

-Daniel

0 Kudos

374 Views
albertovargas
NXP Employee
NXP Employee

Sure, using CW10.4 click File > New > MQX-Lite Project and generate the new project.

TWR-MK60FN1-MQX_Example_LLWU_1.PNG.png

As you can see, I created the components for Console and a BitIO for LLWU.

Here is the configuration for PTD0_LLWU

TWR-MK60FN1-MQX_Example_LLWU_2.PNG.png

Now, the system clocks

TWR-MK60FN1-MQX_Example_LLWU_3.PNG.png

TWR-MK60FN1-MQX_Example_LLWU_4.PNG.png

Now, just generate your tasks and use the BitIO component for LLWU when you need them.

Good Luck.

374 Views
danielchai
Senior Contributor I

Hi Alberto,

After I put the MCU into VLLS3 mode, when it wakes up. how should I control it?

Will it enter the LLWU ISR  automatically?

Thank you.

-Daniel

0 Kudos