s32ds Spi transfer

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

s32ds Spi transfer

626 次查看
bharathn3402
Contributor II

Screenshot 2024-04-12 143415.png

here i have two slaves are connected to an single chipselect pin. Iam not sure how to communicate with the slave devices individuallly. can anyone help me out in this?
#spi

#s32ds

标记 (2)
0 项奖励
回复
4 回复数

610 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi,

if you want to use additional chip selects then you have to route the pin for it in the pin_mux component and generate PE code. Then before calling Master transfer function you can switch CS using DSPI_UpdateCS function.
This function can be used to change the chip select configured when the driver was initialized. It is useful for applications where more slave devices are controlled by only one DSPI/SPI instance.

BR, Petr

0 项奖励
回复

606 次查看
bharathn3402
Contributor II
Hi petrs,
My question was i have connected two devices to an an single chipselect pin. how can we communicate with both devices whenever i want?
0 项奖励
回复

602 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi,

you should not have connected more slaves to same single chip select. How do you then deal with slaves SOUT signals connected to MCU SIN input?

BR, Petr

0 项奖励
回复

538 次查看
bharathn3402
Contributor II

HI
i have connected multiple CSB pins to an single dspi chipselect output how to switch between two csb pins in software whenever we want?
in my case for chipselect 3 i  have connected two csb pins. some times i want to communicate with pd3 and some times i want to communicate with the pf5. how?
Screenshot 2024-04-12 143415.png

标记 (2)
0 项奖励
回复