Skip to main content
rajesh reddy
Associate II
July 19, 2017
Question

STM32L4_SPI

  • July 19, 2017
  • 2 replies
  • 645 views
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.

    This topic has been closed for replies.

    2 replies

    S.Ma
    Principal
    July 19, 2017
    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.

    ST Technical Moderator
    July 19, 2017
    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

    In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks