cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L4_SPI

rajesh reddy
Associate II
Posted on July 19, 2017 at 10:46

In STM32L4  SPI 1 i am  use in Receive only master mode  and hardware NSS  signal in output mode.In that project  how to control the NSS pin  (chip selection pin),I am use only one slave MCU is master ex.ADC is slave.i am configure MISO,NSS,SCK only. send any example code for

Receive only master and 

 what are the configuration for  this.

2 REPLIES 2
S.Ma
Principal
Posted on July 19, 2017 at 11:10

Start easy by using SPI as Master 4 wire interface. Control NSS as general GPIO (by SW) and don't activate MOSI pin (the output of the internal SPI will just go nowhere). Then SPI Master general example from STM32 Cube can be modified to get the functionality implemented simply.

Imen.D
ST Employee
Posted on July 19, 2017 at 11:41

Hi

Reddy.Rajesh

,

You can find under the STM32CubeL4 packagea set of SPI exampleswhich can help you as an implementation example.

For STM32L4 refer to

http://www.st.com/content/ccc/resource/technical/document/application_note/group0/09/77/32/19/96/59/4c/1e/DM00209748/files/DM002097pdf/jcr:content/translations/en.DM002097pdf

«STM32Cube firmware examples for STM32L4 Series'that illustrates the existing SPI examples.

Have a look the reference manual related to your device for more details on section 'Slave select (NSS) pin management'

With Regards

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen