2 Replies Latest reply on Jan 28, 2016 3:36 AM by moicci

    How to tx data exceed 16 bytes?

      Hi,

       

      The document named "WICED Smart Hardware Interfaces" tell the maximum transaction size is 16 bytes for SPIFFY1 and SPIFFY2.

      I tried to send 24 bytes data by the following code.

       

      static const int CS_PORT = 33 / 16;
      static const int CS_PIN = 33 % 16;
      static const int MAX_BYTES = 16;
      
      void
      SPI_write(int pinCS, uint8_t* data, int length) {
          while (length > 0) {
              int bytes = length;
              if (bytes > MAX_BYTES)
                  bytes = MAX_BYTES;
          
              gpio_setPinOutput(CS_PORT, CS_PIN, GPIO_PIN_OUTPUT_LOW);
      
              spiffyd_txData(SPIFFYD_2, bytes, data);
      
              gpio_setPinOutput(CS_PORT, CS_PIN, GPIO_PIN_OUTPUT_HIGH);
      
              length -= bytes;
              data += bytes;
          }
      }
      

       

      But the firmware crashed in spiffyd_txData.

      How to send data exceed 16 bytes?