English
Language : 

AN1905 Datasheet, PDF (12/77 Pages) STMicroelectronics – ST7MC THREE-PHASE BLDC MOTOR CONTROL SOFTWARE LIBRARY
ST7MC THREE-PHASE BLDC MOTOR CONTROL SOFTWARE LIBRARY
+seg .text -b0xc000 -m0x3f00 -nCODE -sROM
# executable code
where 0xc000 is the new starting address of the program memory and 0x3fe0 the size in
bytes.
+seg .bss -b0x0200 -m0x0180 -nUDATA -sRAM # uninitialized variables
where 0x0180 is the new 16-bit addressing RAM memory in bytes.
2.1.2 Memory mapping with the METROWERKS toolchain
Go into ..\BLDC sensorless\config\Metrowerks ( ..\BLDC sensor\config\Metrowerks\ for sensor driving
mode).
Edit the "BLDC_Metrowerks.prm" file
SECTIONS
ZRAM = READ_WRITE 0x0080 TO 0x00FF;
// zeropage
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
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
-> 16K Flash, 1K RAM -> 768 Bytes RAM).
ROM_SEC_2 = READ_ONLY 0xC000 TO 0xDFFF; // sector 2
where 0xc000 is the new starting address of the program memory
RAM = READ_WRITE 0x0200 TO 0x027F; // 16-bit addressing RAM
where 0x027F is the ending address of the 16-bit addressing RAM memory
Important Note:
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.
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