NHS3100 SPI Questions

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

NHS3100 SPI Questions

Jump to solution
1,026 Views
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

Tags (1)
0 Kudos
1 Solution
993 Views
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.

View solution in original post

2 Replies
994 Views
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,006 Views
vicentegomez
NXP TechSupport
NXP TechSupport

I move this thread to the correct forum

 

Thanks

 

0 Kudos