BLE SPI

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

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 

0 Likes
1 Solution
Anonymous
Not applicable

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

View solution in original post

0 Likes
4 Replies
MichaelF_56
Moderator
Moderator
Moderator
250 sign-ins 25 comments on blog 10 comments on blog

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

0 Likes
Anonymous
Not applicable

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:

pastedImage_7.png

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

0 Likes
Anonymous
Not applicable

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

0 Likes

Thanks for the update ghalibjanjua

jakewtorres

0 Likes