QN9080 - Low Power FreeRtos

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

QN9080 - Low Power FreeRtos

1,253 Views
carl-circuitwor
Contributor II

I'm trying to use the QN9080 to :

  • At times Beacon rapidly
  • At times not Beacon at all ( Device dormant ) 
  • Wake upon GPIO interrupt or timebase to server sensors
  • Sleep at the lowest power in between performing those tasks and beaconing

I've been using standard freertos tasks at the moment that utilise vTaskDelay for timing, these tasks seem to get blocked when using cPWR_UsePowerDownMode. But work fine when don't use cPWR_UsePowerDownMode.

I'm working off of a modified Power profile example project, where I've removed the button press, enabled advertising and set the power mode to deep sleep.

Can someone help, ideally I need a boilerplate that shows how tasks should be set up to allow cPWR_UsePowerDownMode to function when the tasks are inactive and how tasks can resume from the low power state, when using cPWR_UsePowerDownMode.

Connectivity Software: Implement tickless mode in FreeRTOS - looks good, but appears to be for an older version of the SDK.

Labels (2)
Tags (2)
3 Replies

1,044 Views
Sebastian_Del_Rio
NXP Employee
NXP Employee

Hi Carl, I hope you're doing well!

 

The document you found is for an older SDK version, however, in the newer release of the SDK, the process to use low power mode was simplified to the two following macros in the app_preinclude.h header file:

 

#define cPWR_EnableLpTmrRunning 1
#define cPWR_EnablePD0RtcInterrupt 1

 

And the following macro in FreeRTOSConfig.h:

 

#define configUSE_TICKLESS_IDLE                 1

 

Then the low power consumption will depend on the tested example, and the modules that are enabled/disabled in each of them. You could take the examples as a base to implement low power mode in your own applications.

 

Please let me know if you need any more information.

 

Best regards,

Sebastian

1,046 Views
carl-circuitwor
Contributor II

Hi,

Thanks for that. I can see tasks waking the QN9080 now.

But Initially the beaconing works for a while then stops randomly after 30 seconds or so.

I have a minimally modified example based off of the temp sensor example, I've changed it to start advertisement/beaconing on boot.

As it's in a low power mode I can't use the debugger to see why it's failing.

I've uploaded to dropbox, here is a link : Dropbox - QN9080TempBeacon.zip 

Setting cPWR_EnableLpTmrRunning to 0 shows the beaconing doesnt stop, so it's something to do with the low power sleep/wake

Any pointers as to why it's stopping would be great!

0 Kudos

1,046 Views
carl-circuitwor
Contributor II

I've made some progress.. I took the power profile example instead and enabled tickless + the other changes I made to the temperature example to beacon at start up.

And it works, 6 hours of continuous beaconing.