LPC1768 Mini-DK EasyWeb application with SPI TFT output. Started from EasyWebCR and modified for DM9161 PHY support.

Dependencies:   Mini-DK mbed

This is a very basic EasyWeb application.

No error checking is performed during initialisation.

Information

If the webpage is not reachable or the 'Webserver running' message does not appear, press the reset button on the Mini-DK and wait until the message 'Webserver running' appears.
This happens sometimes when powering up the Mini-DK because the DM9161 reset pin is NOT controlled by the LPC1768, it is directly connected to the reset button.

IP adress/mask/gateway in tcpip.h : 192.168.0.200 / 255.255.255.0 / 192.168.0.1

MAC address in ethmac.h : 6-5-4-3-2-1

ew_systick.cpp

Committer:
frankvnk
Date:
2013-01-15
Revision:
8:4c3db9231e3f
Parent:
3:342aa2cf54e8

File content as of revision 8:4c3db9231e3f:

//*****************************************************************************
//   +--+       
//   | ++----+   
//   +-++    |  
//     |     |  
//   +-+--+  |   
//   | +--+--+  
//   +----+    Copyright (c) 2009 Code Red Technologies Ltd. 
//
// ew_systick.c provided SysTick functions for use by EasyWeb port to RDB1768
//
// Software License Agreement
// 
// The software is owned by Code Red Technologies and/or its suppliers, and is 
// protected under applicable copyright laws.  All rights are reserved.  Any 
// use in violation of the foregoing restrictions may subject the user to criminal 
// sanctions under applicable laws, as well as to civil liability for the breach 
// of the terms and conditions of this license.
// 
// THIS SOFTWARE IS PROVIDED "AS IS".  NO WARRANTIES, WHETHER EXPRESS, IMPLIED
// OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
// USE OF THIS SOFTWARE FOR COMMERCIAL DEVELOPMENT AND/OR EDUCATION IS SUBJECT
// TO A CURRENT END USER LICENSE AGREEMENT (COMMERCIAL OR EDUCATIONAL) WITH
// CODE RED TECHNOLOGIES LTD. 

#include "mbed.h"

extern void TCPClockHandler(void);

volatile uint32_t TimeTick = 0;
volatile uint32_t TimeTick2 = 0;

DigitalOut myled(P3_25);
Ticker SysT10;

// ****************
//  SysTick_Handler
void SysTH(void)
{
    TimeTick++;        // Increment first SysTick counter
    TimeTick2++;    // Increment second SysTick counter
    
    // After 100 ticks (100 x 10ms = 1sec)
    if (TimeTick >= 100) {
      TimeTick = 0;    // Reset counter
      myled = !myled;
//      LPC_GPIO1->FIOPIN ^= 1 << 25;    // Toggle user LED
    }
    // After 20 ticks (20 x 10ms = 1/5sec)
    if (TimeTick2 >= 20) {
      TimeTick2 = 0; // Reset counter
      TCPClockHandler();  // Call TCP handler
    }  
}

// ****************
// Setup SysTick Timer to interrupt at 10 msec intervals
void Start_SysTick10ms(void)
{
    SysT10.attach(&SysTH, 0.01);
}