The frequency of caravel and user area is fixed to...
# mpw-2-silicon
s
The frequency of caravel and user area is fixed to 10MHz or is there a way to reduce this frequency?
t
There are a couple of options. If you install a 2-pin header on J6 on the Caravel development board, then installing a shunt on the header will turn off the 10MHz oscillator; then you can feed your own (3.3V) clock signal to pin
xclk
. If you want to drive that signal from the Nucleo board, then install another 2-pin header on J11; a shunt on that header will connect
xclk
to the Nucleo board pin
TIM3_CH2
You can single-step the clock from
mpremote
on the Nucleo board (at the Micropython prompt) with:
Copy code
from io_config import *
Dio("TIM3_CH2").set_state(True)
Dio("TIM3_CH2").set_value(1)
Dio("TIM3_CH2").set_value(0)
set_state(True)
sets the pin to an output, and
set_value(1|0)
sets the pin output high or low.
s
Thanks @Tim Edwards One more question: do I need to enable user are power or it's enabled by default? I am testing the design with nucleo board atm.
t
Depends on what power supply you used for your project. Because the most common configuration by far is to have the (digital) user project powered off of
vccd1
(a 1.8V domain), there is a header J3 that already has a wire across the pins. Only if you don't want
vccd1
connected up to the rest of the 1.8V domain, cut through the trace with a knife. For the other domains
vccd2
(1.8V),
vdda1
(3.3V), and
vdda2
(3.3V) (and also, redundantly, for
vccd1
), the row of 10 pins along the bottom of the Caravel development board has each domain neighboring a pin with the most common supply voltage for that domain (
3V3
and
1V8
pins). Those domains are not connected by default, so if you need them powered up you'll need to install a header on that row and put yet more shunts in.
s
I have used vccd1(1.8V) and if I got you right. This domain is powered off by default and I have to enable it?
t
No, by default
vccd1
is wired to the 1.8V supply
1V8
and you don't need to do anything.
s
Alright!
s
@Tim Edwards May I ask what do you mean to single-step the clock from
mpremote
on the Nucleo board (at the Micropython prompt)? How do I use the below code to drive the clock, for example, which file should I add these code to?
Copy code
from io_config import *
Dio("TIM3_CH2").set_state(True)
Dio("TIM3_CH2").set_value(1)
Dio("TIM3_CH2").set_value(0)
I just figured it out.
First diagram shows the waveform for
xclk
,
GPIO 8
, and
TIM3_CH2
, respectively. The second diagram shows the behavior of these three signals when I short J6, the
xclk
is disabled and the
GPIO 8
is not toggling since there is no clock, which is expected.
When I then short J11,
xclk
matches
TIM3_CH2
which is expected. However,
GPIO 8
is still not toggling. Is this expected? Because what I expect to see is the
GPIO 8
toggling at the frequency of
TIM3_CH2
The c code for LED blinking and GPIO toggling
t
@Stanley Lin: It should be working. Can you confirm that the calibrated configuration is still valid? It's possible that a calibration can work once and then fail due to a change in ambient conditions. Also: The calibration was done with the same target I/O configuration (all management output except channel 0)?
s
Sorry for the late reply. The calibrated configuration is valid and all the IO are set to
C_MGMT_OUT
. The attached file is
gpio_config_io.py
for the gpio configuration.
And actually what I did is to monitor the input with the default clock(without any shorting) and able to see the signal. Then I put the shunts onto J6 and J11 to short them (I already soldered 2-pin headers on J6 and J11), in the meantime, I didn't rebuild the board or anything other than putting the shunts.
t
I am regularly able to toggle all IOs (including
gpio[8]
) after successful calibration; there isn't anything special about channel 8.