Skip to main content
Visitor II
February 11, 2024
Question

Configuring STEVAL MK1221v1 with the black pill stm32f401ccu6

  • February 11, 2024
  • 1 reply
  • 872 views

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);

    This topic has been closed for replies.

    1 reply

    Technical Moderator
    February 13, 2024

    Hi @asatwik218 ,

    Can you share your schematic with the actual connections? Thanks