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.

MSP430F5528 + BSL

Other Parts Discussed in Thread: MSP430F5528

Hi every body.

I want to protect my code but I don't know how I can make for set the user password for BSL.

  • This thread has some helpful discussion about this topic.

    Regards,

    James

    MSP Customer Applications

  • Thanks verymuch Evans.

    I need disable the BSL on msp430F5528. I don't have clear how I can make it.

    Thanks Best Regards
  • Hi,

    The easiest way is to erase the BSL by:
    a) unlocking with clearing the SYSBSLPE bit in the SYSBSLC register
    b) erasing BSL memory (0x1000 - 0x17FF)

    Best regards
    Lukas
  • Thanks very much Lucas,

    I did it according you tell me, but first was necesary setting the linker in IAR:
    Project->Options->Linker->Extra Options:

    -P(CONST)MYDRIVE1=0x1000-0x11FF
    -P(CONST)MYDRIVE2=0x1200-0x13FF
    -P(CONST)MYDRIVE3=0x1400-0x15FF
    -P(CONST)MYDRIVE4=0x1600-0x17FF

    After I my code I make according you tell me:

       SYSBSLC &= ~SYSBSLPE;
     
      char * Flash_ptr;                         // Initialize Flash pointer
      Flash_ptr = (char *) 0x1000;
      FCTL3 = FWKEY;                            // Clear Lock bit
      FCTL1 = FWKEY+ERASE;                      // Set Erase bit
      *Flash_ptr = 0;                           // Dummy write to erase Flash seg                
      FCTL1 = FWKEY;                            // Clear WRT bit
      FCTL3 = FWKEY+LOCK;                       // Set LOCK bit
     
      Flash_ptr = (char *) 0x1200;
      FCTL3 = FWKEY;                            // Clear Lock bit
      FCTL1 = FWKEY+ERASE;                      // Set Erase bit
      *Flash_ptr = 0;                           // Dummy write to erase Flash seg
      FCTL1 = FWKEY;                            // Clear WRT bit
      FCTL3 = FWKEY+LOCK;                       // Set LOCK bit
     
      Flash_ptr = (char *) 0x1400;
      FCTL3 = FWKEY;                            // Clear Lock bit
      FCTL1 = FWKEY+ERASE;                      // Set Erase bit
      *Flash_ptr = 0;                           // Dummy write to erase Flash seg
      FCTL1 = FWKEY;                            // Clear WRT bit
      FCTL3 = FWKEY+LOCK;                       // Set LOCK bit
                          
      Flash_ptr = (char *) 0x1600;
      FCTL3 = FWKEY;                            // Clear Lock bit
      FCTL1 = FWKEY+ERASE;                      // Set Erase bit
      *Flash_ptr = 0;                           // Dummy write to erase Flash seg
      FCTL1 = FWKEY;                            // Clear WRT bit
      FCTL3 = FWKEY+LOCK;                       // Set LOCK bit

    The BSL is disable!!!

    Thanks very much

**Attention** This is a public forum