2023-12-18 03:15 AM - edited 2023-12-18 05:16 AM
i am using IMU ICM-42688-P sensor communicating with stm32 GOB1CET6N board using spi protocol. but, i am not able to read WHO_AM_I Value for more than 2MHz frequency. i have tried all settings but nothing is working. datasheet of sensor says SPI works on upto 24 MHz frequency.
i have given my main.c file in attachments.
Solved! Go to Solution.
2023-12-18 05:17 AM
Make sure your pins are initialized in high frequency mode. This will be done within the HAL_SPI_MspInit function.
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
If that doesn't help, you may just be running into signal integrity issues. Long jumper wires are going to top out in the MHz range. You can shorten the wires to try to help.
2023-12-18 05:17 AM
Make sure your pins are initialized in high frequency mode. This will be done within the HAL_SPI_MspInit function.
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
If that doesn't help, you may just be running into signal integrity issues. Long jumper wires are going to top out in the MHz range. You can shorten the wires to try to help.
2023-12-20 05:52 AM
Thank you so much it worked according to your suggestions.