Skip to main content
prabanarak1989
Visitor II
August 21, 2012
Question

stm32f107 ethernet tcp or udp

  • August 21, 2012
  • 5 replies
  • 2203 views

Posted on August 21, 2012 at 10:15

hi, i am using stm32f107vc.. for ethernet programming which one is good? TCP or UDP... i just use the ethernet communication for transferring sensor data..i am new to ethernet and stm32f107...i am using dp83848... i need some example codes... how to use tcp or udp in programming...

This topic has been closed for replies.

5 replies

Tesla DeLorean
Guru
August 21, 2012
Posted on August 21, 2012 at 14:27

Use Google... Ethernet uses 802.3 frames... Pick an appropriate protocol... for task at hand... read some manuals... and RFCs... Look at LwIP and other protocol stacks... Berkeley Sockets... ???

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
Andrew Neil
Super User
August 21, 2012
Posted on August 21, 2012 at 23:36

''for ethernet programming which one is good? TCP or UDP''

 

If either one were ''good'', and the other not, why would both exist?!

Of course, they are both good in their own ways; each has its own advantages & disadvantages, and these have nothing to do with the STM32 - so any general site, tutorial, book, paper, or whatever will be applicable.

Note that they don't even have anything specifically to do with ethernet; they are both carried over IP (the Internet Protocol) - which can be carried over many different lower-level ''bearers''.

Again, this is general networking stuff - nothing specifically to do with the STM32.

Try googling, ''7-Layer Model''...

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
amin23
Visitor II
August 23, 2012
Posted on August 23, 2012 at 10:50

Hi,

LwIP stack has been ported on STM32F107, STM32F2 and STM32F4 devices, have a look at the following Application notes:

AN3102 for STM32F107

http://www.st.com/internet/mcu/product/221027.jsp

, AN3384 for STM32F2

http://www.st.com/internet/mcu/product/250172.jsp

and AN3966 for STM32F4

http://www.st.com/internet/mcu/product/252139.jsp

.

If you need TCP and UDP example codes, the STM32F2 and STM32F4 packages contain simple TCP and UDP examples, you can port them on STM32F107 easily.

mnavahan2
Associate
November 25, 2012
Posted on November 25, 2012 at 14:41

Tesla DeLorean
Guru
November 25, 2012
Posted on November 25, 2012 at 15:08

Perhaps you can expand on why the cited examples are not simple enough for your purposes?

Perhaps elucidating on what chip and board you're using, what you've tried, where you're stuck.
Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..