QN908x enable low power in qn908xcdk_wireless_examples_bluetooth_temperature_sensor

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

QN908x enable low power in qn908xcdk_wireless_examples_bluetooth_temperature_sensor

3,075 Views
xaviervilajosan
Contributor II

Hi,

I am trying to enable the low power operation in the demo application 

qn908xcdk_wireless_examples_bluetooth_temperature_sensor

To do so I inject as a symbol 

cQN_UsePowerDownMode 1 

I can also set it to 1 in the app_preinclude.h 

I recompile and flash the applicaiton and I expect that the application starts and I can see it in deep sleep when measuring the energy consumption. 

When looking at the traces I cannot see the expected 0.7uA in deep sleep or 2,3uA in power down 0 mode but I see 700uA which correspond to the idle state. I tried to understand the code but there is a complete lack of documentation: 

The power_manger.h file enables us to set the sleep mode in an array through the function 

PM_SetReq(power_mode_t pm, uint32_t bits)

I see this functions being called and the values set in the array.

then the idle task calls 

static void App_Idle(void)
{
PM_PowerManagement();
}

and I cannot follow anymore as I do not know where the PM_PowerManagement(); code is implemented. 

could you please advice me on how to understand this code? does it actually work? Do I need to configure something else?

How the PM_PowerManagement() function access the sleep mode defined by the function

PM_SetReq(power_mode_t pm, uint32_t bits)?

thanks and regards,
Xavi

Labels (1)
11 Replies

2,090 Views
xaviervilajosan
Contributor II

Hi, we have another question. We would like to use QTOOL as well. Our dongle is not receiving anything from the board and we assume it is because we tried 2 month ago to flash it with a code we found in your sdk. Now before moving forward we would like to update the firmware version in the dongle board to be sure all will work. We follow the procedure as described in the UM11085 Section 8.

the Step number 6 is to select the firmware.bin file to be uploaded in the dongle. According to the document the file name is firmware.bin and the file path is Connectivity QTool\binfiles\firmware.bin.

In the Connectivity QTool folder there is not a binfiles folder so we cannot find the firmware.bin.

Could you please let us know how we can get this firmware.bin file? otherwise, we can compile it if you indicate where the sources are.

thanks again!

X

0 Kudos

2,090 Views
xaviervilajosan
Contributor II

Dear Gerardo,

thanks so much for your quick response. We downloaded the SDK the 8th of Feb. We downloaded now the new version and the power profiling tool works as expected!!! thanks!

We measured then the beacon example and we are not seeing similar low power consumption as the achieved with the power profiling example. Does the beacon implement the same power modes? do we need to add some code/flag/define so the beacon demo uses lower power modes?

thanks for your support!
X

0 Kudos

2,090 Views
xaviervilajosan
Contributor II

Hi Gerardo,

I did more progress using the new published version. I used AN01786 application note to measure low power. I compiled the power profiling example as described in the AN an flashed my device. 

I am not able to reach some of the power consumption values as reported by the AN.

Active Mode
------------------
Measured: 1730 uA
Expected: 798 uA (Table below)
Sleep  
--------
Measured: 1313 uA
Expected: 387 uA
PowerDown0,
Measured: ~2 uA
Expected: ~2 uA
this one works 
I am looking at that table for the expected results: 
Inline image 1
This is the energy trace I measured for a beacon with an energy consumption close to 1.5mA. This is running untouched the power profiling example.
 
This is a screen capture of the AN. The consumption is around 700 uA (Fig 13, Pag 16)
Inline image 2
Could you please hint me to understand why the AN presents lower energy consumption with the same application I am using? 
thanks!
X
0 Kudos

2,090 Views
gerardo_rodriguez
NXP Employee
NXP Employee

Hello Xavier,

The QN9080 SDK was updated after Feb 8th to correct this issue in the power profiling example. Please make sure in the MCUXpresso SDK Dashboard that you are working with the latest SDK version:

pastedImage_2.png

A quick way to know if you have the updated SDK, is to look for the following code in red present in board.c for the power_profiling project:

uint8_t BOARD_GetBatteryLevel(void)
{
    uint32_t adcConvResult = 0;
    float fresult;

    if (SYSCON_PMU_CTRL1_ADC_DIS_SHIFT & SYSCON->PMU_CTRL1) //ADC power disabled?
    {
        POWER_EnableADC(true);
    }

With this SDK, you should be able to reach the power consumption values reported by the AN01786 app note. 

Additionally, you can implement the same changes done in board.c of the power profiling demo to the temperature sensor demo to further improve the power consumption. The improvement will not be as much as with the power profiling demo, but still a small improvement.

Please let me know if you have any question.

Best regards,

Gerardo

0 Kudos

2,090 Views
gerardo_rodriguez
NXP Employee
NXP Employee

Hello Xavier,

Which IDE are you using?

The low power support is disabled in applications compiled with MCUXpresso IDE in the Beta SDK as mentioned in chapter 6 Known Limitations in the "BLE Release Notes.pdf" located in "..\SDK_2.2_QN908xCDK_Beta\docs\wireless\Bluetooth\"

Currently, the power management implementation is precompiled in the lib_ble_QN908XC_controller.a library, so the source code isn't available.

Please note that this a Beta SDK and still has some limitations. The next release will have better support for low power.

Regards,

0 Kudos

2,090 Views
xaviervilajosan
Contributor II

HI, 

I am using MCUXpresso. I managed to progress and make it work but not in the desired sleep mode. Basically in the init function I had to call PM_Init and enable this flag (cQN_UsePowerDownMode) amongst other little changes.

Now the application sleeps between beacons but not to the lowest power mode.

Do you have an expected date for the new release? this release is been here since 2017-07-17. I think it is important that examples are developed using and demoing the low power modes as most of the users of this chip look for it because its low power performance. 

We find low support and documentation on this chip.

thanks

X

0 Kudos

2,090 Views
gerardo_rodriguez
NXP Employee
NXP Employee

Hello Xavier,

The new QN9080 SDK is expected to be released on December. I'll update this thread when the new SDK is released.

Regards,

0 Kudos

2,090 Views
kyleyang
Contributor IV

Hi,

It is time close to December end.

Is there news update regarding QN9080 device?

Thanks.

0 Kudos

2,090 Views
gerardo_rodriguez
NXP Employee
NXP Employee

Hello Kyle Yang,

Unfortunately, the release for the QN9080 SDK was delayed. It is planned to be released soon during Q1. I will update this thread as soon as it is released

Sorry for the inconvenience.

Best regards,

Gerardo

0 Kudos

2,090 Views
xaviervilajosan
Contributor II

Same here. We are waiting for it. Any more news now?

X

0 Kudos

2,090 Views
gerardo_rodriguez
NXP Employee
NXP Employee

Hello,

The RFP (Ready for Production) build of the QN9080 SDK is now available from the MCUXpresso SDK builder. One of the new features is that the low power support was optimized.

Best regards,

Gerardo