2017-04-11 12:31 AM
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.
2017-04-12 06:57 AM
Hello ,
Did you set the corresponding MSTR to 0 ?
MSTR
Master/slave mode selectConfigures the DSPI for master mode or slave mode.0 DSPI is in slave mode1 DSPI is in master modeAnyway , 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 andpulled high. If the internal pullup is being used then the appropriate bits in the relevantSIU_PCR must be set (SIU_PCR [WPE = 1], [WPS = 1]).Best regards
Erwan