AnsweredAssumed Answered

B-L072Z-LRWAN1 LoRa Board.Is PB12 available as SPI chip select?

Question asked by Diego Colombo on Jul 16, 2017
Latest reply on Sep 19, 2017 by Diego Colombo

Hi to all 

At first let me say that i'm a newbie ,an old newbie.

I'm trying to add a SPI display to LoRa board based on  STM32L072CZ

I have used STM32CubeMx to select the pins,clock and so on,the programming enviroment is the AC6 Workbench,

i was encouraged to use the Hal libraries,and so i did.

Once the simple project was generated i added in the code a call to a simple blocking SPI function(despite i set SPI interrupt handler in Cube MX)

 

while (1)
  {
       Delay(10);
       HAL_SPI_Transmit(&  hspi2, my_pdata, 4, 10);
  /* USER CODE END WHILE */
  /* USER CODE BEGIN 3 */
  }
  /* USER CODE END 3 */
}

I can see the data and the clock,but the SPI_NSS pin PB12 stays low.
On the schematic it looks that it has to do with T_SWD IO_IN.

Does this mean that PB12 is not available?

If i check in the I/O register window ,PB12 results assigned to MODE 2,as the other SPI2 pins are.

What can i do or check to understand the reason of this inactivity?

 

Thanks

Outcomes