UDP between STM32-F4 Discovery boards

stm32-f4-udp

[The Backwoods Engineer] tested out a new accessory kit for the STM32-F4 Discovery board. The image above shows two boards communicating with the UDP protocol. Notice the extra PCB into which each Discovery board has been plugged. This is a third-party add-on which adds Ethernet, RS-232, SD card slot, and a connector for LCD or Camera. We’ve had one of these F4 Discovery boards on hand for a while and haven’t figured out a good way to connect external hardware to the huge dual pin-headers. This doesn’t solve the problem — the base board also includes dual headers to break-out all the pins — but having Ethernet, serial, and SD certainly reduces the need to add all that much more. The other drawback to the hardware is that the sample firmware is targeted at the IAR Embedded Workbench which is neither free, nor in the realm of affordable for hobbyists.

The NIC used on the baseboard has auto-crossover capabilities so the boards were connected using a regular Cat6 patch cable. This example has the boards constantly sending UDP packets with the module on the right reporting status information to a terminal via the serial connection.

23 thoughts on “UDP between STM32-F4 Discovery boards

  1. Thanks for posting this. I am planning on doing more posts on this new baseboard for the STM32F4-DISCOVERY.

    I’m also planning on converting at least some of the example projects to ARM gcc, so stay tuned.

    1. Nice work! If you want to take it up a notch, try getting ChibiOS or Contiki built. FreeRTOS is not, in my opinion, the best choice for networking. It comes with the Discovery, which is nice, but with those other two you get a lot more networking integrated. On a personal note, at the moment I’m sending some UDP data via some STM32L devices, in a wireless network, using average power = 120uW :P. I use OpenTag to get this low-power, but it is miles away from plug-and-play and it doesn’t support STM32F4. ChibiOS and Contiki are much closer to plug and play, and I believe that at least ChibiOS supports the Discovery F4. So, if I were in your shoes I would be trying to install one of those.

      1. I just finished up the initial port of Contiki to the F1 and am awaiting some feedback from the maintainers (it’s sitting as a pull request right now). After that, a base F4 port is on my list as well as some expansion of libopencm3 to support ethernet and USB on the F4x.

        1. ChibiOS is a cool RTOS but the documentation is a joke. There’s been several requests on the forum and elsewhere for a decent tutorial or guideline but they keep pointing to a stack of useless short tutorials covering several architectures and versions of their os. I found myself wading through sourcecode or other projects for hints on how to do basic tasks. I’m now rolling my own on top of CMSIS and it’s a doddle compared to chibi.

          Contiki is the way to go for projects that rely heavily on networking.

          1. I never found a problem with ChibiOS documentation (having done a few projects with it). In my opinion it is quite clear and easy to follow. Not quite as good as FreeRTOS’ documentation, but on the other hand there are much more features in ChibiOS.

          2. Replying to self to correct things.

            I restarted with ChibiOS on STM32F1 and STM32F4 and I have to admit that I was wrong. Once you get the setup right (halconf, mcuconf,chconf) it’s a breeze. Takes about an afternoon of browsing the demos and taking notes, after only 4 days it has become my favorite.

  2. Damn you HaD! I received an email a few days ago from STM about this board (and the LCD and the camera boards) and have been talking myself out of getting it. Quite successfully, too, I might add. Now, thanks to you I’ll *have to* spend $40 on one.

    (c:

    1. That looks pretty good in fact, much better that the expansion board mentioned by HaD. That one doesn’t even have a HS USB port…

  3. >haven’t figured out a good way to connect external hardware to the huge dual pin-headers.

    An old PATA cable might do the trick.

  4. There is a free version of IAR embedded Workbench, with a code size limit (32K for ARM). It’s a very efficient compiler so you an get a lot into 32K!

      1. hans,

        I turned to “crippleware” because I needed to get something up and running for a project. The IAR projects provided with the STM32F4-BB baseboards “just work”, without any fiddling with dependencies, libraries, etc. In my post at the link, I have asked for guys like you to create makefiles and project files for the open-source ARM compilers, so others can enjoy these projects? Give us a hand?

        1. I’m working on a telescope mount controller with an STM32F4 discovery board, using GCC and the ST libs. I’ll be committing that Real Soon Now ™. Got your blog bookmarked, so I’ll keep you informed.

    1. mike, in my tutorial at the link, I discuss the various compiler options. The 32K limited version of IAR will not compile most of the STM32F4-BB demos– I checked. The 30-day version will compile all of them

    1. Embest has FreeRTOS versionw of the UDP, TCP, and webserver demos, that are included with the distribution for the STM32F4-BB board. I had no need for an RTOS of any kind, since my project will use simple ISRs and a timer executive. If readers are interested in an RTOS, I recommend they download the distribution for the STM32F4-BB, which is linked from my project blog at http://www.backwoodsengineer.com, which HaD was so link to link with this post.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s