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.

  • Resolved

Compiler/MSP430G2544: Flash MSP430 using SBW using AM57xx

Expert 2090 points

Replies: 27

Views: 579

Part Number: MSP430G2544

Tool/software: TI C/C++ Compiler

Hello,

I have connected MSP430 with AM57xx using SBW interface. Is there any methods/utility present to flash MSP430 from AM57xx?

Regards,

Prerak

  • In reply to Lixin Chen1:

    Hello,

    Referring "1.3.1.1 MSP430 Devices With Shared JTAG Pins"(Figure 2) from slau319.

    Attached my signal for your referance.

    Regards,

    Prerak

  • In reply to Prerak Patel:

    Hi,

    1. Please make sure which communication you want to use, JTAG or SBW?

    2.The entrance sequence you choose seems belong to BSL. Here is the picture you can refer to:

    3. For the related code, you can refer to Project:Replicator430, in http://www.ti.com/lit/zip/slau320.

    Eason

    If the post helped solve your issue, please click on the  'This resolved my issue'  button.

  • In reply to Eason Zhou:

    Hi,

    Thanks for your input.

    I want to use SBW.

    In slau320 there are multiple projects.

    I am using msp430g2544. which project shouls i take as the referance ?

    Regards,

    Prerak

  • In reply to Prerak Patel:

    Hi,

    As msp430g2544 has a CPU with 16bit address space, You can refer to Project:Replicator430, in http://www.ti.com/lit/zip/slau320.

    About the software description, you can refer to chapter 3 in UG: http://www.ti.com/lit/ug/slau320ag/slau320ag.pdf

    Eason

    If the post helped solve your issue, please click on the  'This resolved my issue'  button.

  • In reply to Eason Zhou:

    Thanks Eason for helping us.

    I have refereed software as per your suggestion.

    I am not able to get JTAGID after entry sequence. I have verified entry seq. on DSO. and it seems like correct.

    Attached DSO image for your ref.

    Any suggestion for this ?

    Regards,

    Prerak

  • In reply to Prerak Patel:

    Hi,

    1. You must do fuse check before JTAG access is granted. See from your wave you haven't done that. Please see the code in Replicator430 as reference:

    //----------------------------------------------------------------------------
    //! \brief Function to start the JTAG communication
    static word StartJtag(void)
    {
        // drive JTAG/TEST signals
        DrvSignals();
        MsDelay(10);             // delay 10ms
        
        if(INTERFACE == SPYBIWIRE_IF)
        {
            EntrySequences_RstHigh_SBW();
        }
        else if(INTERFACE == SPYBIWIREJTAG_IF)
        {
            EntrySequences_RstHigh_JTAG();
        }
        else // JTAG_IF
        {
            SetRST();
            SetTST();
        }
        
        ResetTAP();  // reset TAP state machine -> Run-Test/Idle
        
        if(INTERFACE == SPYBIWIRE_IF)
        {
            CheckJtagFuse_SBW();
        }
        else
        {     
            CheckJtagFuse_JTAG();
        }    
        return IR_Shift(IR_BYPASS);
    }

    2. There is still a long way before you can use AM57xx to program MSP430. You need to move all the necessary low level code from Replicator430 to yours. 

    Eason

    If the post helped solve your issue, please click on the  'This resolved my issue'  button.

  • In reply to Eason Zhou:

    Hi,

    DrvSignals();
    MsDelay(10); // delay 10ms

    ClrTST();
    usDelay(800); // delay min 800us - clr SBW controller
    SetTST();
    usDelay(50);

    // SpyBiWire entry sequence
    // Reset Test logic
    ClrSBWTDIO(); // put device in normal operation: Reset = 0
    ClrSBWTCK(); // TEST pin = 0
    MsDelay(1);
    // wait 1ms (minimum: 100us)
    // SpyBiWire entry sequence
    SetSBWTDIO(); // Reset = 1
    SetSBWTCK(); // TEST pin = 1
    MsDelay(20);
    // initial 1 SBWCLKs to enter sbw-mode
    SetSBWTDIO(); // Reset = 1
    usDelay(60);
    ClrSBWTCK();
    usDelay(1);
    SetSBWTCK();
    MsDelay(5);

    ResetTAP(); // reset TAP state machine -> Run-Test/Idle
    //TRIGGER;
    JtagId = IR_Shift(IR_BYPASS);

    Above is my entry seq. In which i have done the fuse checking.

    Regards,

    Prerak

  • In reply to Prerak Patel:

    Prerak Patel

    I am not able to get JTAGID after entry sequence. I have verified entry seq. on DSO. and it seems like correct.

    And what is JTAGID value? Something or nothing? Check on DSO value when RESET line (SBW_DIO) is changing direction, master input / target output.

    This is my SBW flasher entry (get device) sequence...

            ; Default value

            TCK1CLR               ; TEST = 0

            TD1SET                ; RESET = 1

            ; Change TCK / TD direction to output

            TD1OUT                ; RESET = 1

            TCK1OUT               ; TEST = 0

            ; SBW mode enter

            TCK1SET                ; TEST = 1

            mov.w #2, R15          ; Delay 200 us
            call #Delay100us

            TCK1CLR                ; TEST = 0

            TCK1SET                ; TEST = 1

            ; SBW mode is active now

            ; Reset JTAG FSM

            mov.w #7, R15

    SbwEnt2 cmp.w #1, R15
            jne SbwEnt4
            
            TD1CLR
    SbwEnt4 TCK1CLR
            TCK1SET

            TD1SET
            TCK1CLR
            TCK1SET
            TDO1SBW

            sub.w #1, R15
            jnz SbwEnt2

            ; JTAG FSM is in Run-Test/IDLE

            IHS_BYPASS

            ; Fuse check

    ...

    Log...

    -------- GetDevice --------
    #0 00000001 0000000000010000 89
    Fuse 0581 0581 0581 0581 0581 0581 0581 0581 Sync 2691 Reset

    JTAGID from device should be correct also before fuse check.

  • In reply to zrno soli:

    Hello,

    I am getting JTAG ID as 0.

    I have verified your sequence. and observed one thing,

    while passing 0xff to shift register i am getting clock low for more then 100 us. Because I am unable to provide delay of less then 60us in am5726.

    Is this observation will affect on my output?

    Regards,

    Prerak

  • In reply to Prerak Patel:

    Hi,

    Yes, you are right. Please see the note.

    Eason

    If the post helped solve your issue, please click on the  'This resolved my issue'  button.

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.