<@U01AW5TSG9J>: See the testbench in `caravel/ver...
# shuttle
t
@User: See the testbench in
caravel/verilog/dv/caravel/mgmt_soc/uart/
. This only exercises
ser_tx
but the
ser_rx
line is easy to set up as an input. As you guessed, you would use GPIO_MODE_USER_STD_OUTPUT and GPIO_MODE_USER_STD_INPUT on GPIO 6 and 5, respectively, to switch those pins from the managment SoC UART to your own UART. Those two GPIO pins will be directly connected to an FTDI chip on the development/demonstration board, so they would be the ones you want to use. It will be a single-channel FTDI which is connected to the housekeeping SPI pins, so there will be jumpers to connect the Tx and Rx lines; then the host program needs to put the FTDI into serial mode. This is the default setup for an FTDI chip through the Linux driver. The UART baud rate will need to be set to be matched between the FTDI chip (which can set a variable baud rate over a large range with fine increments) and your circuit.
m
is there any more information about what pins are used by default?
I'd like to avoid using them if possible in my designs
r
The datasheet pinout is still correct on that I believe
Final few pages
m
thanks
yes ok 12-37 if I want to avoid all the possible shared pins
@Tim Edwards is there anything else going to be mounted on the pcb that uses those shared pins apart from the serial? like the 2nd flash?
t
@Matt Venn: My intention that the 2nd flash would have a footprint on the board but would be unpopulated.
@Matt Venn: GPIO 0 to 6 are the ones to avoid as they will be connected to other things, and may be actively accessed from off-chip. The IRQ (GPIO 7) should be tied to an FTDI bit-bang pin but that would normally be high-impedence unless you configure the FTDI otherwise. The four secondary flash pins will be going out to an unpopulated footprint, as I mentioned. All GPIO pins will go out to some kind of header, presumably a dual-row 40 pin header.
m
great thanks!
h
@Tim Edwards by looking at the test you recommended, it is also setting the
reg_uart_clkdiv
since it is a tx pin. I wouldn't need to configure the same for
ser_rx
pin would I? since it would be connected to my Uart inside the user area which will have a uart receiver with a hardcoded baudrate and frequency that is equivalent to the
wb_clk_i
.
t
@Hadir Khan: Yes, the characteristics of any UART in your user project area will be entirely under your own control.
👍 1
h
Which means I would just need to do a
reg_mprj_io_5 = GPIO_MODE_USER_STD_INPUT;
and then
reg_uart_enable = 1;
Copy code
reg_mprj_xfer = 1;
while (reg_mprj_xfer == 1)