xref: /btstack/port/apollo2-em9304/README.md (revision 34fd36da1820bede7fdeb1f09f53c180688c8c25)
1*34fd36daSMatthias Ringwald# BTstack Port for Ambiq Apollo2 with EM9304
2e6c96737SMatthias Ringwald
38213ff16SMatthias RingwaldThis port uses the Ambiq Apollo2 EVB and the Ambiq EM9304 (AM BLE) shield.
48213ff16SMatthias RingwaldHAL and BSP from Ambiq Suite 1.2.11 were used together with the regular ARM GCC toolchain.
58213ff16SMatthias RingwaldFirmware upload is possible via the internal J-Link interface or the 10-pin Mini ARM-JTAG Interface.
6e6c96737SMatthias Ringwald
7e6c96737SMatthias Ringwald## Hardware
8e6c96737SMatthias Ringwald
9e6c96737SMatthias RingwaldAmbiq Apollo2 EVB + AM_BLE Shield
10e6c96737SMatthias Ringwald- http://ambiqmicro.com/apollo-ultra-low-power-mcus/apollo2-mcu/
11e6c96737SMatthias Ringwald
12e6c96737SMatthias Ringwald## Software
13e6c96737SMatthias Ringwald
14e6c96737SMatthias RingwaldAmbiqSuite:
15e6c96737SMatthias Ringwald- http://ambiqmicro.com/apollo-ultra-low-power-mcus/apollo2-mcu/
16e6c96737SMatthias Ringwald
17e6c96737SMatthias RingwaldPlease clone BTstack as AmbiqSuite/third-party/bstack folder into the AmbiqSuite.
18e6c96737SMatthias Ringwald
19e6c96737SMatthias Ringwald## Create Example Projects
20e6c96737SMatthias Ringwald
21e6c96737SMatthias RingwaldTo create example GCC projects, go to the Apollo2-EM9304 folder
22e6c96737SMatthias Ringwald
23e6c96737SMatthias Ringwald	$ cd port/apollo2-em9304
24e6c96737SMatthias Ringwald
25e6c96737SMatthias Ringwaldand run make
26e6c96737SMatthias Ringwald
27e6c96737SMatthias Ringwald	$ ./create_examples.py
28e6c96737SMatthias Ringwald
29e6c96737SMatthias RingwaldAll examples are placed in the boards/apollo2_evb_am_ble/examples folder with btstack_ prefix.
30e6c96737SMatthias Ringwald
31e6c96737SMatthias Ringwald
32e6c96737SMatthias Ringwald## Compile & Run Example Project
33e6c96737SMatthias Ringwald
34e6c96737SMatthias RingwaldGo to to the gcc folder of one of the example folders and run make
35e6c96737SMatthias Ringwald
3670c4866aSMatthias Ringwald    $ make
37e6c96737SMatthias Ringwald
38e6c96737SMatthias RingwaldTo upload, please follow the instructions in the Apollo Getting Started documents.
39e6c96737SMatthias Ringwald
40e6c96737SMatthias Ringwald## Debug output
41e6c96737SMatthias Ringwald
42e6c96737SMatthias Ringwaldprintf is routed over the USB connector of the EVB at 115200.
43e6c96737SMatthias Ringwald
44e6c96737SMatthias RingwaldIn port/apollo2-em9304/btstack_config.h additional debug information can be enabled by uncommenting ENABLE_LOG_INFO.
45e6c96737SMatthias Ringwald
46287aaa02SMatthias RingwaldAlso, 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
478213ff16SMatthias Ringwald
48*34fd36daSMatthias Ringwald## TODO
498213ff16SMatthias Ringwald- BTstack's TLV persisten storage via Flash memory is not implemented yet.
508213ff16SMatthias Ringwald- 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.
518213ff16SMatthias Ringwald- During MCU sleep without an ongoing SPI operation, the SPI could be fully disabled, which would reduce enrgey consumption.
52