Character match on STM32F303K8
Hello,
I'm trying to set up the character match interrupt to detect the character '\n' (which indicates the end of a packet) and I don't manage to get the interruption.
The procedure I'm using is:
- initialize the uart, its gpios, and the dma.
- enable the uart as well as dma interrupt in NVIC
- disable uart
- write \n into CR2_ADD
- write to 1 CR1_CMIE
- enable uart
- HAL_UART_Receive_DMA
- in the USARTx_IRQHandler I check the ISR_CMF flag, and if it is not zero I call my routines to handle the input-
By doing this on UART1 I don't get any UART interrupt. I just see the dma TC interrupt when the buffer is full.
I also tried with HAL_UART_Receive_IT (i.e. without the DMA) with similar results.
Now I'm considering that I might misunderstood the specifications and maybe the stm32f303k8 doesn't support character match, or maybe some limitation applies to it. Is this the case?
The datasheet clearly states that Modbus communication is supported only on UART1 (which is the one I'm using), and the manual states that Modbus support includes timeout and CR/LF character recognition, therefore everything looks correct but I get no interruption with '\n'.
Any suggestion?
Thank you,
Davide.