Skip to content

Commit

Permalink
Added a serial flush in synch function. Sometimes the ACK from the sy…
Browse files Browse the repository at this point in the history
…nc (UU) wasnt being received due to other characters that were still present in the serial input buffer.
  • Loading branch information
JelmerT committed Jun 9, 2014
1 parent d7be13a commit 34d4345
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cc2538-bsl.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,8 @@ def receivePacket(self):
def sendSynch(self):
cmd = 0x55

self.sp.flushInput() #flush serial input buffer for first ACK reception

mdebug(10, "*** sending synch sequence")
self.sp.write(chr(cmd)) #send U
self.sp.write(chr(cmd)) #send U
Expand Down

0 comments on commit 34d4345

Please sign in to comment.