Open GoogleCodeExporter opened 8 years ago
I traced this back to revision r1955. In that revision, the "wait for TX done"
line that is ran after $ is changed. It used to read:
while (UART1TXRdy == 0); //wait untill TX finishes
But since that takes the address of the UART1TXRdy function (which is always
non-zero) this comparison would always be false and this loop would never
block. After r1955, the line reads:
while (0 == UART1TXRdy()); //wait untill TX finishes
So now the function is actually called. I presume that for some reason that
loop never finishes. Perhaps the TX never completes because it doesn't use
interrupts on the BPv3 (that's just a guess, though).
In any case, if I comment out this while loop, the $ command works as expected
again.
Original comment by matthijskooijman@gmail.com
on 20 Oct 2013 at 8:58
Cool, thanks :)
On 20 October 2013 21:58, <dangerous-prototypes-open-hardware@googlecode.com
Original comment by andrew.p...@gmail.com
on 20 Oct 2013 at 11:31
There is more related discussion here:
http://dangerousprototypes.com/forum/viewtopic.php?f=4&t=5052&p=54931#p54923
Original comment by matthijskooijman@gmail.com
on 21 Oct 2013 at 8:29
I think I found a solution for the issue:
Change
while (0 == UART1TXRdy()); //wait untill TX finishes
To
while (U1STAbits.TRMT == 0); //wait untill TX finishes
This way we wait to empty the WHOLE TX buffer before jumping to the bootloader.
Original comment by sparky.s...@gmail.com
on 31 May 2014 at 8:43
Original issue reported on code.google.com by
andrew.p...@gmail.com
on 29 May 2013 at 11:21