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.

How do i cause the DSP to reset?

Hello
i need to allow the user to initiate reset on the DSP,  Using the WD is not an option as i need to know after the reset whether it was HW reset (power down) WD rest or software reset.
Adi 

PS
im using the 28035

  • Hi!

    If I have understood you right you should do a control record in the some flash memory area before program reset. After rebooting you can read this record from flash and define what kind of reset have been : HW or SW. May be I don't understand something in your task.

    Regards,

    Igor

  • Sadly it is a very low cost application and i dont have external EEPROM .
    There are 2 isues that i have :
    1) Generating SW reset
    2) Differentiating between reset by HW and reset by SW but between them and  WD reset.

    To fulfill the second demand i cant use WD to generate SW reset, so the question is is there a way to generate SW reset command without using the WD mechanism?


     

  • Hello Adi

    Why don't you jump to the reset vector location?

    As for differentiating: the way to distinguish HW and WD resets usually presents in the TI MCUs. Read WD unit datasheet to clear up this.

    For the software reset you need to develop your own differentiation method. For example you can write some value to the predefined memory location right before SW reset and then read it after start of the your program. Then you need to clear this location. 

    You don't need to use any kind of flash memory because in the case of SW reset your device will be powered so the memory content will not be corrupted. 

    Regards

     

     

     

     

     

  • Adi Ingel said:
    Sadly it is a very low cost application and i dont have external EEPROM .
    There are 2 isues that i have :
    1) Generating SW reset
    2) Differentiating between reset by HW and reset by SW but between them and  WD reset.

    To fulfill the second demand i cant use WD to generate SW reset, so the question is is there a way to generate SW reset command without using the WD mechanism?

    Using the watchdog is the best choice because it will perform a reset of just about everything (minus the PLL setting) on the device.   Jumping to the reset vector will, on the other hand, not reset peripheral registers. 

    The RAM contents on a 28035 won't be disturbed (except for the small portion used by the boot ROM during boot).  

    As previously suggested - You could use the WDFLAG bit in the WDCR register to determine if the reset was caused by the watchdog and if so, check for a signature you wrote to RAM that will tell you it was software initiated.  I would then write another signature to RAM after the check.  

    www.ti.com/lit/SPRUGL8

    Regards

    Lori

  • Hi I have tired jumping to Reset vector but it seems that its operation is inconsistent and i some times land in illegal ISR and find my self in WD reset, is there a sample code of Jump to reset vector?

    The differentiation betwine HW and WD is also problematic but we are working to make a HW change to fix it. (TI needs the Reset pin to be heald longer then 512 counts ro be recognized as HW reset and not WD reset)

     

  • Hi i have tried jumping to reset but some how it befaves differently from time to time. some time it works fine and some time it jumps to ileagal interrupt and resets on WD
    Is there any documentation on how it should be performed?
    i have tried :asm(" LB 3F7FF6h ");

  • Adi Ingel said:
    Hi i have tried jumping to reset but some how it befaves differently from time to time. some time it works fine and some time it jumps to ileagal interrupt and resets on WD
    Is there any documentation on how it should be performed?

    If you simply jump to the entry point of your algorithm all of the peripherals etc will still be running while you try to setup the device.  If an interrupt comes in, for example, just after you start initializing the PIE you could go off in the weeds.

    I would suggest at a minimum first shutting down all of the interrupts before jumping to the entry point.  You may also want to try turning off the clocks to the peripherals.

    A watchdog reset is more consistent since it will also reset all but just a few registers to their default values.

    -Lori

  • Thank you Lori, both your ideas work great!

  • hii am so urgent. please help me.i am using dsp 28335.
    i am planning to use flash sector A, flash sector c.
    Application is stored in the FLASH sector A .
    uploader is stored in th falsh sector c.
    when application project jump to the uploader project, i encoutered illegla_ISR.
    Follwoing is the code to jump FLASH sector C(c_int00 of flash sector c)

    switch(Decode_cmd) { case MSG_ID_UPLOAD_READY: {
    DELAY_US(500000); Decode_cmd = 0; ack_plus(0x87);
    break; } case MSG_ID_UPLOADING: {
    if(finished_storing_image_in_fpga == 0) {
    write_512byte_to_flash(); } else
    { Program_IMG_flash(); Decode_cmd = 0;
    } DELAY_US(400000); break; }
    case mission_mode: { Decode_cmd = 0; DINT;
    IER = 0x0000; IFR = 0x0000; DisableDog();
    asm(" LB 0x0032894D"); break; }
    0x0032894D is the c_int00 of flash sector c

    Following is the uploader project(flash sector c) map file

     

    BOOT LOADER PARAMETERS
    Table Address: 0x00328000, PAGE 0 Entry Point: 0x0032894d (_c_int00)
    OUTPUT TRANSLATION MAP
    --------------------------------------------------------------------------------
    00328000..0032bfff Page=0 Memory Width=16 ROM Width=16 "FLASHC"
    --------------------------------------------------------------------------------
    OUTPUT FILES: .\upload_final.hex [b0..b15]
    CONTENTS: 00328000..00329254 BOOT TABLE
    .cinit : dest=00329136 size=0000007b width=00000002
    .text : dest=00328000 size=00000ab7 width=00000002
    codestart : dest=0032be01 size=00000002 width=00000002
    ramfuncs : dest=00328ab7 size=0000001f width=00000002
    csmpasswds : dest=0033fff8 size=00000008 width=00000002
    csm_rsvd : dest=0033ff80 size=00000076 width=00000002
    .econst : dest=00329036 size=00000100 width=00000002
    Flash28_API : dest=00328ad6 size=00000560 width=00000002
    00329255..0032bfff FILL = 0000ffff

    follwoing is the hex.cmd file for making hex file of Flash sector c

    UPLOAD.out /* input COFF file */
    --map UPLOAD.map /* create a hex map file */
    -a /* create ASCII image */
    --image /* Create a memory image (no discontinuities) */
    --order=LS /* little endian */
    --zero /* reset address origin to 0 for output file(s) */
    --memwidth 16
    --boot /* create a boot table for all initialized sects */
    --entrypoint=_c_int00ROMS{
    FLASHC: org = 0x328000, len = 0x4000, romwidth = 16, files = {.\upload_final.hex}, fill = 0xffff
    }

  • First:

    Make sure the code _c_int00 is well.

    Second:

    asm(" LB 0x0032894D"); this way of jump is bascially right, but i'm not sure it's perfectly .

    try the follow #define JMP_CINT (*(void (*)(void)0x0032894D)() 

    replace asm(" LB 0x0032894D"); with JMP_CINT

    it may work!

    SCOTT