Configuring >1 PCS Lines on same SPI Channel

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Configuring >1 PCS Lines on same SPI Channel

505 Views
kishore_kumar_d
Contributor I

I would like to know if there is a special setting or configuration inorder to use more than 1 PCS lines on SPI_3 channel in MPC5748G.

MPC5748G as SPI Master talking to 2 External Slave Devices

Observation 1:

Config

1st External Device with PCS0 on SPI_3

2nd External Device with PCS1 on SPI_3

Transmit Request is sent to both Devices with corresponding PCS pulled LOW before sending and pull it back to HIGH

Observation :

Successfull communication only with 1st External Device.

On transmission request to 2nd External Device

PCS1 line remains HIGH while PCS0 is pulled low when transmission to 2nd External Device. Since the Master Node is same for both External Devices successful communication is seen on 1st Device instead of 2nd Device

Observation 2:

Config

1st External Device with PCS1 on SPI_3

2nd External Device with PCS0 on SPI_3

Transmit Request is sent to both Devices with corresponding PCS pulled LOW before sending and pull it back to HIGH

Observation :

Successfull communication only with 1st External Device.

On transmission request to 2nd External Device

PCS0 line remains HIGH while PCS1 is pulled low when transmission to 2nd External Device. Since the Master Node is same for both External Devices successful communication is seen on 1st Device instead of 2nd Device

Conclusion : Whichever PCS Lines is used for the 1st External Device the same PCS Line is used for other slaves as well without considering the corresponding PCS lines of those Slaves. 

Is there any place where the second PCS should be initialized explitcily ??

Labels (1)
0 Kudos
1 Reply

438 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

there's nothing special, the settings are the same for all chip selects.

- configure the pins in SIUL to chip select function

- configure PCSIS field in DSPI3_MCR register as needed (select inactive state)

- when writing to PUSHR register, write PCS field to trigger the right chip select. Write '0b1' to PCS bitfield to assert CS0, write '0b10' to assert CS1.

If this doesn't work, please share your code (initialization of SIU, initialization of DSPI, code used to send a data).

Regards,

Lukas

0 Kudos