Skip to content

A battery management library for the XIAO BLE and XIAO BLE Sense board using Zephyr.

License

Notifications You must be signed in to change notification settings

helicocrasher/xiao_sense_nrf52840_battery_lib

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

XIAO BLE Sense (nRF52840) Battery Management Library


GitHub Repo stars Hits

Overview

This library is designed to manage the battery charging functionality of the XIAO BLE and XIAO BLE Sense board. It supports the following features for a 3.7V LiPo battery:

  • Reading battery voltage.
  • Setting charging modes (fast or slow).
  • Enabling or disabling charging.
  • Calculating battery capacity in percentage.

The library is built on the Zephyr Real-Time Operating System (RTOS). For comprehensive details on Zephyr and how to get started, visit the Zephyr Getting Started Guide.

Programming and Debugging

Adafruit nRF52 Bootloader

The XIAO BLE Sense is equipped with the Adafruit nRF52 Bootloader 5, facilitating the UF2 flashing process.

UF2 Flashing Process

  1. Entering Bootloader Mode: Connect the XIAO BLE Sense to your computer via USB. Then, double-tap the reset button located to the left of the USB connector. This action will enable the bootloader mode, and the device will appear as a mass storage device named 'XIAO BLE' on your computer.

  2. Flashing the Firmware:

    • Navigate to the 'build/zephyr/' directory and locate the 'zephyr.uf2' file. If you can not find the build folder, build or rebuild the zephyr project.
    • Copy the zephyr.uf2 file to the root directory of the XIAO BLE mass storage device using either the command line or your file manager.
  3. Automatic Reset and Application Launch: After the UF2 file transfer is complete, the XIAO BLE Sense will automatically reset and launch the new application.

For additional information on the flashing process and the XIAO BLE Sense board, refer to the Zephyr Board Documentation for XIAO BLE.

About

A battery management library for the XIAO BLE and XIAO BLE Sense board using Zephyr.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 98.3%
  • CMake 1.7%