This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2538: Edge Capture

Part Number: CC2538


Hi,

I need some help setting up GPTIMER0.  I would like to split the timer and use A to measure the time between positive edges. I expect to see a positive edge every 20 milliseconds so I would like to overflow at 20.5 milliseconds indicating that an edge was never captured. Each edge event should call an ISR which captures the time between edges.  The overflow should also call an ISR to notify about the missed event.

Thanks,

-Mike

  • Hi Mike,
    You can use the periodic_16bit project from the driverlib as a starting point and modify the timer settings to
    edge count mode. Refer to section 11.4.2 in User's guide for step by step procedure.
    You will also have to configure GPIO pin as input to the capture timer.
    The driverlib function GPIOPinTypeTimer(uint32_t ui32Port, uint8_t ui8Pins) can be used.
    Thanks