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.

Generating a soft reset on C6670

Hi experts,

 

I'm trying  to generate a soft reset at core 0 at the DSP.

And did the following:

 

hPllc = CSL_PLLC_open (0); // Opens PLLC Instance 0
// Unlock the kicker to ensure Boot configuration MMR is writeable
CSL_BootCfgUnlockKicker();
CSL_PLLC_setResetCfgReg
(
   hPllc, // hPllc Handle to the PLLC instance
   0, // wdType Reset type initiated by Watchdog timers. Set 0 for hard reset and 1 for soft reset
   0, // resetType Reset type initiated by RESET. Set 0 for hard reset and 1 for soft reset
   1 // pllCtrlRstType Reset type initiated by PLL controller. Set 0 for hard reset and 1 for soft reset
);

CSL_PLLC_setResetCtrlReg
(
  hPllc, // hPllc Handle to the PLLC instance
  CSL_PLLC_RSTCTRL_VALID_KEY, // key Key value to setup
  1 //swRstEnable Enable/disable software reset
); 

 

I thought  that after this code a soft reset would be occure and the DSP will do a reset.

 

But nothing happens the program was still running in a while  loop I inserted after the posted code.

 

I would be glad if someone could help me with these.

 

Regards Frank 

 

  • Frank,

    Your code looks like it ought to work. But if the setResetCtrlReg were working right, you would either get a soft or a hard reset, and you are getting neither.

    Do you have to use the BootCfgUnlockKicker for these registers? I am not saying you do not, I just do not know.

    Is your hPllc handle valid?

    Please read the PLLC registers after writing to them to see if the right values were written.

    Regards,
    RandyP

  • Hi Randy,

    thanks for your reply.

    the hPLLC handle points to 0x02310000, which should be the right destination.

    In the memory browser i see for the RSTCFG register the value 0x00002000, where bit 13 is one to set a softreset there.

    The value of the RSTCTRL register changed form 0x00010003 to 0x0001000C after setting the control register.

    The only thing there i don't understand correctly is the passage:

    The boot sequence is started after the system clocks are restarted. Because the configuration pins are not latched with
    a system reset, the previous values, as shown in the DEVSTAT Register, are used to select the boot mode.

    (out of chapter 7.4.3 Soft Reset (SPRS689D))

    Maybe I have there to set some registers?

    regards Frank

  • I'll try to clarify this.  When you're doing a Soft Reset, you're not re-latching the bootmode, it will use the existing bootmode.  This bootmode is in the DEVSTAT register.  It cannot be changed and is only latched in when you do a Power On Reset.  This documented in the Reset Controller Section of the Data Manual (Section 7.4 for C6670.)

    If you need to latch in a different bootmode for some reason, you will need to perform a Power on Reset of the device.

    Best Regards,

    Chad

  • Hi chad,

    the change of the bootmode is the purpose of the soft reset.

    The reason why I'm doing the soft reset is to fell back in the bootmode is was (EMAC-bootmode).

    The finally goal should be:

    1.   to initialize some hardware
    2. do a soft reset
    3. load more software via emac to the dsp.
    regards Frank
  • Frank,

    It sounds like you're wanting to do a boot with an IBL (intermediate boot loader.)  That is boot with something such as I2C ROM or even EMAC w/ a initial routine that configures certain peripherals such as DDR, which aren't configured by the devices BootROM code.  If this is the case, there is no need to perform a SW Reset after this code is initialized.  Instead you're code needs to jump to the section of the BootROM code of the desired bootmode at the end of the IBL.

    As I mentioned earlier there is no way to latch new bootmode w/o performing a PORz.  And there is no way to overwrite the latched bootmode value in the register.

    Best Regards,

    Chad