I created the serial port with the UART. But I can’t receive the all characters. It always left less than 4 characters . Anybody who knows if I set error somewhere or loss something?
If you are using the UART in interrupt mode then under normal operation (i.e. without character matching / gap timers being used to close the buffer) the RXBC flag only gets set every time a full row (4 bytes) of the RX FIFO are received. Hence my many problems trying to see (interrupt on)individual character being received Regards, Dave
Hi Dave, I had check the manual. But I still not understand what the match character mean. How could I match all of the characters. May I set both of match character and receive gap? or I only need choice one of them, then it’ll be work. thanks a lot!
Ok, again the big question: Is the RXBC Interrupt working or is it not??? Waster, how can you detect a match or a character gap in a interrupt driven uart driver, when you don’t get the RXBC interrupt???
>I had check the manual. But I still not understand > what the match character mean. How could I match all > of the characters. You get four character match slots… for each one you can specify a character pattern and a mask. Any bits set in the masks are not included when matching the received character(s) against the corresponding pattern. So using a mask of 0xFF you can match (cause RXBC) on any character. > May I set both of match character and receive gap? or > I only need choice one of them, then it’ll be work. > I suppose you could use both if you wanted to match a specific character in a continuous message and timeout if you didn’t see any more characters (using the character gap timer). But if you want to see (interrupt) on all individual characters then you would use either a very short buffer gap timer or character matching with a 0xFF mask. However, you should note that I’ve tried both a short buffer gap timer and character matching on any character in my interrupt driver. If the characters are well separated the driver works fine, but when I use the driver in a situation where the characters are back-to-back then my app goes bang… This is probably some subtle timing/configuration problem with my code and Netsilicon are helping me get to the bottom of it at the moment. Regards, Dave
HiThe RXBC interrupt does work… however, without character gap or character match (with mask set to 0xFF to match all characters) the RXBC flag will only get set if a whole row of the RX FIFO is full… to ensure you get an interrupt for the odd character(s) at the end of a message I’d suggest using the character or buffer gap timeout… the exact choice is very much dependant on your comms protocol and how often you want to interrupt… BBFN Dave
OK, I see: RXBC interrupt does work. RXRDY interrupt does not work correctly. It is only set after receiving 4 bytes. -Stefan