You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// CRC indicator (0xA55A) is used to distinguish valid CRC values from other data that might be in the register.
65
+
// CRC16 is calculated over the entire exposed block and is updated every time a block is exposed to the host.
66
+
// This allows the host to verify data integrity of the received trace data.
61
67
62
68
// 3. Modes of operation
63
69
// =====================
@@ -127,7 +133,7 @@
127
133
128
134
// Access to internal module's data is synchronized with custom mutex. Mutex is a wrapper for portMUX_TYPE and uses almost the same sync mechanism as in
129
135
// vPortCPUAcquireMutex/vPortCPUReleaseMutex. The mechanism uses S32C1I Xtensa instruction to implement exclusive access to module's data from tasks and
130
-
// ISRs running on both cores. Also custom mutex allows specifying timeout for locking operation. Locking routine checks underlaying mutex in cycle until
136
+
// ISRs running on both cores. Also custom mutex allows specifying timeout for locking operation. Locking routine checks underlying mutex in cycle until
131
137
// it gets its ownership or timeout expires. The differences of application tracing module's mutex implementation from vPortCPUAcquireMutex/vPortCPUReleaseMutex are:
132
138
// - Support for timeouts.
133
139
// - Local IRQs for CPU which owns the mutex are disabled till the call to unlocking routine. This is made to avoid possible task's prio inversion.
@@ -142,9 +148,9 @@
142
148
143
149
// Timeout mechanism is based on xthal_get_ccount() routine and supports timeout values in microseconds.
144
150
// There are two situations when task/ISR can be delayed by tracing API call. Timeout mechanism takes into account both conditions:
145
-
// - Trace data are locked by another task/ISR. When wating on trace data lock.
151
+
// - Trace data are locked by another task/ISR. When waiting on trace data lock.
146
152
// - Current TRAX memory input block is full when working in streaming mode (host is connected). When waiting for host to complete previous block reading.
147
-
// When wating for any of above conditions xthal_get_ccount() is called periodically to calculate time elapsed from trace API routine entry. When elapsed
153
+
// When waiting for any of above conditions xthal_get_ccount() is called periodically to calculate time elapsed from trace API routine entry. When elapsed
148
154
// time exceeds specified timeout value operation is canceled and ESP_ERR_TIMEOUT code is returned.
149
155
#include"sdkconfig.h"
150
156
#include"soc/soc.h"
@@ -159,11 +165,15 @@
159
165
#include"esp_log.h"
160
166
#include"esp_app_trace_membufs_proto.h"
161
167
#include"esp_app_trace_port.h"
168
+
#include"esp_rom_crc.h"
162
169
163
170
// TRAX is disabled, so we use its registers for our own purposes
0 commit comments