SPI transfer cost lots of time on Jetson AGX Orin

Hello,

I connected Jetson AGX Orin with an ADS1299 board to obtain data via SPI. I tried spi_sync_transfer function to transfer data.

What confused me most is that I used the same codes on Jetson Nano and Jetson AGX Orin, but the time cost for spi_sync_transfer is quite different. The time cost using spi_sync_transferon Jetson Nano is less than 0.4ms, while the time cost on Jetson AGX Orin is more than 7ms.

I know that the Linux kernel version is different on these machines, but is this the reason why their time cost is different? Or did I miss anything else? I expected that the time cost would be similar on these two machines.

On Jetson AGX Orin, I changed device tree file and flash the machine:
1664247097823

My codes look like:

int drdy_init(struct ads1299_dev *dev) {
         // other codes...
        int ret = request_threaded_irq(dev->drdy_irq.irqnum, t_top_handler, t_bottom_handler, IRQF_TRIGGER_FALLING, dev->drdy_irq.name, &ads1299);
        return ret;
}

static irqreturn_t t_top_handler(int irq, void *dev_id) {
        return IRQ_WAKE_THREAD;
}

static irqreturn_t t_bottom_handler (int irq, void *dev_id) {
        gpio_set_value(ADS1299_CS_PIN, 0);
        time1 = ktime_get();
        int ret = spi_sync_transfer(ads1299.spi, &tr, 1);
        time2 = ktime_get();
        gpio_set_value(ADS1299_CS_PIN, 1);
        delta = ktime_sub(time2, time1);
        duration = (unsigned long long)ktime_to_ms(delta);
        // ... other codes
}

Could you try the loopback if the same on Orin and we can report to developer to figure it.

Thanks

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