- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, i am tryint to use the battery characteristic on P8 do I need to have a dedicated GPIO for the GPIO_SETTINGS_BATTERY ?
If so does this GPIO has to be connected to a physical PIN ?
I am usine 2 AA battery or mini USB using 5 V to 3.3 V LDO to power the board with automatic detection of mini USB vs battery. Right now everytime I read the characteristic using BLE Explorer even after 40 hours of usage It is still reporting 100 %
Other than calling blebat_Init(); do I need to plug specific code ?
// Following structure defines GPIO configuration used by the application
const BLE_PROFILE_GPIO_CFG meatsitter_gpio_cfg =
{
/*.gpio_pin =*/
{
-1,//GPIO_PIN_WP, // This need to be used to enable/disable NVRAM write protect
-1,//GPIO_PIN_BUTTON, // Button GPIO is configured to trigger either direction of interrupt
-1,//GPIO_PIN_LED, // LED GPIO, optional to provide visual effects
8,//GPIO_PIN_BATTERY, // Battery monitoring GPIO. When it is lower than particular level, it will give notification to the application
-1,//GPIO_PIN_BUZZER, // Buzzer GPIO, optional to provide audio effects
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 // other GPIOs are not used
},
/*.gpio_flag =*/
{
0,//GPIO_SETTINGS_WP,
0,//GPIO_SETTINGS_BUTTON,
0,//GPIO_SETTINGS_LED,
0,//GPIO_SETTINGS_BATTERY,
0,//GPIO_SETTINGS_BUZZER,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
}
};
// Initialize GATT database
void my_database_init(void)
{
//Initialized ROM code which will monitor the battery
blebat_Init();
}
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The battery monitoring system (using P15) is coded into the rom of our solutions. One cannot changed it to say P8 in this case.