06-02-2016 09:55 AM
I have Microblaze MCS clock set to 100MHz and on my board I have a 100MHz oscillator going to Microblaze. I have set the UART baud in MCS to 9600. In my Microblaze code I'm printing a simple "hello world" message using the "print" function that sends data to the UART pins of my board. I then, have a FTD chip connected to the UART pins on board that converts TXD and RXD to USB. I have this chip connected to my PC and am using secureCRT or putty to monitor the data sent from Microblaze. But I keep getting this:
First I thought maybe my FTD chip is not properly grounded but I checked that and it is properly grounded.
Then I thought maybe my FTD chip is not functional but I looped back the RX and TX of the FTD and could see characters properly echoed back. So my FTD chip is working.
Is it possible that a 9600 baud cannot be generated from a 100MHz clock? (I have tried a few other baud rates but still see garbage characters.) If so, what clock frequency do I need to use to generate 9600 baud? Or with 100MHz cpu clock what bauds can I generate? I don't really care what the baud rate, or what the input clock frequency is as long as it works.
Any help is much appreciated.
06-02-2016 10:38 AM
Is it possible the baud rate could be set incorrectly in your C program? Can you paste some simple code that shows how you're setting up the uart and sending the data?
06-02-2016 10:58 AM - edited 06-02-2016 10:59 AM
Thanks for the reply. Here's my code:
void print(char *str);
Looking at xparameters.h I see the following lines which shows the baud is set at the correct rate (I think):
#define XPAR_MICROBLAZE_MCS_0_IOMODULE_0_FREQ 100000000
#define XPAR_MICROBLAZE_MCS_0_IOMODULE_0_USE_UART_RX 1
#define XPAR_MICROBLAZE_MCS_0_IOMODULE_0_USE_UART_TX 1
#define XPAR_MICROBLAZE_MCS_0_IOMODULE_0_UART_BAUDRATE 9600
#define XPAR_MICROBLAZE_MCS_0_IOMODULE_0_UART_PROG_BAUDRATE 1
#define XPAR_MICROBLAZE_MCS_0_IOMODULE_0_UART_DATA_BITS 8
#define XPAR_MICROBLAZE_MCS_0_IOMODULE_0_UART_USE_PARITY 1
#define XPAR_MICROBLAZE_MCS_0_IOMODULE_0_UART_ODD_PARITY 0
#define XPAR_MICROBLAZE_MCS_0_IOMODULE_0_UART_RX_INTERRUPT 1
#define XPAR_MICROBLAZE_MCS_0_IOMODULE_0_UART_TX_INTERRUPT 1
#define XPAR_MICROBLAZE_MCS_0_IOMODULE_0_UART_ERROR_INTERRUPT 1
06-02-2016 12:39 PM - edited 06-02-2016 12:40 PM
Your clock should be fine... have you tried disabling hardware/software flow control in your terminal emulator program on the PC?
Did you perhaps have the baud rate set to something else previously and maybe you are configuring the chip with an old bitstream?