I have a kasli crate that I have been able to connect to and control over ethernet cable in the past. I'm trying to switch it from its internal clock to an external 10 MHz clock.

Inside the conda environment, I ran the command:

$ artiq_coremgmt config write -s rtio_clock ext0_synth0_10to125

followed by a reboot:

$ artiq_coremgmt reboot

and attempted to send in a 10 MHz signal.

Once the crate rebooted, however, the red "ERROR" led turned on and it now seems like I am unable to connect to the core entirely, despite power cycling and disconnecting and reconnecting the ethernet cable. I cannot ping the crate either.

I have reflashed the gateware and firmware to no effect. The red led turns off during flashing, but turns on once it is complete. The IP address of the crate remains unreachable.

My gateware ident is 7.0.cc81464. My variant name is mitll8.

Hi, this is very helpful but has not taken me all the way to full functionality. I was not applying the clock signal at startup time originally, but I have tried to do so on my second attempt.

Using the doc you linked to, I was able to restore communication with my crate by connecting to it over the UART micro-USB port and running:

$ artiq_mkfs kasli.config -s ip 192.168.1.75 -s rtio_clock ext0_synth0_10to125
$ artiq_flash storage -f kasli.config

These two commands ran successfully and made the red LED turn off. I then unplugged the crate's power, and connected it to my external 10 MHz clock. I then plugged the power back into the crate. The red LED turned on about half a minute after doing so.

I was worried that there might be something wrong with my clock signal, so I've double-checked my settings. I am inputting a square wave external signal and am aiming to provide -5 dBm of power to the clk input port, as suggested in these Kasli specs. I am assuming the clk input has 50 Ohm input impedance, and as such my signal oscillates between 180 and 0 mV. I am confident that this is all correct, though any feedback would be appreciated.

Since my crate was now back in red LED mode, the last thing I did was try and return the crate to its internal clock, again over UART. I ran:

$ artiq_mkfs kasli.config -s ip 192.168.1.75 -s rtio_clock int_125
$ artiq_flash storage -f kasli.config

and again power cycled the crate. This time the red LED never turned on, and I was able to connect to the crate over Ethernet and run scripts successfully off of the crate, with it being internally clocked. I input my external clock signal again and attempted to get the crate to switch over to the external clock by running:

$ artiq_coremgmt config write -s rtio_clock ext0_synth0_10to125

and then power cycling the crate. The crate functioned exactly as it had before the command, and when I checked the core logs I got the following warning:

WARN(runtime::rtio_clocking):rtio_clock setting not recognised. Falling back to default.

To summarize, it seems like I can only reliably switch over to external clocking by running artiq_flash, and when I do so the crate acts like it is not receiving any external clock signal even when I am sending one in before it even reboots.

6 days later

Hello, I have a similar problem.
I have changed my Kasli from internal clock to external 10 Mhz reference, but now it won't work anymore.
The external clock signal works for two other Kasli boards with the same clock settings.
I can connect by JTAG and see the boot sequence:

Booting from flash...
Starting firmware.
[ 0.000015s] INFO(runtime): ARTIQ runtime starting...
[ 0.003935s] INFO(runtime): software ident 7.0.unknown.beta;ap3
[ 0.009951s] INFO(runtime): gateware ident 7.0.unknown.beta;ap3
[ 0.015983s] INFO(runtime): log level set to INFO by default
[ 0.021715s] INFO(runtime): UART log level set to INFO by default
[ 0.138538s] INFO(runtime::rtio_clocking): using 10MHz reference to make 125MHz RTIO clock with PLL
panic at runtime/rtio_clocking.rs:225:55: cannot initialize Si5324: "Si5324 misses clock input signal"
backtrace for software version 7.0.unknown.beta;ap3:
0x400297f8
0x400091c4
0x400087c4
0x4002827c
0x40005b48
0x40013aec
0x40013a94
0x40028970
halting.
use
artiq_coremgmt config write -s panic_reset 1to restart instead

It does not recognize the clock input. I have not found any damage on the board that would explain this.

But, my bigger problem is the following: I cannot send any commands to the board to reset to internal clock. It won't let me send commands in the console. How do I reset this setting?

4 days later

You can erase or rebuild the config partition with artiq_mkfs/artiq_flash (IIRC as explained in the manual).
FYI, ARTIQ-8 with NAR3 firmware (currently available only on Zynq devices, i.e. not Kasli) still lets you talk to the board over the network e.g. to change settings after it has crashed.

Thanks! I got help from Mateusz W. from M-Labs, too.
It's basically the same advice, and I managed to restore internal clock this way.
I'll quote it here in case others get into similar trouble:

To reset the device to use internal clock, following the instructions from the manual:
https://m-labs.hk/artiq/manual/installing.html#miscellaneous-configuration-of-the-core-device

First make a configuration file that sets the clock signal, then flash it:
artiq_mkfs -s rtio_clock int_125 internal_clk.config
artiq_flash storage -f internal_clk.config

That should let your device work again.

@StefanK It looks like we've both figured out how to restore the kasli to its internal clock via JTAG, but were you able to get to the bottom of why this particular Kasli core cannot function while clocked off of an external 10 MHz reference? Are you trying to apply the signal at startup time?

I'm still trying to figure out why my Kasli core won't work off of an external reference, even when I provide it with one at startup time. I've tried applying the external clock to the crate at a range of input powers between -10 dBm and -2 dBm, reflashing the crate after every attempt, without success. The red LED turns on and the crate becomes unresponsive.

Are there any additional settings I could change? Or is it possible the board is broken? I can get the core to work perfectly well when it is internally clocked, it just doesn't seem to recognize any external clocking signals.

    mpr2
    In my case, the firmware was "unknown beta". I think that in early or self-compiled firmware versions, there might have been some bugs. With a recent firmware from M-Labs, my box accepted external clock flawlessly.

    You might want to check if your external trigger signal reaches the Si5234 chip on board of your Kasli.

    This is what I measured at the Si5324 chip, at one CLKIN pin.

    The common input voltage is 1,35 V, the amplitude is over 300 mV.
    The other CLKIN pin has the same common voltage, but an inverted signal.
    These values are well within the parameters I found in the Si5324 datasheet.

    If your measurements are fine there, you might try a firmware update.
    If not, you should check the components between the SMA input and the Si5324 chip.

    Good luck!

    6 days later

    Thanks, @StefanK! You mentioned you measured your CLKIN signal to be oscillating with a magnitude of 300 mV about 1.35 V when measured at the CLKIN pin of the Si5324 chip. Does this look the same as the signal that you are inputting to the front of the Kasli card? Or is the voltage that you are inputting to the crate different?

    The input signal was some rectangle signal from a clock generator integrated in a frequency meter.
    But also for 10MHz signal from a sine generator with +-500 mV around 0 V it looked similar.
    A balun inductor decouples any DC component and adds the offset of 1,35 V to the signal.