2016-02-26 07:18 AM
Hi
i am a newbie. i have seen some examples, sometimes they clear the flag and sometimes they dont clear the flag. Could anyone please tell me when it is needed to clear r no need to clear_..example : i am waiting for the DMA to finish ...but i am not clearing the flag when i contunue to send again. Do i need to clear the flag after checking ?2016-02-26 08:42 AM
Hi kaka,
Some flags are cleared by hardware, others need to be cleared by software.A flag is cleared by hardware when an expected condition is reached or when some actions are done (Ex: read a given register).So, in all cases, you have to refer to the flag description in the reference manual to know how it is cleared.-Mayla-To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2016-02-26 08:54 AM
If you are reinitializing the DMA No, if you are running it in circular mode Yes.
2016-02-27 02:42 AM
thank you .
i also cant understand what will happen when i give ''RCC_APB2PeriphResetCmd''. example: void RCC_APB2PeriphResetCmd(RCC_APB2Periph_USART1, ENABLE);Does the USART! register values goes to zero when i give RCC_APB2PeriphResetCmd?2016-02-28 11:15 PM
Yes all USART1 register will have the RESET values. For example all pending Flags will be cleared.
/*Please
mark helpfull
if this post helps you or solves your problem.*/
/* If you need any personal support for your work please contact at
embeddeddesign.help@gmail.com*/