Skip to main content
ahmedzizou690
Associate III
May 31, 2014
Question

STM3221G-EVAL ETHERNET

  • May 31, 2014
  • 11 replies
  • 1771 views
Posted on May 31, 2014 at 16:51

I'm a student of University of Tunisia and I'm using IAR Embedded Workbench for ARM, v. 7.10, 32K Kickstart Edition on WIndows 7...

I am

currently

alternating

,

and my

first

project is to

establish communication between

my computer

and

STM3221g-eval

ethernet

connection

.

 

I

focused on creating

blocks

of the function that

will allow

to transform

a file request

by my client

(web

browser)

on appeal from

subroutine.

#!rocketscience
    This topic has been closed for replies.

    11 replies

    Tesla DeLorean
    Guru
    May 31, 2014
    Posted on May 31, 2014 at 17:23

    There should be a couple of ethernet examples under the Design Resources of the F2 chip you are using. For example the LwIP and IAP ones, the former has a simple web server, this could be modified using other code in the firmware library to read data off an SD card. I think I've had a discussion about an F2 or F4 (near identical for interfaces) http server using files off a card.

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    ahmedzizou690
    Associate III
    May 31, 2014
    Posted on May 31, 2014 at 18:23

    I do not know

    how to implement

    tcp

    / ip

    stack

    in the board,

    and

    how to initialize

    the

    Ethernet

    Port

    ...

    Tesla DeLorean
    Guru
    May 31, 2014
    Posted on May 31, 2014 at 18:40

    Google ''STM3221G-EVAL''

    http://www.st.com/web/en/catalog/tools/PF251702

    Click ''DESIGN RESOURCES'' tab

    Download board and platform examples

    Google ''

    STM32F217IG

    ''

    http://www.st.com/web/en/catalog/mmc/FM141/SC1169/SS1575/LN9/PF250172

    Click ''DESIGN RESOURCES'' tab

    Search ''TCP'' or ''LWIP''

    http://www.st.com/web/en/catalog/tools/PF257896

    Scroll to the bottom, Click DOWNLOAD

    There should be examples in there of a web server, and other TCP/IP examples, using Ethernet, and initializing your board's hardware. REVIEW
    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    ahmedzizou690
    Associate III
    May 31, 2014
    Posted on May 31, 2014 at 19:35

    when running the example of tcp_echo_server the LCD display this error '' Ethernet Init failed ''

    Tesla DeLorean
    Guru
    May 31, 2014
    Posted on May 31, 2014 at 20:03

    Ok,. you'll want to review documentation for your board, and any associated README.TXT type file with the source. You might have to configure specific jumper setting, or settings within the code, depending on how the clocks are generated (external crystal vs MCO pin PA8), MII/RMII modes of PHY, etc.

    Think also how device is cabled. Standard cable to a hub/switch, a cross-over cable if connected directly to a PC. The latter might also have issue with the assignment of IP address fixed, or via DHCP. I would generally connect to a router/nat type device that provided DHCP based IP in common subdomain to PC and EVAL board.
    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    ahmedzizou690
    Associate III
    June 1, 2014
    Posted on June 01, 2014 at 19:35

    ahmedzizou690
    Associate III
    June 1, 2014
    Posted on June 01, 2014 at 19:36

    clive1,

    thank you very much for your advice ..

    the problem is that I am a beginner in the world of stm32 and I must make an application in 5 days establishing the communication between the board stm3221G-EVAL and a client { web browser} ethernet connection

    with the notion of the web server.

    I know this is a stupid app for you , but I find it difficult to achieve.

    If you can

    spend some

    of your time to

    help me

    and i would be grateful

    thanks.

    Tesla DeLorean
    Guru
    June 1, 2014
    Posted on June 02, 2014 at 00:05

    Still, you really should be old enough to do this by yourself, and I learn nothing from the exercise.

    Make sure your board is jumpered correctly, and that the software you are building has the right configurations. That the network setting for the MAC and IP addresses are appropriate for what you are attaching it too. If this is not a new board you might want to check the clocks look right and nothing has been modified.

    http://www.st.com/st-web-ui/static/active/en/resource/technical/document/user_manual/DM00025pdf

    pg 17? STM32F2x7_ETH_LwIP_V1.1.0\Project\Standalone\httpserver\EWARM\Project.eww STM32F2x7_ETH_LwIP_V1.1.0\Project\Standalone\httpserver\inc\main.h

    /* MII and RMII mode selection, for STM322xG-EVAL Board(MB786) RevB ***********/
    //#define RMII_MODE // User have to provide the 50 MHz clock by soldering a 50 MHz
    // oscillator (ref SM7745HEV-0M or equivalent) on the U3
    // footprint located under CN3 and also removing jumper on JP5.
    // This oscillator is not provided with the board.
    // For more details, please refer to STM3220G-EVAL evaluation
    // board User manual (UM1057).
    #define MII_MODE
    /* Uncomment the define below to clock the PHY from external 25MHz crystal (only for MII mode) */
    #ifdef MII_MODE
    #define PHY_CLOCK_MCO
    #endif
    /* STM322xG-EVAL jumpers setting
    +==========================================================================================+
    + Jumper | MII mode configuration | RMII mode configuration +
    +==========================================================================================+
    + JP5 | 2-3 provide 25MHz clock by MCO(PA8) | Not fitted +
    + | 1-2 provide 25MHz clock by ext. Crystal | +
    + -----------------------------------------------------------------------------------------+
    + JP6 | 2-3 | 1-2 +
    + -----------------------------------------------------------------------------------------+
    + JP8 | Open | Close +
    +==========================================================================================+
    */

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    ahmedzizou690
    Associate III
    June 2, 2014
    Posted on June 02, 2014 at 15:22

    clive1

    I made

    this step

    ..

    but the problem of

    the initiation of

    the port

    ethernet

    remains

    ...

    I get

    always

    this

    error

    ''

    ETHERNET

    INIT

    FAILED''

    ..

    thank you

    Tesla DeLorean
    Guru
    June 2, 2014
    Posted on June 02, 2014 at 16:50

    I don't have your board, you'll need to get a scope out and verify you have the clock signals where you expect them, and the jumpers as required.

    Then you want to use your debugger, and understand at what point, and for what reason, the initialization fails. The software in question is designed for your board, be sure to pick the ''STM3221G-EVAL'' as the target.
    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..