cancel
Showing results for 
Search instead for 
Did you mean: 

External Wake up source configuration using code generator

Mujeeb  Shaik
Associate II
Posted on February 14, 2017 at 08:28

Hi All,

I am using SPC560B-Discovery board,

SPC Studio Version: 5.2.1

I want to configure WKUP[2](Pin Number :PA[1]) as external wake up source,

I didn't find any call back function code generation for wake up using Code Generator,

I am expecting there should be some way to generate code for wake up call back function,Same as how we are generating code  for EIRQ call back function using Code Generator,

whether it is possible to generate call back function for Wake-up sources same as EIRQ,

If possible please guide me how to generate the Wake up call back code,

If not possible to generate code  for wake-up source using Code generator,

Please provide me some sample code to configure external wake source (Example : when switch press,system should wake up)

Thanks in advance,

---

Thanks & Regards,

Mujeeb.

This discussion has been locked for participation. If you have a question, please start a new topic in order to ask your question
1 ACCEPTED SOLUTION

Accepted Solutions
Erwan YVIN
ST Employee
Posted on February 14, 2017 at 14:20

Hello Mujeeb ,

There is some example in the application wizard

https://community.st.com/0D50X00009XkYJySAN

Best Regards

Erwan

View solution in original post

6 REPLIES 6
Oliver Beirne
Senior
Posted on February 14, 2017 at 11:42

Hello

I have moved your question to the

https://community.st.com/community/automotive-mcus-community/spc5-automotive-mcus

 forum where someone should be able to assist you.

Thanks

Oli

Erwan YVIN
ST Employee
Posted on February 14, 2017 at 14:20

Hello Mujeeb ,

There is some example in the application wizard

https://community.st.com/0D50X00009XkYJySAN

Best Regards

Erwan

Posted on March 03, 2017 at 06:53

Hi Erwa,

Thanks for your replay,

this is Timer based example,

I would like to know how to configure wake up pin using SPC code configurator,

Example : We are configuring EIRQ and respective call back using code generator

same way is it possible to generate code for wake up pin if it is possible how?,please guide how to do that,

my main requirement is when ever any external interrupt comes(EIRQ example : Switch pressed) my system should wake up,

Wake can be configured as EIRQ is it possible ?

---

Thanks & Regards,

Mujeeb 

Erwan YVIN
ST Employee
Posted on March 03, 2017 at 11:32

Hello Mujeeb ,

Step 1 : You have to use the Pinmap to configure the WKUP.

Step 2 : Plug your button with the WKUP pin 

Step 3 : Enable PCTL WKUP

 it is better to your function to wakeup in SRAM

i will send you an example application already coded in previous posts.

               Best regards

                               

                           Erwan

Posted on March 13, 2017 at 07:31

Hi Erwan,

Thanks for your replay,

Can you please provide the sample code ,

I have tried configuring as you suggested ,but how to configure call back function ,can you please help us to solve this issue

---

Thanks & Regards,

Mujeeb Shaik.

Posted on March 13, 2017 at 11:31

Hello Mujeeb ,

You can grab the example code from the application wizard in SPC5Studio (RLA or HAL)

SPC560Dxx OS-Less WKPU LPM Test Application for Discovery

SPC560Dxx_RLA WKPU API Test Application for Discovery

   Best regards

              Erwan