BCM20376 SPI2 Slave P26_CS_P24_CLK_P33_MOSI_P2_MISO

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

cross mob
Anonymous
Not applicable

Hi, I am trying to use SPI2 Slave P26_CS_P24_CLK_P33_MOSI_P2_MISO.

I used this code and changed spi2PortConfig.spiGpioConfig = SLAVE2_P02_CS_P03_CLK_P00_MOSI_P01_MISO;

to

spi2PortConfig.spiGpioConfig = SLAVE2_P26_CS_P24_CLK_P33_MOSI_P2_MISO;

but doesn't work. Any thoughts?

void spiffy2_slave_initialize(void)
{

// To use SPIFFY2 as slave

spi2PortConfig.masterOrSlave = SLAVE2_CONFIG;

// To pull for MISO for slave, MOSI/CLOCK/CS if we are slave mode

spi2PortConfig.pinPullConfig = INPUT_PIN_PULL_DOWN;

// To use P3 for CLK, P0 for MOSI and P1 for MISO in SLAVE mode

spi2PortConfig.spiGpioConfig = SLAVE2_P02_CS_P03_CLK_P00_MOSI_P01_MISO;

// DO NOT CONFIGURE CS_PORT and CS_PIN in SLAVE mode - the HW takes care of this. // There is no need to configure the speed too – the master selects the speed.
// Initialize SPIFFY2 instance
spiffyd_init(SPIFFYD_2);

// Configure the SPIFFY2 HW block

spiffyd_configure(SPIFFYD_2, SPEED, SPI_MSB_FIRST, SPI_SS_ACTIVE_LOW, SPI_MODE_3);

}

0 Likes
1 Solution

Within the latest SDK, there is an SPI Slave example (spi_comm_slave).

I recommend that you try to get this example working first as it will be easier for our team to support.

View solution in original post

0 Likes
3 Replies
Anonymous
Not applicable

P26_CS_P24_CLK_P33_MOSI_P2_MISO is not defined.

Is P26_CS_P24_CLK_P33_MOSI_P25_MISO what you want to use?

I think you need to use 0 as SPEED; 2nd parameter of spiffyd_configure().

Anonymous
Not applicable

yes it's P25. we already tried SPEED 0 but doesn't work.

anyone has ever made this combination working?

0 Likes

Within the latest SDK, there is an SPI Slave example (spi_comm_slave).

I recommend that you try to get this example working first as it will be easier for our team to support.

0 Likes