"Using the I2C Interface on the STM32 Devices' doesn't work when cpu=stm32h7A3Zx

Sysprogs forums Forums VisualGDB "Using the I2C Interface on the STM32 Devices' doesn't work when cpu=stm32h7A3Zx

Tagged: 

This topic contains 1 reply, has 2 voices, and was last updated by  support 1 day, 16 hours ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #32771

    milamber
    Participant

    I have created a new embedded project as described in Using the I2C Interface on the STM32 Devices – VisualGDB Tutorials

    example and using latest visualgdb version and using VS2022 selecting the  STM32H7A3Zx and the latest STM32 toolschain.

    The project fails to compile with the following errors when trying both the i2c Master and Slave code:

    Error ‘struct I2C_InitTypeDef’ has no member named ‘ClockSpeed’
    Error ‘struct I2C_InitTypeDef’ has no member named ‘DutyCycle’
    Error ‘I2C_DUTYCYCLE_2’ was not declared in this scope

     

    I was expecting the example to compile

    #32780

    support
    Keymaster

    Hi,

    This is to be expected, as our tutorial is for the STM32F407VG device. Copying device-specific code into a project targeting a different device will indeed most likely result in various errors.

    That said, different STM32 families use fairly similar APIs, so porting the code between them should be fairly easy, as long as you understand the differences between them. Looking through ST documentation/samples could be a good starting point.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.