MC13213 upgrade to KW2x

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

MC13213 upgrade to KW2x

740 Views
arnogir
Senior Contributor II

Hello

I'm using a system with a remote and a coordinator.

The system is done with MC132213 and the Beestack (Slave/coordinator).

I know the new Kw2x allow to reduce power consumtion.

I think this will be great for my remote to increase battery live.

I have some question about an upgrade of my remote wfrom MC13213 to Kw2x (The coordinator will stay with MC13213)

1) Is the beestack with Kw2X is compatible to communicate with beestack MC13213? (In other word, is it ok to keep coordinator with MC13213 and change remote to Kw2X?)

2) My remote is only composed with MC13213 and BP. Then the MC13213 go to sleep to reduce consumtion (0.5µA). and then the Keyboard interrupt wakeup the µC.

After try, I thing the beestack with Kw2X is not possible to have a wakeup only with a Keyboard interrupt (External pin)?? I onlyfound with timer... I have right? What should be the solution?

Thank you

0 Kudos
3 Replies

585 Views
EarlOrlando
Senior Contributor II

Hello ,

Answering your questions:

1) Yes, you won't have any problem.

2) The power consumption in the different operating behaviors can be consulted in the table 13 "Power consumption operating behaviors" in the MKW2x datasheet.

The wake-up sources can be consulted in the MKW2x reference manual in the table 10-14 "Wakeup sources for LLWU inputs", where you will notice that there are several wake-up sources.

I recommend you to take a look into the AWIC and LLWU modules in the reference manual. Also, I think that the application notes AN4470 and AN4503 will be useful for you.

Best regards,

Earl Orlando.

/* If this post answers your question please click the Correct Answer button. */

0 Kudos

585 Views
arnogir
Senior Contributor II

Hello

Thank for your support.

But I'm still always a question with the Beestack.

I don't find the good sleep configuration.

Which mode you advice me? My board will only have the Kw2x with an external BP and the antenna system. The aim is to put the board in a state to consume less as possible current and wakeup with a BP press. The the code should restart at the same point (no done a Reset action and restart from entry point code. THis to keep the Zigbee associating with the coordinator):

