Part Number: TMS320F280039C
Other Parts Discussed in Thread: C2000WARE
Dear Champs,
I am asking this for our customer.
In our C2000ware example,
C:\ti\c2000\C2000Ware_5_01_00_00\driverlib\f28003x\examples\ecap\ecap_ex2_capture_pwm.c
We use
volatile uint16_t cap2Count;
volatile uint16_t cap3Count;
volatile uint16_t cap4Count;
...
cap2Count = ECAP_getEventTimeStamp(myECAP0_BASE, ECAP_EVENT_2);
cap3Count = ECAP_getEventTimeStamp(myECAP0_BASE, ECAP_EVENT_3);
cap4Count = ECAP_getEventTimeStamp(myECAP0_BASE, ECAP_EVENT_4);
Questions:
Since ECAP counter is in 32-bit, shouldn't we use uint32_t rather than uint16_t to handle ECAP counter values?
For example, if the result is larger than 65536, what happens?
That is, we think we should define them in 32-bit.
volatile uint32_t cap2Count;
volatile uint32_t cap3Count;
volatile uint32_t cap4Count;
What do you think?
Wayne