Post Go back to editing

AN9541-BATImpedance integration with other controllers (no ADICUP3029 CPU)

Thread Summary

The user encountered issues integrating AD5940/AD5941 BAT Impedance application code with a Linux-based system, including missing jumpers (JP7, JP8, JP9) and incomplete SDK documentation. The final solution involved installing JP7 and JP9, rewriting SPI drivers to handle 16-bit and 32-bit register access correctly, and ensuring proper sequencer and interrupt configurations. The AD5940/AD5941 datasheet and SDK were criticized for lacking clarity and completeness, particularly regarding register definitions and silicon revisions.
AI Generated Content
Category: Software
Product Number: EVAL-AD5941BATZ, AD5941, AD5941, AD5941
Software Version: 1

Hi Akila, and others in you team.
I am trying to integrate the BAT Impedance application code examples with my Linux based system (no ADICUP3029 CPU)
I

Edit Notes

After further investigation progress has been made see latter posts
[edited by: CAMTEK at 11:03 AM (GMT -5) on 28 Nov 2025]
Parents
  • SUMMARY

    1. MY BASIC SYSTEM IS NOW WORKING WITH MY MODIFIED UPDATED CODE AND HARDWARE MODIFICATIONS AS PREVIOUSLY DESCRIBLED ABOVE. FINALLY, NOW I CAN CONTINUE WITH MY INTENDED APPLICATION PROJECT AFTER LOOSING ~2 MONTHS WITHOUT ANY ADI HELP.

    2. ADI ENGINEER ZONE FAILED TO PROVIDE ANY DECENT RESPONSE ( EXCEPT FOR IVAN's SHORT START) WITHIN A REASONABLE TIME AND THEY COULD HAVE EASILY HELPED ME SOLVE THESE ISSUES MUCH FASTER WITH SOME OFFICIAL RESPONSES AND POINTING ME IN THE RIGHT DIRECTION. 

    3. ADI’s AD5940 SDK EXAMPLES ARE CONFUSING WITH LITTLE OR NO DOCUMENTATION. THERE ARE NUMEROUS CODING ERRORS WHICH I AM STILL WORKING THROUGH.

    4. THE AD5940 DATASHEET IS A PATHETIC EXAMPLE OF A TECHNICAL DOCUMENT. I HAVE HAD TO EXTRACT MY OWN REGISTER TABLE DEFINITIONS AND CREATE NEW ad5940.c/.h files

    5. I PURCHASED TWO EVAL-AD5941BATZ DEVELOPMENT BOARDS ( BOUGHT THE 2ND ONE BECAUSE I THOUGHT THE FIRST ONE WAS FAULTY) BUT NOW REALISE THOSE BOARDS WERE SHIPPED INCOMPLETE WITHOUT NEEDED HEADERS AND JUMPERS AND THE EXAMPLE CODE WOULD NOT HAVE MADE IT FUNCTION. THIS HAS GIVEN ME MANY HOURS OF LOST TIME AND EXPERIENCE.  I THINK ADI SHOULD RIGHTLY REFUND/COMPENSATE/REPLACE THOSE BOARDS OR AT THE VERY LEAST SEND ME SOME NEW EVAL BOARDS LIKE THE MULTI-CHANNEL IMPEDANCE BOADS THAT I CAN TEST AND EVALULATE.

    6. TO MAKE THE EVAL-AD5941BATZ DEVELOPMENT BOARDS WORK JUMPERS JP7 and JP9 MUST BE INSTALLED.  JP8 IS NOT USED AND PERFORMS NO USEFUL FUNCTION AT ALL. IF JP9 IS LEFT OUT (AS IS THE CASE WHEN THE BOARDS ARE SHIPPED) THE U2 MUX INPUT DEFAULTS TO HIGH WHICH MEANS ALL BATTERY IMPEDANCE MEASUREMENT RESULTS ARE SIMPLY THE IMPEDANCE SCAN OF THE INTERNAL RCAL, YOU WILL JUST GET FAKE RESULTS OF 50 MILLIOHMS. IF YOU INTEND TO USE THIS AD5940 CHIP WITH YOUR OWN MCU, BE WARNED THAT IT HAS A CONFUSING SET OF SPI COMMUNICATION RULES AND IF YOU INTEND TO USE THIS DEVICE WITH A DIFFERENT CPU CONTROLLER (OTHER THAN THE ADI (ADuCM3029) YOU NEED TO REWORK/MODIFY THE DRIVERS AND THE SDK EXAMPLE CODE TO MAKE THINGS WORK AS THEY SHOULD. 

    GOOD LUCK,
    REGARDS





  • Hi Collin,

    I'm one of the assigned software maintainers of the AD5940 driver library and example codes.
    It saddens me to know about this and I got informed of this too late.

    The AD5940 driver library and example codes has been designed for use only with the ADICUP3029 (and ADuCM355). This caused the challenge to be ported and used for Linux.

    You may ask the product applications team on technicalities of AD5940 measurements, but at most, I can only suggest that the load be tested first on the default ADICUP3029-AD5940 setup to be used as reference for measurement results.

    Additionally, there is a No-OS version of the AD5940 driver. I believe the ADI's No-OS framework could help easier porting. This is incase this would be helpful.
    No-OS Driver: github.com/.../ad5940
    Example usage: github.com/.../cn0565

    Kind regards,
    Jayr

  • Thanks JayrPerez,

    Yes I already knew that all the SDK examples were designed for use only with the ADICUP3029 (and ADuCM355) that was not my concern. I also looked at the "No-OS version" of the AD5940 driver and did not find any of it useful to me.

    Don't be concerned, I have now solved all the driver issues and problems with the ADI SDK code examples and have successfully integrated the AD5940 into my Linux O/S platform.

    Collin

Reply
  • Thanks JayrPerez,

    Yes I already knew that all the SDK examples were designed for use only with the ADICUP3029 (and ADuCM355) that was not my concern. I also looked at the "No-OS version" of the AD5940 driver and did not find any of it useful to me.

    Don't be concerned, I have now solved all the driver issues and problems with the ADI SDK code examples and have successfully integrated the AD5940 into my Linux O/S platform.

    Collin

Children
No Data