Post Go back to editing

AD74413 and STM32

I am trying to connect AD74413 to STM32F405 and am having trouble writing my code correctly in the function - spi_write_and_read () No-OS Software Drivers.

Maybe somewhere there are examples of using these drivers in conjunction with STM32.

Best regards, Dmitry

Parents Reply Children
  • Hi. me again . 

    I finally could communicate the AD74413 (AD-SWIO 2 Click) with my mcu (STM34L series + CubeIDE + HAL stm32).
    I'm configuring the AD in voltage input mode (0-10V) and my read mode its READBACK.

    But when i try to convert the ADC data to voltage the applying the equation [VDC = VMIN + (ADC CODE/65,535) × Voltage Range] I dont get the expected result

    for example when apply 2VDC in Channel 0 i Get 0x1AB7 = DEC 6823

    VDC = 0 + (6823/65535)x10 = 1,04Vdc

    When apply 3.2V --> 0x2A0D -->DEC 10765.

    VDC = 0 + (10765/65535)x10 = 1,64Vdc

    if i chance the Voltage Range to 20. the VDC result ist Ok.

    VDC = 0 + (6823/65535)x20 = 2,08Vdc

    VDC = 0 + (10765/65535)x20 = 3,28Vdc

    ist that normal?

  • Hello,
    I'm trying to connect the AD-SWIO 2 click to an STM32F4, I'm trying to configure one of the channels as input voltage mode and read the data as you did, can you help me with your code? Thank you.