Post Go back to editing

DM0 and DM1 after reset in ADAU1450

Hi all,

A while ago, I posted a question about the state of the RAM registers in the ADAU1450 after reset: DM0 and DM1 RAM content after RESET ADAU1450 

Dave responded that RAM is initialized just before the core starts running. That's what I found later also in the datasheet (i overlooked it at first...). But I don't think that both are correct.

I use a microcontroller to program the ADAU1450 via an I2C bus. I use the output xml file, generated by SigmaStudio and write all registers mentioned in that xml file. But for DM0 and DM1 I do it a little different. Because I use a lot of RAM for delay, that registers are all filled with zero's. And, according to the answers I got, I do not need to write zero's, so I skipped doing that when programming the DSP.

But after releasing the hibernate state, the DSP is giving strange signals :-) So, to test my theory, I wrote all zero's to DM0 and DM1 in the range SigmaStudio wrote in the xml outputfile and then I write the non zero values. With that sequence, the DSP is working fine.... So my conclusion is that RAM isn't initialized, or at least not at the time I expect.

Maybe someone can shine some light here? That would be appreciated :-) My program is running fine now, but I could speed up the bootprocess when omitting writing the zero's to DM0 and DM1 at startup (I2C isn't very fast...). OK, I could switch to SPI, but that isn't an option, I use more I2C chips :-)

Addition: I found the following in the datasheet under paragraph "

POWER SUPPLIES, VOLTAGE REGULATOR, AND HARDWARE RESET"

"Hardware Reset

An active low hardware reset pin (RESET) is available for externally triggering a reset of the device. When this pin is tied to ground, all functional blocks in the device are disabled, and the current consumption decreases dramatically. The amount of current drawn depends on the leakage current of the silicon, which depends greatly on the ambient temperature and the properties of the die. When the RESET pin is connected to IOVDD, all control registers are reset to their power-on default values. The state of the RAM is not guaranteed to be cleared after a reset, so the memory must be manually cleared by the DSP program. The default program generated by SigmaStudio includes code that automatically clears the memory."
Hmm, I was sure I read somewhere else in the same datasheet that RAM is cleared, but I can't find it anymore... So maybe I have to clear the RAM registers myself...

Thanks again for all your input

With kind regards,

Reini

Parents
  • Reini wrote:

    I have one question though: your program should run after pll is setup, can you help me a bit indicating where to run your program in the execution flow, output from SigmaStudio? I follow the xml file, generated by SigmaStudio and think, the RAM clearing code should be programmed before the node <Program Data> in the xml output file.

    Correct.

    But do I have to set the START_CORE, KILL_CORE and HIBERNATE registers?

    After writing the program data and making sure START_ADDRESS is initialized to zero, a rising edge (0 → 1 transition) on START_CORE is needed to start the program. There should be no need to set KILL_CORE to zero since it's edge-triggered (but no harm in doing so either). The program doesn't use interrupts so the START_PULSE and HIBERNATE registers are irrelevant to it.

    Once the program is done filling memory (which takes about 8192 words / 4 words/cycle / 147 MHz = 14 microseconds) it will terminate itself, hence there should be no need to kill it afterwards using a rising edge on KILL_CORE (but no harm in doing so either). Then continue with the rest of the programming.

    Where did you find the information to generate your code?

    Magic :-)

    Unfortunately there's no public documentation on the Sigma300 instruction set.

    Matthijs

Reply
  • Reini wrote:

    I have one question though: your program should run after pll is setup, can you help me a bit indicating where to run your program in the execution flow, output from SigmaStudio? I follow the xml file, generated by SigmaStudio and think, the RAM clearing code should be programmed before the node <Program Data> in the xml output file.

    Correct.

    But do I have to set the START_CORE, KILL_CORE and HIBERNATE registers?

    After writing the program data and making sure START_ADDRESS is initialized to zero, a rising edge (0 → 1 transition) on START_CORE is needed to start the program. There should be no need to set KILL_CORE to zero since it's edge-triggered (but no harm in doing so either). The program doesn't use interrupts so the START_PULSE and HIBERNATE registers are irrelevant to it.

    Once the program is done filling memory (which takes about 8192 words / 4 words/cycle / 147 MHz = 14 microseconds) it will terminate itself, hence there should be no need to kill it afterwards using a rising edge on KILL_CORE (but no harm in doing so either). Then continue with the rest of the programming.

    Where did you find the information to generate your code?

    Magic :-)

    Unfortunately there's no public documentation on the Sigma300 instruction set.

    Matthijs

Children
No Data