1 Reply Latest reply on Jun 7, 2016 6:00 AM by user_1377889

    How shall i can solve my Problem in SPIS interrupt based communication?

    user_504416177

      Hello Every one,

         

      I want to transfer data via SPI (Slave) using interrupt. I found one example and tries to implement it. But its not doing things as its suppose to do in my program. I am attaching my project please have a look into it and suggest me with possible solutions.

         

      Looking forward for your reply.

         

      Regards

         

      Awais

        • 1. Re: How shall i can solve my Problem in SPIS interrupt based communication?
          user_1377889

          I would suggest you to create a project with an SPI master and an SPI slave. Connect both and simulate a communication.

             

          Keep in mind that for every bit (Byte) the master sends out via mosi, immediately a bit (Byte) is sent back from th slave via miso.

             

          Do not clear the buffers using SPIS_ClearRxBuffer() when you read out the data, do that only in case of errors.

             

          You do not have an interrupt handler, the StartEx() is commented out.

             

          You did not start the Slave.

             

          Easiest approach: increase the buffers to something like 150 and let the component handle the interrupts.

             

          read off all incoming bytes from buffer and provide answers in the output buffer.

             

           

             

          Bob