2004-11-15 06:40 PM
2004-11-14 09:24 PM
I am having problems writing an interrupt based UART driver for the ST71X.
With only RxBufFullIE interrupt enabld, receptions is fine, but all bytes transmitted are echo'ed back to the receive buffer even if the loop-back flag is not set. When I enable TxEmptyIE. TxEmpty interrupts are geneated all the time. If anybody have some suggestions or example code it will be much appreciated.2004-11-15 12:12 AM
hey mrdata,
i had a similiar problem. try to configure the ports of the UART as followed: #define UART0_RX_Pin 0x100 #define UART0_TX_Pin 0x200 GPIO_Config(GPIO0, UART0_TX_Pin , GPIO_AF_PP); GPIO_Config(GPIO0, UART0_RX_Pin ,GPIO_IN_TRI_CMOS); These settings are for UART0 as you see, just change it for the UART you are using. Important here is the ''GPIO_IN_TRI_CMOS'' !!! That the TxEmpty interrupt is generated all the time is normal. If the TxBuffer register is empty, the interrupt won´t be reset. So you have to clear the TxEmpty interrupt enable bit until you have something to send again. I´m also working on an interrupt driven UART-driver. Without FIFOs everything is fine, but with FIFOs enabled it doesn´t seem to work as I would like it to do at the moment ;)2004-11-15 06:40 PM
Thank you mweigelt.
Changing the I/O port configuration did the trick to get the receive routine working and thank you for the tip about TxEmpty.