1 /** 2 ****************************************************************************** 3 * @file mbox_def.h 4 * @author MCD Application Team 5 * @brief Mailbox definition 6 ****************************************************************************** 7 * @attention 8 * 9 * <h2><center>© Copyright (c) 2019 STMicroelectronics. 10 * All rights reserved.</center></h2> 11 * 12 * This software component is licensed by ST under BSD 3-Clause license, 13 * the "License"; You may not use this file except in compliance with the 14 * License. You may obtain a copy of the License at: 15 * opensource.org/licenses/BSD-3-Clause 16 * 17 ****************************************************************************** 18 */ 19 20 21 /* Define to prevent recursive inclusion -------------------------------------*/ 22 #ifndef __MBOX_H 23 #define __MBOX_H 24 25 #ifdef __cplusplus 26 extern "C" { 27 #endif 28 29 #include "stm32_wpan_common.h" 30 31 /** 32 * This file shall be identical between the CPU1 and the CPU2 33 */ 34 35 /** 36 ********************************************************************************* 37 * TABLES 38 ********************************************************************************* 39 */ 40 41 /** 42 * Version 43 * [0:3] = Build - 0: Untracked - 15:Released - x: Tracked version 44 * [4:7] = branch - 0: Mass Market - x: ... 45 * [8:15] = Subversion 46 * [16:23] = Version minor 47 * [24:31] = Version major 48 * 49 * Memory Size 50 * [0:7] = Flash ( Number of 4k sector) 51 * [8:15] = Reserved ( Shall be set to 0 - may be used as flash extension ) 52 * [16:23] = SRAM2b ( Number of 1k sector) 53 * [24:31] = SRAM2a ( Number of 1k sector) 54 */ 55 typedef PACKED_STRUCT 56 { 57 uint32_t Version; 58 } MB_SafeBootInfoTable_t; 59 60 typedef PACKED_STRUCT 61 { 62 uint32_t Version; 63 uint32_t MemorySize; 64 uint32_t FusInfo; 65 } MB_FusInfoTable_t; 66 67 typedef PACKED_STRUCT 68 { 69 uint32_t Version; 70 uint32_t MemorySize; 71 uint32_t InfoStack; 72 uint32_t Reserved; 73 } MB_WirelessFwInfoTable_t; 74 75 typedef struct 76 { 77 MB_SafeBootInfoTable_t SafeBootInfoTable; 78 MB_FusInfoTable_t FusInfoTable; 79 MB_WirelessFwInfoTable_t WirelessFwInfoTable; 80 } MB_DeviceInfoTable_t; 81 82 typedef struct 83 { 84 uint8_t *pcmd_buffer; 85 uint8_t *pcs_buffer; 86 uint8_t *pevt_queue; 87 uint8_t *phci_acl_data_buffer; 88 } MB_BleTable_t; 89 90 typedef struct 91 { 92 uint8_t *notack_buffer; 93 uint8_t *clicmdrsp_buffer; 94 uint8_t *otcmdrsp_buffer; 95 } MB_ThreadTable_t; 96 97 typedef struct 98 { 99 uint8_t *notack_buffer; 100 uint8_t *clicmdrsp_buffer; 101 } MB_LldTestsTable_t; 102 103 typedef struct 104 { 105 uint8_t *notifM0toM4_buffer; 106 uint8_t *appliCmdM4toM0_buffer; 107 uint8_t *loggingM0toM4_buffer; 108 } MB_ZigbeeTable_t; 109 /** 110 * msg 111 * [0:7] = cmd/evt 112 * [8:31] = Reserved 113 */ 114 typedef struct 115 { 116 uint8_t *pcmd_buffer; 117 uint8_t *sys_queue; 118 } MB_SysTable_t; 119 120 typedef struct 121 { 122 uint8_t *spare_ble_buffer; 123 uint8_t *spare_sys_buffer; 124 uint8_t *blepool; 125 uint32_t blepoolsize; 126 uint8_t *pevt_free_buffer_queue; 127 uint8_t *traces_evt_pool; 128 uint32_t tracespoolsize; 129 } MB_MemManagerTable_t; 130 131 typedef struct 132 { 133 uint8_t *traces_queue; 134 } MB_TracesTable_t; 135 136 typedef struct 137 { 138 uint8_t *p_cmdrsp_buffer; 139 uint8_t *p_notack_buffer; 140 uint8_t *evt_queue; 141 } MB_Mac_802_15_4_t; 142 143 typedef struct 144 { 145 MB_DeviceInfoTable_t *p_device_info_table; 146 MB_BleTable_t *p_ble_table; 147 MB_ThreadTable_t *p_thread_table; 148 MB_SysTable_t *p_sys_table; 149 MB_MemManagerTable_t *p_mem_manager_table; 150 MB_TracesTable_t *p_traces_table; 151 MB_Mac_802_15_4_t *p_mac_802_15_4_table; 152 MB_ZigbeeTable_t *p_zigbee_table; 153 MB_LldTestsTable_t *p_lld_tests_table; 154 } MB_RefTable_t; 155 156 #ifdef __cplusplus 157 } 158 #endif 159 160 /** 161 ********************************************************************************* 162 * IPCC CHANNELS 163 ********************************************************************************* 164 */ 165 166 /* CPU1 CPU2 167 * | (SYSTEM) | 168 * |----HW_IPCC_SYSTEM_CMD_RSP_CHANNEL-------------->| 169 * | | 170 * |<---HW_IPCC_SYSTEM_EVENT_CHANNEL-----------------| 171 * | | 172 * | (ZIGBEE) | 173 * |----HW_IPCC_ZIGBEE_CMD_APPLI_CHANNEL------------>| 174 * | | 175 * |----HW_IPCC_ZIGBEE_CMD_CLI_CHANNEL-------------->| 176 * | | 177 * |<---HW_IPCC_ZIGBEE_APPLI_NOTIF_ACK_CHANNEL-------| 178 * | | 179 * |<---HW_IPCC_ZIGBEE_CLI_NOTIF_ACK_CHANNEL---------| 180 * | | 181 * | (THREAD) | 182 * |----HW_IPCC_THREAD_OT_CMD_RSP_CHANNEL----------->| 183 * | | 184 * |----HW_IPCC_THREAD_CLI_CMD_CHANNEL-------------->| 185 * | | 186 * |<---HW_IPCC_THREAD_NOTIFICATION_ACK_CHANNEL------| 187 * | | 188 * |<---HW_IPCC_THREAD_CLI_NOTIFICATION_ACK_CHANNEL--| 189 * | | 190 * | (BLE) | 191 * |----HW_IPCC_BLE_CMD_CHANNEL--------------------->| 192 * | | 193 * |----HW_IPCC_HCI_ACL_DATA_CHANNEL---------------->| 194 * | | 195 * |<---HW_IPCC_BLE_EVENT_CHANNEL--------------------| 196 * | | 197 * | (MAC) | 198 * |----HW_IPCC_MAC_802_15_4_CMD_RSP_CHANNEL-------->| 199 * | | 200 * |<---HW_IPCC_MAC_802_15_4_NOTIFICATION_ACK_CHANNEL| 201 * | | 202 * | (BUFFER) | 203 * |----HW_IPCC_MM_RELEASE_BUFFER_CHANNE------------>| 204 * | | 205 * | (TRACE) | 206 * |<----HW_IPCC_TRACES_CHANNEL----------------------| 207 * | | 208 * 209 * 210 * 211 */ 212 213 214 215 /** CPU1 */ 216 #define HW_IPCC_BLE_CMD_CHANNEL LL_IPCC_CHANNEL_1 217 #define HW_IPCC_SYSTEM_CMD_RSP_CHANNEL LL_IPCC_CHANNEL_2 218 #define HW_IPCC_THREAD_OT_CMD_RSP_CHANNEL LL_IPCC_CHANNEL_3 219 #define HW_IPCC_ZIGBEE_CMD_APPLI_CHANNEL LL_IPCC_CHANNEL_3 220 #define HW_IPCC_MAC_802_15_4_CMD_RSP_CHANNEL LL_IPCC_CHANNEL_3 221 #define HW_IPCC_THREAD_CLI_CMD_CHANNEL LL_IPCC_CHANNEL_5 222 #define HW_IPCC_MM_RELEASE_BUFFER_CHANNEL LL_IPCC_CHANNEL_4 223 #define HW_IPCC_HCI_ACL_DATA_CHANNEL LL_IPCC_CHANNEL_6 224 225 /** CPU2 */ 226 #define HW_IPCC_BLE_EVENT_CHANNEL LL_IPCC_CHANNEL_1 227 #define HW_IPCC_SYSTEM_EVENT_CHANNEL LL_IPCC_CHANNEL_2 228 #define HW_IPCC_THREAD_NOTIFICATION_ACK_CHANNEL LL_IPCC_CHANNEL_3 229 #define HW_IPCC_ZIGBEE_APPLI_NOTIF_ACK_CHANNEL LL_IPCC_CHANNEL_3 230 #define HW_IPCC_MAC_802_15_4_NOTIFICATION_ACK_CHANNEL LL_IPCC_CHANNEL_3 231 #define HW_IPCC_TRACES_CHANNEL LL_IPCC_CHANNEL_4 232 #define HW_IPCC_THREAD_CLI_NOTIFICATION_ACK_CHANNEL LL_IPCC_CHANNEL_5 233 #define HW_IPCC_ZIGBEE_APPLI_LOGGING_CHANNEL LL_IPCC_CHANNEL_5 234 #endif /*__MBOX_H */ 235 236 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 237