In anticipation of a future project, I wanted to see if I could intercept serial communication from this board with the UART of an ESP32. For testing, I chose to just output the series of characters: 'HIH'. When I do this, I can properly see these characters displayed in the HyperTerminal while using 19200 baud. I then extended this TX wire to the RX pin of the ESP32 for port 2(Pin17) to see if i could get the correct output, but instead I get this:
Code: Select all
>>> uart.read()
b'omo\xbfomo\xbfomo\xbfomo\xbfomo\xbfomo\xbfomo\xbfomo\xbfomo\xbfomo\xbfomo\xbfomo\xbfomo\xbfomo\xbfomo\xbfomo\xbfomo\xbfomo\xbfomo\xbfomo\xbfomo\xbfomo\xbf
omo\xbfomo\xbfomo\xbfomo\xbfomo\xbfomo\xbfomo\xbfomo\xbfomo\xbfomo\xbfomo\xbfomo\xbfomo\xbfomo\xbfomo\xbfomo\xbfomo\xbfomo\xbfomo\xbfomo\xbfomo\xbfomo\xbfom
o\xbfomo\xbfomo\xbfomo\xbfomo\xbfomo\xbfomo\xbfomo\xbfomo\xbfomo\xbfomo\xbfomo\xbfomo\xbfomo\xbfomo\xbfomo\xbfomo\xbfomo\xbfomo\xbfomo\xbfomo\xbfomo\xbfomo\
xbfomo\xbfomo\xbfomo\xbfomo\xbfomo\xbfomo\xbfomo\xbfomo\xbfomo\xbfomo\xbfomo\xbfomo\xbfomo\xbfomo\xbfomo\xbfomo\xbfomo\xbfomo\xbfomo\xbfomo\xbfomo\xbfomo\xb
fomo\xbf'
>>> uart
UART(2, baudrate=19200, bits=8, parity=None, stop=1, tx=17, rx=16, rts=-1, cts=-1, txbuf=256, rxbuf=256, timeout=0, timeout_char=1)
Code: Select all
/* initialize the serial interface */
PCONP = 0x00081098; //0x1040100C;
PINSEL0 = 0x00F00055; // 0x0A008005;
PINSEL1 = 0x003F0014; // 0x02800280;
U0FCR = 0x1; // Enable FIFO's
U0LCR = 0x83; /* 8 bits, no Parity, 1 Stop bit */
U0DLL = 0xC3; /* 19200 Baud Rate @ 60MHz VPB Clock */
U0LCR = 0x03; /* DLAB = 0 */
Any ideas on what I am doing wrong here? If i removed the Tx pin and just jumper P16 and P17 on the ESP32, I can properly do a uart.write and see the uart.read echoed, but I can't seem to get this read to work properly.
(apologies if this double posts, my last post seemed to get lost in the ether)