2024-02-11 01:50 AM
I have been trying to configure the steval mk1221v1 which is a breakout board for the lsm6dso32x imu sensor using spi 4-wire interface but can't make to work. I am not sure if i am making the right connections. I am sure I have connected the scl, sda, sdo and cs correctly but not sure what needs to be done with the vddio , sdx, scx pins. Do they need to be connected to 3.3v or left hanging. Moreover there are 2 sets of sdx and scx pins the reason for which i dont understand. Any help would be good. Thanks!
Here's the code snippet for accessing the who_am_i register.
uint8_t reg = WHO_AM_I | 0x80 ;
HAL_GPIO_WritePin(LSM_CS_GPIO_Port, LSM_CS_Pin, GPIO_PIN_RESET);
HAL_SPI_Transmit(&hspi1, ®, 1, HAL_MAX_DELAY);
HAL_SPI_Receive(&hspi1, &ret, sizeof(reg), HAL_MAX_DELAY);
HAL_GPIO_WritePin(LSM_CS_GPIO_Port, LSM_CS_Pin, GPIO_PIN_SET);
2024-02-13 06:11 AM
Hi @asatwik218 ,
Can you share your schematic with the actual connections? Thanks