First off I would like to know if the USART can send data while single stepping code. Now that I think about it some more it seems rather unlikely. But I have ported the FreeMODBUS code over the the xplain board and everything appears to work as expected on the first poll. But on the second poll I don't get a response. I have single stepped the code several times over and the USART settings are exactly the same the second time around. Interrupts are enabled, baud, parity and data-bits haven't changed, and the TX is enabled. This is all I am doing to load the USART DATA register
BOOL xMBPortSerialPutByte( CHAR ucByte ) { USART.DATA = ucByte; return TRUE; }
but if I watch USART.DATA in the debugger it's always zero, even when it does send. This is making it rather difficult to debug. Can I fix this? Is there a reason for that? Is it a bug in my code or the debuggers?
Are there any "gotchas" to the USART that might cause it to not send?