UpXtreme SPI data checksum error

My code running on UpXtreme reports Checksum Error when communicating via SPI.
It's very strange that the same code works well on Upboard.
The pinout of Xtreme and Upboard seems has no difference.

Comments

  • DCleri
    DCleri Administrator, AAEON Posts: 1,213 admin

    Thanks for reporting the issue.

    Is the operating system the same?

    Are you using the right kernel for UP Xtreme (kernel 5.0 on Ubuntu 18.04)?

  • maxxy
    maxxy New Member Posts: 8

    @DCleri said:
    Thanks for reporting the issue.

    Is the operating system the same?

    Are you using the right kernel for UP Xtreme (kernel 5.0 on Ubuntu 18.04)?

    Upboard: kernel 4.4.86-rt99 on Ubuntu18.04
    UpXtreme: kernel 5.2.21-rt15 on Ubuntu18.04

    Do you mean only kernel 5.0 is supported by UpXtreme?

  • maxxy
    maxxy New Member Posts: 8

    @maxxy said:

    @DCleri said:
    Thanks for reporting the issue.

    Is the operating system the same?

    Are you using the right kernel for UP Xtreme (kernel 5.0 on Ubuntu 18.04)?

    Upboard: kernel 4.4.86-rt99 on Ubuntu18.04
    UpXtreme: kernel 5.2.21-rt15 on Ubuntu18.04

    Do you mean only kernel 5.0 is supported by UpXtreme?

    I start Ubuntu18.04 with kernel 5.0.0-1-lowlatency, the same problem with SPI checksum.

  • DCleri
    DCleri Administrator, AAEON Posts: 1,213 admin

    Yes the UP Xtreme is supported by our kernel that you can install via our PPA:
    https://wiki.up-community.org/Ubuntu#Install_Ubuntu_kernel_5.0.0_for_UP_Xtreme_only_from_PPA_on_Ubuntu_18.04

    You cannot use default Ubuntu kernels for any UP system if you want to use our 40pin header or you would need to integrate/port manually the pinctrl patches.

  • maxxy
    maxxy New Member Posts: 8

    @DCleri said:
    Yes the UP Xtreme is supported by our kernel that you can install via our PPA:
    https://wiki.up-community.org/Ubuntu#Install_Ubuntu_kernel_5.0.0_for_UP_Xtreme_only_from_PPA_on_Ubuntu_18.04

    You cannot use default Ubuntu kernels for any UP system if you want to use our 40pin header or you would need to integrate/port manually the pinctrl patches.

    I use the kernel that UPXtreme recommended from here, and I had installed the pinctrl patches.
    https://launchpad.net/~aaeonaeu/+archive/ubuntu/upboard/+packages
    linux-image-unsigned-5.0.0-1-lowlatency Linux kernel image for version 5.0.0 on 64 bit x86 SMP

    The SPI-tool shows the configuration of spidev as below:
    root@hcdog001:# spi-config -d /dev/spidev0.0 -q
    /dev/spidev0.0: mode=0, lsb=0, bits=8, speed=10000000, spiready=0
    root@hcdog001:# spi-config -d /dev/spidev0.1 -q
    /dev/spidev0.1: mode=0, lsb=0, bits=8, speed=12000000, spiready=0

    Is there any problem?

  • maxxy
    maxxy New Member Posts: 8

    Hi, DCleri
    Could you please tell me the maximum speed of the SPI of UPXtreme?
    I found when I slow down the speed to 2M, the checksum passed.
    when SPI speed >3M+, checksum failed.

    but my code need to communicate via SPI with 6M speed.
    I can not understand why UpBoard can work well on 6M, but UPXtreme failed.

  • DCleri
    DCleri Administrator, AAEON Posts: 1,213 admin

    are you using the same hardware configuration?

    Cable/peripherals, layout, etc.?

    Can you share a picture of it and a block diagram?

  • horson
    horson New Member Posts: 3

    @maxxy said:
    Hi, DCleri
    Could you please tell me the maximum speed of the SPI of UPXtreme?
    I found when I slow down the speed to 2M, the checksum passed.
    when SPI speed >3M+, checksum failed.

    but my code need to communicate via SPI with 6M speed.
    I can not understand why UpBoard can work well on 6M, but UPXtreme failed.

    Have you solved the problem?

  • horson
    horson New Member Posts: 3

    I found that it takes more than 100ms for spi ioctrl on UP Xtreme (5.0.0-1-lowlatency kernel).

  • sunnywilson09
    sunnywilson09 New Member Posts: 2

    Could you please tell me the maximum speed of the SPI of UPXtreme?

  • sunnywilson09
    sunnywilson09 New Member Posts: 2

    Still waiting for someone to help me with the issue?

    Regards..

  • DCleri
    DCleri Administrator, AAEON Posts: 1,213 admin

    We haven't tested the maximum speed achievable, in theory 6Mbps should be achievable but we need to investigate the issue and it can take some time.

    If you can help providing examples and setup where you are encountering the issue (e.g. software used, SPI devices used, hardware layout of the test, etc.) it would be great.

  • DCleri
    DCleri Administrator, AAEON Posts: 1,213 admin

    We can confirm that there is an issue with the SPI kernel driver up to version 5.3.4 where you can reach a maximum speed without errors of 3.6Mbps (when set max speed of 12Mhz)

    From kernel 5.3.5 onwards (including 5.4) you can go up to 11.3Mbps (when set max speed of 12Mhz)

    We are currently working on upgrading our kernel support to 5.4 LTS (for both Ubuntu and Yocto), which will be available later this year.

  • kajarvid
    kajarvid New Member Posts: 1
    edited December 2021

    I found that it takes more than 100ms for spi ioctrl on UP Xtreme

  • Ray1124
    Ray1124 New Member Posts: 2

    Hi, I meet the similar problems. When I set spi_speed >= 1.5MHZ, the checksum error occurs. My system is ubuntu20.04 with kernel:
    Linux miniarcdog 5.4.66-rt38 #1 SMP PREEMPT_RT Sun Apr 30 23:31:45 CST 2023 x86_64 x86_64 x86_64 GNU/Linux.
    Can anyone helps me...

  • Ray1124
    Ray1124 New Member Posts: 2

    @horson said:

    @maxxy said:
    Hi, DCleri
    Could you please tell me the maximum speed of the SPI of UPXtreme?
    I found when I slow down the speed to 2M, the checksum passed.
    when SPI speed >3M+, checksum failed.

    but my code need to communicate via SPI with 6M speed.
    I can not understand why UpBoard can work well on 6M, but UPXtreme failed.

    Have you solved the problem?

    Hi bro, simular your problem, did you finally solve it?

Privacy Policy