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

Committer:
frankvnk
Date:
Tue Jan 15 06:43:51 2013 +0000
Revision:
8:4c3db9231e3f
Parent:
3:342aa2cf54e8
DM9161_BMSR - bit 13 define modified

Who changed what in which revision?

UserRevisionLine numberNew contents of line
frankvnk 0:636056c0b5e1 1 //*****************************************************************************
frankvnk 0:636056c0b5e1 2 // +--+
frankvnk 0:636056c0b5e1 3 // | ++----+
frankvnk 0:636056c0b5e1 4 // +-++ |
frankvnk 0:636056c0b5e1 5 // | |
frankvnk 0:636056c0b5e1 6 // +-+--+ |
frankvnk 0:636056c0b5e1 7 // | +--+--+
frankvnk 0:636056c0b5e1 8 // +----+ Copyright (c) 2009 Code Red Technologies Ltd.
frankvnk 0:636056c0b5e1 9 //
frankvnk 0:636056c0b5e1 10 // ew_systick.c provided SysTick functions for use by EasyWeb port to RDB1768
frankvnk 0:636056c0b5e1 11 //
frankvnk 0:636056c0b5e1 12 // Software License Agreement
frankvnk 0:636056c0b5e1 13 //
frankvnk 0:636056c0b5e1 14 // The software is owned by Code Red Technologies and/or its suppliers, and is
frankvnk 0:636056c0b5e1 15 // protected under applicable copyright laws. All rights are reserved. Any
frankvnk 0:636056c0b5e1 16 // use in violation of the foregoing restrictions may subject the user to criminal
frankvnk 0:636056c0b5e1 17 // sanctions under applicable laws, as well as to civil liability for the breach
frankvnk 0:636056c0b5e1 18 // of the terms and conditions of this license.
frankvnk 0:636056c0b5e1 19 //
frankvnk 0:636056c0b5e1 20 // THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
frankvnk 0:636056c0b5e1 21 // OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
frankvnk 0:636056c0b5e1 22 // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
frankvnk 0:636056c0b5e1 23 // USE OF THIS SOFTWARE FOR COMMERCIAL DEVELOPMENT AND/OR EDUCATION IS SUBJECT
frankvnk 0:636056c0b5e1 24 // TO A CURRENT END USER LICENSE AGREEMENT (COMMERCIAL OR EDUCATIONAL) WITH
frankvnk 0:636056c0b5e1 25 // CODE RED TECHNOLOGIES LTD.
frankvnk 0:636056c0b5e1 26
frankvnk 0:636056c0b5e1 27 #include "mbed.h"
frankvnk 0:636056c0b5e1 28
frankvnk 0:636056c0b5e1 29 extern void TCPClockHandler(void);
frankvnk 0:636056c0b5e1 30
frankvnk 0:636056c0b5e1 31 volatile uint32_t TimeTick = 0;
frankvnk 0:636056c0b5e1 32 volatile uint32_t TimeTick2 = 0;
frankvnk 0:636056c0b5e1 33
frankvnk 0:636056c0b5e1 34 DigitalOut myled(P3_25);
frankvnk 0:636056c0b5e1 35 Ticker SysT10;
frankvnk 0:636056c0b5e1 36
frankvnk 0:636056c0b5e1 37 // ****************
frankvnk 0:636056c0b5e1 38 // SysTick_Handler
frankvnk 0:636056c0b5e1 39 void SysTH(void)
frankvnk 0:636056c0b5e1 40 {
frankvnk 0:636056c0b5e1 41 TimeTick++; // Increment first SysTick counter
frankvnk 0:636056c0b5e1 42 TimeTick2++; // Increment second SysTick counter
frankvnk 0:636056c0b5e1 43
frankvnk 0:636056c0b5e1 44 // After 100 ticks (100 x 10ms = 1sec)
frankvnk 0:636056c0b5e1 45 if (TimeTick >= 100) {
frankvnk 0:636056c0b5e1 46 TimeTick = 0; // Reset counter
frankvnk 0:636056c0b5e1 47 myled = !myled;
frankvnk 0:636056c0b5e1 48 // LPC_GPIO1->FIOPIN ^= 1 << 25; // Toggle user LED
frankvnk 0:636056c0b5e1 49 }
frankvnk 0:636056c0b5e1 50 // After 20 ticks (20 x 10ms = 1/5sec)
frankvnk 0:636056c0b5e1 51 if (TimeTick2 >= 20) {
frankvnk 0:636056c0b5e1 52 TimeTick2 = 0; // Reset counter
frankvnk 0:636056c0b5e1 53 TCPClockHandler(); // Call TCP handler
frankvnk 0:636056c0b5e1 54 }
frankvnk 0:636056c0b5e1 55 }
frankvnk 0:636056c0b5e1 56
frankvnk 0:636056c0b5e1 57 // ****************
frankvnk 0:636056c0b5e1 58 // Setup SysTick Timer to interrupt at 10 msec intervals
frankvnk 0:636056c0b5e1 59 void Start_SysTick10ms(void)
frankvnk 0:636056c0b5e1 60 {
frankvnk 0:636056c0b5e1 61 SysT10.attach(&SysTH, 0.01);
frankvnk 0:636056c0b5e1 62 }