AnsweredAssumed Answered

SPI Chip select and configuration

Question asked by Kewal Deshpande on Jan 11, 2016
Latest reply on Jan 15, 2016 by Kewal Deshpande

Hi,

 

I have an SPI master(K64) configured with below settings. Currently, I am able to communicate only with one of the slave connected on Chip select pin PTD6. I am not doing anything through code apart from setdelay between CS and Clock. So is there anything else which needs to be configured.

 

 

 

SPIMasterConfiguration.JPG

 

 

 

SPIChipselect.JPG

 

How does the HAL know which pin chip selects to, if its PTD5,6,0

 

In the HAL layer, all I could see was

 

/*! @brief DSPI Peripheral Chip Select (PCS) configuration (which PCS to configure)*/

typedef enum _dspi_which_pcs_config {

    kDspiPcs0 = 1 << 0, /*!< PCS[0] @internal gui name="PCS0" */

    kDspiPcs1 = 1 << 1, /*!< PCS[1] @internal gui name="PCS1" */

    kDspiPcs2 = 1 << 2, /*!< PCS[2] @internal gui name="PCS2" */

    kDspiPcs3 = 1 << 3, /*!< PCS[3] @internal gui name="PCS3" */

    kDspiPcs4 = 1 << 4, /*!< PCS[4] @internal gui name="PCS4" */

    kDspiPcs5 = 1 << 5  /*!< PCS[5] @internal gui name="PCS5" */

} dspi_which_pcs_config_t;

I think its a potential bug here in KDS.

Outcomes