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.

Writing programme in Information memory segment in MSP430F248

Other Parts Discussed in Thread: MSP430F248

Hi all,

can  write the programme in Information memory segment in MSP430F248 and run it itself ? in addition can locked the programme which is in programme memory location ?(in MSP430F248)

if these are yes, please explain them. if you can, send me the sample code regurding this. It is very useful me at this time.

Thanks.

 

  • Chinthaka Dinesh said:
    can  write the programme in Information memory segment in MSP430F248 and run it itself

    In theory, yes. However, it's difficult to generate the code since the toolchains are not configured to place code into info segments.
    Besides this, the info memory is as good for code execution as main flash or ram.

    Chinthaka Dinesh said:
    if these are yes, please explain them. if you can, send me the sample code regurding this. It is very useful me at this time.

    There are many threads about writing to info memory or putting data (and code respectively) into info memory. Also, tehre are even more threads abotu how to write to flash during runtime, including an application note from TI.

  • Thank you very much for the answer.

    but you don't have answered the problem which "can locked the programme which is in programme memory location ?(in MSP430F248)". what about this ?

    in addition how write the program in required memory locations? what is the code in C (IAR - MSP430) ? if you have any source code regurding this, please send them also.

    Thanks.

  • Chinthaka Dinesh said:
    you don't have answered the problem which "can locked the programme which is in programme memory location ?(in MSP430F248)"

    Because I don't know what you mean with 'lock'. Protect it from being overwritten by the programmer, protect it against being overwritten from inside the program or protect it against being read by a third party? Or something else?

    Chinthaka Dinesh said:
    how write the program in required memory locations

    All compilers offer a syntax to put code or variables into a sepcific link segment. Normally you do not need to enter this information, as the compiler picks the appropriate segment (code, data, whatever).
    But you can specify for each element (a function or a vfariable) separately where to put it. How to do it (and how the segments are named) depends on the compiler/linker combo. I don't use IAR, so I don't know the syntax, but the IAR docu will tell you.

    There is, however, the startup code and the library code (for standard integer math) and any additional library code that is linked. Here the decision where to put it has been already taken at compile time, so it will end up in normal program flash. To avoid this, you'll have to alter the linker command file or write your own startup code etc.

  • Thank you very much for the answers.

    i mean that " Protect it from being overwritten by the programmer" how do this? send me any example code regurd this, if you have.

    thanks.

  • Chinthaka Dinesh said:
    i mean that " Protect it from being overwritten by the programmer" how do this?

    Simple: remove the physical connection between programmer (FET) and target (MSP). Usually, you start a programming process to overwrite the existing code by a new version.

    There actually is a way to prevent any access to the MSP by the FET, once and forever. It is called 'blowing the JTAG fuse'. On the older MSPs, it actually destroys an electrical connection iside the JTAG circuit and prevents any further access to the MSP by teh FET. Irreversible.
    On newer MSPs (5x series), this fuse is a software fuse. It can be 'blown' by pogramming a certain area inside the BSL Flash. It is reversible but difficult.
    The fuse (both versions) usually can be blown by checking th appropriate optin in the programming software: 'blow JTAG fuse'. However, the same software is unable to undo it, asthe programmer has no more access ot the MSP. The only way is to upload a specific software using the BSL mode (or having this option directly programmed inside the currently loaded firmware already). So this shouldn't be done lightly.
    However, the main purpose is not to protect the software from being accidentally overwritten, but to protect it from being read and analyzed by 3rd party that just bought one device form you to make millions of cheap copies without any programming effort.

    If you want to upload new firmware but want to protect existing data from a previous program run, then you usually write the data to info flash adn tell teh programming software to not erase the info flas during reprogramming.

**Attention** This is a public forum