en.DM00103145.pdf - UM1709 User manual STM32Cube Ethernet IAP example Introduction The STMCube initiative was originated by STMicroelectronics to ease

en.DM00103145.pdf - UM1709 User manual STM32Cube Ethernet...

This preview shows page 1 - 5 out of 19 pages.

May 2015 DocID025701 Rev 3 1/19 1 UM1709 User manual STM32Cube Ethernet IAP example Introduction The STMCube™ initiative was originated by STMicroelectronics to ease developers’ life by reducing development efforts, time and cost. STM32Cube covers the STM32 portfolio. STM32Cube Version 1.x includes: The STM32CubeMX, a graphical software configuration tool that allows the generation of C initialization code using graphical wizards. A comprehensive embedded software platform, delivered per series (such as STM32CubeF4 for STM32F4 series) The STM32Cube HAL, an STM32 abstraction layer embedded software, ensuring maximized portability across STM32 portfolio A consistent set of middleware components such as RTOS, USB, STMTouch, FatFS and Graphics All embedded software utilities coming with a full set of examples. The In-Application Programming (IAP) is a way to program the flash memory while code execution from the same flash. It provides the possibility to load an application code using high speed communication protocols. This user manual is intended for developers who use STM32Cube firmware on STM32 microcontrollers. It provides a full description of how to implement In-Application Programming (IAP) using Ethernet communication. Two possible solutions are provided on top of the LwIP TCP/IP stack: IAP using TFTP (Trivial File Transfer Protocol) IAP using HTTP (Hypertext Transfer Protocol) Note: This document is applicable to all STM32 series featuring an Ethernet peripheral. However, for simplicity reason, STM32F4xx microcontrollers and STM32CubeF4 are used as reference platform. The same description, file names and screenshot are applicable as well to other series offering Ethernet connectivity, such as STM32F107xx, STM32F2x7xx and STM32F7xx. To know more about the Ethernet IAP example implementation on your STM32 Series, refer to the documentation provided within the associated STM32Cube firmware package.
Image of page 1
Contents UM1709 2/19 DocID025701 Rev 3 Contents 1 IAP overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.1 Theory of operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.2 IAP using the MCU Ethernet interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.3 Implementing IAP over the Ethernet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.3.1 IAP method using TFTP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.3.2 IAP method using HTTP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2 IAP using TFTP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.1 TFTP overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.2 Implementing IAP using TFTP for STM32F4xx . . . . . . . . . . . . . . . . . . . . . 8 2.3 Using the firmware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 3 IAP using HTTP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 3.1 HTTP file upload overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 3.2 Implementing IAP using HTTP for STM32F4xx . . . . . . . . . . . . . . . . . . . . 10 3.3 Using the firmware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 4 Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 4.1 Application settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 4.1.1 PHY interface configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 4.1.2 MAC and IP address settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 4.2 Evaluation boards settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 4.3 Firmware file organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 4.4 Building an image for IAP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 5 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Appendix A FAQ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 A.1 How to choose between static or dynamic (DHCP) IP address allocation 17 A.2 How the application behaves when the Ethernet cable is disconnected. . 17 A.3 How to port the application on a different hardware . . . . . . . . . . . . . . . . . 17 6 Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Image of page 2
DocID025701 Rev 3 3/19 UM1709 List of tables 3 List of tables Table 1. TFTP opcode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Table 2. Files organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Table 3. Document revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Image of page 3
List of figures UM1709 4/19 DocID025701 Rev 3 List of figures Figure 1.
Image of page 4
Image of page 5

You've reached the end of your free preview.

Want to read all 19 pages?

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture