It is currently 21 Nov 2017 22:47

All times are UTC + 1 hour




Post new topic Reply to topic  [ 11 posts ] 
Author Message
 Post subject: STM32F407 Ethernet Issue
PostPosted: 28 Aug 2017 16:42 
Offline

Joined: 31 Jan 2017 12:47
Posts: 42
Hi.

On the EasyMx Pro v7 I was using the SMT32F107 and the ethernet demo provided and was working ok. I now have moved to STM32F407 and changed the project scheme to the following:

STM32F407VG_PLL_25_to_150MHz_Ethernet

The ethernet does not work using this device now and there doesn't seem to be any clock out on the clock out pin (should be 50MHz). Is this software designed to work with all devices and is there any additional or different settings that need to be addressed when changing between the two devices?

Thanks.


Top
 Profile  
 
PostPosted: 31 Aug 2017 11:19 
Offline
mikroElektronika team
User avatar

Joined: 02 Feb 2017 14:21
Posts: 697
Hi,

I will gladly look at your code.
The code will need to be modified minimally or not at all to work.
Please attach your project to your next post.

Regards,

_________________
Dusan Poluga.


Top
 Profile  
 
PostPosted: 04 Sep 2017 11:18 
Offline

Joined: 31 Jan 2017 12:47
Posts: 42
I had to manually change the clock to 150MHz in the settings. For the other device it was left at 25MHz (which looks like it is crystal speed) and worked ok and both have the same hardware. Its a bit confusing, but works fine now.


Top
 Profile  
 
PostPosted: 04 Sep 2017 17:22 
Offline
mikroElektronika team
User avatar

Joined: 02 Feb 2017 14:21
Posts: 697
Hi,

I am glad you solved it.

Regards,

_________________
Dusan Poluga.


Top
 Profile  
 
PostPosted: 05 Sep 2017 11:54 
Offline

Joined: 31 Jan 2017 12:47
Posts: 42
In the same example I have added html file to the sd card which I can read and then write to the serial port but its not being read from browser.

char *indexPage3;

// read file from sd card
FAT32_Read(fhandle[0], ReadBuffer, fsize);

indexPage3 = ReadBuffer;
len += Ethernet_Intern_putConstString(indexPage3);


The device is pinging ok and the page is loading but without all the body. The image shows the page in google developer.

Is the Ethernet_Intern_putConstString function able to handle the ReadBuffer like this or does it need to be converted to a different cormat?

I have also used Ethernet_Intern_putString but the problem is still the same.
Thanks,

Mark.


Attachments:
screen.jpg
screen.jpg [ 46.58 KiB | Viewed 882 times ]
Top
 Profile  
 
PostPosted: 06 Sep 2017 15:46 
Offline
mikroElektronika team
User avatar

Joined: 02 Feb 2017 14:21
Posts: 697
Hi,

Are you able to read and write to the SD card without issues ?

Regards,

_________________
Dusan Poluga.


Top
 Profile  
 
PostPosted: 07 Sep 2017 15:42 
Offline

Joined: 31 Jan 2017 12:47
Posts: 42
Hi.

I can read and write to the sd card no problem. The issue seems to be with the size of the file. Its 1610 bytes. When I reduce it to below 1415 bytes it will load the page. So I tried to split into 2 and then transmit the 2 like as follows:

len += Ethernet_Intern_putString(indexPage3);
len += Ethernet_Intern_putString(indexPage4);


I think it has to do with the MTU being 1500 bytes. So how does one load a page thats over1500 bytes.

Thanks.


Top
 Profile  
 
PostPosted: 11 Sep 2017 08:54 
Offline
mikroElektronika team
User avatar

Joined: 02 Feb 2017 14:21
Posts: 697
Hi,

What compiler version are you using ?

Regards,

_________________
Dusan Poluga.


Top
 Profile  
 
PostPosted: 11 Sep 2017 10:13 
Offline

Joined: 31 Jan 2017 12:47
Posts: 42
Hi.

Its MikroC Pro for ARM Version 5.1.0.

Mark.


Top
 Profile  
 
PostPosted: 13 Sep 2017 10:31 
Offline
mikroElektronika team
User avatar

Joined: 02 Feb 2017 14:21
Posts: 697
Hi,

Can you attach your project?
So we can investigate this problem with the same code?

Regards,

_________________
Dusan Poluga.


Top
 Profile  
 
PostPosted: 13 Sep 2017 12:24 
Offline

Joined: 31 Jan 2017 12:47
Posts: 42
Hi.

I have attached the project. On line 318 I copy the sd card read buffer to a smaller size which is used for the webserver.

Thanks,

Mark.


Attachments:
LoadWebServerFromSDCard.zip [716.39 KiB]
Downloaded 29 times
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: