Re: [PATCH v7 0/9] coresight: ctcu: Enable byte-cntr function for TMC ETR

From: Jie Gan
Date: Sun Nov 09 2025 - 21:42:36 EST




On 10/13/2025 1:49 PM, Jie Gan wrote:
The byte-cntr function provided by the CTCU device is used to count the
trace data entering the ETR. An interrupt is triggered if the data size
exceeds the threshold set in the BYTECNTRVAL register. The interrupt
handler counts the number of triggered interruptions.


<...>

Enable both ETR0 and ETR1:
echo 0x10000 0x10000 > /sys/bus/coresight/devices/ctcu0/irq_threshold

Reset the BYTECNTR register for etr0:
echo 0 > /sys/bus/coresight/devices/ctcu0/irq_threshold


Gentle reminder.

Changes in V7:
1. rebased on tag next-20251010
2. updated info for sysfs node document
Link to V6 - https://lore.kernel.org/all/20250908-enable-byte-cntr-for-tmc-v6-0-1db9e621441a@xxxxxxxxxxxxxxxx/

<...>