Post Go back to editing

AD74413 and STM32

Hello.
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
  • Hello,
    unfortunately we don't have any example code written for STM32 microcontrollers.

    But we have some internal examples written for ADuCM4050, but we are not licensed to share the whole project.
    Is there any specific function in the online AD74413.x files that you are interested in? I could possibly share snippets of those functions usage.

    Regards,
    Arnost

  • Thanks for the answer!
    We are only interested in the sections of code for configuring and retrieving data.
    We ourselves are electronics engineers and it is rather difficult for us to port such a driver. There is especially a danger that after transferring the code to a microcontroller with a cheaper price, there may not be enough memory ...

    Best regards, Dimtri.

  • Hi,

    sections about configuring and retrieving data can be found at our drivers (74413 Evaluation software https://www.analog.com/media/en/evaluation-boards-kits/evaluation-software/ad74413r.zip). You can take same steps as in driver to configure or arrange your data.

    Let me especially highlight following functions, it is good place where to start:

    static bool_t BA_Validate(uint8_t *pFrameBA, uint8_t nAdr)

    static void BA_Create(uint8_t *pFrameBA, uint8_t nAdr, uint16_t nData)

    tad74413Result ad74413API_ReceivedSPIPacket(ad74413_API_REF anAPI_Ref, tSPITransactionInfo *pExChng)

    static void SPI_AddWriteFrame32(  ad74413_API_Ptr API_Ptr,  tSPITransactionInfo *pExChng, uint8_t Adr, uint16_t Data)

     

    I am not sure, if this answers your question, if not, let me know what else I can help you with.

     

    Regards,

    Arnost

  • Thanks for the answer!
    I found examples for STM32 but for a different ADC.
    wiki.analog.com/.../ad7124-stm32
    But as I did not try to connect the AD74413 and get the answer, everything does not work ...
    For testing, I connected a flash memory to this SPI and wrote and read data perfectly into it. But AD74413 doesn't want to work ...
    Prompt the correct package so that I can test the AD74413. For example "SILICON REVISION REGISTER". Maybe I'm counting the checksum incorrectly or doing something wrong.
    Thank you in advance!
    With respect, Dmitry.

Reply
  • Thanks for the answer!
    I found examples for STM32 but for a different ADC.
    wiki.analog.com/.../ad7124-stm32
    But as I did not try to connect the AD74413 and get the answer, everything does not work ...
    For testing, I connected a flash memory to this SPI and wrote and read data perfectly into it. But AD74413 doesn't want to work ...
    Prompt the correct package so that I can test the AD74413. For example "SILICON REVISION REGISTER". Maybe I'm counting the checksum incorrectly or doing something wrong.
    Thank you in advance!
    With respect, Dmitry.

Children