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

no-image

AN1905

Manufacturer Part Number
AN1905
Description
St7mc Three-phase BLDC Motor Control Software Library
Manufacturer
ST Microelectronics, Inc.
Datasheet
ST7MC THREE-PHASE BLDC MOTOR CONTROL SOFTWARE LIBRARY
+seg .text
where 0xc000 is the new starting address of the program memory and 0x3fe0 the size in
bytes.
+seg .bss
where 0x0180 is the new 16-bit addressing RAM memory in bytes.
2.1.2 Memory mapping with the METROWERKS toolchain
This Section contains the memory locations of pages declared at the end of this file.
To target the memory size of the ST7MC2S4, ROM and RAM memory settings have to be changed (32K
ROM_SEC_2 = READ_ONLY 0xC000 TO 0xDFFF; // sector 2
where 0xc000 is the new starting address of the program memory
RAM
where 0x027F is the ending address of the 16-bit addressing RAM memory
Important Note:
2.2 USING STVD7 RELEASE 3.X.X
The procedure is far easier with STVD7 3.x.x, as the makefile and linking command files are
automatically generated.
In the workspace window, just right click on the selected project (either cosmic or metrowerks)
and select “Add Files to Project”. You’ll be asked to select the source file.
12/77
-> 16K Flash, 1K RAM -> 768 Bytes RAM).
SECTIONS
Go into ..\BLDC sensorless\config\Metrowerks ( ..\BLDC sensor\config\Metrowerks\ for sensor driving
mode).
Edit the "BLDC_Metrowerks.prm" file
ZRAM = READ_WRITE 0x0080 TO 0x00FF;
RAM = READ_WRITE 0x0200 TO 0x047F; // 16 bit adressing RAM
ROM_SEC_2 = READ_ONLY 0x8000 TO 0xDFFF; // sector 2
ROM_SEC_1 = READ_ONLY 0xE000 TO 0xEFFF; // sector 1
ROM_SEC_0 = READ_ONLY 0xF000 TO 0xFEFF; // sector 0 - 0xFF00 to 0xFFDF reserved for ICC
= READ_WRITE 0x0200 TO 0x027F; // 16-bit addressing RAM
-b0xc000 -m0x3f00 -nCODE -sROM
-b0x0200 -m0x0180 -nUDATA -sRAM
The application layer has been written for the STMFC2NB6. Using a
different ST7MC sales type can imply the need for some modifications
to the library, according to the available features (some of the I/O ports
are not present on low-pin count packages). Please refer to the data
sheet for details.
// zeropage
# executable code
# uninitialized variables

Related parts for AN1905