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.

TMS320C5517: UHPIA Register Settings

Part Number: TMS320C5517

Hi team,

Our customer is developing their system with TMS320C5517. Customer is studying Datasheet/TRM and asking us some inquiries.

1. Regarding C5517 TRM 16.3 section "UHPIA Register Settings ", this describes how UHPIAWL and UHPIAWU should be set, respectively. But, Customer wants to clarify "byte address ". I understand that this byte address means " CPU BYTE ADDRESS" in Figure 1-2. DSP Memory Map. And then, customer should set this calculated address(Double Word Address)to those registers. Is that correct ?

2. Regarding The device bootloader follows the following steps 8-(e) in C5517 Datasheet 6.4.1 "Invocation Sequence", "The entry point is located in the last block of SARAM, word addresses 0x27FFA and 0x27FFB." Does this word-address means "CPU WORD ADDRESS"?

In brief, Since 0x27FFA(Word Address) is 0x4FFF4(Byte Address), ( 0x4FFF4+0x80000)/4 = 0x33FFD is calculated.

Customer should set "UHPIAWU =0x3/ UHPIAWL to 0x3FFD" ?

Also , address of " entry point " is "CPU Byte address " ?

Can I have your Expert's comments on this, please?

Best regards,

Miyazaki

  • Hi, Miyazaki,

    The questions have been sent to hardware expert and waiting for his response.

    Rex 

  • Hi, Rex,

    Can we have Expert's comments on this, please?

    Best regards, Miyazaki

  • Hi Miyazaki-san,

    1)
    The calculation performed in C5517 TRM 16.3 section "UHPIA Register Settings" uses the same word address to byte address conversion that is described in TRM section 3.2.4.1 Start Address for On-Chip Memory.

    This DMA example uses the same SARAM block 0 (word address 00 8000h, byte address 0001 0000h)
    Because it is SARAM, add a value of 08 0000h (byte)
    Resulting in a byte address 0009 0000h
    This address is used by the DMA source (DMACHmSSAL) and dest (DMACHmDSAL) registers.

    Because uHPI UHPIAWL and UHPIAWU form a 32-bit address, this calculated byte address is divided by 4 (or right shifted 2 places).


    2)
    "In brief, Since 0x27FFA(Word Address) is 0x4FFF4(Byte Address), ( 0x4FFF4+0x80000)/4 = 0x33FFD is calculated."

    The math looks correct to me - you are correctly converting from word address to byte address, adding the SARAM offset of 0x80000, then dividing by 4.

    UHPIAWU =0x3/ UHPIAWL = 0x3FFD look correct for 0x27FFA(Word Address)

    Make sure to also copy the 0x1234ABCD after the entryPoint.
    The entry point is byte address. It must be greater than byte address 0001 0000h (SARAM0)

    The bootloader code that finds the entrypoint at this address is summarized below (not complete code)...

    #define SARAMSTARTADDRESS    0x10000
    Uint32 boot_signature = 0x1234ABCD;
    Uint32 * saramPtr = (Uint32*)0x27FFA;
    
    void boot_from_hpi(){
    	entry_point = uhpi_boot_bfm();
    
        // branch to the entry point, no return
        if (entry_point>=SARAMSTARTADDRESS)
        {
    		... (branch to entrypoint)
    	}
    }
    
    Uint32 uhpi_boot_bfm(void)
    {
    ...
    /* Generate the DSP to Host interrupt to make the BFM functional or to active UHPI host */    
    CSL_UHPI_REGS->HPICL = CSL_FMKT(UHPI_HPICL_HINT, GENERATE);
    
    /* Check for the Host to DSP interrupt -- End of BFM or UPHI host data transfer to the SARAM  */
    while(!CSL_FEXT(CSL_UHPI_REGS->HPICL, UHPI_HPICL_DSP_INT))
    {
    }
    ...
    if (saramPtr[1]!=boot_signature)    //(Uint32)0x1234ABCD at (Uint32*)0x27FFC
    {
        // boot from HPI is failed
        return 0;
    }
    
    return saramPtr[0];    //entryPoint at (Uint32*)0x27FFA;
    }

    Regards,
    Mark