|
| 1 | +config BLE_LOG_ENABLED |
| 2 | + bool "Enable BLE Log Module (Experimental)" |
| 3 | + default n |
| 4 | + help |
| 5 | + Enable BLE Log Module |
| 6 | + |
| 7 | +if BLE_LOG_ENABLED |
| 8 | + config BLE_LOG_LBM_TRANS_SIZE |
| 9 | + int "Buffer size for each peripheral transport" |
| 10 | + default 512 |
| 11 | + help |
| 12 | + There're 2 log buffer managers (LBMs) with compare-and-swap |
| 13 | + (CAS) protection, 1 LBM with FreeRTOS mutex protection, 1 LBM |
| 14 | + without protection for critical section. Each LBM is managing |
| 15 | + 2 ping-pong buffers, which means there will be 4 * 2 * |
| 16 | + BLE_LOG_LBM_TRANS_SIZE bytes buffer allocated |
| 17 | + |
| 18 | + config BLE_LOG_LBM_ATOMIC_LOCK_TASK_CNT |
| 19 | + int "Count of log buffer managers with atomic lock protection for task context" |
| 20 | + default 2 |
| 21 | + help |
| 22 | + BLE Log module will search for an LBM with atomic lock protection first; if |
| 23 | + all LBMs with atomic lock protection are unavailable, BLE Log module will |
| 24 | + try to use the LBM with spin lock protection. So the more LBMs with atomic |
| 25 | + lock protection are created, the better the logging performance will be. |
| 26 | + |
| 27 | + config BLE_LOG_LBM_ATOMIC_LOCK_ISR_CNT |
| 28 | + int "Count of log buffer managers with atomic lock protection for ISR context" |
| 29 | + default 1 |
| 30 | + help |
| 31 | + BLE Log module will search for an LBM with atomic lock protection first; if |
| 32 | + all LBMs with atomic lock protection are unavailable, BLE Log module will |
| 33 | + try to use the LBM with spin lock protection. So the more LBMs with atomic |
| 34 | + lock protection are created, the more ISRs can nest. |
| 35 | + |
| 36 | + config BLE_LOG_LL_ENABLED |
| 37 | + bool "Enable BLE Log for Link Layer" |
| 38 | + depends on BT_CONTROLLER_ENABLED |
| 39 | + default y |
| 40 | + select BT_LE_CONTROLLER_LOG_ENABLED |
| 41 | + select BT_LE_CONTROLLER_LOG_MODE_BLE_LOG |
| 42 | + help |
| 43 | + Enable BLE Log for Link Layer |
| 44 | + |
| 45 | + config BLE_LOG_LBM_LL_TRANS_SIZE |
| 46 | + int "Buffer size for each peripheral transport of Link Layer LBM" |
| 47 | + depends on BLE_LOG_LL_ENABLED |
| 48 | + default 1024 |
| 49 | + help |
| 50 | + There're 2 Link Layer dedicated log buffer managers (LBMs) with |
| 51 | + compare-and-swap (CAS) protection. Each LBM is managing 2 ping- |
| 52 | + pong buffers, which means there will be additional 2 * 2 * |
| 53 | + BLE_LOG_LBM_LL_TRANS_SIZE bytes buffer allocated |
| 54 | + |
| 55 | + config BLE_LOG_PAYLOAD_CHECKSUM_ENABLED |
| 56 | + bool "Enable payload checksum for BLE Log data integrity check" |
| 57 | + default y |
| 58 | + help |
| 59 | + Checksum is the default method for BLE Log data integrity check, |
| 60 | + but for targets with slow CPU speed, it may cause significant system |
| 61 | + performance decrease; a compromise could be made to balance the |
| 62 | + realtime performance and log data integrity, which is calculating the |
| 63 | + checksum of frame head and payload all together by default, or only |
| 64 | + calculate the checksum of frame head to minimize performance decrease |
| 65 | + |
| 66 | + config BLE_LOG_ENH_STAT_ENABLED |
| 67 | + bool "Enable enhanced statistics for BLE Log" |
| 68 | + default n |
| 69 | + help |
| 70 | + Enable enhanced statistics for written/lost frame/bytes count, which may |
| 71 | + cost additional ~100kB memory |
| 72 | + |
| 73 | + config BLE_LOG_TS_ENABLED |
| 74 | + bool "Enable BLE Log Timestamp Synchronization (TS)" |
| 75 | + default n |
| 76 | + help |
| 77 | + Enable BLE Log TS with external logging module |
| 78 | + |
| 79 | + config BLE_LOG_SYNC_IO_NUM |
| 80 | + int "GPIO number for Timestamp Synchronization (TS) toggle output" |
| 81 | + depends on BLE_LOG_TS_ENABLED |
| 82 | + default 0 |
| 83 | + help |
| 84 | + GPIO number for TS toggle output |
| 85 | + |
| 86 | + choice BLE_LOG_PRPH_CHOICE |
| 87 | + prompt "BLE Log peripheral choice" |
| 88 | + default BLE_LOG_PRPH_DUMMY |
| 89 | + help |
| 90 | + Choose BLE Log peripheral |
| 91 | + |
| 92 | + config BLE_LOG_PRPH_DUMMY |
| 93 | + bool "Dummy transport" |
| 94 | + help |
| 95 | + Dummy transport (dump only) |
| 96 | + |
| 97 | + config BLE_LOG_PRPH_SPI_MASTER_DMA |
| 98 | + bool "Utilize SPI master DMA driver as transport" |
| 99 | + help |
| 100 | + Utilize SPI master DMA driver as transport |
| 101 | + |
| 102 | + config BLE_LOG_PRPH_UART_DMA |
| 103 | + bool "Utilize UART DMA driver as transport" |
| 104 | + help |
| 105 | + Utilize UART DMA driver as transport |
| 106 | + endchoice |
| 107 | + |
| 108 | + if BLE_LOG_PRPH_SPI_MASTER_DMA |
| 109 | + config BLE_LOG_PRPH_SPI_MASTER_DMA_MOSI_IO_NUM |
| 110 | + int "GPIO number of MOSI port for SPI master DMA transport" |
| 111 | + default 0 |
| 112 | + help |
| 113 | + GPIO number of MOSI port for SPI master DMA transport |
| 114 | + |
| 115 | + config BLE_LOG_PRPH_SPI_MASTER_DMA_SCLK_IO_NUM |
| 116 | + int "GPIO number of SCLK port for SPI master DMA transport" |
| 117 | + default 0 |
| 118 | + help |
| 119 | + GPIO number of SCLK port for SPI master DMA transport |
| 120 | + |
| 121 | + config BLE_LOG_PRPH_SPI_MASTER_DMA_CS_IO_NUM |
| 122 | + int "GPIO number of CS port for SPI master DMA transport" |
| 123 | + default 0 |
| 124 | + help |
| 125 | + GPIO number of CS port for SPI master DMA transport |
| 126 | + endif |
| 127 | + |
| 128 | + if BLE_LOG_PRPH_UART_DMA |
| 129 | + config BLE_LOG_PRPH_UART_DMA_PORT |
| 130 | + int "UART port number for UART DMA transport" |
| 131 | + default 0 |
| 132 | + help |
| 133 | + UART port number for UART DMA |
| 134 | + |
| 135 | + config BLE_LOG_PRPH_UART_DMA_BAUD_RATE |
| 136 | + int "Baud rate of UART port for UART DMA transport" |
| 137 | + default 921600 |
| 138 | + help |
| 139 | + Determine the baud rate of UART port |
| 140 | + |
| 141 | + config BLE_LOG_PRPH_UART_DMA_TX_IO_NUM |
| 142 | + int "GPIO number for UART TX" |
| 143 | + default 0 |
| 144 | + help |
| 145 | + GPIO number for UART TX |
| 146 | + endif |
| 147 | +endif |
0 commit comments