My SPI analyzer is different from what I send.
Dear ST Hello,
I am coming back to you because the my spi frame I am sending is not the same I am watching on the oscilloscope,
My spi configuration is:
/* USER CODE BEGIN SPI3_Init 0 */
/* USER CODE END SPI3_Init 0 */
/* USER CODE BEGIN SPI3_Init 1 */
/* USER CODE END SPI3_Init 1 */
/* SPI3 parameter configuration*/
hspi3.Instance = SPI3;
hspi3.Init.Mode = SPI_MODE_MASTER;
hspi3.Init.Direction = SPI_DIRECTION_2LINES;
hspi3.Init.DataSize = SPI_DATASIZE_8BIT;
hspi3.Init.CLKPolarity = SPI_POLARITY_LOW;
hspi3.Init.CLKPhase = SPI_PHASE_1EDGE;
hspi3.Init.NSS = SPI_NSS_SOFT;
hspi3.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_32;
hspi3.Init.FirstBit = SPI_FIRSTBIT_MSB;
hspi3.Init.TIMode = SPI_TIMODE_DISABLE;
hspi3.Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE;
hspi3.Init.CRCPolynomial = 10;
if (HAL_SPI_Init(&hspi3) != HAL_OK)
{
Error_Handler();
}
/* USER CODE BEGIN SPI3_Init 2 */I am sending this trame of CAFE :p
/* Buffer used for transmission */
uint8_t aTxBuffer[] = { 0xCA,0xFE,0xCA,0xFE,0xCA,0xFE,0xCA,0xFE,
0xCA,0xFE,0xCA,0xFE,0xCA,0xFE,0xCA,0xFE};In my analyzer I receive this:
This is the code for sending and receiving,
HAL_GPIO_WritePin(SPI3_CS_GPIO_Port, SPI3_CS_Pin, GPIO_PIN_RESET);
status = HAL_SPI_TransmitReceive(&hspi3, (uint8_t*)aTxBuffer, (uint8_t *)aRxBuffer, 16, 5000);
HAL_GPIO_WritePin(SPI3_CS_GPIO_Port, SPI3_CS_Pin, GPIO_PIN_SET);Could you please tell me we why I read 95 FD *16 instead of CA FA *16,
Thank you in advance,
S.Tarik,
