Dangerous Prototypes

Other projects => Past projects => Web platform => Topic started by: debrajdeb on August 03, 2011, 12:29:13 pm

Title: TCPIP SD card demo does not work.
Post by: debrajdeb on August 03, 2011, 12:29:13 pm
Hello,

I received my "web platform v1.1 assembled" and I wanted that board to try the TCPIP MDD + SD Card Demo on it. Some issues that I face: -

1. When I program "MCSDServer.hex", as provided in the demo "Web_Platform.package.v1c", the board works good with web page displaying nicely from the SD card.

2. When I use the source code from demo "web-platform-SDcardServer.v0a", the code does not work. The LEDs do not blink as well. I tried different options as using the v3.23 version of compiler and suggestions mentioned in page -- viewtopic.php?f=24&t=1506&p=13989&hilit=SaveAppConfig#p13989 (http://dangerousprototypes.com/forum/viewtopic.php?f=24&t=1506&p=13989&hilit=SaveAppConfig#p13989)

Presently, I am running the code in debug mode to check if I can figure out the issue. But if somebody has a suggestion for me, please let me know.

Best regards.
Title: Re: TCPIP SD card demo does not work.
Post by: dpropicweb on August 03, 2011, 01:05:34 pm
You don't mention which version of the TCP/IP stack you're using?

When you say "the code does not work. The LEDs do not blink", does LD1 not come on at all when you apply power?

(If you're using a programmer, try disconnecting it and then applying power.)
Title: Re: TCPIP SD card demo does not work.
Post by: debrajdeb on August 03, 2011, 02:52:48 pm
Latest update: -

1. I am using ICD3 as programmer/ debugger.
2. My TCP/IP stack is v5.31
3. I use USB as my power source.
4. compiler version is V3.23
5. MPLAB version is v8.73
6. My code works in debug mode (in MPLAB, when I select the debug mode). But in Program mode (Release mode), the code does not work.


I am sure that the code is fine, but there is some mismatch with settings (for dsPIC). If I set that perfect, the code would run fine. I am looking into that, but if you have any advice for me, please let me know.
Title: Re: TCPIP SD card demo does not work.
Post by: dpropicweb on August 03, 2011, 03:04:57 pm
In debugger-mode the Debug Executive is configuring some pins for digital I/O. In programmer mode this is not the case, which leaves the pins in (the default) analog mode. Make sure that your program properly configures the pins. Also make sure your program properly configures the device configuration words.

(This was taken care of in the original DP main.c source file and the bootloader [for config words].)

It might pay to disable any optimisation too until it is working :)
Title: Re: TCPIP SD card demo does not work.
Post by: debrajdeb on August 03, 2011, 04:29:13 pm
Latest update: -

The SD card + TCP/IP demo working for me now (even in program mode). The following change is what I made: -

_FICD(JTAGEN_OFF & 0b11) --> _FICD(JTAGEN_OFF & ICS_PGD1)
Title: Re: TCPIP SD card demo does not work.
Post by: ian on August 05, 2011, 01:16:38 pm
Opps, I'm sorry for the error. I thought we fixed that code long ago. Where did you see the & 0b11 version?
Title: Re: TCPIP SD card demo does not work.
Post by: debrajdeb on August 06, 2011, 02:06:17 pm
Hello Ian,

I got the code from "web-platform-SDcardServer.v0a.zip" from the google code.
Title: Re: TCPIP SD card demo does not work.
Post by: ian on August 07, 2011, 10:37:14 am
Thanks, ill make sure that gets depricated and the links updated.

( ! ) Fatal error: Uncaught exception 'Elk_Exception' with message 'Please try again. If you come back to this error screen, report the error to an administrator.' in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
( ! ) Elk_Exception: Please try again. If you come back to this error screen, report the error to an administrator. in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
Call Stack
#TimeMemoryFunctionLocation
10.01052074040session_write_close ( )...(null):0
20.01082205632ElkArte\sources\subs\SessionHandler\DatabaseHandler->write( )...(null):0
30.01082206408Database_MySQL->query( ).../DatabaseHandler.php:119
40.05602345144Database_MySQL->error( ).../Db-mysql.class.php:273