AN1905 ST Microelectronics, Inc., AN1905 Datasheet - Page 11

no-image

AN1905

Manufacturer Part Number
AN1905
Description
St7mc Three-phase BLDC Motor Control Software Library
Manufacturer
ST Microelectronics, Inc.
Datasheet
2 CUSTOMIZING THE WORKSPACE FOR YOUR ST7MC DERIVATIVE
2.1 USING STVD7 RELEASE 2.5.X
Figure 3. Memory Map
The ST7MC memory is shown on
the type of the MCU. Please refer to the datasheet in order to get more information.
The library is dedicated by default to the ST7FMC2N6B6 MCU (SDIP56, 32KB Flash, 1K
RAM). In order to target another ST7MC MCU, you may need to modify the C-toolchain con-
figuration files. Here’s a basic example of what has to be done prior to any other modifications.
This example is based onto the ST7FMC2S4 MCU (TQFP 44, 16K Flash, 768 Bytes RAM)
2.1.1 Memory mapping with the COSMIC toolchain
This section contains the memory placement for the object files, listed just after this declaration.
In order to target the memory size of the ST7MC2S4, the sizes of ROM and RAM memory have to be
changed (32K -> 16K Flash, 1K RAM -> 768 Bytes RAM)
# SEGMENT DEFINITION (.text, .const, .data, .bss, .bsct, .ubsct, .eeprom are c compiler
predefined sections)
+seg .text -b0x8000 -m0x7f00 -nCODE -sROM
+seg .const -aCODE -it -sROM
+seg .bsct -b0x0080 -m0x007F -nZPAGE -sRAM
+seg .ubsct -aZPAGE -nUZPAGE -sRAM
+seg .share -aUZPAGE -is -sRAM
+seg .bss -b0x0200 -m0x0280 -nUDATA -sRAM
+seg .data -aUDATA -nIDATA -sRAM
Go into the ..\BLDC sensorless\config\Cosmic\ folder ( ..\BLDC sensor\config\Cosmic\ for
sensor driving mode).
Edit the "BLDC_Cosmic.lkf" file and check the following lines, in ‘SEGMENT DEFINITION’:
FFFFh
FFDFh
FFE0h
0FFFh
0000h
0080h
0680h
007Fh
067Fh
1000h
(60K, 48K, 32K, 24K, 8K)
Interrupt & Reset Vectors
Program Memory
768/384 Bytes)
HW Registers
(1536/1024
Reserved
ST7MC THREE-PHASE BLDC MOTOR CONTROL SOFTWARE LIBRARY
RAM
Figure
or 037Fh
or 047Fh
or 067Fh
00FFh
01FFh
0080h
0100h
0200h
01FFh
3. The memory arrangement may vary depending on
# executable code
# constants and strings
# initialized variables in SHORT range
# uninitialized variables in SHORT range
# shared segment
# uninitialized variables
# initialized variables
16-bit Addressing
Short Addressing
RAM (zero page)
256 Bytes Stack
RAM
4000h
1000h
8000h
FFFFh
A000h
E000h
60 KBytes
48 KBytes
8 KBytes
32 KBytes
24 KBytes
11/77

Related parts for AN1905