Question
G431 - SPI brings big noise on the MISO
I have tried normal GPIO setting with pullup/down and setting AF5, but it just stays the same level, but its shape changes (see additional pictures).
I have just connected the probes. (MISO is blue)
// *** SPI ***
// NSS (PB12)
GPIO_InitStruct.Pin = GPIO_PIN_12;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
GPIOB->AFR[1] |= (GPIO_AFRH_AFSEL12_2 | GPIO_AFRH_AFSEL12_0); //AF 5
// SCK (PB13)
GPIO_InitStruct.Pin = GPIO_PIN_13;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
GPIOB->AFR[1] |= (GPIO_AFRH_AFSEL13_2 | GPIO_AFRH_AFSEL13_0); //AF 5
// MISO (PB14)
// GPIO_InitStruct.Pin = GPIO_PIN_14;
// GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
// GPIO_InitStruct.Pull = GPIO_PULLDOWN; //TODO: remove?
// GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
// HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
GPIOB->AFR[1] |= (GPIO_AFRH_AFSEL14_2 | GPIO_AFRH_AFSEL14_0); //AF 5
// MOSI (PB15)
GPIO_InitStruct.Pin = GPIO_PIN_15;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
GPIOB->AFR[1] |= (GPIO_AFRH_AFSEL15_2 | GPIO_AFRH_AFSEL15_0); //AF 5
