256
Messages
This section allows you to view all Messages made by this member. Note that you can only see Messages made in areas you currently have access to.
Messages - Markus Gritsch
257
Web platform / Re: The webbserver stops, Problems with ENC28J60??
[tt:] ENC_SPICON1bits.CKE = 1;
ENC_SPICON1bits.MSTEN = 1;
ENC_SPICON1bits.SMP = 1; // line inserted
ENC_SPISTATbits.SPIEN = 1;[/tt:]
Does this shed any light on this strange issue for someone?
258
Web platform / Re: The webbserver stops, Problems with ENC28J60??
259
Web platform / Re: Current status of webserver software
260
Web platform / Re: The webbserver stops, Problems with ENC28J60??
Because I have only one Web Platform, I am going to stop the "long term" test now, because I like to try out other things.
Taking into accout, that the fixed firmware also worked at a test run at 50 MIPS overclocked for several hours, and that the SPI clock can now be choosen freely (compared to be very picky at the clock speed without the fix), I would say the fix is correct.
The next step would be to understand why it works so much better now, despite the fact that according to the data sheets it should not. Ian, any progress on the timing analysis using an oszilloscope? Maybe we should bring it up on the Microchip forum. Is it read by Microchip engineers?
261
Web platform / Re: The webbserver stops, Problems with ENC28J60??
Maybe others can also contribute to the long term stability test. I attached the modified firmware (the only modification is the commented out CKE line) and the Microchip test website. Please try them on your Web Platform.
262
Web platform / Re: The webbserver stops, Problems with ENC28J60??
This really seems to be the correct setting, since now the SPI clock in ENC_SPICON1 can be set to almost an arbitrary value (1:1 for the primary and 1:1 for the secondary prescaler is not recommended by the data sheet). It works from 0b00000 (40 MHz / (8 * 64) = 78125 Hz) resulting in ping times of about 35 ms
to 0b11011 (40 MHz / 2 = 20 MHz).While it is nice that it seems to work now (of course only time will tell), it is a bit unsatisfying because I cannot yet understand why. Section 4.1 of the ENC28J60 data sheet [1] shows timing diagrams and says "[...] data being clocked in on the rising edge of SCK". The timing diagram on page 18-10 of the dsPIC33F Family Reference Manual [2] shows that SDO changes on the rising edge and is stable on the falling edge of SCK with our settings (CKE = 0, CKP = 0). This does not make sense. Any thoughts?
[1] http://ww1.microchip.com/downloads/en/D ... 39662c.pdf
[2] http://ww1.microchip.com/downloads/en/D ... 70206C.pdf
263
Web platform / Re: The webbserver stops, Problems with ENC28J60??
Without the fix, stability is good when run at 40 MHz / 20 MIPS (PLLFBD=20) as used in the @tweet_tree, but degrades with increasing clock rate. At 80 MHz / 40 MIPS (PLLFBD=41) the web server frequently stops from responding after a few minutes. At an even more increased speed, the web server does not serve pages at all.
I am quite confident that I spotted the problem, because I have the web server now running for about 3 hours, at 100 MHz / 50 MIPS (PLLFBD=52) overclocked, without any stability issues

It seems, that (at least for the Web Platform) the serial SPI output changes on the wrong edge of the clock. After commenting out line 224 in ENC28J60.c
[tt:] //ENC_SPICON1bits.CKE = 1;[/tt:]
everything is fine.
Ian, can you imagine why CKE is explicitely set in ENC28J60.c? Could this be a bug or might it be necessary for other board designs like the Explore 16?
264
Web platform / Re: Dynamic Variables (~inc:header.inc~) in SD Card Server not working
265
Web platform / Re: Dynamic Variables (~inc:header.inc~) in SD Card Server not working
I did this, and now I get the attached screenshot.png. Including ~inc:header.inc~ seems to work, but a lot of the other dynamic variables remain unsubstituted.
The LED in the browser is blinking, but when clicking a bit through the menu on the left side, the Web Platform locks up. The LD1 on the board stops blinking and the debugger shows that it hangs in line 661 in SD-SPI.c:
while (!SPISTAT_RBF);
Maybe access to files on the SD is not very reliable?
266
Web platform / Re: The webbserver stops, Problems with ENC28J60??
267
Web platform / Dynamic Variables (~inc:header.inc~) in SD Card Server not working
has anyone managed to get the Microchip example website (WebPages2 folder) to work on the Web Platform? In particular it seems that dynamic variable like ~inc:header.inc~ are not working.
EDIT: I mean in the SD card server. They work fine in the EEPROM server.
268
Web platform / Re: The webbserver stops, Problems with ENC28J60??
269
Web platform / Re: The webbserver stops, Problems with ENC28J60??
270
Web platform / Re: The webbserver stops, Problems with ENC28J60??
Ian, on which demo is the tweet tree firmware based on?