SPI2 on BCM20732S - P1 MISO?

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

cross mob
legic_1490776
Level 5
Level 5
25 likes received 10 likes received First like received

I am trying to hook up an SPI peripheral to a board based on the BCM20732S.

I am trying to use the pin combination "MASTER2_P03_CLK_P02_MOSI_P01_MISO"

However, it does not seem to work.  I see the clock signal on P03, but there is no output on P02.

I noticed in the manual that P1 is internally connected to the /WP on the internal eeprom - is this a problem?


If this combination is not going to work, can you recommend a pin choice that should work?

0 Likes
1 Solution
MichaelF_56
Moderator
Moderator
Moderator
250 sign-ins 25 comments on blog 10 comments on blog

Valid GPIO configuration/combinations for SPI2 are listed in the Hardware Interfaces Guide online here: WICED™ Smart Hardware Interfaces

There is also sample code in the document which shows how to initialize SPIFFY2 in the master or slave roles, and how to write and then read a byte from a SPI slave/master.

Per your question, physical pin 25 is tied to the EEPROM WP pin internally, so the alternate functions listed in the current datasheet are not available within the module (only the SOC).  In addition, a 10K pull-up is recommended on this pin as well.

Per below, the datasheet is being updated now to reflect these changes:

TRM-Changes-Feb-2014.png

View solution in original post

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

Valid GPIO configuration/combinations for SPI2 are listed in the Hardware Interfaces Guide online here: WICED™ Smart Hardware Interfaces

There is also sample code in the document which shows how to initialize SPIFFY2 in the master or slave roles, and how to write and then read a byte from a SPI slave/master.

Per your question, physical pin 25 is tied to the EEPROM WP pin internally, so the alternate functions listed in the current datasheet are not available within the module (only the SOC).  In addition, a 10K pull-up is recommended on this pin as well.

Per below, the datasheet is being updated now to reflect these changes:

TRM-Changes-Feb-2014.png

0 Likes

OK, thanks for the quick response!

I will switch over to use

"MASTER2_P24_CLK_P02_MOSI_P25_MISO"


If I don't plan to drive /WP, do I still need the external pullup?


0 Likes

We are now recommending the pull-up because a handful of users have observed errors while booting when the pin was not used.

Also, if you want to start with a working sample for SPI2, there is the spi_comm_master sample app in SDK 1.1.0 which uses a MASTER2_P24_CLK_P04_MOSI_P25_MISO combination.

0 Likes

Thanks.. i'll put in the pullup.

Also, for the record, using P02 as MOSI doesn't seem to work either.  I am using P04 successfully.

0 Likes
Anonymous
Not applicable

ble_spi.jpg

Hi,

  I'm using this configuration 'MASTER2_P24_CLK_P04_MOSI_P25_MISO' on SPI_2.

  But interesting thing is that I can't find correct mapping from the real output signal.

  From picture as above, P4 should be the MOSI, but it turns out as more likely a CLK, and P25 is more like the MOSI as I trying to send 2 data byte '0x55' and '0xcc' in every second.

  Besides, I can't find CS working at all. I use P15 as CS (the sample code in pressure_sensor.c).

  Any comment?

0 Likes

I have recently worked on this and thought I had issues but it was user (me) error combined with less than stellar documentation.  This pins map as indicated on the label (I am using the TAG board),  'MASTER2_P24_CLK_P04_MOSI_P25_MISO' the issue I had was conflict on my CS with PUART. If you are remapping it make sure that you don't have a conflict. Also obey the BCM920732HW Application Note Restriction on the SPI.


0 Likes
Anonymous
Not applicable

Although I am not out of the woods yet on my BMC20737 TAG SPIFFY2 MASTER issues, here are some things I found useful that might help:

1. If you are using Puart (TAG board does) make sure your MISO/MOSI are on the same bank (high or low).  My TAG board and app software uses the high bank for pUART.

2. Check your datasheet for pin port pairings.  For example if P8 and P33 are paired so that both ports use the same pinout (as they are on the 737) you must disable the unused port (disable both input and output).

3. Check the TAG board schematic and try to use ports that are not connected to anything like UARTs.

4. Consider using the TPs on the schematic if header pins are not available.

5. If your port doesn't work, see if you can find another one.

6. Try different speed.  I seemed to have best result so far with 1000000, but have only tried 500000 and 2000000.  500000 didn't work at all and 2000000 gave funning signals for the data line.  Clock looked ok I think.

7. My TAG board uses P32 and P33 for pUart, so stay away from those (or disable pUART) and anything that might be paired with them, e.g. P8.

8.  I found that on my TAG board the dip switches must be set as follows: 1, 4, 6 ON all the rest OFF for my application to work.  Not sure why but check schematic to see if any switches are connected to the header pins you are using and consider switching those off during application execution.  (switch all back on for downloading program).

Hope somebody finds this useful.  It took quite a few hours to learn all these tricks.