2011-04-14 10:23 AM
Why my stm8s103f3 can not enter into uart rx interrupt?
2011-05-17 6:12 AM
PS:
I am using cosmic 4.3.4+stvd.
2011-05-17 6:12 AM
Unless I miss my guess, you are missing the UARTx_Cmd(ENABLE) command, but it could also be the 'overrun' part of your interrupt enable call.
Here is my code for UART3 that works (using receive and transmit interrupts): UART3_Init(38400, UART3_WORDLENGTH_8D, UART3_STOPBITS_1, UART3_PARITY_NO, UART3_MODE_TXRX_ENABLE); UART3_Cmd(ENABLE); UART3_ITConfig(UART3_IT_RXNE, ENABLE); Hope that helps2011-05-17 6:12 AM
As far as i know,there is no need to excute UART_CMD(ENABLE),But i tried, the same.Thanks for your information.
Chris2011-09-29 2:36 AM
2011-10-18 9:28 AM
If you don't ENABLE the peripheric will not power up or the clock signal will not be connected to uart internally.
If problem persist try with your compiler getchar putchar functions.We’re moving the ST Community to a new platform to give you a better and more reliable community experience.