Name Date Size #Lines LOC

..--

example-template/H25-Apr-2025-716389

README.mdH A D25-Apr-20252 KiB5229

btstack_config.hH A D25-Apr-2025782 3318

btstack_port.cH A D25-Apr-202513.4 KiB538286

create_examples.pyH A D25-Apr-20252.9 KiB8952

README.md

1# BTstack Port for Ambiq Apollo2 with EM9304
2
3This port uses the Ambiq Apollo2 EVB and the Ambiq EM9304 (AM BLE) shield.
4HAL and BSP from Ambiq Suite 1.2.11 were used together with the regular ARM GCC toolchain.
5Firmware upload is possible via the internal J-Link interface or the 10-pin Mini ARM-JTAG Interface.
6
7## Hardware
8
9Ambiq Apollo2 EVB + AM_BLE Shield
10- http://ambiqmicro.com/apollo-ultra-low-power-mcus/apollo2-mcu/
11
12## Software
13
14AmbiqSuite:
15- http://ambiqmicro.com/apollo-ultra-low-power-mcus/apollo2-mcu/
16
17Please clone BTstack as AmbiqSuite/third-party/bstack folder into the AmbiqSuite.
18
19## Create Example Projects
20
21To create example GCC projects, go to the Apollo2-EM9304 folder
22
23	$ cd port/apollo2-em9304
24
25and run make
26
27	$ ./create_examples.py
28
29All examples are placed in the boards/apollo2_evb_am_ble/examples folder with btstack_ prefix.
30
31
32## Compile & Run Example Project
33
34Go to to the gcc folder of one of the example folders and run make
35
36    $ make
37
38To upload, please follow the instructions in the Apollo Getting Started documents.
39
40## Debug output
41
42printf is routed over the USB connector of the EVB at 115200.
43
44In port/apollo2-em9304/btstack_config.h additional debug information can be enabled by uncommenting ENABLE_LOG_INFO.
45
46Also, the full packet log can be enabled in src/btstack_port.c by uncommenting the hci_dump_init(..) line. The console output can then be converted into .pklg files for OS X PacketLogger or WireShark by running tool/create_packet_log.py
47
48## TODO
49- BTstack's TLV persisten storage via Flash memory is not implemented yet.
50- SPI Fullduplex: Newer Apollo 2 revisions supports SPI Full Duplex. The Ambiq Suite 1.2.11 does not cover Full Duplex with IRQ callback. It could be emulated by setting the Full Duplex mode and doing a regular write operation. When the write is complete, the received data can be read from the IOM FIFO.
51- During MCU sleep without an ongoing SPI operation, the SPI could be fully disabled, which would reduce enrgey consumption.
52