Author Topic: Placing MAC address in spi flash.  (Read 11384 times)

Offline neil

  • Sr. Member
  • ****
  • Posts: 438
    • View Profile
Placing MAC address in spi flash.
« on: July 01, 2008, 07:06:52 PM »
Hi Mark,
 We are planning to have many units out in the field , and dont want to hardcore the MAC address ,and other internet info. But instead would like it to be stored in SP flash memory, and when the system boots up, reads from there the required details. We will have a routine that will allow us to enter the MAC address and save into the flash memory first.

Regards
Neil

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3236
    • View Profile
    • uTasker
Re: Placing MAC address in spi flash.
« Reply #1 on: July 01, 2008, 09:56:57 PM »
Hi Neil

The MAC address and other Internet data are stored in the parameter system. The parameter system can be located in internal or external SPI FLASH. Will you not be able to use it as it is? The MAC address can be changed via serial interface or web server (or any other means you would like to add) so possibly you don't have to do anything new(?).

Regards

Mark

Offline rad

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: Placing MAC address in spi flash.
« Reply #2 on: July 03, 2008, 09:21:20 AM »
Hi Neil,

I dont know which board do You use, I use M52233DEMO. There is MAC adress 00-00..-00 from begining (the same in the simulator). If You change it, its stored in memory flash, so when You erase it, You can change it again. You can read uTasker tutorial for M5223xto see how to change MAC adress. If You use demo Web pages (supplied with uTasker project) You can change there MAC adress and IP Adress as You want (Ok, You can change MAC adress just once, till You reflash the board). Now, You dont need develop any utilities for change it, because You can use (or modify) demo as its suplied.

I have to say the system in the demo is quite sophisticated, because You have to verify all changed parameters in 3 mins. after change is made. If You dont do it (according to inaccesibility of the network, or so), board will change setting back in the last working configuration and You can use old setting as before. I think that its a quite lot of work make Your own solution, so why dont use good proven solution? Of course, You can change everything because You have all source files (and web page sources too), but I will basicaly use this solution too.

For Me, the uTasker is quite large project and I dont familliar with it yet, But I really like it and enjoy to learn it. I have to say Mark made looot of work with it (and really support it), so when I will be able to work with uTasker better, I will use it in any project with ethernet I make. Reason is due to support, features and size of code. And The price for it is sooo low...

Regards, Rad

Offline neil

  • Sr. Member
  • ****
  • Posts: 438
    • View Profile
Re: Placing MAC address in spi flash.
« Reply #3 on: July 04, 2008, 11:37:10 AM »
The MAC address and other Internet data are stored in the parameter system. The parameter system can be located in internal or external SPI FLASH. Will you not be able to use it as it is? The MAC address can be changed via serial interface or web server (or any other means you would like to add) so possibly you don't have to do anything new(?).

Hi mark,
  Thanks for the info.  I must be not be fully understanding this. I assume when the system first boots up, the details from the parameter block is used to initialise the mac address etc, which is located in flash (as it is compiled with the application)and is defined as a 'static const'?
How can I change this instead of rebuilding the whole code?

Thanks
Neil
« Last Edit: July 04, 2008, 11:46:27 AM by neil »

Offline neil

  • Sr. Member
  • ****
  • Posts: 438
    • View Profile
Re: Placing MAC address in spi flash.
« Reply #4 on: July 04, 2008, 11:53:08 AM »
Hi Rad,
  Thanks for the reply ,we will have another look at the Docs. We are not using a demo board, we have designed our own board with various other components, and all working fine.

Regards
Neil

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3236
    • View Profile
    • uTasker
Re: Placing MAC address in spi flash.
« Reply #5 on: July 04, 2008, 12:38:58 PM »
Hi Neil

The set of parameters in the application is a 'default' set which is used when the parameter system is empty (i.e. has never been set before). If the parameter system has valid contents these will be used instead of the defaults. The default can also be though of as 'factory-settings' - it is possible to return the factory defaults (except from the MAC address) on the demo "administration" web page.

As the demo project is set up, the default mac address is 00-00-00-00-00-00 (this is also understood as never having been configured, but aklows communication, as long as there is only one unconfigured board on the network at a time) - you can command a new address to be set, save it and then it will always use this from the valid parameter system. As mentioned above, even when the factory settings are returned, the MAC address will not be set to its default 00-00-00-00-00-00 since end users shouldn't (usually) have control over this value which is coordinated by the owner of the MAC address block.

If you follow the part about changing IP and MAC settings in the tutorial you can see it working and verify that it will also work for your project.

Regards

Mark