cancel
Showing results for 
Search instead for 
Did you mean: 

STM32WB Low Power mode

nayeemcron
Associate II

Here's a revised version of your message:

---

Hi,

I am using the NUCLEO-WB15CC board for a custom application where I read an analog sensor value with a 12-bit ADC resolution. The issue arises when I try to transmit this data over BLE. I am using the following code to update the BLE characteristic:

In the BLE Toolbox app, I see the hex value `0x0F` when I connect 3.3V to the analog pin. Since `0x0F` is not the expected equivalent of 4095, I believe the data isn't being transmitted correctly. However, when I use `APP_DBG_MSG` to print the ADC value in the Serial Terminal, I can correctly see `4095`.

My second issue is related to low-power mode. I want to update the BLE characteristic every two seconds and enter low-power mode when idle. I'm using an LPTIM IRQ handler to trigger the task every two seconds, and this works fine. But when I set `CFG_LPM_SUPPORTED` to 1, the device no longer shows up in the BLE Toolbox app. Does this mean we can't enter low-power mode while maintaining a BLE connection?

Any insights would be greatly appreciated!

 

 

 

UpdateCharData[0] = (uint8_t)(adc_val & 0xFF);
UpdateCharData[1] = (uint8_t)((adc_val >>  & 0x0F);
Custom_STM_App_Update_Char(CUSTOM_STM_MYCHAR, UpdateCharData);

 

 

 

 

1 REPLY 1
PGump.1
Senior II

Hi,

I really have no idea about this, however, does the BLE Toolbox app break the message into 2 hex strings like "0xFF\n0x0F\n"...?

Kind regards
Pedro

AI = Artificial Intelligence, NI = No Intelligence, RI = Real Intelligence.