2013-09-24 02:54 AM
2013-09-24 10:08 AM
What exactly is the purpose of turning the interrupts on/off, and pausing for a second?
What is the failure mode, do you get an overflow? does the character just not show up? does it not get feed into your cyclic buffer? You'll need to characterize the failure and purpose a bit better. It sends 65535 characters, pauses, then does it again. When do the inbound characters get sent? How many? How many get lost? What if you turn off the USART in the middle of reception? Can you illustrate on a scope/analyzer the in/out bound data, and the points where you believe things get lost, perhaps toggle a GPIO when each valid byte is received? Please use the ''Format Code Block'' icon (Paintbrush [< >]) top left, when posting code, and do so in a sufficiently complete/free-standing manner that the code can be pasted into a project without having to do a bunch of plumbing work.