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.
Tool/software: TI-RTOS
Hello
I try to measure are pulsewitdh with timer compare. I've allready done this by using an interrupt at the rising edge and on the falling edge and reading the time registers to calculate the high time.
Now I'm try to use the uDMA for this but it won't work. Please help me to find the error in this configuration. I found an example in the "Stellaris Ware" package and adapt it to timer 3.
Kind regards
René
// // Enable the uDMA peripheral // ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_UDMA); // // Enable the uDMA controller error interrupt. This interrupt will occur // if there is a bus error during a transfer. // ROM_IntEnable(UDMA_INT_ERR); // // Enable the uDMA controller. // ROM_uDMAEnable(); // // Point at the control table to use for channel control structures. // ROM_uDMAControlBaseSet(ucControlTable); uDMAChannelSelectSecondary(UDMA_DEF_USBEP2TX_SEC_TMR3B); // // Put the attributes in a known state for the uDMA Timer3B channel. These // should already be disabled by default. // ROM_uDMAChannelAttributeDisable(UDMA_SEC_CHANNEL_TMR3B, UDMA_ATTR_ALTSELECT | UDMA_ATTR_USEBURST | UDMA_ATTR_HIGH_PRIORITY | UDMA_ATTR_REQMASK); // // Set up the DMA channel for Timer 0A. Set it up to transfer single // 32-bit words at a time. The source is non-incrementing, the // destination is incrementing. // ROM_uDMAChannelControlSet(UDMA_SEC_CHANNEL_TMR3B | UDMA_PRI_SELECT, UDMA_SIZE_32 | UDMA_SRC_INC_NONE | UDMA_DST_INC_32 | UDMA_ARB_1); // // Set up the transfer for Timer 0A DMA channel. Basic mode is used, // which means that one transfer will occur per timer request (timeout). // The amount transferred per timeout is determined by the arbitration // size (see function above). The source will be the value of free running // Timer1, and the destination is a memory buffer. Thus, the value of the // free running Timer1 will be stored in a buffer every time the periodic // Timer0 times out. // ROM_uDMAChannelTransferSet(UDMA_SEC_CHANNEL_TMR3B | UDMA_PRI_SELECT, UDMA_MODE_BASIC, (void *)(TIMER3_BASE + TIMER_O_TBR), g_ulTimerBuf, MAX_TIMER_EVENTS); uDMAChannelEnable(UDMA_SEC_CHANNEL_TMR3B);