cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 6

KaAn_4627896
New Contributor

Hi!

I'm trying to use the Cypress API SPI_1_SetActiveSlaveSelect-function, on a CY8C6347BZI-BLD54 using PSoC Creator 4.2 with PDL 3.1.1.

The component name are SCB_SPI_PDL_v2_0.

When I select m_ss1 it seems to not be applied on the corresponding hardware pin.

The SPI component is located in SCB7, and the SCB7_SPI_CTRL register should be located at address 0x40680020 according to the datasheet.

After I've run the following code snippet for selecting m_ss1 (SPI1_LED_CS) I get this result in the control register:

while (SPI_1_IsBusBusy());

SPI_1_SetActiveSlaveSelect(SPI_1_SPI_SLAVE_SELECT1);

10000100 00000000 00000000 00000001

    ||

  SSEL[0-3]

But SPI1_LED_CS does not go low when writing data to the SPI bus, strange enough.

When I disconnect SPI1_DO_CS and SPI1_LED_CS from the SPI controller and control them manually it works just as expected.

So the question is if I'm missing something here?

SPI.PNG

0 Likes
1 Reply
VenkataD_41
Moderator
Moderator

Hi,

>>"But SPI1_LED_CS does not go low when writing data to the SPI bus, strange enough.

--> Can you please tell us how are you testing this? Is the SPI write does not happening? Or have you seen the scope signal of the SS line?

>>"When I disconnect SPI1_DO_CS and SPI1_LED_CS from the SPI controller and control them manually it works just as expected.

So the question is if I'm missing something here?"

--> Can you please elaborate what do you mean by "control them manually"? By disconnecting do you mean are you removing the connections of wires on the pins SPI1_DO_CS and SPI1_LED_CS?

--> Have you tested SPI_Master_polling code example from the PSoC Creator Code example section? Is it working on your board? If not, can you please test it now?

Thanks

Ganesh

0 Likes
Top labels