xref: /btstack/port/stm32-l451-miromico-sx1280/README.md (revision 34fd36da1820bede7fdeb1f09f53c180688c8c25)
1*34fd36daSMatthias Ringwald# BTstack Port with Cinnamon for Semtech SX1280 Controller on Miromico FMLR-80
2d42180bbSMatthias Ringwald
3d42180bbSMatthias Ringwald*Cinnamon* is BlueKitchen's minimal, yet robust Controller/Link Layer implementation for use with BTstack.
4d42180bbSMatthias Ringwald
5d42180bbSMatthias RingwaldIn contrast to common Link Layer implementations, our focus is on a robust and compact implementation for production use,
6d42180bbSMatthias Ringwaldwhere code size matters (e.g. current code size about 8 kB).
72fd737d3SMatthias Ringwald
82fd737d3SMatthias Ringwald## Overview
92fd737d3SMatthias Ringwald
102fd737d3SMatthias RingwaldThis port targets the Semtech SX1280 radio controller. The Host Stack and the Controller (incl. Link Layer) run on a STM32 MCU, with the SX1280 connected via SPI.
112fd737d3SMatthias Ringwald
12f508b9c4SMatthias RingwaldIt uses the SX1280 C-Driver from Semtech to communicate with the SX1280. The main modification was to the SPI driver that uses DMA for full packets.
132fd737d3SMatthias Ringwald
142fd737d3SMatthias Ringwald## Status
152fd737d3SMatthias Ringwald
166b8177c5SMatthias RingwaldTested with the [Miromico FMLR-80-P-STL4E module](https://miromico.ch/portfolio/fmlr-8x-x-stlx/)
176b8177c5SMatthias Ringwaldand our [SX1280 Shield](https://github.com/bluekitchen/sx1280-shield) - see (port/stm32-l476rg-nucleo-sx1280).
186b8177c5SMatthias RingwaldOn the FMLR-80-P-STL4E module, the 52 Mhz clock for the SX1280 is controlled by the MCU.
192fd737d3SMatthias Ringwald
20f508b9c4SMatthias RingwaldSEGGER RTT is used for debug output, so a Segger J-Link programmer is required.
212fd737d3SMatthias Ringwald
222fd737d3SMatthias RingwaldUses 32.768 kHz crytstal as LSE for timing
232fd737d3SMatthias Ringwald
24f508b9c4SMatthias RingwaldSupport for Broadcast and Peripheral roles.
252fd737d3SMatthias Ringwald
262fd737d3SMatthias RingwaldThe Makefile project compiles gatt_counter, gatt_streamer_server, hog_mouse and hog_keyboard examples.
272fd737d3SMatthias Ringwald
282fd737d3SMatthias Ringwald## Limitation
292fd737d3SMatthias Ringwald
302fd737d3SMatthias Ringwald### Advertising State:
312fd737d3SMatthias Ringwald- Only Connectable Advertising supported
322fd737d3SMatthias Ringwald- Only fixed public BD_ADDR of 33:33:33:33:33:33 is used
332fd737d3SMatthias Ringwald
342fd737d3SMatthias Ringwald### Connection State:
352fd737d3SMatthias Ringwald- Encryption not implemented
362fd737d3SMatthias Ringwald- Some LL PDUs not supported
372fd737d3SMatthias Ringwald
382fd737d3SMatthias Ringwald### Central Role:
392fd737d3SMatthias Ringwald- Not implemented
402fd737d3SMatthias Ringwald
412fd737d3SMatthias Ringwald### Observer Role:
422fd737d3SMatthias Ringwald- Not implemented
432fd737d3SMatthias Ringwald
442fd737d3SMatthias Ringwald### Low power mode - basically not implemented:
452fd737d3SMatthias Ringwald- MCU does not sleep
462fd737d3SMatthias Ringwald- SPI could be disabled during sleep
47f508b9c4SMatthias Ringwald- 1 ms SysTick is used for host stack although 16-bit tick time is provided by LPTIM1 based on 32768 Hz LSE.
482fd737d3SMatthias Ringwald
492fd737d3SMatthias Ringwald## Getting Started
502fd737d3SMatthias Ringwald
512fd737d3SMatthias RingwaldFor the FMLR-80-P-STL4E module, just run make. You can upload the EXAMPLE.elf file created in build folder,
522fd737d3SMatthias Ringwalde.g. with Ozone using the provided EXAMPLE.jdebug, and run it.
532fd737d3SMatthias Ringwald
542fd737d3SMatthias Ringwald## TODO
552fd737d3SMatthias Ringwald
562fd737d3SMatthias Ringwald### General
572fd737d3SMatthias Ringwald- indicate random address in advertising pdus
58f508b9c4SMatthias Ringwald- allow to set random BD_ADDR via HCI command and use in Advertisements
59f508b9c4SMatthias Ringwald- support other regular adv types
602fd737d3SMatthias Ringwald- handle Encryption
612fd737d3SMatthias Ringwald
622fd737d3SMatthias Ringwald## Low Power
632fd737d3SMatthias Ringwald- enter STANDY_RC mode when idle
642fd737d3SMatthias Ringwald- implement MCU sleep (if next wakeup isn't immediate)
652fd737d3SMatthias Ringwald- sleep after connection request until first packet from Central
662fd737d3SMatthias Ringwald- replace SysTick with tick counter based on LPTIM1
672fd737d3SMatthias Ringwald- disable SPI on MCU sleep
682fd737d3SMatthias Ringwald
69