Problem with the DMA datacounter of stm8l051
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2016-02-17 8:02 PM
Posted on February 18, 2016 at 05:02
Hi,
I'm using DMA to transfer the data from USART1,The length of the data is varible.So I open the USART IDLE LINE interrupt.I try to set the DMA data counter to zero by using the function ''DMA_SetCurrDataCounter(DMA1_Channel2,0);''But the return value of the function ''DMA_GetCurrDataCounter(DMA1_Channel2);'' doesn't change to the value i set.So,What's the problem?Thank U.MCU: stm8l051f3Board: CustomIDE: IARSTM8L15x/16x/05x/AL31-L Standard Peripherals Library version:V1.6.2USART1 RX ISR function:INTERRUPT_HANDLER(USART1_RX_TIM5_CC_IRQHandler,28){ /* In order to detect unexpected events during development, it is recommended to set a breakpoint on the following instruction. */ uint8_t temp=USART_ReceiveData8(USART1); temp=DMA_GetCurrDataCounter(DMA1_Channel2); DMA_SetCurrDataCounter(DMA1_Channel2,0); temp=DMA_GetCurrDataCounter(DMA1_Channel2); USART_ClearITPendingBit(USART1,USART_IT_IDLE);}
This discussion is locked. Please start a new topic to ask your question.
0 REPLIES 0
