NHS3100 SPI Questions

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

NHS3100 SPI Questions

跳至解决方案
1,753 次查看
SnoZek
Contributor II

Hello,

I'm trying to use SPI and that's why i'm using ssp driver. I'm not an expert in SPI.

I write few simples lines :

    Chip_SSP_Enable(NSS_SSP0);
    char lenght = Chip_SSP_ReadFrames_Blocking(NSS_SSP0,data,bytesNumber);
    Chip_SSP_Disable(NSS_SSP0);

 But i was wondering where does i should select to which slave i'm talking ? I couldn't find it.

Thank you for your help and yours answers,

BR,

Yvan

标记 (1)
0 项奖励
回复
1 解答
1,720 次查看
driesmoors
NXP Employee
NXP Employee

Hi Yvan,

The SPI Chip Select line corresponds to pin SSEL (frame sync select) of the SSP HW block. It is routed to pin 2.

When the IC drives the clock signal, it will also set it to active state before the start of the serial data. When the IC follows the clock signal, the change to active state qualifies for the presence of data.
See for more information in the datasheet, Chapter 8.10, SPI controller; basic examples can be found under <SDK>/docs/firmware.html.

If you have more than two devices on the SPI bus, you cannot simply connect the chip select pins together, but will need to use multiple pins on the main device, one for each follower that is present. Driving those pins falls outside the scope of the SPI driver.

KR,
Dries.

在原帖中查看解决方案

2 回复数
1,721 次查看
driesmoors
NXP Employee
NXP Employee

Hi Yvan,

The SPI Chip Select line corresponds to pin SSEL (frame sync select) of the SSP HW block. It is routed to pin 2.

When the IC drives the clock signal, it will also set it to active state before the start of the serial data. When the IC follows the clock signal, the change to active state qualifies for the presence of data.
See for more information in the datasheet, Chapter 8.10, SPI controller; basic examples can be found under <SDK>/docs/firmware.html.

If you have more than two devices on the SPI bus, you cannot simply connect the chip select pins together, but will need to use multiple pins on the main device, one for each follower that is present. Driving those pins falls outside the scope of the SPI driver.

KR,
Dries.

1,733 次查看
vicentegomez
NXP TechSupport
NXP TechSupport

I move this thread to the correct forum

 

Thanks

 

0 项奖励
回复