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.

CCS/PCM5142: PCM5142 issure

Part Number: PCM5142

Tool/software: Code Composer Studio

Hi 

I'm using C5545 DSP to program PCM5142 through I2C.

I made some code with Pure Path Studio about miniDSP and It is working well.

My question is the code's size is too long.

I attached.

In the  header file, I programmed all of the reg_value miniDSP_D_reg_values[]. 

Is there some way to reduce it?

I need to save all code, but I want to reduce. 

Thank you for the reading and please give some details. 

2388.base_main_Rate44_pps_driver.h 

  • Hi Minkyo,

    It is my understanding that the values stored in the registers are 0x00 by default, so I do not think you need to write them.  Unfortunately, my station is down so it will take a few days for me to confirm.  Could you try removing all the commands that only write 0x00 and verify that the process flow works correctly?

    Thanks,
    Paul

  • Any updates?

  • Hi

    Thank you for the reply.

    I just returned from vacation. 

    and I'm going to test and  update.

    Thanks

  • Hi

    I tested your opinion.

    But, it is not working well. 

    if I remove 0x00, the wave is broken. 

    Below image is when I tried removed code. 

    Input is sine wave. 

    And this is original code output wave

    Do you have other opinion? 

    Thank you 

  • Any updates?

  • Hi Minkyo,

    I was a little to liberal when I said that you could delete all the 0x00 commands.  Here are some memory saving strategies:

    1.  The PCM5142 has two sets of memories for coefficients, CRAM A and CRAM B.  You do not need to write to both of these unless you are trying to use adaptive memory to update the coefficients quickly (if you were toggling two different process flows).  By default, the PPS .h file write the same coefficients to both A and B.  In the attached document I have commented out the commands for CRAM B (pages 62-70).  This will save about 400 instructions.

    2388.base_main_Rate44_pps_driver CRAM-B commented.h

    2. You can write to the device in auto-increment mode.  This will allow you to write to a whole page in a single command.  This would save memory as the majority of register address would not need to be saved.

    3. You could remove the commands from the coefficient memory that are the same as the default values.  This would only apply to the values in pages 44-52 and 62-70.  This is pretty difficult to do, as you will need to compare each command from the default values.  These values can be found by doing a memory dump on the device that has just been reset.  I have attached the register dump for your reference.

    PCM5142 Register Dump.h

    Thanks,

    Paul