From 6a09bb9025bd9e37c4ca71d9f5f1adbe8b3c3b01 Mon Sep 17 00:00:00 2001 From: Sarthak Shaha Date: Thu, 23 Jan 2025 15:28:01 -0500 Subject: [PATCH] added support for brd4350a --- .../mgm26/BRD4350A/autogen/RTE_Components.h | 34 ++ matter/efr32/mgm26/BRD4350A/autogen/gatt_db.c | 149 +++++++ matter/efr32/mgm26/BRD4350A/autogen/gatt_db.h | 29 ++ .../mgm26/BRD4350A/autogen/sl_bluetooth.c | 99 +++++ .../mgm26/BRD4350A/autogen/sl_bluetooth.h | 72 ++++ .../BRD4350A/autogen/sl_board_default_init.c | 36 ++ .../BRD4350A/autogen/sl_component_catalog.h | 72 ++++ .../mgm26/BRD4350A/autogen/sl_event_handler.c | 138 ++++++ .../mgm26/BRD4350A/autogen/sl_event_handler.h | 12 + .../mgm26/BRD4350A/autogen/sl_i2cspm_init.c | 64 +++ .../BRD4350A/autogen/sl_i2cspm_instances.h | 52 +++ .../BRD4350A/autogen/sl_iostream_handles.c | 63 +++ .../BRD4350A/autogen/sl_iostream_handles.h | 24 ++ .../autogen/sl_iostream_init_instances.h | 16 + .../mgm26/BRD4350A/autogen/sl_ot_custom_cli.c | 64 +++ .../efr32/mgm26/BRD4350A/autogen/sl_ot_init.c | 45 ++ .../efr32/mgm26/BRD4350A/autogen/sl_ot_init.h | 41 ++ .../autogen/sl_simple_button_instances.c | 86 ++++ .../autogen/sl_simple_button_instances.h | 47 ++ .../autogen/sl_simple_led_instances.c | 75 ++++ .../autogen/sl_simple_led_instances.h | 52 +++ .../mgm26/BRD4350A/autogen/sl_uartdrv_init.c | 74 ++++ .../BRD4350A/autogen/sl_uartdrv_instances.h | 36 ++ .../autogen/sli_mbedtls_config_autogen.h | 90 ++++ .../sli_mbedtls_config_transform_autogen.h | 72 ++++ .../autogen/sli_psa_builtin_config_autogen.h | 31 ++ .../BRD4350A/autogen/sli_psa_config_autogen.h | 39 ++ .../config/btconf/gatt_configuration.btconf | 99 +++++ .../config/buffer_pool_allocator_config.h | 29 ++ .../BRD4350A/config/circular_queue_config.h | 23 + .../mgm26/BRD4350A/config/dmadrv_config.h | 26 ++ .../BRD4350A/config/emlib_core_debug_config.h | 45 ++ .../BRD4350A/config/nvm3_default_config.h | 45 ++ .../mgm26/BRD4350A/config/psa_crypto_config.h | 170 ++++++++ .../config/sl_802154_radio_priority_config.h | 57 +++ .../config/sl_bluetooth_advertiser_config.h | 45 ++ .../BRD4350A/config/sl_bluetooth_config.h | 175 ++++++++ .../config/sl_bluetooth_connection_config.h | 48 +++ .../BRD4350A/config/sl_board_control_config.h | 72 ++++ .../config/sl_bt_host_adaptation_config.h | 52 +++ .../mgm26/BRD4350A/config/sl_bt_rtos_config.h | 44 ++ .../BRD4350A/config/sl_bt_rtos_config_s2.h | 84 ++++ .../sl_clock_manager_oscillator_config.h | 362 ++++++++++++++++ .../config/sl_clock_manager_tree_config.h | 319 ++++++++++++++ .../mgm26/BRD4350A/config/sl_core_config.h | 44 ++ .../config/sl_device_init_dcdc_config.h | 58 +++ .../BRD4350A/config/sl_fem_util_config.h | 78 ++++ .../BRD4350A/config/sl_gp_interface_config.h | 44 ++ .../BRD4350A/config/sl_hfxo_manager_config.h | 56 +++ .../BRD4350A/config/sl_i2cspm_sensor_config.h | 71 +++ .../config/sl_interrupt_manager_s2_config.h | 47 ++ .../mgm26/BRD4350A/config/sl_mbedtls_config.h | 118 +++++ .../config/sl_mbedtls_device_config.h | 72 ++++ .../BRD4350A/config/sl_memlcd_usart_config.h | 66 +++ .../mgm26/BRD4350A/config/sl_memory_config.h | 11 + .../config/sl_memory_manager_config.h | 49 +++ .../config/sl_memory_manager_region_config.h | 49 +++ .../config/sl_openthread_features_config.h | 405 ++++++++++++++++++ .../config/sl_openthread_radio_config.h | 45 ++ .../config/sl_openthread_rtos_config.h | 100 +++++ .../BRD4350A/config/sl_power_manager_config.h | 78 ++++ .../BRD4350A/config/sl_rail_util_pa_config.h | 81 ++++ .../sl_rail_util_power_manager_init_config.h | 44 ++ .../BRD4350A/config/sl_rail_util_pti_config.h | 73 ++++ .../config/sl_rail_util_rssi_config.h | 44 ++ .../config/sl_rail_util_sequencer_config.h | 48 +++ .../config/sl_simple_button_btn0_config.h | 58 +++ .../config/sl_simple_button_btn1_config.h | 58 +++ .../BRD4350A/config/sl_simple_button_config.h | 72 ++++ .../config/sl_simple_led_led0_config.h | 57 +++ .../config/sl_simple_led_led1_config.h | 57 +++ .../BRD4350A/config/sl_sleeptimer_config.h | 82 ++++ .../config/sl_uartdrv_eusart_vcom_config.h | 119 +++++ .../mgm26/BRD4350A/config/uartdrv_config.h | 114 +++++ scripts/generate_boards.py | 4 + 75 files changed, 5609 insertions(+) create mode 100644 matter/efr32/mgm26/BRD4350A/autogen/RTE_Components.h create mode 100644 matter/efr32/mgm26/BRD4350A/autogen/gatt_db.c create mode 100644 matter/efr32/mgm26/BRD4350A/autogen/gatt_db.h create mode 100644 matter/efr32/mgm26/BRD4350A/autogen/sl_bluetooth.c create mode 100644 matter/efr32/mgm26/BRD4350A/autogen/sl_bluetooth.h create mode 100644 matter/efr32/mgm26/BRD4350A/autogen/sl_board_default_init.c create mode 100644 matter/efr32/mgm26/BRD4350A/autogen/sl_component_catalog.h create mode 100644 matter/efr32/mgm26/BRD4350A/autogen/sl_event_handler.c create mode 100644 matter/efr32/mgm26/BRD4350A/autogen/sl_event_handler.h create mode 100644 matter/efr32/mgm26/BRD4350A/autogen/sl_i2cspm_init.c create mode 100644 matter/efr32/mgm26/BRD4350A/autogen/sl_i2cspm_instances.h create mode 100644 matter/efr32/mgm26/BRD4350A/autogen/sl_iostream_handles.c create mode 100644 matter/efr32/mgm26/BRD4350A/autogen/sl_iostream_handles.h create mode 100644 matter/efr32/mgm26/BRD4350A/autogen/sl_iostream_init_instances.h create mode 100644 matter/efr32/mgm26/BRD4350A/autogen/sl_ot_custom_cli.c create mode 100644 matter/efr32/mgm26/BRD4350A/autogen/sl_ot_init.c create mode 100644 matter/efr32/mgm26/BRD4350A/autogen/sl_ot_init.h create mode 100644 matter/efr32/mgm26/BRD4350A/autogen/sl_simple_button_instances.c create mode 100644 matter/efr32/mgm26/BRD4350A/autogen/sl_simple_button_instances.h create mode 100644 matter/efr32/mgm26/BRD4350A/autogen/sl_simple_led_instances.c create mode 100644 matter/efr32/mgm26/BRD4350A/autogen/sl_simple_led_instances.h create mode 100644 matter/efr32/mgm26/BRD4350A/autogen/sl_uartdrv_init.c create mode 100644 matter/efr32/mgm26/BRD4350A/autogen/sl_uartdrv_instances.h create mode 100644 matter/efr32/mgm26/BRD4350A/autogen/sli_mbedtls_config_autogen.h create mode 100644 matter/efr32/mgm26/BRD4350A/autogen/sli_mbedtls_config_transform_autogen.h create mode 100644 matter/efr32/mgm26/BRD4350A/autogen/sli_psa_builtin_config_autogen.h create mode 100644 matter/efr32/mgm26/BRD4350A/autogen/sli_psa_config_autogen.h create mode 100644 matter/efr32/mgm26/BRD4350A/config/btconf/gatt_configuration.btconf create mode 100644 matter/efr32/mgm26/BRD4350A/config/buffer_pool_allocator_config.h create mode 100644 matter/efr32/mgm26/BRD4350A/config/circular_queue_config.h create mode 100644 matter/efr32/mgm26/BRD4350A/config/dmadrv_config.h create mode 100644 matter/efr32/mgm26/BRD4350A/config/emlib_core_debug_config.h create mode 100644 matter/efr32/mgm26/BRD4350A/config/nvm3_default_config.h create mode 100644 matter/efr32/mgm26/BRD4350A/config/psa_crypto_config.h create mode 100644 matter/efr32/mgm26/BRD4350A/config/sl_802154_radio_priority_config.h create mode 100644 matter/efr32/mgm26/BRD4350A/config/sl_bluetooth_advertiser_config.h create mode 100644 matter/efr32/mgm26/BRD4350A/config/sl_bluetooth_config.h create mode 100644 matter/efr32/mgm26/BRD4350A/config/sl_bluetooth_connection_config.h create mode 100644 matter/efr32/mgm26/BRD4350A/config/sl_board_control_config.h create mode 100644 matter/efr32/mgm26/BRD4350A/config/sl_bt_host_adaptation_config.h create mode 100644 matter/efr32/mgm26/BRD4350A/config/sl_bt_rtos_config.h create mode 100644 matter/efr32/mgm26/BRD4350A/config/sl_bt_rtos_config_s2.h create mode 100644 matter/efr32/mgm26/BRD4350A/config/sl_clock_manager_oscillator_config.h create mode 100644 matter/efr32/mgm26/BRD4350A/config/sl_clock_manager_tree_config.h create mode 100644 matter/efr32/mgm26/BRD4350A/config/sl_core_config.h create mode 100644 matter/efr32/mgm26/BRD4350A/config/sl_device_init_dcdc_config.h create mode 100644 matter/efr32/mgm26/BRD4350A/config/sl_fem_util_config.h create mode 100644 matter/efr32/mgm26/BRD4350A/config/sl_gp_interface_config.h create mode 100644 matter/efr32/mgm26/BRD4350A/config/sl_hfxo_manager_config.h create mode 100644 matter/efr32/mgm26/BRD4350A/config/sl_i2cspm_sensor_config.h create mode 100644 matter/efr32/mgm26/BRD4350A/config/sl_interrupt_manager_s2_config.h create mode 100644 matter/efr32/mgm26/BRD4350A/config/sl_mbedtls_config.h create mode 100644 matter/efr32/mgm26/BRD4350A/config/sl_mbedtls_device_config.h create mode 100644 matter/efr32/mgm26/BRD4350A/config/sl_memlcd_usart_config.h create mode 100644 matter/efr32/mgm26/BRD4350A/config/sl_memory_config.h create mode 100644 matter/efr32/mgm26/BRD4350A/config/sl_memory_manager_config.h create mode 100644 matter/efr32/mgm26/BRD4350A/config/sl_memory_manager_region_config.h create mode 100644 matter/efr32/mgm26/BRD4350A/config/sl_openthread_features_config.h create mode 100644 matter/efr32/mgm26/BRD4350A/config/sl_openthread_radio_config.h create mode 100644 matter/efr32/mgm26/BRD4350A/config/sl_openthread_rtos_config.h create mode 100644 matter/efr32/mgm26/BRD4350A/config/sl_power_manager_config.h create mode 100644 matter/efr32/mgm26/BRD4350A/config/sl_rail_util_pa_config.h create mode 100644 matter/efr32/mgm26/BRD4350A/config/sl_rail_util_power_manager_init_config.h create mode 100644 matter/efr32/mgm26/BRD4350A/config/sl_rail_util_pti_config.h create mode 100644 matter/efr32/mgm26/BRD4350A/config/sl_rail_util_rssi_config.h create mode 100644 matter/efr32/mgm26/BRD4350A/config/sl_rail_util_sequencer_config.h create mode 100644 matter/efr32/mgm26/BRD4350A/config/sl_simple_button_btn0_config.h create mode 100644 matter/efr32/mgm26/BRD4350A/config/sl_simple_button_btn1_config.h create mode 100644 matter/efr32/mgm26/BRD4350A/config/sl_simple_button_config.h create mode 100644 matter/efr32/mgm26/BRD4350A/config/sl_simple_led_led0_config.h create mode 100644 matter/efr32/mgm26/BRD4350A/config/sl_simple_led_led1_config.h create mode 100644 matter/efr32/mgm26/BRD4350A/config/sl_sleeptimer_config.h create mode 100644 matter/efr32/mgm26/BRD4350A/config/sl_uartdrv_eusart_vcom_config.h create mode 100644 matter/efr32/mgm26/BRD4350A/config/uartdrv_config.h diff --git a/matter/efr32/mgm26/BRD4350A/autogen/RTE_Components.h b/matter/efr32/mgm26/BRD4350A/autogen/RTE_Components.h new file mode 100644 index 0000000000..6531f566c5 --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/autogen/RTE_Components.h @@ -0,0 +1,34 @@ +// This file is autogenerated by Simplicity Configuration Tools. +// The contents of this file will be replaced in their entirety upon regeneration. +// +// Source template file: RTE_Components.h.jinja + + +#ifndef RTE_COMPONENTS_H +#define RTE_COMPONENTS_H + +/* standard device header from emlib */ +#define CMSIS_device_header "em_device.h" + +/* components are auto-generated here */ + +#define RTE_RTOS_FreeRTOS_CORE + +#define RTE_RTOS_FreeRTOS_CONFIG_RTOS2 + +#define RTE_RTOS_FreeRTOS_COROUTINE + +#define RTE_RTOS_FreeRTOS_EVENTGROUPS + +#define RTE_RTOS_FreeRTOS_TIMERS + +#define RTE_RTOS_FreeRTOS_HEAP_3 + + +#endif /* RTE_COMPONENTS_H */ + +/* This file is autogenerated by Simplicity Configuration Tools. */ +/* The contents of this file will be replaced in their entirety upon regeneration. */ +/* */ +/* Source template file: RTE_Components.h.jinja */ + diff --git a/matter/efr32/mgm26/BRD4350A/autogen/gatt_db.c b/matter/efr32/mgm26/BRD4350A/autogen/gatt_db.c new file mode 100644 index 0000000000..bac66e37bd --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/autogen/gatt_db.c @@ -0,0 +1,149 @@ +/******************************************************************** + * Autogenerated file, do not edit. + *******************************************************************/ + +#include +#include "sli_bt_gattdb_def.h" + +#define GATT_HEADER(F) F +#define GATT_DATA(F) F +GATT_DATA(const uint16_t gattdb_uuidtable_16_map[]) = +{ + 0x2800, + 0x2801, + 0x2803, + 0x2a00, + 0x2a01, + 0x2a29, + 0x2a24, + 0x2a23, + 0x2a05, + 0x2b2a, + 0x2b29, + 0x2902, +}; + +GATT_DATA(const uint8_t gattdb_uuidtable_128_map[]) = +{ + 0x11, 0x9d, 0x9f, 0x42, 0x9c, 0x4f, 0x9f, 0x95, 0x59, 0x45, 0x3d, 0x26, 0xf5, 0x2e, 0xee, 0x18, + 0x12, 0x9d, 0x9f, 0x42, 0x9c, 0x4f, 0x9f, 0x95, 0x59, 0x45, 0x3d, 0x26, 0xf5, 0x2e, 0xee, 0x18, + 0x04, 0x8f, 0x21, 0x83, 0x8a, 0x74, 0x7d, 0xb8, 0xf2, 0x45, 0x72, 0x87, 0x38, 0x02, 0x63, 0x64, +}; +GATT_DATA(sli_bt_gattdb_attribute_chrvalue_t gattdb_attribute_field_27) = { + .properties = 0x2e, + .max_len = 512, + .len = 1, + .data = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, } +}; +GATT_DATA(sli_bt_gattdb_attribute_chrvalue_t gattdb_attribute_field_24) = { + .properties = 0x2e, + .max_len = 247, + .len = 1, + .data = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, } +}; +GATT_DATA(sli_bt_gattdb_attribute_chrvalue_t gattdb_attribute_field_22) = { + .properties = 0x0a, + .max_len = 247, + .len = 1, + .data = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, } +}; +GATT_DATA(const sli_bt_gattdb_value_t gattdb_attribute_field_20) = { + .len = 2, + .data = { 0xf6, 0xff, } +}; +GATT_DATA(const sli_bt_gattdb_value_t gattdb_attribute_field_19) = { + .len = 6, + .data = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, } +}; +GATT_DATA(const sli_bt_gattdb_value_t gattdb_attribute_field_17) = { + .len = 10, + .data = { 0x42, 0x6c, 0x75, 0x65, 0x20, 0x47, 0x65, 0x63, 0x6b, 0x6f, } +}; +GATT_DATA(const sli_bt_gattdb_value_t gattdb_attribute_field_15) = { + .len = 12, + .data = { 0x53, 0x69, 0x6c, 0x69, 0x63, 0x6f, 0x6e, 0x20, 0x4c, 0x61, 0x62, 0x73, } +}; +GATT_DATA(const sli_bt_gattdb_value_t gattdb_attribute_field_13) = { + .len = 2, + .data = { 0x0a, 0x18, } +}; +GATT_DATA(const sli_bt_gattdb_value_t gattdb_attribute_field_12) = { + .len = 2, + .data = { 0x00, 0x00, } +}; +GATT_DATA(sli_bt_gattdb_attribute_chrvalue_t gattdb_attribute_field_10) = { + .properties = 0x0a, + .max_len = 13, + .data = { 0x45, 0x6d, 0x70, 0x74, 0x79, 0x20, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, }, +}; +GATT_DATA(const sli_bt_gattdb_value_t gattdb_attribute_field_8) = { + .len = 2, + .data = { 0x00, 0x18, } +}; +GATT_DATA(sli_bt_gattdb_attribute_chrvalue_t gattdb_attribute_field_7) = { + .properties = 0x0a, + .max_len = 1, + .data = { 0x00, }, +}; +GATT_DATA(sli_bt_gattdb_attribute_chrvalue_t gattdb_attribute_field_5) = { + .properties = 0x02, + .max_len = 16, + .data = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }, +}; +GATT_DATA(sli_bt_gattdb_attribute_chrvalue_t gattdb_attribute_field_2) = { + .properties = 0x20, + .max_len = 4, + .data = { 0x00, 0x00, 0x00, 0x00, }, +}; +GATT_DATA(const sli_bt_gattdb_value_t gattdb_attribute_field_0) = { + .len = 2, + .data = { 0x01, 0x18, } +}; + +GATT_DATA(const sli_bt_gattdb_attribute_t gattdb_attributes_map[]) = { + { .handle = 0x01, .uuid = 0x0000, .permissions = 0x801, .caps = 0xffff, .state = 0x00, .datatype = 0x00, .constdata = &gattdb_attribute_field_0 }, + { .handle = 0x02, .uuid = 0x0002, .permissions = 0x801, .caps = 0xffff, .state = 0x00, .datatype = 0x05, .characteristic = { .properties = 0x20, .char_uuid = 0x0008 } }, + { .handle = 0x03, .uuid = 0x0008, .permissions = 0x800, .caps = 0xffff, .state = 0x00, .datatype = 0x01, .dynamicdata = &gattdb_attribute_field_2 }, + { .handle = 0x04, .uuid = 0x000b, .permissions = 0x803, .caps = 0xffff, .state = 0x00, .datatype = 0x03, .configdata = { .flags = 0x02, .clientconfig_index = 0x00 } }, + { .handle = 0x05, .uuid = 0x0002, .permissions = 0x801, .caps = 0xffff, .state = 0x00, .datatype = 0x05, .characteristic = { .properties = 0x02, .char_uuid = 0x0009 } }, + { .handle = 0x06, .uuid = 0x0009, .permissions = 0x801, .caps = 0xffff, .state = 0x00, .datatype = 0x01, .dynamicdata = &gattdb_attribute_field_5 }, + { .handle = 0x07, .uuid = 0x0002, .permissions = 0x801, .caps = 0xffff, .state = 0x00, .datatype = 0x05, .characteristic = { .properties = 0x0a, .char_uuid = 0x000a } }, + { .handle = 0x08, .uuid = 0x000a, .permissions = 0x803, .caps = 0xffff, .state = 0x00, .datatype = 0x01, .dynamicdata = &gattdb_attribute_field_7 }, + { .handle = 0x09, .uuid = 0x0000, .permissions = 0x801, .caps = 0xffff, .state = 0x00, .datatype = 0x00, .constdata = &gattdb_attribute_field_8 }, + { .handle = 0x0a, .uuid = 0x0002, .permissions = 0x801, .caps = 0xffff, .state = 0x00, .datatype = 0x05, .characteristic = { .properties = 0x0a, .char_uuid = 0x0003 } }, + { .handle = 0x0b, .uuid = 0x0003, .permissions = 0x803, .caps = 0xffff, .state = 0x00, .datatype = 0x01, .dynamicdata = &gattdb_attribute_field_10 }, + { .handle = 0x0c, .uuid = 0x0002, .permissions = 0x801, .caps = 0xffff, .state = 0x00, .datatype = 0x05, .characteristic = { .properties = 0x02, .char_uuid = 0x0004 } }, + { .handle = 0x0d, .uuid = 0x0004, .permissions = 0x801, .caps = 0xffff, .state = 0x00, .datatype = 0x00, .constdata = &gattdb_attribute_field_12 }, + { .handle = 0x0e, .uuid = 0x0000, .permissions = 0x801, .caps = 0xffff, .state = 0x00, .datatype = 0x00, .constdata = &gattdb_attribute_field_13 }, + { .handle = 0x0f, .uuid = 0x0002, .permissions = 0x801, .caps = 0xffff, .state = 0x00, .datatype = 0x05, .characteristic = { .properties = 0x02, .char_uuid = 0x0005 } }, + { .handle = 0x10, .uuid = 0x0005, .permissions = 0x801, .caps = 0xffff, .state = 0x00, .datatype = 0x00, .constdata = &gattdb_attribute_field_15 }, + { .handle = 0x11, .uuid = 0x0002, .permissions = 0x801, .caps = 0xffff, .state = 0x00, .datatype = 0x05, .characteristic = { .properties = 0x02, .char_uuid = 0x0006 } }, + { .handle = 0x12, .uuid = 0x0006, .permissions = 0x801, .caps = 0xffff, .state = 0x00, .datatype = 0x00, .constdata = &gattdb_attribute_field_17 }, + { .handle = 0x13, .uuid = 0x0002, .permissions = 0x801, .caps = 0xffff, .state = 0x00, .datatype = 0x05, .characteristic = { .properties = 0x02, .char_uuid = 0x0007 } }, + { .handle = 0x14, .uuid = 0x0007, .permissions = 0x801, .caps = 0xffff, .state = 0x00, .datatype = 0x00, .constdata = &gattdb_attribute_field_19 }, + { .handle = 0x15, .uuid = 0x0000, .permissions = 0x801, .caps = 0xffff, .state = 0x00, .datatype = 0x00, .constdata = &gattdb_attribute_field_20 }, + { .handle = 0x16, .uuid = 0x0002, .permissions = 0x801, .caps = 0xffff, .state = 0x00, .datatype = 0x05, .characteristic = { .properties = 0x0a, .char_uuid = 0x8000 } }, + { .handle = 0x17, .uuid = 0x8000, .permissions = 0x803, .caps = 0xffff, .state = 0x00, .datatype = 0x02, .dynamicdata = &gattdb_attribute_field_22 }, + { .handle = 0x18, .uuid = 0x0002, .permissions = 0x801, .caps = 0xffff, .state = 0x00, .datatype = 0x05, .characteristic = { .properties = 0x2e, .char_uuid = 0x8001 } }, + { .handle = 0x19, .uuid = 0x8001, .permissions = 0x807, .caps = 0xffff, .state = 0x00, .datatype = 0x02, .dynamicdata = &gattdb_attribute_field_24 }, + { .handle = 0x1a, .uuid = 0x000b, .permissions = 0x803, .caps = 0xffff, .state = 0x00, .datatype = 0x03, .configdata = { .flags = 0x02, .clientconfig_index = 0x01 } }, + { .handle = 0x1b, .uuid = 0x0002, .permissions = 0x801, .caps = 0xffff, .state = 0x00, .datatype = 0x05, .characteristic = { .properties = 0x2e, .char_uuid = 0x8002 } }, + { .handle = 0x1c, .uuid = 0x8002, .permissions = 0x807, .caps = 0xffff, .state = 0x00, .datatype = 0x02, .dynamicdata = &gattdb_attribute_field_27 }, + { .handle = 0x1d, .uuid = 0x000b, .permissions = 0x803, .caps = 0xffff, .state = 0x00, .datatype = 0x03, .configdata = { .flags = 0x02, .clientconfig_index = 0x02 } }, +}; + +GATT_HEADER(const sli_bt_gattdb_t gattdb) = { + .attributes = gattdb_attributes_map, + .attribute_table_size = 29, + .attribute_num = 29, + .uuid16 = gattdb_uuidtable_16_map, + .uuid16_table_size = 12, + .uuid16_num = 12, + .uuid128 = gattdb_uuidtable_128_map, + .uuid128_table_size = 3, + .uuid128_num = 3, + .num_ccfg = 3, + .caps_mask = 0xffff, + .enabled_caps = 0xffff, +}; +const sli_bt_gattdb_t *static_gattdb = &gattdb; diff --git a/matter/efr32/mgm26/BRD4350A/autogen/gatt_db.h b/matter/efr32/mgm26/BRD4350A/autogen/gatt_db.h new file mode 100644 index 0000000000..bee94f4ef7 --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/autogen/gatt_db.h @@ -0,0 +1,29 @@ +/******************************************************************** + * Autogenerated file, do not edit. + *******************************************************************/ + +#ifndef __GATT_DB_H +#define __GATT_DB_H + +#if __cplusplus +extern "C" { +#endif + +#include "sli_bt_gattdb_def.h" + +extern const sli_bt_gattdb_t gattdb; + +#define gattdb_generic_attribute 1 +#define gattdb_service_changed_char 3 +#define gattdb_database_hash 6 +#define gattdb_client_support_features 8 +#define gattdb_device_name 11 +#define gattdb_CHIPoBLEChar_Rx 23 +#define gattdb_CHIPoBLEChar_Tx 25 +#define gattdb_CHIPoBLEChar_C3 28 + +#if __cplusplus +} +#endif + +#endif // __GATT_DB_H diff --git a/matter/efr32/mgm26/BRD4350A/autogen/sl_bluetooth.c b/matter/efr32/mgm26/BRD4350A/autogen/sl_bluetooth.c new file mode 100644 index 0000000000..ffdf6412be --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/autogen/sl_bluetooth.c @@ -0,0 +1,99 @@ +/***************************************************************************//** + * @file + * @brief Bluetooth initialization and event processing + ******************************************************************************* + * # License + * Copyright 2024 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the + * use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software in a + * product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +#include +#include "sl_bluetooth.h" +#include "sl_assert.h" +#include "sl_bt_stack_init.h" +#include "sl_component_catalog.h" +/** + * Internal stack function to start the Bluetooth stack. + * + * @return SL_STATUS_OK if the stack was successfully started + */ +extern sl_status_t sli_bt_system_start_bluetooth(); + +void sl_bt_init(void) +{ + // Stack initialization could fail, e.g., due to out of memory. + // The failure could not be returned to user as the system initialization + // does not return an error code. Use the EFM_ASSERT to catch the failure, + // which requires either DEBUG_EFM or DEBUG_EFM_USER is defined. + sl_status_t err = sl_bt_stack_init(); + EFM_ASSERT(err == SL_STATUS_OK); + + // When neither Bluetooth on-demand start feature nor an RTOS is present, the + // Bluetooth stack is always started already at init-time. +#if !defined(SL_CATALOG_BLUETOOTH_ON_DEMAND_START_PRESENT) && !defined(SL_CATALOG_KERNEL_PRESENT) + err = sli_bt_system_start_bluetooth(); + EFM_ASSERT(err == SL_STATUS_OK); +#endif +} + +SL_WEAK void sl_bt_on_event(sl_bt_msg_t* evt) +{ + (void)(evt); +} + +void sl_bt_process_event(sl_bt_msg_t *evt) +{ + sl_bt_on_event(evt); +} + +#if !defined(SL_CATALOG_KERNEL_PRESENT) +// When running in an RTOS, the stack events are processed in a dedicated +// event processing task, and these functions are not used at all. + +SL_WEAK bool sl_bt_can_process_event(uint32_t len) +{ + (void)(len); + return true; +} + +void sl_bt_step(void) +{ + sl_bt_msg_t evt; + + sl_bt_run(); + uint32_t event_len = sl_bt_event_pending_len(); + // For preventing from data loss, the event will be kept in the stack's queue + // if application cannot process it at the moment. + if ((event_len == 0) || (!sl_bt_can_process_event(event_len))) { + return; + } + + // Pop (non-blocking) a Bluetooth stack event from event queue. + sl_status_t status = sl_bt_pop_event(&evt); + if(status != SL_STATUS_OK){ + return; + } + sl_bt_process_event(&evt); +} +#endif // !defined(SL_CATALOG_KERNEL_PRESENT) diff --git a/matter/efr32/mgm26/BRD4350A/autogen/sl_bluetooth.h b/matter/efr32/mgm26/BRD4350A/autogen/sl_bluetooth.h new file mode 100644 index 0000000000..46877b7515 --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/autogen/sl_bluetooth.h @@ -0,0 +1,72 @@ +/***************************************************************************//** + * @file + * @brief Bluetooth initialization and event processing + ******************************************************************************* + * # License + * Copyright 2024 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the + * use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software in a + * product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +#ifndef BLUETOOTH_H +#define BLUETOOTH_H + +#include +#include "sl_power_manager.h" +#include "sl_bluetooth_config.h" +#include "sl_bt_api.h" +#define SL_BT_COMPONENT_ADVERTISERS 0 + +#define SL_BT_COMPONENT_CONNECTIONS 0 + +// Initialize Bluetooth core functionality +void sl_bt_init(void); + +// Polls bluetooth stack for an event and processes it +void sl_bt_step(void); + +/** + * Tell if the application can process a new Bluetooth event in its current + * state, for example, based on resource availability status. + * If true is returned by this function, sl_bt_process_event will be called + * for event processing. Otherwise, the event will be kept in stack's event + * queue until the application can process it. + * + * @note Default implementation of this function returns true. + * Application can override it for own business logic. + * + * @param len Data length of the event + * @return ture if event can be processed; false otherwise + */ +bool sl_bt_can_process_event(uint32_t len); + +// Processes a single bluetooth event +void sl_bt_process_event(sl_bt_msg_t *evt); + +void sl_bt_on_event(sl_bt_msg_t* evt); + +// Power Manager related functions +bool sli_bt_is_ok_to_sleep(void); +sl_power_manager_on_isr_exit_t sli_bt_sleep_on_isr_exit(void); + +#endif // BLUETOOTH_H diff --git a/matter/efr32/mgm26/BRD4350A/autogen/sl_board_default_init.c b/matter/efr32/mgm26/BRD4350A/autogen/sl_board_default_init.c new file mode 100644 index 0000000000..bd43db368b --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/autogen/sl_board_default_init.c @@ -0,0 +1,36 @@ +/***************************************************************************//** + * @file + * @brief Board Default Init + ******************************************************************************* + * # License + * Copyright 2020 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ +#include "sl_board_control.h" + +void sl_board_default_init(void) +{ + sl_board_disable_vcom(); + +} diff --git a/matter/efr32/mgm26/BRD4350A/autogen/sl_component_catalog.h b/matter/efr32/mgm26/BRD4350A/autogen/sl_component_catalog.h new file mode 100644 index 0000000000..5f509688c0 --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/autogen/sl_component_catalog.h @@ -0,0 +1,72 @@ +#ifndef SL_COMPONENT_CATALOG_H +#define SL_COMPONENT_CATALOG_H + +// APIs present in project +#define SL_CATALOG_BLUETOOTH_CONFIGURATION_PRESENT +#define SL_CATALOG_BLUETOOTH_CTE_SUPPORT_PRESENT +#define SL_CATALOG_BLUETOOTH_FEATURE_ADVERTISER_PRESENT +#define SL_CATALOG_BLUETOOTH_FEATURE_CONNECTION_PRESENT +#define SL_CATALOG_BLUETOOTH_FEATURE_GATT_SERVER_PRESENT +#define SL_CATALOG_BLUETOOTH_FEATURE_LEGACY_ADVERTISER_PRESENT +#define SL_CATALOG_BLUETOOTH_FEATURE_SYSTEM_PRESENT +#define SL_CATALOG_BLUETOOTH_HOST_ADAPTATION_PRESENT +#define SL_CATALOG_BLUETOOTH_RTOS_ADAPTATION_PRESENT +#define SL_CATALOG_BLUETOOTH_PRESENT +#define SL_CATALOG_BLUETOOTH_FEATURE_MULTIPROTOCOL_PRESENT +#define SL_CATALOG_CLOCK_MANAGER_PRESENT +#define SL_CATALOG_CMSIS_OS_COMMON_PRESENT +#define SL_CATALOG_DEVICE_INIT_PRESENT +#define SL_CATALOG_DEVICE_INIT_CORE_PRESENT +#define SL_CATALOG_DEVICE_INIT_DCDC_PRESENT +#define SL_CATALOG_EMLIB_CORE_PRESENT +#define SL_CATALOG_EMLIB_CORE_DEBUG_CONFIG_PRESENT +#define SL_CATALOG_EMLIB_RMU_PRESENT +#define SL_CATALOG_FREERTOS_KERNEL_PRESENT +#define SL_CATALOG_KERNEL_PRESENT +#define SL_CATALOG_GATT_CONFIGURATION_PRESENT +#define SL_CATALOG_GPIO_PRESENT +#define SL_CATALOG_HFXO_MANAGER_PRESENT +#define SL_CATALOG_INTERRUPT_MANAGER_PRESENT +#define SL_CATALOG_IOSTREAM_PRESENT +//Added from 4187c +#ifdef DISPLAY_ENABLED +#define SL_CATALOG_MEMLCD_USART_PRESENT +#define SL_CATALOG_DMD_MEMLCD_PRESENT +#endif +#define SL_CATALOG_MEMORY_MANAGER_PRESENT +#define SL_CATALOG_MEMORY_PROFILER_API_PRESENT +// #define SL_CATALOG_MPU_PRESENT +#ifdef CONFIG_USE_EXTERNAL_FLASH +#define SL_CATALOG_MX25_FLASH_SHUTDOWN_USART_PRESENT +#endif // CONFIG_USE_EXTERNAL_FLASH +#define SL_CATALOG_NVM3_PRESENT +#define SL_CATALOG_OPENTHREAD_CLI_PRESENT +#define SL_CATALOG_OT_GP_INTERFACE_PRESENT +#define SL_CATALOG_OPENTHREAD_STACK_PRESENT +// #define SL_CATALOG_OPENTHREAD_UART_PRESENT //not present in 4187c +#define SL_CATALOG_POWER_MANAGER_PRESENT +#define SL_CATALOG_PSA_CRYPTO_PRESENT +#define SL_CATALOG_RADIO_PRIORITY_15_4_PRESENT +#define SL_CATALOG_RAIL_LIB_PRESENT +#define SL_CATALOG_RAIL_UTIL_PTI_PRESENT +#define SL_CATALOG_SE_MANAGER_PRESENT +#define SL_CATALOG_SECURITY_MANAGER_PRESENT +#define SL_CATALOG_SEGGER_RTT_PRESENT +#define SL_CATALOG_BTN0_PRESENT +#define SL_CATALOG_SIMPLE_BUTTON_PRESENT +#define SL_CATALOG_SIMPLE_BUTTON_BTN0_PRESENT +#define SL_CATALOG_BTN1_PRESENT +#define SL_CATALOG_SIMPLE_BUTTON_BTN1_PRESENT +#define SL_CATALOG_LED0_PRESENT +#define SL_CATALOG_SIMPLE_LED_PRESENT +#define SL_CATALOG_SIMPLE_LED_LED0_PRESENT +#define SL_CATALOG_LED1_PRESENT +#define SL_CATALOG_SIMPLE_LED_LED1_PRESENT +#define SL_CATALOG_SL_CORE_PRESENT +#define SL_CATALOG_SLEEPTIMER_PRESENT +#define SL_CATALOG_SLI_PROTOCOL_CRYPTO_PRESENT +#if defined(CONFIG_ENABLE_UART) +#define SL_CATALOG_UARTDRV_EUSART_PRESENT +#endif + +#endif // SL_COMPONENT_CATALOG_H diff --git a/matter/efr32/mgm26/BRD4350A/autogen/sl_event_handler.c b/matter/efr32/mgm26/BRD4350A/autogen/sl_event_handler.c new file mode 100644 index 0000000000..3e148fbf1d --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/autogen/sl_event_handler.c @@ -0,0 +1,138 @@ +#include "sl_event_handler.h" + +#include "em_chip.h" +#include "sl_interrupt_manager.h" +#include "sl_board_init.h" +#include "sl_clock_manager_init.h" +#include "sl_device_init_dcdc.h" +#include "sl_clock_manager.h" +#include "sl_hfxo_manager.h" +#include "SEGGER_RTT.h" +#include "pa_conversions_efr32.h" +#if !RSI_BLE_ENABLE +#include "sl_rail_util_power_manager_init.h" +#endif // !RSI_BLE_ENABLE +#include "sl_rail_util_pti.h" +#include "sl_rail_util_rssi.h" +//#include "sl_fem_util.h" // not present in 4187c +#include "sl_board_control.h" +#include "sl_bt_rtos_adaptation.h" +#include "platform-efr32.h" +#include "sl_sleeptimer.h" +#include "sl_mpu.h" +//#include "sl_debug_swo.h" //not present in 4187c +#include "sl_gpio.h" +#if defined(SL_MATTER_USE_SI70XX_SENSOR) && SL_MATTER_USE_SI70XX_SENSOR +#include "sl_i2cspm_instances.h" +#endif // defined(SL_MATTER_USE_SI70XX_SENSOR) && SL_MATTER_USE_SI70XX_SENSOR +#include "sl_iostream_rtt.h" +#include "sl_mbedtls.h" +#include "sl_ot_rtos_adaptation.h" +#include "sl_simple_button_instances.h" +#include "sl_simple_led_instances.h" +#if defined(CONFIG_ENABLE_UART) +#include "sl_uartdrv_instances.h" +#endif // CONFIG_ENABLE_UART +//copied over from 4187c +#ifdef SL_WIFI +#include "sl_spidrv_instances.h" +#endif +#include "psa/crypto.h" +#include "sl_se_manager.h" +#include "sli_protocol_crypto.h" +#include "cmsis_os2.h" +#include "sl_iostream_init_instances.h" +#include "sl_bluetooth.h" +//#include "sl_cos.h" //not present in 4187c +#include "sl_iostream_handles.h" +#include "nvm3_default.h" +#include "sl_power_manager.h" + +void sl_platform_init(void) +{ + CHIP_Init(); + sl_interrupt_manager_init(); + sl_board_preinit(); + sl_clock_manager_init(); + sl_device_init_dcdc(); + sl_clock_manager_runtime_init(); + sl_hfxo_manager_init_hardware(); + SEGGER_RTT_Init(); + sl_board_init(); + osKernelInitialize(); + nvm3_initDefault(); + sl_power_manager_init(); +} + +void sl_kernel_start(void) +{ +#if !RSI_BLE_ENABLE + sli_bt_rtos_adaptation_kernel_start(); +#endif // !RSI_BLE_ENABLE + osKernelStart(); +} + +void sl_driver_init(void) +{ + //sl_debug_swo_init(); //not present in 4187c + sl_gpio_init(); + //copied over +#ifndef SLI_SI917 +#ifdef SL_WIFI + sl_spidrv_init_instances(); +#endif // SL_WIFI +#endif // SLI_SI917 +#if defined(SL_MATTER_USE_SI70XX_SENSOR) && SL_MATTER_USE_SI70XX_SENSOR + sl_i2cspm_init_instances(); +#endif // defined(SL_MATTER_USE_SI70XX_SENSOR) && SL_MATTER_USE_SI70XX_SENSOR + sl_simple_button_init_instances(); + sl_simple_led_init_instances(); +#if defined(CONFIG_ENABLE_UART) + sl_uartdrv_init_instances(); +#endif // CONFIG_ENABLE_UART +} + +void sl_service_init(void) +{ + sl_board_configure_vcom(); + sl_sleeptimer_init(); + sl_hfxo_manager_init(); + sl_mpu_disable_execute_from_ram(); + sl_mbedtls_init(); + psa_crypto_init(); + sl_se_init(); + sli_protocol_crypto_init(); + sli_aes_seed_mask(); + sl_iostream_init_instances(); +} + +void sl_stack_init(void) +{ +#if !RSI_BLE_ENABLE + sl_rail_util_pa_init(); + sl_rail_util_power_manager_init(); + sl_rail_util_pti_init(); + sl_rail_util_rssi_init(); + //sl_fem_util_init(); //not present in 4187c + sl_bt_rtos_init(); +#endif // !RSI_BLE_ENABLE + +#ifdef SL_OT_ENABLE + sl_ot_sys_init(); +#endif // SL_OT_ENABLE +} + +void sl_internal_app_init(void) +{ +#ifdef SL_OT_ENABLE + sl_ot_rtos_stack_init(); + sl_ot_rtos_app_init(); +#endif // SL_OT_ENABLE +} + +void sl_iostream_init_instances(void) +{ + sl_iostream_rtt_init(); + // sl_iostream_set_console_instance(); //not present in 4187c +} + diff --git a/matter/efr32/mgm26/BRD4350A/autogen/sl_event_handler.h b/matter/efr32/mgm26/BRD4350A/autogen/sl_event_handler.h new file mode 100644 index 0000000000..5eda3cb750 --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/autogen/sl_event_handler.h @@ -0,0 +1,12 @@ +#ifndef SL_EVENT_HANDLER_H +#define SL_EVENT_HANDLER_H + +void sl_platform_init(void); +void sl_kernel_start(void); +void sl_driver_init(void); +void sl_service_init(void); +void sl_stack_init(void); +void sl_internal_app_init(void); +//void sl_iostream_init_instances(void); //not present in 4187c + +#endif // SL_EVENT_HANDLER_H diff --git a/matter/efr32/mgm26/BRD4350A/autogen/sl_i2cspm_init.c b/matter/efr32/mgm26/BRD4350A/autogen/sl_i2cspm_init.c new file mode 100644 index 0000000000..247e557d74 --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/autogen/sl_i2cspm_init.c @@ -0,0 +1,64 @@ +/***************************************************************************//** + * @file + * @brief I2C simple poll-based master mode driver instance initialilization + ******************************************************************************* + * # License + * Copyright 2020 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +#include "sl_i2cspm.h" +#include "sl_clock_manager.h" +// Include instance config +#include "sl_i2cspm_sensor_config.h" + +sl_i2cspm_t *sl_i2cspm_sensor = SL_I2CSPM_SENSOR_PERIPHERAL; + +#if SL_I2CSPM_SENSOR_SPEED_MODE == 0 +#define SL_I2CSPM_SENSOR_HLR i2cClockHLRStandard +#define SL_I2CSPM_SENSOR_MAX_FREQ I2C_FREQ_STANDARD_MAX +#elif SL_I2CSPM_SENSOR_SPEED_MODE == 1 +#define SL_I2CSPM_SENSOR_HLR i2cClockHLRAsymetric +#define SL_I2CSPM_SENSOR_MAX_FREQ I2C_FREQ_FAST_MAX +#elif SL_I2CSPM_SENSOR_SPEED_MODE == 2 +#define SL_I2CSPM_SENSOR_HLR i2cClockHLRFast +#define SL_I2CSPM_SENSOR_MAX_FREQ I2C_FREQ_FASTPLUS_MAX +#endif + +I2CSPM_Init_TypeDef init_sensor = { + .port = SL_I2CSPM_SENSOR_PERIPHERAL, + .sclPort = SL_I2CSPM_SENSOR_SCL_PORT, + .sclPin = SL_I2CSPM_SENSOR_SCL_PIN, + .sdaPort = SL_I2CSPM_SENSOR_SDA_PORT, + .sdaPin = SL_I2CSPM_SENSOR_SDA_PIN, + .i2cRefFreq = 0, + .i2cMaxFreq = SL_I2CSPM_SENSOR_MAX_FREQ, + .i2cClhr = SL_I2CSPM_SENSOR_HLR +}; + +void sl_i2cspm_init_instances(void) +{ + sl_clock_manager_enable_bus_clock(SL_BUS_CLOCK_GPIO); + I2CSPM_Init(&init_sensor); +} diff --git a/matter/efr32/mgm26/BRD4350A/autogen/sl_i2cspm_instances.h b/matter/efr32/mgm26/BRD4350A/autogen/sl_i2cspm_instances.h new file mode 100644 index 0000000000..41ff115bfd --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/autogen/sl_i2cspm_instances.h @@ -0,0 +1,52 @@ +/***************************************************************************//** + * @file + * @brief I2C simple poll-based master mode driver instances + ******************************************************************************* + * # License + * Copyright 2020 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +#ifndef SL_I2CSPM_INSTANCES_H +#define SL_I2CSPM_INSTANCES_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include "sl_i2cspm.h" + + +#define SL_I2CSPM_SENSOR_PRESENT + + +extern sl_i2cspm_t *sl_i2cspm_sensor; + +void sl_i2cspm_init_instances(void); + +#ifdef __cplusplus +} +#endif + +#endif // SL_I2CSPM_INSTANCES_H diff --git a/matter/efr32/mgm26/BRD4350A/autogen/sl_iostream_handles.c b/matter/efr32/mgm26/BRD4350A/autogen/sl_iostream_handles.c new file mode 100644 index 0000000000..4135eff037 --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/autogen/sl_iostream_handles.c @@ -0,0 +1,63 @@ +#include "sl_iostream.h" +#include "sl_iostream_handles.h" +#include "string.h" + +const sl_iostream_instance_info_t *sl_iostream_instances_info[] = { + + &sl_iostream_instance_rtt_info, + +}; + +const uint32_t sl_iostream_instances_count = sizeof(sl_iostream_instances_info) / sizeof(sl_iostream_instances_info[0]); +//sl_iostream_t *sl_iostream_recommended_console_stream = NULL; //not present in 4187c + + +/***************************************************************************//** + * Get iostream instance handle for a given name + * + * @return Instance handle if it exist, NULL otherwise. + ******************************************************************************/ +sl_iostream_t *sl_iostream_get_handle(char *name) +{ + for (uint32_t i = 0; i < sl_iostream_instances_count; i++) { + if (strcmp(sl_iostream_instances_info[i]->name, name) == 0) { + return sl_iostream_instances_info[i]->handle; + } + } + + return NULL; +} + +/***************************************************************************//** + * Set iostream recommended instance for a console + ******************************************************************************/ +/* //not present in 4187c +void sl_iostream_set_console_instance(void) +{ + sl_iostream_type_t console = SL_IOSTREAM_TYPE_UNDEFINED; + + for (uint32_t i = 0; i < sl_iostream_instances_count; i++) { + switch (sl_iostream_instances_info[i]->type) { + case SL_IOSTREAM_TYPE_UART: + case SL_IOSTREAM_TYPE_RTT: + if (console != SL_IOSTREAM_TYPE_UART) { + console = sl_iostream_instances_info[i]->type; + sl_iostream_recommended_console_stream = sl_iostream_instances_info[i]->handle; + } + break; + + case SL_IOSTREAM_TYPE_VUART: + if (console != SL_IOSTREAM_TYPE_UART && console != SL_IOSTREAM_TYPE_RTT) { + console = sl_iostream_instances_info[i]->type; + sl_iostream_recommended_console_stream = sl_iostream_instances_info[i]->handle; + } + break; + + case SL_IOSTREAM_TYPE_LOOPBACK: + default: + // Ignore loopback interface + break; + } + } +} +*/ diff --git a/matter/efr32/mgm26/BRD4350A/autogen/sl_iostream_handles.h b/matter/efr32/mgm26/BRD4350A/autogen/sl_iostream_handles.h new file mode 100644 index 0000000000..433d5079bc --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/autogen/sl_iostream_handles.h @@ -0,0 +1,24 @@ +#ifndef SL_IOSTREAM_HANDLES_H +#define SL_IOSTREAM_HANDLES_H +#include "sl_iostream.h" +#include "sl_iostream_rtt.h" + + +#ifdef __cplusplus +extern "C" { +#endif + +extern const sl_iostream_instance_info_t *sl_iostream_instances_info[]; +extern const uint32_t sl_iostream_instances_count; + +// extern sl_iostream_t *sl_iostream_recommended_console_stream; //not present in 4187c + +sl_iostream_t *sl_iostream_get_handle(char *name); + +// void sl_iostream_set_console_instance(void); //not present in 4187c + +#ifdef __cplusplus +} +#endif + +#endif // SL_IOSTREAM_HANDLES_H diff --git a/matter/efr32/mgm26/BRD4350A/autogen/sl_iostream_init_instances.h b/matter/efr32/mgm26/BRD4350A/autogen/sl_iostream_init_instances.h new file mode 100644 index 0000000000..c092c37eec --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/autogen/sl_iostream_init_instances.h @@ -0,0 +1,16 @@ +#ifndef SL_IOSTREAM_INIT_INSTANCES_H +#define SL_IOSTREAM_INIT_INSTANCES_H + +#include "sl_iostream.h" +#ifdef __cplusplus +extern "C" { +#endif + +// Initialize iostream component(s) / instance(s) +void sl_iostream_init_instances(void); + +#ifdef __cplusplus +} +#endif + +#endif // SL_IOSTREAM_INIT_INSTANCES_H \ No newline at end of file diff --git a/matter/efr32/mgm26/BRD4350A/autogen/sl_ot_custom_cli.c b/matter/efr32/mgm26/BRD4350A/autogen/sl_ot_custom_cli.c new file mode 100644 index 0000000000..ca55d64636 --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/autogen/sl_ot_custom_cli.c @@ -0,0 +1,64 @@ +/******************************************************************************* + * @file + * @brief Custom CLI support for OpenThread + ******************************************************************************* + * # License + * Copyright 2024 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +#include +#include +#include +#include "sl_ot_custom_cli.h" + +/******************************************************************************* + * Example syntax (.slcc or .slcp) for populating this file: + * + * template_contribution: + * - name: sl_ot_cli_command # Register a command + * value: + * name: status # Name of command + * handler: status_command # Function to be called. Must be defined + * + ******************************************************************************/ +extern otError bleCommand(void *aContext, uint8_t aArgsLength, char *aArgs[]); + +otCliCommand sl_ot_custom_commands[] = { +#ifdef SL_OPENTHREAD_BLE_CLI_ENABLE + {"ble", bleCommand}, +#endif + +}; + +// This is needed because `sizeof` is calculated at compile time and can't be calculated outside of this source file. +const uint8_t sl_ot_custom_commands_count = OT_ARRAY_LENGTH(sl_ot_custom_commands); + +void sl_ot_custom_cli_init(void) +{ + if (sl_ot_custom_commands_count > 0) + { + IgnoreError(otCliSetUserCommands(sl_ot_custom_commands, sl_ot_custom_commands_count, NULL)); + } +} diff --git a/matter/efr32/mgm26/BRD4350A/autogen/sl_ot_init.c b/matter/efr32/mgm26/BRD4350A/autogen/sl_ot_init.c new file mode 100644 index 0000000000..919757ade3 --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/autogen/sl_ot_init.c @@ -0,0 +1,45 @@ +/******************************************************************************* + * @file + * @brief OpenThread initialization. + ******************************************************************************* + * # License + * Copyright 2024 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +#include "sl_ot_init.h" +// TODO: Remove the Power Manager include when OT does not add an EM1 req at init +#define CURRENT_MODULE_NAME "OPENTHREAD" +#include "sl_power_manager.h" + +void sl_ot_init(void) +{ + sl_ot_create_instance(); + sl_ot_sleep_init(); + + // TODO: Remove the Power Manager remove req when OT does not add an EM1 req at init + sl_power_manager_remove_em_requirement(SL_POWER_MANAGER_EM1); + sl_ot_cli_init(); + sl_ot_custom_cli_init(); +} \ No newline at end of file diff --git a/matter/efr32/mgm26/BRD4350A/autogen/sl_ot_init.h b/matter/efr32/mgm26/BRD4350A/autogen/sl_ot_init.h new file mode 100644 index 0000000000..4afeb49d91 --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/autogen/sl_ot_init.h @@ -0,0 +1,41 @@ +/******************************************************************************* + * @file + * @brief This generated header includes declaration of all functions required + * during initialization that must be defined by the OpenThread application. + ******************************************************************************* + * # License + * Copyright 2024 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +#ifndef SL_OT_INIT_H +#define SL_OT_INIT_H + +void sl_ot_init(void); +extern void sl_ot_create_instance(void); +extern void sl_ot_sleep_init(void); +extern void sl_ot_cli_init(void); +extern void sl_ot_custom_cli_init(void); + +#endif // SL_OT_INIT_H \ No newline at end of file diff --git a/matter/efr32/mgm26/BRD4350A/autogen/sl_simple_button_instances.c b/matter/efr32/mgm26/BRD4350A/autogen/sl_simple_button_instances.c new file mode 100644 index 0000000000..3991bd5e5a --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/autogen/sl_simple_button_instances.c @@ -0,0 +1,86 @@ +/***************************************************************************//** + * @file + * @brief Simple Button Driver Instances + ******************************************************************************* + * # License + * Copyright 2019 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +#include "sl_simple_button.h" +#include "sl_simple_button_btn0_config.h" +#include "sl_simple_button_btn1_config.h" + +sl_simple_button_context_t simple_btn0_context = { + .state = 0, + .history = 0, + .port = SL_SIMPLE_BUTTON_BTN0_PORT, + .pin = SL_SIMPLE_BUTTON_BTN0_PIN, + .mode = SL_SIMPLE_BUTTON_BTN0_MODE, +}; + +const sl_button_t sl_button_btn0 = { + .context = &simple_btn0_context, + .init = sl_simple_button_init, + .get_state = sl_simple_button_get_state, + .poll = sl_simple_button_poll_step, + .enable = sl_simple_button_enable, + .disable = sl_simple_button_disable, +}; +sl_simple_button_context_t simple_btn1_context = { + .state = 0, + .history = 0, + .port = SL_SIMPLE_BUTTON_BTN1_PORT, + .pin = SL_SIMPLE_BUTTON_BTN1_PIN, + .mode = SL_SIMPLE_BUTTON_BTN1_MODE, +}; + +const sl_button_t sl_button_btn1 = { + .context = &simple_btn1_context, + .init = sl_simple_button_init, + .get_state = sl_simple_button_get_state, + .poll = sl_simple_button_poll_step, + .enable = sl_simple_button_enable, + .disable = sl_simple_button_disable, +}; + +// the table of buttons and button count are generated as a +// convenience for the application +const sl_button_t *sl_simple_button_array[] = { + &sl_button_btn0, + &sl_button_btn1 +}; +const uint8_t simple_button_count = 2; + +void sl_simple_button_init_instances(void) +{ + sl_button_init(&sl_button_btn0); + sl_button_init(&sl_button_btn1); +} + +void sl_simple_button_poll_instances(void) +{ + sl_button_poll_step(&sl_button_btn0); + sl_button_poll_step(&sl_button_btn1); +} diff --git a/matter/efr32/mgm26/BRD4350A/autogen/sl_simple_button_instances.h b/matter/efr32/mgm26/BRD4350A/autogen/sl_simple_button_instances.h new file mode 100644 index 0000000000..1a5ddb293b --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/autogen/sl_simple_button_instances.h @@ -0,0 +1,47 @@ +/***************************************************************************//** + * @file + * @brief Simple Button Driver Instances + ******************************************************************************* + * # License + * Copyright 2019 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +#ifndef SL_SIMPLE_BUTTON_INSTANCES_H +#define SL_SIMPLE_BUTTON_INSTANCES_H + +#include "sl_simple_button.h" + +extern const sl_button_t sl_button_btn0; +extern const sl_button_t sl_button_btn1; + +extern const sl_button_t *sl_simple_button_array[]; + +#define SL_SIMPLE_BUTTON_COUNT 2 +#define SL_SIMPLE_BUTTON_INSTANCE(n) (sl_simple_button_array[n]) + +void sl_simple_button_init_instances(void); +void sl_simple_button_poll_instances(void); + +#endif // SL_SIMPLE_BUTTON_INSTANCES_H diff --git a/matter/efr32/mgm26/BRD4350A/autogen/sl_simple_led_instances.c b/matter/efr32/mgm26/BRD4350A/autogen/sl_simple_led_instances.c new file mode 100644 index 0000000000..9958e20be4 --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/autogen/sl_simple_led_instances.c @@ -0,0 +1,75 @@ +/***************************************************************************//** + * @file + * @brief LED Driver Instances + ******************************************************************************* + * # License + * Copyright 2019 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +#include "sl_simple_led.h" +#include "sl_gpio.h" + +#include "sl_simple_led_led0_config.h" +#include "sl_simple_led_led1_config.h" + +sl_simple_led_context_t simple_led0_context = { + .port = SL_SIMPLE_LED_LED0_PORT, + .pin = SL_SIMPLE_LED_LED0_PIN, + .polarity = SL_SIMPLE_LED_LED0_POLARITY, +}; + +const sl_led_t sl_led_led0 = { + .context = &simple_led0_context, + .init = sl_simple_led_init, + .turn_on = sl_simple_led_turn_on, + .turn_off = sl_simple_led_turn_off, + .toggle = sl_simple_led_toggle, + .get_state = sl_simple_led_get_state, +}; +sl_simple_led_context_t simple_led1_context = { + .port = SL_SIMPLE_LED_LED1_PORT, + .pin = SL_SIMPLE_LED_LED1_PIN, + .polarity = SL_SIMPLE_LED_LED1_POLARITY, +}; + +const sl_led_t sl_led_led1 = { + .context = &simple_led1_context, + .init = sl_simple_led_init, + .turn_on = sl_simple_led_turn_on, + .turn_off = sl_simple_led_turn_off, + .toggle = sl_simple_led_toggle, + .get_state = sl_simple_led_get_state, +}; + +const sl_led_t *sl_simple_led_array[] = { + &sl_led_led0, + &sl_led_led1 +}; + +void sl_simple_led_init_instances(void) +{ + sl_led_init(&sl_led_led0); + sl_led_init(&sl_led_led1); +} diff --git a/matter/efr32/mgm26/BRD4350A/autogen/sl_simple_led_instances.h b/matter/efr32/mgm26/BRD4350A/autogen/sl_simple_led_instances.h new file mode 100644 index 0000000000..c0acb99514 --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/autogen/sl_simple_led_instances.h @@ -0,0 +1,52 @@ +/***************************************************************************//** + * @file + * @brief LED Driver Instances + ******************************************************************************* + * # License + * Copyright 2019 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +#ifndef SL_SIMPLE_LED_INSTANCES_H +#define SL_SIMPLE_LED_INSTANCES_H + +#ifdef __cplusplus +extern "C" { +#endif +#include "sl_simple_led.h" + +extern const sl_led_t sl_led_led0; +extern const sl_led_t sl_led_led1; + +extern const sl_led_t *sl_simple_led_array[]; + +#define SL_SIMPLE_LED_COUNT 2 +#define SL_SIMPLE_LED_INSTANCE(n) (sl_simple_led_array[n]) + +void sl_simple_led_init_instances(void); + +#ifdef __cplusplus +} +#endif +#endif // SL_SIMPLE_LED_INIT_H diff --git a/matter/efr32/mgm26/BRD4350A/autogen/sl_uartdrv_init.c b/matter/efr32/mgm26/BRD4350A/autogen/sl_uartdrv_init.c new file mode 100644 index 0000000000..adab0fb5b1 --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/autogen/sl_uartdrv_init.c @@ -0,0 +1,74 @@ +#include "uartdrv.h" +#include "sl_uartdrv_instances.h" +#include + +#include "sl_uartdrv_eusart_vcom_config.h" + +UARTDRV_HandleData_t sl_uartdrv_eusart_vcom_handle_data; +UARTDRV_Handle_t sl_uartdrv_eusart_vcom_handle = &sl_uartdrv_eusart_vcom_handle_data; + + +static UARTDRV_Handle_t sli_uartdrv_default_handle = NULL; + +/* If CTS and RTS not defined, define a default value to avoid errors */ +#ifndef SL_UARTDRV_EUSART_VCOM_CTS_PORT +#define SL_UARTDRV_EUSART_VCOM_CTS_PORT SL_GPIO_PORT_A +#define SL_UARTDRV_EUSART_VCOM_CTS_PIN 0 +#endif + +#ifndef SL_UARTDRV_EUSART_VCOM_RTS_PORT +#define SL_UARTDRV_EUSART_VCOM_RTS_PORT SL_GPIO_PORT_A +#define SL_UARTDRV_EUSART_VCOM_RTS_PIN 0 +#endif + + +/* Define RX and TX buffer queues */ +DEFINE_BUF_QUEUE(SL_UARTDRV_EUSART_VCOM_RX_BUFFER_SIZE, sl_uartdrv_eusart_vcom_rx_buffer); +DEFINE_BUF_QUEUE(SL_UARTDRV_EUSART_VCOM_TX_BUFFER_SIZE, sl_uartdrv_eusart_vcom_tx_buffer); + + +/* Create uartdrv initialization structs */ +UARTDRV_InitEuart_t sl_uartdrv_eusart_init_vcom = { + .port = SL_UARTDRV_EUSART_VCOM_PERIPHERAL, + .useLowFrequencyMode = SL_UARTDRV_EUSART_VCOM_LF_MODE, + .baudRate = SL_UARTDRV_EUSART_VCOM_BAUDRATE, + .txPort = SL_UARTDRV_EUSART_VCOM_TX_PORT, + .rxPort = SL_UARTDRV_EUSART_VCOM_RX_PORT, + .txPin = SL_UARTDRV_EUSART_VCOM_TX_PIN, + .rxPin = SL_UARTDRV_EUSART_VCOM_RX_PIN, + .uartNum = SL_UARTDRV_EUSART_VCOM_PERIPHERAL_NO, + .stopBits = SL_UARTDRV_EUSART_VCOM_STOP_BITS, + .parity = SL_UARTDRV_EUSART_VCOM_PARITY, + .oversampling = SL_UARTDRV_EUSART_VCOM_OVERSAMPLING, + .mvdis = SL_UARTDRV_EUSART_VCOM_MVDIS, + .fcType = SL_UARTDRV_EUSART_VCOM_FLOW_CONTROL_TYPE, + .ctsPort = SL_UARTDRV_EUSART_VCOM_CTS_PORT, + .ctsPin = SL_UARTDRV_EUSART_VCOM_CTS_PIN, + .rtsPort = SL_UARTDRV_EUSART_VCOM_RTS_PORT, + .rtsPin = SL_UARTDRV_EUSART_VCOM_RTS_PIN, + .rxQueue = (UARTDRV_Buffer_FifoQueue_t *)&sl_uartdrv_eusart_vcom_rx_buffer, + .txQueue = (UARTDRV_Buffer_FifoQueue_t *)&sl_uartdrv_eusart_vcom_tx_buffer, +}; + + +void sl_uartdrv_init_instances(void){ + UARTDRV_InitEuart(sl_uartdrv_eusart_vcom_handle, &sl_uartdrv_eusart_init_vcom); + sl_uartdrv_set_default(sl_uartdrv_eusart_vcom_handle); +} + +sl_status_t sl_uartdrv_set_default(UARTDRV_Handle_t handle) +{ + sl_status_t status = SL_STATUS_INVALID_HANDLE; + + if (handle != NULL) { + sli_uartdrv_default_handle = handle; + status = SL_STATUS_OK; + } + + return status; +} + +UARTDRV_Handle_t sl_uartdrv_get_default(void) +{ + return sli_uartdrv_default_handle; +} diff --git a/matter/efr32/mgm26/BRD4350A/autogen/sl_uartdrv_instances.h b/matter/efr32/mgm26/BRD4350A/autogen/sl_uartdrv_instances.h new file mode 100644 index 0000000000..83202285e9 --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/autogen/sl_uartdrv_instances.h @@ -0,0 +1,36 @@ +#ifndef SL_UARTDRV_INSTANCES_H +#define SL_UARTDRV_INSTANCES_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include "sl_status.h" +#include "uartdrv.h" + + +extern UARTDRV_Handle_t sl_uartdrv_eusart_vcom_handle; + +void sl_uartdrv_init_instances(void); + +/***************************************************************************//** + * Set the handle as the default UARTDRV handle. + * + * @param[in] handle UARTDRV handle to set as default. + * + * @return Status result + ******************************************************************************/ +sl_status_t sl_uartdrv_set_default(UARTDRV_Handle_t handle); + +/***************************************************************************//** + * Get the default UARTDRV handle configured. + * + * @return UARTDRV handle + ******************************************************************************/ +UARTDRV_Handle_t sl_uartdrv_get_default(void); + +#ifdef __cplusplus +} +#endif + +#endif // SL_UARTDRV_INSTANCES_H diff --git a/matter/efr32/mgm26/BRD4350A/autogen/sli_mbedtls_config_autogen.h b/matter/efr32/mgm26/BRD4350A/autogen/sli_mbedtls_config_autogen.h new file mode 100644 index 0000000000..d434afc437 --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/autogen/sli_mbedtls_config_autogen.h @@ -0,0 +1,90 @@ +// This is an autogenerated config file, any changes to this file will be overwritten + +#ifndef SLI_MBEDTLS_CONFIG_AUTOGEN_H +#define SLI_MBEDTLS_CONFIG_AUTOGEN_H + +// Added definition check because of DIC specific configs +#ifndef MBEDTLS_MPI_MAX_SIZE +#define MBEDTLS_MPI_MAX_SIZE 32 +#endif + +#define MBEDTLS_AES_C +#define MBEDTLS_ASN1_PARSE_C +#define MBEDTLS_ASN1_WRITE_C +#define MBEDTLS_BASE64_C +//not present in 4187c #define MBEDTLS_CCM_C +#define MBEDTLS_CIPHER_C +//not present in 4187c #define MBEDTLS_CIPHER_MODE_CBC +#define MBEDTLS_CMAC_C +/*not present in 4187c +#define MBEDTLS_SSL_PROTO_DTLS +#define MBEDTLS_SSL_DTLS_ANTI_REPLAY +#define MBEDTLS_SSL_DTLS_HELLO_VERIFY +#define MBEDTLS_SSL_COOKIE_C +#define MBEDTLS_ECP_C +#define MBEDTLS_ECP_DP_SECP192R1_ENABLED +#define MBEDTLS_ECP_DP_SECP224R1_ENABLED +#define MBEDTLS_ECP_DP_SECP256R1_ENABLED +#define MBEDTLS_ECDH_C +#define MBEDTLS_ECDSA_C +#define MBEDTLS_ECDSA_DETERMINISTIC +#define MBEDTLS_HMAC_DRBG_C +#define MBEDTLS_ENTROPY_HARDWARE_ALT +#define MBEDTLS_ENTROPY_RAIL_PRESENT +#define MBEDTLS_MD_C +#define MBEDTLS_ECJPAKE_C +#define MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED +*/ +#define MBEDTLS_BIGNUM_C +#define MBEDTLS_OID_C +#define MBEDTLS_PEM_PARSE_C +#define MBEDTLS_PEM_WRITE_C +#define MBEDTLS_PK_C +#define MBEDTLS_PK_PARSE_C +#define MBEDTLS_PK_WRITE_C +#define MBEDTLS_PLATFORM_C +#define MBEDTLS_PLATFORM_MEMORY +/* not present in 4187c +#define MBEDTLS_ENTROPY_C +#define MBEDTLS_ENTROPY_FORCE_SHA256 +#define MBEDTLS_ENTROPY_MAX_SOURCES 2 +#define MBEDTLS_NO_PLATFORM_ENTROPY +#define MBEDTLS_CTR_DRBG_C +#define MBEDTLS_SHA256_C +#define MBEDTLS_SHA224_C +*/ +#define MBEDTLS_THREADING_C +#define MBEDTLS_THREADING_ALT +/*not present in 4187c +#define MBEDTLS_SSL_TLS_C +#define MBEDTLS_SSL_CLI_C +#define MBEDTLS_SSL_PROTO_TLS1_2 +#define MBEDTLS_SSL_KEEP_PEER_CERTIFICATE +#define MBEDTLS_SSL_SRV_C +*/ +#define MBEDTLS_X509_USE_C +#define MBEDTLS_X509_CREATE_C +#define MBEDTLS_X509_CRT_PARSE_C +// Do not need this feature +// #define MBEDTLS_X509_CRT_WRITE_C +#define MBEDTLS_X509_CRL_PARSE_C +#define MBEDTLS_X509_CSR_PARSE_C +#define MBEDTLS_X509_CSR_WRITE_C +#define MBEDTLS_USE_PSA_CRYPTO +#define MBEDTLS_PSA_CRYPTO_C +#define MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS +#define MBEDTLS_PSA_CRYPTO_CONFIG +//Copied from 4187c +#define MBEDTLS_ECP_C +#define MBEDTLS_ECP_DP_SECP256R1_ENABLED +#define MBEDTLS_ECDSA_C +#define MBEDTLS_MD_C +#define MBEDTLS_PSA_CRYPTO_DRIVERS +#define MBEDTLS_PSA_CRYPTO_STORAGE_C + + + + + + +#endif // SLI_MBEDTLS_CONFIG_AUTOGEN_H diff --git a/matter/efr32/mgm26/BRD4350A/autogen/sli_mbedtls_config_transform_autogen.h b/matter/efr32/mgm26/BRD4350A/autogen/sli_mbedtls_config_transform_autogen.h new file mode 100644 index 0000000000..1c419901e8 --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/autogen/sli_mbedtls_config_transform_autogen.h @@ -0,0 +1,72 @@ +// This is an autogenerated config file, any changes to this file will be overwritten + +#ifndef SLI_MBEDTLS_CONFIG_TRANSFORM_AUTOGEN_H +#define SLI_MBEDTLS_CONFIG_TRANSFORM_AUTOGEN_H + +// Convert CMSIS Markup config defines to mbedTLS specific config defines + +#if SL_MBEDTLS_RSA_NO_CRT + #define MBEDTLS_RSA_NO_CRT +#endif + +// Allow undefining the specified cipher suites +#if defined(SLI_MBEDTLS_AUTODETECT_CIPHERSUITES) + #undef MBEDTLS_SSL_CIPHERSUITES +#endif + +#if SL_MBEDTLS_SSL_MAX_FRAGMENT_LENGTH + #define MBEDTLS_SSL_MAX_FRAGMENT_LENGTH +#endif +#if SL_MBEDTLS_SSL_EXPORT_KEYS + #define MBEDTLS_SSL_EXPORT_KEYS +#endif +#if SL_MBEDTLS_KEY_EXCHANGE_PSK_ENABLED + #define MBEDTLS_KEY_EXCHANGE_PSK_ENABLED +#endif +#if SL_MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED + #define MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED +#endif +#if SL_MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED + #define MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED +#endif +#if SL_MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED + #define MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED +#endif +#if SL_MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED + #define MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED +#endif +#if SL_MBEDTLS_ECP_ENABLE_COMPRESSED_CURVE_PARSING + #define MBEDTLS_ECP_ENABLE_COMPRESSED_CURVE_PARSING +#endif + +#if !defined(MBEDTLS_SSL_IN_CONTENT_LEN) + #define MBEDTLS_SSL_IN_CONTENT_LEN SL_MBEDTLS_SSL_IN_CONTENT_LEN +#endif + +#if !defined(MBEDTLS_SSL_OUT_CONTENT_LEN) + #define MBEDTLS_SSL_OUT_CONTENT_LEN SL_MBEDTLS_SSL_OUT_CONTENT_LEN +#endif + + +#define SLI_SSL_IN_CONTENT_LEN_REQUIREMENT 900 + +// If the SDK requires a certain SSL buffer size, configure Mbed TLS +// to size the buffer to the highest of the user/default or SDK setting. +#if MBEDTLS_SSL_IN_CONTENT_LEN < SLI_SSL_IN_CONTENT_LEN_REQUIREMENT + #undef MBEDTLS_SSL_IN_CONTENT_LEN + #define MBEDTLS_SSL_IN_CONTENT_LEN SLI_SSL_IN_CONTENT_LEN_REQUIREMENT +#endif + + + +#define SLI_SSL_OUT_CONTENT_LEN_REQUIREMENT 900 + +// If the SDK requires a certain SSL buffer size, configure Mbed TLS +// to size the buffer to the highest of the user/default or SDK setting. +#if MBEDTLS_SSL_OUT_CONTENT_LEN < SLI_SSL_OUT_CONTENT_LEN_REQUIREMENT + #undef MBEDTLS_SSL_OUT_CONTENT_LEN + #define MBEDTLS_SSL_OUT_CONTENT_LEN SLI_SSL_OUT_CONTENT_LEN_REQUIREMENT +#endif + + +#endif // SLI_MBEDTLS_CONFIG_TRANSFORM_AUTOGEN_H diff --git a/matter/efr32/mgm26/BRD4350A/autogen/sli_psa_builtin_config_autogen.h b/matter/efr32/mgm26/BRD4350A/autogen/sli_psa_builtin_config_autogen.h new file mode 100644 index 0000000000..ed29b659b0 --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/autogen/sli_psa_builtin_config_autogen.h @@ -0,0 +1,31 @@ +// This is an autogenerated config file, any changes to this file will be overwritten + +#ifndef SLI_PSA_BUILTIN_CONFIG_AUTOGEN_H +#define SLI_PSA_BUILTIN_CONFIG_AUTOGEN_H +/* not in 4187c +#define MBEDTLS_PSA_BUILTIN_KEY_TYPE_AES 1 +#define MBEDTLS_PSA_BUILTIN_ALG_CCM 1 +#define MBEDTLS_PSA_BUILTIN_ALG_CBC_NO_PADDING 1 +#define MBEDTLS_PSA_BUILTIN_ALG_CMAC 1 +#define MBEDTLS_PSA_BUILTIN_KEY_TYPE_ECC_PUBLIC_KEY 1 +#define MBEDTLS_PSA_BUILTIN_KEY_TYPE_ECC_KEY_PAIR_BASIC 1 +#define MBEDTLS_PSA_BUILTIN_KEY_TYPE_ECC_KEY_PAIR_IMPORT 1 +#define MBEDTLS_PSA_BUILTIN_KEY_TYPE_ECC_KEY_PAIR_EXPORT 1 +#define MBEDTLS_PSA_BUILTIN_KEY_TYPE_ECC_KEY_PAIR_GENERATE 1 +#define MBEDTLS_PSA_BUILTIN_ECC_SECP_R1_192 1 +#define MBEDTLS_PSA_BUILTIN_ECC_SECP_R1_224 1 +#define MBEDTLS_PSA_BUILTIN_ECC_SECP_R1_256 1 +#define MBEDTLS_PSA_BUILTIN_ALG_ECDH 1 +#define MBEDTLS_PSA_BUILTIN_ALG_ECDSA 1 +#define MBEDTLS_PSA_BUILTIN_ALG_DETERMINISTIC_ECDSA 1 +#define MBEDTLS_PSA_BUILTIN_PAKE 1 +#define MBEDTLS_PSA_BUILTIN_ALG_JPAKE 1 +#define PSA_WANT_ALG_TLS12_ECJPAKE_TO_PMS 1 +#define SLI_MBEDTLS_PSA_EC_JPAKE_TLS_WORKAROUND +#define MBEDTLS_PSA_BUILTIN_ALG_PBKDF2_AES_CMAC_PRF_128 1 +#define MBEDTLS_PSA_BUILTIN_ALG_SHA_224 1 +#define MBEDTLS_PSA_BUILTIN_ALG_SHA_256 1 +*/ + + +#endif // SLI_PSA_BUILTIN_CONFIG_AUTOGEN_H diff --git a/matter/efr32/mgm26/BRD4350A/autogen/sli_psa_config_autogen.h b/matter/efr32/mgm26/BRD4350A/autogen/sli_psa_config_autogen.h new file mode 100644 index 0000000000..611815313e --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/autogen/sli_psa_config_autogen.h @@ -0,0 +1,39 @@ +// This is an autogenerated config file, any changes to this file will be overwritten + +#ifndef SLI_PSA_CONFIG_AUTOGEN_H +#define SLI_PSA_CONFIG_AUTOGEN_H + +#define PSA_WANT_KEY_TYPE_AES 1 +#define PSA_WANT_ALG_CCM 1 +#define PSA_WANT_ALG_ECB_NO_PADDING 1 //Modified from 4117A +#define PSA_WANT_ALG_CMAC 1 +// not present in 4187c #define PSA_WANT_ALG_SHA_224 1 +#define PSA_WANT_ALG_SHA_256 1 +// not present in 4187c #define PSA_WANT_ALG_ECB_NO_PADDING 1 +#define PSA_WANT_ALG_ECDSA 1 +#define PSA_WANT_ALG_ECDH 1 +// not present in 4187c #define PSA_WANT_KEY_TYPE_ECC_KEY_PAIR 1 +#define PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY 1 +// not present in 4187c #define PSA_WANT_ECC_SECP_R1_192 1 +// not present in 4187c #define PSA_WANT_ECC_SECP_R1_224 1 +#define PSA_WANT_ECC_SECP_R1_256 1 +#define PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_BASIC 1 +#define PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_IMPORT 1 +#define PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_EXPORT 1 +#define PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_GENERATE 1 +// not present in 4187c #define PSA_WANT_ALG_DETERMINISTIC_ECDSA 1 +#define PSA_WANT_ALG_HKDF 1 +#define PSA_WANT_ALG_HMAC 1 +#define PSA_WANT_KEY_TYPE_HMAC 1 +// not present in 4187c #define PSA_WANT_ALG_JPAKE 1 +#define PSA_WANT_ALG_PBKDF2_AES_CMAC_PRF_128 1 +#define PSA_WANT_ALG_TLS12_PRF 1 +#define PSA_WANT_ALG_TLS12_PSK_TO_MS 1 +#define MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG + +#define MBEDTLS_PSA_KEY_SLOT_COUNT (22 + 15 + 1 + SL_PSA_KEY_USER_SLOT_COUNT + 1) +#ifndef SL_PSA_ITS_MAX_FILES +#define SL_PSA_ITS_MAX_FILES (1 + SL_PSA_ITS_USER_MAX_FILES) +#endif + +#endif // SLI_PSA_CONFIG_AUTOGEN_H diff --git a/matter/efr32/mgm26/BRD4350A/config/btconf/gatt_configuration.btconf b/matter/efr32/mgm26/BRD4350A/config/btconf/gatt_configuration.btconf new file mode 100644 index 0000000000..4d1efd9725 --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/config/btconf/gatt_configuration.btconf @@ -0,0 +1,99 @@ + + + + + + + Abstract: The generic_access service contains generic information about the device. All available Characteristics are readonly. + + + + + Empty Example + + + + + + + + + Abstract: The external appearance of this device. The values are composed of a category (10-bits) and sub-categories (6-bits). + 0000 + + + + + + + + + Abstract: The Device Information Service exposes manufacturer and/or vendor information about a device. Summary: This service exposes manufacturer information about a device. The Device Information Service is instantiated as a Primary Service. Only one instance of the Device Information Service is exposed on a device. + + + + Abstract: The value of this characteristic is a UTF-8 string representing the name of the manufacturer of the device. + Silicon Labs + + + + + + + + Abstract: The value of this characteristic is a UTF-8 string representing the model number assigned by the device vendor. + Blue Gecko + + + + + + + + Abstract: The SYSTEM ID characteristic consists of a structure with two fields. The first field are the LSOs and the second field contains the MSOs. This is a 64-bit structure which consists of a 40-bit manufacturer-defined identifier concatenated with a 24 bit unique Organizationally Unique Identifier (OUI). The OUI is issued by the IEEE Registration Authority (http://standards.ieee.org/regauth/index.html) and is required to be used in accordance with IEEE Standard 802-2001.6 while the least significant 40 bits are manufacturer defined. If System ID generated based on a Bluetooth Device Address, it is required to be done as follows. System ID and the Bluetooth Device Address have a very similar structure: a Bluetooth Device Address is 48 bits in length and consists of a 24 bit Company Assigned Identifier (manufacturer defined identifier) concatenated with a 24 bit Company Identifier (OUI). In order to encapsulate a Bluetooth Device Address as System ID, the Company Identifier is concatenated with 0xFFFE followed by the Company Assigned Identifier of the Bluetooth Address. For more guidelines related to EUI-64, refer to http://standards.ieee.org/develop/regauth/tut/eui64.pdf. Examples: If the system ID is based of a Bluetooth Device Address with a Company Identifier (OUI) is 0x123456 and the Company Assigned Identifier is 0x9ABCDE, then the System Identifier is required to be 0x123456FFFE9ABCDE. + 000102030405 + + + + + + + + + Custom service + + + + Custom characteristic + 00 + + + + + + + + + Custom characteristic + 00 + + + + + + + + + + Custom characteristic + 00 + + + + + + + + + + diff --git a/matter/efr32/mgm26/BRD4350A/config/buffer_pool_allocator_config.h b/matter/efr32/mgm26/BRD4350A/config/buffer_pool_allocator_config.h new file mode 100644 index 0000000000..2c3fd2e677 --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/config/buffer_pool_allocator_config.h @@ -0,0 +1,29 @@ +/***************************************************************************//** + * @file buffer_pool_allocator_config.h + * @brief Configuration file for buffer pool allocator. + * @copyright Copyright 2015 Silicon Laboratories, Inc. www.silabs.com + ******************************************************************************/ + +#ifndef __BUFFER_POOL_ALLOCATOR_CONFIG_H__ +#define __BUFFER_POOL_ALLOCATOR_CONFIG_H__ + +// <<< Use Configuration Wizard in Context Menu >>> +// Memory Manager Configuration + +// Number Buffer Pools +// <0-256:1> +// Default: 5 +#define BUFFER_POOL_ALLOCATOR_POOL_SIZE 5 + +// Length of Each Buffer Pool +// <0-1024:1> +// Default: 256 +#define BUFFER_POOL_ALLOCATOR_BUFFER_SIZE_MAX 256 + +// Clear Each Newly Allocated Buffer +#define BUFFER_POOL_ALLOCATOR_CLEAR_ON_INIT 0 + +// +// <<< end of configuration section >>> + +#endif // __BUFFER_POOL_ALLOCATOR_CONFIG_H__ diff --git a/matter/efr32/mgm26/BRD4350A/config/circular_queue_config.h b/matter/efr32/mgm26/BRD4350A/config/circular_queue_config.h new file mode 100644 index 0000000000..81a7173d6a --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/config/circular_queue_config.h @@ -0,0 +1,23 @@ +/***************************************************************************//** + * @file circular_queue_config.h + * @brief Configuration file for circular queue. + * @copyright Copyright 2015 Silicon Laboratories, Inc. www.silabs.com + ******************************************************************************/ + +#ifndef __CIRCULAR_QUEUE_CONFIG_H__ +#define __CIRCULAR_QUEUE_CONFIG_H__ + +// <<< Use Configuration Wizard in Context Menu >>> +// Circular Queue Configuration + +// Max Queue Length +// <0-256:1> +// Default: 5 +#ifndef CIRCULAR_QUEUE_LEN_MAX +#define CIRCULAR_QUEUE_LEN_MAX 16 +#endif + +// +// <<< end of configuration section >>> + +#endif // __CIRCULAR_QUEUE_CONFIG_H__ diff --git a/matter/efr32/mgm26/BRD4350A/config/dmadrv_config.h b/matter/efr32/mgm26/BRD4350A/config/dmadrv_config.h new file mode 100644 index 0000000000..ed105e4f36 --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/config/dmadrv_config.h @@ -0,0 +1,26 @@ +#ifndef DMADRV_CONFIG_H +#define DMADRV_CONFIG_H + +// <<< Use Configuration Wizard in Context Menu >>> + +// DMA interrupt priority <0-15> +// Priority of the DMA interrupt. Smaller number equals higher priority. +// Default: 8 +#define EMDRV_DMADRV_DMA_IRQ_PRIORITY 8 + +// Number of available channels <1-8> +// Number of DMA channels supported by the driver. A lower channel count +// will reduce RAM memory footprint. The default is to support all channels +// on the device. +// Default: 8 +#define EMDRV_DMADRV_DMA_CH_COUNT 8 + +// Number of fixed priority channels +// This will configure channels [0, CH_PRIORITY - 1] as fixed priority, +// and channels [CH_PRIORITY, CH_COUNT] as round-robin. +// Default: 0 +#define EMDRV_DMADRV_DMA_CH_PRIORITY 0 + +// <<< end of configuration section >>> + +#endif // DMADRV_CONFIG_H diff --git a/matter/efr32/mgm26/BRD4350A/config/emlib_core_debug_config.h b/matter/efr32/mgm26/BRD4350A/config/emlib_core_debug_config.h new file mode 100644 index 0000000000..07ee9b9efb --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/config/emlib_core_debug_config.h @@ -0,0 +1,45 @@ +/***************************************************************************//** + * @file + * @brief emlib_core Configuration + ******************************************************************************* + * # License + * Copyright 2019 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +#ifndef EM_CORE_DEBUG_CONFIG_H +#define EM_CORE_DEBUG_CONFIG_H + +// <<< Use Configuration Wizard in Context Menu >>> + +// Core Configuration + +// Enables measuring of interrupt disable time for debugging purposes. +// Default: 0 +#define SL_EMLIB_CORE_ENABLE_INTERRUPT_DISABLED_TIMING 0 + +// + +// <<< end of configuration section >>> +#endif // EM_CORE_CONFIG_H diff --git a/matter/efr32/mgm26/BRD4350A/config/nvm3_default_config.h b/matter/efr32/mgm26/BRD4350A/config/nvm3_default_config.h new file mode 100644 index 0000000000..2bf415f943 --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/config/nvm3_default_config.h @@ -0,0 +1,45 @@ +#ifndef NVM3_DEFAULT_CONFIG_H +#define NVM3_DEFAULT_CONFIG_H + +// <<< Use Configuration Wizard in Context Menu >>> + +// NVM3 Default Instance Configuration + +#ifndef NVM3_DEFAULT_CACHE_SIZE +// NVM3 Default Instance Cache Size +// Number of NVM3 objects to cache. To reduce access times this number +// should be equal to or higher than the number of NVM3 objects in the +// default NVM3 instance. +// Default: 200 +#define NVM3_DEFAULT_CACHE_SIZE 200 +#endif + +#ifndef NVM3_DEFAULT_MAX_OBJECT_SIZE +// NVM3 Default Instance Max Object Size +// Max NVM3 object size that can be stored. +// Default: 254 +#define NVM3_DEFAULT_MAX_OBJECT_SIZE 4092 +#endif + +#ifndef NVM3_DEFAULT_REPACK_HEADROOM +// NVM3 Default Instance User Repack Headroom +// Headroom determining how many bytes below the forced repack limit the user +// repack limit should be placed. The default is 0, which means the user and +// forced repack limits are equal. +// Default: 0 +#define NVM3_DEFAULT_REPACK_HEADROOM 0 +#endif + +#ifndef NVM3_DEFAULT_NVM_SIZE +// NVM3 Default Instance Size +// Size of the NVM3 storage region in flash. This size should be aligned with +// the flash page size of the device. +// Default: 40960 +#define NVM3_DEFAULT_NVM_SIZE 40960 +#endif + +// + +// <<< end of configuration section >>> + +#endif // NVM3_DEFAULT_CONFIG_H diff --git a/matter/efr32/mgm26/BRD4350A/config/psa_crypto_config.h b/matter/efr32/mgm26/BRD4350A/config/psa_crypto_config.h new file mode 100644 index 0000000000..20703b41d2 --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/config/psa_crypto_config.h @@ -0,0 +1,170 @@ +#ifndef PSA_CRYPTO_CONFIG_H +#define PSA_CRYPTO_CONFIG_H + +// ----------------------------------------------------------------------------- +// User exposed config options + +// <<< Use Configuration Wizard in Context Menu >>> + +// Key management configuration + +// PSA User Maximum Open Keys Count <0-128> +// Maximum amount of keys that the user application will have open +// simultaneously. In context of PSA Crypto, an open key means any key +// either stored in RAM (lifetime set to PSA_KEY_LIFETIME_VOLATILE), or +// used as part of a cryptographic operation. +// When using a key for a multi-part (setup/update/finish) operation, a key +// is considered to be open from the moment the operation is successfully +// setup, until it finishes or aborts. +// When an application tries to open more keys than this value accounts for, +// the PSA API may return PSA_ERROR_INSUFFICIENT_MEMORY. Keep in mind that +// other software included in the application (e.g. wireless protocol stacks) +// also can have a need to have open keys in PSA Crypto. This could lead to +// a race condition when the application key slot count is set too low for +// the actual usage of the application, as a software stack may not fail +// gracefully in case an application opens more than its declared amount of +// keys, thereby precluding the stack from functioning. +// Default: 4 +#define SL_PSA_KEY_USER_SLOT_COUNT (4) + +// PSA Maximum User Persistent Keys Count <0-1024> +// Maximum amount of keys (or other files) that can be stored persistently +// by the application through the PSA interface, when persistent storage +// support for PSA Crypto is included in the project. +// Due to caching logic, this setting does have an impact on static RAM usage. +// Note that this number is added to the potential requirements from other +// software components in the project, such that the total amount of keys +// which can be stored through the ITS backend can be higher than what is +// configured here. +// +// WARNING: When changing this setting on an application that is already +// deployed, and thus will get the change through an application upgrade, +// care should be taken to ensure that the setting is only ever increased, +// and never decreased. Decreasing this setting might cause previously +// stored keys/files to become inaccessible. +// +// It is not possible to change this setting when using V3 ITS Driver. +// The file-storage indexing is dependent on the maximum number of files, +// and if SL_PSA_ITS_USER_MAX_FILES is changed, ITS should be cleared and +// all files need to be stored again. +// Default: 128 +#define SL_PSA_ITS_USER_MAX_FILES (128) + +// Enable V1 Format Support For ITS Files <0-1> +// Devices that used PSA ITS together with gecko_sdk_3.1.x or earlier +// might have keys (or other files) stored in V1 format. +// If no v1 files are used, its support can be disabled for space +// optimization. +// Default: 0 +#define SL_PSA_ITS_SUPPORT_V1_DRIVER 0 + +// Enable V2 ITS Driver Support <0-1> +// Devices that have used GSDK 4.1.x and earlier, and used ITS have the keys +// (or other files) stored using different address range. Enabling this +// config option adds upgrade code which converts V2 (and V1 if +// supported) format ITS keys/files to the latest V3 format. Update is +// fully automatic, needs to be run once and require extra flash space of +// approximately the size of the largest key. +// V1 ITS driver support can be disabled if the device has never used ITS +// driver before in GSDK 4.1.x and earlier, or the keys has been already +// migrated. +// Default: 0 +#define SL_PSA_ITS_SUPPORT_V2_DRIVER 0 + +// Enable support for V3 ITS Driver <0-1> +// Devices that have used GSDK 4.1.x and earlier, and used ITS have the keys +// (or other files) stored using different address range. In rare case +// that those devices have full nvm3 and not enough space for the +// upgrade, (that requires an extra space to store largest key in memory +// twice), this config option can disable v3 driver and use v2 one. +// To upgrade the device, make space for the upgrade, and enable v3 driver again. +// +// WARNING: When using V3 driver, it is not possible to increase or decrease +// the value of SL_PSA_ITS_USER_MAX_FILES. If the change of +// SL_PSA_ITS_USER_MAX_FILES is required, ITS should be cleared and +// all files need to be stored again. +// Default: 1 +#define SL_PSA_ITS_SUPPORT_V3_DRIVER 1 + +// Built-in AES Key Mode of Operation +// CTR Mode +// CFB Mode +// OFB Mode +// ECB Mode +// CBC Mode (no padding) +// CBC Mode (PKCS#7 padding) +// PSA Crypto only allows one specific usage algorithm per built-in key ID. +// Default: PSA_ALG_CTR +#define SL_SE_BUILTIN_KEY_AES128_ALG_CONFIG (PSA_ALG_CTR) + +#ifndef SL_CRYPTOACC_BUILTIN_KEY_PUF_ALG +// Built-in PUF Key Algorithm +// PBKDF2 (CMAC-AES-128-PRF) +// CMAC +// PSA Crypto only allows one specific usage algorithm per built-in key ID. +// It is recommended to only use the PUF key for deriving further key +// material. +// Default: PSA_ALG_PBKDF2_AES_CMAC_PRF_128 +#define SL_CRYPTOACC_BUILTIN_KEY_PUF_ALG (PSA_ALG_PBKDF2_AES_CMAC_PRF_128) +#endif // SL_CRYPTOACC_BUILTIN_KEY_PUF_ALG + +// + +// Power optimization configuration + +// Store already-generated random bytes before putting the device to sleep +// Using the hardware TRNG (for example through psa_generate_random()) will +// consume a non-negligible amount of power. A start-up routine must pass +// and a relatively large minimum amount of random bytes will be generated. +// Use cases where the device is frequently entering EM2/EM3 and thereafter +// consumes a small amount of data from the TRNG may benefit from buffering +// the existing random bytes before putting the device to sleep. These +// buffered bytes are then consumed until exhaustion before the TRNG needs +// to be initialized and used again. +// +// NOTE: this configuration option is only applicable for devices with a +// Virtual Secure Engine (VSE), and requires the 'Power Manager' component +// to be included in the project. +// +// Default: 0 +#define SL_VSE_BUFFER_TRNG_DATA_DURING_SLEEP (0) + +// Number of random words to buffer before putting the device to sleep <1-63> +// This option can be used to decrease the amount of random words that +// (if enabled) are buffered before the device enters EM2/EM3. Lowering this +// number will result in less static RAM usage, but also means that the TRNG +// potentially has to be initialized more times--leading to increased power +// consumption. By default this option in configured to buffer as much TRNG +// data as possible (limited by the depth of the TRNG FIFO). +// +// NOTE: this configuration option is only applicable when +// SL_VSE_BUFFER_TRNG_DATA_DURING_SLEEP is enabled. +// +// Default: 63 +#define SL_VSE_MAX_TRNG_WORDS_BUFFERED_DURING_SLEEP (63) +// + +// + +// <<< end of configuration section >>> + +// ----------------------------------------------------------------------------- +// Sub-files + +#if defined(SLI_PSA_CONFIG_AUTOGEN_OVERRIDE_FILE) + #include SLI_PSA_CONFIG_AUTOGEN_OVERRIDE_FILE +#else + #include "sli_psa_config_autogen.h" +#endif + +#if defined(TFM_CONFIG_SL_SECURE_LIBRARY) + #include "sli_psa_tfm_translation.h" +#endif + +#if SL_MBEDTLS_DRIVERS_ENABLED + #include "sli_psa_acceleration.h" +#endif + +#include "sli_psa_builtin_config_autogen.h" + +#endif // PSA_CRYPTO_CONFIG_H diff --git a/matter/efr32/mgm26/BRD4350A/config/sl_802154_radio_priority_config.h b/matter/efr32/mgm26/BRD4350A/config/sl_802154_radio_priority_config.h new file mode 100644 index 0000000000..77334ba2cb --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/config/sl_802154_radio_priority_config.h @@ -0,0 +1,57 @@ +/***************************************************************************//** + * @brief Unified radio scheduler priority configuration for 802.15.4 stacks + * + ******************************************************************************* + * # License + * Copyright 2024 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * The licensor of this software is Silicon Laboratories Inc. Your use of this + * software is governed by the terms of Silicon Labs Master Software License + * Agreement (MSLA) available at + * www.silabs.com/about-us/legal/master-software-license-agreement. This + * software is distributed to you in Source Code format and is governed by the + * sections of the MSLA applicable to Source Code. + * + ******************************************************************************/ +#ifndef __SL_802154_RADIO_PRIORITY_CONFIG_H__ +#define __SL_802154_RADIO_PRIORITY_CONFIG_H__ + +// <<< Use Configuration Wizard in Context Menu >>> + +// 802.15.4 Radio Priorities + +// TX priority minimum +// <1-255:1> +// Default: 100 +// The 802.15.4 TX priority for the first try of a TX message +#define SL_802154_RADIO_PRIO_TX_MIN 100 + +// TX priority step +// <1-50:1> +// Default: 2 +// The delta by which the TX priority for 802.15.4 stacks decrements for each retry of the packet +#define SL_802154_RADIO_PRIO_TX_STEP 2 + +// TX priority maximum +// <1-255:1> +// Default: 80 +// The highest 802.15.4 TX priority of a message. TX priorities are elevated based on number of retries and the step value specified +#define SL_802154_RADIO_PRIO_TX_MAX 80 + +// Active RX priority +// <1-255:1> +// Default: 255 +// The 802.15.4 active RX priority. Active RX is when the device is receiving a packet +#define SL_802154_RADIO_PRIO_ACTIVE_RX_VALUE 255 + +// Background RX priority +// <1-255:1> +// Default: 255 +// The 802.15.4 background RX priority. Background RX is the general, passive receive state when the device is not transmitting anything +#define SL_802154_RADIO_PRIO_BACKGROUND_RX_VALUE 255 + +// + +// <<< end of configuration section >>> +#endif //__SL_802154_RADIO_PRIORITY_CONFIG_H__ diff --git a/matter/efr32/mgm26/BRD4350A/config/sl_bluetooth_advertiser_config.h b/matter/efr32/mgm26/BRD4350A/config/sl_bluetooth_advertiser_config.h new file mode 100644 index 0000000000..00163cd9ab --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/config/sl_bluetooth_advertiser_config.h @@ -0,0 +1,45 @@ +/***************************************************************************//** + * @file + * @brief Bluetooth Advertiser configuration + ******************************************************************************* + * # License + * Copyright 2023 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the + * use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software in a + * product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +#ifndef SL_BT_ADVERTISER_CONFIG_H +#define SL_BT_ADVERTISER_CONFIG_H + +// <<< Use Configuration Wizard in Context Menu >>> +// Max number of advertising sets reserved for user <0-255> +// Default: 1 +// Define the number of advertising sets that the application needs to use concurrently. Note that all types of advertising uses the same pool of advertising sets, but periodic advertising has extra configuration to define the number of advertising sets that are capable of periodic advertising. +// +// Specifically, if the component "bluetooth_feature_periodic_advertiser" is used, its configuration SL_BT_CONFIG_MAX_PERIODIC_ADVERTISERS specifies how many of the SL_BT_CONFIG_USER_ADVERTISERS advertising sets are capable of periodic advertising. Similarly, if the component bluetooth_feature_pawr_advertiser is used, its configuration SL_BT_CONFIG_MAX_PAWR_ADVERTISERS specifies how many of the periodic advertising sets are capable of Periodic Advertising with Responses. +// +// The configuration values must satisfy the condition SL_BT_CONFIG_USER_ADVERTISERS >= SL_BT_CONFIG_MAX_PERIODIC_ADVERTISERS >= SL_BT_CONFIG_MAX_PAWR_ADVERTISERS. +#define SL_BT_CONFIG_USER_ADVERTISERS (1) +// <<< end of configuration section >>> + +#endif diff --git a/matter/efr32/mgm26/BRD4350A/config/sl_bluetooth_config.h b/matter/efr32/mgm26/BRD4350A/config/sl_bluetooth_config.h new file mode 100644 index 0000000000..8ff474a7c2 --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/config/sl_bluetooth_config.h @@ -0,0 +1,175 @@ +/***************************************************************************//** + * @file + * @brief Bluetooth Stack configuration + ******************************************************************************* + * # License + * Copyright 2023 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the + * use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software in a + * product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +#ifndef SL_BLUETOOTH_CONFIG_H +#define SL_BLUETOOTH_CONFIG_H +#if defined(SL_COMPONENT_CATALOG_PRESENT) +#include "sl_component_catalog.h" +#endif + +// <<< Use Configuration Wizard in Context Menu >>> + +// Bluetooth Stack Configuration + +#ifdef SL_CATALOG_BLUETOOTH_FEATURE_CONNECTION_PRESENT +#include "sl_bluetooth_connection_config.h" +#else +#define SL_BT_CONFIG_MAX_CONNECTIONS (0) +#endif + +// Max number of connections reserved by user application and components +#define SL_BT_CONFIG_MAX_CONNECTIONS_SUM (SL_BT_CONFIG_MAX_CONNECTIONS + SL_BT_COMPONENT_CONNECTIONS) + +#ifdef SL_CATALOG_BLUETOOTH_FEATURE_ADVERTISER_PRESENT +#include "sl_bluetooth_advertiser_config.h" +#else +#define SL_BT_CONFIG_USER_ADVERTISERS (0) +#endif + +#define SL_BT_CONFIG_MAX_ADVERTISERS (SL_BT_CONFIG_USER_ADVERTISERS + SL_BT_COMPONENT_ADVERTISERS) + +// Max number of software timers <0-16> +// Default: 4 +// Define the number of software timers the application needs. Each timer needs resources from the stack to be implemented. Increasing amount of soft timers may cause degraded performance in some use cases. +#define SL_BT_CONFIG_MAX_SOFTWARE_TIMERS (4) + +// Buffer memory size for Bluetooth stack +// Default: 3150 +// Define buffer memory size for running Bluetooth stack and buffering data over Bluetooth connections, +// advertising and scanning. The default value is an estimation for achieving adequate throughput +// and supporting multiple simultaneous connections. Consider increasing this value for +// higher data throughput over connections, advertising or scanning long advertisement data. +#define SL_BT_CONFIG_BUFFER_SIZE (3150) + +// Enable using a custom Bluetooth address stored in NVM3 +// Enable or disable using a custom Bluetooth address stored the Bluetooth space of NVM3. When enabled, +// the Bluetooth stack sets the address as the Bluetooth identity address of the device if a valid address +// is found in NVM3. +// Default: 1 +#define SL_BT_CONFIG_SET_CUSTOM_ADDRESS_FROM_NVM3 (1) +// + +// Enable setting the HFXO CTUNE with a value stored in the Bluetooth space of NVM3. +// Enable or disable setting the HFXO CTUNE with a value stored in the Bluetooth space of NVM3. When enabled, the +// Bluetooth stack sets the HFXO CTUNE at Bluetooth starting phase if a CTUNE value is found in NVM3. This +// operation will override the CTUNE that is set to with the value stored in the MFG_CTUNE token or the +// configuration value in the Clock Manager. +// Setting the HFXO CTUNE with this method is deprecated. Currently the functionality is provided for keeping +// backwards compatibility with legacy SDKs, and the support will be discontinued in future SDK releases. +// The recommended method is to store CTUNE value in the MFG_CTUNE token. +// Default: 0 +#define SL_BT_CONFIG_SET_CTUNE_FROM_NVM3 (0) +// + +// End Bluetooth Stack Configuration + +// TX Power Levels + +// Minimum radiated TX power level in 0.1dBm unit +// Default: -30 (-3 dBm) +// Configure the minimum radiated TX power level for Bluetooth connections and DTM testing. +// This configuration is used for power control on Bluetooth connections +// if the LE Power Control feature is enabled. +// When this configuration is passed into stack initialization, the stack +// will select the closest value that the device supports. +// API sl_bt_system_get_tx_power_setting() can be used to query the selected value. +#define SL_BT_CONFIG_MIN_TX_POWER (-30) + +// Maximum radiated TX power level in 0.1dBm unit +// Default: 80 (8 dBm) +// Configure the maximum radiated TX power level for Bluetooth connections, +// advertising, scanning and DTM testing. +// When this configuration is passed into stack initialization, the stack +// will select the closest value that the device supports. +// API sl_bt_system_get_tx_power_setting() can be used to query the selected value. +#define SL_BT_CONFIG_MAX_TX_POWER (80) + +// End TX Power Levels + +// RF Path + +// RF TX path gain in 0.1dBm unit +// Default: 0 +// The Bluetooth stack takes TX RF path gain into account when adjusting transmitter +// output power. Power radiated from the antenna then matches the application request. +// A negative value indicates some power loss in the path. For example, +// with radiated TX power set to +10 dBm and this configuration to -10 +// (i.e., 1 dBm loss), the transmitter output power will be set to +11 dBm. +#define SL_BT_CONFIG_RF_PATH_GAIN_TX (0) + +// RF RX path gain in 0.1dBm unit +// Default: 0 +// RX RF path gain is used to compensate the RSSI reports from the Bluetooth Stack. +#define SL_BT_CONFIG_RF_PATH_GAIN_RX (0) + +// End RF Path + +// <<< end of configuration section >>> + +/** + * By default, Bluetooth requires accurate LF clock for EM2. If the component + * catalog presents, an inaccurate LF clock for EM2 can be used if the Bluetooth + * connection, periodic advertising and periodic advertising synchronization + * features are known to not present. + */ +#define BT_EM2_LFCLK_REQ_FLAG 0 + +#if defined(SL_COMPONENT_CATALOG_PRESENT) +#if !defined(SL_CATALOG_BLUETOOTH_FEATURE_CONNECTION_PRESENT) \ + && !defined(SL_CATALOG_BLUETOOTH_FEATURE_PERIODIC_ADV_PRESENT) \ + && !defined(SL_CATALOG_BLUETOOTH_FEATURE_SYNC_PRESENT) + #undef BT_EM2_LFCLK_REQ_FLAG + #define BT_EM2_LFCLK_REQ_FLAG SL_BT_CONFIG_FLAG_INACCURATE_LFCLK_EM2 +#endif +#endif // SL_COMPONENT_CATALOG_PRESENT + +#ifdef SL_CATALOG_KERNEL_PRESENT + #define SL_BT_CONFIG_FLAGS (SL_BT_CONFIG_FLAG_RTOS | BT_EM2_LFCLK_REQ_FLAG) +#else + #define SL_BT_CONFIG_FLAGS (BT_EM2_LFCLK_REQ_FLAG) +#endif // SL_CATALOG_KERNEL_PRESENT + +#include "sl_bt_stack_config.h" + +#define SL_BT_CONFIG_DEFAULT \ + { \ + .config_flags = SL_BT_CONFIG_FLAGS, \ + .bluetooth.max_buffer_memory = SL_BT_CONFIG_BUFFER_SIZE, \ + .scheduler_callback = NULL, \ + .stack_schedule_callback = NULL, \ + .gattdb = &gattdb, \ + .max_timers = SL_BT_CONFIG_MAX_SOFTWARE_TIMERS, \ + .rf.tx_gain = SL_BT_CONFIG_RF_PATH_GAIN_TX, \ + .rf.rx_gain = SL_BT_CONFIG_RF_PATH_GAIN_RX, \ + .rf.tx_min_power = SL_BT_CONFIG_MIN_TX_POWER, \ + .rf.tx_max_power = SL_BT_CONFIG_MAX_TX_POWER, \ + } + +#endif // SL_BLUETOOTH_CONFIG_H diff --git a/matter/efr32/mgm26/BRD4350A/config/sl_bluetooth_connection_config.h b/matter/efr32/mgm26/BRD4350A/config/sl_bluetooth_connection_config.h new file mode 100644 index 0000000000..73a382509d --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/config/sl_bluetooth_connection_config.h @@ -0,0 +1,48 @@ +/***************************************************************************//** + * @file + * @brief Bluetooth Connection configuration + ******************************************************************************* + * # License + * Copyright 2023 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the + * use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software in a + * product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +#ifndef SL_BT_CONNECTION_CONFIG_H +#define SL_BT_CONNECTION_CONFIG_H + +// <<< Use Configuration Wizard in Context Menu >>> +// Max number of connections reserved for user <0-32> +// Default: 4 +// Define the number of connections the application needs. +#define SL_BT_CONFIG_MAX_CONNECTIONS (4) + +// Preferred maximum TX payload octets <27-251> +// Default: 251 +// Define the preferred maximum TX payload octets that will be used on connections. +// This value is set to the controller as the default suggested data length when +// Bluetooth stack is started. +#define SL_BT_CONFIG_CONNECTION_DATA_LENGTH (251) + +// <<< end of configuration section >>> +#endif diff --git a/matter/efr32/mgm26/BRD4350A/config/sl_board_control_config.h b/matter/efr32/mgm26/BRD4350A/config/sl_board_control_config.h new file mode 100644 index 0000000000..0d930ac053 --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/config/sl_board_control_config.h @@ -0,0 +1,72 @@ +/***************************************************************************//** + * @file + * @brief Board Control + ******************************************************************************* + * # License + * Copyright 2022 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +#ifndef SL_BOARD_CONTROL_CONFIG_H +#define SL_BOARD_CONTROL_CONFIG_H + +// <<< Use Configuration Wizard in Context Menu >>> + +// Enable Virtual COM UART +// Default: 0 +#define SL_BOARD_ENABLE_VCOM 0 + +// Enable Display +// Default: 0 +#define SL_BOARD_ENABLE_DISPLAY 0 + +// Enable Relative Humidity and Temperature sensor +// Default: 0 +#define SL_BOARD_ENABLE_SENSOR_RHT 0 + +// <<< end of configuration section >>> + +// <<< sl:start pin_tool >>> + +// SL_BOARD_ENABLE_VCOM +// $[GPIO_SL_BOARD_ENABLE_VCOM] +#define SL_BOARD_ENABLE_VCOM_PORT SL_GPIO_PORT_B +#define SL_BOARD_ENABLE_VCOM_PIN 4 +// [GPIO_SL_BOARD_ENABLE_VCOM]$ + +// SL_BOARD_ENABLE_DISPLAY +// $[GPIO_SL_BOARD_ENABLE_DISPLAY] +#define SL_BOARD_ENABLE_DISPLAY_PORT SL_GPIO_PORT_D +#define SL_BOARD_ENABLE_DISPLAY_PIN 3 +// [GPIO_SL_BOARD_ENABLE_DISPLAY]$ + +// SL_BOARD_ENABLE_SENSOR_RHT +// $[GPIO_SL_BOARD_ENABLE_SENSOR_RHT] +#define SL_BOARD_ENABLE_SENSOR_RHT_PORT SL_GPIO_PORT_D +#define SL_BOARD_ENABLE_SENSOR_RHT_PIN 2 +// [GPIO_SL_BOARD_ENABLE_SENSOR_RHT]$ + +// <<< sl:end pin_tool >>> + +#endif // SL_BOARD_CONTROL_CONFIG_H diff --git a/matter/efr32/mgm26/BRD4350A/config/sl_bt_host_adaptation_config.h b/matter/efr32/mgm26/BRD4350A/config/sl_bt_host_adaptation_config.h new file mode 100644 index 0000000000..5d3b46fecf --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/config/sl_bt_host_adaptation_config.h @@ -0,0 +1,52 @@ +/***************************************************************************//** + * @file + * @brief Configuration of the Bluetooth host stack system adaptation layer + ******************************************************************************* + * # License + * Copyright 2023 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the + * use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software in a + * product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +#ifndef SL_BT_HOST_ADAPTATION_CONFIG_H +#define SL_BT_HOST_ADAPTATION_CONFIG_H + +// <<< Use Configuration Wizard in Context Menu >>> + +// Bluetooth Host Adaptation Configuration + +// Radio interrupt priority in baremetal applications <1..7:1> +// Default: 4 +// Define the ISR priority for radio interrupts in baremetal applications. The Bluetooth host stack sets this priority when the Bluetooth stack is started. +#define SL_BT_HOST_ADAPTATION_RADIO_IRQ_PRIORITY (4) + +// Linklayer interrupt priority in baremetal applications <1..7:1> +// Default: 4 +// Define the ISR priority for linklayer interrupts in baremetal applications. The Bluetooth host stack sets this priority when the Bluetooth stack is started. +#define SL_BT_HOST_ADAPTATION_LINKLAYER_IRQ_PRIORITY (5) + +// Bluetooth Host Adaptation Configuration + +// <<< end of configuration section >>> + +#endif // SL_BT_HOST_ADAPTATION_CONFIG_H diff --git a/matter/efr32/mgm26/BRD4350A/config/sl_bt_rtos_config.h b/matter/efr32/mgm26/BRD4350A/config/sl_bt_rtos_config.h new file mode 100644 index 0000000000..b80c07967d --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/config/sl_bt_rtos_config.h @@ -0,0 +1,44 @@ +/***************************************************************************//** + * @file + * @brief Bluetooth RTOS configuration + ******************************************************************************* + * # License + * Copyright 2023 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the + * use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software in a + * product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +#ifndef SL_BT_RTOS_CONFIG_H +#define SL_BT_RTOS_CONFIG_H + +#include + +#if defined(_SILICON_LABS_32B_SERIES_2) +#include "sl_bt_rtos_config_s2.h" +#elif defined(_SILICON_LABS_32B_SERIES_3) +#include "sl_bt_rtos_config_s3.h" +#else +#error "Device not supported" +#endif + +#endif // SL_BT_RTOS_CONFIG_H diff --git a/matter/efr32/mgm26/BRD4350A/config/sl_bt_rtos_config_s2.h b/matter/efr32/mgm26/BRD4350A/config/sl_bt_rtos_config_s2.h new file mode 100644 index 0000000000..eb4fe3ea24 --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/config/sl_bt_rtos_config_s2.h @@ -0,0 +1,84 @@ +/***************************************************************************//** + * @file + * @brief Bluetooth RTOS configuration + ******************************************************************************* + * # License + * Copyright 2024 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the + * use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software in a + * product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +#ifndef SL_BT_RTOS_CONFIG_S2_H +#define SL_BT_RTOS_CONFIG_S2_H + +// <<< Use Configuration Wizard in Context Menu >>> + +// Priority Configuration for Bluetooth RTOS Tasks + +// Bluetooth link layer task priority +// Default: 52 (CMSIS-RTOS2 osPriorityRealtime4) +// Define the priority of the Bluetooth link layer task. This must be a valid +// priority value from CMSIS-RTOS2 osPriority_t definition. The link layer +// task must have the highest priority in these three Bluetooth RTOS tasks. +#define SL_BT_RTOS_LINK_LAYER_TASK_PRIORITY (52) + +// Bluetooth link layer task stack size in bytes +// Default: 1000 +// Define the stack size of the Bluetooth link layer task. The value is in bytes +// and will be word aligned when it is applied at the task creation. +#define SL_BT_RTOS_LINK_LAYER_TASK_STACK_SIZE 1024 + +// Bluetooth host stack task priority +// Default: 51 (CMSIS-RTOS2 osPriorityRealtime3) +// Define the priority of the Bluetooth host stack task. This must be a +// valid priority value from CMSIS-RTOS2 osPriority_t definition. +#define SL_BT_RTOS_HOST_STACK_TASK_PRIORITY (51) + +// Bluetooth host stack task stack size in bytes +// Default: 2000 +// Define the stack size of the Bluetooth host stack task. The value is in bytes +// and will be word aligned when it is applied at the task creation. +#define SL_BT_RTOS_HOST_STACK_TASK_STACK_SIZE 2048 + +// Bluetooth event handler task priority +// Default: 50 (CMSIS-RTOS2 osPriorityRealtime2) +// Define the priority of the Bluetooth event handler task. This must be a +// valid priority value from CMSIS-RTOS2 osPriority_t definition. The event +// handler task must have the lowest priority in these three Bluetooth RTOS tasks. +// The event task is not created and this configuration is unused if the +// Bluetooth Event System IPC component is included in the application +#define SL_BT_RTOS_EVENT_HANDLER_TASK_PRIORITY (50) + +// Bluetooth event handler task stack size in bytes +// Default: 1000 +// Define the stack size of the Bluetooth event handler task. The value is in bytes +// and will be word aligned when it is applied at the task creation. +// The event task is not created and this configuration is unused if the +// Bluetooth Event System IPC component is included in the application +#define SL_BT_RTOS_EVENT_HANDLER_STACK_SIZE 1536 + +// End Priority Configuration for Bluetooth RTOS Tasks + +// <<< end of configuration section >>> + +#endif // SL_BT_RTOS_CONFIG_S2_H diff --git a/matter/efr32/mgm26/BRD4350A/config/sl_clock_manager_oscillator_config.h b/matter/efr32/mgm26/BRD4350A/config/sl_clock_manager_oscillator_config.h new file mode 100644 index 0000000000..52c7afcd93 --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/config/sl_clock_manager_oscillator_config.h @@ -0,0 +1,362 @@ +/***************************************************************************//** + * @file + * @brief Clock Manager - Oscillators configuration file. + ******************************************************************************* + * # License + * Copyright 2024 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + + #ifndef SL_CLOCK_MANAGER_OSCILLATOR_CONFIG_H +#define SL_CLOCK_MANAGER_OSCILLATOR_CONFIG_H + +#if defined(SL_COMPONENT_CATALOG_PRESENT) +#include "sl_component_catalog.h" + +#endif + +// Internal Defines: DO NOT MODIFY +#define SL_CLOCK_MANAGER_HFXO_EN_ENABLE 1 +#define SL_CLOCK_MANAGER_HFXO_EN_DISABLE 0 + +#if defined(SL_CATALOG_RAIL_LIB_PRESENT) +#define SL_CLOCK_MANAGER_HFXO_EN_AUTO SL_CLOCK_MANAGER_HFXO_EN_ENABLE +#else +#define SL_CLOCK_MANAGER_HFXO_EN_AUTO SL_CLOCK_MANAGER_HFXO_EN_DISABLE +#endif + +// <<< Use Configuration Wizard in Context Menu >>> + +// Oscillators Settings + +// HFXO Settings (if High Frequency crystal is used) + +// Enable +// Enable to configure HFXO +// AUTO enables HFXO if a radio is used +// AUTO +// ENABLE +// DISABLE +// SL_CLOCK_MANAGER_HFXO_EN_AUTO +#ifndef SL_CLOCK_MANAGER_HFXO_EN +#define SL_CLOCK_MANAGER_HFXO_EN SL_CLOCK_MANAGER_HFXO_EN_ENABLE +#endif + +// Mode +// +// XTAL +// EXTCLK +// EXTCLKPKDET +// HFXO_CFG_MODE_XTAL +#ifndef SL_CLOCK_MANAGER_HFXO_MODE +#define SL_CLOCK_MANAGER_HFXO_MODE HFXO_CFG_MODE_XTAL +#endif + +// Frequency in Hz <38000000-40000000> +// 39000000 +#ifndef SL_CLOCK_MANAGER_HFXO_FREQ +#define SL_CLOCK_MANAGER_HFXO_FREQ 40000000 +#endif + +// CTUNE <0-255> +// 140 +#ifndef SL_CLOCK_MANAGER_HFXO_CTUNE +#define SL_CLOCK_MANAGER_HFXO_CTUNE 140 +#endif + +// Precision in PPM <0-65535> +// 50 +#ifndef SL_CLOCK_MANAGER_HFXO_PRECISION +#define SL_CLOCK_MANAGER_HFXO_PRECISION 50 +#endif + +// HFXO crystal sharing feature +// Enable to configure HFXO crystal sharing leader or follower +#ifndef SL_CLOCK_MANAGER_HFXO_CRYSTAL_SHARING_EN +#define SL_CLOCK_MANAGER_HFXO_CRYSTAL_SHARING_EN 0 +#endif + +// Crystal sharing leader +// Enable to configure HFXO crystal sharing leader +#ifndef SL_CLOCK_MANAGER_HFXO_CRYSTAL_SHARING_LEADER_EN +#define SL_CLOCK_MANAGER_HFXO_CRYSTAL_SHARING_LEADER_EN 0 +#endif + +// Crystal sharing leader minimum startup delay +// If enabled, BUFOUT does not start until timeout set in +// SL_CLOCK_MANAGER_HFXO_CRYSTAL_SHARING_LEADER_TIMEOUT_STARTUP expires. +// This prevents waste of power if BUFOUT is ready too early. +// 1 +#ifndef SL_CLOCK_MANAGER_HFXO_CRYSTAL_SHARING_LEADER_MIN_STARTUP_DELAY_EN +#define SL_CLOCK_MANAGER_HFXO_CRYSTAL_SHARING_LEADER_MIN_STARTUP_DELAY_EN 1 +#endif + +// Wait duration of oscillator startup sequence +// +// T42US +// T83US +// T108US +// T133US +// T158US +// T183US +// T208US +// T233US +// T258US +// T283US +// T333US +// T375US +// T417US +// T458US +// T500US +// T667US +// HFXO_BUFOUTCTRL_TIMEOUTSTARTUP_T208US +#ifndef SL_CLOCK_MANAGER_HFXO_CRYSTAL_SHARING_LEADER_TIMEOUT_STARTUP +#define SL_CLOCK_MANAGER_HFXO_CRYSTAL_SHARING_LEADER_TIMEOUT_STARTUP HFXO_BUFOUTCTRL_TIMEOUTSTARTUP_T208US +#endif +// +// + +// Crystal sharing follower +// Enable to configure HFXO crystal sharing follower +#ifndef SL_CLOCK_MANAGER_HFXO_CRYSTAL_SHARING_FOLLOWER_EN +#define SL_CLOCK_MANAGER_HFXO_CRYSTAL_SHARING_FOLLOWER_EN 0 +#endif +// + +// GPIO Port +// Bufout request GPIO port. If SL_CLOCK_MANAGER_HFXO_CRYSTAL_SHARING_LEADER_EN +// is enabled, this port will be used to receive the BUFOUT request. If +// SL_CLOCK_MANAGER_HFXO_CRYSTAL_SHARING_FOLLOWER_EN is enabled this port +// will be used to request BUFOUT from the crystal sharing leader. +#ifndef SL_CLOCK_MANAGER_HFXO_CRYSTAL_SHARING_GPIO_PORT +#define SL_CLOCK_MANAGER_HFXO_CRYSTAL_SHARING_GPIO_PORT 0 +#endif + +// GPIO Pin +// Bufout request GPIO pin. If SL_CLOCK_MANAGER_HFXO_CRYSTAL_SHARING_LEADER_EN +// is enabled, this pin will be used to receive the BUFOUT request. If +// SL_CLOCK_MANAGER_HFXO_CRYSTAL_SHARING_FOLLOWER_EN is enabled this pin +// will be used to request BUFOUT from the crystal sharing leader. +#ifndef SL_CLOCK_MANAGER_HFXO_CRYSTAL_SHARING_GPIO_PIN +#define SL_CLOCK_MANAGER_HFXO_CRYSTAL_SHARING_GPIO_PIN 10 +#endif +// +// + +// LFXO Settings (if Low Frequency crystal is used) +// Enable to configure LFXO +#ifndef SL_CLOCK_MANAGER_LFXO_EN +#define SL_CLOCK_MANAGER_LFXO_EN 1 +#endif + +// Mode +// +// XTAL +// BUFEXTCLK +// DIGEXTCLK +// LFXO_CFG_MODE_XTAL +#ifndef SL_CLOCK_MANAGER_LFXO_MODE +#define SL_CLOCK_MANAGER_LFXO_MODE LFXO_CFG_MODE_XTAL +#endif + +// CTUNE <0-127> +// 63 +#ifndef SL_CLOCK_MANAGER_LFXO_CTUNE +#define SL_CLOCK_MANAGER_LFXO_CTUNE 63 +#endif + +// LFXO precision in PPM <0-65535> +// 50 +#ifndef SL_CLOCK_MANAGER_LFXO_PRECISION +#define SL_CLOCK_MANAGER_LFXO_PRECISION 50 +#endif + +// Startup Timeout Delay +// +// CYCLES2 +// CYCLES256 +// CYCLES1K +// CYCLES2K +// CYCLES4K +// CYCLES8K +// CYCLES16K +// CYCLES32K +// LFXO_CFG_TIMEOUT_CYCLES4K +#ifndef SL_CLOCK_MANAGER_LFXO_TIMEOUT +#define SL_CLOCK_MANAGER_LFXO_TIMEOUT LFXO_CFG_TIMEOUT_CYCLES4K +#endif +// + +// HFRCO and DPLL Settings +// Frequency Band +// RC Oscillator Frequency Band +// 1 MHz +// 2 MHz +// 4 MHz +// 7 MHz +// 13 MHz +// 16 MHz +// 19 MHz +// 26 MHz +// 32 MHz +// 38 MHz +// 48 MHz +// 56 MHz +// 64 MHz +// 80 MHz +// cmuHFRCODPLLFreq_80M0Hz +#ifndef SL_CLOCK_MANAGER_HFRCO_BAND +#define SL_CLOCK_MANAGER_HFRCO_BAND cmuHFRCODPLLFreq_80M0Hz +#endif + +// Use DPLL +// Enable to use the DPLL with HFRCO +#ifndef SL_CLOCK_MANAGER_HFRCO_DPLL_EN +#define SL_CLOCK_MANAGER_HFRCO_DPLL_EN 1 +#endif + +// Target Frequency in Hz <1000000-80000000> +// DPLL target frequency +// 78000000 +#ifndef SL_CLOCK_MANAGER_DPLL_FREQ +#define SL_CLOCK_MANAGER_DPLL_FREQ 80000000 +#endif + +// Numerator (N) <300-4095> +// Value of N for output frequency calculation fout = fref * (N+1) / (M+1) +// 3839 +#ifndef SL_CLOCK_MANAGER_DPLL_N +#define SL_CLOCK_MANAGER_DPLL_N 3839 +#endif + +// Denominator (M) <0-4095> +// Value of M for output frequency calculation fout = fref * (N+1) / (M+1) +// 1919 +#ifndef SL_CLOCK_MANAGER_DPLL_M +#define SL_CLOCK_MANAGER_DPLL_M 1919 +#endif + +// Reference Clock +// Reference clock source for DPLL +// DISABLED +// HFXO +// LFXO +// CLKIN0 +// CMU_DPLLREFCLKCTRL_CLKSEL_HFXO +#ifndef SL_CLOCK_MANAGER_DPLL_REFCLK +#define SL_CLOCK_MANAGER_DPLL_REFCLK CMU_DPLLREFCLKCTRL_CLKSEL_HFXO +#endif + +// Reference Clock Edge Detect +// Edge detection for reference clock +// Falling Edge +// Rising Edge +// cmuDPLLEdgeSel_Fall +#ifndef SL_CLOCK_MANAGER_DPLL_EDGE +#define SL_CLOCK_MANAGER_DPLL_EDGE cmuDPLLEdgeSel_Fall +#endif + +// DPLL Lock Mode +// Lock mode +// Frequency-Lock Loop +// Phase-Lock Loop +// cmuDPLLLockMode_Freq +#ifndef SL_CLOCK_MANAGER_DPLL_LOCKMODE +#define SL_CLOCK_MANAGER_DPLL_LOCKMODE cmuDPLLLockMode_Phase +#endif + +// Automatic Lock Recovery +// 1 +#ifndef SL_CLOCK_MANAGER_DPLL_AUTORECOVER +#define SL_CLOCK_MANAGER_DPLL_AUTORECOVER 1 +#endif + +// Enable Dither +// 0 +#ifndef SL_CLOCK_MANAGER_DPLL_DITHER +#define SL_CLOCK_MANAGER_DPLL_DITHER 0 +#endif +// +// + +// HFRCOEM23 Settings +// Frequency Band +// RC Oscillator Frequency Band +// 1 MHz +// 2 MHz +// 4 MHz +// 13 MHz +// 16 MHz +// 19 MHz +// 26 MHz +// 32 MHz +// 40 MHz +// cmuHFRCOEM23Freq_19M0Hz +#ifndef SL_CLOCK_MANAGER_HFRCOEM23_BAND +#define SL_CLOCK_MANAGER_HFRCOEM23_BAND cmuHFRCOEM23Freq_19M0Hz +#endif +// + +// LFRCO Settings +// Precision Mode +// Precision mode uses hardware to automatically re-calibrate the LFRCO +// against a crystal driven by the HFXO. Hardware detects temperature +// changes and initiates a re-calibration of the LFRCO as needed when +// operating in EM0, EM1, or EM2. If a re-calibration is necessary and the +// HFXO is not active, the precision mode hardware will automatically +// enable HFXO for a short time to perform the calibration. EM4 operation is +// not allowed while precision mode is enabled. +// If high precision is selected on devices that do not support it, default +// precision will be used. +// Default precision +// High precision +// cmuPrecisionDefault +#ifndef SL_CLOCK_MANAGER_LFRCO_PRECISION +#define SL_CLOCK_MANAGER_LFRCO_PRECISION cmuPrecisionDefault +#endif +// + +// CLKIN0 Settings +// Frequency in Hz <1000000-38000000> +// 38000000 +#ifndef SL_CLOCK_MANAGER_CLKIN0_FREQ +#define SL_CLOCK_MANAGER_CLKIN0_FREQ 38000000 +#endif +// + +// + +// <<< end of configuration section >>> + +// <<< sl:start pin_tool >>> + +// SL_CLOCK_MANAGER_CLKIN0 +// $[CMU_SL_CLOCK_MANAGER_CLKIN0] + + +// [CMU_SL_CLOCK_MANAGER_CLKIN0]$ + +// <<< sl:end pin_tool >>> + +#endif /* SL_CLOCK_MANAGER_OSCILLATOR_CONFIG_H */ diff --git a/matter/efr32/mgm26/BRD4350A/config/sl_clock_manager_tree_config.h b/matter/efr32/mgm26/BRD4350A/config/sl_clock_manager_tree_config.h new file mode 100644 index 0000000000..af7f806567 --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/config/sl_clock_manager_tree_config.h @@ -0,0 +1,319 @@ +/***************************************************************************//** + * @file + * @brief Clock Manager - Clock Tree configuration file. + ******************************************************************************* + * # License + * Copyright 2024 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +#ifndef SL_CLOCK_MANAGER_TREE_CONFIG_H +#define SL_CLOCK_MANAGER_TREE_CONFIG_H + +#if defined(SL_COMPONENT_CATALOG_PRESENT) +#include "sl_component_catalog.h" + +#endif + +// Internal Defines: DO NOT MODIFY +// Those defines are used internally to help converting the DEFAULT_HF_CLOCK_SOURCE and DEFAULT_LF_CLOCK_SOURCE +// selection of each clock branch to the right HW register value. +#define SL_CLOCK_MANAGER_DEFAULT_HF_CLOCK_SOURCE_HFRCODPLL 0xFF +#define SL_CLOCK_MANAGER_DEFAULT_HF_CLOCK_SOURCE_HFXO 0xFE +#define SL_CLOCK_MANAGER_DEFAULT_HF_CLOCK_SOURCE_FSRCO 0xFD +#define SL_CLOCK_MANAGER_DEFAULT_LF_CLOCK_SOURCE_LFRCO 0xFC +#define SL_CLOCK_MANAGER_DEFAULT_LF_CLOCK_SOURCE_LFXO 0xFB +#define SL_CLOCK_MANAGER_DEFAULT_LF_CLOCK_SOURCE_ULFRCO 0xFA + +#if defined(SL_CATALOG_RAIL_LIB_PRESENT) +#define SL_CLOCK_MANAGER_DEFAULT_HF_CLOCK_SOURCE_AUTO SL_CLOCK_MANAGER_DEFAULT_HF_CLOCK_SOURCE_HFXO +#else +#define SL_CLOCK_MANAGER_DEFAULT_HF_CLOCK_SOURCE_AUTO SL_CLOCK_MANAGER_DEFAULT_HF_CLOCK_SOURCE_HFRCODPLL +#endif + +// <<< Use Configuration Wizard in Context Menu >>> + +// Clock Tree Settings + +// Default Clock Source Selection for HF clock branches +// AUTO +// HFRCODPLL +// HFXO +// FSRCO +// Selection of the high frequency clock source. HF clock branches can select this value by chosing the DEFAULT_HF value. +// AUTO uses HFXO if a radio is used and HFRCODPLL otherwise +// SL_CLOCK_MANAGER_DEFAULT_HF_CLOCK_SOURCE_AUTO +#ifndef SL_CLOCK_MANAGER_DEFAULT_HF_CLOCK_SOURCE +#define SL_CLOCK_MANAGER_DEFAULT_HF_CLOCK_SOURCE SL_CLOCK_MANAGER_DEFAULT_HF_CLOCK_SOURCE_HFXO +#endif + +// Default Clock Source Selection for LF clock branches +// LFRCO +// LFXO +// ULFRCO +// Selection of the low frequency clock source. LF clock branches can select this value by chosing the DEFAULT_HF value. +// SL_CLOCK_MANAGER_DEFAULT_LF_CLOCK_SOURCE_LFRCO +#ifndef SL_CLOCK_MANAGER_DEFAULT_LF_CLOCK_SOURCE +#define SL_CLOCK_MANAGER_DEFAULT_LF_CLOCK_SOURCE SL_CLOCK_MANAGER_DEFAULT_LF_CLOCK_SOURCE_LFXO +#endif + +// System Clock Branch Settings + +// Clock Source Selection for SYSCLK branch +// DEFAULT_HF +// FSRCO +// HFRCODPLL +// HFXO +// CLKIN0 +// Selection of the Clock source for SYSCLK +// SL_CLOCK_MANAGER_DEFAULT_HF_CLOCK_SOURCE +#ifndef SL_CLOCK_MANAGER_SYSCLK_SOURCE +#define SL_CLOCK_MANAGER_SYSCLK_SOURCE SL_CLOCK_MANAGER_DEFAULT_HF_CLOCK_SOURCE +#endif + +// HCLK branch divider +// DIV1 +// DIV2 +// DIV4 +// DIV8 +// DIV16 +// HCLK branch is derived from SYSCLK. This clock drives the AHB bus interface. +// CMU_SYSCLKCTRL_HCLKPRESC_DIV1 +#ifndef SL_CLOCK_MANAGER_HCLK_DIVIDER +#define SL_CLOCK_MANAGER_HCLK_DIVIDER CMU_SYSCLKCTRL_HCLKPRESC_DIV1 +#endif + +// PCLK branch divider +// DIV1 +// DIV2 +// PCLK branch is derived from HCLK. This clock drives the APB bus interface. +// CMU_SYSCLKCTRL_PCLKPRESC_DIV1 +#ifndef SL_CLOCK_MANAGER_PCLK_DIVIDER +#define SL_CLOCK_MANAGER_PCLK_DIVIDER CMU_SYSCLKCTRL_PCLKPRESC_DIV1 +#endif + +// + +// Trace Clock Branches Settings +// Clock Source Selection for TRACECLK branch +// DISABLE +// SYSCLK +// HFRCOEM23 +// HFRCODPLLRT +// Selection of the Clock source for TRACECLK +// CMU_TRACECLKCTRL_CLKSEL_SYSCLK +#ifndef SL_CLOCK_MANAGER_TRACECLK_SOURCE +#define SL_CLOCK_MANAGER_TRACECLK_SOURCE CMU_TRACECLKCTRL_CLKSEL_SYSCLK +#endif + +// TRACECLK branch Divider +// DIV1 +// DIV2 +// DIV3 +// DIV4 +// Selection of the divider value for TRACECLK branch +// CMU_TRACECLKCTRL_PRESC_DIV1 +#ifndef SL_CLOCK_MANAGER_TRACECLK_DIVIDER +#define SL_CLOCK_MANAGER_TRACECLK_DIVIDER CMU_TRACECLKCTRL_PRESC_DIV1 +#endif + +// + +// High Frequency Clock Branches Settings +// Each HF Clock Tree branch can be customized, else the same clock source as for SYSCLK will be used when possible +// EM01GRPACLK clock the Timer peripherals +// Clock Source Selection for EM01GRPACLK branch +// DEFAULT_HF +// HFRCODPLL +// HFXO +// FSRCO +// HFRCOEM23 +// HFRCODPLLRT +// HFXORT +// Selection of the Clock source for EM01GRPACLK +// SL_CLOCK_MANAGER_DEFAULT_HF_CLOCK_SOURCE +#ifndef SL_CLOCK_MANAGER_EM01GRPACLK_SOURCE +#define SL_CLOCK_MANAGER_EM01GRPACLK_SOURCE SL_CLOCK_MANAGER_DEFAULT_HF_CLOCK_SOURCE +#endif + +// Clock Source Selection for EM01GRPCCLK branch +// DEFAULT_HF +// HFRCODPLL +// HFXO +// FSRCO +// HFRCOEM23 +// HFRCODPLLRT +// HFXORT +// Selection of the Clock source for EM01GRPCCLK +// SL_CLOCK_MANAGER_DEFAULT_HF_CLOCK_SOURCE +#ifndef SL_CLOCK_MANAGER_EM01GRPCCLK_SOURCE +#define SL_CLOCK_MANAGER_EM01GRPCCLK_SOURCE SL_CLOCK_MANAGER_DEFAULT_HF_CLOCK_SOURCE +#endif + +// Clock Source Selection for IADCCLK branch +// EM01GRPACLK +// FSRCO +// HFRCOEM23 +// Selection of the Clock source for IADCCLK +// CMU_IADCCLKCTRL_CLKSEL_EM01GRPACLK +#ifndef SL_CLOCK_MANAGER_IADCCLK_SOURCE +#define SL_CLOCK_MANAGER_IADCCLK_SOURCE CMU_IADCCLKCTRL_CLKSEL_EM01GRPACLK +#endif + +// + +// Low Frequency Clock Branches Settings + +// Clock Source Selection for EM23GRPACLK branch +// DEFAULT_LF +// LFRCO +// LFXO +// ULFRCO +// Selection of the Clock source for EM23GRPACLK +// SL_CLOCK_MANAGER_DEFAULT_LF_CLOCK_SOURCE +#ifndef SL_CLOCK_MANAGER_EM23GRPACLK_SOURCE +#define SL_CLOCK_MANAGER_EM23GRPACLK_SOURCE SL_CLOCK_MANAGER_DEFAULT_LF_CLOCK_SOURCE +#endif + +// Clock Source Selection for EM4GRPACLK branch +// DEFAULT_LF +// LFRCO +// LFXO +// ULFRCO +// Selection of the Clock source for EM4GRPACLK +// SL_CLOCK_MANAGER_DEFAULT_LF_CLOCK_SOURCE +#ifndef SL_CLOCK_MANAGER_EM4GRPACLK_SOURCE +#define SL_CLOCK_MANAGER_EM4GRPACLK_SOURCE SL_CLOCK_MANAGER_DEFAULT_LF_CLOCK_SOURCE +#endif + +// Clock Source Selection for SYSRTCCLK branch +// DEFAULT_LF +// LFRCO +// LFXO +// ULFRCO +// Selection of the Clock source for SYSRTCCLK +// SL_CLOCK_MANAGER_DEFAULT_LF_CLOCK_SOURCE +#ifndef SL_CLOCK_MANAGER_SYSRTCCLK_SOURCE +#define SL_CLOCK_MANAGER_SYSRTCCLK_SOURCE SL_CLOCK_MANAGER_DEFAULT_LF_CLOCK_SOURCE +#endif + +// Clock Source Selection for WDOG0CLK branch +// DEFAULT_LF +// LFRCO +// LFXO +// ULFRCO +// HCLKDIV1024 +// Selection of the Clock source for WDOG0CLK +// SL_CLOCK_MANAGER_DEFAULT_LF_CLOCK_SOURCE +#ifndef SL_CLOCK_MANAGER_WDOG0CLK_SOURCE +#define SL_CLOCK_MANAGER_WDOG0CLK_SOURCE SL_CLOCK_MANAGER_DEFAULT_LF_CLOCK_SOURCE +#endif + +// Clock Source Selection for WDOG1CLK branch +// DEFAULT_LF +// LFRCO +// LFXO +// ULFRCO +// HCLKDIV1024 +// Selection of the Clock source for WDOG1CLK +// SL_CLOCK_MANAGER_DEFAULT_LF_CLOCK_SOURCE +#ifndef SL_CLOCK_MANAGER_WDOG1CLK_SOURCE +#define SL_CLOCK_MANAGER_WDOG1CLK_SOURCE SL_CLOCK_MANAGER_DEFAULT_LF_CLOCK_SOURCE +#endif + +// Clock Source Selection for LCDCLK branch +// DEFAULT_LF +// LFRCO +// LFXO +// ULFRCO +// Selection of the Clock source for LDCCLK +// SL_CLOCK_MANAGER_DEFAULT_LF_CLOCK_SOURCE +#ifndef SL_CLOCK_MANAGER_LCDCLK_SOURCE +#define SL_CLOCK_MANAGER_LCDCLK_SOURCE SL_CLOCK_MANAGER_DEFAULT_LF_CLOCK_SOURCE +#endif + +// Clock Source Selection for PCNT0CLK branch +// DISABLED +// EM23GRPACLK +// PCNTS0 +// Selection of the Clock source for PCNT0CLK +// CMU_PCNT0CLKCTRL_CLKSEL_EM23GRPACLK +#ifndef SL_CLOCK_MANAGER_PCNT0CLK_SOURCE +#define SL_CLOCK_MANAGER_PCNT0CLK_SOURCE CMU_PCNT0CLKCTRL_CLKSEL_EM23GRPACLK +#endif + +// + +// Mixed Frequency Clock Branch Settings +// Clock Source Selection for EUSART0CLK branch +// DISABLED +// EM01GRPCCLK +// HFRCOEM23 +// LFRCO +// LFXO +// Selection of the Clock source for EUSART0CLK +// CMU_EUSART0CLKCTRL_CLKSEL_EM01GRPCCLK +#ifndef SL_CLOCK_MANAGER_EUSART0CLK_SOURCE +#define SL_CLOCK_MANAGER_EUSART0CLK_SOURCE CMU_EUSART0CLKCTRL_CLKSEL_EM01GRPCCLK +#endif + +// Clock Source Selection for SYSTICKCLK branch +// <0=> HCLK +// <1=> EM23GRPACLK +// Selection of the Clock source for SYSTICKCLK +// 0 +#ifndef SL_CLOCK_MANAGER_SYSTICKCLK_SOURCE +#define SL_CLOCK_MANAGER_SYSTICKCLK_SOURCE 0 +#endif + +// Clock Source Selection for VDAC0CLK branch +// DISABLED +// EM01GRPACLK +// EM23GRPACLK +// FSRCO +// HFRCOEM23 +// Selection of the Clock source for VDAC0CLK +// CMU_VDAC0CLKCTRL_CLKSEL_EM01GRPACLK +#ifndef SL_CLOCK_MANAGER_VDAC0CLK_SOURCE +#define SL_CLOCK_MANAGER_VDAC0CLK_SOURCE CMU_VDAC0CLKCTRL_CLKSEL_EM01GRPACLK +#endif + +// Clock Source Selection for VDAC1CLK branch +// DISABLED +// EM01GRPACLK +// EM23GRPACLK +// FSRCO +// HFRCOEM23 +// Selection of the Clock source for VDAC1CLK +// CMU_VDAC1CLKCTRL_CLKSEL_EM01GRPACLK +#ifndef SL_CLOCK_MANAGER_VDAC1CLK_SOURCE +#define SL_CLOCK_MANAGER_VDAC1CLK_SOURCE CMU_VDAC1CLKCTRL_CLKSEL_EM01GRPACLK +#endif + +// +// + +#endif /* SL_CLOCK_MANAGER_TREE_CONFIG_H */ + +// <<< end of configuration section >>> diff --git a/matter/efr32/mgm26/BRD4350A/config/sl_core_config.h b/matter/efr32/mgm26/BRD4350A/config/sl_core_config.h new file mode 100644 index 0000000000..27b173d2eb --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/config/sl_core_config.h @@ -0,0 +1,44 @@ +/***************************************************************************//** + * @file + * @brief sl_core Configuration + ******************************************************************************* + * # License + * Copyright 2023 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +#ifndef SL_CORE_CONFIG_H +#define SL_CORE_CONFIG_H + +// <<< Use Configuration Wizard in Context Menu >>> + +// Core Abstraction Configuration + +// Enables measurement of interrupt masking time for debugging purposes. +// Default: 0 +#define SL_CORE_DEBUG_INTERRUPTS_MASKED_TIMING 0 +// + +// <<< end of configuration section >>> +#endif // SL_CORE_CONFIG_H diff --git a/matter/efr32/mgm26/BRD4350A/config/sl_device_init_dcdc_config.h b/matter/efr32/mgm26/BRD4350A/config/sl_device_init_dcdc_config.h new file mode 100644 index 0000000000..4fb88397d2 --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/config/sl_device_init_dcdc_config.h @@ -0,0 +1,58 @@ +/***************************************************************************//** + * @file + * @brief DEVICE_INIT_DCDC Config + ******************************************************************************* + * # License + * Copyright 2022 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +#ifndef SL_DEVICE_INIT_DCDC_CONFIG_H +#define SL_DEVICE_INIT_DCDC_CONFIG_H + +// <<< Use Configuration Wizard in Context Menu >>> + +// Enable DC/DC Converter +// +// Default: 1 +#define SL_DEVICE_INIT_DCDC_ENABLE 1 + +// Set DC/DC Converter in Bypass Mode +// +// Default: 0 +#define SL_DEVICE_INIT_DCDC_BYPASS 0 + +// Override for DCDC PFMX Mode Peak Current Setting +// +// Default: 1 +#define SL_DEVICE_INIT_DCDC_PFMX_IPKVAL_OVERRIDE 1 + +// DCDC PFMX Mode Peak Current Setting <0-15> +// +// Default: DCDC_PFMXCTRL_IPKVAL_DEFAULT +#define SL_DEVICE_INIT_DCDC_PFMX_IPKVAL 12 + +// <<< end of configuration section >>> + +#endif // SL_DEVICE_INIT_DCDC_CONFIG_H diff --git a/matter/efr32/mgm26/BRD4350A/config/sl_fem_util_config.h b/matter/efr32/mgm26/BRD4350A/config/sl_fem_util_config.h new file mode 100644 index 0000000000..f6d2dc55eb --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/config/sl_fem_util_config.h @@ -0,0 +1,78 @@ +/***************************************************************************//** + * @file + * @brief Front End Module configuration file. + ******************************************************************************* + * # License + * Copyright 2020 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +#ifndef SL_FEM_UTIL_CONFIG_H +#define SL_FEM_UTIL_CONFIG_H + +#include "sl_gpio.h" + +// <<< Use Configuration Wizard in Context Menu >>> +// FEM Configuration +// Enable RX Mode +// Default: 0 +#define SL_FEM_UTIL_RX_ENABLE 0 +// Enable TX Mode +// Default: 0 +#define SL_FEM_UTIL_TX_ENABLE 0 +// Enable Bypass Mode +// Default: 0 +#define SL_FEM_UTIL_BYPASS_ENABLE 0 +// Enable TX High Power Mode +// Default: 0 +#define SL_FEM_UTIL_TX_HIGH_POWER_ENABLE 0 +// +// <<< end of configuration section >>> +// <<< sl:start pin_tool >>> +// SL_FEM_UTIL_RX +// $[PRS_SL_FEM_UTIL_RX] +// [PRS_SL_FEM_UTIL_RX]$ + +// SL_FEM_UTIL_TX +// $[PRS_SL_FEM_UTIL_TX] +// [PRS_SL_FEM_UTIL_TX]$ + +// SL_FEM_UTIL_SLEEP +// $[PRS_SL_FEM_UTIL_SLEEP] +// [PRS_SL_FEM_UTIL_SLEEP]$ + +// SL_FEM_UTIL_BYPASS +// $[GPIO_SL_FEM_UTIL_BYPASS] +// [GPIO_SL_FEM_UTIL_BYPASS]$ + +// SL_FEM_UTIL_TX_HIGH_POWER +// $[GPIO_SL_FEM_UTIL_TX_HIGH_POWER] +// [GPIO_SL_FEM_UTIL_TX_HIGH_POWER]$ +// <<< sl:end pin_tool >>> + +#define SL_FEM_UTIL_AUTO_PRS_LNA_BYPASS_ENABLE 0 +#define SL_FEM_UTIL_OPTIMIZED_PHY_ENABLE 0 +#define SL_FEM_UTIL_RUNTIME_PHY_SELECT 0 + +#endif // SL_FEM_UTIL_CONFIG_H diff --git a/matter/efr32/mgm26/BRD4350A/config/sl_gp_interface_config.h b/matter/efr32/mgm26/BRD4350A/config/sl_gp_interface_config.h new file mode 100644 index 0000000000..fd5aa20eac --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/config/sl_gp_interface_config.h @@ -0,0 +1,44 @@ +/******************************************************************************* + * @file + * @brief OpenThread Green Power configuration file. + ******************************************************************************* + * # License + * Copyright 2024 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +//-------- <<< Use Configuration Wizard in Context Menu >>> ----------------- + +// Rx Offset time +// The rx offset time for the bidirectional message. +// +#define GP_RX_OFFSET_IN_MICRO_SECONDS 21000 +// + +// TX Timeout +// Tx timeout after which the gp outgoing packet is invalid. +// +#define GP_TX_MAX_TIMEOUT_IN_MICRO_SECONDS 5000000 +// +// <<< end of configuration section >>> diff --git a/matter/efr32/mgm26/BRD4350A/config/sl_hfxo_manager_config.h b/matter/efr32/mgm26/BRD4350A/config/sl_hfxo_manager_config.h new file mode 100644 index 0000000000..d9ccd3c706 --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/config/sl_hfxo_manager_config.h @@ -0,0 +1,56 @@ +/***************************************************************************//** + * @file + * @brief HFXO Manager configuration file. + ******************************************************************************* + * # License + * Copyright 2020 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +// <<< Use Configuration Wizard in Context Menu >>> + +#ifndef SL_HFXO_MANAGER_CONFIG_H +#define SL_HFXO_MANAGER_CONFIG_H + +// HFXO Manager Configuration + +// Enable custom IRQ handler for crystal HF oscillator. +// Enable if HFXO0_IRQHandler is needed from your application. +// The HFXO IRQ priority must not be changed as the HFXO Manager module needs it to be high priority +// and to stay enabled through atomic sections. +// The function sl_hfxo_manager_irq_handler() will have to be called from you custom handler if this is enabled. +// Default: 0 +#define SL_HFXO_MANAGER_CUSTOM_HFXO_IRQ_HANDLER 0 + +// Enable support for Sleepy Crystals. +// If Enabled and if HFXO fails to startup due to a sleepy crystal, HFXO Manager will retry the startup with more aggressive settings +// before falling back to the configured settings. +// Default: 0 +#define SL_HFXO_MANAGER_SLEEPY_CRYSTAL_SUPPORT 0 + +// + +#endif /* SL_HFXO_MANAGER_CONFIG_H */ + +// <<< end of configuration section >>> diff --git a/matter/efr32/mgm26/BRD4350A/config/sl_i2cspm_sensor_config.h b/matter/efr32/mgm26/BRD4350A/config/sl_i2cspm_sensor_config.h new file mode 100644 index 0000000000..1b81ab73c8 --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/config/sl_i2cspm_sensor_config.h @@ -0,0 +1,71 @@ +/***************************************************************************//** + * @file + * @brief I2CSPM Config + ******************************************************************************* + * # License + * Copyright 2019 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +#ifndef SL_I2CSPM_SENSOR_CONFIG_H +#define SL_I2CSPM_SENSOR_CONFIG_H + +// <<< Use Configuration Wizard in Context Menu + +// I2CSPM settings + +// Reference clock frequency +// Frequency in Hz of the reference clock. +// Select 0 to use the frequency of the currently selected clock. +// Default: 0 +#define SL_I2CSPM_SENSOR_REFERENCE_CLOCK 0 + +// Speed mode +// <0=> Standard mode (100kbit/s) +// <1=> Fast mode (400kbit/s) +// <2=> Fast mode plus (1Mbit/s) +// Default: 0 +#define SL_I2CSPM_SENSOR_SPEED_MODE 0 +// end I2CSPM config + +// <<< end of configuration section >>> + +// <<< sl:start pin_tool >>> +// SL_I2CSPM_SENSOR +// $[I2C_SL_I2CSPM_SENSOR] +#define SL_I2CSPM_SENSOR_PERIPHERAL I2C2 +#define SL_I2CSPM_SENSOR_PERIPHERAL_NO 2 + +// I2C2 SCL on PB02 +#define SL_I2CSPM_SENSOR_SCL_PORT SL_GPIO_PORT_B +#define SL_I2CSPM_SENSOR_SCL_PIN 2 + +// I2C2 SDA on PB03 +#define SL_I2CSPM_SENSOR_SDA_PORT SL_GPIO_PORT_B +#define SL_I2CSPM_SENSOR_SDA_PIN 3 + +// [I2C_SL_I2CSPM_SENSOR]$ +// <<< sl:end pin_tool >>> + +#endif // SL_I2CSPM_SENSOR_CONFIG_H diff --git a/matter/efr32/mgm26/BRD4350A/config/sl_interrupt_manager_s2_config.h b/matter/efr32/mgm26/BRD4350A/config/sl_interrupt_manager_s2_config.h new file mode 100644 index 0000000000..714893aa2c --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/config/sl_interrupt_manager_s2_config.h @@ -0,0 +1,47 @@ +/***************************************************************************//** + * @file + * @brief Interrupt Manager configuration file for series 2 devices. + ******************************************************************************* + * # License + * Copyright 2023 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +// <<< Use Configuration Wizard in Context Menu >>> + +#ifndef SL_INTERRUPT_MANAGER_S2_CONFIG_H +#define SL_INTERRUPT_MANAGER_S2_CONFIG_H + +// Interrupt Manager Configuration + +// Put the interrupt vector table in RAM. +// Set to 1 to put the vector table in RAM. +// Default: 0 +#define SL_INTERRUPT_MANAGER_S2_INTERRUPTS_IN_RAM 0 + +// + +#endif /* SSL_INTERRUPT_MANAGER_S2_CONFIG_H */ + +// <<< end of configuration section >>> diff --git a/matter/efr32/mgm26/BRD4350A/config/sl_mbedtls_config.h b/matter/efr32/mgm26/BRD4350A/config/sl_mbedtls_config.h new file mode 100644 index 0000000000..b6872e6d1a --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/config/sl_mbedtls_config.h @@ -0,0 +1,118 @@ +#ifndef SL_MBEDTLS_CONFIG_H +#define SL_MBEDTLS_CONFIG_H + +// ----------------------------------------------------------------------------- +// User exposed config options + +// <<< Use Configuration Wizard in Context Menu >>> + +// TLS/DTLS configuration + +// Complete list of ciphersuites to use, in order of preference. +// Default: MBEDTLS_TLS_ECJPAKE_WITH_AES_128_CCM_8 +// Complete list of ciphersuites to use, in order of preference. +// The value of this configuration should be updated for the application needs. +#define MBEDTLS_SSL_CIPHERSUITES MBEDTLS_TLS_ECJPAKE_WITH_AES_128_CCM_8 + +// Maximum TLS/DTLS fragment length in bytes (input). +// Default: 768 +// The size configured here determines the size of the internal I/O +// buffer used in mbedTLS when receiving data. +#define SL_MBEDTLS_SSL_IN_CONTENT_LEN 768 + +// Maximum TLS/DTLS fragment length in bytes (output). +// Default: 768 +// The size configured here determines the size of the internal I/O +// buffer used in mbedTLS when sending data. +#define SL_MBEDTLS_SSL_OUT_CONTENT_LEN 768 + +// Enable support for RFC 6066 max_fragment_length extension in SSL. +// Default: 1 +// Enable support for RFC 6066 max_fragment_length extension in SSL. +#define SL_MBEDTLS_SSL_MAX_FRAGMENT_LENGTH 1 + +// Enable support for exporting key block and master secret. +// Default: 1 +// Enable support for exporting key block and master secret. +// This is required for certain users of TLS, e.g. EAP-TLS. +#define SL_MBEDTLS_SSL_EXPORT_KEYS 1 + +// Enable the PSK based ciphersuite modes in SSL / TLS. +// Default: 0 +// Enable the PSK based ciphersuite modes in SSL / TLS. +#define SL_MBEDTLS_KEY_EXCHANGE_PSK_ENABLED 1 + +// Enable the ECDHE-PSK based ciphersuite modes in SSL / TLS. +// Default: 0 +// Enable the ECDHE-PSK based ciphersuite modes in SSL / TLS. +#define SL_MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED 0 + +// Enable the ECDHE-ECDSA based ciphersuite modes in SSL / TLS. +// Default: 0 +// Enable the ECDHE-ECDSA based ciphersuite modes in SSL / TLS. +#define SL_MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED 0 + +// Enable the ECDHE-RSA based ciphersuite modes in SSL / TLS. +// Default: 0 +// Enable the ECDHE-RSA based ciphersuite modes in SSL / TLS. +#define SL_MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED 0 + +// Enable the ECDH-ECDSA based ciphersuite modes in SSL / TLS. +// Default: 0 +// Enable the ECDH-ECDSA based ciphersuite modes in SSL / TLS. +#define SL_MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED 0 + +// Enable parsing of the compressed curves. +// Default: 0 +// Enable parsing of the compressed curves. +#define SL_MBEDTLS_ECP_ENABLE_COMPRESSED_CURVE_PARSING 0 + +// + +// RSA configuration + +// Disable use of the Chinese Remainder Theorem for RSA. +// Default: 0 +// Disable use of the Chinese Remainder Theorem for RSA private key +// computations. +#define SL_MBEDTLS_RSA_NO_CRT 0 + +// + +// Miscellaneous configuration + +// Enable Silicon Labs' Mbed TLS- and PSA Crypto drivers. +// Default: 1 +// Enable drivers for hardware acceleration (Mbed TLS and PSA Crypto) and +// secure key handling (PSA Crypto). +#define SL_MBEDTLS_DRIVERS_ENABLED 1 + +// + +// <<< end of configuration section >>> + +// ----------------------------------------------------------------------------- +// Sub-files + +#if defined(SLI_MBEDTLS_CONFIG_AUTOGEN_OVERRIDE_FILE) + #include SLI_MBEDTLS_CONFIG_AUTOGEN_OVERRIDE_FILE +#else + #include "sli_mbedtls_config_autogen.h" +#endif + +#include "sli_mbedtls_omnipresent.h" + +#if SL_MBEDTLS_DRIVERS_ENABLED + #include "sli_mbedtls_acceleration.h" +#endif + +#include "sl_mbedtls_device_config.h" + +// Include transformation logic to apply CMSIS-config configuration options to +// the correct Mbed TLS / PSA Crypto options. +#include "sli_mbedtls_config_transform_autogen.h" + +// Included for backward compatibility reasons. +#include "mbedtls/build_info.h" + +#endif // SL_MBEDTLS_CONFIG_H diff --git a/matter/efr32/mgm26/BRD4350A/config/sl_mbedtls_device_config.h b/matter/efr32/mgm26/BRD4350A/config/sl_mbedtls_device_config.h new file mode 100644 index 0000000000..33c34c42e1 --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/config/sl_mbedtls_device_config.h @@ -0,0 +1,72 @@ +#ifndef SL_MBEDTLS_DEVICE_CONFIG_H +#define SL_MBEDTLS_DEVICE_CONFIG_H + +// ----------------------------------------------------------------------------- +// User exposed config options + +// <<< Use Configuration Wizard in Context Menu >>> + +// Secure Engine (SE) version configuration + +// Support SE firmware versions older than 1.2.2 <0-1> +// Enable software fallback for ECDH and ECC public key validation on xG21 +// devices running SE firmware versions lower than 1.2.2. +// +// Due to other stability concerns, it is strongly recommended to upgrade +// these devices to the latest firmware revision instead of turning on +// software fallback support. +// +// Not having fallback support will make ECDH operations, as well as PSA +// Crypto public key import, return an error code on affected devices. +// +// Default: 0 +#define SL_SE_SUPPORT_FW_PRIOR_TO_1_2_2 0 + +// Assume an SE firmware version newer than 1.2.2 <0-1> +// For enhanced performance: if it is guaranteed that all devices on which +// this library will run are updated to at least SE FW 1.2.2, then turning +// on this option will remove certain fallback checks, thereby reducing the +// amount of processing required for ECDH and public key verification +// operations. +// Default: 0 +#define SL_SE_ASSUME_FW_AT_LEAST_1_2_2 0 + +// Assume an SE firmware version that is unaffected by Ed25519 errata <0-1> +// For minimal code size and performance savings: if it is guaranteed that +// none of the devices running this library has SE FWs in the range +// [1.2.2, 1.2.8], then enabling this option will disable runtime version +// checks. +// Default: 0 +#define SL_SE_ASSUME_FW_UNAFFECTED_BY_ED25519_ERRATA 0 + +// + +// <<< end of configuration section >>> + +// ----------------------------------------------------------------------------- +// Additional SE version related logic (DO NOT MODIFY) + +// SL_SE_ASSUME_FW_AT_LEAST_1_2_10 is no longer in use, however, it is kept here +// for backwards compatibility. */ +#if defined(SL_SE_ASSUME_FW_AT_LEAST_1_2_10) + #undef SL_SE_ASSUME_FW_AT_LEAST_1_2_2 + #define SL_SE_ASSUME_FW_AT_LEAST_1_2_2 1 + #undef SL_SE_ASSUME_FW_UNAFFECTED_BY_ED25519_ERRATA + #define SL_SE_ASSUME_FW_UNAFFECTED_BY_ED25519_ERRATA 1 +#endif + +// SLI_SE_SUPPORT_FW_PRIOR_TO_1_2_2 is no longer in use, however, it is kept +// here for backwards compatibility. */ +#if defined(SLI_SE_SUPPORT_FW_PRIOR_TO_1_2_2) + #undef SL_SE_SUPPORT_FW_PRIOR_TO_1_2_2 + #define SL_SE_SUPPORT_FW_PRIOR_TO_1_2_2 1 +#endif + +// SLI_SE_ASSUME_FW_AT_LEAST_1_2_2 is no longer in use, however, it is kept +// here for backwards compatibility. */ +#if defined(SLI_SE_ASSUME_FW_AT_LEAST_1_2_2) + #undef SL_SE_ASSUME_FW_AT_LEAST_1_2_2 + #define SL_SE_ASSUME_FW_AT_LEAST_1_2_2 1 +#endif + +#endif // SL_MBEDTLS_DEVICE_CONFIG_H diff --git a/matter/efr32/mgm26/BRD4350A/config/sl_memlcd_usart_config.h b/matter/efr32/mgm26/BRD4350A/config/sl_memlcd_usart_config.h new file mode 100644 index 0000000000..81f6b8bfcd --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/config/sl_memlcd_usart_config.h @@ -0,0 +1,66 @@ +/***************************************************************************//** + * @file + * @brief SPI abstraction used by memory lcd display + ******************************************************************************* + * # License + * Copyright 2022 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +#ifndef SL_MEMLCD_CONFIG_H +#define SL_MEMLCD_CONFIG_H + +// <<< sl:start pin_tool >>> +// SL_MEMLCD_SPI +// $[USART_SL_MEMLCD_SPI] +#define SL_MEMLCD_SPI_PERIPHERAL USART0 +#define SL_MEMLCD_SPI_PERIPHERAL_NO 0 + +// USART0 TX on PC01 +#define SL_MEMLCD_SPI_TX_PORT SL_GPIO_PORT_C +#define SL_MEMLCD_SPI_TX_PIN 1 + +// USART0 CLK on PC03 +#define SL_MEMLCD_SPI_CLK_PORT SL_GPIO_PORT_C +#define SL_MEMLCD_SPI_CLK_PIN 3 + +// [USART_SL_MEMLCD_SPI]$ + +// SL_MEMLCD_SPI_CS +// $[GPIO_SL_MEMLCD_SPI_CS] +#define SL_MEMLCD_SPI_CS_PORT SL_GPIO_PORT_C +#define SL_MEMLCD_SPI_CS_PIN 8 + +// [GPIO_SL_MEMLCD_SPI_CS]$ + +// SL_MEMLCD_EXTCOMIN +// $[GPIO_SL_MEMLCD_EXTCOMIN] +#define SL_MEMLCD_EXTCOMIN_PORT SL_GPIO_PORT_C +#define SL_MEMLCD_EXTCOMIN_PIN 6 + +// [GPIO_SL_MEMLCD_EXTCOMIN]$ + +// <<< sl:end pin_tool >>> + +#endif diff --git a/matter/efr32/mgm26/BRD4350A/config/sl_memory_config.h b/matter/efr32/mgm26/BRD4350A/config/sl_memory_config.h new file mode 100644 index 0000000000..3afe6966ac --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/config/sl_memory_config.h @@ -0,0 +1,11 @@ +#ifndef SL_MEMORY_CONFIG_H +#define SL_MEMORY_CONFIG_H + +#include "sl_memory_manager_region_config.h" +#include "sl_common.h" + +#ifndef SL_SUPPRESS_DEPRECATION_WARNINGS_SDK_2024_6 +#warning "This file is deprecated as of Simplicity SDK 2024.6. Content was moved to sl_memory_manager_region_config.h." +#endif + +#endif diff --git a/matter/efr32/mgm26/BRD4350A/config/sl_memory_manager_config.h b/matter/efr32/mgm26/BRD4350A/config/sl_memory_manager_config.h new file mode 100644 index 0000000000..7e4b056778 --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/config/sl_memory_manager_config.h @@ -0,0 +1,49 @@ +/***************************************************************************//** + * @file + * @brief Memory Heap Allocator configuration file. + ******************************************************************************* + * # License + * Copyright 2024 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +// <<< Use Configuration Wizard in Context Menu >>> + +#ifndef SL_MEMORY_MANAGER_CONFIG_H +#define SL_MEMORY_MANAGER_CONFIG_H + +// Memory Manager Configuration + +// Minimum block allocation size +// <32-128:8> +// Minimum block allocation size to avoid creating a block too small while splitting up an allocated block. +// Size expressed in bytes and can only be a multiple of 8 bytes for the proper data alignment management done by the dynamic allocator malloc() function. +// Default: 32 +#define SL_MEMORY_MANAGER_BLOCK_ALLOCATION_MIN_SIZE (32) + +// + +// <<< end of configuration section >>> + +#endif /* SL_MEMORY_MANAGER_CONFIG_H */ diff --git a/matter/efr32/mgm26/BRD4350A/config/sl_memory_manager_region_config.h b/matter/efr32/mgm26/BRD4350A/config/sl_memory_manager_region_config.h new file mode 100644 index 0000000000..f34bb11775 --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/config/sl_memory_manager_region_config.h @@ -0,0 +1,49 @@ +/***************************************************************************//** + * @file + * @brief Memory Heap and stack size configuration file. + ******************************************************************************* + * # License + * Copyright 2024 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +// <<< Use Configuration Wizard in Context Menu >>> + +#ifndef SL_MEMORY_MANAGER_REGION_CONFIG_H +#define SL_MEMORY_MANAGER_REGION_CONFIG_H + +// Memory configuration + +// Stack size for the application. +// Default: 4096 +// The stack size configured here will be used by the stack that the +// application uses when coming out of a reset. +#ifndef SL_STACK_SIZE +#define SL_STACK_SIZE 4608 +#endif +// + +// <<< end of configuration section >>> + +#endif /* SL_MEMORY_MANAGER_REGION_CONFIG_H */ diff --git a/matter/efr32/mgm26/BRD4350A/config/sl_openthread_features_config.h b/matter/efr32/mgm26/BRD4350A/config/sl_openthread_features_config.h new file mode 100644 index 0000000000..29824027cb --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/config/sl_openthread_features_config.h @@ -0,0 +1,405 @@ +/******************************************************************************* + * @file + * @brief OpenThread stack configuration file. + ******************************************************************************* + * # License + * Copyright 2024 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +#ifndef _SL_OPENTHREAD_FEATURES_CONFIG_H +#define _SL_OPENTHREAD_FEATURES_CONFIG_H +//-------- <<< Use Configuration Wizard in Context Menu >>> ----------------- +// +// Default OpenThread Stack Configuration + +// Thread Stack Protocol Version +// +// Thread 1.1 +// Thread 1.2 +// Thread 1.3 +// Thread 1.4 +// Current Default: OT_THREAD_VERSION_1_4 +#ifndef OPENTHREAD_CONFIG_THREAD_VERSION +#define OPENTHREAD_CONFIG_THREAD_VERSION OT_THREAD_VERSION_1_4 +#endif +// + +#if (OPENTHREAD_CONFIG_THREAD_VERSION >= OT_THREAD_VERSION_1_2) +// The following features require at least Thread Stack Protocol Version 1.2 +// Backbone Router +#ifndef OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE +#define OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE 0 +#endif +// CSL Auto Synchronization using data polling +#ifndef OPENTHREAD_CONFIG_MAC_CSL_AUTO_SYNC_ENABLE +#define OPENTHREAD_CONFIG_MAC_CSL_AUTO_SYNC_ENABLE 1 +#endif +// CSL (Coordinated Sampled Listening) Debug +#ifndef OPENTHREAD_CONFIG_MAC_CSL_DEBUG_ENABLE +#define OPENTHREAD_CONFIG_MAC_CSL_DEBUG_ENABLE 0 +#endif +// CSL (Coordinated Sampled Listening) Receiver +#ifndef OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE +#define OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE 1 +#endif +// CSL Scheduling Uncertainty (±10 us units) <12..999:1> +#ifndef SL_OPENTHREAD_CSL_TX_UNCERTAINTY +#if OPENTHREAD_RADIO + #define SL_OPENTHREAD_CSL_TX_UNCERTAINTY 175 +#elif OPENTHREAD_FTD + #define SL_OPENTHREAD_CSL_TX_UNCERTAINTY 20 +#else + #define SL_OPENTHREAD_CSL_TX_UNCERTAINTY 12 +#endif +#endif +// DUA (Domain Unicast Address) +#ifndef OPENTHREAD_CONFIG_DUA_ENABLE +#define OPENTHREAD_CONFIG_DUA_ENABLE 1 +#endif +// Link Metrics Initiator +#ifndef OPENTHREAD_CONFIG_MLE_LINK_METRICS_INITIATOR_ENABLE +#define OPENTHREAD_CONFIG_MLE_LINK_METRICS_INITIATOR_ENABLE 1 +#endif +// Link Metrics Subject +#ifndef OPENTHREAD_CONFIG_MLE_LINK_METRICS_SUBJECT_ENABLE +#define OPENTHREAD_CONFIG_MLE_LINK_METRICS_SUBJECT_ENABLE 1 +#endif +// Multicast Listener Registration +#ifndef OPENTHREAD_CONFIG_MLR_ENABLE +#define OPENTHREAD_CONFIG_MLR_ENABLE 1 +#endif +// +#endif // OPENTHREAD_CONFIG_THREAD_VERSION >= OT_THREAD_VERSION_1_2 + +#if (OPENTHREAD_CONFIG_THREAD_VERSION >= OT_THREAD_VERSION_1_3) +// The following features require at least Thread Stack Protocol Version 1.3 +// DNS Client +#ifndef OPENTHREAD_CONFIG_DNS_CLIENT_ENABLE +#define OPENTHREAD_CONFIG_DNS_CLIENT_ENABLE 1 +#endif +// DNS-SD Server +#ifndef OPENTHREAD_CONFIG_DNSSD_SERVER_ENABLE +#define OPENTHREAD_CONFIG_DNSSD_SERVER_ENABLE 0 +#endif +// Service Registration Protocol (SRP) Client +#ifndef OPENTHREAD_CONFIG_SRP_CLIENT_ENABLE +#define OPENTHREAD_CONFIG_SRP_CLIENT_ENABLE 1 +#endif +// Service Registration Protocol (SRP) Server +#ifndef OPENTHREAD_CONFIG_SRP_SERVER_ENABLE +#define OPENTHREAD_CONFIG_SRP_SERVER_ENABLE 0 +#endif +// TCP API +#ifndef OPENTHREAD_CONFIG_TCP_ENABLE +#define OPENTHREAD_CONFIG_TCP_ENABLE 0 +#endif +// DNS Client over TCP +#ifndef OPENTHREAD_CONFIG_DNS_CLIENT_OVER_TCP_ENABLE +#define OPENTHREAD_CONFIG_DNS_CLIENT_OVER_TCP_ENABLE 0 +#endif +// Thread over Infrastructure (NCP only) +#ifndef OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE +#define OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE 0 +#endif +// +#endif // OPENTHREAD_CONFIG_THREAD_VERSION >= OT_THREAD_VERSION_1_3 + +// Border Agent +#ifndef OPENTHREAD_CONFIG_BORDER_AGENT_ENABLE +#define OPENTHREAD_CONFIG_BORDER_AGENT_ENABLE 0 +#endif +// +// Border Router +#ifndef OPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE +#define OPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE 0 +#endif +// +// Channel Manager +#ifndef OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE +#define OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE 0 +#endif +// +// Channel Monitor +#ifndef OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE +#define OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE 0 +#endif +// + +// Commissioner +#ifndef OPENTHREAD_CONFIG_COMMISSIONER_ENABLE +#define OPENTHREAD_CONFIG_COMMISSIONER_ENABLE 0 +#endif + +// Max Joiner Entries +// The maximum number of Joiner entries maintained by the Commissioner. +// 2 +#ifndef OPENTHREAD_CONFIG_COMMISSIONER_MAX_JOINER_ENTRIES +#define OPENTHREAD_CONFIG_COMMISSIONER_MAX_JOINER_ENTRIES 2 +#endif +// + +// COAP API +#ifndef OPENTHREAD_CONFIG_COAP_API_ENABLE +#define OPENTHREAD_CONFIG_COAP_API_ENABLE 0 +#endif +// +// COAP Observe (RFC7641) API +#ifndef OPENTHREAD_CONFIG_COAP_OBSERVE_API_ENABLE +#define OPENTHREAD_CONFIG_COAP_OBSERVE_API_ENABLE 0 +#endif +// +// COAP Secure API +#ifndef OPENTHREAD_CONFIG_COAP_SECURE_API_ENABLE +#define OPENTHREAD_CONFIG_COAP_SECURE_API_ENABLE 0 +#endif +// +// DHCP6 Client +#ifndef OPENTHREAD_CONFIG_DHCP6_CLIENT_ENABLE +#define OPENTHREAD_CONFIG_DHCP6_CLIENT_ENABLE 0 +#endif +// +// DHCP6 Server +#ifndef OPENTHREAD_CONFIG_DHCP6_SERVER_ENABLE +#define OPENTHREAD_CONFIG_DHCP6_SERVER_ENABLE 0 +#endif +// +// ECDSA (Elliptic Curve Digital Signature Algorithm) (Required for Matter support) +#ifndef OPENTHREAD_CONFIG_ECDSA_ENABLE +#define OPENTHREAD_CONFIG_ECDSA_ENABLE 1 +#endif +// +// External Heap +#ifndef OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE +#define OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE 1 +#endif +// +// IPv6 Fragmentation +#ifndef OPENTHREAD_CONFIG_IP6_FRAGMENTATION_ENABLE +#define OPENTHREAD_CONFIG_IP6_FRAGMENTATION_ENABLE 0 +#endif +// +// Maximum number of IPv6 unicast addresses allowed to be externally added +#ifndef OPENTHREAD_CONFIG_IP6_MAX_EXT_UCAST_ADDRS +#define OPENTHREAD_CONFIG_IP6_MAX_EXT_UCAST_ADDRS 4 +#endif +// +// Maximum number of IPv6 multicast addresses allowed to be externally added +#ifndef OPENTHREAD_CONFIG_IP6_MAX_EXT_MCAST_ADDRS +#define OPENTHREAD_CONFIG_IP6_MAX_EXT_MCAST_ADDRS 4 +#endif +// +// Jam Detection +#ifndef OPENTHREAD_CONFIG_JAM_DETECTION_ENABLE +#define OPENTHREAD_CONFIG_JAM_DETECTION_ENABLE 0 +#endif +// +// Joiner +#ifndef OPENTHREAD_CONFIG_JOINER_ENABLE +#define OPENTHREAD_CONFIG_JOINER_ENABLE 0 +#endif +// +// Link Raw Service +#ifndef OPENTHREAD_CONFIG_LINK_RAW_ENABLE +#define OPENTHREAD_CONFIG_LINK_RAW_ENABLE 0 +#endif +// +// MAC Filter +#ifndef OPENTHREAD_CONFIG_MAC_FILTER_ENABLE +#define OPENTHREAD_CONFIG_MAC_FILTER_ENABLE 0 +#endif +// +// MLE Long Routes extension (experimental) +#ifndef OPENTHREAD_CONFIG_MLE_LONG_ROUTES_ENABLE +#define OPENTHREAD_CONFIG_MLE_LONG_ROUTES_ENABLE 0 +#endif +// +// MultiPAN RCP +#ifndef OPENTHREAD_CONFIG_MULTIPAN_RCP_ENABLE +#define OPENTHREAD_CONFIG_MULTIPAN_RCP_ENABLE 0 +#endif +// +// Multiple OpenThread Instances +#ifndef OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE +#define OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE 0 +#endif +// +// Multiple Static Instance Support +#ifndef OPENTHREAD_CONFIG_MULTIPLE_STATIC_INSTANCE_ENABLE +#define OPENTHREAD_CONFIG_MULTIPLE_STATIC_INSTANCE_ENABLE 0 +#endif +// +// Number of OpenThread Instances For Static Buffer Allocation +#ifndef OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_NUM +#define OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_NUM 2 +#endif +// +// Define broadcast IID for spinel frames dedicated to all hosts in multipan configuration +#ifndef OPENTHREAD_SPINEL_CONFIG_BROADCAST_IID +#define OPENTHREAD_SPINEL_CONFIG_BROADCAST_IID 0 +#endif +// +// OTNS (OpenThread Network Simulator) +#ifndef OPENTHREAD_CONFIG_OTNS_ENABLE +#define OPENTHREAD_CONFIG_OTNS_ENABLE 0 +#endif +// +// Ping Sender Module +#ifndef OPENTHREAD_CONFIG_PING_SENDER_ENABLE +#define OPENTHREAD_CONFIG_PING_SENDER_ENABLE 1 +#endif + +// +// Power Calibration Module (RCP only configuration) +#ifndef OPENTHREAD_CONFIG_POWER_CALIBRATION_ENABLE +#define OPENTHREAD_CONFIG_POWER_CALIBRATION_ENABLE 0 +#endif + +// +// Platform UDP +#ifndef OPENTHREAD_CONFIG_PLATFORM_UDP_ENABLE +#define OPENTHREAD_CONFIG_PLATFORM_UDP_ENABLE 0 +#endif +// +// Reference Device for Thread Test Harness +#ifndef OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE +#define OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE 0 +#endif +// +// Service Entries in Thread Network Data +#ifndef OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE +#define OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE 0 +#endif +// +// RAM (volatile-only storage) +#ifndef OPENTHREAD_SETTINGS_RAM +#define OPENTHREAD_SETTINGS_RAM 0 +#endif +// +// SLAAC Addresses +#ifndef OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE +#define OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE 1 +#endif +// +// SNTP Client +#ifndef OPENTHREAD_CONFIG_SNTP_CLIENT_ENABLE +#define OPENTHREAD_CONFIG_SNTP_CLIENT_ENABLE 0 +#endif +// +// TMF Network Diagnostic client API +#ifndef OPENTHREAD_CONFIG_TMF_NETDIAG_CLIENT_ENABLE +#define OPENTHREAD_CONFIG_TMF_NETDIAG_CLIENT_ENABLE 1 +#endif +// +// Time Synchronization Service +#define OPENTHREAD_CONFIG_TIME_SYNC_ENABLE 0 +// +// UDP Forward +#ifndef OPENTHREAD_CONFIG_UDP_FORWARD_ENABLE +#define OPENTHREAD_CONFIG_UDP_FORWARD_ENABLE 0 +#endif +// +// Enable Mac beacon payload parsing support +#ifndef OPENTHREAD_CONFIG_MAC_BEACON_PAYLOAD_PARSING_ENABLE +#define OPENTHREAD_CONFIG_MAC_BEACON_PAYLOAD_PARSING_ENABLE 1 +#endif +// +// Max raw power calibration length. +#ifndef SL_OPENTHREAD_RAW_POWER_CALIBRATION_LENGTH +#define SL_OPENTHREAD_RAW_POWER_CALIBRATION_LENGTH 4 +#endif +// +// Max FEM config setting length. +#ifndef SL_OPENTHREAD_FEM_SETTING_LENGTH +#define SL_OPENTHREAD_FEM_SETTING_LENGTH 4 +#endif +// +// The maximum number of RX buffers to use in the radio driver. +// 16 +#ifndef SL_OPENTHREAD_RADIO_RX_BUFFER_COUNT +#define SL_OPENTHREAD_RADIO_RX_BUFFER_COUNT 16 +#endif +// +// Logging +// LOG_OUTPUT +// NONE +// APP +// PLATFORM_DEFINED +// Default: OPENTHREAD_CONFIG_LOG_OUTPUT_PLATFORM_DEFINED +#ifndef OPENTHREAD_CONFIG_LOG_OUTPUT +#define OPENTHREAD_CONFIG_LOG_OUTPUT OPENTHREAD_CONFIG_LOG_OUTPUT_APP +#endif + +// DYNAMIC_LOG_LEVEL +#ifndef OPENTHREAD_CONFIG_LOG_LEVEL_DYNAMIC_ENABLE +#define OPENTHREAD_CONFIG_LOG_LEVEL_DYNAMIC_ENABLE 0 +#endif + +// Enable Logging +#define OPENTHREAD_FULL_LOGS_ENABLE 0 +#if OPENTHREAD_FULL_LOGS_ENABLE + +// Note: Enabling higher log levels, which include logging packet details, can cause delays which may result in join failures. +// LOG_LEVEL +// NONE +// CRIT +// WARN +// NOTE +// INFO +// DEBG +// Default: OT_LOG_LEVEL_DEBG +#ifndef OPENTHREAD_CONFIG_LOG_LEVEL +#define OPENTHREAD_CONFIG_LOG_LEVEL OT_LOG_LEVEL_DEBG +#endif +// CLI +#ifndef OPENTHREAD_CONFIG_LOG_CLI +#define OPENTHREAD_CONFIG_LOG_CLI 1 +#endif +// PKT_DUMP +#ifndef OPENTHREAD_CONFIG_LOG_PKT_DUMP +#define OPENTHREAD_CONFIG_LOG_PKT_DUMP 1 +#endif +// PLATFORM +#ifndef OPENTHREAD_CONFIG_LOG_PLATFORM +#define OPENTHREAD_CONFIG_LOG_PLATFORM 1 +#endif +// PREPEND_LEVEL +#ifndef OPENTHREAD_CONFIG_LOG_PREPEND_LEVEL +#define OPENTHREAD_CONFIG_LOG_PREPEND_LEVEL 1 +#endif + +#endif // OPENTHREAD_FULL_LOGS_ENABLE + +// Log crash dump after initialization +#ifndef OPENTHREAD_CONFIG_PLATFORM_LOG_CRASH_DUMP_ENABLE +#define OPENTHREAD_CONFIG_PLATFORM_LOG_CRASH_DUMP_ENABLE 0 +#endif +// + +// +// +// + +// <<< end of configuration section >>> +#endif // _SL_OPENTHREAD_FEATURES_CONFIG_H diff --git a/matter/efr32/mgm26/BRD4350A/config/sl_openthread_radio_config.h b/matter/efr32/mgm26/BRD4350A/config/sl_openthread_radio_config.h new file mode 100644 index 0000000000..478a724302 --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/config/sl_openthread_radio_config.h @@ -0,0 +1,45 @@ +/******************************************************************************* + * @file + * @brief OpenThread radio configuration file. + ******************************************************************************* + * # License + * Copyright 2024 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +#ifndef _SL_OPENTHREAD_RADIO_CONFIG_H +#define _SL_OPENTHREAD_RADIO_CONFIG_H +//-------- <<< Use Configuration Wizard in Context Menu >>> ----------------- +// +// Default EFR32 Radio Configuration + +// Recieve Sensitivity [dBm] +#define SL_OPENTHREAD_RECEIVE_SENSITIVITY -100 // dBm +// RSSI Average Time [us] +#define SL_OPENTHREAD_RSSI_AVERAGING_TIME 16 // us +// RSSI Average Timeout [us] +#define SL_OPENTHREAD_RSSI_AVERAGING_TIMEOUT 300 // us +// +// <<< end of configuration section >>> +#endif // _SL_OPENTHREAD_RADIO_CONFIG_H diff --git a/matter/efr32/mgm26/BRD4350A/config/sl_openthread_rtos_config.h b/matter/efr32/mgm26/BRD4350A/config/sl_openthread_rtos_config.h new file mode 100644 index 0000000000..0947d31f59 --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/config/sl_openthread_rtos_config.h @@ -0,0 +1,100 @@ +/******************************************************************************* + * @file + * @brief OpenThread RTOS configuration file. + ******************************************************************************* + * # License + * Copyright 2024 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +//-------- <<< Use Configuration Wizard in Context Menu >>> ----------------- +// +// Priority Configuration for OpenThread RTOS Stack Task +// OpenThread stack task priority +// Default: 24 (CMSIS-RTOS2 osPriorityNormal) +// Defines OpenThread stack task priority. This must be a valid priority value +// from CMSIS-RTOS2 osPriority_t definition. +#define SL_OPENTHREAD_RTOS_STACK_TASK_PRIORITY (24) + +// +// Priority Configuration for OpenThread App Task +// OpenThread task priority +// Default: 23 (CMSIS-RTOS2 osPriorityBelowNormal7) +// Defines OpenThread App task priority. This must be a valid priority value +// from CMSIS-RTOS2 osPriority_t definition. +#define SL_OPENTHREAD_RTOS_APP_TASK_PRIORITY (23) + +// +// Priority Configuration for OpenThread RTOS Stack Task +// OpenThread serial task prority +// Default: 16 (CMSIS-RTOS2 osPriorityBelowNormal) +// Defines OpenThread serial task priority. This must be a valid priority value +// from CMSIS-RTOS2 osPriority_t definition. +#define SL_OPENTHREAD_RTOS_SERIAL_TASK_PRIORITY (16) + +// OpenThread stack task stack size in bytes <1000-20000> +// Default: 4608 +// Defines the stack size of the OpenThread RTOS stack task. The value is in bytes and +// and will be word aligned when it is applied at the task creation. +#define SL_OPENTHREAD_STACK_TASK_MEM_SIZE (4608) + +// OpenThread app task stack size in bytes <1000-20000> +// Default: 4608 +// Defines the stack size of the OpenThread RTOS app task. The value is in bytes and +// and will be word aligned when it is applied at the task creation. +#define SL_OPENTHREAD_APP_TASK_MEM_SIZE (4608) + +// OpenThread serial task stack size in bytes <1000-20000> +// Default: 3072 +// Defines the stack size of the OpenThread RTOS serial task. The value is in bytes and +// and will be word aligned when it is applied at the task creation. +#define SL_OPENTHREAD_SERIAL_TASK_MEM_SIZE (3072) +// +// Priority Configuration for OpenThread RTOS Stack Task +// OpenThread serial task prority +// Default: 16 (CMSIS-RTOS2 osPriorityBelowNormal) +// Defines OpenThread serial task priority. This must be a valid priority value +// from CMSIS-RTOS2 osPriority_t definition. +#define SL_OPENTHREAD_RTOS_SERIAL_TASK_PRIORITY (16) + +// OpenThread serial task stack size in bytes <1000-20000> +// Default: 2048 +// Defines the stack size of the OpenThread RTOS serial task. The value is in bytes and +// and will be word aligned when it is applied at the task creation. +#define SL_OPENTHREAD_OS_SERIAL_TASK_SIZE 2048 + +// +// App Task +// Enable default App task +// Default: On +#define SL_OPENTHREAD_ENABLE_APP_TASK 0 + +// +// Serial task +// Enable Serial task +// Default: On +#define SL_OPENTHREAD_ENABLE_SERIAL_TASK (1) + +// +// <<< end of configuration section >>> diff --git a/matter/efr32/mgm26/BRD4350A/config/sl_power_manager_config.h b/matter/efr32/mgm26/BRD4350A/config/sl_power_manager_config.h new file mode 100644 index 0000000000..42f59d7def --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/config/sl_power_manager_config.h @@ -0,0 +1,78 @@ +/***************************************************************************//** + * @file + * @brief Power Manager configuration file. + ******************************************************************************* + * # License + * Copyright 2020 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +// <<< Use Configuration Wizard in Context Menu >>> + +#ifndef SL_POWER_MANAGER_CONFIG_H +#define SL_POWER_MANAGER_CONFIG_H + +// Power Manager Configuration + +// Enable custom IRQ handler for external HF oscillator. +// Enable if CMU_IRQHandler/HFXO0_IRQHandler is needed from your application. +// The function sl_power_manager_irq_handler() will have to be called from you custom handler if this is enabled. +// Default: 0 +#define SL_POWER_MANAGER_CUSTOM_HF_OSCILLATOR_IRQ_HANDLER 0 + +// Enable fast wakeup (disable voltage scaling in EM2/3 mode) +// Enable or disable voltage scaling in EM2/3 modes (when available). This decreases wakeup time by about 30 us. +// Deprecated. It is replaced by the function sl_power_manager_em23_voltage_scaling_enable_fast_wakeup() +// Default: 0 +#define SL_POWER_MANAGER_CONFIG_VOLTAGE_SCALING_FAST_WAKEUP 0 + +// Enable debugging feature +// Enable or disable debugging features (trace the different modules that have requirements). +// Default: 0 +#define SL_POWER_MANAGER_DEBUG 0 + +// Maximum numbers of requirements that can be logged +// Default: 10 +#define SL_POWER_MANAGER_DEBUG_POOL_SIZE 10 +// + +// Pin retention mode +// +// No retention +// Retention through EM4 +// Retention through EM4 and wakeup +// power_manager_pin_retention_disable +#define SL_POWER_MANAGER_INIT_EMU_EM4_PIN_RETENTION_MODE EMU_EM4CTRL_EM4IORETMODE_DISABLE + +// Enable EM2 debugging feature +// Enable or disable debugging features. +// Default: 1 +#define SL_POWER_MANAGER_INIT_EMU_EM2_DEBUG_ENABLE 1 +// + +// + +#endif /* SL_POWER_MANAGER_CONFIG_H */ + +// <<< end of configuration section >>> diff --git a/matter/efr32/mgm26/BRD4350A/config/sl_rail_util_pa_config.h b/matter/efr32/mgm26/BRD4350A/config/sl_rail_util_pa_config.h new file mode 100644 index 0000000000..8d9bde66bd --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/config/sl_rail_util_pa_config.h @@ -0,0 +1,81 @@ +/***************************************************************************//** + * @file + * @brief Power Amplifier configuration file. + ******************************************************************************* + * # License + * Copyright 2023 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +#ifndef SL_RAIL_UTIL_PA_CONFIG_H +#define SL_RAIL_UTIL_PA_CONFIG_H + +#include "rail_types.h" + +// <<< Use Configuration Wizard in Context Menu >>> +// PA configuration + +// Initial PA Power (deci-dBm, 100 = 10.0 dBm) +// Default: 100 +#define SL_RAIL_UTIL_PA_POWER_DECI_DBM 100 + +// PA Ramp Time (microseconds) +// <10-10:1> +// Default: 10 +#define SL_RAIL_UTIL_PA_RAMP_TIME_US 10 + +// Milli-volts on PA supply pin (PA_VDD) +// <0-65535:1> +// Default: 3300 +#define SL_RAIL_UTIL_PA_VOLTAGE_MV 1800 + +// 2.4 GHz PA Selection +// Highest Possible +// High Power (chip-specific) +// Low Power +// Disable +// Default: RAIL_TX_POWER_MODE_2P4GIG_HIGHEST +#define SL_RAIL_UTIL_PA_SELECTION_2P4GHZ RAIL_TX_POWER_MODE_2P4GIG_HIGHEST + +// Sub-1 GHz PA Selection +// Disable +// Default: RAIL_TX_POWER_MODE_NONE +#define SL_RAIL_UTIL_PA_SELECTION_SUBGHZ RAIL_TX_POWER_MODE_NONE + +// Header file containing custom PA curves +// Default: "pa_curves_efr32.h" +#define SL_RAIL_UTIL_PA_CURVE_HEADER "pa_curves_efr32.h" + +// Header file containing PA curve types +// Default: "pa_curve_types_efr32.h" +#define SL_RAIL_UTIL_PA_CURVE_TYPES "pa_curve_types_efr32.h" + +// Enable PA Calibration +// Default: 1 +#define SL_RAIL_UTIL_PA_CALIBRATION_ENABLE 1 + +// +// <<< end of configuration section >>> + +#endif // SL_RAIL_UTIL_PA_CONFIG_H diff --git a/matter/efr32/mgm26/BRD4350A/config/sl_rail_util_power_manager_init_config.h b/matter/efr32/mgm26/BRD4350A/config/sl_rail_util_power_manager_init_config.h new file mode 100644 index 0000000000..cbc69f24d4 --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/config/sl_rail_util_power_manager_init_config.h @@ -0,0 +1,44 @@ +/***************************************************************************//** + * @file + * @brief RAIL power manager configuration file. + ******************************************************************************* + * # License + * Copyright 2020 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +#ifndef SL_RAIL_UTIL_POWER_MANAGER_INIT_CONFIG_H +#define SL_RAIL_UTIL_POWER_MANAGER_INIT_CONFIG_H + +// <<< Use Configuration Wizard in Context Menu >>> + +// RAIL power manager configuration + +// Enable RAIL power manager initialization +// Default: 1 +#define SL_RAIL_UTIL_RAIL_POWER_MANAGER_INIT 1 + +// +// <<< end of configuration section >>> +#endif // SL_RAIL_UTIL_POWER_MANAGER_INIT_CONFIG_H diff --git a/matter/efr32/mgm26/BRD4350A/config/sl_rail_util_pti_config.h b/matter/efr32/mgm26/BRD4350A/config/sl_rail_util_pti_config.h new file mode 100644 index 0000000000..cc8f62c338 --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/config/sl_rail_util_pti_config.h @@ -0,0 +1,73 @@ +/***************************************************************************//** + * @file + * @brief Packet Trace Information configuration file. + ******************************************************************************* + * # License + * Copyright 2020 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +#ifndef SL_RAIL_UTIL_PTI_CONFIG_H +#define SL_RAIL_UTIL_PTI_CONFIG_H + +#include "rail_types.h" + +// <<< Use Configuration Wizard in Context Menu >>> +// PTI Configuration + +// PTI mode +// UART +// UART onewire +// SPI +// Disabled +// Default: RAIL_PTI_MODE_UART +#define SL_RAIL_UTIL_PTI_MODE RAIL_PTI_MODE_UART + +// PTI Baud Rate (Hertz) +// <147800-20000000:1> +// Default: 1600000 +#define SL_RAIL_UTIL_PTI_BAUD_RATE_HZ 1600000 + +// +// <<< end of configuration section >>> + +// <<< sl:start pin_tool >>> +// SL_RAIL_UTIL_PTI +// $[PTI_SL_RAIL_UTIL_PTI] +#define SL_RAIL_UTIL_PTI_PERIPHERAL PTI + +// PTI DOUT on PC04 +#define SL_RAIL_UTIL_PTI_DOUT_PORT SL_GPIO_PORT_C +#define SL_RAIL_UTIL_PTI_DOUT_PIN 4 + +// PTI DFRAME on PC05 +#define SL_RAIL_UTIL_PTI_DFRAME_PORT SL_GPIO_PORT_C +#define SL_RAIL_UTIL_PTI_DFRAME_PIN 5 + + +// [PTI_SL_RAIL_UTIL_PTI]$ + +// <<< sl:end pin_tool >>> + +#endif // SL_RAIL_UTIL_PTI_CONFIG_H diff --git a/matter/efr32/mgm26/BRD4350A/config/sl_rail_util_rssi_config.h b/matter/efr32/mgm26/BRD4350A/config/sl_rail_util_rssi_config.h new file mode 100644 index 0000000000..23f3739333 --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/config/sl_rail_util_rssi_config.h @@ -0,0 +1,44 @@ +/***************************************************************************//** + * @file + * @brief RSSI configuration header file. + ******************************************************************************* + * # License + * Copyright 2023 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +#ifndef SL_RAIL_UTIL_RSSI_CONFIG_H +#define SL_RAIL_UTIL_RSSI_CONFIG_H + +// <<< Use Configuration Wizard in Context Menu >>> + +// RSSI Offset Configuration + +// Software RSSI offset value +// Default: 0 +#define SL_RAIL_UTIL_RSSI_OFFSET 0 + +// +// <<< end of configuration section >>> +#endif // SL_RAIL_UTIL_RSSI_CONFIG_H diff --git a/matter/efr32/mgm26/BRD4350A/config/sl_rail_util_sequencer_config.h b/matter/efr32/mgm26/BRD4350A/config/sl_rail_util_sequencer_config.h new file mode 100644 index 0000000000..bdbe488a5a --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/config/sl_rail_util_sequencer_config.h @@ -0,0 +1,48 @@ +/***************************************************************************//** + * @file + * @brief + ******************************************************************************* + * # License + * Copyright 2023 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +#ifndef SL_RAIL_UTIL_SEQUENCER_H +#define SL_RAIL_UTIL_SEQUENCER_H + +#include "rail.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define SL_RAIL_UTIL_SEQUENCER_RUNTIME_IMAGE_SELECTION 0 + +#define SL_RAIL_UTIL_SEQUENCER_IMAGE RAIL_SEQ_IMAGE_PA_10_DBM + +#ifdef __cplusplus +} +#endif + +#endif // SL_RAIL_UTIL_SEQUENCER_H diff --git a/matter/efr32/mgm26/BRD4350A/config/sl_simple_button_btn0_config.h b/matter/efr32/mgm26/BRD4350A/config/sl_simple_button_btn0_config.h new file mode 100644 index 0000000000..55e41f3430 --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/config/sl_simple_button_btn0_config.h @@ -0,0 +1,58 @@ +/***************************************************************************//** + * @file + * @brief Simple Button Driver User Config + ******************************************************************************* + * # License + * Copyright 2024 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +#ifndef SL_SIMPLE_BUTTON_BTN0_CONFIG_H +#define SL_SIMPLE_BUTTON_BTN0_CONFIG_H + +#include "sl_gpio.h" +#include "sl_simple_button.h" + +// <<< Use Configuration Wizard in Context Menu >>> + +// +// Interrupt +// Poll and Debounce +// Poll +// Default: SL_SIMPLE_BUTTON_MODE_INTERRUPT +#define SL_SIMPLE_BUTTON_BTN0_MODE SL_SIMPLE_BUTTON_MODE_INTERRUPT +// <<< end of configuration section >>> + +// <<< sl:start pin_tool >>> + +// SL_SIMPLE_BUTTON_BTN0 +// $[GPIO_SL_SIMPLE_BUTTON_BTN0] +#define SL_SIMPLE_BUTTON_BTN0_PORT SL_GPIO_PORT_B +#define SL_SIMPLE_BUTTON_BTN0_PIN 0 + +// [GPIO_SL_SIMPLE_BUTTON_BTN0]$ + +// <<< sl:end pin_tool >>> + +#endif // SL_SIMPLE_BUTTON_BTN0_CONFIG_H diff --git a/matter/efr32/mgm26/BRD4350A/config/sl_simple_button_btn1_config.h b/matter/efr32/mgm26/BRD4350A/config/sl_simple_button_btn1_config.h new file mode 100644 index 0000000000..a34574c2ec --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/config/sl_simple_button_btn1_config.h @@ -0,0 +1,58 @@ +/***************************************************************************//** + * @file + * @brief Simple Button Driver User Config + ******************************************************************************* + * # License + * Copyright 2024 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +#ifndef SL_SIMPLE_BUTTON_BTN1_CONFIG_H +#define SL_SIMPLE_BUTTON_BTN1_CONFIG_H + +#include "sl_gpio.h" +#include "sl_simple_button.h" + +// <<< Use Configuration Wizard in Context Menu >>> + +// +// Interrupt +// Poll and Debounce +// Poll +// Default: SL_SIMPLE_BUTTON_MODE_INTERRUPT +#define SL_SIMPLE_BUTTON_BTN1_MODE SL_SIMPLE_BUTTON_MODE_INTERRUPT +// <<< end of configuration section >>> + +// <<< sl:start pin_tool >>> + +// SL_SIMPLE_BUTTON_BTN1 +// $[GPIO_SL_SIMPLE_BUTTON_BTN1] +#define SL_SIMPLE_BUTTON_BTN1_PORT SL_GPIO_PORT_B +#define SL_SIMPLE_BUTTON_BTN1_PIN 1 + +// [GPIO_SL_SIMPLE_BUTTON_BTN1]$ + +// <<< sl:end pin_tool >>> + +#endif // SL_SIMPLE_BUTTON_BTN1_CONFIG_H diff --git a/matter/efr32/mgm26/BRD4350A/config/sl_simple_button_config.h b/matter/efr32/mgm26/BRD4350A/config/sl_simple_button_config.h new file mode 100644 index 0000000000..531f4f208c --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/config/sl_simple_button_config.h @@ -0,0 +1,72 @@ +/***************************************************************************//** + * @file + * @brief Simple Button Driver Configuration + ******************************************************************************* + * # License + * Copyright 2024 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +#ifndef SL_SIMPLE_BUTTON_CONFIG_H +#define SL_SIMPLE_BUTTON_CONFIG_H + +#include "sl_gpio.h" +// <<< Use Configuration Wizard in Context Menu >>> + +// Simple Button Driver Configuration + +// Number of bits <1-15> +// Default: 5 +// Defines the number of calls to sl_simple_button_poll_step wherein the button +// state must remain the same before the button state is considered debounced +#define SL_SIMPLE_BUTTON_DEBOUNCE_BITS 5U + +// +// GPIO Input +// GPIO Input Pull +// GPIO Input Pull Filter +// Default: gpioModeInput +#define SL_SIMPLE_BUTTON_GPIO_MODE SL_GPIO_MODE_INPUT + +// +// SL_SIMPLE_BUTTON_GPIO_MODE == SL_GPIO_MODE_INPUT, Filter if DOUT is set +// SL_SIMPLE_BUTTON_GPIO_MODE == SL_GPIO_MODE_INPUT_PULL, DOUT determines pull direction +#define SL_SIMPLE_BUTTON_GPIO_DOUT 0U + +// +// 0 Active Low +// 1 Active High +// Default: 0 +#define SL_SIMPLE_BUTTON_POLARITY 0U + +// Allow the app to manage Buttons and LEDs on the same pin +// 0 Error if Buttons and LEDs are on the same pin +// 1 Do not error if Buttons and LEDs are on the same pin +// Default: 0 +#define SL_SIMPLE_BUTTON_ALLOW_LED_CONFLICT 0U + +// + +// <<< end of configuration section >>> +#endif // SL_SIMPLE_BUTTON_CONFIG_H diff --git a/matter/efr32/mgm26/BRD4350A/config/sl_simple_led_led0_config.h b/matter/efr32/mgm26/BRD4350A/config/sl_simple_led_led0_config.h new file mode 100644 index 0000000000..9be64fc439 --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/config/sl_simple_led_led0_config.h @@ -0,0 +1,57 @@ +/***************************************************************************//** + * @file + * @brief Simple Led Driver Configuration + ******************************************************************************* + * # License + * Copyright 2019 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +#ifndef SL_SIMPLE_LED_LED0_CONFIG_H +#define SL_SIMPLE_LED_LED0_CONFIG_H + +// <<< Use Configuration Wizard in Context Menu >>> + +// Simple LED configuration +// +// Active low +// Active high +// Default: SL_SIMPLE_LED_POLARITY_ACTIVE_HIGH +#define SL_SIMPLE_LED_LED0_POLARITY SL_SIMPLE_LED_POLARITY_ACTIVE_HIGH +// end led configuration + +// <<< end of configuration section >>> + +// <<< sl:start pin_tool >>> + +// SL_SIMPLE_LED_LED0 +// $[GPIO_SL_SIMPLE_LED_LED0] +#define SL_SIMPLE_LED_LED0_PORT SL_GPIO_PORT_C +#define SL_SIMPLE_LED_LED0_PIN 7 + +// [GPIO_SL_SIMPLE_LED_LED0]$ + +// <<< sl:end pin_tool >>> + +#endif // SL_SIMPLE_LED_LED0_CONFIG_H diff --git a/matter/efr32/mgm26/BRD4350A/config/sl_simple_led_led1_config.h b/matter/efr32/mgm26/BRD4350A/config/sl_simple_led_led1_config.h new file mode 100644 index 0000000000..8f11a006ce --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/config/sl_simple_led_led1_config.h @@ -0,0 +1,57 @@ +/***************************************************************************//** + * @file + * @brief Simple Led Driver Configuration + ******************************************************************************* + * # License + * Copyright 2019 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +#ifndef SL_SIMPLE_LED_LED1_CONFIG_H +#define SL_SIMPLE_LED_LED1_CONFIG_H + +// <<< Use Configuration Wizard in Context Menu >>> + +// Simple LED configuration +// +// Active low +// Active high +// Default: SL_SIMPLE_LED_POLARITY_ACTIVE_HIGH +#define SL_SIMPLE_LED_LED1_POLARITY SL_SIMPLE_LED_POLARITY_ACTIVE_HIGH +// end led configuration + +// <<< end of configuration section >>> + +// <<< sl:start pin_tool >>> + +// SL_SIMPLE_LED_LED1 +// $[GPIO_SL_SIMPLE_LED_LED1] +#define SL_SIMPLE_LED_LED1_PORT SL_GPIO_PORT_C +#define SL_SIMPLE_LED_LED1_PIN 8 + +// [GPIO_SL_SIMPLE_LED_LED1]$ + +// <<< sl:end pin_tool >>> + +#endif // SL_SIMPLE_LED_LED1_CONFIG_H diff --git a/matter/efr32/mgm26/BRD4350A/config/sl_sleeptimer_config.h b/matter/efr32/mgm26/BRD4350A/config/sl_sleeptimer_config.h new file mode 100644 index 0000000000..8344ef5f11 --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/config/sl_sleeptimer_config.h @@ -0,0 +1,82 @@ +/***************************************************************************//** + * @file + * @brief Sleep Timer configuration file. + ******************************************************************************* + * # License + * Copyright 2020 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +// <<< Use Configuration Wizard in Context Menu >>> + +#ifndef SL_SLEEPTIMER_CONFIG_H +#define SL_SLEEPTIMER_CONFIG_H + +#define SL_SLEEPTIMER_PERIPHERAL_DEFAULT 0 +#define SL_SLEEPTIMER_PERIPHERAL_RTCC 1 +#define SL_SLEEPTIMER_PERIPHERAL_PRORTC 2 +#define SL_SLEEPTIMER_PERIPHERAL_RTC 3 +#define SL_SLEEPTIMER_PERIPHERAL_SYSRTC 4 +#define SL_SLEEPTIMER_PERIPHERAL_BURTC 5 +#define SL_SLEEPTIMER_PERIPHERAL_WTIMER 6 +#define SL_SLEEPTIMER_PERIPHERAL_TIMER 7 + +// Timer Peripheral Used by Sleeptimer +// Default (auto select) +// RTCC +// Radio internal RTC (PRORTC) +// RTC +// SYSRTC +// Back-Up RTC (BURTC) +// WTIMER +// TIMER +// Selection of the Timer Peripheral Used by the Sleeptimer +#define SL_SLEEPTIMER_PERIPHERAL SL_SLEEPTIMER_PERIPHERAL_DEFAULT + +// TIMER/WTIMER Instance Used by Sleeptimer (not applicable for other peripherals) +// Make sure TIMER instance size is 32bits. Check datasheet for 32bits TIMERs. +// Default: 0 +#define SL_SLEEPTIMER_TIMER_INSTANCE 0 + +// Enable wallclock functionality +// Enable or disable wallclock functionalities (get_time, get_date, etc). +// Default: 0 +#define SL_SLEEPTIMER_WALLCLOCK_CONFIG 0 + +// Timer frequency divider (not applicable for WTIMER/TIMER) +// WTIMER/TIMER peripherals are always prescaled to 1024. +// Default: 1 +#define SL_SLEEPTIMER_FREQ_DIVIDER 1 + +// If Radio internal RTC (PRORTC) HAL is used, determines if it owns the IRQ handler. Enable, if no wireless stack is used. +// Default: 0 +#define SL_SLEEPTIMER_PRORTC_HAL_OWNS_IRQ_HANDLER 0 + +// Enable DEBUGRUN functionality on hardware RTC. +// Default: 0 +#define SL_SLEEPTIMER_DEBUGRUN 0 + +#endif /* SLEEPTIMER_CONFIG_H */ + +// <<< end of configuration section >>> diff --git a/matter/efr32/mgm26/BRD4350A/config/sl_uartdrv_eusart_vcom_config.h b/matter/efr32/mgm26/BRD4350A/config/sl_uartdrv_eusart_vcom_config.h new file mode 100644 index 0000000000..af3efa2f59 --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/config/sl_uartdrv_eusart_vcom_config.h @@ -0,0 +1,119 @@ +/***************************************************************************//** + * @file + * @brief UARTDRV_EUSART Config + ******************************************************************************* + * # License + * Copyright 2019 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ + +#ifndef SL_UARTDRV_EUSART_VCOM_CONFIG_H +#define SL_UARTDRV_EUSART_VCOM_CONFIG_H + +#include "em_eusart.h" +// <<< Use Configuration Wizard in Context Menu >>> + +// EUSART settings +// Baud rate +// Default: 115200 +#define SL_UARTDRV_EUSART_VCOM_BAUDRATE 115200 + +// Low frequency mode +// True +// False +#define SL_UARTDRV_EUSART_VCOM_LF_MODE false + +// Parity mode to use +// No Parity +// Even parity +// Odd parity +// Default: eusartNoParity +#define SL_UARTDRV_EUSART_VCOM_PARITY eusartNoParity + +// Number of stop bits to use. +// 0.5 stop bits +// 1 stop bits +// 1.5 stop bits +// 2 stop bits +// Default: eusartStopbits1 +#define SL_UARTDRV_EUSART_VCOM_STOP_BITS eusartStopbits1 + +// Flow control method +// None +// Software XON/XOFF +// nRTS/nCTS hardware handshake +// UART peripheral controls nRTS/nCTS +// Default: uartdrvFlowControlHwUart +#define SL_UARTDRV_EUSART_VCOM_FLOW_CONTROL_TYPE uartdrvFlowControlHwUart + +// Oversampling selection +// 16x oversampling +// 8x oversampling +// 6x oversampling +// 4x oversampling +// Oversampling disabled +// Default: eusartOVS16 +#define SL_UARTDRV_EUSART_VCOM_OVERSAMPLING eusartOVS16 + +// Majority vote disable for 16x, 8x and 6x oversampling modes +// False +// True +// Default: eusartMajorityVoteEnable +#define SL_UARTDRV_EUSART_VCOM_MVDIS eusartMajorityVoteEnable + +// Size of the receive operation queue +// Default: 6 +#define SL_UARTDRV_EUSART_VCOM_RX_BUFFER_SIZE 6 + +// Size of the transmit operation queue +// Default: 6 +#define SL_UARTDRV_EUSART_VCOM_TX_BUFFER_SIZE 6 +// +// <<< end of configuration section >>> + +// <<< sl:start pin_tool >>> +// SL_UARTDRV_EUSART_VCOM +// $[EUSART_SL_UARTDRV_EUSART_VCOM] +#define SL_UARTDRV_EUSART_VCOM_PERIPHERAL EUSART0 +#define SL_UARTDRV_EUSART_VCOM_PERIPHERAL_NO 0 + +// EUSART0 TX on PA05 +#define SL_UARTDRV_EUSART_VCOM_TX_PORT SL_GPIO_PORT_A +#define SL_UARTDRV_EUSART_VCOM_TX_PIN 5 + +// EUSART0 RX on PA06 +#define SL_UARTDRV_EUSART_VCOM_RX_PORT SL_GPIO_PORT_A +#define SL_UARTDRV_EUSART_VCOM_RX_PIN 6 + +// EUSART0 CTS on PA08 +#define SL_UARTDRV_EUSART_VCOM_CTS_PORT SL_GPIO_PORT_A +#define SL_UARTDRV_EUSART_VCOM_CTS_PIN 8 + +// EUSART0 RTS on PA07 +#define SL_UARTDRV_EUSART_VCOM_RTS_PORT SL_GPIO_PORT_A +#define SL_UARTDRV_EUSART_VCOM_RTS_PIN 7 + +// [EUSART_SL_UARTDRV_EUSART_VCOM]$ +// <<< sl:end pin_tool >>> +#endif // SL_UARTDRV_EUSART_VCOM_CONFIG_H diff --git a/matter/efr32/mgm26/BRD4350A/config/uartdrv_config.h b/matter/efr32/mgm26/BRD4350A/config/uartdrv_config.h new file mode 100644 index 0000000000..76ee736914 --- /dev/null +++ b/matter/efr32/mgm26/BRD4350A/config/uartdrv_config.h @@ -0,0 +1,114 @@ +/***************************************************************************//** + * @file + * @brief UARTDRV configuration file. + ******************************************************************************* + * # License + * Copyright 2018 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * SPDX-License-Identifier: Zlib + * + * The licensor of this software is Silicon Laboratories Inc. + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + ******************************************************************************/ +#ifndef __SILICON_LABS_UARTDRV_CONFIG_H__ +#define __SILICON_LABS_UARTDRV_CONFIG_H__ + +/***************************************************************************//** + * @addtogroup uartdrv + * @{ + ******************************************************************************/ +/// Size of the receive operation queue. +/// @details +/// The maximum number of receive operations that can be queued up for one +/// driver instance before @ref UARTDRV_Receive() returns +/// @ref ECODE_EMDRV_UARTDRV_QUEUE_FULL. +/// @note +/// This macro is not used by the UARTDRV itself, but is intended to be used +/// with the @ref DEFINE_BUF_QUEUE macro by the user of the driver to allocate +/// instances of the @ref UARTDRV_Buffer_FifoQueue_t struct. +#if !defined(EMDRV_UARTDRV_MAX_CONCURRENT_RX_BUFS) +#define EMDRV_UARTDRV_MAX_CONCURRENT_RX_BUFS 6 +#endif + +/// Size of the transmit operation queue. +/// @details +/// The maximum number of transmit operations that can be queued up for one +/// driver instance before @ref UARTDRV_Transmit() returns +/// @ref ECODE_EMDRV_UARTDRV_QUEUE_FULL. +/// @note +/// This macro is not used by the UARTDRV itself, but is intended to be used +/// with the @ref DEFINE_BUF_QUEUE macro by the user of the driver to allocate +/// instances of the @ref UARTDRV_Buffer_FifoQueue_t struct. +#if !defined(EMDRV_UARTDRV_MAX_CONCURRENT_TX_BUFS) +#define EMDRV_UARTDRV_MAX_CONCURRENT_TX_BUFS 6 +#endif + +// <<< Use Configuration Wizard in Context Menu >>> +// UARTDRV Settings + +/// Set to 1 to include flow control support +#if !defined(EMDRV_UARTDRV_FLOW_CONTROL_ENABLE) +// Flow control support +// <1=> Enable +// <0=> Disable +// Default: 1 +#define EMDRV_UARTDRV_FLOW_CONTROL_ENABLE 0 +#endif + +/// Maximum number of driver instances. +#if !defined(EMDRV_UARTDRV_MAX_DRIVER_INSTANCES) +// Maximum number of driver instances +// This maximum only applies when UARTDRV_FLOW_CONTROL_ENABLE = 1 +// Default: 4 +#define EMDRV_UARTDRV_MAX_DRIVER_INSTANCES 4 +#endif + +/// UART software flow control code: request peer to start TX +#if !defined(UARTDRV_FC_SW_XON) +// UART software flow control code: request peer to start TX +// Default: 0x11 +#define UARTDRV_FC_SW_XON 0x11 +#endif + +/// UART software flow control code: request peer to stop TX +#if !defined(UARTDRV_FC_SW_XOFF) +// UART software flow control code: request peer to stop TX +// Default: 0x13 +#define UARTDRV_FC_SW_XOFF 0x13 +#endif + +/// UART enable reception when sleeping. +#if !defined(UARTDRV_RESTRICT_ENERGY_MODE_TO_ALLOW_RECEPTION) +// Enable reception when sleeping +// Enable reception when sleeping will use the power manager and add EM1 +// requirement during receive operations that use DMA. +// <1=> Enable +// <0=> Disable +// Default: 1 +#define UARTDRV_RESTRICT_ENERGY_MODE_TO_ALLOW_RECEPTION 1 +#endif + +// + +// <<< end of configuration section >>> + +/** @} (end addtogroup uartdrv) */ + +#endif /* __SILICON_LABS_UARTDRV_CONFIG_H__ */ diff --git a/scripts/generate_boards.py b/scripts/generate_boards.py index cc19d3537f..e2951703ba 100755 --- a/scripts/generate_boards.py +++ b/scripts/generate_boards.py @@ -28,6 +28,7 @@ class Boards(str, Enum): BRD4317A = "BRD4317A" BRD4318A = "BRD4318A" BRD4319A = "BRD4319A" + BRD4350A = "BRD4350A" ALL = "ALL" @classmethod @@ -44,6 +45,7 @@ class Family(str, Enum): MG26 = "efr32mg26" MG24 = "efr32mg24" MGM24 = "mgm24" + MGM26 = "mgm26" class BoardDict(dict): @@ -102,6 +104,8 @@ def __init__(self, message): slc_arguments="simple_led:led0:led1,simple_button:btn0:btn1,uartdrv_eusart:vcom,mx25_flash_shutdown_usart,memlcd_usart,dmd_memlcd,i2cspm:sensor,brd4118a") _boards[Boards.BRD2608A] = Board(board=Boards.BRD2608A, family=Family.MG26, slc_arguments="simple_led:led0:led1,simple_button:btn0:btn1,uartdrv_eusart:vcom,mx25_flash_shutdown_usart,i2cspm:sensor,brd2608a") +_boards[Boards.BRD4350A] = Board(board=Boards.BRD4350A, family=Family.MGM26, + slc_arguments="simple_led:led0:led1,simple_button:btn0:btn1,uartdrv_eusart:vcom,i2cspm:sensor,brd4350a") def _parse_args():