//-----------------------------------------------------------------------------
// The way that DeepSleep mode are handled. Following possibilities exist:
//*****************************************************************************
//   0: No DeepSleep done, but application can set modes
//*****************************************************************************
//   1: MCU/Radio low power modes:
//        MCU in VLLS2 mode (only portion of SRAM_U remains powered on).
//        Radio in hibernate mode.  
//      Wakeup sources:
//        On TWR_K60D100M + MC1324x: TSI interrupt using LLWU module. Wakeup goes through Reset sequence.
//        On TWR_KW21D512:           GPIO (push button) interrupt using LLWU module. Wakeup goes through Reset sequence.
//*****************************************************************************
//   2: MCU/Radio low power modes:
//        MCU in VLLS2 mode (only portion of SRAM_U remains powered on).
//        Radio in hibernate mode.  
//      Wakeup sources:
//        LPTMR interrupt using LLWU module. Wakeup goes through Reset sequence.
//          - LPTMR wakeup timeout: fixed at compile time.
//          - LPTMR clock source:   LPO(internal low power oscillator)
//          - LPTMR resolution:     possible values: 1 ms, 2 ms, 4 ms, 8 ms, 16 ms, 32 ms, 64 ms, 128 ms, 256 ms,
//                                  512 ms, 1024 ms, 2048 ms, 4096 ms, 8192 ms, 16384 ms, 32768 ms, 65536 ms.
//                                  See PWRLib.h for details.
//*****************************************************************************
//   3: MCU/Radio low power modes:
//        MCU in VLLS2 mode (only portion of SRAM_U remains powered on).
//        Radio in hibernate mode.  
//      Wakeup sources:
//        LPTMR interrupt using LLWU module. Wakeup goes through Reset sequence.
//          - LPTMR wakeup timeout: fixed at compile time.
//          - LPTMR clock source:   ERCLK32K(secondary external reference clock. 32.768 kHz crystal connected to RTC oscillator)
//          - LPTMR resolution:     possible values: 125/4096 ms, 125/2048 ms, 125/1024 ms, 125/512 ms, 125/256 ms, 125/128 ms,
//                                  125/64 ms, 125/32 ms, 125/16 ms, 125/8 ms, 125/4 ms, 125/2 ms, 125 ms,
//                                  250 ms, 500 ms, 1000 ms, 2000 ms
//                                  See PWRLib.h for details.
//*****************************************************************************
//   4: MCU/Radio low power modes:
//        MCU in VLLS2 mode (only portion of SRAM_U remains powered on).
//        Radio in hibernate mode.  
//      Wakeup sources:
//        RTC interrupt using LLWU module. Wakeup goes through Reset sequence.
//          - RTC wakeup timeout:   fixed at compile time.
//          - RTC clock source:     32.768 kHz crystal connected to RTC oscillator
//          - RTC resolution:       1 s.
//*****************************************************************************
//   5: MCU/Radio low power modes:
//        MCU in VLLS2 mode (only portion of SRAM_U remains powered on).
//        Radio in hibernate mode.  
//      Wakeup sources:
//        On TWR_K60D100M + MC1324x: TSI interrupt using LLWU module. Wakeup goes through Reset sequence.
//        On TWR_KW21D512:           GPIO (push button) interrupt using LLWU module. Wakeup goes through Reset sequence.
//        LPTMR interrupt using LLWU module. Wakeup goes through Reset sequence.
//          - LPTMR wakeup timeout: fixed at compile time.
//          - LPTMR clock source:   LPO(internal low power oscillator)
//          - LPTMR resolution:     possible values: 1 ms, 2 ms, 4 ms, 8 ms, 16 ms, 32 ms, 64 ms, 128 ms, 256 ms,
//                                  512 ms, 1024 ms, 2048 ms, 4096 ms, 8192 ms, 16384 ms, 32768 ms, 65536 ms.
//                                  See PWRLib.h for details.
//*****************************************************************************
//   6: MCU/Radio low power modes:
//        MCU in VLLS2 mode (only portion of SRAM_U remains powered on).
//        Radio in hibernate mode.  
//      Wakeup sources:
//        On TWR_K60D100M + MC1324x: TSI interrupt using LLWU module. Wakeup goes through Reset sequence.
//        On TWR_KW21D512:           GPIO (push button) interrupt using LLWU module. Wakeup goes through Reset sequence.
//        LPTMR interrupt using LLWU module. Wakeup goes through Reset sequence.
//          - LPTMR wakeup timeout: fixed at compile time.
//          - LPTMR clock source:   ERCLK32K(secondary external reference clock. 32.768 kHz crystal connected to RTC oscillator)
//          - LPTMR resolution:     possible values: 125/4096 ms, 125/2048 ms, 125/1024 ms, 125/512 ms, 125/256 ms, 125/128 ms,
//                                  125/64 ms, 125/32 ms, 125/16 ms, 125/8 ms, 125/4 ms, 125/2 ms, 125 ms,
//                                  250 ms, 500 ms, 1000 ms, 2000 ms
//                                  See PWRLib.h for details.
//*****************************************************************************
//   7: MCU/Radio low power modes:
//        MCU in VLLS2 mode (only portion of SRAM_U remains powered on).
//        Radio in hibernate mode.  
//      Wakeup sources:
//        On TWR_K60D100M + MC1324x: TSI interrupt using LLWU module. Wakeup goes through Reset sequence.
//        On TWR_KW21D512:           GPIO (push button) interrupt using LLWU module. Wakeup goes through Reset sequence.
//        RTC interrupt using LLWU module. Wakeup goes through Reset sequence.
//          - RTC wakeup timeout:   fixed at compile time.
//          - RTC clock source:     32.768 kHz crystal connected to RTC oscillator
//          - RTC resolution:       1 s.
//*****************************************************************************
//   8: MCU/Radio low power modes:
//        MCU in VLLS2 mode (only portion of SRAM_U remains powered on).
//        Radio in hibernate mode.  
//      Wakeup sources:
//        On TWR_K60D100M + MC1324x: TSI interrupt using LLWU module. Wakeup goes through Reset sequence.
//        On TWR_KW21D512:           GPIO (push button) interrupt using LLWU module. Wakeup goes through Reset sequence.
//        LPTMR interrupt using LLWU module. Wakeup goes through Reset sequence.
//          - LPTMR wakeup timeout: configurable at run time.
//          - LPTMR clock source:   LPO(internal low power oscillator)
//          - LPTMR resolution:     fixed to 2 ms (125 802.15.4 PHY symbols)
//*****************************************************************************
//   9: MCU/Radio low power modes:
//        MCU in LLS mode.
//        Radio in hibernate mode.  
//      Wakeup sources:
//        On TWR_K60D100M + MC1324x: TSI interrupt using LLWU module. Wakeup goes through Reset sequence.
//        On TWR_KW21D512:           GPIO (push button) interrupt using LLWU module. Wakeup goes through Reset sequence.
//        LPTMR interrupt using LLWU module.
//          - LPTMR wakeup timeout: fixed at compile time.
//          - LPTMR clock source:   LPO(internal low power oscillator)
//          - LPTMR resolution:     possible values: 1 ms, 2 ms, 4 ms, 8 ms, 16 ms, 32 ms, 64 ms, 128 ms, 256 ms,
//                                  512 ms, 1024 ms, 2048 ms, 4096 ms, 8192 ms, 16384 ms, 32768 ms, 65536 ms.
//                                  See PWRLib.h for details.
//*****************************************************************************
//   10: MCU/Radio low power modes:
//        MCU in LLS mode.
//        Radio in hibernate mode.  
//      Wakeup sources:
//        On TWR_K60D100M + MC1324x: TSI interrupt using LLWU module. Wakeup goes through Reset sequence.
//        On TWR_KW21D512:           GPIO (push button) interrupt using LLWU module. Wakeup goes through Reset sequence.
//        LPTMR interrupt using LLWU module.
//          - LPTMR wakeup timeout: fixed at compile time.
//          - LPTMR clock source:   ERCLK32K(secondary external reference clock. 32.768 kHz crystal connected to RTC oscillator)
//          - LPTMR resolution:     possible values: 125/4096 ms, 125/2048 ms, 125/1024 ms, 125/512 ms, 125/256 ms, 125/128 ms,
//                                  125/64 ms, 125/32 ms, 125/16 ms, 125/8 ms, 125/4 ms, 125/2 ms, 125 ms,
//                                  250 ms, 500 ms, 1000 ms, 2000 ms
//                                  See PWRLib.h for details.
//*****************************************************************************
//   11: MCU/Radio low power modes:
//        MCU in LLS mode.
//        Radio in hibernate mode.  
//      Wakeup sources:
//        On TWR_K60D100M + MC1324x: TSI interrupt using LLWU module. Wakeup goes through Reset sequence.
//        On TWR_KW21D512:           GPIO (push button) interrupt using LLWU module. Wakeup goes through Reset sequence.
//        RTC interrupt using LLWU module.
//          - RTC wakeup timeout:   fixed at compile time.
//          - RTC clock source:     32.768 kHz crystal connected to RTC oscillator
//          - RTC resolution:       1 s.
//*****************************************************************************
//   12: MCU/Radio low power modes:
//        MCU in LLS mode.
//        Radio in hibernate mode.  
//      Wakeup sources:
//        On TWR_K60D100M + MC1324x: TSI interrupt using LLWU module. Wakeup goes through Reset sequence.
//        On TWR_KW21D512:           GPIO (push button) interrupt using LLWU module. Wakeup goes through Reset sequence.
//        LPTMR interrupt using LLWU module.
//          - LPTMR wakeup timeout: configurable at run time.
//          - LPTMR clock source:   LPO(internal low power oscillator)
//          - LPTMR resolution:     fixed to 2 ms (125 802.15.4 PHY symbols)
//*****************************************************************************
//   13: MCU/Radio low power modes:
//        MCU in VLPS mode.
//        Radio in DOZE mode.
//      Wakeup sources:
//        On TWR_KW21D512:           GPIO (push button) interrupt.
//        UART interrupt.
//        Radio timer interrupt.
//          - Radio timer wakeup timeout: configurable at run time.
//          - Radio timer resolution:     fixed to 16 us (one 802.15.4 PHY symbol)
//*****************************************************************************
//   14: MCU/Radio low power modes:
//        MCU in LLS mode.
//        Radio in hibernate mode.  
//      Wakeup sources:
//        On TWR_K60D100M + MC1324x: - TSI interrupt using LLWU module. 
//                                     Wakeup goes through Reset sequence.
//        On TWR_KW2xDxxx:           - GPIO (push button) interrupt using LLWU module. 
//                                   - LPTMR interrupt using LLWU module.
//                                     Wakeup goes through Reset sequence.
//          - LPTMR wakeup timeout: the shortest timeout period of any active LPTMR-based timer (see Timer.c) 
//          - LPTMR clock source:   LPO / ERCLK32K (see cPWR_LPTMRClockSource settings in this file)
//          - LPTMR resolution:     1 ms
//*****************************************************************************
0 Kudos

585 Views
EarlOrlando
Senior Contributor II

Hello Arnaud,

I think that the best mode for your application is LLS which allows the MCU to go to the same point where the system went to sleep. The VLLS modes have lower power consumption but the system is reset when it wakes up.

Regards,

Earl.

0 Kudos