aem10900

Crates.ioaem10900
lib.rsaem10900
version
sourcesrc
created_at2024-11-22 10:40:56.011588
updated_at2024-11-26 05:55:55.077758
descriptionDriver crate for the AEM10900 Energy Harvester
homepage
repositoryhttps://github.com/trembel/aem10900
max_upload_size
id1457263
Cargo.toml error:TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
(trembel)

documentation

README


author: Silvano Cortesi date: 18.11.2024 title: AEM10900 Driver

#+LICENSE: LGPL-3.0

This repository contains driver for the AEM10900 energy harvester.

The AEM10900 is a fully integrated and compact battery charger circuit that extracts DC power from a solar cell to store energy in a rechargeable battery. This compact and ultra- efficient battery charger allows to extend battery lifetime and eliminates the primary energy storage in a large range of wireless application, such as wearable and medical applications and Smart sensors. Thanks to its Maximum Power Point Tracking and its ultra-low power boost converter, the AEM10900 harvests the maximum available input power from a source to charge a storage element, such as a Li-ion battery. The boost converter operates with input voltages in a range from 115 mV to 1.5 V. With its unique cold-start circuit, it can start operating with an input voltage as low as 250 mV and an input power of only 5 μW. The output voltages are in a range of 2.8 V to 4.8 V. -- e-peas

The repository is build on top of the datasheet DS-AEM10900-v1.5 and contains:

The YAML specification of the driver, as used by Reginald to create the struct fields

YAML Transpile Instruction

The yaml file can be automatically parsed using Reginald, based on branch schilkp/rust, commit dc4ff0d.

  1. Rust version

    The rust version is built (from within rustsrc) using:

    reginald gen -i ../../aem10900.yaml -o registers.rs rs-structs --enum-derive "Debug" --struct-derive "Debug" --enum-derive "PartialEq" --struct-derive "PartialEq"
    
  2. C version

    The C version is built (from within c/) using:

    reginald gen -i ../aem10900.yaml -o aem10900_reg.h c-funcpack
    
  3. Markdown Datasheet

    The markdown datasheet is build (from within /) by using:

    reginald gen -i ./aem10900.yaml -o aem10900.md md-datasheet
    

Rust driver

The rust driver consists of lib.rs, device.rs, config.rs, error.rs and registers.rs. registers.rs is the only auto-created file using reginald, and contains the register structs as well as pack/unpack functions.

C driver

The C driver consists of aem10900.c, aem10900.h and aem10900reg.h. aem10900_reg.h is the only auto-created file using reginald, and contains the register structs as well as pack/unpack functions.

Example projects for C and Rust

The example projects make automatically use of the drivers described above, and can be used as a reference for the implementation. The following pinout holds:

Peripheral Functionality


I2C1 I2C peripheral used for communication PB8 SCL pin used together with I2C1 PB7 SDA pin used together with I2C1 GPDMA1CH0 DMA channel for TX on I2C1 GPDMA1CH1 DMA channel for RX on I2C1

Commit count: 6

cargo fmt