Adding button selection and Low Power Interrupt

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

Adding button selection and Low Power Interrupt

964 Views
haroldvogel
Contributor II

I have two problems that I am trying to get help with.

Using chip MKL36Z256VLL4

 

1. Currently the code that I inherited has a wake up on AC reconnected.  I am not sure how it works because I don't understand Processor Expert and how it generates code.  I need to add a similar wake up which will wake up the unit if a 12 volt battery is connected, the sensor would be on a different line.  Need to know how to create this line and have it trigger the same wake up code as the ACOK line does now.

 

 

2. The current code has one manual button which causes a print action.  Looking to add another button which would also cause a print action but would print out a different line from the first button.  I need to know what button has been pushed (so I will have to go to the existing code an set some kind of flag indicating the existing button has been pushed) and also, once again, how to use Processor Expert to generate the code for this button and hopefully have it in the same button code that now exists.

 

In both cases the items seem to be bit items so I have seen know way in adding another line to the Processor Expert application, like I have done for the A/D items.

 

If you have any questions I will be glad to answer them to the best of my ability.

Labels (1)
0 Kudos
Reply
5 Replies

818 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Harold,

(1) The kineits L series produces support the maximum volt is 3.3V,

    so we can not use the 12v volt , must under 3.3 v.

  About the wakeup sources , you can check it at the reference manual :

pastedImage_0.png

(2) About use the Processor Expert on CW, when you create project , please select it

pastedImage_1.png

Then about add one button , you can use the GPIO interrupt . So you can add the component

of "GPIO_LDD" component , then configure it refer to your requirement , about the usage example

of this component ,you can refer to the "Typical Usage":

pastedImage_2.png

If i misunderstand something, please tell me without any hesitate .

Hope it hleps


Have a great day,
Alice

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

0 Kudos
Reply

818 Views
haroldvogel
Contributor II

Reply in RED

0 Kudos
Reply

818 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Harold ,

Sorry , i can't understand what do you want to  convey.

Could you please describe it in detail .

BR

Alice

0 Kudos
Reply

818 Views
haroldvogel
Contributor II

I am working on code that existed before I arrived.

They are adding a second power source to the unit which is a battery. Currently there is a wake up on ACOK (when the ac power has been restored the unit will wake up and start working) and I would like to do the same thing when the battery is connected. I am new to Processor Expert and would like to know how to configure the line to generate the same interrupt as the ACOK line currently does. (This interrupt is done when the unit is put to sleep and awaits the connection to wake the unit up and start to function once again.)

The other problem I have is that they need to add a second button. I need to know how to configure this with Processor Expert and use it in the existing code that is used for the current button.

It would be helpful if I could look in Processor Expert and see how these lines had been created, I could then create similar ones for the new lines.

As I said I am new to Processor Expert and don’t know my way around all of the applications abilities so if there is a way to see how a line was created, such as GPIO or maybe as a bitIO or byteIO, it would be of great help to me in my development.

Does this make it any clearer on what I am trying to do and the information that I am seeking?

John Vogel

0 Kudos
Reply

818 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Harold,

For example , we use the PTA6 as button .

After create one PE project :

pastedImage_0.png

add one component of "GPIO_LDD" , then configure this component :

pastedImage_1.png

After configure , click the "generate code " button :

pastedImage_2.png

Then  we can find the code rely on we configure :

pastedImage_3.png

About use the PE configure button (gpio) , have i describe clearly ? If not, please tell me .

And new to the PE, the "Help on component" (i mentioned last message)is very useful , it helps us how to configure and how to

write code .

Hope it helps

Alice

0 Kudos
Reply