Sorry for this dumb question, I am very new to XMOS. :)
I am trying to get my UART sample project to work in the simulator, but didn't have any luck. So I worked through the XMOS Simulator Tutorial document instead. With its guidance, I was able to get everything set up and running just fine, and I can see the waveform on the TX line.
Now I want to use the loopback functionality to see what comes in on the RX line. My code only uses an out port for transmitting, but doesn't use an in port for receiving. Despite this, when I run in the simulator and inspect the waveforms on PORT_UART_RX, shouldn't I see something? Or does the simulator only show what is read via an in port?
Problems with loopback w/ XDE 11.2.2 and UART demo
-
- Member++
- Posts: 17
- Joined: Fri Aug 12, 2011 2:36 pm
-
- Member++
- Posts: 17
- Joined: Fri Aug 12, 2011 2:36 pm
I just figured it out by chance. If I simply declare and don't even use it in any other way from my code, the traces show up as expected in the simulator. This is an amazing product!!!
Code: Select all
in port rxd = PORT_UART_RX;
-
- XCore Expert
- Posts: 754
- Joined: Thu Dec 10, 2009 6:56 pm
You can loop back the TX pin to the RX pin in the simulator so you can test the receiving side as well (it requires a working TX though). By default the RX pin will not show anything because there are no external stimuli.
-
- Member++
- Posts: 17
- Joined: Fri Aug 12, 2011 2:36 pm
I do have the loopback setup in the simulator, as the tutorial recommends. However, I couldn't see the input trace until I declared an in port.Bianco wrote:You can loop back the TX pin to the RX pin in the simulator so you can test the receiving side as well (it requires a working TX though). By default the RX pin will not show anything because there are no external stimuli.