2015-01-31 04:42 AM
#define __HAL_DMA_GET_IT_SOURCE ( __HANDLE__, __INTERRUPT__ ) ((((__HANDLE__)->Instance->CCR & (__INTERRUPT__)) == (__INTERRUPT__)) ? SET : RESET)
The documentation has such a definition for this macro:
Checks whether the specified DMA Channel interrupt has occurred or not. And the documentation said the __INTERRUPT__ can be one of the following values:
•DMA_IT_TC: Transfer complete interrupt mask
•DMA_IT_HT: Half transfer complete interrupt mask
•DMA_IT_TE: Transfer error interrupt mask
But I'm thinking this macro actually checks if the specified DMA Interrupt is enabled or not.
If I want to check which interrupt is signalled I should check
DMA Inerrupt status register (DMA_ISR) instead of DMA channel x configuration register ( DMA_CCRx)?
Please correct me if I made any mistake here.
Many thanks.
2015-02-02 12:38 AM
Yes you are right, this is obviously a documentation error (reproduced by copy/paste in the other chips' ''libraries'' too). There is a different macro for checking the current interrupt status (I don't care to post its name here, whoever wants to waste his/her time using Cube can look it up him/herself).
You should be pestering the Cube crew through any support channel you have to ST; they appear to only randomly pick and answer posts here. JW2015-03-04 09:02 AM
Hi shawn,
Actually, we confirm that it’s an error in documentation, it will be fixed in the next document release.thanks for your feedbacks.Regards,Heisenberg.