Xavier SPI clock speed change

Hey everyone,

I am trying to use the Xavier to communicate with a SPI device on a relatively low frequency (<3 MHz). Unfortunately I am unable to change the SPI clock speed of the Xavier.
What I tried so far:

uint32_t speed = 1000000;
ioctl(spi_file, SPI_IOC_WR_MAX_SPEED_HZ, &speed);

This returns successfully, but the clock speed measured on the pin stays unchanged at 8.333MHz.

cat /sys/kernel/debug/clk/clk_summary | grep spi

Outputs 1000000 requested and 960000 actual speed though.

	struct spi_ioc_transfer tr = {
		.tx_buf = (unsigned long)tx,
		.rx_buf = (unsigned long)rx,
		.len = len,
		.delay_usecs = delay,
		.speed_hz = 1000000,
		.bits_per_word = bits,
ioctl(spi_file, SPI_IOC_MESSAGE(1), &tr);

Same result. Returns successfully but the measured clock speed does not change.

  • Just to be sure I tried py-spidev, a python binding for spidev.
    Same result.

  • Changing spi-max-frequency as described in this helpful answer:
    This esults in the Xavier not booting to desktop anymore. The device is booting straight to bash with the error dc hdmi hotplug init couldnt get regulator vdd hdmi 5v0. Really not sure what to make of that and if that’s related at all. The HDMI cable is plugged in the whole time and the device comes up again after I reflash.

I found similar sounding problems on older platforms but without a solution to the issue.

Could you try with spidev_test get the same result?

Hey Shane, I verified that running ./spidev_test -D/dev/spidev0.0 -s1000000 -b8 -p0 also does not change the clock speed.

There is no update from you for a period, assuming this is not an issue any more.
Hence we are closing this topic. If need further support, please open a new one.

Could you try more frequency like 8000000, 16000000

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.