Skip to main content
Dick Lin
Senior
June 7, 2018
Question

Nucleo-144 SPI?

  • June 7, 2018
  • 10 replies
  • 2042 views
Posted on June 07, 2018 at 17:49

Hi,

I am using STM32L496 Nucleo-144 connecting SPI1 to external Adafruit MAX31865 PT100 temp sensor using breadboard with Saleae.

For some reason (I have no clue at all), I got nothing from Saleae.

One thing I kinda of curious is the the pinout. From UM1279 User manual, the pinout are

- SPI_SCK PA5

- SPI1_MISO PA6

- SPI1_MOSI PA7

- SPI1_CS PD14

While from Cube the SPI1_NSS is PA4. 

I am assuming SPI1_CS and SPI1_NSS are the same (either Chip Select or Slave Select). Just not sure which one should I follow. I did try both, no luck at all.

Why I am not seeing anything from Saleae? I would think should be a very straight forward thing.

Thanks,

Dick

    This topic has been closed for replies.

    10 replies

    Dick Lin
    Dick LinAuthor
    Senior
    June 7, 2018
    Posted on June 07, 2018 at 20:26

    Figured out we need to use PA4 for NSS.    PA4     ------> SPI1_NSS

    And need to change the BaudRatePrescaler to 32.

      hspi3.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_32;

    Dick Lin
    Dick LinAuthor
    Senior
    June 11, 2018
    Posted on June 11, 2018 at 18:21

    Now the issue become can't get any data using HAL_SPI_TransmitReceive() function. The in_data always 0 while I am able to see the data from analyzer.

    Any suggestions?

    Thx

    Tesla DeLorean
    Guru
    June 11, 2018
    Posted on June 11, 2018 at 19:37

    Got super low visibility into your code/functionality

    Perhaps you're not configuring the pin properly? Clocking on the wrong edge?

    SPI3?

    PD14 should be viable as a GPIO chip select

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..