cancel
Showing results for 
Search instead for 
Did you mean: 

Configuring STEVAL MK1221v1 with the black pill stm32f401ccu6

asatwik218
Associate

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, &reg, 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);

1 REPLY 1
Federica Bossi
ST Employee

Hi @asatwik218 ,

Can you share your schematic with the actual connections? Thanks

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.