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.

RTOS/TM4C1292NCPDT: Flash memory getting corrupted while programming MAC address

Part Number: TM4C1292NCPDT
Other Parts Discussed in Thread: UNIFLASH

Tool/software: TI-RTOS

Hi,

For my application I partitioned flash memory into 4 sections

Boot code : 0x0 - 0x3FFF

Common memory area : 0x80000 - 0x83FFF

Image 1: 0x4000 - 0x7FFFF

Image 2: 0x84000 - 0xFFFFF

The common memory area contains a structure of variables that will be frequently accessed.

This memory is getting corrupted when I committed MAC address. What may be the issue?

How flash user registers are related to this memory area?  When MAC address is not committed, flash is not corrupting. Please give your suggestion.

Regards

Sandra

  • Hello Sandra,

    How are you committing the MAC Address? Are you using LM Flash programmer or some other means?

    Do you know if code may be running when the MAC address is being committed? If so, what code may be executing? I ask because I wonder if perhaps code execution during MAC address could be affecting something like the Program Counter.
  • Hi Ralph,

    I am programming MAC address through UniFlash. Before programming I unlocked the flash user registers. MAC address is getting programmed and image is getting booted. MAC address is getting assigned properly. Flash memory corruption is not there now.

    The problem I am facing is, when I program a MAC address with some hex value other than 0 and 1 , ethernet is not connecting.

    For example, If I program MAC address with 00-00-00-00-00-01, TCP connection is getting established properly. But if I use MAC address like 11-22-33-44-55-66 ethernet connection is not getting established. What may be the reason for this?

    The wireshark log is shown below while trying to establish ethernet connection.

    The PC's IP address is 192.168.8.3 and the board is set with IP address 192.168.8.2.

    What may be the reason for this behaviour? Do we need to change any configuration? Please give a suggestion.

    Regards

    Sandra

  • Sorry, Wireshark log was not attached properly. Attaching wireshark log.

  • Could you upload the log instead of a screenshot?
  • Hello Sandra,

    Thank you for sharing those details!

    I think the issue you are running into is related to an issue identified with Uniflash in this thread: http://e2e.ti.com/support/microcontrollers/tiva_arm/f/908/p/656492/2411329#2411329

    I checked out bug tracker and while it is being worked on, a fix won't be available until the next release (not sure when that is scheduled as I am not part of that team).

    Can you use LMFlash Programmer in the mean time to handle the MAC Address programming?

  • Hi Ralph,
    I am programming my board using xds100. Can I use LM flash programmer while using xds100? Also I am calling this uniflash commands using system call function. Does LM flash programmer support any command line operations like uniflash?

    Thanks
    Sandra
  • Hello Sandra,

    LMFlash unfortunately does not support XDS100. Regarding command line, the eflash.exe utility from TivaWare's tools/bin fold is a command line equivalent of the LM flash programmer, but that's about it.
  • Ralph,

    So, isn't there any solution for this problem as of now?

    Thanks
    Sandra
  • Hello Sandra,

    Hmm, well, I don't think this issue always existed with Uniflash... What version are you running? Do you have any older downloads you could access to try out? I wonder if maybe until the update is resolved, an older Uniflash would be able to allow you to properly program the MAC address.
  • Hi Ralph,

    I am using UniFlash v3.4 for programming MAC address.

    I tried to set mac address using flashUserSet() from my program without using UniFlash utility. Then also, for 0 and 1 ethernet connection is getting established. But when I tried with other mac addresses, ethernet was not connecting. So do I need to do any configuration before writing mac address?

    Thanks

    Sandra

  • Also can you tell the UniFlash version which supports mac address programming?
  • Hello Sandra,

    I confirmed that 3.4 has no problem with MAC Address programming. The issue was identified on 4.2, I am not sure if it affects 4.1 as well or if it started with 4.2. In any case, 3.4 is fine so we now rule out the tool being at fault.

    I am going to see about looping in our Ethernet expert who should be able to better speak to what else to look for regarding the MAC Address issue.
  • Hi,
    You cannot use any random MAC address. The first 3 bytes of MAC address is the OUI (Organizationally Unique Identifier). For a custom design the MAC address must come from the pool of allocated MAC address to the organization/company. This means for the first three bytes of the MAC address you need to use the values assigned to your company. the 11-22-33 is unlikely your company's OUI.

    The bit 0 and bit 1 of the first octet has special meaning. Bit 0 determines if the MAC address is unicast or multicast while bit 1 determines if the MAC address is universally administered or locally administered. You first octet is 11. This means you are saying your MAC address is multicast and it is universally administered. You network switch may or may not choose to forward a packet that is multicast.

    I will suggest you use the launchpad as the test vehicle to run/verify your application. If it runs fine then your application is probably ok. Next try to find your own unique OUI for your MAC address and program that into your custom board, not 11-22-33-xx-xx-xx.
  • Hi,

    Thank you very much for the support provided. This information was very useful. Now ethernet is connecting.

    Thanks

    Sandra