This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Digital Power library - Initialization Routine : dummy variable for pointer initialization

Hi,

In  "HVLLC-DPL-ISR.asm" file we can read :

; dummy variable for pointer initialisation
ZeroNet .usect "ZeroNet_Section",2,1,1 ; output terminal 1

In HVPSFB-DPL-ISR.ASM we can read :

; All Terminal modules initially point to the ZeroNet to ensure a known
; start state. Pad extra locations to accomodate unwanted ADC results.
ZeroNet .usect "Net_terminals",8,1,1

I take a look at the "Uninitialized Sections" section (currently section 2.2.1) of the "TMS320C28x Assembly Tools Guide":
http://www.ti.com/lit/spru513;

I don't really understand the purpose of ZeroNet.

Moreover I don't understand how I can know the size of ZeroNet to set in my own project.

This seems to depend on the number of modules used. How to calculate?

I found no information on the application notes

Could anyone give me an answer ?

Best regards

  • THe zero net is declared here

    ; dummy variable for pointer initialisation
    ZeroNet .usect "ZeroNet_Section",2,1,1 ; output terminal 1 in ISR.asm file

    The zero net value is zeroes here

    ZAPA
    MOVL XAR0, #ZeroNet
    MOVL *XAR0, ACC

    The init part of all the DP Lib macros point the pointers to zero net as a precuation, however in power systems pointing to a zero memory location may not be enough in most cases and the user must make sure the pointers are pointed to the correct location. 

  • Thank you for your answer.

    How do we know the size to set of the ZeroNet_Section? 

    Besause when reading different power system project, this size is different ?

    Does it depends of the number of modules ?

  • Joel,

    Ideally it should be just 2 C28x words i.e. 4 bytes, 

    Which projects is different? It could be because the programmer used it to initialize something else..?

    It does not depend on the number of DPLib modules used

  • Thank you,

    If you look at the HVPSFB  PCMC;

    In HVPSFB-DPL-ISR.ASM we can read :

    ; All Terminal modules initially point to the ZeroNet to ensure a known
    ; start state. Pad extra locations to accomodate unwanted ADC results.
    ZeroNet .usect "Net_terminals",8,1,1

  • Joel, 

    If you look in the init code for any of these macros it is only using one zeronet, 

    I think the comment is carried forward from an older implementation of the digital power library, however i will need to make sure with the owner of PSFB code to ensure nothing was missed here. 

    Regards

    Manish Bhardwaj