Processors. STMicroelectronics STM32 F1
विज्ञापन
विज्ञापन
CHAPTER 17. NEXT STEPS
17.1 Processors
The STM32 F100 micro-controller used on the VL Discovery board is one member of a series of STM32 F1xx components which includes:
• Value line STM32 F100 – 24 MHz CPU with motor control and CEC functions
• Access line STM32 F101 – 36 MHz CPU, upt to 1 MByte Flash
• USB Access line STM32 F102 – 48 MHz with USB file system
• Performance line STM32 F103 – 72 MHz, up to 1 Mbyte Flash with motor control, USB and CAN
• Connectivity line STM32 F105/STM32 F107 – 72 MHz CPU with Ethernet MAC, CAN and USB 2.0 OTG
All of these lines of components utilize the same standard peripheral libraries. They do require modifications to the linker script (particularly the definitions of memory regions) and startup code (the definitions of exception vectors); however neither task is difficult. They also include peripherals that you have not seen including support for external memory (FSMC), a higher level SD interface (SDIO) and communication interfaces such as USB, Ethernet, and CAN. The communication interfaces generally require significant additional software libraries and can be very difficult (e.g. USB) to debug.
All of the examples from this book should work without modification on any processor from the the STM32F1xx families. A few changes will be required to the files in the template directory provided with this book. The linker script from STM32-Template needs the following modification:
MEMORY
{
RAM (rwx) : ORIGIN = 0x20000000 , LENGTH = 8K
FLASH (rx) : ORIGIN = 0x08000000 , LENGTH = 128K
}
[frame=none]
The lengths of the two memory regions should be modified to reflect the component being use. Makefile.common needs to have its LDSCRIPT, PTYPE,
STARTUP variables modified as appropriate. Finally, the vector table in startup_stm32f10x.c will need to be updated to reflect the vectors in the
236
Revision: 1396a85 (2013-01-07)
17.1. PROCESSORS part family being used. The standard peripheral library includes assembly language startup files that may serve as a guide. Note that the vector table ends with a “magic” number that is necessary if you build projects to boot out of SRAM.
There are additional STM32 families including STM32 F0 (Cortex-M0 based), STM32 L1 (Ultra low-power Cortex-M3), STM32 F2 (high performance Cortex-M3 – 120MHz), and STM32 F4/F3 (Cortex-M4 based). Each of these requires using a different standard peripheral library. Although many of the peripherals are the same or enhancements of those in the STM32 F1 series, some care will be required to port the code in this document to these devices. There are extremely attractive “discovery boards” for the STM32 L1,
STM32 F0, and STM32 F4 parts which are worth investigating. At this time, the gdb interface code used in this document supports all but the STM32
F0 device; however, it appears that openocd openocd.sourceforge.net can support them all.
For the reasons described above, the simplest upgrade from the STM32F100 is another member of the STM32F1xx family. Sparkfun sells a header board for the STM32F103 with 20K bytes of RAM and 128K bytes of flash for approximately $40. – the same board is also carried by Mouser. This board, produced by Olimex, also has a USB connector as the STM32F103 has a USB slave peripheral (not for the faint of heart !). Several similar development boards are available from various ebay vendors for $15-$25. For roughly $30 it is possible to buy an STM32F103 board with a 2.8” TFT touch-screen on ebay. There are excellent value and support high performance graphics through the FSMC parallel interface peripheral of the STM32F103.
Most of the readily available STM32 boards provide a standard JTAG connector for the debugger interface. While it is feasible to use the STM32VL
Discovery board to communicate with this interface, the wiring issues may become annoying. ST sells a separate ST-LINK/V2 debugger module which interfaces directly to the JTAG connector. This module is available from both
Mouser (www.mouser.com) and Digikey (www.digikey.com) for approximately
$22 and would be a good investment for working with STM32 boards. The
ST-link/V2 protocol is supported by the gdb driver used in this document – indeed it cause fewer issues in an OS X or Linux environment that the V1 protocol.
As mentioned above, more powerful displays generally require using a parallel interface such as the FSMC provided by the STM32 F103. Taking advantage of the enhanced capabilities requires a more sophisticated graphics
Revision: 1396a85 (2013-01-07)
237
डाउनलोड
विज्ञापन