Skip to main content
Preetha Padmanabhan
Visitor II
April 11, 2017
Question

Slave Mode Setting for DSPI1 in SPC560D40L1 Chip

  • April 11, 2017
  • 1 reply
  • 731 views
Posted on April 11, 2017 at 09:31

Hi Everyone, I am using SPC560D40L1 micro controller and trying to configure DSPI1 to be in slave mode. I am using SPC5studio to make the configuration. I have set pin directions and OBE and IBE along with WPS and WPE configurations for the CS and changed directions for the clock and CS, I have made use of the CS0_1 pin as per the datasheet for enabling slave mode. Is there any other settings that i need to take care of? When i see the resgister settings of DSPI 1  during code execution it shows the channel is always in master mode. Does anyone know how i need to set the slave mode for the DSPI channel? Thanks in advance Preetha.

    This topic has been closed for replies.

    1 reply

    Erwan YVIN
    ST Employee
    April 12, 2017
    Posted on April 12, 2017 at 15:57

    Hello , 

    Did you set the corresponding MSTR to 0 ?

    MSTR

    Master/slave mode select

    Configures the DSPI for master mode or slave mode.

    0 DSPI is in slave mode

    1 DSPI is in master mode

    Anyway , for the pinmap point of view you should configure 

    In slave mode, the CS0_x signal is a slave select input signal that allows an SPI master to

    select the DSPI as the target for transmission. CS0_x must be configured as input and

    pulled high. If the internal pullup is being used then the appropriate bits in the relevant

    SIU_PCR must be set (SIU_PCR [WPE = 1], [WPS = 1]).

             Best regards

                             Erwan