4 Replies Latest reply on Mar 3, 2016 9:28 AM by MichaelF_56

    BLE SPI

      Hi,

       

      I'm following the "Application Note BCM920732HW" and using its function to use SPI in Master mode and I'm unable to do for BCM20737S. I am using following PINs:

      P3 as CLK

      P4 as MOSI

      P25 as MISO

      and

      P32 as Chip Select

       

      (Just for information I'm using I2C as well)

       

      What I find in  in spiffydriver.h is that combination of line I am using is not mentioned in header instead following is given.

       

       

       

      MASTER2_P03_CLK_P04_MOSI_P01_MISO = 0x00030401,

       

      MASTER2_P03_CLK_P04_MOSI_P05_MISO = 0x00030405,

       

      How I can modify this header?  for my application.

       

      Thanks in advance.

       

      Kind Regards,

      Ghalib 

       

       

       

       

        • 1. Re: BLE SPI
          MichaelF_56

          I recommend using the /WICED-Smart-SDK/Apps/spi_comm_master as a starting point, then slowly make changes to it adjusting for the desired GPIO usage.

           

          Note also that SPIFFY1 shares pins with the EEPROM that is build into the module, so it will not work.

           

          SPIFFY2 should work.

           

          There is also a tremendous amount of troubleshooting guidance already on the forum for SPI debug.

           

          WICED Smart User's Guide

          • 2. Re: BLE SPI

            Hi,

             

            Thanks for your help. I have gone through the example and SPI is working now.

             

            But  my question is that in spiffydriver.h function type enum Spi2MasterGpioConfigType allows nearest combination to my custom application is as follows:

             

             

            MASTER2_P03_CLK_P04_MOSI_P01_MISO = 0x00030401,

             

            MASTER2_P03_CLK_P04_MOSI_P05_MISO = 0x00030405,

             

             

            But the custom board I have designed  requires MOSI on P25 [I have followed the BCM20737S Datasheet: MISO (master and slave) for SPI_2], as below:

            My hardware design have external flash on following PINS interfaced to BCM20737S:

             

            P3 as CLK

            P4 as MOSI

            P25 as MISO

            and

            P32 as Chip Select

             

            I have been through your following post, if you can share document relating to BCM20737S regarding Hardware interface. I have seen your document on forum but I might have missed it, I have one which is for BCM20732 TAG.

            BCM920736 SPI master 2 pin configuration

             

            Thanks a million for your guidance.

             

            Kind Regards,

            Ghalib

            • 3. Re: BLE SPI

              Thanks, my mistake was missing that number mentioned was in hex. Problem solved by writing following line.

              "MASTER2_P03_CLK_PO4_MOSI_P25_MISO = 0x00030419,"

               

              Kind Regards,

              Ghalib

              • 4. Re: BLE SPI
                MichaelF_56

                Thanks for the update ghalibjanjua

                 

                JacobT_81