Skip to content

Commit c167d26

Browse files
committed
copy inverter test copy
1 parent 793192d commit c167d26

File tree

430 files changed

+255209
-1786
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

430 files changed

+255209
-1786
lines changed

calibration_inverter/Core/Src/main.c

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -431,20 +431,39 @@ void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim)
431431
if((cycle%20) == 0){
432432
//CAN transmit
433433

434-
HAL_CAN_AddTxMessage(&hcan1,&TxMessage_right,TxData_R,&TxMailbox);
435-
HAL_CAN_AddTxMessage(&hcan1,&TxMessage_left ,TxData_L,&TxMailbox);
436-
HAL_IWDG_Refresh(&hiwdg);
437-
HAL_GPIO_TogglePin(GPIOA,GPIO_PIN_1);
434+
HAL_CAN_AddTxMessage(&hcan1,&TxMessage_right,TxData_R,&TxMailbox);
435+
HAL_CAN_AddTxMessage(&hcan1,&TxMessage_left ,TxData_L,&TxMailbox);
436+
HAL_IWDG_Refresh(&hiwdg);
437+
HAL_GPIO_TogglePin(GPIOA,GPIO_PIN_1);
438438
}
439439

440440
if(enable) {
441+
/*
441442
TxData_L[3] = 5;
442443
TxData_L[2] = 220;
443444
TxData_L[5] = 5;
445+
*/
446+
TxData_L[0] = 30;
447+
TxData_L[1] = 0;
448+
TxData_L[5] = 1;
449+
450+
TxData_R[0] = 30;
451+
TxData_R[1] = 0;
452+
TxData_R[5] = 1;
453+
HAL_GPIO_WritePin(readyToDrive_LED_GPIO_Port,readyToDrive_LED_Pin,GPIO_PIN_SET);
444454
}else{
455+
TxData_L[0] = 0;
456+
TxData_L[1] = 0;
445457
TxData_L[3] = 0;
446458
TxData_L[2] = 0;
447459
TxData_L[5] = 0;
460+
461+
TxData_R[0] = 0;
462+
TxData_R[1] = 0;
463+
TxData_R[3] = 0;
464+
TxData_R[2] = 0;
465+
TxData_R[5] = 0;
466+
HAL_GPIO_WritePin(readyToDrive_LED_GPIO_Port,readyToDrive_LED_Pin,GPIO_PIN_RESET);
448467
}
449468
++cycle;
450469
}
@@ -472,6 +491,7 @@ void CAN_filterConfig(void){
472491
} //enable interrupt
473492

474493
}
494+
475495
void CAN_Txsetup(){
476496
if(HAL_CAN_Start(&hcan1)!=HAL_OK){
477497
Error_Handler();
@@ -536,12 +556,14 @@ void CAN_Txsetup(){
536556
TxData_clear[7]=0;
537557

538558
}
539-
559+
\
560+
/*
540561
void HAL_CAN_RxFifo0MsgPendingCallback(CAN_HandleTypeDef *hcan){
541562
if(HAL_CAN_GetRxMessage(hcan,CAN_RX_FIFO0,&RxMessage,RxData)!=HAL_OK){
542563
Error_Handler();
543564
}
544565
}
566+
*/
545567

546568

547569
void driving_mode(void){

calibration_inverter/MDK-ARM/controlBroad_program.uvguix.bob90

Lines changed: 66 additions & 66 deletions
Large diffs are not rendered by default.
Binary file not shown.

calibration_inverter/MDK-ARM/controlBroad_program/controlBroad_program.build_log.htm

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -27,24 +27,7 @@ <h2>Project:</h2>
2727
<h2>Output:</h2>
2828
*** Using Compiler 'V5.06 update 7 (build 960)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin'
2929
Build target 'controlBroad_program'
30-
compiling main.c...
31-
../Core/Src/main.c(211): warning: #1295-D: Deprecated declaration adxl_init - give arg types
32-
void adxl_init();
33-
../Core/Src/main.c(616): warning: #186-D: pointless comparison of unsigned integer with zero
34-
else if(APPSR>APPSRUPPEST || APPSL>APPSLUPPEST || BPPS>BPPSUPPEST||APPSR<APPSRLOWEST || APPSL<APPSLLOWEST ||BPPS<BPPSLOWEST){
35-
../Core/Src/main.c(616): warning: #186-D: pointless comparison of unsigned integer with zero
36-
else if(APPSR>APPSRUPPEST || APPSL>APPSLUPPEST || BPPS>BPPSUPPEST||APPSR<APPSRLOWEST || APPSL<APPSLLOWEST ||BPPS<BPPSLOWEST){
37-
../Core/Src/main.c(616): warning: #186-D: pointless comparison of unsigned integer with zero
38-
else if(APPSR>APPSRUPPEST || APPSL>APPSLUPPEST || BPPS>BPPSUPPEST||APPSR<APPSRLOWEST || APPSL<APPSLLOWEST ||BPPS<BPPSLOWEST){
39-
../Core/Src/main.c(96): warning: #550-D: variable "TxMessage_R_clear" was set but never used
40-
static CAN_TxHeaderTypeDef TxMessage_R_clear;
41-
../Core/Src/main.c(97): warning: #550-D: variable "TxMessage_L_clear" was set but never used
42-
static CAN_TxHeaderTypeDef TxMessage_L_clear;
43-
../Core/Src/main.c: 6 warnings, 0 errors
44-
linking...
45-
Program Size: Code=15104 RO-data=456 RW-data=160 ZI-data=1760
46-
FromELF: creating hex file...
47-
"controlBroad_program\controlBroad_program.axf" - 0 Error(s), 6 Warning(s).
30+
"controlBroad_program\controlBroad_program.axf" - 0 Error(s), 0 Warning(s).
4831

4932
<h2>Software Packages used:</h2>
5033

@@ -68,7 +51,7 @@ <h2>Collection of Component Files used:</h2>
6851

6952
* Component: ARM::CMSIS:CORE:5.4.0
7053
Include file: CMSIS\Core\Include\tz_context.h
71-
Build Time Elapsed: 00:00:02
54+
Build Time Elapsed: 00:00:00
7255
</pre>
7356
</body>
7457
</html>

0 commit comments

Comments
 (0)