Multiple X4 on Single ATSAME70Q21

Discussion in 'X4M03' started by Raj Bisoi, Dec 14, 2018.

  1. Raj Bisoi

    Raj Bisoi New Member


    Looking at the feasibility of connecting multiple X4 sensors on ATSAME70Q21. I have downloaded xtXEP_source-3.4.7_v1 (RTOS) source code.

    Before deep diving into the implementation, I would like to reach out to you to seek your advice and understand little bit more if the code is modular enough to instantiate multiple X4 specific tasks and access data from the sensor array from the single Host?

    As I understand, QSPI-DMA is used to fetch the data from X4 and HSUSB-DMA to send out data to Host. I am using Module Connector for the Host-device communications. I am planing to access one device using QSPI and remaining using SPI.

    Can I reuse the code? Appreciate your expert comments and suggestions.

  2. Hi,

    You ask if XEP is prepared for accessing multiple X4 chips. The short answer to this is yes. I believe there is benefit to reusing the code and making the required modifications. Some considerations to fully enable communication with multiple X4 chips;
    You could use the QSPI module for all X4s, with multiple Chip Selects. Low-level SPI driver (xtio_spi.c) needs to be expanded to include definitions for all of the Chip Selects, and a way to select between them. It sounds like you might want to use different hardware modules for each X4, which shouldn't be a big problem, but requires the code to initialize and maintain calls for the separate drivers. You should be able to utilize the XDMA for the transfer of data from the other hardware modules as well.
    You will also need to consider creating additional tasks to maintain each of the X4 chips, but could also just reuse the one radar task.
    Radar data will somehow have to be tagged to know which module generated the data. You could use the uppermost bits in the framecounter (infocode field of datafloat packet), or inject an additional float-value to indicate the X4.

    Raj Bisoi and Charlie Shao like this.