How infineon/mtb-example-psoc-edge-btstack-gatt-caching-client works
This is a three-core PSOC Edge Bluetooth LE GATT caching client example. Its user-facing workflow is to connect to a GATT server, validate cached database state, discover or rediscover services when needed, and read service characteristics; button actions also reset cached and bonding state. The non-secure CM33 contains the client application, persistence, and board interaction, while secure CM33 and CM55 provide the documented boot chain. The excerpts establish key module responsibilities, but do not show all callback wiring, so uncertain internal connections are omitted.
Main entry points: main.c Non-secure app · app_bt_gatt_handler.c GATT caching client · app_bt_event_handler.c BT event handling · app_bt_bonding.c Bonding and peer state
Components 13
Boot and cores
- Extended Boot
configs/boot_with_extended_boot.json - Secure CM33
proj_cm33_s/main.c - Non-secure app
proj_cm33_ns/source/main.c - CM55 app
proj_cm55/main.c
Bluetooth client
- BT event handling
proj_cm33_ns/source/app_bt/app_bt_event_handler.c - GATT caching client
proj_cm33_ns/source/app_bt/app_bt_gatt_handler.c - Bluetooth utilities
proj_cm33_ns/source/app_bt/app_bt_utils.c
Bonding and cache
- Bonding and peer state
proj_cm33_ns/source/app_bt/app_bt_bonding.c - Persistent KV store
proj_cm33_ns/source/app_bt/app_bt_bonding.c
Device interface
- Buttons and LEDs
proj_cm33_ns/source/app_hw/app_hw_device.c - Debug UART
proj_cm33_ns/source/app_retarget_io/retarget_io_init.c
Other components
- GATT server
- User
Connections 12
- Extended Boot → Secure CM33: launches
README.md - Secure CM33 → Non-secure app: launches
README.md - Non-secure app → CM55 app: enables and launches
README.md - GATT server → BT event handling: sends BLE events
README.md - User → Buttons and LEDs: presses buttons
README.md - Buttons and LEDs → GATT caching client: requests characteristic read
proj_cm33_ns/source/app_hw/app_hw_device.c - BT event handling → Bonding and peer state: restores peer state
proj_cm33_ns/source/app_bt/app_bt_event_handler.c - Bonding and peer state → Persistent KV store: reads and writes
proj_cm33_ns/source/app_bt/app_bt_bonding.c - GATT caching client → GATT server: discovers and reads
README.md - GATT caching client → BT event handling: handles database changes
- User → Bonding and peer state: resets stored state
README.md - Non-secure app → Debug UART: initializes
proj_cm33_ns/source/main.c