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.

CCS/MSP432E401Y: Writing MAC Address using CCS

Part Number: MSP432E401Y
Other Parts Discussed in Thread: UNIFLASH

Tool/software: Code Composer Studio

Hi,

I have a question from my customer how to write MAC address in MSP432E401Y.

I found Uniflash can be used to write MAC address according to the original post.
Customer also found there is “MAC Address Operations” in CCS.
Properties => Debug => MSP432E4 Flash Settings.


Q1) This feature can be used?
Q2) If so, how to use this feature? The MAC address is written when program is loaded?

Thanks and regards,
Koichiro Tashiro

  • Hi,

    We will look into it and get back to you ASAP. Please bear with us.

    Thanks,

    PM

  • Q2) The MAC address is conventionally stored in USER0 and USER1, which are small separate areas of non-volatile memory (EEPROM, I think). The MSP432E devices on the Launchpads come pre-configured this way. The example applications read USER0/1 expecting to find the MAC there.

    Q1) I haven't tried doing this with Uniflash, but it looks (based on the screenshot) like it knows what to do.

  • Hi PM, Bruce,

    Thanks for replies.
    For Q2, I understood.

    ForQ1, these Debug settings (MAC Address, USER_REGn) are written to registers at the same time the program is loaded?

    Thanks and regards,
    Koichiro Tashiro

  • These values are written once, to special areas of Flash, using a special sequence. They are not part of the program image, and not updated as part of program download. Once written (committed), they can only be changed (cleared) by a factory reset. 

    The write sequence is arcane but not secret. [Ref TRM (SLAU723) Secs 7.5.3, 7.3.2, and Table 7-3, though the Driverlib source for FlashUserSave() is easier reading.]

    [Edit: Added small clarification.]

  • Hi Bruce,

    I knew the write sequence of these register from HW point of view.
    Customer wants to make sure when CCS does the write operation in case Debug feature is used.

    In case Uniflash is used, it is clear as Uniflash has “Program xxx” button.


    There is no such button in CCS.

    Thanks and regards,
    Koichiro Tashiro

  • I don't know of a way to ask CCS to do this. I hacked up a little program to do the sequence for me.

    Maybe someone else knows? [PM?]

    [Edit: Sorry, I read your original screenshot as a Uniflash screen (I never use Uniflash), but now I see it's a CCS menu. No, I don't know about it.]

  • I don't know the answer. I don't see anything about this procedure in msp432e401y.gel, so it's somewhere I don't know about. I don't have my materials here, so I can't try it.

    One possibility is that, as you suggested, it loads the given values into the USER0/1 SysCtl area on every download, but doesn't commit them, so it can do it as many times as it wants. I suppose there would be some utility in that, though it will be a bit of a surprise when the debug cable is unplugged.

    Sorry I can't help.

  • Observed behavior (CCSv8.3): This CCS Property has no visible effect. Entering either a MAC or an explicit USER_REG0 value does not appear to affect the contents of FLASH_USERREGn, according to either the debugger (Registers) or my program.

    My program had no difficulty writing USER0/1 (ephemerally).

  • Hi Bruce,

    Thanks for trying.

    PM,

    Could you confirm this CCS feature is usable or not?

    Thanks and regards,
    Koichiro Tashiro

  • Tashiro-san,

    I am able to sucessfully program the MAC address from CCSv9.3. Note that before you can program a new address, you need to return the device back to factory state. Did you do this already before trying to reprogram?

    https://e2e.ti.com/support/microcontrollers/msp430/f/166/p/829337/3067640#3067640

    Thank you

    ki

  • Thanks for the confirmation. I guess this is a v9 thing. 

    How is it intended to work? Does it load the USERREGs on every download? Does it (try to) commit them on every download?

  • Bruce McKenney47378 said:
    Thanks for the confirmation. I guess this is a v9 thing. 

    I got it to work with CCSv8.3.1 also. The key is the factory reset before trying to reprogram the MAC address

    Bruce McKenney47378 said:
    How is it intended to work? Does it load the USERREGs on every download? Does it (try to) commit them on every download?

    No, not on every download. It only programs the MAC when the "Program MAC Address" button (or the "Program Register Value" button) is pressed. But for the program to take effect, an unlock sequence (via factory reset) must be done first.

    Thanks

    ki

  • [Note to archaeologists: The "Program" button is not in "Project->Properties->Debug->MSP432E4 Flash Settings". Rather, it is in "[Debug Perspective]->Tools->On-Chip Flash", which is only available if a target is connected. I still don't know what the former (the Property), which looks very similar but without the button, does.]

    [Edit: Fixed Property name]

  • Bruce,

    You raise a good point which i did not pay attention to. 

     "[Debug Perspective]->Tools->On-Chip Flash" is the correct place to program the flash. "Project->Properties->Debug->MSP432E4 Options" are project properties that are applied when a debug launch configuration is created. If a launch configuration already exists, then any chances may not be applied.

    And yes, to program the flash, the debug must be connected. Having those options in the project properties is confusing and misleading (and we should look to get them removed)

    ki

**Attention** This is a public forum