Ambiq® is an Austin-based SoC vendor who at the forefront of enabling ambient intelligence on billions of devices with the unique SPOT platform and extreme-low power semiconductor solutions.
Whether it's the Real Time Clock (RTC) IC, or a System-on-a-Chip (SoC), Ambiq® is committed to enabling the lowest power consumption with the highest computing performance possible for our customers to make the most innovative battery-power endpoint devices for their end-users. Ambiq Products
As of now, Ambiq provides zephyr support for a set of peripherals/drivers:
| Driver | Apollo510 | Stable codes at | Sample | Board |
|---|---|---|---|---|
| ADC | apollo510-dev | samples\drivers\adc\adc_dt | All | |
| AUDADC | apollo510-dev | samples\drivers\audio\amic | All | |
| COUNTER | apollo510-dev | samples\drivers\counter\alarm | All | |
| CRYPTO | coming soon | |||
| DISPLAY | apollo510-dev | samples\drivers\display | ap510_disp | |
| FLASH | apollo510-dev | samples\subsys\mgmt\mcumgr\smp_svr | All | |
| HWINFO | apollo510-dev | tests\drivers\hwinfo\api | All | |
| I2C | apollo510-dev | samples\drivers\eeprom | apollo510_eb only | |
| I2S | apollo510-dev | samples\drivers\i2s\dmic_i2s | All | |
| INPUT | apollo510-dev | samples\subsys\input\draw_touch_events | ap510_disp | |
| JDI | apollo510-dev | samples\drivers\display | ap510_jdi_disp | |
| MIPI_DBI | apollo510-dev | samples\drivers\display | display_8080_card | |
| MIPI_DSI | apollo510-dev | samples\drivers\display | ap510_disp | |
| MSPI | apollo510-dev | samples\drivers\mspi\mspi_flash | All | |
| PDM | apollo510-dev | samples\drivers\audio\dmic | All | |
| PM | apollo510-dev | tests\subsys\pm\power_wakeup_timer | All | |
| PWM | apollo510-dev | samples\drivers\led\pwm | apollo510_evb only | |
| RTC | apollo510-dev | samples\drivers\rtc | All | |
| SDHC | apollo510-dev | tests\subsys\sd\mmc | All | |
| SPI | apollo510-dev | samples\boards\ambiq\spi_serial_flash | apollo510_eb only | |
| TIMER | apollo510-dev | samples\philosophers | All | |
| TRNG | apollo510-dev | tests\drivers\entropy\api | All | |
| UART | apollo510-dev | samples\drivers\uart\echo_bot | All | |
| USB | apollo510-dev | samples\drivers\subsys\usb\mass | All | |
| WDT | apollo510-dev | samples\subsys\task_wdt | All |
And also there are supports for some third-party libs:
| Lib | Apollo510 | Stable codes at | Sample | Board |
|---|---|---|---|---|
| coremark | apollo510-dev | samples\benchmarks\coremark | All | |
| fatfs | apollo510-dev | samples\subsys\fs\fs_sample | All | |
| mbedtls | software only | apollo510-dev | tests\crypto\mbedtls | All |
| lvgl | apollo510-dev | samples\modules\lvgl\demos | ap510_disp |
Together with generic support for ARM Cortex-M peripherals like cache, interrupt controller, etc.
Welcome to Ambiq Zephyr! See the Introduction to Zephyr for a high-level overview, and the documentation's Getting Started Guide to start developing.
Check Ambiq SoC for Ambiq Apollo SoCs documents.
Follow Getting Started Guide to install denpendencies and use west tool to get the Zephyr source code to local. Install Zephyr SDK and check whether the environment variables are set properly.
Execute git remote -v to check if upstream has been configured.
If not, execute git remote add upstream https://github.com/AmbiqMicro/ambiqzephyr to configure the ambiqzephyr base to your upstream repository.
Execute git remote -v again to check if it configures successfully.
Execute git fetch upstream to fetch the upstream repository.
Execute git checkout apollo510-dev to get the latest apollo510 development branch.
zephyr/
│
├── boards/
│ ├── ambiq/
│ │ ├── apollo510_evb
│ │ └── apollo510_eb
│ └── shields/
│ ├── ap510_disp
│ ├── ap510_jdi_disp
│ └── apollo5_eb_display_8080_card
├── drivers/
│ ├── adc/
│ │ └── adc_ambiq.c
│ ├── audio/
│ │ ├── amic_ambiq_audadc.c
│ │ └── dmic_ambiq_pdm.c
│ ├── bluetooth/
│ │ └── hci/
│ │ ├── apollox_blue.c
│ │ └── hci_ambiq.c
│ ├── clock_control/
│ │ └── clock_control_ambiq.c
│ ├── counter/
│ │ └── counter_ambiq_timer.c
│ ├── display/
│ │ ├── display_co5300.c
│ │ └── display_ls014b7dd01.c
│ ├── entropy/
│ │ └── entropy_ambiq_puf_trng.c
│ ├── flash/
│ │ └── flash_ambiq.c
│ ├── gpio/
│ │ └── gpio_ambiq.c
│ ├── hwinfo/
│ │ └── hwinfo_ambiq.c
│ ├── i2c/
│ │ └── i2c_ambiq.c
│ ├── i2s/
│ │ └── i2s_ambiq.c
│ ├── jdi/
│ │ └── jdi_ambiq.c
│ ├── mipi_dbi/
│ │ └── mipi_dbi_ambiq.c
│ ├── mipi_dsi/
│ │ └── dsi_ambiq.c
│ ├── mspi/
│ │ ├── mspi_ambiq_ap5.c
│ │ └── mspi_ambiq_timing_scan.c
│ ├── pinctrl/
│ │ └── pinctrl_ambiq.c
│ ├── pwm/
│ │ └── pwm_ambiq_timer.c
│ ├── rtc/
│ │ └── rtc_ambiq.c
│ ├── sdhc/
│ │ └── sdhc_ambiq.c
│ ├── serial/
│ │ └── uart_ambiq.c
│ ├── spi/
│ │ ├── spi_ambiq_spic.c
│ │ └── spi_ambiq_spid.c
│ ├── timer/
│ │ └── ambiq_stimer.c
│ ├── usb/
│ │ └── udc/
│ │ └── udc_ambiq.c
│ └── watchdog/
│ └── wdt_ambiq.c
├── dts/
│ └── arm/
│ └── ambiq/
│ └── ambiq_apollo510.dtsi
├── modules/
│ └── hal_ambiq
└── soc/
└── ambiq/
└── apollo5x
Make sure you have already installed proper version of JLINK which supports corresponding ambiq SoC, and added the path of JLINK.exe (e.g. C:Program FilesSEGGERJLink) to the environment variables.
Go the Zephyr root path, execute west build -b <your-board-name> <samples> -p always to build the samples for your board.
For example, build zephyr/samples/hello_world for apollo510_evb: west build -b apollo510_evb ./samples/hello_world -p always.
Execute west flash to flash the binary to the EVB if the zephyr.bin has been generated by west build.
In default we use UART COM for console, and the default baudrate is 115200, so after west flash, open the serial terminal and set proper baudrate for the UART COM of plugged EVB.
You should be able to see the logs in the serial terminal.
*** Booting Zephyr OS build v4.1.0-7246-gad4c3e3e9afe ***
Hello World! apollo510_evb/apollo510
For those samples that require additional hardware, such as the ap510_disp shield, you need to set the shield option when building. For example:
west build -b apollo510_evb --shield ap510_disp ./samples/drivers/display -p always
For Bluetooth samples, you need to program the BLE Controller firmware via JLINK once before running samples. The programming script and binary locate in ambiq SDK ambiqsuite. Please get the SDK from Ambiq Content Portal.
For MSPI samples, please refer to How_to_Run_Zephyr_MSPI_Samples_and_Tests.rst
For USB samples, please refer to How_to_Run_Zephyr_USB_Samples.rst
For MCU_Boot samples, please refer to How_to_Run_MCUBoot_Samples_and_Tests.rst
To achieve lowest power consumption, customer needs to follow the following process for inspection and configuration optimization:
- According to the actual usage of memory, adjust the memory configurations (e.g., SRAM, DTCM, NVM) in soc_early_init_hook;
- Make sure
CONFIG_PM=y,CONFIG_PM_DEVICE=y. - There are 2 ways for drivers PM to operate: the first one is to keep
CONFIG_PM_DEVICE_RUNTIME=yandCONFIG_PM_DEVICE_RUNTIME_DEFAULT_ENABLE=y, so the drivers that have runtime PM ability should be power-managed automatically; and the other one is to keepCONFIG_PM_DEVICE_SYSTEM_MANAGED=yand drivers will be suspended automatically before deep sleep. Note: These two methods can coexist. Devices with runtime PM enabled will be managed by runtime PM, while other devices will be managed by system-managed PM if enabled. - If choose the first way (runtime PM) in step 3, in application code, call pm_device_runtime_put() / pm_device_runtime_get() around peripherals that should power-cycle on demand to ensure their usage count returns to zero after use.
- In order to run CI without print log error, we keep the console UART always on by default. Users need to set
CONFIG_PM_DEVICE_RUNTIME_DISABLE_CONSOLE=nin their own project to resume PM control on it. - Configure CPU performance mode to low power mode when high performance is not required. This can be done via devicetree (set
ambiq,perf-mode = <AMBIQ_POWER_MODE_LOW_POWER>) or by callingapollo5x_set_performance_mode(AMBIQ_POWER_MODE_LOW_POWER)in application code. - Disable unused peripheral power domains in soc_early_init_hook (e.g., DEBUG, CRYPTO, OTP) if they are not needed in your application.
- Disable unused peripherals in devicetree by setting
status = "disabled"for nodes that are not used in your application. - Reduce log level in production builds by setting appropriate
CONFIG_LOG_*options to minimize logging overhead and power consumption.
Check Zephyr Power Management for more detailed information.
Community support is provided via mailing lists and Discord; see the Resources below for details.
Here's a quick summary of resources to help you find your way around:
💬 Discord Server for real-time community discussions
⚠️ Report security vulnerabilities at vulnerabilities@zephyrproject.org