Other Parts Discussed in Thread: C2000WARE
I have configured ECAP module for measuring grid frequency. It is setup to capture count value between two rising edged of the square wave. Initially it was tested with clean signal from function generator. In actual application we have used a comparator circuit that converts input grid Sine voltage to square wave output. This square wave has many spurious transitions near the zero crossing points. Due to this issue the ECAP module is picking very high frequency edges near the zero crossings and thus giving us erroneous readings. Please refer to the following snapshot of zero crossing signal captured from oscilloscope:
Please let me know if there is a software based solution to overcome this issue.