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.

Power consumption on C5505 based design changing 20mA by adding 'no-op' instructions.

Hi,

 

I am confused by the power consumption on one of our C5505 based board. We have the board connected to PC with XDS100v2 USB emulator. The board is powered by a 3.7V power supply. The supply current normally is 115mA @ 3.7 V. However, if we add some 'asm("   nop");' into the code, the supply current will show 135mA @ 3.7V. Has anyone ever encounter this kind of symptom? CSL-3.3 and 2.5 both have the same symptom under CCSv5.4.

 

Thanks,

 

Jack

  • Hi,

    The supply current will shift from 135mA@3.7 to 115mA@3.7 after the following code inside the function 'check_boot_record'.
    ATA_readSector(boot_record_sector + l_reserved_sectors , pAtaDrive, pAtaDrive->_AtaWriteBuffer, 0);

    But, the supply current will only shift to 115mA if the whole code including some 'nop' instructions.

    Has anyone ever encountered this symptom before? Both CSL-3.3 and 2.5 have the same symptom under CCSv5.4.

    Thanks.

  • Hi Jack,

    Check the assembly output of the build to compare the differences in output.

    Or set a breakpoint at this function and view the dissassembly from CCS. ASM single step into the function to compare each function call.

    Hope this helps,
    Mark 

  • Hi Mark,

    Thanks for the suggestion. The symptom was caused by one uninitialized variable in the ATA buffer.

    Jack

  • FYI:

    There is another board may down shift current by ~65mA, if the variable in the ATA buffer is not initialized properly.

    If there is any TI guy can explain this symptom,  I would like to know the reason behind this.

    Thanks,

    Jack

  • Hi Jack,

    Which variable in the ATA buffer is triggering the change? Can you copy and paste code or variable watch window?

    Regards,
    Mark

  • Hi Mark,

    In the sample code ccs_v4.0_examples\mmc_sd\CSL_MMCSD_SdCardFSExample\csl_mmcsd_atafs_example.c line 417

        /* Set the temp write buffer */
        pAtaFile->pDrive->_AtaWriteBuffer = AtaWrBuf;


    These two lines have been properly moved to line 376 in the sample code ccs_v5.0_examples.

    as

        /* Set the temp write buffer */
        gpstrAtaDrive->_AtaWriteBuffer = AtaWrBuf;

    Thanks,

    Jack

  • Hi Jack,

    I see it now.

    Make sure to use the latest CSL (3.03) - there is no more directory called CCS4 as the CSL is now supporting CCS5 only.

    Get it here: http://www.ti.com/tool/sprc133

    I confirmed that CSL3.03 is using gpstrAtaDrive->_AtaWriteBuffer = AtaWrBuf;

    c55xx_csl_2.50:
        /* Set the temp write buffer */
        pAtaFile->pDrive->_AtaWriteBuffer = AtaWrBuf;

    c55xx_csl_3.00:
        /* Set the temp write buffer */
        pAtaFile->pDrive->_AtaWriteBuffer = AtaWrBuf;

    c55xx_csl_3.01:
        /* Set the temp write buffer */
        pAtaFile->pDrive->_AtaWriteBuffer = AtaWrBuf;

    c55xx_csl_3.03:
        /* Set the temp write buffer */
        gpstrAtaDrive->_AtaWriteBuffer = AtaWrBuf;


    Hope this helps,
    Mark

  • Hi Mark,

    Actually, if I put the following codes in program will show the ~60mA down shift on power consumption.

    Uint16 *memory_pointer;

    memory_pointer = (Uint16 *) 0x296C83;

    *memory_pointer = 0x1220;        // ====> after this line, ~60mA down shift

    I think you can explain this symptom.

     

    Thanks,

     

    Jack