2021-08-27 12:01 PM
Is there any register or flag to check whether Dma interrupt or only global interrupt is enabled in Cubemx?
ı am writing an uart driver and ı would like for driver to be arranged automatically according to selections in cubemx.For example, if uart5 dma is selected, this driver uses dma_start function or if global interrupt is selected for uart7, the driver uses hal receive uart it function.
I searched datasheet and hal library. But can not find any register or flag inside code to be able to check which way the uart used, dma or interrupt.
2021-08-27 01:09 PM
You can check for valid hdmatx/hdmarx pointers. Although if you don't use DMA, they are uninitialized. Typically this means they will be null pointers unless reprogrammed without removing power.