Hi, can anyone please tell me the the difference between GPIO_MODE_USER_STD_ANALOG and GPIO_MODE_MGM...
n
Hi, can anyone please tell me the the difference between GPIO_MODE_USER_STD_ANALOG and GPIO_MODE_MGMT_STD_ANALOG? I know that the MGMT_ENABLE pin is high for the later one. But what difference does it make regrading input, output buffers and leakage?
m
In both, the
GPIO_MODE_USER_STD_ANALOG
and
GPIO_MODE_MGMT_STD_ANALOG
mode both the input and output buffers are disabled. If you have unconnected
io_out
or
io_oeb
signals, there may be Hi-Z leakage with
GPIO_MODE_USER_STD_ANALOG
. The
analog_io
connection is the same for either one, so I recommend using
GPIO_MODE_MGMT_STD_ANALOG.
n
Mitch Bailey, thank you so much for answer. Where should I connect io_out and io_oeb pins if I am not using GPIO pins for GPIO_MODE_USER_STD_ANALOG.
The GPIO pins are not used in design and mode is set to GPIO_MODE_USER_STD_ANALOG in user_defines.v.
t
It's never a bad idea just to tie off
io_oeb
to digital (1.8V) power and
io_out
to either digital power or ground, just to be pedantic, but if you have analog connections and intend to keep the GPIO in
GPIO_MODE_MGMT_STD_ANALOG
mode, then they can be left open.
👍 1
n
Ok. Thank you so much for the answer. I have couple of questions : I am designing an analog circuit. Can I use vccd for an external biasing voltage of 0.9V?
The circuit has a supply voltage VDD of 5V. For now I have connected to io_analog[4] (the analog pin with ESD), is it ok to use that pin for supply?
t
How much current is being drawn on the bias? I would think that the bias would be appropriate for the analog pin on a GPIO as long as you can tolerate the series resistor. The analog GPIO connection is not appropriate at all for a power supply. Why can't you use the
vdda1
or
vdda2
supplies, which are designed for that?
n
Ok. The bias voltage is to the gate so the current drawn is negligible. I saw the example user_analog_project and I think VDD was connected to the io_analog[4] pin there. So I thought it was fine but I will change it.
I just designed a test circuit for understanding the complete process and wrapper.
t
There are two different ways to connect analog. On the "caravan" chip (caravel_user_project_analog), you have the
io_analog
connections which are straight out to pads with no other connections, and
gpio_analog
on the GPIO (with series resistor) and
gpio_nosed
(without a series resistor). On the "caravel" chips (caravel_user_project), you have the
analog_io
connections on GPIO pins which have the series resistor (and which really ought to have been named
gpio_analog
to match the pins of the same function on caravan; I guess I am the one to blame for that confusing nomenclature).
n
Ok. Sorry for the confusion. I am talking about caravel_user_project_analog.
And I have connected the VDD (5 V) to io_analog[4], one of three analog pins with ESD (up to 5.5 V I guess). Is that connection wrong?
t
Okay, sorry, you are working in the caravan chip design, and yes,
io_analog[4]
with the ESD clamp circuit should be perfect for a 5V supply.
n
Ok. :)
Sorry but I have just one more question. How does the user_defines.v get implemented? Means once I have selected to mode for each GPIO pin, whether it is MGMT or USER, how does it get implemented in full layout?
t
The configuration for each GPIO is a set of 13 bits. It exists in two places: Inside the SoC (housekeeping), and next to each GPIO. The values in housekeeping are accessible through the memory map and so they can be defined in C code and then loaded into the locations next to each GPIO. That's the normal way to configure the GPIOs, because it's software-definable. However, there are cases in which a user may want the GPIO pins to be operational for the user project immediately on power-up, or they may want the user project to run without the SoC running at all, in which case the state of the GPIOs on power-up is critical. The "user_defines.v" specifies the default state of the configuration locally at the GPIO itself. It is implemented as a small via-programmed ROM close to the GPIO. The via programming is done by python script from the Makefile.
n
Ok. I think I got it. I will keep all the GPIO pins in GPIO_MODE_MGMT_STD_ANALOG in user_defines.v.
The voltage limit on these pins is 1.8 V in case of an output. Isn't it?
t
The GPIO are good for analog voltages up to the value of VDDIO, which is nominally 3.3V.
n
Not for 5V?
j
@Tim Edwards, can we overwrite the settings in user_defines.v, or if we messed it up we need to reprogram it each time? It's a ROM from what you mention, so I assume we can reprogram it, but just to be sure.
t
@Jorge Marin: I sense some confusion here. If you got the defaults wrong in "user_defines.v" you can still reconfigure the GPIO at any time from a program.
Naina: You can run all GPIO at 5V but you won't be able to do it on our development board. You will need to work out your own board with 5V on VDDIO and corresponding 5V-tolerant devices like the USB communications chip and the SPI flash. It's possible that some or all of the components on our board are 5V tolerant, but I haven't looked at the specifications.
👍 1
j
@Tim Edwards but I would like to make a setup that is not dependent on too many peripheric systems, ideally not needing to reprogram each time
t
@Jorge Marin: Then you just need to make sure that you have the correct
user_defines.v
contents.
j
@Tim Edwards that's the point, we misunderstood the settings and would like to change user_defines.v. Is this hardwired, or we can change it once and forever (unless we need to change smth else)?
m
@Jorge Marin The
user_defines.v
are translated into hard wired defaults during the tapeout process. These defaults may be programmatically overridden, but it needs to be done each time you power up the device. If you want to change the start up defaults, you’ll need to change the
user_defines.v
settings and resubmit your precheck/tapeout.