Author Topic: K64F Ethernet  (Read 5703 times)

Offline Kyle Mercer

  • Newbie
  • *
  • Posts: 4
    • View Profile
K64F Ethernet
« on: May 30, 2017, 09:47:55 PM »
I enabled the Ethernet interface on my FRDM-K64F development board with uTasker 1.4.11 and I have not been able to successfully change the IP address, gateway, MAC address, etc.

I configure the default values in the network_default constant found in application.c, and disabled the SUPPORT_PROGRAM_ONCE and MAC_FROM_USER_REG defines in app_hw_kinetis.h but the development board starts with 255.255.255.255 as the IP address and gateway and a MAC address of FF:FF:FF:FF:FF:FF

This wouldn't be too bad as the IP, gateway, netmask and DNS can all be changed via menu; however, there is no command to change the MAC address.

The same behavior is seen in the Simulator too. Is there another location where uTasker gets the network configuration from?

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3236
    • View Profile
    • uTasker
Re: K64F Ethernet
« Reply #1 on: May 31, 2017, 01:10:11 AM »
Hi

If you have run a project on the processor before without Ethernet it is probable that it is taking the saved parameters for its IP settings. Try a complete flash erase beforehand so that there are no valid parameters and then you should get the defaults.
To do this with the simulator delete the flash_kinetis.ini file from the simulator directory.

The MAC address can be programmed once when it has still its default 00-00-00-00-00-00. To do this there is a secret "MAC" command in the LAN menu (it is not listed since it is intended to be used once in production and not shown during general use).

Regards

Mark

Offline Kyle Mercer

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: K64F Ethernet
« Reply #2 on: June 07, 2017, 03:41:16 AM »
Erasing the entire flash solved the problem.

Is there an easy way to accomplish erasing the entire flash within Kinetis Design Studio? I ended up using manual OpenOCD commands through a GDB command line, which worked but had some other side effects that I had to deal with.

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3236
    • View Profile
    • uTasker
Re: K64F Ethernet
« Reply #3 on: June 07, 2017, 01:18:27 PM »
Hi

When you download code in KDS you can look in the debugger options. There is often a check box to allow a full chip erase to be performed before a new download (depends on the debugger type used what it is called and where it is found), which means that parameters will be reset on each new programing step.

You can also install IAR Kickstart and use its chip erase command.

Finally, you can erase parts of memory via the the command line interface when the uTasker (based) project is running (via Telnet, USB CDC or UART) as described in this video. If you know the address and size of the parameters this is the best method because you can reset them at any time without needing debug tools. https://www.youtube.com/watch?v=Pe9A8qsefzQ&list=PLWKlVb_MqDQFZAulrUywU30v869JBYi9Q&index=12

Finally, there is a command in the "Administration" menu called "restore" which returns the factory settings (defauts). I don't think that it restores the MAC address (since it is protected) but I think sets IP settings to the default ones.

Regards

Mark