@harsh2
Did you try hardware events?
Please show a screenshot of error and log message by printing the value
Cheers