creata timeline con tempi in decimi
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
<provider-reference id="org.eclipse.cdt.ui.UserLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="-926139709518735970" id="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="MCU ARM GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||
<provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="1980045256490408098" id="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="MCU ARM GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||
<language-scope id="org.eclipse.cdt.core.gcc"/>
|
||||
<language-scope id="org.eclipse.cdt.core.g++"/>
|
||||
</provider>
|
||||
@@ -16,7 +16,7 @@
|
||||
<provider-reference id="org.eclipse.cdt.ui.UserLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="-926139709518735970" id="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="MCU ARM GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||
<provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="1980045256490408098" id="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="MCU ARM GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||
<language-scope id="org.eclipse.cdt.core.gcc"/>
|
||||
<language-scope id="org.eclipse.cdt.core.g++"/>
|
||||
</provider>
|
||||
@@ -27,7 +27,7 @@
|
||||
<provider-reference id="org.eclipse.cdt.ui.UserLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="-926139709518735970" id="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="MCU ARM GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||
<provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="1980045256490408098" id="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="MCU ARM GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||
<language-scope id="org.eclipse.cdt.core.gcc"/>
|
||||
<language-scope id="org.eclipse.cdt.core.g++"/>
|
||||
</provider>
|
||||
@@ -38,7 +38,7 @@
|
||||
<provider-reference id="org.eclipse.cdt.ui.UserLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="-926139709518735970" id="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="MCU ARM GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||
<provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="1980045256490408098" id="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="MCU ARM GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||
<language-scope id="org.eclipse.cdt.core.gcc"/>
|
||||
<language-scope id="org.eclipse.cdt.core.g++"/>
|
||||
</provider>
|
||||
|
||||
@@ -56,36 +56,10 @@ typedef enum{
|
||||
omM4bw2,
|
||||
omStopMan,
|
||||
omapertura0,
|
||||
omapertura1,
|
||||
omapertura2,
|
||||
omapertura3,
|
||||
omapertura4,
|
||||
omapertura5,
|
||||
omapertura6,
|
||||
omapertura7,
|
||||
omapertura8,
|
||||
omapertura9,
|
||||
omapertura10,
|
||||
omapertura11,
|
||||
omapertura12,
|
||||
omapertura13,
|
||||
omapertura14,
|
||||
omstopapertura,
|
||||
omaperto,
|
||||
omchiusura1,
|
||||
omchiusura2,
|
||||
omchiusura3,
|
||||
omchiusura4,
|
||||
omchiusura5,
|
||||
omchiusura6,
|
||||
omchiusura7,
|
||||
omchiusura8,
|
||||
omchiusura9,
|
||||
omchiusura10,
|
||||
omchiusura11,
|
||||
omchiusura12,
|
||||
omchiusura13,
|
||||
omchiusura14,
|
||||
|
||||
omstopchiusura,
|
||||
}omCiclo_st;
|
||||
/* USER CODE END ET */
|
||||
|
||||
@@ -32,6 +32,24 @@ uint8_t ramp(uint8_t mot,uint8_t dir,uint8_t percStart,uint8_t percEnd,uint8_t t
|
||||
#define FWMot4 TIM_CHANNEL_3
|
||||
#define BWMot4 TIM_CHANNEL_4
|
||||
|
||||
#define P1START 0x01
|
||||
#define P1STOP 0x02
|
||||
#define P2START 0x04
|
||||
#define P2STOP 0x08
|
||||
#define M1FW 0x10
|
||||
#define M1BW 0x20
|
||||
#define M2FW 0x40
|
||||
#define M2BW 0x80
|
||||
#define M3FW 0x100
|
||||
#define M3BW 0x200
|
||||
#define M4FW 0x400
|
||||
#define M4BW 0x800
|
||||
|
||||
#define M1 1
|
||||
#define M2 2
|
||||
#define M3 3
|
||||
#define M4 4
|
||||
|
||||
#define FW 0
|
||||
#define BW 1
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "eeprom.h"
|
||||
|
||||
extern UART_HandleTypeDef huart1;
|
||||
/*
|
||||
* Record format (4 bytes):
|
||||
* [0] VirtAddress (uint16_t)
|
||||
@@ -18,10 +20,10 @@ extern uint16_t m3pwmap;
|
||||
extern uint16_t m3pwmch;
|
||||
extern uint16_t m4pwmap;
|
||||
extern uint16_t m4pwmch;
|
||||
extern uint16_t t1ap;
|
||||
extern uint16_t t2ap;
|
||||
extern uint16_t t3ap;
|
||||
extern uint16_t t4ap;
|
||||
extern uint16_t m1TimeoutMan;
|
||||
extern uint16_t m2TimeoutMan;
|
||||
extern uint16_t m3TimeoutMan;
|
||||
extern uint16_t m4TimeoutMan;
|
||||
extern uint16_t twap;
|
||||
extern uint16_t tramp;
|
||||
extern uint16_t t1ch;
|
||||
@@ -36,7 +38,25 @@ extern uint16_t m2pwmMan;
|
||||
extern uint16_t m3pwmMan;
|
||||
extern uint16_t m4pwmMan;
|
||||
|
||||
const uint8_t deftab[EE_NUM_VIRTUAL_ADDR]={
|
||||
|
||||
extern uint16_t apM1start;
|
||||
extern uint16_t apM1stop;
|
||||
extern uint16_t apM2start;
|
||||
extern uint16_t apM2stop;
|
||||
extern uint16_t apM3start;
|
||||
extern uint16_t apM3stop;
|
||||
extern uint16_t apM4start;
|
||||
extern uint16_t apM4stop;
|
||||
extern uint16_t chM1start;
|
||||
extern uint16_t chM1stop;
|
||||
extern uint16_t chM2start;
|
||||
extern uint16_t chM2stop;
|
||||
extern uint16_t chM3start;
|
||||
extern uint16_t chM3stop;
|
||||
extern uint16_t chM4start;
|
||||
extern uint16_t chM4stop;
|
||||
|
||||
const uint16_t deftab[EE_NUM_VIRTUAL_ADDR]={
|
||||
40, //m1pwmap
|
||||
60, //m1pwmch
|
||||
70, //m2pwmap
|
||||
@@ -49,10 +69,10 @@ const uint8_t deftab[EE_NUM_VIRTUAL_ADDR]={
|
||||
20, //m2rampstart
|
||||
20, //m3rampstart
|
||||
20, //m4rampstart
|
||||
28, //t1ap
|
||||
4, //t2ap
|
||||
10, //t3ap
|
||||
40, //t4ap
|
||||
230,//m1timeoutman
|
||||
100,//m2timeoutman
|
||||
130,//m3timeoutman
|
||||
300,//m4timeoutman
|
||||
1, //twap
|
||||
27, //t1ch
|
||||
10, //t2ch
|
||||
@@ -69,22 +89,22 @@ const uint8_t deftab[EE_NUM_VIRTUAL_ADDR]={
|
||||
40, //m4pwmMan
|
||||
50, //trampman
|
||||
10, //tramp
|
||||
40,
|
||||
60,
|
||||
70,
|
||||
70,
|
||||
35,
|
||||
40,
|
||||
40,
|
||||
40,
|
||||
20,
|
||||
20,
|
||||
20,
|
||||
20,
|
||||
28,
|
||||
4,
|
||||
10,
|
||||
40,
|
||||
310, //apM1start;
|
||||
450, //apM1stop;
|
||||
30, //apM2start;
|
||||
310, //apM2stop;
|
||||
350, //apM3start;
|
||||
450, //apM3stop;
|
||||
450, //apM4start;
|
||||
850, //apM4stop;
|
||||
10, //chM1start;
|
||||
280, //chM1stop;
|
||||
280, //chM2start;
|
||||
580, //chM2stop;
|
||||
20, //chM3start;
|
||||
280, //chM3stop;
|
||||
280, //chM4start;
|
||||
680, //chM4stop;
|
||||
1,
|
||||
27,
|
||||
10,
|
||||
@@ -403,6 +423,7 @@ uint16_t EE_WriteVariable(uint16_t VirtAddress, uint16_t Data)
|
||||
}
|
||||
|
||||
void loadEE(void){
|
||||
char s [200];
|
||||
EEW_Read(M1PWMAP, &m1pwmap);
|
||||
EEW_Read(M1PWMCH, &m1pwmch);
|
||||
EEW_Read(M2PWMAP, &m2pwmap);
|
||||
@@ -411,16 +432,11 @@ void loadEE(void){
|
||||
EEW_Read(M3PWMCH, &m3pwmch);
|
||||
EEW_Read(M4PWMAP, &m4pwmap);
|
||||
EEW_Read(M4PWMCH, &m4pwmch);
|
||||
EEW_Read(T1AP, &t1ap);
|
||||
EEW_Read(T2AP, &t2ap);
|
||||
EEW_Read(T3AP, &t3ap);
|
||||
EEW_Read(T4AP, &t4ap);
|
||||
EEW_Read(TWAP, &twap);
|
||||
EEW_Read(T1CH, &t1ch);
|
||||
EEW_Read(T2CH, &t2ch);
|
||||
EEW_Read(T3CH, &t3ch);
|
||||
EEW_Read(T4CH, &t4ch);
|
||||
EEW_Read(TWCH, &twch);
|
||||
EEW_Read(M1TIMEOUTMAN, &m1TimeoutMan);
|
||||
EEW_Read(M2TIMEOUTMAN, &m2TimeoutMan);
|
||||
EEW_Read(M3TIMEOUTMAN, &m3TimeoutMan);
|
||||
EEW_Read(M4TIMEOUTMAN, &m4TimeoutMan);
|
||||
|
||||
EEW_Read(TRAMP1, &tramp1);
|
||||
EEW_Read(M1PWMMAN, &m1pwmMan);
|
||||
EEW_Read(M2PWMMAN, &m2pwmMan);
|
||||
@@ -428,4 +444,34 @@ void loadEE(void){
|
||||
EEW_Read(M4PWMMAN, &m4pwmMan);
|
||||
EEW_Read(TRAMPMAN, &trampman);
|
||||
EEW_Read(TRAMP, &tramp);
|
||||
|
||||
EEW_Read(APM1START,&apM1start);
|
||||
EEW_Read(APM1STOP ,&apM1stop);
|
||||
EEW_Read(APM2START,&apM2start);
|
||||
EEW_Read(APM2STOP ,&apM2stop);
|
||||
EEW_Read(APM3START,&apM3start);
|
||||
EEW_Read(APM3STOP ,&apM3stop);
|
||||
EEW_Read(APM4START,&apM4start);
|
||||
EEW_Read(APM4STOP ,&apM4stop);
|
||||
EEW_Read(CHM1START,&chM1start);
|
||||
EEW_Read(CHM1STOP ,&chM1stop);
|
||||
EEW_Read(CHM2START,&chM2start);
|
||||
EEW_Read(CHM2STOP ,&chM2stop);
|
||||
EEW_Read(CHM3START,&chM3start);
|
||||
EEW_Read(CHM3STOP ,&chM3stop);
|
||||
EEW_Read(CHM4START,&chM4start);
|
||||
EEW_Read(CHM4STOP ,&chM4stop);
|
||||
|
||||
sprintf((char*)s,"LoadEE\n");
|
||||
HAL_UART_Transmit(&huart1,(uint8_t*) s, strlen(s), HAL_MAX_DELAY);
|
||||
sprintf((char*)s,"\nm1pwmap=%d m1pwmch=%d m2pwmap=%d m2pwmch=%d m3pwmap=%d m3pwmch=%d m4pwmap=%d m4pwmch=%d",m1pwmap,m1pwmch,m2pwmap,m2pwmch,m3pwmap,m3pwmch,m4pwmap, m4pwmch);
|
||||
HAL_UART_Transmit(&huart1,(uint8_t*) s, strlen(s), HAL_MAX_DELAY);
|
||||
sprintf((char*)s,"\nm1TimeoutMan=%d m2TimeoutMan=%d m3TimeoutMan=%d m4TimeoutMan=%d ",m1TimeoutMan,m2TimeoutMan,m3TimeoutMan,m4TimeoutMan);
|
||||
HAL_UART_Transmit(&huart1,(uint8_t*) s, strlen(s), HAL_MAX_DELAY);
|
||||
sprintf((char*)s,"\ntramp=%d trampman=%d",tramp,trampman);
|
||||
HAL_UART_Transmit(&huart1,(uint8_t*) s, strlen(s), HAL_MAX_DELAY);
|
||||
sprintf((char*)s,"\nm1pwmMan=%d m2pwmMan=%d m3pwmMan=%d m4pwmMan=%d",m1pwmMan,m2pwmMan,m3pwmMan,m4pwmMan);
|
||||
HAL_UART_Transmit(&huart1,(uint8_t*) s, strlen(s), HAL_MAX_DELAY);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -78,16 +78,10 @@ typedef enum
|
||||
#define M2RAMPSTART 9 //m2rampstart
|
||||
#define M3RAMPSTART 10 //m3rampstart
|
||||
#define M4RAMPSTART 11 //m4rampstart
|
||||
#define T1AP 12 //t1ap
|
||||
#define T2AP 13 //t2ap
|
||||
#define T3AP 14 //t3ap
|
||||
#define T4AP 15 //t4ap
|
||||
#define TWAP 16 //twap
|
||||
#define T1CH 17 //t1ch
|
||||
#define T2CH 18 //t2ch
|
||||
#define T3CH 19 //t3ch
|
||||
#define T4CH 20 //t4ch
|
||||
#define TWCH 21 //twch
|
||||
#define M1TIMEOUTMAN 12 //timeout M1 manuale
|
||||
#define M2TIMEOUTMAN 13 //timeout M2 manuale
|
||||
#define M3TIMEOUTMAN 14 //timeout M3 manuale
|
||||
#define M4TIMEOUTMAN 15 //timeout M4 manuale
|
||||
|
||||
#define TRAMP1 25 //tramp1
|
||||
#define M1PWMMAN 26 //m1pwmMan
|
||||
@@ -97,6 +91,23 @@ typedef enum
|
||||
#define TRAMPMAN 30 //trampman
|
||||
#define TRAMP 31 //tramp
|
||||
|
||||
#define APM1START 32 //apM1start;
|
||||
#define APM1STOP 33 //apM1stop;
|
||||
#define APM2START 34 //apM2start;
|
||||
#define APM2STOP 35 //apM2stop;
|
||||
#define APM3START 36 //apM3start;
|
||||
#define APM3STOP 37 //apM3stop;
|
||||
#define APM4START 38 //apM4start;
|
||||
#define APM4STOP 39 //apM4stop;
|
||||
#define CHM1START 40 //chM1start;
|
||||
#define CHM1STOP 41 //chM1stop;
|
||||
#define CHM2START 42 //chM2start;
|
||||
#define CHM2STOP 43 //chM2stop;
|
||||
#define CHM3START 44 //chM3start;
|
||||
#define CHM3STOP 45 //chM3stop;
|
||||
#define CHM4START 46 //chM4start;
|
||||
#define CHM4STOP 47 //chM4stop;
|
||||
|
||||
|
||||
/* Virtual address table (defined in eeprom.c, can be customized) */
|
||||
extern const uint16_t EE_VirtAddrs[EE_NUM_VIRTUAL_ADDR];
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include "pwm.h"
|
||||
#include "adc.h"
|
||||
#include "debug.h"
|
||||
#include "mot.h"
|
||||
/* USER CODE END Includes */
|
||||
|
||||
/* Private typedef -----------------------------------------------------------*/
|
||||
@@ -38,27 +39,13 @@ typedef enum{
|
||||
bzmoving,
|
||||
bzwarning,
|
||||
}stBuz_st;
|
||||
|
||||
|
||||
/* USER CODE END PTD */
|
||||
|
||||
/* Private define ------------------------------------------------------------*/
|
||||
/* USER CODE BEGIN PD */
|
||||
#define P1START 0x01
|
||||
#define P1STOP 0x02
|
||||
#define P2START 0x04
|
||||
#define P2STOP 0x08
|
||||
#define M1FW 0x10
|
||||
#define M1BW 0x20
|
||||
#define M2FW 0x40
|
||||
#define M2BW 0x80
|
||||
#define M3FW 0x100
|
||||
#define M3BW 0x200
|
||||
#define M4FW 0x400
|
||||
#define M4BW 0x800
|
||||
|
||||
#define M1 1
|
||||
#define M2 2
|
||||
#define M3 3
|
||||
#define M4 4
|
||||
|
||||
/* USER CODE END PD */
|
||||
|
||||
@@ -104,10 +91,10 @@ uint16_t t2ap;
|
||||
uint16_t t3ap;
|
||||
uint16_t t4ap;
|
||||
uint16_t twap;
|
||||
uint16_t t1ch;
|
||||
uint16_t t2ch;
|
||||
uint16_t t3ch;
|
||||
uint16_t t4ch;
|
||||
uint16_t m1TimeoutMan;
|
||||
uint16_t m2TimeoutMan;
|
||||
uint16_t m3TimeoutMan;
|
||||
uint16_t m4TimeoutMan;
|
||||
uint16_t twch;
|
||||
uint16_t tramp;
|
||||
uint16_t tramp1;
|
||||
@@ -117,6 +104,24 @@ uint16_t m2pwmMan;
|
||||
uint16_t m3pwmMan;
|
||||
uint16_t m4pwmMan;
|
||||
|
||||
uint16_t apM1start;
|
||||
uint16_t apM1stop;
|
||||
uint16_t apM2start;
|
||||
uint16_t apM2stop;
|
||||
uint16_t apM3start;
|
||||
uint16_t apM3stop;
|
||||
uint16_t apM4start;
|
||||
uint16_t apM4stop;
|
||||
uint16_t chM1start;
|
||||
uint16_t chM1stop;
|
||||
uint16_t chM2start;
|
||||
uint16_t chM2stop;
|
||||
uint16_t chM3start;
|
||||
uint16_t chM3stop;
|
||||
uint16_t chM4start;
|
||||
uint16_t chM4stop;
|
||||
|
||||
|
||||
uint16_t mrampstart[4];
|
||||
uint16_t stPulsanti=0;
|
||||
omCiclo_st stCiclo=omchiuso;
|
||||
@@ -170,6 +175,8 @@ void HAL_SYSTICK_Callback(void){
|
||||
for(i=0;i<4;i++){
|
||||
if(rtramp[i])rtramp[i]--;
|
||||
}
|
||||
if(rtCiclo<0xffff)rtCiclo++;
|
||||
|
||||
//**** gestione buzzer *****************************************************************************
|
||||
if(stBuz==bzmoving){
|
||||
if(c1s>=5)HAL_GPIO_WritePin(GPIOA, BUZ_Pin, GPIO_PIN_RESET);else HAL_GPIO_WritePin(GPIOA, BUZ_Pin, GPIO_PIN_SET);
|
||||
@@ -179,9 +186,8 @@ void HAL_SYSTICK_Callback(void){
|
||||
HAL_GPIO_WritePin(GPIOA, BUZ_Pin, GPIO_PIN_RESET);
|
||||
}
|
||||
//**************************************************************************************************
|
||||
if (++c1s >= 10) { // 10 ms
|
||||
if (++c1s >= 10) { // 1 s
|
||||
c1s = 0;
|
||||
if(rtCiclo)rtCiclo--;
|
||||
HAL_GPIO_TogglePin(LED2_GPIO_Port, LED2_Pin);
|
||||
}
|
||||
}
|
||||
@@ -244,105 +250,89 @@ void manageCiclo(void){
|
||||
case omchiuso:
|
||||
if(stPulsanti&P1START){
|
||||
stBuz=bzwarning;
|
||||
rtCiclo=3;
|
||||
rtCiclo=0;
|
||||
stCiclo=omapertura0;
|
||||
(void)m1ap();(void)m2ap();(void)m3ap();(void)m4ap();
|
||||
}else if(stPulsanti&P1STOP)stCiclo=omstopapertura;
|
||||
// else if(stPulsanti&M1FW){
|
||||
// stBuz=bzmoving;
|
||||
// (void)ramp(M1,FW,mrampstart[M1-1],m1pwmMan,trampman,RAMPINIT);
|
||||
// stCiclo=omM1fw1;
|
||||
// }else if(stPulsanti&M1BW){
|
||||
// stBuz=bzmoving;
|
||||
// (void)ramp(M1,BW,mrampstart[M1-1],m1pwmMan,trampman,RAMPINIT);
|
||||
// stCiclo=omM1bw1;
|
||||
// }else if(stPulsanti&M2FW){
|
||||
// stBuz=bzmoving;
|
||||
// (void)ramp(M2,FW,mrampstart[M2-1],m2pwmMan,trampman,RAMPINIT);
|
||||
// stCiclo=omM2fw1;
|
||||
// }else if(stPulsanti&M2BW){
|
||||
// stBuz=bzmoving;
|
||||
// (void)ramp(M2,BW,mrampstart[M2-1],m2pwmMan,trampman,RAMPINIT);
|
||||
// stCiclo=omM2bw1;
|
||||
// }else if(stPulsanti&M3FW){
|
||||
// stBuz=bzmoving;
|
||||
// (void)ramp(M3,FW,mrampstart[M3-1],m3pwmMan,trampman,RAMPINIT);
|
||||
// stCiclo=omM3fw1;
|
||||
// }else if(stPulsanti&M3BW){
|
||||
// stBuz=bzmoving;
|
||||
// (void)ramp(M3,BW,mrampstart[M3-1],m3pwmMan,trampman,RAMPINIT);
|
||||
// stCiclo=omM3bw1;
|
||||
// }else if(stPulsanti&M4FW){
|
||||
// stBuz=bzmoving;
|
||||
// (void)ramp(M4,FW,mrampstart[M4-1],m3pwmMan,trampman,RAMPINIT);
|
||||
// stCiclo=omM4fw1;
|
||||
// }else if(stPulsanti&M4BW){
|
||||
// stBuz=bzmoving;
|
||||
// (void)ramp(M4,BW,mrampstart[M4-1],m3pwmMan,trampman,RAMPINIT);
|
||||
// stCiclo=omM4bw1;
|
||||
// }
|
||||
break;
|
||||
case omM1fw1:
|
||||
(void)ramp(M1,FW,mrampstart[M1-1],m1pwmMan,trampman,RAMPRUN);
|
||||
if(rtCiclo>=m1TimeoutMan)stCiclo=omStopMan;
|
||||
if(pulsanti==0)stCiclo=omM1fw2;
|
||||
break;
|
||||
case omM1fw2:
|
||||
(void)ramp(M1,FW,mrampstart[M1-1],m1pwmMan,trampman,RAMPRUN);
|
||||
if(rtCiclo>=m1TimeoutMan)stCiclo=omStopMan;
|
||||
if(pulsanti)stCiclo=omStopMan;
|
||||
break;
|
||||
case omM1bw1:
|
||||
(void)ramp(M1,BW,mrampstart[M1-1],m1pwmMan,trampman,RAMPRUN);
|
||||
if(rtCiclo>=m1TimeoutMan)stCiclo=omStopMan;
|
||||
if(pulsanti==0)stCiclo=omM1bw2;
|
||||
break;
|
||||
case omM1bw2:
|
||||
(void)ramp(M1,BW,mrampstart[M1-1],m1pwmMan,trampman,RAMPRUN);
|
||||
if(rtCiclo>=m1TimeoutMan)stCiclo=omStopMan;
|
||||
if(pulsanti)stCiclo=omStopMan;
|
||||
break;
|
||||
case omM2fw1:
|
||||
(void)ramp(M2,FW,mrampstart[M2-1],m2pwmMan,trampman,RAMPRUN);
|
||||
if(rtCiclo>=m2TimeoutMan)stCiclo=omStopMan;
|
||||
if(pulsanti==0)stCiclo=omM2fw2;
|
||||
break;
|
||||
case omM2fw2:
|
||||
(void)ramp(M2,FW,mrampstart[M2-1],m2pwmMan,trampman,RAMPRUN);
|
||||
if(rtCiclo>=m2TimeoutMan)stCiclo=omStopMan;
|
||||
if(pulsanti)stCiclo=omStopMan;
|
||||
break;
|
||||
case omM2bw1:
|
||||
(void)ramp(M2,BW,mrampstart[M2-1],m2pwmMan,trampman,RAMPRUN);
|
||||
if(rtCiclo>=m2TimeoutMan)stCiclo=omStopMan;
|
||||
if(pulsanti==0)stCiclo=omM2bw2;
|
||||
break;
|
||||
case omM2bw2:
|
||||
(void)ramp(M2,BW,mrampstart[M2-1],m2pwmMan,trampman,RAMPRUN);
|
||||
if(rtCiclo>=m2TimeoutMan)stCiclo=omStopMan;
|
||||
if(pulsanti)stCiclo=omStopMan;
|
||||
break;
|
||||
case omM3fw1:
|
||||
(void)ramp(M3,FW,mrampstart[M3-1],m3pwmMan,trampman,RAMPRUN);
|
||||
if(rtCiclo>=m3TimeoutMan)stCiclo=omStopMan;
|
||||
if(pulsanti==0)stCiclo=omM3fw2;
|
||||
break;
|
||||
case omM3fw2:
|
||||
(void)ramp(M3,FW,mrampstart[M3-1],m3pwmMan,trampman,RAMPRUN);
|
||||
if(rtCiclo>=m3TimeoutMan)stCiclo=omStopMan;
|
||||
if(pulsanti)stCiclo=omStopMan;
|
||||
break;
|
||||
case omM3bw1:
|
||||
(void)ramp(M3,BW,mrampstart[M3-1],m3pwmMan,trampman,RAMPRUN);
|
||||
if(rtCiclo>=m3TimeoutMan)stCiclo=omStopMan;
|
||||
if(pulsanti==0)stCiclo=omM3bw2;
|
||||
break;
|
||||
case omM3bw2:
|
||||
(void)ramp(M3,BW,mrampstart[M3-1],m3pwmMan,trampman,RAMPRUN);
|
||||
if(rtCiclo>=m3TimeoutMan)stCiclo=omStopMan;
|
||||
if(pulsanti)stCiclo=omStopMan;
|
||||
break;
|
||||
case omM4fw1:
|
||||
(void)ramp(M4,FW,mrampstart[M4-1],m4pwmMan,trampman,RAMPRUN);
|
||||
if(rtCiclo>=m4TimeoutMan)stCiclo=omStopMan;
|
||||
if(pulsanti==0)stCiclo=omM4fw2;
|
||||
break;
|
||||
case omM4fw2:
|
||||
(void)ramp(M4,FW,mrampstart[M4-1],m4pwmMan,trampman,RAMPRUN);
|
||||
if(rtCiclo>=m4TimeoutMan)stCiclo=omStopMan;
|
||||
if(pulsanti)stCiclo=omStopMan;
|
||||
break;
|
||||
case omM4bw1:
|
||||
(void)ramp(M4,BW,mrampstart[M4-1],m4pwmMan,trampman,RAMPRUN);
|
||||
if(rtCiclo>=m4TimeoutMan)stCiclo=omStopMan;
|
||||
if(pulsanti==0)stCiclo=omM4bw2;
|
||||
break;
|
||||
case omM4bw2:
|
||||
(void)ramp(M4,BW,mrampstart[M4-1],m4pwmMan,trampman,RAMPRUN);
|
||||
if(rtCiclo>=m4TimeoutMan)stCiclo=omStopMan;
|
||||
if(pulsanti)stCiclo=omStopMan;
|
||||
break;
|
||||
case omStopMan:
|
||||
@@ -360,108 +350,12 @@ void manageCiclo(void){
|
||||
}
|
||||
break;
|
||||
case omapertura0:
|
||||
if(rtCiclo==0){
|
||||
if(rtCiclo>=30){//doppo 3 secondi
|
||||
stBuz=bzmoving;
|
||||
(void)ramp(M2,BW,mrampstart[M2-1],m2pwmap,tramp,RAMPINIT);
|
||||
stCiclo=omapertura1;
|
||||
}
|
||||
break;
|
||||
case omapertura1:
|
||||
if(ramp(M2,BW,mrampstart[M2-1],m2pwmap,tramp,RAMPRUN)==DONE){
|
||||
rtCiclo=t1ap;
|
||||
stCiclo=omapertura2;
|
||||
}
|
||||
if(stPulsanti&P1STOP)stCiclo=omstopapertura;
|
||||
break;
|
||||
case omapertura2:
|
||||
if(rtCiclo==0){
|
||||
(void)ramp(M2,BW,m2pwmap,0,tramp,RAMPINIT);
|
||||
stCiclo=omapertura3;
|
||||
}
|
||||
if(stPulsanti&P1STOP)stCiclo=omstopapertura;
|
||||
break;
|
||||
case omapertura3:
|
||||
if(ramp(M2,BW,m2pwmap,0,tramp,RAMPRUN)==DONE){
|
||||
rtCiclo=twap;
|
||||
stCiclo=omapertura4;
|
||||
}
|
||||
if(stPulsanti&P1STOP)stCiclo=omstopapertura;
|
||||
break;
|
||||
case omapertura4:
|
||||
if(rtCiclo==0){
|
||||
(void)ramp(M1,FW,mrampstart[M1-1],m1pwmap,tramp,RAMPINIT);
|
||||
stCiclo=omapertura5;
|
||||
}
|
||||
if(stPulsanti&P1STOP)stCiclo=omstopapertura;
|
||||
break;
|
||||
case omapertura5:
|
||||
if(ramp(M1,FW,mrampstart[M1-1],m1pwmap,tramp,RAMPRUN)==DONE){
|
||||
rtCiclo=t2ap;
|
||||
stCiclo=omapertura6;
|
||||
}
|
||||
if(stPulsanti&P1STOP)stCiclo=omstopapertura;
|
||||
break;
|
||||
case omapertura6:
|
||||
if(rtCiclo==0){
|
||||
(void)ramp(M3,FW,mrampstart[M3-1],m3pwmap,tramp,RAMPINIT);
|
||||
stCiclo=omapertura7;
|
||||
}
|
||||
if(stPulsanti&P1STOP)stCiclo=omstopapertura;
|
||||
break;
|
||||
case omapertura7:
|
||||
if(ramp(M3,FW,mrampstart[M3-1],m3pwmap,tramp,RAMPRUN)==DONE){
|
||||
rtCiclo=t3ap;
|
||||
stCiclo=omapertura8;
|
||||
}
|
||||
if(stPulsanti&P1STOP)stCiclo=omstopapertura;
|
||||
break;
|
||||
case omapertura8:
|
||||
if(rtCiclo==0){
|
||||
(void)ramp(M3,FW,m3pwmap,0,tramp,RAMPINIT);
|
||||
(void)ramp(M1,FW,m1pwmap,0,tramp,RAMPINIT);
|
||||
stCiclo=omapertura9;
|
||||
}
|
||||
if(stPulsanti&P1STOP)stCiclo=omstopapertura;
|
||||
break;
|
||||
case omapertura9:
|
||||
if((ramp(M3,FW,m3pwmap,0,tramp,RAMPRUN)==DONE)&&(ramp(M1,FW,m1pwmap,0,tramp,RAMPRUN)==DONE)){
|
||||
rtCiclo=twap;
|
||||
stCiclo=omapertura10;
|
||||
}
|
||||
if(stPulsanti&P1STOP)stCiclo=omstopapertura;
|
||||
break;
|
||||
case omapertura10:
|
||||
if(rtCiclo==0){
|
||||
(void)ramp(M4,FW,mrampstart[M4-1],m4pwmap,tramp,RAMPINIT);
|
||||
stCiclo=omapertura11;
|
||||
}
|
||||
if(stPulsanti&P1STOP)stCiclo=omstopapertura;
|
||||
break;
|
||||
case omapertura11:
|
||||
if(ramp(M4,FW,mrampstart[M4-1],m4pwmap,tramp,RAMPRUN)==DONE){
|
||||
rtCiclo=t4ap;
|
||||
stCiclo=omapertura12;
|
||||
}
|
||||
if(stPulsanti&P1STOP)stCiclo=omstopapertura;
|
||||
break;
|
||||
case omapertura12:
|
||||
if(rtCiclo==0){
|
||||
(void)ramp(M4,FW,m4pwmap,0,tramp,RAMPINIT);
|
||||
stCiclo=omapertura13;
|
||||
}
|
||||
if(stPulsanti&P1STOP)stCiclo=omstopapertura;
|
||||
break;
|
||||
case omapertura13:
|
||||
if(ramp(M4,FW,m4pwmap,0,tramp,RAMPRUN)==DONE){
|
||||
rtCiclo=twap;
|
||||
stCiclo=omapertura14;
|
||||
}
|
||||
if(stPulsanti&P1STOP)stCiclo=omstopapertura;
|
||||
break;
|
||||
case omapertura14:
|
||||
if((rtCiclo==0)&&(pulsanti==0)){
|
||||
stBuz=bzoff;
|
||||
stCiclo=omaperto;
|
||||
if((m1ap()==motStop)&&(m2ap()==motStop)&&(m3ap()==motStop)&&(m4ap()==motStop)){
|
||||
stBuz=bzoff;
|
||||
stCiclo=omaperto;
|
||||
}
|
||||
}
|
||||
if(stPulsanti&P1STOP)stCiclo=omstopapertura;
|
||||
break;
|
||||
@@ -477,10 +371,12 @@ void manageCiclo(void){
|
||||
}
|
||||
break;
|
||||
case omaperto:
|
||||
rtCiclo=0;
|
||||
if(stPulsanti&P1START){
|
||||
stBuz=bzmoving;
|
||||
(void)ramp(M1,BW,mrampstart[M1-1],m1pwmch,tramp,RAMPINIT);
|
||||
stCiclo=omchiusura1;
|
||||
(void)m1ch();(void)m2ch();(void)m3ch();(void)m4ch();
|
||||
}
|
||||
if(stPulsanti&P1STOP)stCiclo=omstopchiusura;
|
||||
else if(stPulsanti&M1FW){
|
||||
@@ -518,105 +414,15 @@ void manageCiclo(void){
|
||||
}
|
||||
break;
|
||||
case omchiusura1:
|
||||
if(ramp(M1,BW,mrampstart[M1-1],m1pwmch,tramp,RAMPRUN)==DONE){
|
||||
rtCiclo=t4ch;
|
||||
stCiclo=omchiusura2;
|
||||
}
|
||||
if(stPulsanti&P1STOP)stCiclo=omstopchiusura;
|
||||
break;
|
||||
case omchiusura2:
|
||||
if(rtCiclo==0){
|
||||
(void)ramp(M3,BW,mrampstart[M3-1],m3pwmch,tramp,RAMPINIT);
|
||||
stCiclo=omchiusura3;
|
||||
}
|
||||
if(stPulsanti&P1STOP)stCiclo=omstopchiusura;
|
||||
break;
|
||||
case omchiusura3:
|
||||
if(ramp(M3,BW,mrampstart[M3-1],m3pwmch,tramp,RAMPRUN)==DONE){
|
||||
rtCiclo=t1ch;
|
||||
stCiclo=omchiusura4;
|
||||
}
|
||||
if(stPulsanti&P1STOP)stCiclo=omstopchiusura;
|
||||
break;
|
||||
case omchiusura4:
|
||||
if(rtCiclo==0){
|
||||
(void)ramp(M3,BW,m3pwmch,0,tramp,RAMPINIT);
|
||||
(void)ramp(M1,BW,m1pwmch,0,tramp,RAMPINIT);
|
||||
stCiclo=omchiusura5;
|
||||
}
|
||||
if(stPulsanti&P1STOP)stCiclo=omstopchiusura;
|
||||
break;
|
||||
case omchiusura5:
|
||||
if((ramp(M3,BW,m3pwmch,0,tramp,RAMPRUN)==DONE)&&(ramp(M1,BW,m1pwmch,0,tramp,RAMPRUN)==DONE)){
|
||||
rtCiclo=twch;
|
||||
stCiclo=omchiusura6;
|
||||
}
|
||||
if(stPulsanti&P1STOP)stCiclo=omstopchiusura;
|
||||
break;
|
||||
case omchiusura6:
|
||||
if(rtCiclo==0){
|
||||
(void)ramp(M2,FW,mrampstart[M2-1],m2pwmch,tramp,RAMPINIT);
|
||||
(void)ramp(M4,BW,mrampstart[M4-1],m4pwmch,tramp,RAMPINIT);
|
||||
stCiclo=omchiusura7;
|
||||
}
|
||||
if(stPulsanti&P1STOP)stCiclo=omstopchiusura;
|
||||
break;
|
||||
case omchiusura7:
|
||||
if((ramp(M2,FW,mrampstart[M2-1],m2pwmch,tramp,RAMPRUN)==DONE)&&(ramp(M4,BW,mrampstart[M4-1],m4pwmch,tramp,RAMPRUN)==DONE)){
|
||||
rtCiclo=t3ch;
|
||||
stCiclo=omchiusura8;
|
||||
}
|
||||
if(stPulsanti&P1STOP)stCiclo=omstopchiusura;
|
||||
break;
|
||||
case omchiusura8:
|
||||
if(rtCiclo==0){
|
||||
(void)ramp(M2,FW,m2pwmch,0,tramp,RAMPINIT);
|
||||
stCiclo=omchiusura9;
|
||||
}
|
||||
if(stPulsanti&P1STOP)stCiclo=omstopchiusura;
|
||||
break;
|
||||
case omchiusura9:
|
||||
if(ramp(M2,FW,m2pwmch,0,tramp,RAMPRUN)==DONE){
|
||||
rtCiclo=t2ch;
|
||||
stCiclo=omchiusura10;
|
||||
}
|
||||
if(stPulsanti&P1STOP)stCiclo=omstopchiusura;
|
||||
break;
|
||||
case omchiusura10:
|
||||
if(rtCiclo==0){
|
||||
(void)ramp(M4,BW,m4pwmch,0,tramp,RAMPINIT);
|
||||
stCiclo=omchiusura11;
|
||||
}
|
||||
if(stPulsanti&P1STOP)stCiclo=omstopchiusura;
|
||||
break;
|
||||
case omchiusura11:
|
||||
if(ramp(M4,BW,m4pwmch,0,tramp,RAMPRUN)==DONE){
|
||||
rtCiclo=twch;
|
||||
stCiclo=omchiusura14;
|
||||
}
|
||||
if(stPulsanti&P1STOP)stCiclo=omstopchiusura;
|
||||
break;
|
||||
case omchiusura12:
|
||||
if(rtCiclo==0){
|
||||
//(void)ramp(M4,BW,m4pwmch,0,tramp,RAMPINIT);
|
||||
stCiclo=omchiusura14;
|
||||
}
|
||||
if(stPulsanti&P1STOP)stCiclo=omstopchiusura;
|
||||
break;
|
||||
case omchiusura13:
|
||||
if(ramp(M4,BW,m4pwmch,0,tramp,RAMPRUN)==DONE){
|
||||
rtCiclo=twch;
|
||||
stCiclo=omchiusura14;
|
||||
}
|
||||
if(stPulsanti&P1STOP)stCiclo=omstopchiusura;
|
||||
break;
|
||||
case omchiusura14:
|
||||
if((rtCiclo==0)&&(pulsanti==0)){
|
||||
stBuz=bzoff;
|
||||
stCiclo=omchiuso;
|
||||
if(rtCiclo>=10){//doppo 1 secondi
|
||||
if((m1ch()==motStop)&&(m2ch()==motStop)&&(m3ch()==motStop)&&(m4ch()==motStop)){
|
||||
stBuz=bzoff;
|
||||
stCiclo=omchiuso;
|
||||
}
|
||||
}
|
||||
if(stPulsanti&P1STOP)stCiclo=omstopchiusura;
|
||||
break;
|
||||
|
||||
case omstopchiusura:
|
||||
SetMotPerc(M1,FW,0);
|
||||
SetMotPerc(M2,FW,0);
|
||||
|
||||
333
workspace/AUTOM10/Core/Src/mot.c
Normal file
333
workspace/AUTOM10/Core/Src/mot.c
Normal file
@@ -0,0 +1,333 @@
|
||||
/*
|
||||
* mot.c
|
||||
*
|
||||
* Created on: May 2, 2026
|
||||
* Author: user
|
||||
*/
|
||||
#include "main.h"
|
||||
#include "mot.h"
|
||||
#include "pwm.h"
|
||||
|
||||
extern uint16_t apM1start;
|
||||
extern uint16_t apM1stop;
|
||||
extern uint16_t apM2start;
|
||||
extern uint16_t apM2stop;
|
||||
extern uint16_t apM3start;
|
||||
extern uint16_t apM3stop;
|
||||
extern uint16_t apM4start;
|
||||
extern uint16_t apM4stop;
|
||||
extern uint16_t chM1start;
|
||||
extern uint16_t chM1stop;
|
||||
extern uint16_t chM2start;
|
||||
extern uint16_t chM2stop;
|
||||
extern uint16_t chM3start;
|
||||
extern uint16_t chM3stop;
|
||||
extern uint16_t chM4start;
|
||||
extern uint16_t chM4stop;
|
||||
extern volatile uint16_t rtCiclo;
|
||||
extern uint16_t m1pwmap;
|
||||
extern uint16_t m1pwmch;
|
||||
extern uint16_t m2pwmap;
|
||||
extern uint16_t m2pwmch;
|
||||
extern uint16_t m3pwmap;
|
||||
extern uint16_t m3pwmch;
|
||||
extern uint16_t m4pwmap;
|
||||
extern uint16_t m4pwmch;
|
||||
extern uint16_t mrampstart[4];
|
||||
extern uint16_t tramp;
|
||||
|
||||
motMov_st m1ap(void){
|
||||
static motMov_st m1st;
|
||||
if(rtCiclo<apM1start)m1st=motWaiting;
|
||||
switch(m1st){
|
||||
case motWaiting:
|
||||
SetMotPerc(M1,FW,0);
|
||||
SetMotPerc(M1,BW,0);
|
||||
if(rtCiclo>=apM1start){
|
||||
(void)ramp(M1,BW,mrampstart[M1-1],m1pwmap,tramp,RAMPINIT);
|
||||
m1st=motStartRamp;
|
||||
}
|
||||
break;
|
||||
case motStartRamp:
|
||||
if(ramp(M1,BW,mrampstart[M1-1],m1pwmap,tramp,RAMPRUN)==DONE){
|
||||
m1st=motWaitingTime;
|
||||
}
|
||||
break;
|
||||
case motWaitingTime:
|
||||
if(rtCiclo>=apM1stop){
|
||||
(void)ramp(M1,BW,m1pwmap,0,tramp,RAMPINIT);
|
||||
m1st=motStopRamp;
|
||||
}
|
||||
break;
|
||||
case motStopRamp:
|
||||
if(ramp(M1,BW,m1pwmap,0,tramp,RAMPRUN)==DONE){
|
||||
m1st=motStop;
|
||||
}
|
||||
break;
|
||||
case motStop:
|
||||
default:
|
||||
SetMotPerc(M1,FW,0);
|
||||
SetMotPerc(M1,BW,0);
|
||||
break;
|
||||
}
|
||||
return m1st;
|
||||
}
|
||||
|
||||
motMov_st m2ap(void){
|
||||
static motMov_st m2st;
|
||||
if(rtCiclo<apM2start)m2st=motWaiting;
|
||||
switch(m2st){
|
||||
case motWaiting:
|
||||
SetMotPerc(M2,FW,0);
|
||||
SetMotPerc(M2,BW,0);
|
||||
if(rtCiclo>=apM2start){
|
||||
(void)ramp(M2,BW,mrampstart[M2-1],m2pwmap,tramp,RAMPINIT);
|
||||
m2st=motStartRamp;
|
||||
}
|
||||
break;
|
||||
case motStartRamp:
|
||||
if(ramp(M2,BW,mrampstart[M2-1],m2pwmap,tramp,RAMPRUN)==DONE){
|
||||
m2st=motWaitingTime;
|
||||
}
|
||||
break;
|
||||
case motWaitingTime:
|
||||
if(rtCiclo>=apM2stop){
|
||||
(void)ramp(M2,BW,m2pwmap,0,tramp,RAMPINIT);
|
||||
m2st=motStopRamp;
|
||||
}
|
||||
break;
|
||||
case motStopRamp:
|
||||
if(ramp(M2,BW,m2pwmap,0,tramp,RAMPRUN)==DONE){
|
||||
m2st=motStop;
|
||||
}
|
||||
break;
|
||||
case motStop:
|
||||
default:
|
||||
SetMotPerc(M2,FW,0);
|
||||
SetMotPerc(M2,BW,0);
|
||||
break;
|
||||
}
|
||||
return m2st;
|
||||
}
|
||||
|
||||
motMov_st m3ap(void){
|
||||
static motMov_st m3st;
|
||||
if(rtCiclo<apM3start)m3st=motWaiting;
|
||||
switch(m3st){
|
||||
case motWaiting:
|
||||
SetMotPerc(M3,FW,0);
|
||||
SetMotPerc(M3,BW,0);
|
||||
if(rtCiclo>=apM3start){
|
||||
(void)ramp(M3,BW,mrampstart[M3-1],m2pwmap,tramp,RAMPINIT);
|
||||
m3st=motStartRamp;
|
||||
}
|
||||
break;
|
||||
case motStartRamp:
|
||||
if(ramp(M3,BW,mrampstart[M3-1],m3pwmap,tramp,RAMPRUN)==DONE){
|
||||
m3st=motWaitingTime;
|
||||
}
|
||||
break;
|
||||
case motWaitingTime:
|
||||
if(rtCiclo>=apM3stop){
|
||||
(void)ramp(M3,BW,m3pwmap,0,tramp,RAMPINIT);
|
||||
m3st=motStopRamp;
|
||||
}
|
||||
break;
|
||||
case motStopRamp:
|
||||
if(ramp(M3,BW,m3pwmap,0,tramp,RAMPRUN)==DONE){
|
||||
m3st=motStop;
|
||||
}
|
||||
break;
|
||||
case motStop:
|
||||
default:
|
||||
SetMotPerc(M3,FW,0);
|
||||
SetMotPerc(M3,BW,0);
|
||||
break;
|
||||
}
|
||||
return m3st;
|
||||
}
|
||||
|
||||
motMov_st m4ap(void){
|
||||
static motMov_st m4st;
|
||||
if(rtCiclo<apM4start)m4st=motWaiting;
|
||||
switch(m4st){
|
||||
case motWaiting:
|
||||
SetMotPerc(M4,FW,0);
|
||||
SetMotPerc(M4,BW,0);
|
||||
if(rtCiclo>=apM4start){
|
||||
(void)ramp(M4,BW,mrampstart[M4-1],m2pwmap,tramp,RAMPINIT);
|
||||
m4st=motStartRamp;
|
||||
}
|
||||
break;
|
||||
case motStartRamp:
|
||||
if(ramp(M4,BW,mrampstart[M4-1],m4pwmap,tramp,RAMPRUN)==DONE){
|
||||
m4st=motWaitingTime;
|
||||
}
|
||||
break;
|
||||
case motWaitingTime:
|
||||
if(rtCiclo>=apM4stop){
|
||||
(void)ramp(M4,BW,m4pwmap,0,tramp,RAMPINIT);
|
||||
m4st=motStopRamp;
|
||||
}
|
||||
break;
|
||||
case motStopRamp:
|
||||
if(ramp(43,BW,m4pwmap,0,tramp,RAMPRUN)==DONE){
|
||||
m4st=motStop;
|
||||
}
|
||||
break;
|
||||
case motStop:
|
||||
default:
|
||||
SetMotPerc(M4,FW,0);
|
||||
SetMotPerc(M4,BW,0);
|
||||
break;
|
||||
}
|
||||
return m4st;
|
||||
}
|
||||
|
||||
motMov_st m1ch(void){
|
||||
static motMov_st m1st;
|
||||
if(rtCiclo<chM1start)m1st=motWaiting;
|
||||
switch(m1st){
|
||||
case motWaiting:
|
||||
SetMotPerc(M1,FW,0);
|
||||
SetMotPerc(M1,BW,0);
|
||||
if(rtCiclo>=chM1start){
|
||||
(void)ramp(M1,FW,mrampstart[M1-1],m1pwmch,tramp,RAMPINIT);
|
||||
m1st=motStartRamp;
|
||||
}
|
||||
break;
|
||||
case motStartRamp:
|
||||
if(ramp(M1,FW,mrampstart[M1-1],m1pwmch,tramp,RAMPRUN)==DONE){
|
||||
m1st=motWaitingTime;
|
||||
}
|
||||
break;
|
||||
case motWaitingTime:
|
||||
if(rtCiclo>=chM1stop){
|
||||
(void)ramp(M1,FW,m1pwmch,0,tramp,RAMPINIT);
|
||||
m1st=motStopRamp;
|
||||
}
|
||||
break;
|
||||
case motStopRamp:
|
||||
if(ramp(M1,FW,m1pwmch,0,tramp,RAMPRUN)==DONE){
|
||||
m1st=motStop;
|
||||
}
|
||||
break;
|
||||
case motStop:
|
||||
default:
|
||||
SetMotPerc(M1,FW,0);
|
||||
SetMotPerc(M1,BW,0);
|
||||
break;
|
||||
}
|
||||
return m1st;
|
||||
}
|
||||
|
||||
motMov_st m2ch(void){
|
||||
static motMov_st m2st;
|
||||
if(rtCiclo<chM2start)m2st=motWaiting;
|
||||
switch(m2st){
|
||||
case motWaiting:
|
||||
SetMotPerc(M2,FW,0);
|
||||
SetMotPerc(M2,BW,0);
|
||||
if(rtCiclo>=chM2start){
|
||||
(void)ramp(M2,FW,mrampstart[M2-1],m2pwmch,tramp,RAMPINIT);
|
||||
m2st=motStartRamp;
|
||||
}
|
||||
break;
|
||||
case motStartRamp:
|
||||
if(ramp(M2,FW,mrampstart[M2-1],m2pwmch,tramp,RAMPRUN)==DONE){
|
||||
m2st=motWaitingTime;
|
||||
}
|
||||
break;
|
||||
case motWaitingTime:
|
||||
if(rtCiclo>=chM2stop){
|
||||
(void)ramp(M2,FW,m2pwmch,0,tramp,RAMPINIT);
|
||||
m2st=motStopRamp;
|
||||
}
|
||||
break;
|
||||
case motStopRamp:
|
||||
if(ramp(M2,FW,m2pwmch,0,tramp,RAMPRUN)==DONE){
|
||||
m2st=motStop;
|
||||
}
|
||||
break;
|
||||
case motStop:
|
||||
default:
|
||||
SetMotPerc(M2,FW,0);
|
||||
SetMotPerc(M2,BW,0);
|
||||
break;
|
||||
}
|
||||
return m2st;
|
||||
}
|
||||
|
||||
motMov_st m3ch(void){
|
||||
static motMov_st m3st;
|
||||
if(rtCiclo<chM3start)m3st=motWaiting;
|
||||
switch(m3st){
|
||||
case motWaiting:
|
||||
SetMotPerc(M3,FW,0);
|
||||
SetMotPerc(M3,BW,0);
|
||||
if(rtCiclo>=chM3start){
|
||||
(void)ramp(M3,FW,mrampstart[M3-1],m2pwmch,tramp,RAMPINIT);
|
||||
m3st=motStartRamp;
|
||||
}
|
||||
break;
|
||||
case motStartRamp:
|
||||
if(ramp(M3,FW,mrampstart[M3-1],m3pwmch,tramp,RAMPRUN)==DONE){
|
||||
m3st=motWaitingTime;
|
||||
}
|
||||
break;
|
||||
case motWaitingTime:
|
||||
if(rtCiclo>=chM3stop){
|
||||
(void)ramp(M3,FW,m3pwmch,0,tramp,RAMPINIT);
|
||||
m3st=motStopRamp;
|
||||
}
|
||||
break;
|
||||
case motStopRamp:
|
||||
if(ramp(M3,FW,m3pwmch,0,tramp,RAMPRUN)==DONE){
|
||||
m3st=motStop;
|
||||
}
|
||||
break;
|
||||
case motStop:
|
||||
default:
|
||||
SetMotPerc(M3,FW,0);
|
||||
SetMotPerc(M3,BW,0);
|
||||
break;
|
||||
}
|
||||
return m3st;
|
||||
}
|
||||
|
||||
motMov_st m4ch(void){
|
||||
static motMov_st m4st;
|
||||
if(rtCiclo<chM4start)m4st=motWaiting;
|
||||
switch(m4st){
|
||||
case motWaiting:
|
||||
SetMotPerc(M4,FW,0);
|
||||
SetMotPerc(M4,BW,0);
|
||||
if(rtCiclo>=chM4start){
|
||||
(void)ramp(M4,FW,mrampstart[M4-1],m2pwmch,tramp,RAMPINIT);
|
||||
m4st=motStartRamp;
|
||||
}
|
||||
break;
|
||||
case motStartRamp:
|
||||
if(ramp(M4,FW,mrampstart[M4-1],m4pwmch,tramp,RAMPRUN)==DONE){
|
||||
m4st=motWaitingTime;
|
||||
}
|
||||
break;
|
||||
case motWaitingTime:
|
||||
if(rtCiclo>=chM4stop){
|
||||
(void)ramp(M4,FW,m4pwmch,0,tramp,RAMPINIT);
|
||||
m4st=motStopRamp;
|
||||
}
|
||||
break;
|
||||
case motStopRamp:
|
||||
if(ramp(43,FW,m4pwmch,0,tramp,RAMPRUN)==DONE){
|
||||
m4st=motStop;
|
||||
}
|
||||
break;
|
||||
case motStop:
|
||||
default:
|
||||
SetMotPerc(M4,FW,0);
|
||||
SetMotPerc(M4,BW,0);
|
||||
break;
|
||||
}
|
||||
return m4st;
|
||||
}
|
||||
27
workspace/AUTOM10/Core/Src/mot.h
Normal file
27
workspace/AUTOM10/Core/Src/mot.h
Normal file
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* mot.h
|
||||
*
|
||||
* Created on: May 2, 2026
|
||||
* Author: user
|
||||
*/
|
||||
|
||||
#ifndef SRC_MOT_H_
|
||||
#define SRC_MOT_H_
|
||||
typedef enum{
|
||||
motWaiting,
|
||||
motStartRamp,
|
||||
motWaitingTime,
|
||||
motStopRamp,
|
||||
motStop
|
||||
}motMov_st;
|
||||
|
||||
motMov_st m1ap(void);
|
||||
motMov_st m1ch(void);
|
||||
motMov_st m2ap(void);
|
||||
motMov_st m2ch(void);
|
||||
motMov_st m3ap(void);
|
||||
motMov_st m3ch(void);
|
||||
motMov_st m4ap(void);
|
||||
motMov_st m4ch(void);
|
||||
|
||||
#endif /* SRC_MOT_H_ */
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
../Core/Src/eeprom.h:110:24:EEW_Read 1
|
||||
../Core/Src/eeprom.h:115:24:EEW_Write 1
|
||||
../Core/Src/eeprom.h:121:24:EEW_Read 1
|
||||
../Core/Src/eeprom.h:126:24:EEW_Write 1
|
||||
../Core/Src/cdc_int.c:27:6:toHex 17
|
||||
../Core/Src/cdc_int.c:63:6:manageCDC 71
|
||||
|
||||
Binary file not shown.
@@ -1,4 +1,4 @@
|
||||
../Core/Src/eeprom.h:110:24:EEW_Read 16 static
|
||||
../Core/Src/eeprom.h:115:24:EEW_Write 16 static
|
||||
../Core/Src/eeprom.h:121:24:EEW_Read 16 static
|
||||
../Core/Src/eeprom.h:126:24:EEW_Write 16 static
|
||||
../Core/Src/cdc_int.c:27:6:toHex 16 static
|
||||
../Core/Src/cdc_int.c:63:6:manageCDC 184 static
|
||||
|
||||
Binary file not shown.
@@ -1,13 +1,13 @@
|
||||
../Core/Src/eeprom.h:110:24:EEW_Read 1
|
||||
../Core/Src/eeprom.c:140:17:EE_GetPageStatus 1
|
||||
../Core/Src/eeprom.c:145:26:EE_FlashProgramHalfWord 1
|
||||
../Core/Src/eeprom.c:156:26:EE_FlashErasePage 1
|
||||
../Core/Src/eeprom.c:175:17:EE_FindFreeAddress 3
|
||||
../Core/Src/eeprom.c:197:18:EE_FindInPage 6
|
||||
../Core/Src/eeprom.c:237:18:EE_Format 4
|
||||
../Core/Src/eeprom.c:255:17:EE_GetOtherPageBase 2
|
||||
../Core/Src/eeprom.c:261:18:EE_PageTransfer 11
|
||||
../Core/Src/eeprom.c:334:10:EE_Init 7
|
||||
../Core/Src/eeprom.c:365:10:EE_ReadVariable 2
|
||||
../Core/Src/eeprom.c:382:10:EE_WriteVariable 4
|
||||
../Core/Src/eeprom.c:405:6:loadEE 1
|
||||
../Core/Src/eeprom.h:121:24:EEW_Read 1
|
||||
../Core/Src/eeprom.c:160:17:EE_GetPageStatus 1
|
||||
../Core/Src/eeprom.c:165:26:EE_FlashProgramHalfWord 1
|
||||
../Core/Src/eeprom.c:176:26:EE_FlashErasePage 1
|
||||
../Core/Src/eeprom.c:195:17:EE_FindFreeAddress 3
|
||||
../Core/Src/eeprom.c:217:18:EE_FindInPage 6
|
||||
../Core/Src/eeprom.c:257:18:EE_Format 4
|
||||
../Core/Src/eeprom.c:275:17:EE_GetOtherPageBase 2
|
||||
../Core/Src/eeprom.c:281:18:EE_PageTransfer 11
|
||||
../Core/Src/eeprom.c:354:10:EE_Init 7
|
||||
../Core/Src/eeprom.c:385:10:EE_ReadVariable 2
|
||||
../Core/Src/eeprom.c:402:10:EE_WriteVariable 4
|
||||
../Core/Src/eeprom.c:425:6:loadEE 1
|
||||
|
||||
Binary file not shown.
@@ -1,13 +1,13 @@
|
||||
../Core/Src/eeprom.h:110:24:EEW_Read 16 static
|
||||
../Core/Src/eeprom.c:140:17:EE_GetPageStatus 16 static
|
||||
../Core/Src/eeprom.c:145:26:EE_FlashProgramHalfWord 32 static
|
||||
../Core/Src/eeprom.c:156:26:EE_FlashErasePage 40 static
|
||||
../Core/Src/eeprom.c:175:17:EE_FindFreeAddress 32 static
|
||||
../Core/Src/eeprom.c:197:18:EE_FindInPage 40 static
|
||||
../Core/Src/eeprom.c:237:18:EE_Format 8 static
|
||||
../Core/Src/eeprom.c:255:17:EE_GetOtherPageBase 16 static
|
||||
../Core/Src/eeprom.c:261:18:EE_PageTransfer 40 static
|
||||
../Core/Src/eeprom.c:334:10:EE_Init 16 static
|
||||
../Core/Src/eeprom.c:365:10:EE_ReadVariable 24 static
|
||||
../Core/Src/eeprom.c:382:10:EE_WriteVariable 24 static
|
||||
../Core/Src/eeprom.c:405:6:loadEE 8 static
|
||||
../Core/Src/eeprom.h:121:24:EEW_Read 16 static
|
||||
../Core/Src/eeprom.c:160:17:EE_GetPageStatus 16 static
|
||||
../Core/Src/eeprom.c:165:26:EE_FlashProgramHalfWord 32 static
|
||||
../Core/Src/eeprom.c:176:26:EE_FlashErasePage 40 static
|
||||
../Core/Src/eeprom.c:195:17:EE_FindFreeAddress 32 static
|
||||
../Core/Src/eeprom.c:217:18:EE_FindInPage 40 static
|
||||
../Core/Src/eeprom.c:257:18:EE_Format 8 static
|
||||
../Core/Src/eeprom.c:275:17:EE_GetOtherPageBase 16 static
|
||||
../Core/Src/eeprom.c:281:18:EE_PageTransfer 40 static
|
||||
../Core/Src/eeprom.c:354:10:EE_Init 16 static
|
||||
../Core/Src/eeprom.c:385:10:EE_ReadVariable 24 static
|
||||
../Core/Src/eeprom.c:402:10:EE_WriteVariable 24 static
|
||||
../Core/Src/eeprom.c:425:6:loadEE 248 static
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
../Core/Src/main.c:141:6:HAL_SYSTICK_Callback 20
|
||||
../Core/Src/main.c:191:6:managePulsanti 23
|
||||
../Core/Src/main.c:241:6:manageCiclo 144
|
||||
../Core/Src/main.c:640:5:main 2
|
||||
../Core/Src/main.c:724:6:SystemClock_Config 4
|
||||
../Core/Src/main.c:772:13:MX_ADC1_Init 7
|
||||
../Core/Src/main.c:855:13:MX_TIM2_Init 9
|
||||
../Core/Src/main.c:931:13:MX_TIM4_Init 9
|
||||
../Core/Src/main.c:1005:13:MX_USART1_UART_Init 2
|
||||
../Core/Src/main.c:1036:13:MX_DMA_Init 1
|
||||
../Core/Src/main.c:1054:13:MX_GPIO_Init 1
|
||||
../Core/Src/main.c:1130:6:Error_Handler 1
|
||||
../Core/Src/main.c:146:6:HAL_SYSTICK_Callback 20
|
||||
../Core/Src/main.c:197:6:managePulsanti 23
|
||||
../Core/Src/main.c:247:6:manageCiclo 83
|
||||
../Core/Src/main.c:446:5:main 2
|
||||
../Core/Src/main.c:530:6:SystemClock_Config 4
|
||||
../Core/Src/main.c:578:13:MX_ADC1_Init 7
|
||||
../Core/Src/main.c:661:13:MX_TIM2_Init 9
|
||||
../Core/Src/main.c:737:13:MX_TIM4_Init 9
|
||||
../Core/Src/main.c:811:13:MX_USART1_UART_Init 2
|
||||
../Core/Src/main.c:842:13:MX_DMA_Init 1
|
||||
../Core/Src/main.c:860:13:MX_GPIO_Init 1
|
||||
../Core/Src/main.c:936:6:Error_Handler 1
|
||||
|
||||
@@ -39,7 +39,7 @@ Core/Src/main.o: ../Core/Src/main.c ../Core/Inc/main.h \
|
||||
../Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_ioreq.h \
|
||||
../Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_ctlreq.h \
|
||||
../Core/Inc/cdc_int.h ../Core/Src/eeprom.h ../Core/Inc/pwm.h \
|
||||
../Core/Inc/adc.h ../Core/Src/debug.h
|
||||
../Core/Inc/adc.h ../Core/Src/debug.h ../Core/Src/mot.h
|
||||
../Core/Inc/main.h:
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h:
|
||||
../Core/Inc/stm32f1xx_hal_conf.h:
|
||||
@@ -86,3 +86,4 @@ Core/Src/main.o: ../Core/Src/main.c ../Core/Inc/main.h \
|
||||
../Core/Inc/pwm.h:
|
||||
../Core/Inc/adc.h:
|
||||
../Core/Src/debug.h:
|
||||
../Core/Src/mot.h:
|
||||
|
||||
Binary file not shown.
@@ -1,12 +1,12 @@
|
||||
../Core/Src/main.c:141:6:HAL_SYSTICK_Callback 16 static
|
||||
../Core/Src/main.c:191:6:managePulsanti 4 static
|
||||
../Core/Src/main.c:241:6:manageCiclo 16 static
|
||||
../Core/Src/main.c:640:5:main 8 static
|
||||
../Core/Src/main.c:724:6:SystemClock_Config 88 static
|
||||
../Core/Src/main.c:772:13:MX_ADC1_Init 24 static
|
||||
../Core/Src/main.c:855:13:MX_TIM2_Init 64 static
|
||||
../Core/Src/main.c:931:13:MX_TIM4_Init 64 static
|
||||
../Core/Src/main.c:1005:13:MX_USART1_UART_Init 8 static
|
||||
../Core/Src/main.c:1036:13:MX_DMA_Init 16 static
|
||||
../Core/Src/main.c:1054:13:MX_GPIO_Init 40 static
|
||||
../Core/Src/main.c:1130:6:Error_Handler 4 static,ignoring_inline_asm
|
||||
../Core/Src/main.c:146:6:HAL_SYSTICK_Callback 16 static
|
||||
../Core/Src/main.c:197:6:managePulsanti 4 static
|
||||
../Core/Src/main.c:247:6:manageCiclo 16 static
|
||||
../Core/Src/main.c:446:5:main 8 static
|
||||
../Core/Src/main.c:530:6:SystemClock_Config 88 static
|
||||
../Core/Src/main.c:578:13:MX_ADC1_Init 24 static
|
||||
../Core/Src/main.c:661:13:MX_TIM2_Init 64 static
|
||||
../Core/Src/main.c:737:13:MX_TIM4_Init 64 static
|
||||
../Core/Src/main.c:811:13:MX_USART1_UART_Init 8 static
|
||||
../Core/Src/main.c:842:13:MX_DMA_Init 16 static
|
||||
../Core/Src/main.c:860:13:MX_GPIO_Init 40 static
|
||||
../Core/Src/main.c:936:6:Error_Handler 4 static,ignoring_inline_asm
|
||||
|
||||
8
workspace/AUTOM10/Debug/Core/Src/mot.cyclo
Normal file
8
workspace/AUTOM10/Debug/Core/Src/mot.cyclo
Normal file
@@ -0,0 +1,8 @@
|
||||
../Core/Src/mot.c:39:11:m1ap 10
|
||||
../Core/Src/mot.c:76:11:m2ap 10
|
||||
../Core/Src/mot.c:113:11:m3ap 10
|
||||
../Core/Src/mot.c:150:11:m4ap 10
|
||||
../Core/Src/mot.c:187:11:m1ch 10
|
||||
../Core/Src/mot.c:224:11:m2ch 10
|
||||
../Core/Src/mot.c:261:11:m3ch 10
|
||||
../Core/Src/mot.c:298:11:m4ch 10
|
||||
65
workspace/AUTOM10/Debug/Core/Src/mot.d
Normal file
65
workspace/AUTOM10/Debug/Core/Src/mot.d
Normal file
@@ -0,0 +1,65 @@
|
||||
Core/Src/mot.o: ../Core/Src/mot.c ../Core/Inc/main.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h \
|
||||
../Core/Inc/stm32f1xx_hal_conf.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h \
|
||||
../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h \
|
||||
../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h \
|
||||
../Drivers/CMSIS/Include/core_cm3.h \
|
||||
../Drivers/CMSIS/Include/cmsis_version.h \
|
||||
../Drivers/CMSIS/Include/cmsis_compiler.h \
|
||||
../Drivers/CMSIS/Include/cmsis_gcc.h \
|
||||
../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_adc.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_adc_ex.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_uart.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pcd.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_usb.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pcd_ex.h \
|
||||
../Core/Src/mot.h ../Core/Inc/pwm.h
|
||||
../Core/Inc/main.h:
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h:
|
||||
../Core/Inc/stm32f1xx_hal_conf.h:
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h:
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h:
|
||||
../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h:
|
||||
../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h:
|
||||
../Drivers/CMSIS/Include/core_cm3.h:
|
||||
../Drivers/CMSIS/Include/cmsis_version.h:
|
||||
../Drivers/CMSIS/Include/cmsis_compiler.h:
|
||||
../Drivers/CMSIS/Include/cmsis_gcc.h:
|
||||
../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h:
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h:
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h:
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h:
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h:
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h:
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h:
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h:
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h:
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_adc.h:
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_adc_ex.h:
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h:
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h:
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h:
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h:
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h:
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_uart.h:
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pcd.h:
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_usb.h:
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pcd_ex.h:
|
||||
../Core/Src/mot.h:
|
||||
../Core/Inc/pwm.h:
|
||||
BIN
workspace/AUTOM10/Debug/Core/Src/mot.o
Normal file
BIN
workspace/AUTOM10/Debug/Core/Src/mot.o
Normal file
Binary file not shown.
8
workspace/AUTOM10/Debug/Core/Src/mot.su
Normal file
8
workspace/AUTOM10/Debug/Core/Src/mot.su
Normal file
@@ -0,0 +1,8 @@
|
||||
../Core/Src/mot.c:39:11:m1ap 16 static
|
||||
../Core/Src/mot.c:76:11:m2ap 16 static
|
||||
../Core/Src/mot.c:113:11:m3ap 16 static
|
||||
../Core/Src/mot.c:150:11:m4ap 16 static
|
||||
../Core/Src/mot.c:187:11:m1ch 16 static
|
||||
../Core/Src/mot.c:224:11:m2ch 16 static
|
||||
../Core/Src/mot.c:261:11:m3ch 16 static
|
||||
../Core/Src/mot.c:298:11:m4ch 16 static
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -10,6 +10,7 @@ C_SRCS += \
|
||||
../Core/Src/debug.c \
|
||||
../Core/Src/eeprom.c \
|
||||
../Core/Src/main.c \
|
||||
../Core/Src/mot.c \
|
||||
../Core/Src/pwm.c \
|
||||
../Core/Src/stm32f1xx_hal_msp.c \
|
||||
../Core/Src/stm32f1xx_it.c \
|
||||
@@ -23,6 +24,7 @@ OBJS += \
|
||||
./Core/Src/debug.o \
|
||||
./Core/Src/eeprom.o \
|
||||
./Core/Src/main.o \
|
||||
./Core/Src/mot.o \
|
||||
./Core/Src/pwm.o \
|
||||
./Core/Src/stm32f1xx_hal_msp.o \
|
||||
./Core/Src/stm32f1xx_it.o \
|
||||
@@ -36,6 +38,7 @@ C_DEPS += \
|
||||
./Core/Src/debug.d \
|
||||
./Core/Src/eeprom.d \
|
||||
./Core/Src/main.d \
|
||||
./Core/Src/mot.d \
|
||||
./Core/Src/pwm.d \
|
||||
./Core/Src/stm32f1xx_hal_msp.d \
|
||||
./Core/Src/stm32f1xx_it.d \
|
||||
@@ -51,7 +54,7 @@ Core/Src/%.o Core/Src/%.su Core/Src/%.cyclo: ../Core/Src/%.c Core/Src/subdir.mk
|
||||
clean: clean-Core-2f-Src
|
||||
|
||||
clean-Core-2f-Src:
|
||||
-$(RM) ./Core/Src/adc.cyclo ./Core/Src/adc.d ./Core/Src/adc.o ./Core/Src/adc.su ./Core/Src/cdc_int.cyclo ./Core/Src/cdc_int.d ./Core/Src/cdc_int.o ./Core/Src/cdc_int.su ./Core/Src/debug.cyclo ./Core/Src/debug.d ./Core/Src/debug.o ./Core/Src/debug.su ./Core/Src/eeprom.cyclo ./Core/Src/eeprom.d ./Core/Src/eeprom.o ./Core/Src/eeprom.su ./Core/Src/main.cyclo ./Core/Src/main.d ./Core/Src/main.o ./Core/Src/main.su ./Core/Src/pwm.cyclo ./Core/Src/pwm.d ./Core/Src/pwm.o ./Core/Src/pwm.su ./Core/Src/stm32f1xx_hal_msp.cyclo ./Core/Src/stm32f1xx_hal_msp.d ./Core/Src/stm32f1xx_hal_msp.o ./Core/Src/stm32f1xx_hal_msp.su ./Core/Src/stm32f1xx_it.cyclo ./Core/Src/stm32f1xx_it.d ./Core/Src/stm32f1xx_it.o ./Core/Src/stm32f1xx_it.su ./Core/Src/syscalls.cyclo ./Core/Src/syscalls.d ./Core/Src/syscalls.o ./Core/Src/syscalls.su ./Core/Src/sysmem.cyclo ./Core/Src/sysmem.d ./Core/Src/sysmem.o ./Core/Src/sysmem.su ./Core/Src/system_stm32f1xx.cyclo ./Core/Src/system_stm32f1xx.d ./Core/Src/system_stm32f1xx.o ./Core/Src/system_stm32f1xx.su
|
||||
-$(RM) ./Core/Src/adc.cyclo ./Core/Src/adc.d ./Core/Src/adc.o ./Core/Src/adc.su ./Core/Src/cdc_int.cyclo ./Core/Src/cdc_int.d ./Core/Src/cdc_int.o ./Core/Src/cdc_int.su ./Core/Src/debug.cyclo ./Core/Src/debug.d ./Core/Src/debug.o ./Core/Src/debug.su ./Core/Src/eeprom.cyclo ./Core/Src/eeprom.d ./Core/Src/eeprom.o ./Core/Src/eeprom.su ./Core/Src/main.cyclo ./Core/Src/main.d ./Core/Src/main.o ./Core/Src/main.su ./Core/Src/mot.cyclo ./Core/Src/mot.d ./Core/Src/mot.o ./Core/Src/mot.su ./Core/Src/pwm.cyclo ./Core/Src/pwm.d ./Core/Src/pwm.o ./Core/Src/pwm.su ./Core/Src/stm32f1xx_hal_msp.cyclo ./Core/Src/stm32f1xx_hal_msp.d ./Core/Src/stm32f1xx_hal_msp.o ./Core/Src/stm32f1xx_hal_msp.su ./Core/Src/stm32f1xx_it.cyclo ./Core/Src/stm32f1xx_it.d ./Core/Src/stm32f1xx_it.o ./Core/Src/stm32f1xx_it.su ./Core/Src/syscalls.cyclo ./Core/Src/syscalls.d ./Core/Src/syscalls.o ./Core/Src/syscalls.su ./Core/Src/sysmem.cyclo ./Core/Src/sysmem.d ./Core/Src/sysmem.o ./Core/Src/sysmem.su ./Core/Src/system_stm32f1xx.cyclo ./Core/Src/system_stm32f1xx.d ./Core/Src/system_stm32f1xx.o ./Core/Src/system_stm32f1xx.su
|
||||
|
||||
.PHONY: clean-Core-2f-Src
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -3,6 +3,7 @@
|
||||
"./Core/Src/debug.o"
|
||||
"./Core/Src/eeprom.o"
|
||||
"./Core/Src/main.o"
|
||||
"./Core/Src/mot.o"
|
||||
"./Core/Src/pwm.o"
|
||||
"./Core/Src/stm32f1xx_hal_msp.o"
|
||||
"./Core/Src/stm32f1xx_it.o"
|
||||
|
||||
Reference in New Issue
Block a user