Problem accessing PIF registers

Discussion in 'X2 & X4 SoC' started by Simon Berg, Jul 25, 2017.

  1. Simon Berg

    Simon Berg New Member


    I am working on a setup consisting of the X4SIP02 and the X4A02 modules. I have implemented the x4driver from XEP into my setup and is able to read/write the debug register (0x04) over SPI. My problem is accessing the PIF registers.

    When trying to access PIF with the driver it polls SPI_MB_FIFO_STATUS, returns 0x91 for a while then returns 0x00 and eventually times out.

    I have tried to upload 8051 firmware supplied with XEP but verification fails.
    The enable pin is connected to a 3.3V supply.
    All gpios’s are unconnected.

    Any suggestions on what i can do to access the PIF registers successfully?

    Thank you.
  2. Charlie Shao

    Charlie Shao Moderator Staff Member

    Hi Simon,

    I am working on fetching raw data from X4M05 module with Raspberry Pi, basically the same job you are doing. I didn't go so detail on how the PIF work. You may find the all the functions related to PIF are based on the SPI write_read/read function, so I suggest you make sure SPI is working well. You tried to upload 8051 firmware but verification fails, did you find which step go wrong during debugging?

    Last edited: Aug 1, 2017
    Simon Berg likes this.
  3. Simon Berg

    Simon Berg New Member

    Thank you very much for the upload Charlie, I think you're right that there have to be something wrong with my SPI implementation. I will have a look at your code.