Low power modes in USB-KW40

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

Low power modes in USB-KW40

898 Views
syed_idris
Contributor III


Hi,

We are using USB-KW40 with IAR embedded workbench and we are able to work on "Wireless UART" program code which is using BLE to communicate controller with "Kinetis BLE Toolbox" (Android App).

How to change the power modes and enter into low power modes?

5 Replies

518 Views
miguel_reyes
NXP Employee
NXP Employee

Syed,

As long as your mobile application supports BLE. You should be able to pair with the USB-KW40Z.

Regarding to the low power functionality. Please, use Heart Rate Sensor from the FRDM-KW40Z example as a reference to implement low power features in your code. You need to include the low power folder in your project, but you also need to enable a couple of defines in the app_preinclude.h file (use the heart rate sensor(frdmkw40 version) as a reference).

The only difference there is that DCDC module is in bypass in the USB-KW40Z. So, you need to change the DCDC Defines to 0 and to Bypass mode.

/* Enables / Disables the DCDC platform component */

#define gDCDC_Enabled_d                 0        

/* Default DCDC Mode used by the application */          

#define APP_DCDC_MODE                   gDCDC_Mode_Bypass_c

As an additional information. We recommend to read low power management chapter from the "BLEDAG.pdf" document included in the KW40Z Connectivity Package under the "doc" folder.

518 Views
isaacavila
NXP Employee
NXP Employee

Hello Syed,

Wireless_uart_demo does not have lower power support as is, you need to add Low Power files that located at: <KW40Z_Connectivity_software_PATH>\ConnSw\framework\LowPower\ and modify application source file.

Indeed, you can look at heart_rate_sensor example that includes Low Power files (although this feature is disabled in the project) and you can use it as reference. Just enable this definition in PWR_Configuration.h as it is shown:

//-----------------------------------------------------------------------------

// To enable/disable all of the code in this PWR/PWRLib files.

//   TRUE =  1: Use PowerDown functions (Normal)

//   FALSE = 0: Don't use PowerDown. Will cut variables and code out. But

//              functions still exist. Useful for debugging and test purposes

#ifndef cPWR_UsePowerDownMode

  #define cPWR_UsePowerDownMode                   FALSE

#endif

And try by using PWR modes' APIs.

Just as reference, there is a document called Bluetooth Low Energy Application Developer's Guide (BLEADG) located at <KW40Z_Connectivity_software_PATH>\ConnSw\doc that talks about Low Power functionality. (Chapter 10. Low Power Management). I think this could be helpful to understand the low power management in KW40Z.

I hope this can help you!

Regards,

Isaac Avila

0 Kudos

518 Views
syed_idris
Contributor III

Thanks Isaac,

As we can do "Wireless UART" code, now we want to move ahead and write a ' Hello Word ' code using BLE for USB-KW40 which should be received by any mobile terminal (not ' kinetis BLE toolkit ' only) in low power modes. But we are unable to do that.

Even when "Wireless UART" code is debugged, We can see the bluetooth name on mobile but not able to pair and communicate with terminal.

your reply will be great help for us.

0 Kudos

518 Views
isaacavila
NXP Employee
NXP Employee

Hello Syed,

Your application does not pair nor communicate with terminal when enabling low power? Or it does not communicate even though you are not using low power?

Regards,

Isaac

0 Kudos

518 Views
syed_idris
Contributor III

Our aim is in low power modes

1- instead of using "Kinetis BLE toolbox" can't we use any other bluetooth terminal on our cellphones?

2- And instead of writing on PC serial terminal we want to write "Hello \n" in the code only, means as we pair with the bluetooth application it should display "Hello" on cellphone without typing in PC serial monitor.

And for low power modes "Low Power" files are added in platform folder but it is showing errors.IAR LPM.png

0 Kudos