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.

MSPM0G1507: Flash-based UART plugin MAIN SWP Setting

Part Number: MSPM0G1507
Other Parts Discussed in Thread: UNIFLASH

Tool/software:

Hallo,

I`m using the BSL with a flash-based UART plugin to use the BSL over a RS485 physical interface. 

I`ve placed the start of the flash plugin at the end of the flash -> 0x0001E000 in order to use the last eight sectors. Why eight? Because the  FLASHSWP1
can only set 8 sectors with one bit. The MSP0G1507 has 128kB of flash so the last sector starts at 0x0001E000 and ends at 0x0001FFFF.

In order to protect the last sector I have to set the right bit which should be by my calculation bit 15 -> 1111 1111 1111 1111 0111 1111 1111 1111 -> 0xFFFF7FFF

I`ve set the bits and eversthing else and uploaded the file onto the controller. The flash plugin works (can send commands back and forth) until I´m sending a mass erase command. 

I´ve used the write protection from the example code and that worked but sectors used in the example are in the lower region aka  FLASHSWP0.

I`ve also tried to set the bit below or above bit 15 and that also didn´t work.

So which bit I have to set? Maybe I misunderstood the docs...

Thanks!

Best regards

Steffen

  • Hi Steffen,

    In order to protect the last sector I have to set the right bit which should be by my calculation bit 15 -> 1111 1111 1111 1111 0111 1111 1111 1111 -> 0xFFFF7FFF

    You process look good.

    Can you check the what the memory address shows in 41C00048h? Maybe your NONMAIN is not updated.

    The other thing is other, have you reset your device? The NONMAIN configuration should reset your device at least one times.

    B.R.

    Sal

  • Hi Sal,

    if NONMAIN wouldn`t be written than the flash plugin wouldn`t work as well. So this can`t be the cause of the problem.

    My workflow on how to program:

    1. Uniflash 9.1.0 -> Factory reset auto

    2. Device power toggle and uniflash restart

    3. Flashing of the flash plugin with Uniflash -> Erase MAIN and NONMAIN memory option checked 

    4. Device power toggle 

    5. LED as indicator lights up

    6. send mass erase auto command via uniflash 

    7. LED indicator is off -> mass erase deleted my flash plugin

    The same code was working with the original addresses from the flash plugin BSL example. I have only changed the addresses. So I think either the memory protection isn`t working or my settings regarding that are wrong.

    I´ve compared the memory contents with my hexfile after point 5 -> they are the same!

    I`ve attached my project.

    Best regards

    Steffen

    6354.MSPM0-BL.zip

  • Ok I´ve found the problem:

    - a mass erase command via BSL will not touch sectors defined by FLASHSWP0/1

    - a mass erase command via Uniflash will erase whole NONMAIN regardless of the settings of FLASHSWP0/1

    Is that a intented functionality? I find it quite problematic.

     

  • Hi Steffen,

    This is mentioned in the TRM:

    UNIFLASH mass erase is DSSM command, which will earese the flash no matter how you set the NONMAIN static protection.

    B.R.

    Sal