Author Topic: Porting Microchip TCP/IP stack for use with SBC83I board  (Read 9804 times)

modtro2

  • Administrator
  • Hero Member
  • *****
  • Posts: 564
    • View Profile
Porting Microchip TCP/IP stack for use with SBC83I board
« on: October 09, 2008, 05:23:42 PM »
The Microchip TCP/IP stack can be used with our SBC83I board, with a in28J60 Ethernet modules plugged into it. We have NOT completely ported the Microchip TCP/IP stack yet, and this post is just for information. The main work will be porting the Microchip TCP/IP stack to use the serial FLASH used on the SBC83I board for storing web pages. By default, the Microchip TCP/IP stack uses a 25LC512 EEPROM chip for storing web pages. If the serial flash on the SBC83I board is removed, and replaced with a 25LC512 chip, it is very easy porting the TCP/IP stack.

  • Using with SBC83I-J10 board, with serial FLASH replaced with 25LC512 chip:
    This is very simple to do. The serial FLASH chip has to be replaced with a 25LC512 chip. After doing this, add a hardware profile for the SBC83I board in the "HardwareProfile.h" source code file (part of the Microchip TCP/IP stack). See attached "HardwareProfile.h" file, it has a profile for the SBC83I board.
  • Using with SBC83I-J10 board:
    Use same "HardwareProfile.h" as given above, but modify for serial flash chip used on SBC83I board. The serial flash source code also needs to be modified to work with this flash chip. We will be porting the Microchip TCP/IP stack to work with this flash some time in the future.

jotavans

  • Jr. Member
  • **
  • Posts: 7
    • View Profile
Re: Porting Microchip TCP/IP stack for use with SBC83I board
« Reply #1 on: November 07, 2008, 03:34:11 AM »
Hello everyone.

Surely there are people like me who need to use this SBC in ethernet.

You have offered the possibility of working based on the Microchip TCP/IP Stack, with the option of replacing the SPIFlash by a SPIEEPROM.
But I needed the SPIFlash storage site, so I adapted the Microchip TCP/IP Stack v4.51 for SBC83i-J10.   
You can get the TCP/IP Stack v4.51 of Microchip in http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=2680&dDocName=en537041

-To set the settings of SBC83i-J10 in this TCP/IP Stack V4.51 ought to include "HardwareProfile.h" that attached.
-In this version of Stack is possible to find a BUG in her memory usage SPIFlash that is resolved. This fix is in the file "SPIFlash.c", I modified the function "SPIFlashWriteArray" which gave problems. Attached the new "SPIFlash.c".
Only with these two steps the SBC83i behaves correctly in ethernet with Web server(MPFS Classic), TFTP server, ping, UDP...

On the other hand I met some difficulties in working with the Web Server MPFS v2.  I decided to modify a possible BUG handling pointers in "HTTPPostConfig" file "CustomHTTPApp.c". With that I have fixed the problem, and SBC83i behaves properly in all applications.

This new version of Stack has two powerful utilities:
  - "TCPIPConfig.exe" changes the file "TCPIPConfig.h" which sets out the general values of the application, as well as the corportamiento of SBC83.
  - "MPFS2.exe" generates the images with the Web pages to load into memory.

For example, the file "TCPIPConfig.h" that the attachment is generated with the aplición TCPIPConfig.exe. This was generated with the following options:
-Use MPFSv2
-Use SPIFlash
-Reserved the first 4096 bytes of SPIFlash for aplication
-HostName, IP, MAC, MASK IP, GATEWAY, DNS Servers
-Use external SRAM for save the aplications buffers

I used the file linker "18f87j10i.lkr" of the tcp/ip stack v4.18 because in examples v4.51 are not include.

Now I'm working on creating a bootloader and updating the RTC by SNTP client. I hope posting in the near future.

I hope this serves as some help and forgive my poor English.
Regards, Jota.
« Last Edit: November 07, 2008, 05:44:26 AM by jotavans »

jotavans

  • Jr. Member
  • **
  • Posts: 7
    • View Profile
Re: Porting Microchip TCP/IP stack for use with SBC83I board
« Reply #2 on: November 14, 2008, 09:59:41 AM »
Hello again.

I will include the SNTP client changed without DNS. This also implies the use of the chip M41T82 RTC available to the sbc83I.
Using this client without DNS because I do not have a network with DNS server. You can activate the DNS uncomment the comments "INI with DNS" of file sntp.c

The parameters can be configured on the Web of the sbc83I.

For this I used the library i2c of Modtronix TCP/IP Stack. To handle the RTC M41T82 I helped the driver DS1307 from OmarZucchiatti.

Files modified:
-MainDemo.c : Settings SNTP by defect
-i2c.h, i2c.c : dirver Modtronix I2C
-rtc.h, rtc.c : driver M41T82
-CustomHTTPApp.c : SNTP configurations via web

I also modified some files of the TCP/IP stack of Microchip.

Regards, Jota.

jotavans

  • Jr. Member
  • **
  • Posts: 7
    • View Profile
Re: Porting Microchip TCP/IP stack for use with SBC83I board
« Reply #3 on: November 14, 2008, 10:04:38 AM »
Attachment files: SBC83I with WEB HTTP2, SPI FLASH, SNTP client with RTC M41T82

jotavans

  • Jr. Member
  • **
  • Posts: 7
    • View Profile
Re: Porting Microchip TCP/IP stack for use with SBC83I board
« Reply #4 on: November 14, 2008, 10:06:22 AM »
Attachments TCP/IP Stack Microchip modified