2015-11-05 08:59 AM
I'm interfacing with TI CC1101, it need to check MISO pin to low before start SPI transaction.
Shall I change MISO pin to AF mode to Input mode before I read, and then change it back to AF mode to start SPI.Is there a convenient way to do so ? ( I think GPIO_Init is a little overhead )Or I can just read the pin as normal input pin in AF mode ?2015-11-05 09:37 AM
And what does the RM (you did not tell us what STM32 model you have in mind) say, in Alternate function configuration sub-chapter of GPIO chapter, on read accesses to the input data register?
JW2015-11-05 09:49 AM
I'd expect GPIOx->IDR would work transparently.
2015-11-05 09:57 AM
Hello,
which processor family ?,
I am doing something comparable in STM32F4 with WS Signal on I2S interface.
I just read the PIN which is configured in AF-mode as normal Input pin with
HAL_GPIO_ReadPin().
If you have a look at the
Figure 25. Basic structure of a five-volt tolerant I/O port bit
in reference manual ,
you can see that the input signal goes parallel to the Alternate function input and the Input data register,
so I think, that you always can read the state of a Pin, even if it is in AF-mode.
best regards
2015-11-05 11:41 AM
Thanks for all your replies.
I will do just read pins.My processor is STM32F4 series