2015-07-11 10:22 PM
Dear
I have two Nucleo board, STM32F411RET6 and STM32F030R8. so I tested two board, and got some interesting(?) results. two board was good for sending. when UART using HAL_UART_Transmit_IT(HAL_UART_TxCpltCallback) is good. but receiving is not good. firstly I checked the usb2serial module and test serial program also, these are ok. for STM32F030R8 if the size of the received data is 90Bytes, (012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789) then HAL_UART_RxCpltCallback gets signal but just one time. for STM32F411RET6 if the size of the received data is 200Bytes, (01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789) then HAL_UART_RxCpltCallback gets signal and if I send next 200Bytes, then HAL_UART_RxCpltCallback also gets the signal repeatly. What's the reason for these results? Would you help me? #stm32f030r8 #stm32f411ret6 #uart2015-07-11 11:35 PM
The reason is the buffer size of HAL_UART_Receive_IT(..).
But If I want to receive the data, I call the HAL_UART_Receive_IT(..) repeatly.
So I need to receive the data by interrupt not call repeatly.
In this forum, some answer used the code ''USART_GetITStatus(USART1, USART_IT_RXNE)'' for that in ''USART3_IRQHandler(void)''.
But If the code is made by STM32CubeMX automatically, ''USART_GetITStatus(..)'' does not exist.
How can I receive the data by interrupt not call HAL_UART_Receive_IT repeatly?
and How can I use similar function like USART_GetITStatus(..) in Nucleo board?
Would you help me?
Dear
I have two Nucleo board, STM32F411RET6 and STM32F030R8. so I tested two board, and got some interesting(?) results. two board was good for sending. when UART using HAL_UART_Transmit_IT(HAL_UART_TxCpltCallback) is good. but receiving is not good. firstly I checked the usb2serial module and test serial program also, these are ok. for STM32F030R8 if the size of the received data is 90Bytes, (012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789) then HAL_UART_RxCpltCallback gets signal but just one time. for STM32F411RET6 if the size of the received data is 200Bytes, (01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789) then HAL_UART_RxCpltCallback gets signal and if I send next 200Bytes, then HAL_UART_RxCpltCallback also gets the signal repeatly. What's the reason for these results? Would you help me?2015-07-12 07:28 AM
How can I use similar function like USART_GetITStatus(..) in Nucleo board?
You could use SPL instead or HAL/Cube? You're more likely to get support on the forum with that.