Post Go back to editing

Error returned when trying to read the Power Quality library's "pack" file into the Keil development tool.

Category: Software
Product Number: ADE9430
Software Version: Power Quality Library 1.2.0

We are trying to set up the EVAL-ADE9430 to use the Power Quality library and following the instructions in Section 6.1 of the "ADSW-PQ-CLS Power Quality Library User's Guide".   We are trying to install the Power Quality library's "Pack" file into the Keil tool and getting the following failure (along with a screen capture): 

E: The latest release (0.1.0) in pack's pdsc (AnalogDevices.ADSW-PQ-CLS.pdsc) does not match pack version "1.2.0" 

E: pack version is not the latest in the pdsc file. 

The name of the "pack" file is:  AnalogDevices.ADSW-PQ-CLS.1.2.0.pack

The name of the "pdsc" file is: AnalogDevices.ADSW-PQ-CLS.pdsc

We  are not sure how to get around this, and need help. 

If this requires a newer PQL  library do we need to reapply for it or can we just download it? Thanks 

  • I dug a little deeper into what a "pack" file is and how it works. There is an accompanying  AnalogDevices.ADSW-PQ-CLS.pdsc  file that contains information about the pack file. One piece of information is the history of releases (see below). 

    You can see the order of releases is oldest to the latest. This appears to be wrong, according to "Open-CMIS-Pack". which states, "Contains brief information of the main changes in each release version of a Pack. The content is a string written between the opening and closing release tags. This list must be strictly ordered by version, with the highest release version at the top"  

    Link: https://open-cmsis-pack.github.io/Open-CMSIS-Pack-Spec/main/html/element_releases.html 

    - mike

  • Hi Mike,

    Thanks for bringing this to our attention.

    We will address the limitations of the two documentation and will upload the update it soon. We are looking to add a quick start guide to the document. 

    Please refer to the FAQ for some common issues and workaround : ADE9430 ADSW-PQ-CLS Power Quality Library Frequently Asked Questions - Documents - Energy - EngineerZone

    Can I please confirm that you are using Keil MDK version 5.34.

    Can you also change the file extension of the .pack file to .zip. After extracting load the .pdsc file directly into Keil.

    As a initial check, please flash the prebuilt .hex file provided within the pack folder. You can use STM32CubeProgrammer version 2.8.0 to flash the .hex file. You can download the cube programmer here : https://www.st.com/en/development-tools/stm32cubeprog.html.

    In the STM32CubeProgrammer window press connect button on the top right using default settings. After Connect turns green, go to the erase and programming window. After selecting the hex file, check the options “Verify Programming” and “Run after programming” and click the “Start Programming” button. Check the Log report for a successful message and a 100% green bar after programming. 

    After the prebuilt .hex file is flashed you can use a terminal emulation tool like Teraterm or Putty to interface with the Board. Please connect using the baud rate mentioned.

    You can try the commands in ADSW-PQ-CLS Power Quality Library User's Guide Pg 35 to verify the PQ Library.

    Regards,

    Aditya

  • Dear Aditya,

    Thank you for your response to this. I have a similar issue as Mike. I also followed the instructions in this follow up email with regards to putting the .pdsc file into Keil and I still had no success. what might be the problem. Another question will be, how to make use of user code together with the evaluation version of the PQ library?

  • Hi,

    I was able to unzip the pack file onto a fresh Keil installation and build the project. Please ensure that you are using Keil MDK 5.34.

    These are the steps that I followed.

    1. Unzipped the Power Quality library evaluation version downloaded from here .

    2. Double click on the .pack file within if uVision is added to path. Or open with Keil's PackUnzip.exe . Press next and accept License agreement. Project should automatically unzip and give a prompt "unzip successfully completed "

    3. Follow Examples Pg31 onwards of PQ Library user guide to configure uvison to run pqlib example. When prompted install missing packs.

    4. Navigate to Keil projects installation directory and open the pqlib_example.project.

    5. Make sure the project is user-writable. (run keil as administrator)

    5. Build in Keil with appropriate Device/Target . Then Flash the .hex file generated to board as shown is PQ user guide.

    Regards Aditya

  • Thank you for the detailed explanation. I am currently using Keil MDK 5.43. I am trying to access 5.34 version with no success. I am assuming the library example should work with newer versions of Keil MDK too

  • Hi Aditya,

    Thank you for trying this and your detailed instructions. Here is a snap shot of the version i am using which is 5.43.1.0. 

    As I had mention previously, we  have already downloaded the PQ Library back in 2024 but the version  is the same as yours.

    Questions: 

    Could the newer version of the microvision tool be checking more? 

    How can I get the particular version you are using? 

    If I already downloaded it and accepted the agreement do I need to accept it again to get a new version? 

    Can you share the PDSC file so I can compare it with mine?

    Thanks - mike

  • Hi Aditya,

    Can you retest using the latest release of the Keil Micro Vision tool (Version 5.43.1) to make sure it works?  The tool version you have listed is only available with a license. when you try to get 5.34 it is asking for a LIC or PSN?  

    The Section 8 "Examples"  of the ADSW-PQ-CLS Power quality library User's Guide  indicates that everything should work with Version 5.34 or later,  "The example projects have been developed for Keil Microvision for ARM (Version 5.34.0.0 or later) which can be downloaded from www.keil.com for evaluation

    It appears that other users are experiencing the same issue with the latest version of the Keil Micro Vision tool.

    1. Can you retest using the latest release of the Keil Micro Vision tool (Version 5.43.1.0) to make sure it works?  
    2. If it does not work on version 5.43.1.0 can you provide us with the 5.34.0.0  version of the tool that works? 

    - mike

  • Hi Aditya,

    Any updates related to the issues with it not working on newer versions? Is anyone looking into this for a fix since the 5.34 is no longer available and the PQ Library does not work with 5.43? 

  • Hi Mike,

    Thank you for your patience.

    The .pdsc file was not updated to be compatible with the newer versions of Keil.

    The quickest fix is to convert the .pdsc to .txt  and change the order of the versions to latest first.

    See below the start of pdsc file with the order changed. 

    I have evaluated the hex file generated in Keil5.43.1.0 in hardware and seems to be working fine.

    Thanks again for bringing this to our attention, we will add this fix to the downloadable software and update the documentation soon. 

    Many thanks,

    Aditya

    <?xml version="1.0" encoding="utf-8"?>

    <package schemaVersion="1.2" xmlns:xs="">www.w3.org/.../XMLSchema-instance" xs:noNamespaceSchemaLocation="PACK.xsd">
    <vendor>AnalogDevices</vendor>
    <name>ADSW-PQ-CLS</name>
    <description>Power Quality Library for ADI AFE Eval Pack</description>
    <supportContact>www.analog.com/.../supportContact>

    <license>license/2021-07-05-PQCLS Click Thru ELA.txt</license>

    <releases>
    <release version="1.2.0">
    - Power Quality Library 1.2.0 - Feature release of the product
    </release>
    <release version="1.1.0">
    - Power Quality Library 1.1.0 - Feature release of the product
    </release>
    <release version="1.0.0">
    - Power Quality Library 1.0.0 - Feature complete release of the product
    </release>
    <release version="0.2.1">
    - Power Quality Library 0.2.1 - Bugfix on Beta release of the product
    </release>
    <release version="0.0.2">
    - Power Quality Library 0.2.0 - Beta release of the product
    </release>
    <release version="0.0.1">
    - Power Quality Library 0.1.0 - Alpha release of the product
    </release>
    </releases>

    ....

  • Hi Aditya,

    Thank you we already tested this fix and others.  More importantly there were a few other issues identified with the help of Andreas from ARM support. You should probably contact them they were extremely helpful. Here is a rundown of the issue that were identified. To summarize the issues and fixes:

    • Analog devices released the Power Quality Library using a PACK file. At the time of release this PACK file and associated pdsu file worked with Keil uVision version 5.34. While the instruction indicate use 5.34 or newer the pack file was most likely never tested against the later releases of Keil uVision tool. During that time the Keil tool was updated to meet the latest requirements of the Open-CMSIS-Pack-Spec standards. The Power Quality Pack file's pdsu file was never updated to match the latest Open-CMSIS-Pack-Spec standards. This resulted in newer versions of Keil uVision tool failing while trying to load the PACK file.  I respectfully suggest Analog Devices start testing the Power Quality Library periodically  against the latest updates to the Open-CMSIS-Pack-Spec standards. The Open-CMSIS-Pack-Spec standards includes a PACK Verification tool that can be used to verify pack files. Anyway, I lost about 4 weeks debugging these issues. Only with the help of Andreas from ARM support were these issues resolved. 
    • There were issues with the pdsu file and the Pack Installer that were found by the ARM support Team.
      • FIX #1: The versions were not ordered from newest to oldest as dictated by the  Open-CMSIS-Pack-Spec standards.
      • FIX #2: The name of the pdsc file did not follow the latest naming conventions of the  Open-CMSIS-Pack-Spec standards.  See table below and the section "Filename Conventions": LINK REMOVED

                                                            

      • FIX #3: Even after fixing the two pdsu file issues the Keil uVision would still not load the PACK File. Andreas determined there were issues with the Pack installer included with the latest version of Keil uVision Version 5.43  that was missing the latest updates. Andreas pointed me to newer Pack Installer version here: LINK REMOVED If you go to the bottom of the page there was an attachment 4.3.0.zip
        • I downloaded it and copied it over the existing pack installer that was located in c:/Users/Demo3/AppData/Local/Keil_v5/Uv4/Packinstaller.exe.
        • I double clicked on the Pack file and was able to read in the Pack File

    While I am relieved the pack file is finally read into the Keil uVision tool I feel that the existing instructions included in the Power Quality Library are far from complete. I feel due to the terrible documentation my next step into getting this all working is just going to cost me time as well. Here is a list of issues that Analog Devices needs to address.

    1. There is an incomplete set of instructions in the Power Quality PACK File. There is nothing telling the new user to look there in the "DSW-PQ-CLS Power Quality Library User's Guide”.  You actually need to use 7-Zip to open the PACK file to get to the instructions that tell you how to read in the PACK File. Chicken before the egg? 
    2. Have a single set of complete instructions which walks the new user through the setup and explains the rationale behind each step. Currently, there isn’t a single set of instructions that a new user can follow to set up and use the EVAL-ADE9430 board. Instead, the user needs to access multiple vendors sites and documents and try and piece together a set of instructions. Instead have the instructions on the landing page of the EVAL board. The start up guide that is currently there has none of the information needed in it to set up the environment.
    3. The NUCLEO-144 STM32F413ZH  requires a special driver. None of the Analog Devices documentation mentions this. You’ll only know this if you go to the STM website and stumble on it like I did. It is not mentioned anywhere is the documentation for the EVAL-ADE9430.
    4. There is a link to a User Guide on the main page (above) that only shows you the options you have to power the board and how to select each one.
      1. It does not tell you how to hook up a console to it or the baud rate to use.  
      2. Once you figure out the baud rate,  you find there is a command line interface. When I first looked a this i had no idea on what it was. I assumed the EVAL-Board is preloaded with the Power quality library.? Tell users if this is the case.
      3. There are no examples or definitions on how to use the  commands or when to use them? There needs to be a better definition and actual examples of how and when to use these commands. Right now there is only an example of Calibration 
      4. ADSW-PQ-CLS> help
          COMMANDS:         PARAMETERS:
            help              <command>
            start             <num_cycles>
             setdisplay        <option>  <on|off>
             getdisplay        <option>
             setconfig         <option> <value1 value2...>
             getconfig         <option>
             setrtc            <Unix epoch time in milliseconds>
             getrtc
             version
             reset
             writeflash
             setreg            <register address> <register value>
             getreg            <register address>
             setcorrcoeffs     <Voltage/Current> <Nominal Frequency (50/60)> <Correction coefficients>
             calibrate         <channel> <expected_rms>
             sync              <time> <num_cycles>
             Command specific help is displayed  with help <command>
        ADSW-PQ-CLS> 
    5. The “ADSW-PQ-CLS Power Quality Library User's Guide” document in the PACK file has a number of inconsistencies, partial instructions and wrong instructions which is confusing to a new user. Note items ‘a’ through ‘h’ are basic feedback. Letters 'a' through 'h' are not serious but should be fixed. Starting with letter 'i' are the bigger issues.  that need to be addressed. 
      1. The diagram on page 8 of the PQ Library User's Guide has quite a few mistakes.
      2. It shows the processor board mounted on the top and rotated 180 degrees.
      3. It also shows the processor board having an Ethernet connector which adds to the confusion.
      4. It shows the USB connection from the computer going into the Ethernet connector not the usb port. That is why I was asking about the ethernet interface. We load all software to our boards using scp over Ethernet.
      5. Neither document mentions there is no Ethernet interface on the board.
      6. Neither document tells you which USB cable to use for the console. You cant trust the diagram because it wrong.
      7. There are no settings given for the console baud rate, etc…
      8. I found that the ST Processor board requires a USB Driver (ST-LINK). This is not in either document above. I stumbled on it while at the ST Site.
      9. Big problem: The instructions in section 6 tell you after setting up the Keil tool all you need to do is click on the Power Quality Pack file and it will automatically read it in and set up everything. This took so much time. 
        • Include instructions on PACK file verification
        • include some of the issues that the user may encounter while loading a PACK File.
        • Provide a link to the CMSIS-Pack web page as a help reference. 
        • Provide a link to the ARM developer web page as a help reference. 
      10. There are no instructions telling you how to build the code.
      11. There are no instructions telling you how to download the software to the board.
      12. There are no instructions telling you how to run the code or call different functions in the Power Quality library?
      13. Describe the different Example Projects that are included i the Power Quality library and dome use cases for them.
      14. Provide instructions on how to download and run the example projects?
      15. Provide instructions on how to and run the example projects?
      16. Describe how to set up and configure the EVAL-ADE9430 for the different measurement modes supported. include diagrams for each setup and connections for voltage and current measurements
        1. Single Phase AC (2 wire) 
        2. Three Single Phase AC (2 wire) (not sure if this is possible on the EVAL Board)
        3. 3-phase (3-wire) Measurement (AC_3DELTA) 
        4. 3-phase (4-wire) Measurement (AC_3WYE) 
    6. Periodically verify the PQL library

    7. Have a novice (not someone familiar with the tools) walk through and verify the instructions.

    While this post is lengthy it covers the issues that need to be fixed. if they are not fixed it will result is more lost time and frustration for users and lost time for you folks having to answer questions. 

    Best Regards 

    Mike