From 2c14c458d94eaeb0ad7700a779f80b41399d01d7 Mon Sep 17 00:00:00 2001
From: AlkaMotors <37931458+AlkaMotors@users.noreply.github.com>
Date: Sun, 10 Nov 2024 12:00:40 -0400
Subject: [PATCH 1/5] Add hardware group, cremove check for high signal
---
Inc/targets.h | 36 +++++++++++
Keil_Projects/AM32_MultiProject.uvmpw | 2 +-
.../AM32_MultiProject.uvmpw.uvgui.alkaz | 59 ++++++++++++++-----
Keil_Projects/Am32F421.uvguix.alkaz | 12 ++--
Keil_Projects/Am32G071.uvguix.alkaz | 16 ++---
Src/main.c | 28 ---------
6 files changed, 94 insertions(+), 59 deletions(-)
diff --git a/Inc/targets.h b/Inc/targets.h
index da9d9e23..061a36e0 100644
--- a/Inc/targets.h
+++ b/Inc/targets.h
@@ -2488,6 +2488,42 @@
#endif
+#ifdef HARDWARE_GROUP_G0_L
+
+#define MCU_G071
+#define N_VARIANT
+#define USE_TIMER_3_CHANNEL_1
+#define INPUT_PIN LL_GPIO_PIN_6
+#define INPUT_PIN_PORT GPIOC
+#define IC_TIMER_CHANNEL LL_TIM_CHANNEL_CH1
+#define IC_TIMER_REGISTER TIM3
+#define IC_TIMER_POINTER htim3
+
+#define INPUT_DMA_CHANNEL LL_DMA_CHANNEL_1
+#define DMA_HANDLE_TYPE_DEF hdma_tim3_ch1
+#define IC_DMA_IRQ_NAME DMA1_Channel1_IRQn
+
+#define PHASE_A_GPIO_LOW LL_GPIO_PIN_1
+#define PHASE_A_GPIO_PORT_LOW GPIOB
+#define PHASE_A_GPIO_HIGH LL_GPIO_PIN_12
+#define PHASE_A_GPIO_PORT_HIGH GPIOA
+
+#define PHASE_B_GPIO_LOW LL_GPIO_PIN_0
+#define PHASE_B_GPIO_PORT_LOW GPIOB
+#define PHASE_B_GPIO_HIGH LL_GPIO_PIN_11
+#define PHASE_B_GPIO_PORT_HIGH GPIOA
+
+#define PHASE_C_GPIO_LOW LL_GPIO_PIN_7
+#define PHASE_C_GPIO_PORT_LOW GPIOA
+#define PHASE_C_GPIO_HIGH LL_GPIO_PIN_8
+#define PHASE_C_GPIO_PORT_HIGH GPIOA
+
+#define PHASE_A_COMP LL_COMP_INPUT_MINUS_IO1 // pb3
+#define PHASE_B_COMP LL_COMP_INPUT_MINUS_IO2 // pb7
+#define PHASE_C_COMP LL_COMP_INPUT_MINUS_IO3 // pa2
+
+#endif
+
#ifdef HARDWARE_GROUP_G4_A
#define MCU_G431
diff --git a/Keil_Projects/AM32_MultiProject.uvmpw b/Keil_Projects/AM32_MultiProject.uvmpw
index cdef7b15..38a86ecf 100644
--- a/Keil_Projects/AM32_MultiProject.uvmpw
+++ b/Keil_Projects/AM32_MultiProject.uvmpw
@@ -25,11 +25,11 @@
.\Am32F421.uvprojx
- 1
.\Am32G071.uvprojx
+ 1
1
diff --git a/Keil_Projects/AM32_MultiProject.uvmpw.uvgui.alkaz b/Keil_Projects/AM32_MultiProject.uvmpw.uvgui.alkaz
index d3d40e09..02e47739 100644
--- a/Keil_Projects/AM32_MultiProject.uvmpw.uvgui.alkaz
+++ b/Keil_Projects/AM32_MultiProject.uvmpw.uvgui.alkaz
@@ -20,17 +20,17 @@
-1
- 163
- 11
- 1336
- 1013
+ 82
+ 328
+ 1653
+ 932
0
- 60
- 010000000400000001000000010000000100000001000000000000000200000000000000010000000100000000000000280000002800000000000000
+ 332
+ 01000000040000000100000001000000010000000100000000000000020000000000000001000000010000000000000028000000280000000100000002000000010000000100000035433A5C55736572735C616C6B617A5C4F6E6544726976655C446F63756D656E74735C414D33325F4E65775C5372635C6D61696E2E6300000000066D61696E2E6300000000C5D4F200FFFFFFFF38433A5C55736572735C616C6B617A5C4F6E6544726976655C446F63756D656E74735C414D33325F4E65775C496E635C746172676574732E680000000009746172676574732E6800000000FFDC7800FFFFFFFF0100000010000000C5D4F200FFDC7800BECEA100F0A0A100BCA8E1009CC1B600F7B88600D9ADC200A5C2D700B3A6BE00EAD6A300F6FA7D00B5E99D005FC3CF00C1838300CACAD5000100000000000000020000001A0200007000000080070000C8030000
@@ -69,7 +69,7 @@
0
16
- 0300000073000000AE0100008C030000
+ 0300000073000000130200008C030000
16
@@ -89,7 +89,7 @@
0
16
- 0300000073000000AE0100008C030000
+ 0300000073000000130200008C030000
16
@@ -369,7 +369,7 @@
0
16
- 0300000073000000AE0100008C030000
+ 0300000073000000130200008C030000
16
@@ -389,7 +389,7 @@
0
16
- 0300000073000000AE0100008C030000
+ 0300000073000000130200008C030000
16
@@ -1718,14 +1718,14 @@
3317
- 000000000B000000000000000020000000000000FFFFFFFFFFFFFFFFAE000000B3000000F1030000B7000000000000000100000004000000010000000000000000000000FFFFFFFF08000000CB00000057010000CC000000F08B00005A01000079070000D601000045890000FFFF02000B004354616262656450616E650020000000000000AE0000006C000000F1030000D0000000AE0000004F000000F1030000B30000000000000040280046080000000B446973617373656D626C7900000000CB00000001000000FFFFFFFFFFFFFFFF14506572666F726D616E636520416E616C797A6572000000005701000001000000FFFFFFFFFFFFFFFF14506572666F726D616E636520416E616C797A657200000000CC00000001000000FFFFFFFFFFFFFFFF0E4C6F67696320416E616C797A657200000000F08B000001000000FFFFFFFFFFFFFFFF0D436F646520436F766572616765000000005A01000001000000FFFFFFFFFFFFFFFF11496E737472756374696F6E205472616365000000007907000001000000FFFFFFFFFFFFFFFF0F53797374656D20416E616C797A657200000000D601000001000000FFFFFFFFFFFFFFFF104576656E742053746174697374696373000000004589000001000000FFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000000000000000000000001000000FFFFFFFFCB00000001000000FFFFFFFFCB000000000000000040000000000000FFFFFFFFFFFFFFFF430300004F000000470300006B010000000000000200000004000000010000000000000000000000FFFFFFFF2B000000E2050000CA0900002D8C00002E8C00002F8C0000308C0000318C0000328C0000338C0000348C0000358C0000368C0000378C0000388C0000398C00003A8C00003B8C00003C8C00003D8C00003E8C00003F8C0000408C0000418C000050C3000051C3000052C3000053C3000054C3000055C3000056C3000057C3000058C3000059C300005AC300005BC300005CC300005DC300005EC300005FC3000060C3000061C3000062C3000063C3000001800040000000000000470300006C000000F103000088010000470300004F000000F10300006B01000000000000404100462B0000000753796D626F6C7300000000E205000001000000FFFFFFFFFFFFFFFF0A5472616365204461746100000000CA09000001000000FFFFFFFFFFFFFFFF00000000002D8C000001000000FFFFFFFFFFFFFFFF00000000002E8C000001000000FFFFFFFFFFFFFFFF00000000002F8C000001000000FFFFFFFFFFFFFFFF0000000000308C000001000000FFFFFFFFFFFFFFFF0000000000318C000001000000FFFFFFFFFFFFFFFF0000000000328C000001000000FFFFFFFFFFFFFFFF0000000000338C000001000000FFFFFFFFFFFFFFFF0000000000348C000001000000FFFFFFFFFFFFFFFF0000000000358C000001000000FFFFFFFFFFFFFFFF0000000000368C000001000000FFFFFFFFFFFFFFFF0000000000378C000001000000FFFFFFFFFFFFFFFF0000000000388C000001000000FFFFFFFFFFFFFFFF0000000000398C000001000000FFFFFFFFFFFFFFFF00000000003A8C000001000000FFFFFFFFFFFFFFFF00000000003B8C000001000000FFFFFFFFFFFFFFFF00000000003C8C000001000000FFFFFFFFFFFFFFFF00000000003D8C000001000000FFFFFFFFFFFFFFFF00000000003E8C000001000000FFFFFFFFFFFFFFFF00000000003F8C000001000000FFFFFFFFFFFFFFFF0000000000408C000001000000FFFFFFFFFFFFFFFF0000000000418C000001000000FFFFFFFFFFFFFFFF000000000050C3000001000000FFFFFFFFFFFFFFFF000000000051C3000001000000FFFFFFFFFFFFFFFF000000000052C3000001000000FFFFFFFFFFFFFFFF000000000053C3000001000000FFFFFFFFFFFFFFFF000000000054C3000001000000FFFFFFFFFFFFFFFF000000000055C3000001000000FFFFFFFFFFFFFFFF000000000056C3000001000000FFFFFFFFFFFFFFFF000000000057C3000001000000FFFFFFFFFFFFFFFF000000000058C3000001000000FFFFFFFFFFFFFFFF000000000059C3000001000000FFFFFFFFFFFFFFFF00000000005AC3000001000000FFFFFFFFFFFFFFFF00000000005BC3000001000000FFFFFFFFFFFFFFFF00000000005CC3000001000000FFFFFFFFFFFFFFFF00000000005DC3000001000000FFFFFFFFFFFFFFFF00000000005EC3000001000000FFFFFFFFFFFFFFFF00000000005FC3000001000000FFFFFFFFFFFFFFFF000000000060C3000001000000FFFFFFFFFFFFFFFF000000000061C3000001000000FFFFFFFFFFFFFFFF000000000062C3000001000000FFFFFFFFFFFFFFFF000000000063C3000001000000FFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000000000000000000000001000000FFFFFFFFE205000001000000FFFFFFFFE2050000000000000010000001000000FFFFFFFFFFFFFFFFB101000053000000B5010000AB03000001000000020000100400000001000000A1FEFFFFEC030000FFFFFFFF05000000ED0300006D000000C3000000C400000073940000018000100000010000000000000070000000B1010000C80300000000000053000000B1010000AB0300000000000040410056050000000750726F6A65637401000000ED03000001000000FFFFFFFFFFFFFFFF05426F6F6B73010000006D00000001000000FFFFFFFFFFFFFFFF0946756E6374696F6E7301000000C300000001000000FFFFFFFFFFFFFFFF0954656D706C6174657301000000C400000001000000FFFFFFFFFFFFFFFF09526567697374657273000000007394000001000000FFFFFFFFFFFFFFFF00000000000000000000000000000000000000000000000001000000FFFFFFFFED03000001000000FFFFFFFFED030000000000000080000000000000FFFFFFFFFFFFFFFF0000000053000000800700005700000000000000010000000400000001000000000000000000000000000000000000000000000001000000C6000000FFFFFFFF0F0000008F070000930700009407000095070000960700009007000091070000B5010000B801000038030000B9050000BA050000BB050000BC050000CB09000001800080000000000000000000005800000080070000C8030000000000003B00000080070000AB03000000000000404100460F0000001343616C6C20537461636B202B204C6F63616C73000000008F07000001000000FFFFFFFFFFFFFFFF0755415254202331000000009307000001000000FFFFFFFFFFFFFFFF0755415254202332000000009407000001000000FFFFFFFFFFFFFFFF0755415254202333000000009507000001000000FFFFFFFFFFFFFFFF15446562756720287072696E74662920566965776572000000009607000001000000FFFFFFFFFFFFFFFF0757617463682031000000009007000001000000FFFFFFFFFFFFFFFF0757617463682032000000009107000001000000FFFFFFFFFFFFFFFF10547261636520457863657074696F6E7300000000B501000001000000FFFFFFFFFFFFFFFF0E4576656E7420436F756E7465727300000000B801000001000000FFFFFFFFFFFFFFFF09554C494E4B706C7573000000003803000001000000FFFFFFFFFFFFFFFF084D656D6F7279203100000000B905000001000000FFFFFFFFFFFFFFFF084D656D6F7279203200000000BA05000001000000FFFFFFFFFFFFFFFF084D656D6F7279203300000000BB05000001000000FFFFFFFFFFFFFFFF084D656D6F7279203400000000BC05000001000000FFFFFFFFFFFFFFFF105472616365204E617669676174696F6E00000000CB09000001000000FFFFFFFFFFFFFFFFFFFFFFFF0000000001000000000000000000000001000000FFFFFFFFF90100005E010000FD010000D301000000000000020000000400000000000000000000000000000000000000000000000000000002000000C6000000FFFFFFFF8F07000001000000FFFFFFFF8F07000001000000C6000000000000000080000000000000FFFFFFFFFFFFFFFF00000000BD02000080070000C1020000000000000100000004000000010000001BFFFFFF68020000FFFFFFFF04000000B4010000D2010000CF010000779400000180008000000000000000000000DE02000080070000C803000000000000C102000080070000AB0300000000000040820046040000000A4572726F72204C69737400000000B401000001000000FFFFFFFFFFFFFFFF0E536F757263652042726F7773657200000000D201000001000000FFFFFFFFFFFFFFFF0E416C6C205265666572656E63657300000000CF01000001000000FFFFFFFFFFFFFFFF0742726F77736572000000007794000001000000FFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000000000000000000000001000000FFFFFFFFB401000001000000FFFFFFFFB40100000000000002000000C5000000008000000100000000000000C803000080070000AA040000010000000100000001000000C7000000008000000100000000000000C8030000800700009504000001000000010000000100000000000000
+ 000000000B000000000000000020000000000000FFFFFFFFFFFFFFFFAE000000B3000000F1030000B7000000000000000100000004000000010000000000000000000000FFFFFFFF08000000CB00000057010000CC000000F08B00005A01000079070000D601000045890000FFFF02000B004354616262656450616E650020000000000000AE0000006C000000F1030000D0000000AE0000004F000000F1030000B30000000000000040280046080000000B446973617373656D626C7900000000CB00000001000000FFFFFFFFFFFFFFFF14506572666F726D616E636520416E616C797A6572000000005701000001000000FFFFFFFFFFFFFFFF14506572666F726D616E636520416E616C797A657200000000CC00000001000000FFFFFFFFFFFFFFFF0E4C6F67696320416E616C797A657200000000F08B000001000000FFFFFFFFFFFFFFFF0D436F646520436F766572616765000000005A01000001000000FFFFFFFFFFFFFFFF11496E737472756374696F6E205472616365000000007907000001000000FFFFFFFFFFFFFFFF0F53797374656D20416E616C797A657200000000D601000001000000FFFFFFFFFFFFFFFF104576656E742053746174697374696373000000004589000001000000FFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000000000000000000000001000000FFFFFFFFCB00000001000000FFFFFFFFCB000000000000000040000000000000FFFFFFFFFFFFFFFF430300004F000000470300006B010000000000000200000004000000010000000000000000000000FFFFFFFF2B000000E2050000CA0900002D8C00002E8C00002F8C0000308C0000318C0000328C0000338C0000348C0000358C0000368C0000378C0000388C0000398C00003A8C00003B8C00003C8C00003D8C00003E8C00003F8C0000408C0000418C000050C3000051C3000052C3000053C3000054C3000055C3000056C3000057C3000058C3000059C300005AC300005BC300005CC300005DC300005EC300005FC3000060C3000061C3000062C3000063C3000001800040000000000000470300006C000000F103000088010000470300004F000000F10300006B01000000000000404100462B0000000753796D626F6C7300000000E205000001000000FFFFFFFFFFFFFFFF0A5472616365204461746100000000CA09000001000000FFFFFFFFFFFFFFFF00000000002D8C000001000000FFFFFFFFFFFFFFFF00000000002E8C000001000000FFFFFFFFFFFFFFFF00000000002F8C000001000000FFFFFFFFFFFFFFFF0000000000308C000001000000FFFFFFFFFFFFFFFF0000000000318C000001000000FFFFFFFFFFFFFFFF0000000000328C000001000000FFFFFFFFFFFFFFFF0000000000338C000001000000FFFFFFFFFFFFFFFF0000000000348C000001000000FFFFFFFFFFFFFFFF0000000000358C000001000000FFFFFFFFFFFFFFFF0000000000368C000001000000FFFFFFFFFFFFFFFF0000000000378C000001000000FFFFFFFFFFFFFFFF0000000000388C000001000000FFFFFFFFFFFFFFFF0000000000398C000001000000FFFFFFFFFFFFFFFF00000000003A8C000001000000FFFFFFFFFFFFFFFF00000000003B8C000001000000FFFFFFFFFFFFFFFF00000000003C8C000001000000FFFFFFFFFFFFFFFF00000000003D8C000001000000FFFFFFFFFFFFFFFF00000000003E8C000001000000FFFFFFFFFFFFFFFF00000000003F8C000001000000FFFFFFFFFFFFFFFF0000000000408C000001000000FFFFFFFFFFFFFFFF0000000000418C000001000000FFFFFFFFFFFFFFFF000000000050C3000001000000FFFFFFFFFFFFFFFF000000000051C3000001000000FFFFFFFFFFFFFFFF000000000052C3000001000000FFFFFFFFFFFFFFFF000000000053C3000001000000FFFFFFFFFFFFFFFF000000000054C3000001000000FFFFFFFFFFFFFFFF000000000055C3000001000000FFFFFFFFFFFFFFFF000000000056C3000001000000FFFFFFFFFFFFFFFF000000000057C3000001000000FFFFFFFFFFFFFFFF000000000058C3000001000000FFFFFFFFFFFFFFFF000000000059C3000001000000FFFFFFFFFFFFFFFF00000000005AC3000001000000FFFFFFFFFFFFFFFF00000000005BC3000001000000FFFFFFFFFFFFFFFF00000000005CC3000001000000FFFFFFFFFFFFFFFF00000000005DC3000001000000FFFFFFFFFFFFFFFF00000000005EC3000001000000FFFFFFFFFFFFFFFF00000000005FC3000001000000FFFFFFFFFFFFFFFF000000000060C3000001000000FFFFFFFFFFFFFFFF000000000061C3000001000000FFFFFFFFFFFFFFFF000000000062C3000001000000FFFFFFFFFFFFFFFF000000000063C3000001000000FFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000000000000000000000001000000FFFFFFFFE205000001000000FFFFFFFFE2050000000000000010000001000000FFFFFFFFFFFFFFFF16020000530000001A020000AB0300000100000002000010040000000100000051FEFFFFC6050000FFFFFFFF05000000ED0300006D000000C3000000C400000073940000018000100000010000000000000070000000B1010000C8030000000000005300000016020000AB0300000000000040410056050000000750726F6A65637401000000ED03000001000000FFFFFFFFFFFFFFFF05426F6F6B73010000006D00000001000000FFFFFFFFFFFFFFFF0946756E6374696F6E7301000000C300000001000000FFFFFFFFFFFFFFFF0954656D706C6174657301000000C400000001000000FFFFFFFFFFFFFFFF09526567697374657273000000007394000001000000FFFFFFFFFFFFFFFF00000000000000000000000000000000000000000000000001000000FFFFFFFFED03000001000000FFFFFFFFED030000000000000080000000000000FFFFFFFFFFFFFFFF0000000053000000800700005700000000000000010000000400000001000000000000000000000000000000000000000000000001000000C6000000FFFFFFFF0F0000008F070000930700009407000095070000960700009007000091070000B5010000B801000038030000B9050000BA050000BB050000BC050000CB09000001800080000000000000000000005800000080070000C8030000000000003B00000080070000AB03000000000000404100460F0000001343616C6C20537461636B202B204C6F63616C73000000008F07000001000000FFFFFFFFFFFFFFFF0755415254202331000000009307000001000000FFFFFFFFFFFFFFFF0755415254202332000000009407000001000000FFFFFFFFFFFFFFFF0755415254202333000000009507000001000000FFFFFFFFFFFFFFFF15446562756720287072696E74662920566965776572000000009607000001000000FFFFFFFFFFFFFFFF0757617463682031000000009007000001000000FFFFFFFFFFFFFFFF0757617463682032000000009107000001000000FFFFFFFFFFFFFFFF10547261636520457863657074696F6E7300000000B501000001000000FFFFFFFFFFFFFFFF0E4576656E7420436F756E7465727300000000B801000001000000FFFFFFFFFFFFFFFF09554C494E4B706C7573000000003803000001000000FFFFFFFFFFFFFFFF084D656D6F7279203100000000B905000001000000FFFFFFFFFFFFFFFF084D656D6F7279203200000000BA05000001000000FFFFFFFFFFFFFFFF084D656D6F7279203300000000BB05000001000000FFFFFFFFFFFFFFFF084D656D6F7279203400000000BC05000001000000FFFFFFFFFFFFFFFF105472616365204E617669676174696F6E00000000CB09000001000000FFFFFFFFFFFFFFFFFFFFFFFF0000000001000000000000000000000001000000FFFFFFFFF90100005E010000FD010000D301000000000000020000000400000000000000000000000000000000000000000000000000000002000000C6000000FFFFFFFF8F07000001000000FFFFFFFF8F07000001000000C6000000000000000080000000000000FFFFFFFFFFFFFFFF00000000BD02000080070000C1020000000000000100000004000000010000001BFFFFFF68020000FFFFFFFF04000000B4010000D2010000CF010000779400000180008000000000000000000000DE02000080070000C803000000000000C102000080070000AB0300000000000040820046040000000A4572726F72204C69737400000000B401000001000000FFFFFFFFFFFFFFFF0E536F757263652042726F7773657200000000D201000001000000FFFFFFFFFFFFFFFF0E416C6C205265666572656E63657300000000CF01000001000000FFFFFFFFFFFFFFFF0742726F77736572000000007794000001000000FFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000000000000000000000001000000FFFFFFFFB401000001000000FFFFFFFFB40100000000000002000000C5000000008000000100000000000000C803000080070000AA040000010000000100000001000000C7000000008000000100000000000000C8030000800700009504000001000000010000000100000000000000
59392
File
- 2833
- 00200000010000002800FFFF01001100434D4643546F6F6C426172427574746F6E00E100000000000000000000000000000000000000000000000100000001000000018001E100000000000001000000000000000000000000000000000100000001000000018003E1000000000400020000000000000000000000000000000001000000010000000180CD7F0000000000000300000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018023E100000000040004000000000000000000000000000000000100000001000000018022E100000000040005000000000000000000000000000000000100000001000000018025E10000000004000600000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001802BE10000000004000700000000000000000000000000000000010000000100000001802CE10000000004000800000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001807A8A0000000004000900000000000000000000000000000000010000000100000001807B8A0000000004000A00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180D3B00000000004000B000000000000000000000000000000000100000001000000018015B10000000004000C0000000000000000000000000000000001000000010000000180F4B00000000004000D000000000000000000000000000000000100000001000000018036B10000000004000E00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FF88000000000400460000000000000000000000000000000001000000010000000180FE880000000004004500000000000000000000000000000000010000000100000001800B810000000004001300000000000000000000000000000000010000000100000001800C810000000004001400000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180F0880000020000000F000000000000000000000000000000000100000001000000FFFF0100120043555646696E64436F6D626F427574746F6EE8030000000004000000000000000000000000000000000000010000000100000096000000020020500000000015534B5953544152535F414D36305F56325F463432319600000000000000120015534B5953544152535F414D36305F56325F46343231046B6D3535036634611348415244574152455F47524F55505F47305F460673657175726509455854495F4C494E450474756E650561726D65640462656D660D7369676E616C74696D656F757404333333340C737465707065725F73696E650473696E651854494D315F55505F54494D31365F49525148616E646C65721345585449345F31355F49525148616E646C65720E4C4C5F434F4D505F456E61626C650D54494D365F4441435F4952516E077462735F313273000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018024E10000000000001100000000000000000000000000000000010000000100000001800A810000000004001200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000FFFF01001500434D4643546F6F6C4261724D656E75427574746F6E2280000002000000150000002153746172742F53746F70202644656275672053657373696F6E094374726C2B46350000000000000000000000000100000001000000000000000000000001000000020021802280000000000000150000002153746172742F53746F70202644656275672053657373696F6E094374726C2B4635000000000000000000000000010000000100000000000000000000000100000000002180E0010000000000007500000021456E65726779204D6561737572656D656E742026776974686F75742044656275670000000000000000000000000100000001000000000000000000000001000000000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C488000000000400160000000000000000000000000000000001000000010000000180C988000000000400180000000000000000000000000000000001000000010000000180C788000000000000190000000000000000000000000000000001000000010000002180C8880000000000001700000027264B696C6C20416C6C20427265616B706F696E747320696E2043757272656E7420546172676574000000000000000000000000010000000100000000000000000000000100000003002180C8880000000000001700000027264B696C6C20416C6C20427265616B706F696E747320696E2043757272656E7420546172676574000000000000000000000000010000000100000000000000000000000100000000002180E50100000000000078000000264B696C6C20416C6C20427265616B706F696E747320696E204163746976652050726F6A656374000000000000000000000000010000000100000000000000000000000100000000002180E601000000000000790000002F4B696C6C20416C6C20427265616B706F696E747320696E204D756C74692D50726F6A65637420576F726B73706163650000000000000000000000000100000001000000000000000000000001000000000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000021804C010000020001001A0000000F2650726F6A6563742057696E646F77000000000000000000000000010000000100000000000000000000000100000008002180DD880000000000001A0000000750726F6A656374000000000000000000000000010000000100000000000000000000000100000000002180DC8B0000000000003A00000005426F6F6B73000000000000000000000000010000000100000000000000000000000100000000002180E18B0000000000003B0000000946756E6374696F6E73000000000000000000000000010000000100000000000000000000000100000000002180E28B000000000000400000000954656D706C6174657300000000000000000000000001000000010000000000000000000000010000000000218018890000000000003D0000000E536F757263652042726F777365720000000000000000000000000100000001000000000000000000000001000000000021800000000000000400FFFFFFFF00000000000000000001000000000000000100000000000000000000000100000000002180D988000000000000390000000C4275696C64204F7574707574000000000000000000000000010000000100000000000000000000000100000000002180E38B000000000000410000000B46696E64204F75747075740000000000000000000000000100000001000000000000000000000001000000000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FB7F0000000000001B000000000000000000000000000000000100000001000000000000000446696C6559010000
+ 2552
+ 00200000010000002800FFFF01001100434D4643546F6F6C426172427574746F6E00E100000000000000000000000000000000000000000000000100000001000000018001E100000000000001000000000000000000000000000000000100000001000000018003E1000000000000020000000000000000000000000000000001000000010000000180CD7F0000000000000300000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018023E100000000040004000000000000000000000000000000000100000001000000018022E100000000040005000000000000000000000000000000000100000001000000018025E10000000000000600000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001802BE10000000004000700000000000000000000000000000000010000000100000001802CE10000000004000800000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001807A8A0000000000000900000000000000000000000000000000010000000100000001807B8A0000000004000A00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180D3B00000000000000B000000000000000000000000000000000100000001000000018015B10000000004000C0000000000000000000000000000000001000000010000000180F4B00000000004000D000000000000000000000000000000000100000001000000018036B10000000004000E00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FF88000000000400460000000000000000000000000000000001000000010000000180FE880000000004004500000000000000000000000000000000010000000100000001800B810000000004001300000000000000000000000000000000010000000100000001800C810000000004001400000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180F0880000020000000F000000000000000000000000000000000100000001000000FFFF0100120043555646696E64436F6D626F427574746F6EE803000000000000000000000000000000000000000000000001000000010000009600000002002050000000000574686573659600000000000000010005746865736500000000018024E10000000000001100000000000000000000000000000000010000000100000001800A810000000000001200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000FFFF01001500434D4643546F6F6C4261724D656E75427574746F6E2280000002000000150000002153746172742F53746F70202644656275672053657373696F6E094374726C2B46350000000000000000000000000100000001000000000000000000000001000000020021802280000000000000150000002153746172742F53746F70202644656275672053657373696F6E094374726C2B4635000000000000000000000000010000000100000000000000000000000100000000002180E0010000000000007500000021456E65726779204D6561737572656D656E742026776974686F75742044656275670000000000000000000000000100000001000000000000000000000001000000000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C488000000000400160000000000000000000000000000000001000000010000000180C988000000000400180000000000000000000000000000000001000000010000000180C788000000000000190000000000000000000000000000000001000000010000002180C8880000000000001700000027264B696C6C20416C6C20427265616B706F696E747320696E2043757272656E7420546172676574000000000000000000000000010000000100000000000000000000000100000003002180C8880000000000001700000027264B696C6C20416C6C20427265616B706F696E747320696E2043757272656E7420546172676574000000000000000000000000010000000100000000000000000000000100000000002180E50100000000000078000000264B696C6C20416C6C20427265616B706F696E747320696E204163746976652050726F6A656374000000000000000000000000010000000100000000000000000000000100000000002180E601000000000000790000002F4B696C6C20416C6C20427265616B706F696E747320696E204D756C74692D50726F6A65637420576F726B73706163650000000000000000000000000100000001000000000000000000000001000000000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000021804C010000020001001A0000000F2650726F6A6563742057696E646F77000000000000000000000000010000000100000000000000000000000100000008002180DD880000000000001A0000000750726F6A656374000000000000000000000000010000000100000000000000000000000100000000002180DC8B0000000000003A00000005426F6F6B73000000000000000000000000010000000100000000000000000000000100000000002180E18B0000000000003B0000000946756E6374696F6E73000000000000000000000000010000000100000000000000000000000100000000002180E28B000000000000400000000954656D706C6174657300000000000000000000000001000000010000000000000000000000010000000000218018890000000000003D0000000E536F757263652042726F777365720000000000000000000000000100000001000000000000000000000001000000000021800000000000000400FFFFFFFF00000000000000000001000000000000000100000000000000000000000100000000002180D988000000000000390000000C4275696C64204F7574707574000000000000000000000000010000000100000000000000000000000100000000002180E38B000000000000410000000B46696E64204F75747075740000000000000000000000000100000001000000000000000000000001000000000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FB7F0000000000001B000000000000000000000000000000000100000001000000000000000446696C6559010000
1423
@@ -1740,8 +1740,8 @@
59399
Build
- 1813
- 00200000010000001000FFFF01001100434D4643546F6F6C426172427574746F6ECF7F0000000004001C0000000000000000000000000000000001000000010000000180D07F0000000000001D000000000000000000000000000000000100000001000000018030800000000000001E000000000000000000000000000000000100000001000000FFFF01001500434D4643546F6F6C4261724D656E75427574746F6EC7040000000000006A0000000C4261746368204275696C2664000000000000000000000000010000000100000000000000000000000100000004000580C7040000000000006A0000000C4261746368204275696C266400000000000000000000000001000000010000000000000000000000010000000000058046070000000000006B0000000D42617463682052656275696C640000000000000000000000000100000001000000000000000000000001000000000005804707000000000000FFFFFFFF0B426174636820436C65616E0100000000000000000000000100000001000000000000000000000001000000000005809E8A0000000000001F0000000F4261746326682053657475702E2E2E000000000000000000000000010000000100000000000000000000000100000000000180D17F0000000004002000000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001804C8A0000000000002100000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000FFFF01001900434D4643546F6F6C426172436F6D626F426F78427574746F6EBA000000000000000000000000000000000000000000000000010000000100000096000000030020502C00000015534B5953544152535F4B4D35355F56325F4634323196000000000000002D000C415433324445565F463432310C54454B4B4F33325F463432310C41494B4F4E5F53494E474C4506464F584545520941494B4F4E5F3535410857524149544833320848414B52435F4B420848414B52435F47420C535741505F50574D5F50494E1041543332463432315F5042345F3035341041543332463432315F5042345F3430351041543332463432315F5042345F353430074634415F41494F084634415F34494E3109534C4F544341525F470B4634415F455854434F4D500948414B52435F473233144E455554524F4E5F315F32535F4D494E4941494F114E455554524F4E5F325F36535F463432310F464C415348484F4242595F463432310C44414B454650565F463432310D5442535F4D494E495F46343231114E455554524F4E5F34494E315F463432311152525F524F424F545F4455414C5F4553430A47695053795F4634323115534B5953544152535F414D36305F56325F463432310C5442535F3132535F463432310D464C59524F544F525F31353041125350454544594245455F3635415F4634323113534B5953544152535F4D565036305F463432310B5350454449585F463432310B4753504143455F46343231114A4D49544553545F315F32535F46343231105345515552455F544553545F46343231105442535F36535F34494E315F463432310B4149524245455F463432311049464C494748545F544553545F4634410D41545F46345F30345F463432311B534B5953544152535F414D36305F54485255535445525F463432310D414F52435F4B5F415F463432310D414F52435F475F415F4634323112424159434B52435F535F3535415F463432310F464C59574F4F5F4634415F463432310B464C59574F4F5F4634323115534B5953544152535F4B4D35355F56325F463432310000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000180EB880000000000002200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C07F000000000000230000000000000000000000000000000001000000010000000180B08A000000000000240000000000000000000000000000000001000000010000000180A8010000000000004E00000000000000000000000000000000010000000100000001807202000000000000530000000000000000000000000000000001000000010000000180BE010000000000005000000000000000000000000000000000010000000100000000000000054275696C642F010000
+ 1399
+ 00200000010000001000FFFF01001100434D4643546F6F6C426172427574746F6ECF7F0000000004001C0000000000000000000000000000000001000000010000000180D07F0000000000001D000000000000000000000000000000000100000001000000018030800000000000001E000000000000000000000000000000000100000001000000FFFF01001500434D4643546F6F6C4261724D656E75427574746F6EC7040000000000006A0000000C4261746368204275696C2664000000000000000000000000010000000100000000000000000000000100000004000580C7040000000000006A0000000C4261746368204275696C266400000000000000000000000001000000010000000000000000000000010000000000058046070000000000006B0000000D42617463682052656275696C640000000000000000000000000100000001000000000000000000000001000000000005804707000000000000FFFFFFFF0B426174636820436C65616E0100000000000000000000000100000001000000000000000000000001000000000005809E8A0000000000001F0000000F4261746326682053657475702E2E2E000000000000000000000000010000000100000000000000000000000100000000000180D17F0000000004002000000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001804C8A0000000000002100000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000FFFF01001900434D4643546F6F6C426172436F6D626F426F78427574746F6EBA00000000000000000000000000000000000000000000000001000000010000009600000003002050150000000A5252494F545F47303731960000000000000016000C47454E5F36344B5F473037310E44543132305F36344B5F473037310E4E455554524F4E52435F473037311249464C494748545F424C49545A5F473037310E41494B4F4E5F50524F5F473037310B544D4F544F525F473037310B5345515552455F473037310F48414B52435F323032335F473037310F5345515552455F3132535F4730373111464C59434F4C4F525F4856335F473037310C414F52435F47505F473037310C414F52435F50445F473037311049464C494748545F3132535F473037311449464C494748545F424C49545A5F4E5F47303731105345515552455F34494E315F47303731134E455554524F4E5F50554C4C55505F473037310D414D33325F4553435F473037311949464C494748545F3132535F53494E474C455F4E5F473037310F53545F47305F30335F4E5F473037310D53545F47305F30345F473037310C535552464245455F473037310A5252494F545F47303731000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000180EB880000000000002200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C07F000000000000230000000000000000000000000000000001000000010000000180B08A000000000000240000000000000000000000000000000001000000010000000180A8010000000000004E00000000000000000000000000000000010000000100000001807202000000000000530000000000000000000000000000000001000000010000000180BE010000000000005000000000000000000000000000000000010000000100000000000000054275696C642F010000
583
@@ -1757,7 +1757,7 @@
Debug
2373
- 00200000000000001900FFFF01001100434D4643546F6F6C426172427574746F6ECC880000000000002500000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018017800000000000002600000000000000000000000000000000010000000100000001801D800000000000002700000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001801A800000000000002800000000000000000000000000000000010000000100000001801B80000000000000290000000000000000000000000000000001000000010000000180E57F0000000000002A00000000000000000000000000000000010000000100000001801C800000000000002B00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018000890000000000002C00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180E48B0000000000002D0000000000000000000000000000000001000000010000000180F07F0000000000002E0000000000000000000000000000000001000000010000000180E8880000000000003700000000000000000000000000000000010000000100000001803B010000000000002F0000000000000000000000000000000001000000010000000180BB8A00000000000030000000000000000000000000000000000100000001000000FFFF01001500434D4643546F6F6C4261724D656E75427574746F6E0E01000000000000310000000D57617463682057696E646F7773000000000000000000000000010000000100000000000000000000000100000003001380D88B00000000000031000000085761746368202631000000000000000000000000010000000100000000000000000000000100000000001380D98B00000000000031000000085761746368202632000000000000000000000000010000000100000000000000000000000100000000001380CE01000000000000FFFFFFFF0C576174636820416E63686F720100000000000000010000000000000001000000000000000000000001000000000013800F01000000000000320000000E4D656D6F72792057696E646F7773000000000000000000000000010000000100000000000000000000000100000004001380D28B00000000000032000000094D656D6F7279202631000000000000000000000000010000000100000000000000000000000100000000001380D38B00000000000032000000094D656D6F7279202632000000000000000000000000010000000100000000000000000000000100000000001380D48B00000000000032000000094D656D6F7279202633000000000000000000000000010000000100000000000000000000000100000000001380D58B00000000000032000000094D656D6F72792026340000000000000000000000000100000001000000000000000000000001000000000013801001000000000000330000000E53657269616C2057696E646F77730000000000000000000000000100000001000000000000000000000001000000040013809307000000000000330000000855415254202326310000000000000000000000000100000001000000000000000000000001000000000013809407000000000000330000000855415254202326320000000000000000000000000100000001000000000000000000000001000000000013809507000000000000330000000855415254202326330000000000000000000000000100000001000000000000000000000001000000000013809607000000000000330000001626446562756720287072696E746629205669657765720000000000000000000000000100000001000000000000000000000001000000000013803C010000000000007200000010416E616C797369732057696E646F7773000000000000000000000000010000000100000000000000000000000100000004001380658A000000000000340000000F264C6F67696320416E616C797A6572000000000000000000000000010000000100000000000000000000000100000000001380DC7F0000000000003E0000001526506572666F726D616E636520416E616C797A6572000000000000000000000000010000000100000000000000000000000100000000001380E788000000000000380000000E26436F646520436F766572616765000000000000000000000000010000000100000000000000000000000100000000001380CD01000000000000FFFFFFFF0F416E616C7973697320416E63686F7201000000000000000100000000000000010000000000000000000000010000000000138053010000000000003F0000000D54726163652057696E646F77730000000000000000000000000100000001000000000000000000000001000000010013805401000000000000FFFFFFFF115472616365204D656E7520416E63686F720100000000000000010000000000000001000000000000000000000001000000000013802901000000000000350000001553797374656D205669657765722057696E646F77730000000000000000000000000100000001000000000000000000000001000000010013804B01000000000000FFFFFFFF1453797374656D2056696577657220416E63686F720100000000000000010000000000000001000000000000000000000001000000000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000013800189000000000000360000000F26546F6F6C626F782057696E646F7700000000000000000000000001000000010000000000000000000000010000000300138044C5000000000000FFFFFFFF0E5570646174652057696E646F77730100000000000000010000000000000001000000000000000000000001000000000013800000000000000400FFFFFFFF000000000000000000010000000000000001000000000000000000000001000000000013805B01000000000000FFFFFFFF12546F6F6C626F78204D656E75416E63686F720100000000000000010000000000000001000000000000000000000001000000000000000000054465627567D9000000
+ 00200000000000001900FFFF01001100434D4643546F6F6C426172427574746F6ECC880000000000002500000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018017800000000000002600000000000000000000000000000000010000000100000001801D800000000000002700000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001801A800000000000002800000000000000000000000000000000010000000100000001801B80000000000000290000000000000000000000000000000001000000010000000180E57F0000000000002A00000000000000000000000000000000010000000100000001801C800000000000002B00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018000890000000000002C00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180E48B0000000000002D0000000000000000000000000000000001000000010000000180F07F0000000000002E0000000000000000000000000000000001000000010000000180E8880000000000003700000000000000000000000000000000010000000100000001803B010000000000002F0000000000000000000000000000000001000000010000000180BB8A00000000000030000000000000000000000000000000000100000001000000FFFF01001500434D4643546F6F6C4261724D656E75427574746F6E0E01000000000000310000000D57617463682057696E646F7773000000000000000000000000010000000100000000000000000000000100000003001380D88B00000000000031000000085761746368202631000000000000000000000000010000000100000000000000000000000100000000001380D98B00000000000031000000085761746368202632000000000000000000000000010000000100000000000000000000000100000000001380CE01000000000000FFFFFFFF0C576174636820416E63686F720000000000000000010000000000000001000000000000000000000001000000000013800F01000000000000320000000E4D656D6F72792057696E646F7773000000000000000000000000010000000100000000000000000000000100000004001380D28B00000000000032000000094D656D6F7279202631000000000000000000000000010000000100000000000000000000000100000000001380D38B00000000000032000000094D656D6F7279202632000000000000000000000000010000000100000000000000000000000100000000001380D48B00000000000032000000094D656D6F7279202633000000000000000000000000010000000100000000000000000000000100000000001380D58B00000000000032000000094D656D6F72792026340000000000000000000000000100000001000000000000000000000001000000000013801001000000000000330000000E53657269616C2057696E646F77730000000000000000000000000100000001000000000000000000000001000000040013809307000000000000330000000855415254202326310000000000000000000000000100000001000000000000000000000001000000000013809407000000000000330000000855415254202326320000000000000000000000000100000001000000000000000000000001000000000013809507000000000000330000000855415254202326330000000000000000000000000100000001000000000000000000000001000000000013809607000000000000330000001626446562756720287072696E746629205669657765720000000000000000000000000100000001000000000000000000000001000000000013803C010000000000007200000010416E616C797369732057696E646F7773000000000000000000000000010000000100000000000000000000000100000004001380658A000000000000340000000F264C6F67696320416E616C797A6572000000000000000000000000010000000100000000000000000000000100000000001380DC7F0000000000003E0000001526506572666F726D616E636520416E616C797A6572000000000000000000000000010000000100000000000000000000000100000000001380E788000000000000380000000E26436F646520436F766572616765000000000000000000000000010000000100000000000000000000000100000000001380CD01000000000000FFFFFFFF0F416E616C7973697320416E63686F7200000000000000000100000000000000010000000000000000000000010000000000138053010000000000003F0000000D54726163652057696E646F77730000000000000000000000000100000001000000000000000000000001000000010013805401000000000000FFFFFFFF115472616365204D656E7520416E63686F720000000000000000010000000000000001000000000000000000000001000000000013802901000000000000350000001553797374656D205669657765722057696E646F77730000000000000000000000000100000001000000000000000000000001000000010013804B01000000000000FFFFFFFF1453797374656D2056696577657220416E63686F720000000000000000010000000000000001000000000000000000000001000000000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000013800189000000000000360000000F26546F6F6C626F782057696E646F7700000000000000000000000001000000010000000000000000000000010000000300138044C5000000000000FFFFFFFF0E5570646174652057696E646F77730000000000000000010000000000000001000000000000000000000001000000000013800000000000000400FFFFFFFF000000000000000000010000000000000001000000000000000000000001000000000013805B01000000000000FFFFFFFF12546F6F6C626F78204D656E75416E63686F720000000000000000010000000000000001000000000000000000000001000000000000000000054465627567D9000000
898
@@ -1776,4 +1776,31 @@
+
+ 1
+ 0
+
+ 100
+ 1
+
+ <1>..\Src\main.c
+ 0
+ 1
+ 1
+ 1
+
+ 0
+
+
+ <1>..\Inc\targets.h
+ 0
+ 1
+ 1
+ 1
+
+ 0
+
+
+
+
diff --git a/Keil_Projects/Am32F421.uvguix.alkaz b/Keil_Projects/Am32F421.uvguix.alkaz
index 7310e584..429890d3 100644
--- a/Keil_Projects/Am32F421.uvguix.alkaz
+++ b/Keil_Projects/Am32F421.uvguix.alkaz
@@ -894,17 +894,17 @@
-1
- 163
- 11
- 1336
- 1013
+ 82
+ 328
+ 1653
+ 932
0
- 60
- 010000000400000001000000010000000100000001000000000000000200000000000000010000000100000000000000280000002800000000000000
+ 332
+ 01000000040000000100000001000000010000000100000000000000020000000000000001000000010000000000000028000000280000000100000002000000010000000100000035433A5C55736572735C616C6B617A5C4F6E6544726976655C446F63756D656E74735C414D33325F4E65775C5372635C6D61696E2E6300000000066D61696E2E6300000000C5D4F200FFFFFFFF38433A5C55736572735C616C6B617A5C4F6E6544726976655C446F63756D656E74735C414D33325F4E65775C496E635C746172676574732E680000000009746172676574732E6800000000FFDC7800FFFFFFFF0100000010000000C5D4F200FFDC7800BECEA100F0A0A100BCA8E1009CC1B600F7B88600D9ADC200A5C2D700B3A6BE00EAD6A300F6FA7D00B5E99D005FC3CF00C1838300CACAD5000100000000000000020000001A0200007000000080070000C8030000
diff --git a/Keil_Projects/Am32G071.uvguix.alkaz b/Keil_Projects/Am32G071.uvguix.alkaz
index 8553f1e1..26000d59 100644
--- a/Keil_Projects/Am32G071.uvguix.alkaz
+++ b/Keil_Projects/Am32G071.uvguix.alkaz
@@ -238,25 +238,25 @@
2
3
- -32000
- -32000
+ -1
+ -1
-1
-1
- 163
- 11
- 1336
- 1013
+ 82
+ 328
+ 1653
+ 932
0
- 1063
- 0100000004000000010000000100000001000000010000000000000002000000000000000100000001000000000000002800000028000000010000000A000000040000000100000033433A5C55736572735C616C6B617A5C4F6E6544726976655C446F63756D656E74735C414D33325C5372635C7369676E616C2E6300000000087369676E616C2E6300000000C5D4F200FFFFFFFF41433A5C55736572735C616C6B617A5C4F6E6544726976655C446F63756D656E74735C414D33325C4D63755C663432315C5372635C7065726970686572616C732E63000000000D7065726970686572616C732E6300000000FFDC7800FFFFFFFF41433A5C55736572735C616C6B617A5C4F6E6544726976655C446F63756D656E74735C414D33325C4D63755C6C3433315C5372635C7065726970686572616C732E63000000000D7065726970686572616C732E6300000000BECEA100FFFFFFFF41433A5C55736572735C616C6B617A5C4F6E6544726976655C446F63756D656E74735C414D33325C6D63755C663432315C496E635C7065726970686572616C732E68000000000D7065726970686572616C732E6800000000F0A0A100FFFFFFFF31433A5C55736572735C616C6B617A5C4F6E6544726976655C446F63756D656E74735C414D33325C5372635C6D61696E2E6300000000066D61696E2E6300000000BCA8E100FFFFFFFF34433A5C55736572735C616C6B617A5C4F6E6544726976655C446F63756D656E74735C414D33325C496E635C746172676574732E680000000009746172676574732E68000000009CC1B600FFFFFFFF41433A5C55736572735C616C6B617A5C4F6E6544726976655C446F63756D656E74735C414D33325C4D63755C673433315C5372635C7065726970686572616C732E63000000000D7065726970686572616C732E6300000000F7B88600FFFFFFFF46433A5C55736572735C616C6B617A5C4F6E6544726976655C446F63756D656E74735C414D33325C4D63755C673433315C5372635C73797374656D5F73746D3332673478782E63000000001273797374656D5F73746D3332673478782E6300000000D9ADC200FFFFFFFF40433A5C55736572735C616C6B617A5C4F6E6544726976655C446F63756D656E74735C414D33325C4D63755C673433315C5372635C636F6D70617261746F722E63000000000C636F6D70617261746F722E6300000000A5C2D700FFFFFFFF38433A5C55736572735C616C6B617A5C4F6E6544726976655C446F63756D656E74735C414D33325C4D63755C673037315C5372635C494F2E630000000004494F2E6300000000B3A6BE00FFFFFFFF0100000010000000C5D4F200FFDC7800BECEA100F0A0A100BCA8E1009CC1B600F7B88600D9ADC200A5C2D700B3A6BE00EAD6A300F6FA7D00B5E99D005FC3CF00C1838300CACAD500010000000000000002000000B50100007000000080070000C8030000
+ 332
+ 01000000040000000100000001000000010000000100000000000000020000000000000001000000010000000000000028000000280000000100000002000000010000000100000035433A5C55736572735C616C6B617A5C4F6E6544726976655C446F63756D656E74735C414D33325F4E65775C5372635C6D61696E2E6300000000066D61696E2E6300000000C5D4F200FFFFFFFF38433A5C55736572735C616C6B617A5C4F6E6544726976655C446F63756D656E74735C414D33325F4E65775C496E635C746172676574732E680000000009746172676574732E6800000000FFDC7800FFFFFFFF0100000010000000C5D4F200FFDC7800BECEA100F0A0A100BCA8E1009CC1B600F7B88600D9ADC200A5C2D700B3A6BE00EAD6A300F6FA7D00B5E99D005FC3CF00C1838300CACAD5000100000000000000020000001A0200007000000080070000C8030000
diff --git a/Src/main.c b/Src/main.c
index 412142a4..b0d46f7e 100644
--- a/Src/main.c
+++ b/Src/main.c
@@ -556,27 +556,6 @@ uint16_t waitTime = 0;
uint16_t signaltimeout = 0;
uint8_t ubAnalogWatchdogStatus = RESET;
-// void checkForHighSignal(){
-// changeToInput();
-
-// setInputPullDown();
-// delayMicros(1000);
-// for(int i = 0 ; i < 1000; i ++){
-// if( !(getInputPinState())){ // if the pin is low for 5 checks out of
-// 100 in 100ms or more its either no signal or signal. jump to application
-// low_pin_count++;
-// }
-// delayMicros(10);
-// }
-
-// setInputPullUp();
-// if(low_pin_count > 5){
-// return; // its either a signal or a disconnected pin
-// }else{
-// allOff();
-// NVIC_SystemReset();
-// }
-// }
float doPidCalculations(struct fastPID* pidnow, int actual, int target)
{
@@ -606,7 +585,6 @@ float doPidCalculations(struct fastPID* pidnow, int actual, int target)
void loadEEpromSettings()
{
- //*eepromBuffer = *(EEprom_t*)(eeprom_address);
read_flash_bin(eepromBuffer.buffer, eeprom_address, sizeof(eepromBuffer.buffer));
if (eepromBuffer.advance_level > 3) {
@@ -625,8 +603,6 @@ void loadEEpromSettings()
TIM1_AUTORELOAD / 2 * 3);
}
SET_AUTO_RELOAD_PWM(TIMER1_MAX_ARR);
- // throttle_max_at_high_rpm = TIMER1_MAX_ARR;
- // duty_cycle_maximum = TIMER1_MAX_ARR;
} else {
tim1_arr = TIM1_AUTORELOAD;
SET_AUTO_RELOAD_PWM(tim1_arr);
@@ -750,10 +726,6 @@ void loadEEpromSettings()
high_rpm_level = motor_kv / 12 / (32 / eepromBuffer.motor_poles);
}
reverse_speed_threshold = map(motor_kv, 300, 3000, 1000, 500);
- // reverse_speed_threshold = 200;
-// if (!eepromBuffer.comp_pwm) {
-// eepromBuffer.bi_direction = 0;
-// }
}
void saveEEpromSettings()
From 08859f86f1134a8420d381246483edfc7e66c07b Mon Sep 17 00:00:00 2001
From: AlkaMotors <37931458+AlkaMotors@users.noreply.github.com>
Date: Sun, 10 Nov 2024 12:03:30 -0400
Subject: [PATCH 2/5] remove set_hysteresis variable
---
Src/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Src/main.c b/Src/main.c
index b0d46f7e..1c06fe77 100644
--- a/Src/main.c
+++ b/Src/main.c
@@ -213,6 +213,7 @@ an settings option)
- todo fix signal detection
*2.16 - add L431
- add variable auto timing
+ - add droneCAN
*/
#include "main.h"
#include "ADC.h"
@@ -306,7 +307,6 @@ enum inputType {
EEprom_t eepromBuffer;
uint32_t eeprom_address = EEPROM_START_ADD;
-char set_hysteris = 0;
uint16_t prop_brake_duty_cycle = 0;
uint16_t ledcounter = 0;
uint32_t process_time = 0;
From e7904968b7347b24352854348501f898995eb99c Mon Sep 17 00:00:00 2001
From: AlkaMotors <37931458+AlkaMotors@users.noreply.github.com>
Date: Sun, 10 Nov 2024 12:11:09 -0400
Subject: [PATCH 3/5] cleanup unused functions interrupt zero cross routine
---
Src/main.c | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/Src/main.c b/Src/main.c
index 1c06fe77..6e4c9f35 100644
--- a/Src/main.c
+++ b/Src/main.c
@@ -870,18 +870,6 @@ void interruptRoutine()
maskPhaseInterrupts();
thiszctime = INTERVAL_TIMER_COUNT;
SET_INTERVAL_TIMER_COUNT(0);
-// if(thiszctime < (commutation_interval - (commutation_interval>>2))){
-// send_LED_RGB(0, 0, 255);
-// // waitTime = waitTime + commutation_interval - thiszctime;
-// waitTime = waitTime + (commutation_interval>>2);
-// // thiszctime = commutation_interval + (commutation_interval>>2);
-// }else if(thiszctime > (commutation_interval + (commutation_interval>>2))){
-// send_LED_RGB(255, 0, 0);
-// // waitTime = waitTime - thiszctime - commutation_interval;
-// waitTime = waitTime - (commutation_interval>>2);
-// // thiszctime = commutation_interval - (commutation_interval>>2);
-// }
- // waitTime = waitTime >> fast_accel;
SET_AND_ENABLE_COM_INT(waitTime+1); // enable COM_TIMER interrupt
__enable_irq();
}
From 86948a69968344bea19eaffc92cf76a0087d71a7 Mon Sep 17 00:00:00 2001
From: AlkaMotors <37931458+AlkaMotors@users.noreply.github.com>
Date: Wed, 20 Nov 2024 11:15:37 -0400
Subject: [PATCH 4/5] Change comp to medium power mode f421, l431
---
Inc/targets.h | 54 +++++++++++++++++++-------------------
Mcu/l431/Src/peripherals.c | 4 +--
Src/main.c | 12 ++++++---
3 files changed, 38 insertions(+), 32 deletions(-)
diff --git a/Inc/targets.h b/Inc/targets.h
index 339b0154..0dba315f 100644
--- a/Inc/targets.h
+++ b/Inc/targets.h
@@ -2114,33 +2114,33 @@
#endif
-#ifdef HARDWARE_GROUP_F0_045 // tried B
-#define PHASE_A_COMP COMP_PA0 // pa0 // works for polling mode
+#ifdef HARDWARE_GROUP_F0_045
+#define PHASE_A_COMP COMP_PA0 // pa0
#define PHASE_B_COMP COMP_PA4 // pa4
#define PHASE_C_COMP COMP_PA5 // pa5
#endif
-#ifdef HARDWARE_GROUP_F0_504 // tried F
-#define PHASE_A_COMP COMP_PA5 // pa5 // works for polling mode
+#ifdef HARDWARE_GROUP_F0_504
+#define PHASE_A_COMP COMP_PA5 // pa5
#define PHASE_B_COMP COMP_PA0 // pa0
#define PHASE_C_COMP COMP_PA4 // pa4
#endif
#ifdef HARDWARE_GROUP_F0_450
-#define PHASE_A_COMP COMP_PA4 // pa4 // works for polling mode
+#define PHASE_A_COMP COMP_PA4 // pa4
#define PHASE_B_COMP COMP_PA5 // pa5
#define PHASE_C_COMP COMP_PA0 // pa0
#endif
#ifdef HARDWARE_GROUP_F0_054
-#define PHASE_A_COMP COMP_PA0 // pa0 // works for polling mode
+#define PHASE_A_COMP COMP_PA0 // pa0
#define PHASE_B_COMP COMP_PA5 // pa5
#define PHASE_C_COMP COMP_PA4 // pa4
#endif
#ifdef HARDWARE_GROUP_F0_405
-#define PHASE_A_COMP COMP_PA4 // pa4 // works for polling mode
+#define PHASE_A_COMP COMP_PA4 // pa4
#define PHASE_B_COMP COMP_PA0 // pa0
#define PHASE_C_COMP COMP_PA5 // pa5
#endif
-#ifdef HARDWARE_GROUP_F0_540 // tried H
-#define PHASE_A_COMP COMP_PA5 // pa5 // works for polling mode
+#ifdef HARDWARE_GROUP_F0_540
+#define PHASE_A_COMP COMP_PA5 // pa5
#define PHASE_B_COMP COMP_PA4 // pa4
#define PHASE_C_COMP COMP_PA0 // pa0
#endif
@@ -3139,34 +3139,34 @@
#endif
#ifdef HARDWARE_GROUP_AT_045
-#define PHASE_A_COMP 0x400000E1 // pa0 // works for polling mode
-#define PHASE_B_COMP 0x400000C1 // pa4
-#define PHASE_C_COMP 0x400000D1 // pa5
+#define PHASE_A_COMP 0x400000E5 // pa0 Medium Comp Power
+#define PHASE_B_COMP 0x400000C5 // pa4
+#define PHASE_C_COMP 0x400000D5 // pa5
#endif
#ifdef HARDWARE_GROUP_AT_504
-#define PHASE_A_COMP 0x400000D1 // pa5 // works for polling mode
-#define PHASE_B_COMP 0x400000E1 // pa0
-#define PHASE_C_COMP 0x400000C1 // pa4
+#define PHASE_A_COMP 0x400000D5 // pa5
+#define PHASE_B_COMP 0x400000E5 // pa0
+#define PHASE_C_COMP 0x400000C5 // pa4
#endif
#ifdef HARDWARE_GROUP_AT_450
-#define PHASE_A_COMP 0x400000C1 // pa4 // works for polling mode
-#define PHASE_B_COMP 0x400000D1 // pa5
-#define PHASE_C_COMP 0x400000E1 // pa0
+#define PHASE_A_COMP 0x400000C5 // pa4
+#define PHASE_B_COMP 0x400000D5 // pa5
+#define PHASE_C_COMP 0x400000E5 // pa0
#endif
#ifdef HARDWARE_GROUP_AT_054
-#define PHASE_A_COMP 0x400000E1 // pa0 // works for polling mode
-#define PHASE_B_COMP 0x400000D1 // pa5
-#define PHASE_C_COMP 0x400000C1 // pa4
+#define PHASE_A_COMP 0x400000E5 // pa0
+#define PHASE_B_COMP 0x400000D5 // pa5
+#define PHASE_C_COMP 0x400000C5 // pa4
#endif
#ifdef HARDWARE_GROUP_AT_405
-#define PHASE_A_COMP 0x400000C1 // pa4 // works for polling mode
-#define PHASE_B_COMP 0x400000E1 // pa0
-#define PHASE_C_COMP 0x400000D1 // pa5
+#define PHASE_A_COMP 0x400000C5 // pa4
+#define PHASE_B_COMP 0x400000E5 // pa0
+#define PHASE_C_COMP 0x400000D5 // pa5
#endif
#ifdef HARDWARE_GROUP_AT_540
-#define PHASE_A_COMP 0x400000D1 // pa5 // works for polling mode
-#define PHASE_B_COMP 0x400000C1 // pa4
-#define PHASE_C_COMP 0x400000E1 // pa0
+#define PHASE_A_COMP 0x400000D5 // pa5
+#define PHASE_B_COMP 0x400000C5 // pa4
+#define PHASE_C_COMP 0x400000E5 // pa0
#endif
#ifdef HARDWARE_GROUP_AT_245
diff --git a/Mcu/l431/Src/peripherals.c b/Mcu/l431/Src/peripherals.c
index f0429fa6..8f7887ba 100644
--- a/Mcu/l431/Src/peripherals.c
+++ b/Mcu/l431/Src/peripherals.c
@@ -130,7 +130,7 @@ void MX_COMP1_Init(void)
NVIC_SetPriority(COMP_IRQn, NVIC_EncodePriority(NVIC_GetPriorityGrouping(),0, 0));
NVIC_EnableIRQ(COMP_IRQn);
- COMP_InitStruct.PowerMode = LL_COMP_POWERMODE_HIGHSPEED;
+ COMP_InitStruct.PowerMode = LL_COMP_POWERMODE_MEDIUMSPEED;
COMP_InitStruct.InputPlus = LL_COMP_INPUT_PLUS_IO3;
COMP_InitStruct.InputMinus = LL_COMP_INPUT_MINUS_IO5;
COMP_InitStruct.InputHysteresis = LL_COMP_HYSTERESIS_NONE;
@@ -188,7 +188,7 @@ void MX_COMP2_Init(void)
/* USER CODE BEGIN COMP2_Init 1 */
/* USER CODE END COMP2_Init 1 */
- COMP_InitStruct.PowerMode = LL_COMP_POWERMODE_HIGHSPEED;
+ COMP_InitStruct.PowerMode = LL_COMP_POWERMODE_MEDIUMSPEED;
COMP_InitStruct.InputPlus = LL_COMP_INPUT_PLUS_IO1;
COMP_InitStruct.InputMinus = LL_COMP_INPUT_MINUS_IO2;
COMP_InitStruct.InputHysteresis = LL_COMP_HYSTERESIS_NONE;
diff --git a/Src/main.c b/Src/main.c
index 9c41a588..9c694e26 100644
--- a/Src/main.c
+++ b/Src/main.c
@@ -605,9 +605,15 @@ void loadEEpromSettings()
}
if (eepromBuffer.startup_power < 151 && eepromBuffer.startup_power > 49) {
- min_startup_duty = (eepromBuffer.startup_power);
- minimum_duty_cycle = (eepromBuffer.startup_power / 3);
- stall_protect_minimum_duty = minimum_duty_cycle + 10;
+ if(!eepromBuffer.comp_pwm){ // higher startup power for non-complementary pwm
+ min_startup_duty = (eepromBuffer.startup_power) *2 ;
+ minimum_duty_cycle = (eepromBuffer.startup_power / 2);
+ stall_protect_minimum_duty = minimum_duty_cycle + 10;
+ }else{
+ min_startup_duty = (eepromBuffer.startup_power);
+ minimum_duty_cycle = (eepromBuffer.startup_power / 3);
+ stall_protect_minimum_duty = minimum_duty_cycle + 10;
+ }
} else {
min_startup_duty = 150;
minimum_duty_cycle = (min_startup_duty / 2) + 10;
From 5b090f8b9ec15e0f1904c99acec9a0268b3fa745 Mon Sep 17 00:00:00 2001
From: AlkaMotors <37931458+AlkaMotors@users.noreply.github.com>
Date: Wed, 20 Nov 2024 11:26:25 -0400
Subject: [PATCH 5/5] Add G0_L group for skystars 80A
---
Inc/targets.h | 21 +++++++++++++++------
1 file changed, 15 insertions(+), 6 deletions(-)
diff --git a/Inc/targets.h b/Inc/targets.h
index 0dba315f..40e72166 100644
--- a/Inc/targets.h
+++ b/Inc/targets.h
@@ -2600,14 +2600,14 @@
#define DMA_HANDLE_TYPE_DEF hdma_tim3_ch1
#define IC_DMA_IRQ_NAME DMA1_Channel1_IRQn
-#define PHASE_A_GPIO_LOW LL_GPIO_PIN_1
+#define PHASE_A_GPIO_LOW LL_GPIO_PIN_15
#define PHASE_A_GPIO_PORT_LOW GPIOB
-#define PHASE_A_GPIO_HIGH LL_GPIO_PIN_12
+#define PHASE_A_GPIO_HIGH LL_GPIO_PIN_10
#define PHASE_A_GPIO_PORT_HIGH GPIOA
#define PHASE_B_GPIO_LOW LL_GPIO_PIN_0
#define PHASE_B_GPIO_PORT_LOW GPIOB
-#define PHASE_B_GPIO_HIGH LL_GPIO_PIN_11
+#define PHASE_B_GPIO_HIGH LL_GPIO_PIN_9
#define PHASE_B_GPIO_PORT_HIGH GPIOA
#define PHASE_C_GPIO_LOW LL_GPIO_PIN_7
@@ -2615,9 +2615,18 @@
#define PHASE_C_GPIO_HIGH LL_GPIO_PIN_8
#define PHASE_C_GPIO_PORT_HIGH GPIOA
-#define PHASE_A_COMP LL_COMP_INPUT_MINUS_IO1 // pb3
-#define PHASE_B_COMP LL_COMP_INPUT_MINUS_IO2 // pb7
-#define PHASE_C_COMP LL_COMP_INPUT_MINUS_IO3 // pa2
+#define PHASE_A_COMP LL_COMP_INPUT_MINUS_IO3 // pa0
+#define PHASE_B_COMP LL_COMP_INPUT_MINUS_IO3 // pa2
+#define PHASE_C_COMP LL_COMP_INPUT_MINUS_IO2 // pb7
+
+#define PHASE_A_EXTI_LINE LL_EXTI_LINE_17
+#define PHASE_A_COMP_NUMBER COMP1
+
+#define PHASE_B_EXTI_LINE LL_EXTI_LINE_18
+#define PHASE_B_COMP_NUMBER COMP2
+
+#define PHASE_C_EXTI_LINE LL_EXTI_LINE_18
+#define PHASE_C_COMP_NUMBER COMP2
#endif