Hi all,
To use DMA timer #3 in input capture mode, timer was configured using function
void config_dma_timer_3(void)
{
DMA_TIMER_SETUP ptrSettings; // configuration parameters
ptrSettings.mode = DMA_TIMER_ENABLE_CLOCK_DIVIDER | // DMA timer operation mode
DMA_TIMER_CAPTURE_RISING |
DMA_TIMER_FREERUN |
DMA_TIMER_INTERNAL_CLOCK;
ptrSettings.int_handler = dma_timer3_service; // Interrupt handler to be configured
ptrSettings.int_type = DMA_TIMER_INTERRUPT; // Identifier for when configuring
ptrSettings.int_priority = DTIM3_INTERRUPT_PRIORITY; // Priority the user wants to set
ptrSettings.channel = 3; // DMA timer channel (0..3)
ptrSettings.clock_divider = BUS_CLOCK_DIRECT; // internal bus clock divided by 1
//ptrSettings.count_delay = // count delay until interrupt (clocks or external pulses)
fnConfigureInterrupt(&ptrSettings);
}
Now input capture works perfect, but all attempts to read state of timer_3 input pin failed.
Macros ( PORTIN_SETTC & (1<<3)) always == 1
regardless of real state of input (high or low).
GPT timer has GPT_Port_Data_Register (GPTPORT) which could be used to read state of input pin.
Looks like there is nothing similar for DMA timers.
Is it possible at all to do what I want using DMA timers?
Any ideas?
Thanks.