Hello,
I'm trying to set up a serial port connection between my Analog Discovery 2 and my RaspberryPi 4B+. When I open the "Protocol" window and manually send and receive data, everything seems to work. But when I run the UART example script, no data gets received.
I'm using DIO 7 for TX and DIO6 for RX, my baudrate is 115200. I have GND attached between the Pi and the AD2. I'm running a python interpreter on my Raspberry Pi and just sending a simple "write" command each time I want to read data from the AD2. e.g. ser.write(b'hello\r\n'). When I'm looking at the Protocol window and click "Receive", I see the word "hello" pop right in the window (see attached image titled "Protocol Working").
When I run the UART example script, nothing gets printed into my output window, even though I'm filling the buffer with several "hello\r\n" messages sent from my Raspberry Pi.
Note: I slightly modified the example based on the UART_initialize() function definition in this post:
When I read the buffer from the Raspberry Pi, I can read the messages being sent by the AD2. I just can't read the messages from the Pi on the AD2. I can transmit, but not receive.
Any idea what's going on?
Another clue might be that my logic analyzer does not work unless I change the source to "Scope". Having the source set to "Digital" does not do anything. Pictures attached.
Any assistance would be greatly appreciated!