Part Number: TMS320F28388D
Other Parts Discussed in Thread: C2000WARE
Tool/software:
Hi,
I'm using eCAP for my project to capture the duty of a PWM in continuous mode.
Wrap after 2 events. First event: rising edge / second event: falling edge.
Generating interrupt on first event (rising edge). Reset the counter on rising edge.
I noticed an important thing that is not mentioned in the datasheet.
If I clear the global INT flag bit before the serviced event (CEVT1 in my application) flag, an other interrupt pulse is generated and so a second interrupt occurs right after the first one.
It doesn't change the result of CAP registers but it's wasting processor ressources.
So serviced event flag MUST ABSOLUTELY BE CLEARED before global INT flag to avoid this spurious interrupt.
I let you confirm this behavior but it's not expressly in the TRM. And worst, it's doing wrong in the workshop Lab7 (forTMS320F379D) from where I started my project.
Please confirm if I'm right or if I miss something.
Regards,
Adrien



