ShiboSoftwareDev/am69-cm5
A 55×40 mm 10-layer CM5 carrier board integrating an AM69A98 SoC, 8‑GiB LPDDR4, 32‑GB eMMC, CM5 connectors, clocking, extensive decoupling/EMI filtering, and HDI DDR/ground escape routing.
- Version
- 0.0.7-engineering-draft-20261107-manual-ddr0
- License
- unset
- Stars
- 0
Use with the tscircuit CLI
tsci is the tscircuit CLI. Install it with npm install -g tscircuit.
tsci clone ShiboSoftwareDev/am69-cm5 # download the package files into ./am69-cm5
tsci add ShiboSoftwareDev/am69-cm5 # add it to your project as @tsci/ShiboSoftwareDev.am69-cm5In a cloned or new (tsci init) project: tsci dev starts a local preview, tsci build outputs Circuit JSON, and tsci push publishes to tscircuit.com.
firmware/boot-controller/policy.h
#ifndef AM69_EC_POLICY_H
#define AM69_EC_POLICY_H
#include <stdbool.h>
#include <stdint.h>
typedef enum { EC_OFF, EC_STRAPS, EC_STARTING, EC_ON, EC_DISCHARGE, EC_FAULT } EcState;
typedef enum { BOOT_EMMC, BOOT_USB, BOOT_SD } EcBoot;
typedef struct {
bool carrier_enable, button_pressed, force_usb, sd_present, host_off;
bool aon_ok, por_high;
} EcInputs;
typedef struct {
EcState state;
EcBoot boot;
bool pi_board, run, runtime_bus, straps, key_irq, start_pending, reboot_pending;
bool last_carrier, last_button, por_seen;
uint8_t retries, fan_percent;
uint32_t since, por_since, button_since, fan_command_at, off_at;
bool fan_command_valid;
} EcPolicy;
void ec_init(EcPolicy *ec, bool pi_board, uint32_t now);
void ec_step(EcPolicy *ec, const EcInputs *in, uint32_t now);
bool ec_fan_command(EcPolicy *ec, unsigned duty, uint32_t now);
bool ec_off_command(EcPolicy *ec, bool reboot, uint32_t now);
uint16_t ec_mcu_boot_word(EcBoot boot);
uint8_t ec_main_boot_word(EcBoot boot);
#endif