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.

MSP430 BSL bricks device

Using 'MSP430 USB Firmware Upgrade Example' I'm performing a USB-BSL procedure on an MSP430F5659-based board. While most times the operation succeeded, it sometimes fails, after which both the application and BSL fail to load, rendering the device useless. I then have to use an external JTAG emulator to re-program the device.

Some questions:

  • Does 'Mass Erase' erases the BSL code itself (i.e. FLASH segment 0x1000 ... 0x17FF)?

  • If so, how can I prevent the BSL from being erased? Do I need to erase each segment separately?

Thanks,

 Boaz

  • Table 7-2 of the User's Guide says this about mass erase:

    Information memory A to D and BSL segments A to D are not erased.

    The BSL segments get erased only with a segment erase, which should happen only when you're trying to reprogram the BSL itself.

    When you get that failure, are the BSL segments actually erased?

  • Thanks Clemens.

    I verified that the BSL segment is not erased when I get the failure. However, the device does not enumerate as either my application nor as BSL.

    My device is battery-powered, but removing and re-installing the battery does not help either.

  • When the BSL code exists, the BSL should still be able to run.

    Are you starting the BSL with the BSL entry sequence? If not, is the reset vector at 0xFFFE erased?
  • I'm starting BSL using the following code:

    #define BSL_ENTRY_METHOD   ((void (*)())0x1000)
    ..
    __disable_interrupt();
    USB_disconnect();
    __delay_cycles(500000);
    BSL_ENTRY_METHOD();

    Also, Following the instructions here, I connected to the running device. I found that:

    • The BSL code seems intact (I had to clear bit SYSBSLC.SYSBSLPE to see it)
    • The PC register points to at 0xFFFE (the reset vector), which is cleared (0xFFFF)

**Attention** This is a public forum