K82: wakeup due I2C1 slave

cancel
Showing results for 
Search instead for 
Did you mean: 

K82: wakeup due I2C1 slave

119 Views
Senior Contributor I

Hello !

I'm using slave I2C1 interface and it should wakeup whole system from LLS3 low power mode.

I have specified  .enableWakeUp = true, in configuration of I2C1  slave interface.

But should I reconfigure SDA pin as LLWU input and when wakeup is happens, reconfigure it back as I2C like ?

 

Before :

 

// PTC11, I2C_SDA, falling edge, Host message ?

PM_SetWakeupConfig(kAPP_PowerModeLls, kAPP_WakeupSourcePin, LLWU_WAKEUP_P11_IDX, kLLWU_ExternalPinFallingEdge); 

 

After asap after wakeup ?

/* PORTC11 recover as I2C_SDA */
PORT_SetPinMux(BOARD_INITPINS_K81_I2C_SDA_PORT, BOARD_INITPINS_K81_I2C_SDA_PIN, kPORT_MuxAlt2); // ?

 

Or it is fully transparent if wakeup is set in I2C1 configuration ?

Regards,

Eugene

0 Kudos
5 Replies

18 Views
NXP TechSupport
NXP TechSupport

Hi Eugene Hiihtaja,

     I2C1 can't be used as the LLS3 wake up resource, you need to use the LLWU to wake up LLS3.

    I2C1 module is not the LLWU module.

    You said you configure the SDA pin as the LLWU pin, but can't wake up LLWU, before you enter the LLS3, you need to configure the pin as the LLWU pin, and do the LLWU configuration.

    About the LLWU pin configuration, I suggest you refer to our official SDK code, which can be downloaded from this link:

Welcome | MCUXpresso SDK Builder 

  Choose the FRDM-K82 , then build the SDK and download it.

   You can find the according sample code from this folder:FRDM-K82F\boards\frdmk82f\demo_apps\power_manager

  Please refer to official code and try it again.

Wish it helps you!


Have a great day,
Kerry

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

0 Kudos

18 Views
Senior Contributor I

Hi Kerry !

But what is role of  .enableWakeUp = true in configuration if I should manually change pin multiplexing, process LLWU wakeup pin

and change pin multiplexing back to I2C1 function ?

Regards,

Yevgen

0 Kudos

18 Views
NXP TechSupport
NXP TechSupport

Hi Yevgen,

  Where you get the .enableWakeUp = true? Could you tell me the code source about it, the official SDK? Which project, then I can help you to check it.


Have a great day,
Kerry

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

0 Kudos

18 Views
Senior Contributor I

Hi Kerry !

This field is part of i2c slave configuration structure:

/*! @brief I2C slave user configuration. */
typedef struct _i2c_slave_config
{
bool enableSlave; /*!< Enables the I2C peripheral at initialization time. */
bool enableGeneralCall; /*!< Enables the general call addressing mode. */
bool enableWakeUp; /*!< Enables/disables waking up MCU from low-power mode. */

....

I have set it via ConfigTools what is part of MCUExpresso IDE.

Separate check box is available for this feature.

But it is not so clear what is usage of it in LLS3 low power mode.

Looks like LLWU pin wakeup MCU and reconfiguration should be done asap for avoid losing of I2C incoming bytes.

Regards,

Eugene

0 Kudos

18 Views
NXP TechSupport
NXP TechSupport

Hi Eugene Hiihtaja,

  This slave I2C wake up is the slave address matching wakeup:

pastedImage_1.png

pastedImage_2.png

LLS3 can't be waked by the I2C module, it need to use the LLWU module to wake LLS3.


Have a great day,
Kerry

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

0 Kudos