I am using ETM v3.3 and ETB11 on Cortex-A8 to trace the execution of the applications. As the size of the ETB is normally very limited on the development boards, it always overflow in less than 1ms. After the overflow, we may loss some important trace result. Is there anyway to get notified when the ETB is full so that we can drain the ETB and avoid the overflow? For example, can we get an interrupt or exception immediately after the overflow?
Thanks for any help and discussion!
You may use the ETB filtering rules to narrow down the ETM trace start points and end points.For example, if you can know where the problematic PC value is, you only need to monitor the PC address range.
Please see details about how to control the ETB tracing.
The recommended procedure for use of the tools is:
Program the ETB11 registers.
Wait until the AcqComp bit is set.
Wait until the DFEmpty bit is set.
Read the trace.
Thanks for your reply. I understand that we can enable the filters to trace a specific address range. However, it is still now enough for tracing a large application. If an application is running, a 4k buffer may be full in just several milliseconds. If i don't want to miss any trace result, i have to know that it is going to be full and thus pause the application and drain the buffer, then resume it again.
As you suggested, maybe we can use some other application to keep checking the AcqComp bit. But I guess that may not be so accurate since it requires some time to read that bit and pause the application. If some exceptions or interrupts are triggered while the ETB is full, that will be much better. If there is not such exception or interrupt, your suggestion may be the best way we can try.