AnsweredAssumed Answered

STM32F103VCT6 SPI MOSI,MISO,SCK and NSS ?

Question asked by H.Rick on Aug 2, 2015
Latest reply on Aug 8, 2015 by Clive One
Guys,

Does anyone of you have an experience on SPI1 for STM32F103VCT6 ?

I read one code and trying to understand, why one pin has 2 function ??
Please have a look :
/* Configure SPI1 pins: NSS, SCK, MISO and MOSI */
   GPIO_InitStructure.GPIO_Pin = GPIO_Pin_5 | GPIO_Pin_6 | GPIO_Pin_7;
   GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
   GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;
   GPIO_Init(GPIOA, &GPIO_InitStructure);
 
   GPIO_InitStructure.GPIO_Pin = GPIO_Pin_6;
   GPIO_InitStructure.GPIO_Mode =  GPIO_Mode_IPU; 
   GPIO_Init(GPIOA, &GPIO_InitStructure);


How can I use 1 pins with different function ? NSS / MISO at once ?
Thanks

Outcomes