08-07-2020 06:09 PM
I am using the basic uartlite polled mode example code.
I have an RS232 PMOD connected to my Avnet ultrazed iocc.
I have connected the TX and RX of the PMOD using a jumper for a loopback test.
However, nothing is ever received.
I'm a newbie to all this
Any insights would be helpful.
08-08-2020 02:34 PM
Hey there, a couple of things. First did you checkout the note for the RS232PMOD about the pin assignments:
Secondly, did you create the project using the PS or the PL UARTLite, the example code you are using is an AXI PL UART.
If you did use PS EMIO or PL UART Lite, did you verify your constraints for pins?
Its tough to debug without any kind of details about your project, but share whatever you can and we can see where it goes.
08-10-2020 09:25 AM - edited 08-10-2020 09:26 AM
Hi @mleccadito !
Thank you so much for your reply!
I had connected Tx to AD5 and Rx to AE9 pins.
Please let me know if there's any more info you'll need to help me out.
Again, thank you so much.
08-10-2020 01:07 PM
You shouldn't have any issue using those pins, however that doesn't exactly tell me much.
Maybe you could share some screen shots of your block design and pin constraints file, and sdk code?
Do you have a scope you could probe the TX line, or an FTDI chip that you could connect to the output of the TX? Just a debugging step to verify if its TX or RX that's the issue.
When you say your not receiving data, what exactly do you mean by that? Does it get stuck in the while loop waiting for the bytes to be received?
Just to be thorough, did you remember to export the bitstream to the SDK? It can be easy to make various changes to the hw and forget to export it before running the SDK.
I'm just throwing some ideas out there since I am not sure your level of experience, and there are a bunch of small steps that can easily be glossed over.
08-10-2020 01:31 PM
set_property PACKAGE_PIN AD5 [get_ports uart_rtl_txd] set_property PACKAGE_PIN AE9 [get_ports uart_rtl_rxd] set_property BITSTREAM.GENERAL.UNCONSTRAINEDPINS Allow [current_design]
And yes, it gets stuck in the while loop waiting for bytes to be received.
I don't have a way to probe it out as of now
sdk code same as the example. just added a few print statements for easier debugging..
08-11-2020 01:56 PM
Thank you for your response!
I connected the Tx Rx ports to see if I am able to receive what I send.
Again, as in the example, I send (0, 1, 2, 3, 4.... 15) through tx. I print send buffer to verify.
But when receiving, I only get some part of the data (0, 1, 2, 3, and rest are all zeroes).
I'm wondering if it has anything to do with delays(?) I really don't know. Can you please help me out with this? Like any insights would be really helpful!
08-11-2020 02:32 PM
It doesn't sound like an issue, but just verify that your baudrate in the ip core matches what the default baudrate is set to in the SDK.
May I suggest trying something a little different. Try using these functions instead of the ones from the example:
void XUartLite_SendByte(UINTPTR BaseAddress, u8 Data)
u8 XUartLite_RecvByte(UINTPTR BaseAddress)
When using the functions from the example there's a bunch of auxiliary code, these two functions allow you to work with the low level driver code. You can just use two for loops, one to send the bytes and then to receive. As a reminder, these are both blocking functions.
08-11-2020 03:02 PM