X4M05 SPI Interfacing

Discussion in 'X2 & X4 SoC' started by Sooraj, Apr 3, 2017.

  1. Sooraj

    Sooraj New Member

    I want to interface the x4mo5 module directly with raspberry pi using SPI.. Is there any basic code available?? Please help..
    Last edited: May 2, 2017
  2. Ole-Johan

    Ole-Johan New Member


    We do not have any prepared setup for accessing the X4 chip directly over SPI from a PC. You would need some PC to SPI connection, and we are not providing that. In order to communicate directly with the X4 chip you need to use our X4Driver, but you need to add the SPI transport mechanism from your HW setup. As an example, you can use our XEP project, which does this on our module HW implementation. You can take that and use the X4Driver part, add your SPI communication mechanism.

    Take a look here:

    Within XEP you find information on how to do this porting. But you still need the HW to connect your PC to the X4M05.

  3. Sooraj

    Sooraj New Member

    Hi Sir,
    As per your instructions i ported some basic functions from x4driver to python and executed on x4m05 using raspberry pi.But when i tried reading from the internal registers it doesn't give the expected values.The code is blocked at the point where the 'FIFO status register' is checked (because the expected bits are not set in the status register).
    I also noticed that in the xep source you were using quad spi. Is it necessary to use quad SPI? Or can i use the basic SPI mechanism instead? Can you provide any example using SPI? Please help..
    Last edited: May 12, 2017
  4. Rajat Sewal

    Rajat Sewal New Member

    Sorry for this late post, but I just joined the forum. QUAD-SPI is NOT mean't for master/slave communication. It is used as one of several (JTAG, FLASH) methods to program an embedded controller. Only regular SPI can be used for device M/Slv coms.