diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..954186d9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,71 @@ +# Prerequisites +*.d + +# Object files +*.o +*.ko +*.obj +*.elf +*.crf + +# Linker output +*.ilk +*.map +*.exp + +# Precompiled Headers +*.gch +*.pch + +# Libraries +*.lib +*.a +*.la +*.lo + +# Shared objects (inc. Windows DLLs) +*.dll +*.so +*.so.* +*.dylib + +# Executables +*.exe +*.out +*.app +*.i*86 +*.x86_64 +*.hex + +# Debug files +*.dSYM/ +*.su +*.idb +*.pdb + +# Kernel Module Compile Results +*.mod* +*.cmd +.tmp_versions/ +modules.order +Module.symvers +Mkfile.old +dkms.conf + +# PIC files +*.p1 +*.i +*.mum +*.sym +*production* + +# Other files +*.htm +*.dep +*.ids +*.phil +*.crf +*.hex +*.phil +*.map + diff --git a/CommunicationOverview.ods b/CommunicationOverview.ods deleted file mode 100644 index 814b5e3d..00000000 Binary files a/CommunicationOverview.ods and /dev/null differ diff --git a/Raumzeigerdiagramm.png b/Documents/BLDC Motor Quadrant Diagram.png similarity index 100% rename from Raumzeigerdiagramm.png rename to Documents/BLDC Motor Quadrant Diagram.png diff --git a/Documents/CableEntry.jpg b/Documents/CableEntry.jpg new file mode 100644 index 00000000..10cd15ae Binary files /dev/null and b/Documents/CableEntry.jpg differ diff --git a/Documents/CommunicationOverview.xlsx b/Documents/CommunicationOverview.xlsx new file mode 100644 index 00000000..fb610af8 Binary files /dev/null and b/Documents/CommunicationOverview.xlsx differ diff --git a/Documents/ControlBox.jpg b/Documents/ControlBox.jpg new file mode 100644 index 00000000..69edeb7f Binary files /dev/null and b/Documents/ControlBox.jpg differ diff --git a/GD32F130C8 Dokumentation/GD32F130.pdf b/Documents/GD32F130.pdf similarity index 100% rename from GD32F130C8 Dokumentation/GD32F130.pdf rename to Documents/GD32F130.pdf diff --git a/GD32F130C8 Dokumentation/GD32F1x0_User_Manual.pdf b/Documents/GD32F1x0_User_Manual.pdf similarity index 100% rename from GD32F130C8 Dokumentation/GD32F1x0_User_Manual.pdf rename to Documents/GD32F1x0_User_Manual.pdf diff --git a/Documents/HUGS Protocol Doc.pdf b/Documents/HUGS Protocol Doc.pdf new file mode 100644 index 00000000..f2ae1583 Binary files /dev/null and b/Documents/HUGS Protocol Doc.pdf differ diff --git a/Documents/HUGS Protocol Doc.xlsx b/Documents/HUGS Protocol Doc.xlsx new file mode 100644 index 00000000..ba013f05 Binary files /dev/null and b/Documents/HUGS Protocol Doc.xlsx differ diff --git a/Documents/HoverBoard_TAOTAO TT-SD2.2.pdf b/Documents/HoverBoard_TAOTAO TT-SD2.2.pdf new file mode 100644 index 00000000..c3c190ba Binary files /dev/null and b/Documents/HoverBoard_TAOTAO TT-SD2.2.pdf differ diff --git a/Documents/LinkerOptions.jpg b/Documents/LinkerOptions.jpg new file mode 100644 index 00000000..42f1c905 Binary files /dev/null and b/Documents/LinkerOptions.jpg differ diff --git a/Documents/MasterBoard.jpg b/Documents/MasterBoard.jpg new file mode 100644 index 00000000..03071261 Binary files /dev/null and b/Documents/MasterBoard.jpg differ diff --git a/Documents/Prototype1.jpg b/Documents/Prototype1.jpg new file mode 100644 index 00000000..4ca1e251 Binary files /dev/null and b/Documents/Prototype1.jpg differ diff --git a/Documents/Prototype2.jpg b/Documents/Prototype2.jpg new file mode 100644 index 00000000..ce18dc1e Binary files /dev/null and b/Documents/Prototype2.jpg differ diff --git a/Documents/Prototype3.jpg b/Documents/Prototype3.jpg new file mode 100644 index 00000000..c597e3d5 Binary files /dev/null and b/Documents/Prototype3.jpg differ diff --git a/Schematics/HoverBoard_CoolAndFun.pdf b/Documents/Schematic_CoolAndFun.pdf similarity index 100% rename from Schematics/HoverBoard_CoolAndFun.pdf rename to Documents/Schematic_CoolAndFun.pdf diff --git a/Documents/Schematic_TAOTAO.pdf b/Documents/Schematic_TAOTAO.pdf new file mode 100644 index 00000000..9bfface8 Binary files /dev/null and b/Documents/Schematic_TAOTAO.pdf differ diff --git a/Documents/SlaveBoard.jpg b/Documents/SlaveBoard.jpg new file mode 100644 index 00000000..c202c1a0 Binary files /dev/null and b/Documents/SlaveBoard.jpg differ diff --git a/GD32F130C8 Dokumentation/TUEV-Report-AKKU.pdf b/GD32F130C8 Dokumentation/TUEV-Report-AKKU.pdf deleted file mode 100644 index 39159969..00000000 Binary files a/GD32F130C8 Dokumentation/TUEV-Report-AKKU.pdf and /dev/null differ diff --git a/GigaDevice.GD32F1x0_DFP.3.1.0.pack b/GigaDevice.GD32F1x0_DFP.3.1.0.pack new file mode 100644 index 00000000..8927bb23 Binary files /dev/null and b/GigaDevice.GD32F1x0_DFP.3.1.0.pack differ diff --git a/HoverBoardGigaDevice/EventRecorderStub.scvd b/HUGS/EventRecorderStub.scvd similarity index 97% rename from HoverBoardGigaDevice/EventRecorderStub.scvd rename to HUGS/EventRecorderStub.scvd index 0fb3ee58..2956b296 100644 --- a/HoverBoardGigaDevice/EventRecorderStub.scvd +++ b/HUGS/EventRecorderStub.scvd @@ -1,9 +1,9 @@ - - - - - - - - - + + + + + + + + + diff --git a/HUGS/HUGS.uvguix.13015 b/HUGS/HUGS.uvguix.13015 new file mode 100644 index 00000000..9cf48318 --- /dev/null +++ b/HUGS/HUGS.uvguix.13015 @@ -0,0 +1,1860 @@ + + + + -6.1 + +
### uVision Project, (C) Keil Software
+ + + + + + + + + + 38003 + Registers + 231 232 + + + 346 + Code Coverage + 1010 160 + + + 204 + Performance Analyzer + 1170 + + + + + + 35141 + Event Statistics + + 200 50 700 + + + 1506 + Symbols + + 80 80 80 + + + 1936 + Watch 1 + + 200 133 133 + + + 1937 + Watch 2 + + 200 133 133 + + + 1935 + Call Stack + Locals + + 200 133 133 + + + 2506 + Trace Data + + 75 135 130 95 70 230 200 150 + + + 466 + Source Browser + 500 + 300 + + + + + + + + 1 + 1 + 0 + 0 + -1 + + + + + + + 44 + 2 + 3 + + -1 + -1 + + + -1 + -1 + + + 182 + 182 + 1622 + 941 + + + + 0 + + 60 + 010000000400000001000000010000000100000001000000000000000200000000000000010000000100000000000000280000002800000000000000 + + + + 0 + Build + + -1 + -1 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + F40000004F00000090050000DF000000 + + + 16 + F40000006600000090050000F6000000 + + + + 1005 + 1005 + 1 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 0300000066000000D60100006D020000 + + + 16 + BE000000D5000000AE010000A0010000 + + + + 109 + 109 + 1 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 0300000066000000D60100006D020000 + + + 16 + BE000000D5000000DA01000015030000 + + + + 1465 + 1465 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 03000000300200008D050000A4020000 + + + 16 + BE000000D50000008603000065010000 + + + + 1466 + 1466 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 03000000300200008D050000A4020000 + + + 16 + BE000000D50000008603000065010000 + + + + 1467 + 1467 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 03000000300200008D050000A4020000 + + + 16 + BE000000D50000008603000065010000 + + + + 1468 + 1468 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 03000000300200008D050000A4020000 + + + 16 + BE000000D50000008603000065010000 + + + + 1506 + 1506 + 0 + 0 + 0 + 0 + 32767 + 0 + 16384 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + BE000000D5000000AE010000A0010000 + + + + 1913 + 1913 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + F7000000660000008D050000C6000000 + + + 16 + BE000000D50000008603000065010000 + + + + 1935 + 1935 + 0 + 0 + 0 + 0 + 32767 + 0 + 32768 + 0 + + 16 + 03000000300200008D050000A4020000 + + + 16 + BE000000D5000000AE010000A0010000 + + + + 1936 + 1936 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 03000000300200008D050000A4020000 + + + 16 + BE000000D5000000AE010000A0010000 + + + + 1937 + 1937 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 03000000300200008D050000A4020000 + + + 16 + BE000000D5000000AE010000A0010000 + + + + 1939 + 1939 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 03000000300200008D050000A4020000 + + + 16 + BE000000D50000008603000065010000 + + + + 1940 + 1940 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 03000000300200008D050000A4020000 + + + 16 + BE000000D50000008603000065010000 + + + + 1941 + 1941 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 03000000300200008D050000A4020000 + + + 16 + BE000000D50000008603000065010000 + + + + 1942 + 1942 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 03000000300200008D050000A4020000 + + + 16 + BE000000D50000008603000065010000 + + + + 195 + 195 + 1 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 0300000066000000D60100006D020000 + + + 16 + BE000000D5000000DA01000015030000 + + + + 196 + 196 + 1 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 0300000066000000D60100006D020000 + + + 16 + BE000000D5000000DA01000015030000 + + + + 197 + 197 + 1 + 0 + 0 + 0 + 32767 + 0 + 32768 + 0 + + 16 + 000000009E02000080070000E6030000 + + + 16 + BE000000D50000008603000065010000 + + + + 198 + 198 + 0 + 0 + 0 + 0 + 32767 + 0 + 32768 + 0 + + 16 + 000000001902000090050000BD020000 + + + 16 + BE000000D50000008603000065010000 + + + + 199 + 199 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 03000000A10200007D070000CD030000 + + + 16 + BE000000D50000008603000065010000 + + + + 203 + 203 + 0 + 0 + 0 + 0 + 32767 + 0 + 8192 + 0 + + 16 + F7000000660000008D050000C6000000 + + + 16 + BE000000D50000008603000065010000 + + + + 204 + 204 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + F7000000660000008D050000C6000000 + + + 16 + BE000000D50000008603000065010000 + + + + 221 + 221 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 00000000000000000000000000000000 + + + 16 + 0A0000000A0000006E0000006E000000 + + + + 2506 + 2506 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + BE000000D5000000AE010000A0010000 + + + + 2507 + 2507 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 03000000300200008D050000A4020000 + + + 16 + BE000000D50000008603000065010000 + + + + 343 + 343 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + F7000000660000008D050000C6000000 + + + 16 + BE000000D50000008603000065010000 + + + + 346 + 346 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + F7000000660000008D050000C6000000 + + + 16 + BE000000D50000008603000065010000 + + + + 35141 + 35141 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + F7000000660000008D050000C6000000 + + + 16 + BE000000D5000000AE010000A0010000 + + + + 35824 + 35824 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + F7000000660000008D050000C6000000 + + + 16 + BE000000D50000008603000065010000 + + + + 35885 + 35885 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + BE000000D5000000AE010000A0010000 + + + + 35886 + 35886 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + BE000000D5000000AE010000A0010000 + + + + 35887 + 35887 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + BE000000D5000000AE010000A0010000 + + + + 35888 + 35888 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + BE000000D5000000AE010000A0010000 + + + + 35889 + 35889 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + BE000000D5000000AE010000A0010000 + + + + 35890 + 35890 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + BE000000D5000000AE010000A0010000 + + + + 35891 + 35891 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + BE000000D5000000AE010000A0010000 + + + + 35892 + 35892 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + BE000000D5000000AE010000A0010000 + + + + 35893 + 35893 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + BE000000D5000000AE010000A0010000 + + + + 35894 + 35894 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + BE000000D5000000AE010000A0010000 + + + + 35895 + 35895 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + BE000000D5000000AE010000A0010000 + + + + 35896 + 35896 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + BE000000D5000000AE010000A0010000 + + + + 35897 + 35897 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + BE000000D5000000AE010000A0010000 + + + + 35898 + 35898 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + BE000000D5000000AE010000A0010000 + + + + 35899 + 35899 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + BE000000D5000000AE010000A0010000 + + + + 35900 + 35900 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + BE000000D5000000AE010000A0010000 + + + + 35901 + 35901 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + BE000000D5000000AE010000A0010000 + + + + 35902 + 35902 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + BE000000D5000000AE010000A0010000 + + + + 35903 + 35903 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + BE000000D5000000AE010000A0010000 + + + + 35904 + 35904 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + BE000000D5000000AE010000A0010000 + + + + 35905 + 35905 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + BE000000D5000000AE010000A0010000 + + + + 38003 + 38003 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 0300000066000000D60100006D020000 + + + 16 + BE000000D5000000DA01000015030000 + + + + 38007 + 38007 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 03000000A10200007D070000CD030000 + + + 16 + BE000000D50000008603000065010000 + + + + 436 + 436 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 03000000A10200007D070000CD030000 + + + 16 + BE000000D5000000DA01000015030000 + + + + 437 + 437 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 03000000300200008D050000A4020000 + + + 16 + BE000000D5000000AE010000A0010000 + + + + 440 + 440 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 03000000300200008D050000A4020000 + + + 16 + BE000000D5000000AE010000A0010000 + + + + 463 + 463 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 03000000A10200007D070000CD030000 + + + 16 + BE000000D5000000DA01000015030000 + + + + 466 + 466 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 03000000A10200007D070000CD030000 + + + 16 + BE000000D5000000DA01000015030000 + + + + 470 + 470 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + F7000000660000008D050000C6000000 + + + 16 + BE000000D50000008603000065010000 + + + + 50000 + 50000 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + BE000000D5000000AE010000A0010000 + + + + 50001 + 50001 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + BE000000D5000000AE010000A0010000 + + + + 50002 + 50002 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + BE000000D5000000AE010000A0010000 + + + + 50003 + 50003 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + BE000000D5000000AE010000A0010000 + + + + 50004 + 50004 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + BE000000D5000000AE010000A0010000 + + + + 50005 + 50005 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + BE000000D5000000AE010000A0010000 + + + + 50006 + 50006 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + BE000000D5000000AE010000A0010000 + + + + 50007 + 50007 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + BE000000D5000000AE010000A0010000 + + + + 50008 + 50008 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + BE000000D5000000AE010000A0010000 + + + + 50009 + 50009 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + BE000000D5000000AE010000A0010000 + + + + 50010 + 50010 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + BE000000D5000000AE010000A0010000 + + + + 50011 + 50011 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + BE000000D5000000AE010000A0010000 + + + + 50012 + 50012 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + BE000000D5000000AE010000A0010000 + + + + 50013 + 50013 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + BE000000D5000000AE010000A0010000 + + + + 50014 + 50014 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + BE000000D5000000AE010000A0010000 + + + + 50015 + 50015 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + BE000000D5000000AE010000A0010000 + + + + 50016 + 50016 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + BE000000D5000000AE010000A0010000 + + + + 50017 + 50017 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + BE000000D5000000AE010000A0010000 + + + + 50018 + 50018 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + BE000000D5000000AE010000A0010000 + + + + 50019 + 50019 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + BE000000D5000000AE010000A0010000 + + + + 59392 + 59392 + 1 + 0 + 0 + 0 + 966 + 0 + 8192 + 0 + + 16 + 0000000000000000D10300001C000000 + + + 16 + 0A0000000A0000006E0000006E000000 + + + + 59393 + 0 + 1 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 00000000E603000080070000F9030000 + + + 16 + 0A0000000A0000006E0000006E000000 + + + + 59399 + 59399 + 1 + 0 + 0 + 0 + 476 + 0 + 8192 + 1 + + 16 + 000000001C000000E701000038000000 + + + 16 + 0A0000000A0000006E0000006E000000 + + + + 59400 + 59400 + 0 + 0 + 0 + 0 + 612 + 0 + 8192 + 2 + + 16 + 00000000380000006F02000054000000 + + + 16 + 0A0000000A0000006E0000006E000000 + + + + 824 + 824 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 03000000300200008D050000A4020000 + + + 16 + BE000000D5000000AE010000A0010000 + + + + 3312 + 000000000B000000000000000020000000000000FFFFFFFFFFFFFFFFF4000000DF00000090050000E3000000000000000100000004000000010000000000000000000000FFFFFFFF08000000CB00000057010000CC000000F08B00005A01000079070000D601000045890000FFFF02000B004354616262656450616E650020000000000000F40000006600000090050000F6000000F40000004F00000090050000DF0000000000000040280046080000000B446973617373656D626C7900000000CB00000001000000FFFFFFFFFFFFFFFF14506572666F726D616E636520416E616C797A6572000000005701000001000000FFFFFFFFFFFFFFFF14506572666F726D616E636520416E616C797A657200000000CC00000001000000FFFFFFFFFFFFFFFF0E4C6F67696320416E616C797A657200000000F08B000001000000FFFFFFFFFFFFFFFF0D436F646520436F766572616765000000005A01000001000000FFFFFFFFFFFFFFFF11496E737472756374696F6E205472616365000000007907000001000000FFFFFFFFFFFFFFFF0F53797374656D20416E616C797A657200000000D601000001000000FFFFFFFFFFFFFFFF104576656E742053746174697374696373000000004589000001000000FFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000000000000000000000001000000FFFFFFFFCB00000001000000FFFFFFFFCB000000000000000040000000000000FFFFFFFFFFFFFFFF9C0400004F000000A004000029020000000000000200000004000000010000000000000000000000FFFFFFFF2B000000E2050000CA0900002D8C00002E8C00002F8C0000308C0000318C0000328C0000338C0000348C0000358C0000368C0000378C0000388C0000398C00003A8C00003B8C00003C8C00003D8C00003E8C00003F8C0000408C0000418C000050C3000051C3000052C3000053C3000054C3000055C3000056C3000057C3000058C3000059C300005AC300005BC300005CC300005DC300005EC300005FC3000060C3000061C3000062C3000063C3000001800040000000000000A0040000660000009005000040020000A00400004F000000900500002902000000000000404100462B0000000753796D626F6C7300000000E205000001000000FFFFFFFFFFFFFFFF0A5472616365204461746100000000CA09000001000000FFFFFFFFFFFFFFFF00000000002D8C000001000000FFFFFFFFFFFFFFFF00000000002E8C000001000000FFFFFFFFFFFFFFFF00000000002F8C000001000000FFFFFFFFFFFFFFFF0000000000308C000001000000FFFFFFFFFFFFFFFF0000000000318C000001000000FFFFFFFFFFFFFFFF0000000000328C000001000000FFFFFFFFFFFFFFFF0000000000338C000001000000FFFFFFFFFFFFFFFF0000000000348C000001000000FFFFFFFFFFFFFFFF0000000000358C000001000000FFFFFFFFFFFFFFFF0000000000368C000001000000FFFFFFFFFFFFFFFF0000000000378C000001000000FFFFFFFFFFFFFFFF0000000000388C000001000000FFFFFFFFFFFFFFFF0000000000398C000001000000FFFFFFFFFFFFFFFF00000000003A8C000001000000FFFFFFFFFFFFFFFF00000000003B8C000001000000FFFFFFFFFFFFFFFF00000000003C8C000001000000FFFFFFFFFFFFFFFF00000000003D8C000001000000FFFFFFFFFFFFFFFF00000000003E8C000001000000FFFFFFFFFFFFFFFF00000000003F8C000001000000FFFFFFFFFFFFFFFF0000000000408C000001000000FFFFFFFFFFFFFFFF0000000000418C000001000000FFFFFFFFFFFFFFFF000000000050C3000001000000FFFFFFFFFFFFFFFF000000000051C3000001000000FFFFFFFFFFFFFFFF000000000052C3000001000000FFFFFFFFFFFFFFFF000000000053C3000001000000FFFFFFFFFFFFFFFF000000000054C3000001000000FFFFFFFFFFFFFFFF000000000055C3000001000000FFFFFFFFFFFFFFFF000000000056C3000001000000FFFFFFFFFFFFFFFF000000000057C3000001000000FFFFFFFFFFFFFFFF000000000058C3000001000000FFFFFFFFFFFFFFFF000000000059C3000001000000FFFFFFFFFFFFFFFF00000000005AC3000001000000FFFFFFFFFFFFFFFF00000000005BC3000001000000FFFFFFFFFFFFFFFF00000000005CC3000001000000FFFFFFFFFFFFFFFF00000000005DC3000001000000FFFFFFFFFFFFFFFF00000000005EC3000001000000FFFFFFFFFFFFFFFF00000000005FC3000001000000FFFFFFFFFFFFFFFF000000000060C3000001000000FFFFFFFFFFFFFFFF000000000061C3000001000000FFFFFFFFFFFFFFFF000000000062C3000001000000FFFFFFFFFFFFFFFF000000000063C3000001000000FFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000000000000000000000001000000FFFFFFFFE205000001000000FFFFFFFFE2050000000000000010000001000000FFFFFFFFFFFFFFFFD90100004F000000DD010000860200000100000002000010040000000100000090FEFFFF05060000FFFFFFFF05000000ED0300006D000000C3000000C400000073940000018000100000010000000000000066000000D90100009D020000000000004F000000D9010000860200000000000040410056050000000750726F6A65637401000000ED03000001000000FFFFFFFFFFFFFFFF05426F6F6B73010000006D00000001000000FFFFFFFFFFFFFFFF0946756E6374696F6E7301000000C300000001000000FFFFFFFFFFFFFFFF0954656D706C6174657301000000C400000001000000FFFFFFFFFFFFFFFF09526567697374657273000000007394000001000000FFFFFFFFFFFFFFFF00000000000000000000000000000000000000000000000001000000FFFFFFFFED03000001000000FFFFFFFFED030000000000000080000000000000FFFFFFFFFFFFFFFF0000000015020000900500001902000000000000010000000400000001000000000000000000000000000000000000000000000001000000C6000000FFFFFFFF0F0000008F070000930700009407000095070000960700009007000091070000B5010000B801000038030000B9050000BA050000BB050000BC050000CB09000001800080000000000000000000003002000090050000D4020000000000001902000090050000BD02000000000000404100460F0000001343616C6C20537461636B202B204C6F63616C73000000008F07000001000000FFFFFFFFFFFFFFFF0755415254202331000000009307000001000000FFFFFFFFFFFFFFFF0755415254202332000000009407000001000000FFFFFFFFFFFFFFFF0755415254202333000000009507000001000000FFFFFFFFFFFFFFFF15446562756720287072696E74662920566965776572000000009607000001000000FFFFFFFFFFFFFFFF0757617463682031000000009007000001000000FFFFFFFFFFFFFFFF0757617463682032000000009107000001000000FFFFFFFFFFFFFFFF10547261636520457863657074696F6E7300000000B501000001000000FFFFFFFFFFFFFFFF0E4576656E7420436F756E7465727300000000B801000001000000FFFFFFFFFFFFFFFF09554C494E4B706C7573000000003803000001000000FFFFFFFFFFFFFFFF084D656D6F7279203100000000B905000001000000FFFFFFFFFFFFFFFF084D656D6F7279203200000000BA05000001000000FFFFFFFFFFFFFFFF084D656D6F7279203300000000BB05000001000000FFFFFFFFFFFFFFFF084D656D6F7279203400000000BC05000001000000FFFFFFFFFFFFFFFF105472616365204E617669676174696F6E00000000CB09000001000000FFFFFFFFFFFFFFFFFFFFFFFF0000000001000000000000000000000001000000FFFFFFFFC802000019020000CC020000BD02000000000000020000000400000000000000000000000000000000000000000000000000000002000000C6000000FFFFFFFF8F07000001000000FFFFFFFF8F07000001000000C6000000000000000080000001000000FFFFFFFFFFFFFFFF0000000086020000800700008A02000001000000010000100400000001000000E1FEFFFF6D020000FFFFFFFF06000000C5000000C7000000B4010000D2010000CF010000779400000180008000000100000000000000A102000080070000FD030000000000008A02000080070000E60300000000000040820056060000000C4275696C64204F757470757401000000C500000001000000FFFFFFFFFFFFFFFF0D46696E6420496E2046696C657300000000C700000001000000FFFFFFFFFFFFFFFF0A4572726F72204C69737400000000B401000001000000FFFFFFFFFFFFFFFF0E536F757263652042726F7773657200000000D201000001000000FFFFFFFFFFFFFFFF0E416C6C205265666572656E63657300000000CF01000001000000FFFFFFFFFFFFFFFF0742726F77736572000000007794000001000000FFFFFFFFFFFFFFFF00000000000000000000000000000000000000000000000001000000FFFFFFFFC500000001000000FFFFFFFFC5000000000000000000000000000000 + + + 59392 + File + + 2578 + 00200000010000002800FFFF01001100434D4643546F6F6C426172427574746F6E00E100000000000000000000000000000000000000000000000100000001000000018001E100000000000001000000000000000000000000000000000100000001000000018003E1000000000400020000000000000000000000000000000001000000010000000180CD7F0000000000000300000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018023E100000000040004000000000000000000000000000000000100000001000000018022E100000000040005000000000000000000000000000000000100000001000000018025E10000000004000600000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001802BE10000000004000700000000000000000000000000000000010000000100000001802CE10000000004000800000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001807A8A0000000004000900000000000000000000000000000000010000000100000001807B8A0000000004000A00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180D3B00000000004000B000000000000000000000000000000000100000001000000018015B10000000004000C0000000000000000000000000000000001000000010000000180F4B00000000004000D000000000000000000000000000000000100000001000000018036B10000000004000E00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FF88000000000400460000000000000000000000000000000001000000010000000180FE880000000004004500000000000000000000000000000000010000000100000001800B810000000004001300000000000000000000000000000000010000000100000001800C810000000004001400000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180F0880000020000000F000000000000000000000000000000000100000001000000FFFF0100120043555646696E64436F6D626F427574746F6EE80300000000040000000000000000000000000000000000000100000001000000960000000200205000000000054750494F4696000000000000000300054750494F460B48414C4C5F425F504F5254054750494F42000000000000000000000000018024E10000000000001100000000000000000000000000000000010000000100000001800A810000000004001200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000FFFF01001500434D4643546F6F6C4261724D656E75427574746F6E2280000002000000150000002153746172742F53746F70202644656275672053657373696F6E094374726C2B46350000000000000000000000000100000001000000000000000000000001000000020021802280000000000000150000002153746172742F53746F70202644656275672053657373696F6E094374726C2B4635000000000000000000000000010000000100000000000000000000000100000000002180E0010000000000007500000021456E65726779204D6561737572656D656E742026776974686F75742044656275670000000000000000000000000100000001000000000000000000000001000000000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C488000000000400160000000000000000000000000000000001000000010000000180C988000000000400180000000000000000000000000000000001000000010000000180C788000000000000190000000000000000000000000000000001000000010000002180C8880000000000001700000027264B696C6C20416C6C20427265616B706F696E747320696E2043757272656E7420546172676574000000000000000000000000010000000100000000000000000000000100000003002180C8880000000000001700000027264B696C6C20416C6C20427265616B706F696E747320696E2043757272656E7420546172676574000000000000000000000000010000000100000000000000000000000100000000002180E50100000000000078000000264B696C6C20416C6C20427265616B706F696E747320696E204163746976652050726F6A656374000000000000000000000000010000000100000000000000000000000100000000002180E601000000000000790000002F4B696C6C20416C6C20427265616B706F696E747320696E204D756C74692D50726F6A65637420576F726B73706163650000000000000000000000000100000001000000000000000000000001000000000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000021804C010000020001001A0000000F2650726F6A6563742057696E646F77000000000000000000000000010000000100000000000000000000000100000008002180DD880000000000001A0000000750726F6A656374000000000000000000000000010000000100000000000000000000000100000000002180DC8B0000000000003A00000005426F6F6B73000000000000000000000000010000000100000000000000000000000100000000002180E18B0000000000003B0000000946756E6374696F6E73000000000000000000000000010000000100000000000000000000000100000000002180E28B000000000000400000000954656D706C6174657300000000000000000000000001000000010000000000000000000000010000000000218018890000000000003D0000000E536F757263652042726F777365720000000000000000000000000100000001000000000000000000000001000000000021800000000000000400FFFFFFFF00000000000000000001000000000000000100000000000000000000000100000000002180D988000000000000390000000C4275696C64204F7574707574000000000000000000000000010000000100000000000000000000000100000000002180E38B000000000000410000000B46696E64204F75747075740000000000000000000000000100000001000000000000000000000001000000000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FB7F0000000000001B000000000000000000000000000000000100000001000000000000000446696C65C6030000 + + + 1423 + 2800FFFF01001100434D4643546F6F6C426172427574746F6E00E1000000000000FFFFFFFF000100000000000000010000000000000001000000018001E1000000000000FFFFFFFF000100000000000000010000000000000001000000018003E1000000000000FFFFFFFF0001000000000000000100000000000000010000000180CD7F000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF000000000000000000010000000000000001000000018023E1000000000000FFFFFFFF000100000000000000010000000000000001000000018022E1000000000000FFFFFFFF000100000000000000010000000000000001000000018025E1000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001802BE1000000000000FFFFFFFF00010000000000000001000000000000000100000001802CE1000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001807A8A000000000000FFFFFFFF00010000000000000001000000000000000100000001807B8A000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180D3B0000000000000FFFFFFFF000100000000000000010000000000000001000000018015B1000000000000FFFFFFFF0001000000000000000100000000000000010000000180F4B0000000000000FFFFFFFF000100000000000000010000000000000001000000018036B1000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180FF88000000000000FFFFFFFF0001000000000000000100000000000000010000000180FE88000000000000FFFFFFFF00010000000000000001000000000000000100000001800B81000000000000FFFFFFFF00010000000000000001000000000000000100000001800C81000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180F088000000000000FFFFFFFF0001000000000000000100000000000000010000000180EE7F000000000000FFFFFFFF000100000000000000010000000000000001000000018024E1000000000000FFFFFFFF00010000000000000001000000000000000100000001800A81000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001802280000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180C488000000000000FFFFFFFF0001000000000000000100000000000000010000000180C988000000000000FFFFFFFF0001000000000000000100000000000000010000000180C788000000000000FFFFFFFF0001000000000000000100000000000000010000000180C888000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180DD88000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180FB7F000000000000FFFFFFFF000100000000000000010000000000000001000000 + + + 1423 + 2800FFFF01001100434D4643546F6F6C426172427574746F6E00E100000000000000000000000000000000000000000000000100000001000000018001E100000000000001000000000000000000000000000000000100000001000000018003E1000000000000020000000000000000000000000000000001000000010000000180CD7F0000000000000300000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018023E100000000000004000000000000000000000000000000000100000001000000018022E100000000000005000000000000000000000000000000000100000001000000018025E10000000000000600000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001802BE10000000000000700000000000000000000000000000000010000000100000001802CE10000000000000800000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001807A8A0000000000000900000000000000000000000000000000010000000100000001807B8A0000000000000A00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180D3B00000000000000B000000000000000000000000000000000100000001000000018015B10000000000000C0000000000000000000000000000000001000000010000000180F4B00000000000000D000000000000000000000000000000000100000001000000018036B10000000000000E00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FF880000000000000F0000000000000000000000000000000001000000010000000180FE880000000000001000000000000000000000000000000000010000000100000001800B810000000000001100000000000000000000000000000000010000000100000001800C810000000000001200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180F088000000000000130000000000000000000000000000000001000000010000000180EE7F00000000000014000000000000000000000000000000000100000001000000018024E10000000000001500000000000000000000000000000000010000000100000001800A810000000000001600000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018022800000000000001700000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C488000000000000180000000000000000000000000000000001000000010000000180C988000000000000190000000000000000000000000000000001000000010000000180C7880000000000001A0000000000000000000000000000000001000000010000000180C8880000000000001B00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180DD880000000000001C00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FB7F0000000000001D000000000000000000000000000000000100000001000000 + + + + 59399 + Build + + 976 + 00200000010000001000FFFF01001100434D4643546F6F6C426172427574746F6ECF7F0000000004001C0000000000000000000000000000000001000000010000000180D07F0000000000001D000000000000000000000000000000000100000001000000018030800000000000001E000000000000000000000000000000000100000001000000FFFF01001500434D4643546F6F6C4261724D656E75427574746F6EC7040000000000006A0000000C4261746368204275696C2664000000000000000000000000010000000100000000000000000000000100000004000580C7040000000000006A0000000C4261746368204275696C266400000000000000000000000001000000010000000000000000000000010000000000058046070000000000006B0000000D42617463682052656275696C640000000000000000000000000100000001000000000000000000000001000000000005804707000000000000FFFFFFFF0B426174636820436C65616E0100000000000000000000000100000001000000000000000000000001000000000005809E8A0000000000001F0000000F4261746326682053657475702E2E2E000000000000000000000000010000000100000000000000000000000100000000000180D17F0000000004002000000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001804C8A0000000000002100000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000FFFF01001900434D4643546F6F6C426172436F6D626F426F78427574746F6EBA000000000000000000000000000000000000000000000000010000000100000096000000030020500000000008546172676574203196000000000000000100085461726765742031000000000180EB880000000000002200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C07F000000000000230000000000000000000000000000000001000000010000000180B08A000000000400240000000000000000000000000000000001000000010000000180A8010000000000004E00000000000000000000000000000000010000000100000001807202000000000000530000000000000000000000000000000001000000010000000180BE010000000000005000000000000000000000000000000000010000000100000000000000054275696C64DC010000 + + + 583 + 1000FFFF01001100434D4643546F6F6C426172427574746F6ECF7F000000000000FFFFFFFF0001000000000000000100000000000000010000000180D07F000000000000FFFFFFFF00010000000000000001000000000000000100000001803080000000000000FFFFFFFF00010000000000000001000000000000000100000001809E8A000000000000FFFFFFFF0001000000000000000100000000000000010000000180D17F000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001804C8A000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001806680000000000000FFFFFFFF0001000000000000000100000000000000010000000180EB88000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180C07F000000000000FFFFFFFF0001000000000000000100000000000000010000000180B08A000000000000FFFFFFFF0001000000000000000100000000000000010000000180A801000000000000FFFFFFFF00010000000000000001000000000000000100000001807202000000000000FFFFFFFF0001000000000000000100000000000000010000000180BE01000000000000FFFFFFFF000100000000000000010000000000000001000000 + + + 583 + 1000FFFF01001100434D4643546F6F6C426172427574746F6ECF7F000000000000000000000000000000000000000000000001000000010000000180D07F00000000000001000000000000000000000000000000000100000001000000018030800000000000000200000000000000000000000000000000010000000100000001809E8A000000000000030000000000000000000000000000000001000000010000000180D17F0000000000000400000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001804C8A0000000000000500000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001806680000000000000060000000000000000000000000000000001000000010000000180EB880000000000000700000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C07F000000000000080000000000000000000000000000000001000000010000000180B08A000000000000090000000000000000000000000000000001000000010000000180A8010000000000000A000000000000000000000000000000000100000001000000018072020000000000000B0000000000000000000000000000000001000000010000000180BE010000000000000C000000000000000000000000000000000100000001000000 + + + + 59400 + Debug + + 2373 + 00200000000000001900FFFF01001100434D4643546F6F6C426172427574746F6ECC880000000000002500000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018017800000000000002600000000000000000000000000000000010000000100000001801D800000000000002700000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001801A800000000000002800000000000000000000000000000000010000000100000001801B80000000000000290000000000000000000000000000000001000000010000000180E57F0000000000002A00000000000000000000000000000000010000000100000001801C800000000000002B00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018000890000000000002C00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180E48B0000000000002D0000000000000000000000000000000001000000010000000180F07F0000000000002E0000000000000000000000000000000001000000010000000180E8880000000000003700000000000000000000000000000000010000000100000001803B010000000000002F0000000000000000000000000000000001000000010000000180BB8A00000000000030000000000000000000000000000000000100000001000000FFFF01001500434D4643546F6F6C4261724D656E75427574746F6E0E01000000000000310000000D57617463682057696E646F7773000000000000000000000000010000000100000000000000000000000100000003001380D88B00000000000031000000085761746368202631000000000000000000000000010000000100000000000000000000000100000000001380D98B00000000000031000000085761746368202632000000000000000000000000010000000100000000000000000000000100000000001380CE01000000000000FFFFFFFF0C576174636820416E63686F720100000000000000010000000000000001000000000000000000000001000000000013800F01000000000000320000000E4D656D6F72792057696E646F7773000000000000000000000000010000000100000000000000000000000100000004001380D28B00000000000032000000094D656D6F7279202631000000000000000000000000010000000100000000000000000000000100000000001380D38B00000000000032000000094D656D6F7279202632000000000000000000000000010000000100000000000000000000000100000000001380D48B00000000000032000000094D656D6F7279202633000000000000000000000000010000000100000000000000000000000100000000001380D58B00000000000032000000094D656D6F72792026340000000000000000000000000100000001000000000000000000000001000000000013801001000000000000330000000E53657269616C2057696E646F77730000000000000000000000000100000001000000000000000000000001000000040013809307000000000000330000000855415254202326310000000000000000000000000100000001000000000000000000000001000000000013809407000000000000330000000855415254202326320000000000000000000000000100000001000000000000000000000001000000000013809507000000000000330000000855415254202326330000000000000000000000000100000001000000000000000000000001000000000013809607000000000000330000001626446562756720287072696E746629205669657765720000000000000000000000000100000001000000000000000000000001000000000013803C010000000000007200000010416E616C797369732057696E646F7773000000000000000000000000010000000100000000000000000000000100000004001380658A000000000000340000000F264C6F67696320416E616C797A6572000000000000000000000000010000000100000000000000000000000100000000001380DC7F0000000000003E0000001526506572666F726D616E636520416E616C797A6572000000000000000000000000010000000100000000000000000000000100000000001380E788000000000000380000000E26436F646520436F766572616765000000000000000000000000010000000100000000000000000000000100000000001380CD01000000000000FFFFFFFF0F416E616C7973697320416E63686F7201000000000000000100000000000000010000000000000000000000010000000000138053010000000000003F0000000D54726163652057696E646F77730000000000000000000000000100000001000000000000000000000001000000010013805401000000000000FFFFFFFF115472616365204D656E7520416E63686F720100000000000000010000000000000001000000000000000000000001000000000013802901000000000000350000001553797374656D205669657765722057696E646F77730000000000000000000000000100000001000000000000000000000001000000010013804B01000000000000FFFFFFFF1453797374656D2056696577657220416E63686F720100000000000000010000000000000001000000000000000000000001000000000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000013800189000000000000360000000F26546F6F6C626F782057696E646F7700000000000000000000000001000000010000000000000000000000010000000300138044C5000000000000FFFFFFFF0E5570646174652057696E646F77730100000000000000010000000000000001000000000000000000000001000000000013800000000000000400FFFFFFFF000000000000000000010000000000000001000000000000000000000001000000000013805B01000000000000FFFFFFFF12546F6F6C626F78204D656E75416E63686F72010000000000000001000000000000000100000000000000000000000100000000000000000005446562756764020000 + + + 898 + 1900FFFF01001100434D4643546F6F6C426172427574746F6ECC88000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001801780000000000000FFFFFFFF00010000000000000001000000000000000100000001801D80000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001801A80000000000000FFFFFFFF00010000000000000001000000000000000100000001801B80000000000000FFFFFFFF0001000000000000000100000000000000010000000180E57F000000000000FFFFFFFF00010000000000000001000000000000000100000001801C80000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001800089000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180E48B000000000000FFFFFFFF0001000000000000000100000000000000010000000180F07F000000000000FFFFFFFF0001000000000000000100000000000000010000000180E888000000000000FFFFFFFF00010000000000000001000000000000000100000001803B01000000000000FFFFFFFF0001000000000000000100000000000000010000000180BB8A000000000000FFFFFFFF0001000000000000000100000000000000010000000180D88B000000000000FFFFFFFF0001000000000000000100000000000000010000000180D28B000000000000FFFFFFFF00010000000000000001000000000000000100000001809307000000000000FFFFFFFF0001000000000000000100000000000000010000000180658A000000000000FFFFFFFF0001000000000000000100000000000000010000000180C18A000000000000FFFFFFFF0001000000000000000100000000000000010000000180EE8B000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001800189000000000000FFFFFFFF000100000000000000010000000000000001000000 + + + 898 + 1900FFFF01001100434D4643546F6F6C426172427574746F6ECC880000000000000000000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018017800000000000000100000000000000000000000000000000010000000100000001801D800000000000000200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001801A800000000000000300000000000000000000000000000000010000000100000001801B80000000000000040000000000000000000000000000000001000000010000000180E57F0000000000000500000000000000000000000000000000010000000100000001801C800000000000000600000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018000890000000000000700000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180E48B000000000000080000000000000000000000000000000001000000010000000180F07F000000000000090000000000000000000000000000000001000000010000000180E8880000000000000A00000000000000000000000000000000010000000100000001803B010000000000000B0000000000000000000000000000000001000000010000000180BB8A0000000000000C0000000000000000000000000000000001000000010000000180D88B0000000000000D0000000000000000000000000000000001000000010000000180D28B0000000000000E000000000000000000000000000000000100000001000000018093070000000000000F0000000000000000000000000000000001000000010000000180658A000000000000100000000000000000000000000000000001000000010000000180C18A000000000000110000000000000000000000000000000001000000010000000180EE8B0000000000001200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180018900000000000013000000000000000000000000000000000100000001000000 + + + + 0 + 1920 + 1080 + + + + +
diff --git a/HUGS/HUGS.uvguix.Phil b/HUGS/HUGS.uvguix.Phil new file mode 100644 index 00000000..f4874599 --- /dev/null +++ b/HUGS/HUGS.uvguix.Phil @@ -0,0 +1,3691 @@ + + + + -6.1 + +
### uVision Project, (C) Keil Software
+ + + + + + + + + + 38003 + Registers + 140 90 + + + 346 + Code Coverage + 1010 160 + + + 204 + Performance Analyzer + 1170 + + + + + + 35141 + Event Statistics + + 200 50 700 + + + 1506 + Symbols + + 80 80 80 + + + 1936 + Watch 1 + + 200 133 133 + + + 1937 + Watch 2 + + 200 133 133 + + + 1935 + Call Stack + Locals + + 200 133 133 + + + 2506 + Trace Data + + 75 135 130 95 70 230 200 150 + + + 466 + Source Browser + 500 + 166 + + + + + + + + 0 + 0 + 0 + 50 + 16 + + + + + + + 44 + 2 + 3 + + -1 + -1 + + + -1 + -1 + + + 168 + 255 + 1623 + 965 + + + + 0 + + 818 + 01000000040000000100000001000000010000000100000000000000020000000000000001000000010000000000000028000000280000000100000009000000080000000100000047443A5C55736572735C5068696C5C4769744875625C485547535C485547535C5254455C4465766963655C474433324631333043385C737461727475705F67643332663178302E730000000012737461727475705F67643332663178302E7300000000C5D4F200FFFFFFFF29443A5C55736572735C5068696C5C4769744875625C485547535C485547535C5372635C6D61696E2E6300000000066D61696E2E6300000000FFDC7800FFFFFFFF2E443A5C55736572735C5068696C5C4769744875625C485547535C485547535C5372635C636F6D6D73485547532E63000000000B636F6D6D73485547532E6300000000BECEA100FFFFFFFF29443A5C55736572735C5068696C5C4769744875625C485547535C485547535C5372635C626C64632E630000000006626C64632E6300000000F0A0A100FFFFFFFF29443A5C55736572735C5068696C5C4769744875625C485547535C485547535C496E635C626C64632E680000000006626C64632E6800000000BCA8E100FFFFFFFF2B443A5C55736572735C5068696C5C4769744875625C485547535C485547535C496E635C636F6E6669672E680000000008636F6E6669672E68000000009CC1B600FFFFFFFF2A443A5C55736572735C5068696C5C4769744875625C485547535C485547535C496E635C73657475702E68000000000773657475702E6800000000F7B88600FFFFFFFF2C443A5C55736572735C5068696C5C4769744875625C485547535C485547535C496E635C646566696E65732E680000000009646566696E65732E6800000000D9ADC200FFFFFFFF23443A5C55736572735C5068696C5C4769744875625C485547535C524541444D452E6D640000000009524541444D452E6D6400000000A5C2D700FFFFFFFF0100000010000000C5D4F200FFDC7800BECEA100F0A0A100BCA8E1009CC1B600F7B88600D9ADC200A5C2D700B3A6BE00EAD6A300F6FA7D00B5E99D005FC3CF00C1838300CACAD500010000000000000002000000F4000000660000008007000069030000 + + + + 0 + Build + + -1 + -1 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + F40000004F00000090050000DF000000 + + + 16 + F40000006600000090050000F6000000 + + + + 1005 + 1005 + 1 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 0300000066000000ED00000039030000 + + + 16 + 22000000390000001201000004010000 + + + + 109 + 109 + 1 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 0300000066000000ED00000039030000 + + + 16 + 22000000390000003E01000079020000 + + + + 1465 + 1465 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 03000000300200008D050000A4020000 + + + 16 + 2200000039000000EA020000C9000000 + + + + 1466 + 1466 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 03000000300200008D050000A4020000 + + + 16 + 2200000039000000EA020000C9000000 + + + + 1467 + 1467 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 03000000300200008D050000A4020000 + + + 16 + 2200000039000000EA020000C9000000 + + + + 1468 + 1468 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 03000000300200008D050000A4020000 + + + 16 + 2200000039000000EA020000C9000000 + + + + 1506 + 1506 + 0 + 0 + 0 + 0 + 32767 + 0 + 16384 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 22000000390000001201000004010000 + + + + 1913 + 1913 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + F7000000660000008D050000C6000000 + + + 16 + 2200000039000000EA020000C9000000 + + + + 1935 + 1935 + 0 + 0 + 0 + 0 + 32767 + 0 + 32768 + 0 + + 16 + 03000000300200008D050000A4020000 + + + 16 + 22000000390000001201000004010000 + + + + 1936 + 1936 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 03000000300200008D050000A4020000 + + + 16 + 22000000390000001201000004010000 + + + + 1937 + 1937 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 03000000300200008D050000A4020000 + + + 16 + 22000000390000001201000004010000 + + + + 1939 + 1939 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 03000000300200008D050000A4020000 + + + 16 + 2200000039000000EA020000C9000000 + + + + 1940 + 1940 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 03000000300200008D050000A4020000 + + + 16 + 2200000039000000EA020000C9000000 + + + + 1941 + 1941 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 03000000300200008D050000A4020000 + + + 16 + 2200000039000000EA020000C9000000 + + + + 1942 + 1942 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 03000000300200008D050000A4020000 + + + 16 + 2200000039000000EA020000C9000000 + + + + 195 + 195 + 1 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 0300000066000000ED00000039030000 + + + 16 + 22000000390000003E01000079020000 + + + + 196 + 196 + 1 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 0300000066000000ED00000039030000 + + + 16 + 22000000390000003E01000079020000 + + + + 197 + 197 + 1 + 0 + 0 + 0 + 32767 + 0 + 32768 + 0 + + 16 + 000000006A03000080070000E6030000 + + + 16 + 2200000039000000EA020000C9000000 + + + + 198 + 198 + 0 + 0 + 0 + 0 + 32767 + 0 + 32768 + 0 + + 16 + 000000001902000090050000BD020000 + + + 16 + 2200000039000000EA020000C9000000 + + + + 199 + 199 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 030000006D0300007D070000CD030000 + + + 16 + 2200000039000000EA020000C9000000 + + + + 203 + 203 + 0 + 0 + 0 + 0 + 32767 + 0 + 8192 + 0 + + 16 + F7000000660000008D050000C6000000 + + + 16 + 2200000039000000EA020000C9000000 + + + + 204 + 204 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + F7000000660000008D050000C6000000 + + + 16 + 2200000039000000EA020000C9000000 + + + + 221 + 221 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 00000000000000000000000000000000 + + + 16 + 0A0000000A0000006E0000006E000000 + + + + 2506 + 2506 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 22000000390000001201000004010000 + + + + 2507 + 2507 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 03000000300200008D050000A4020000 + + + 16 + 2200000039000000EA020000C9000000 + + + + 343 + 343 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + F7000000660000008D050000C6000000 + + + 16 + 2200000039000000EA020000C9000000 + + + + 346 + 346 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + F7000000660000008D050000C6000000 + + + 16 + 2200000039000000EA020000C9000000 + + + + 35141 + 35141 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + F7000000660000008D050000C6000000 + + + 16 + 22000000390000001201000004010000 + + + + 35824 + 35824 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + F7000000660000008D050000C6000000 + + + 16 + 2200000039000000EA020000C9000000 + + + + 35885 + 35885 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 22000000390000001201000004010000 + + + + 35886 + 35886 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 22000000390000001201000004010000 + + + + 35887 + 35887 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 22000000390000001201000004010000 + + + + 35888 + 35888 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 22000000390000001201000004010000 + + + + 35889 + 35889 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 22000000390000001201000004010000 + + + + 35890 + 35890 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 22000000390000001201000004010000 + + + + 35891 + 35891 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 22000000390000001201000004010000 + + + + 35892 + 35892 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 22000000390000001201000004010000 + + + + 35893 + 35893 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 22000000390000001201000004010000 + + + + 35894 + 35894 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 22000000390000001201000004010000 + + + + 35895 + 35895 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 22000000390000001201000004010000 + + + + 35896 + 35896 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 22000000390000001201000004010000 + + + + 35897 + 35897 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 22000000390000001201000004010000 + + + + 35898 + 35898 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 22000000390000001201000004010000 + + + + 35899 + 35899 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 22000000390000001201000004010000 + + + + 35900 + 35900 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 22000000390000001201000004010000 + + + + 35901 + 35901 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 22000000390000001201000004010000 + + + + 35902 + 35902 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 22000000390000001201000004010000 + + + + 35903 + 35903 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 22000000390000001201000004010000 + + + + 35904 + 35904 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 22000000390000001201000004010000 + + + + 35905 + 35905 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 22000000390000001201000004010000 + + + + 38003 + 38003 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 0300000066000000ED00000039030000 + + + 16 + 22000000390000003E01000079020000 + + + + 38007 + 38007 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 030000006D0300007D070000CD030000 + + + 16 + 2200000039000000EA020000C9000000 + + + + 436 + 436 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 030000006D0300007D070000CD030000 + + + 16 + 22000000390000003E01000079020000 + + + + 437 + 437 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 03000000300200008D050000A4020000 + + + 16 + 22000000390000001201000004010000 + + + + 440 + 440 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 03000000300200008D050000A4020000 + + + 16 + 22000000390000001201000004010000 + + + + 463 + 463 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 030000006D0300007D070000CD030000 + + + 16 + 22000000390000003E01000079020000 + + + + 466 + 466 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 030000006D0300007D070000CD030000 + + + 16 + 22000000390000003E01000079020000 + + + + 470 + 470 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + F7000000660000008D050000C6000000 + + + 16 + 2200000039000000EA020000C9000000 + + + + 50000 + 50000 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 22000000390000001201000004010000 + + + + 50001 + 50001 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 22000000390000001201000004010000 + + + + 50002 + 50002 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 22000000390000001201000004010000 + + + + 50003 + 50003 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 22000000390000001201000004010000 + + + + 50004 + 50004 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 22000000390000001201000004010000 + + + + 50005 + 50005 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 22000000390000001201000004010000 + + + + 50006 + 50006 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 22000000390000001201000004010000 + + + + 50007 + 50007 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 22000000390000001201000004010000 + + + + 50008 + 50008 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 22000000390000001201000004010000 + + + + 50009 + 50009 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 22000000390000001201000004010000 + + + + 50010 + 50010 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 22000000390000001201000004010000 + + + + 50011 + 50011 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 22000000390000001201000004010000 + + + + 50012 + 50012 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 22000000390000001201000004010000 + + + + 50013 + 50013 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 22000000390000001201000004010000 + + + + 50014 + 50014 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 22000000390000001201000004010000 + + + + 50015 + 50015 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 22000000390000001201000004010000 + + + + 50016 + 50016 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 22000000390000001201000004010000 + + + + 50017 + 50017 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 22000000390000001201000004010000 + + + + 50018 + 50018 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 22000000390000001201000004010000 + + + + 50019 + 50019 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 22000000390000001201000004010000 + + + + 59392 + 59392 + 1 + 0 + 0 + 0 + 966 + 0 + 8192 + 0 + + 16 + 0000000000000000D10300001C000000 + + + 16 + 0A0000000A0000006E0000006E000000 + + + + 59393 + 0 + 1 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 00000000E603000080070000F9030000 + + + 16 + 0A0000000A0000006E0000006E000000 + + + + 59399 + 59399 + 1 + 0 + 0 + 0 + 476 + 0 + 8192 + 1 + + 16 + 000000001C000000E701000038000000 + + + 16 + 0A0000000A0000006E0000006E000000 + + + + 59400 + 59400 + 0 + 0 + 0 + 0 + 612 + 0 + 8192 + 2 + + 16 + 00000000380000006F02000054000000 + + + 16 + 0A0000000A0000006E0000006E000000 + + + + 824 + 824 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 03000000300200008D050000A4020000 + + + 16 + 22000000390000001201000004010000 + + + + 3312 + 000000000B000000000000000020000000000000FFFFFFFFFFFFFFFFF4000000DF00000090050000E3000000000000000100000004000000010000000000000000000000FFFFFFFF08000000CB00000057010000CC000000F08B00005A01000079070000D601000045890000FFFF02000B004354616262656450616E650020000000000000F40000006600000090050000F6000000F40000004F00000090050000DF0000000000000040280046080000000B446973617373656D626C7900000000CB00000001000000FFFFFFFFFFFFFFFF14506572666F726D616E636520416E616C797A6572000000005701000001000000FFFFFFFFFFFFFFFF14506572666F726D616E636520416E616C797A657200000000CC00000001000000FFFFFFFFFFFFFFFF0E4C6F67696320416E616C797A657200000000F08B000001000000FFFFFFFFFFFFFFFF0D436F646520436F766572616765000000005A01000001000000FFFFFFFFFFFFFFFF11496E737472756374696F6E205472616365000000007907000001000000FFFFFFFFFFFFFFFF0F53797374656D20416E616C797A657200000000D601000001000000FFFFFFFFFFFFFFFF104576656E742053746174697374696373000000004589000001000000FFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000000000000000000000001000000FFFFFFFFCB00000001000000FFFFFFFFCB000000000000000040000000000000FFFFFFFFFFFFFFFF9C0400004F000000A004000029020000000000000200000004000000010000000000000000000000FFFFFFFF2B000000E2050000CA0900002D8C00002E8C00002F8C0000308C0000318C0000328C0000338C0000348C0000358C0000368C0000378C0000388C0000398C00003A8C00003B8C00003C8C00003D8C00003E8C00003F8C0000408C0000418C000050C3000051C3000052C3000053C3000054C3000055C3000056C3000057C3000058C3000059C300005AC300005BC300005CC300005DC300005EC300005FC3000060C3000061C3000062C3000063C3000001800040000000000000A0040000660000009005000040020000A00400004F000000900500002902000000000000404100462B0000000753796D626F6C7300000000E205000001000000FFFFFFFFFFFFFFFF0A5472616365204461746100000000CA09000001000000FFFFFFFFFFFFFFFF00000000002D8C000001000000FFFFFFFFFFFFFFFF00000000002E8C000001000000FFFFFFFFFFFFFFFF00000000002F8C000001000000FFFFFFFFFFFFFFFF0000000000308C000001000000FFFFFFFFFFFFFFFF0000000000318C000001000000FFFFFFFFFFFFFFFF0000000000328C000001000000FFFFFFFFFFFFFFFF0000000000338C000001000000FFFFFFFFFFFFFFFF0000000000348C000001000000FFFFFFFFFFFFFFFF0000000000358C000001000000FFFFFFFFFFFFFFFF0000000000368C000001000000FFFFFFFFFFFFFFFF0000000000378C000001000000FFFFFFFFFFFFFFFF0000000000388C000001000000FFFFFFFFFFFFFFFF0000000000398C000001000000FFFFFFFFFFFFFFFF00000000003A8C000001000000FFFFFFFFFFFFFFFF00000000003B8C000001000000FFFFFFFFFFFFFFFF00000000003C8C000001000000FFFFFFFFFFFFFFFF00000000003D8C000001000000FFFFFFFFFFFFFFFF00000000003E8C000001000000FFFFFFFFFFFFFFFF00000000003F8C000001000000FFFFFFFFFFFFFFFF0000000000408C000001000000FFFFFFFFFFFFFFFF0000000000418C000001000000FFFFFFFFFFFFFFFF000000000050C3000001000000FFFFFFFFFFFFFFFF000000000051C3000001000000FFFFFFFFFFFFFFFF000000000052C3000001000000FFFFFFFFFFFFFFFF000000000053C3000001000000FFFFFFFFFFFFFFFF000000000054C3000001000000FFFFFFFFFFFFFFFF000000000055C3000001000000FFFFFFFFFFFFFFFF000000000056C3000001000000FFFFFFFFFFFFFFFF000000000057C3000001000000FFFFFFFFFFFFFFFF000000000058C3000001000000FFFFFFFFFFFFFFFF000000000059C3000001000000FFFFFFFFFFFFFFFF00000000005AC3000001000000FFFFFFFFFFFFFFFF00000000005BC3000001000000FFFFFFFFFFFFFFFF00000000005CC3000001000000FFFFFFFFFFFFFFFF00000000005DC3000001000000FFFFFFFFFFFFFFFF00000000005EC3000001000000FFFFFFFFFFFFFFFF00000000005FC3000001000000FFFFFFFFFFFFFFFF000000000060C3000001000000FFFFFFFFFFFFFFFF000000000061C3000001000000FFFFFFFFFFFFFFFF000000000062C3000001000000FFFFFFFFFFFFFFFF000000000063C3000001000000FFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000000000000000000000001000000FFFFFFFFE205000001000000FFFFFFFFE2050000000000000010000001000000FFFFFFFFFFFFFFFFF00000004F000000F400000052030000010000000200001004000000010000000000000000000000FFFFFFFF05000000ED0300006D000000C3000000C400000073940000018000100000010000000000000066000000F000000069030000000000004F000000F0000000520300000000000040410056050000000750726F6A65637401000000ED03000001000000FFFFFFFFFFFFFFFF05426F6F6B73010000006D00000001000000FFFFFFFFFFFFFFFF0946756E6374696F6E7301000000C300000001000000FFFFFFFFFFFFFFFF0954656D706C6174657301000000C400000001000000FFFFFFFFFFFFFFFF09526567697374657273000000007394000001000000FFFFFFFFFFFFFFFF00000000000000000000000000000000000000000000000001000000FFFFFFFFED03000001000000FFFFFFFFED030000000000000080000000000000FFFFFFFFFFFFFFFF0000000015020000900500001902000000000000010000000400000001000000000000000000000000000000000000000000000001000000C6000000FFFFFFFF0F0000008F070000930700009407000095070000960700009007000091070000B5010000B801000038030000B9050000BA050000BB050000BC050000CB09000001800080000000000000000000003002000090050000D4020000000000001902000090050000BD02000000000000404100460F0000001343616C6C20537461636B202B204C6F63616C73000000008F07000001000000FFFFFFFFFFFFFFFF0755415254202331000000009307000001000000FFFFFFFFFFFFFFFF0755415254202332000000009407000001000000FFFFFFFFFFFFFFFF0755415254202333000000009507000001000000FFFFFFFFFFFFFFFF15446562756720287072696E74662920566965776572000000009607000001000000FFFFFFFFFFFFFFFF0757617463682031000000009007000001000000FFFFFFFFFFFFFFFF0757617463682032000000009107000001000000FFFFFFFFFFFFFFFF10547261636520457863657074696F6E7300000000B501000001000000FFFFFFFFFFFFFFFF0E4576656E7420436F756E7465727300000000B801000001000000FFFFFFFFFFFFFFFF09554C494E4B706C7573000000003803000001000000FFFFFFFFFFFFFFFF084D656D6F7279203100000000B905000001000000FFFFFFFFFFFFFFFF084D656D6F7279203200000000BA05000001000000FFFFFFFFFFFFFFFF084D656D6F7279203300000000BB05000001000000FFFFFFFFFFFFFFFF084D656D6F7279203400000000BC05000001000000FFFFFFFFFFFFFFFF105472616365204E617669676174696F6E00000000CB09000001000000FFFFFFFFFFFFFFFFFFFFFFFF0000000001000000000000000000000001000000FFFFFFFFC802000019020000CC020000BD02000000000000020000000400000000000000000000000000000000000000000000000000000002000000C6000000FFFFFFFF8F07000001000000FFFFFFFF8F07000001000000C6000000000000000080000001000000FFFFFFFFFFFFFFFF00000000520300008007000056030000010000000100001004000000010000000000000000000000FFFFFFFF06000000C5000000C7000000B4010000D2010000CF0100007794000001800080000001000000000000006D03000080070000FD030000000000005603000080070000E60300000000000040820056060000000C4275696C64204F757470757401000000C500000001000000FFFFFFFFFFFFFFFF0D46696E6420496E2046696C657300000000C700000001000000FFFFFFFFFFFFFFFF0A4572726F72204C69737400000000B401000001000000FFFFFFFFFFFFFFFF0E536F757263652042726F7773657200000000D201000001000000FFFFFFFFFFFFFFFF0E416C6C205265666572656E63657300000000CF01000001000000FFFFFFFFFFFFFFFF0742726F77736572000000007794000001000000FFFFFFFFFFFFFFFF00000000000000000000000000000000000000000000000001000000FFFFFFFFC500000001000000FFFFFFFFC5000000000000000000000000000000 + + + 59392 + File + + 2962 + 00200000010000002800FFFF01001100434D4643546F6F6C426172427574746F6E00E100000000000000000000000000000000000000000000000100000001000000018001E100000000000001000000000000000000000000000000000100000001000000018003E1000000000000020000000000000000000000000000000001000000010000000180CD7F0000000000000300000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018023E100000000040004000000000000000000000000000000000100000001000000018022E100000000040005000000000000000000000000000000000100000001000000018025E10000000000000600000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001802BE10000000000000700000000000000000000000000000000010000000100000001802CE10000000004000800000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001807A8A0000000000000900000000000000000000000000000000010000000100000001807B8A0000000004000A00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180D3B00000000000000B000000000000000000000000000000000100000001000000018015B10000000004000C0000000000000000000000000000000001000000010000000180F4B00000000004000D000000000000000000000000000000000100000001000000018036B10000000004000E00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FF88000000000400460000000000000000000000000000000001000000010000000180FE880000000004004500000000000000000000000000000000010000000100000001800B810000000004001300000000000000000000000000000000010000000100000001800C810000000004001400000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180F0880000020000000F000000000000000000000000000000000100000001000000FFFF0100120043555646696E64436F6D626F427574746F6EE80300000000000000000000000000000000000000000000000100000001000000960000000200205000000000064D415354455296000000000000001400064D41535445520C46494C5445525F53484946541050574D5F46494C5445525F53484946540D626C64634F757470757450776D0E50574D5F66696C7465725F7265670E626C64635F6F757470757450776D1770686173655F706572696F645F66696C7465725F7265670B626C64635F656E61626C650D626C646349696E70757450776D0D626C64635F696E70757450776D14626C64635F6F757470757446696C74657250776D13626C64635F696E70757446696C74657250776D0A66696C7465725F7265670C7370656564436F756E7465720C5049445F504152414D5F4B500B74656D706572617475726512734D6173746572536C6176655265636F72641B55706461746555534152544D6173746572536C617665496E7075741A436865636B55534152544D6173746572536C617665496E7075741D7355534152544D6173746572536C6176655265636F72644275666665720000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018024E10000000000001100000000000000000000000000000000010000000100000001800A810000000000001200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000FFFF01001500434D4643546F6F6C4261724D656E75427574746F6E2280000002000000150000002153746172742F53746F70202644656275672053657373696F6E094374726C2B46350000000000000000000000000100000001000000000000000000000001000000020021802280000000000000150000002153746172742F53746F70202644656275672053657373696F6E094374726C2B4635000000000000000000000000010000000100000000000000000000000100000000002180E0010000000000007500000021456E65726779204D6561737572656D656E742026776974686F75742044656275670000000000000000000000000100000001000000000000000000000001000000000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C488000000000400160000000000000000000000000000000001000000010000000180C988000000000400180000000000000000000000000000000001000000010000000180C788000000000000190000000000000000000000000000000001000000010000002180C8880000000000001700000027264B696C6C20416C6C20427265616B706F696E747320696E2043757272656E7420546172676574000000000000000000000000010000000100000000000000000000000100000003002180C8880000000000001700000027264B696C6C20416C6C20427265616B706F696E747320696E2043757272656E7420546172676574000000000000000000000000010000000100000000000000000000000100000000002180E50100000000000078000000264B696C6C20416C6C20427265616B706F696E747320696E204163746976652050726F6A656374000000000000000000000000010000000100000000000000000000000100000000002180E601000000000000790000002F4B696C6C20416C6C20427265616B706F696E747320696E204D756C74692D50726F6A65637420576F726B73706163650000000000000000000000000100000001000000000000000000000001000000000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000021804C010000020001001A0000000F2650726F6A6563742057696E646F77000000000000000000000000010000000100000000000000000000000100000008002180DD880000000000001A0000000750726F6A656374000000000000000000000000010000000100000000000000000000000100000000002180DC8B0000000000003A00000005426F6F6B73000000000000000000000000010000000100000000000000000000000100000000002180E18B0000000000003B0000000946756E6374696F6E73000000000000000000000000010000000100000000000000000000000100000000002180E28B000000000000400000000954656D706C6174657300000000000000000000000001000000010000000000000000000000010000000000218018890000000000003D0000000E536F757263652042726F777365720000000000000000000000000100000001000000000000000000000001000000000021800000000000000400FFFFFFFF00000000000000000001000000000000000100000000000000000000000100000000002180D988000000000000390000000C4275696C64204F7574707574000000000000000000000000010000000100000000000000000000000100000000002180E38B000000000000410000000B46696E64204F75747075740000000000000000000000000100000001000000000000000000000001000000000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FB7F0000000000001B000000000000000000000000000000000100000001000000000000000446696C65C6030000 + + + 1423 + 2800FFFF01001100434D4643546F6F6C426172427574746F6E00E1000000000000FFFFFFFF000100000000000000010000000000000001000000018001E1000000000000FFFFFFFF000100000000000000010000000000000001000000018003E1000000000000FFFFFFFF0001000000000000000100000000000000010000000180CD7F000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF000000000000000000010000000000000001000000018023E1000000000000FFFFFFFF000100000000000000010000000000000001000000018022E1000000000000FFFFFFFF000100000000000000010000000000000001000000018025E1000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001802BE1000000000000FFFFFFFF00010000000000000001000000000000000100000001802CE1000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001807A8A000000000000FFFFFFFF00010000000000000001000000000000000100000001807B8A000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180D3B0000000000000FFFFFFFF000100000000000000010000000000000001000000018015B1000000000000FFFFFFFF0001000000000000000100000000000000010000000180F4B0000000000000FFFFFFFF000100000000000000010000000000000001000000018036B1000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180FF88000000000000FFFFFFFF0001000000000000000100000000000000010000000180FE88000000000000FFFFFFFF00010000000000000001000000000000000100000001800B81000000000000FFFFFFFF00010000000000000001000000000000000100000001800C81000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180F088000000000000FFFFFFFF0001000000000000000100000000000000010000000180EE7F000000000000FFFFFFFF000100000000000000010000000000000001000000018024E1000000000000FFFFFFFF00010000000000000001000000000000000100000001800A81000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001802280000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180C488000000000000FFFFFFFF0001000000000000000100000000000000010000000180C988000000000000FFFFFFFF0001000000000000000100000000000000010000000180C788000000000000FFFFFFFF0001000000000000000100000000000000010000000180C888000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180DD88000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180FB7F000000000000FFFFFFFF000100000000000000010000000000000001000000 + + + 1423 + 2800FFFF01001100434D4643546F6F6C426172427574746F6E00E100000000000000000000000000000000000000000000000100000001000000018001E100000000000001000000000000000000000000000000000100000001000000018003E1000000000000020000000000000000000000000000000001000000010000000180CD7F0000000000000300000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018023E100000000000004000000000000000000000000000000000100000001000000018022E100000000000005000000000000000000000000000000000100000001000000018025E10000000000000600000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001802BE10000000000000700000000000000000000000000000000010000000100000001802CE10000000000000800000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001807A8A0000000000000900000000000000000000000000000000010000000100000001807B8A0000000000000A00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180D3B00000000000000B000000000000000000000000000000000100000001000000018015B10000000000000C0000000000000000000000000000000001000000010000000180F4B00000000000000D000000000000000000000000000000000100000001000000018036B10000000000000E00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FF880000000000000F0000000000000000000000000000000001000000010000000180FE880000000000001000000000000000000000000000000000010000000100000001800B810000000000001100000000000000000000000000000000010000000100000001800C810000000000001200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180F088000000000000130000000000000000000000000000000001000000010000000180EE7F00000000000014000000000000000000000000000000000100000001000000018024E10000000000001500000000000000000000000000000000010000000100000001800A810000000000001600000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018022800000000000001700000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C488000000000000180000000000000000000000000000000001000000010000000180C988000000000000190000000000000000000000000000000001000000010000000180C7880000000000001A0000000000000000000000000000000001000000010000000180C8880000000000001B00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180DD880000000000001C00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FB7F0000000000001D000000000000000000000000000000000100000001000000 + + + + 59399 + Build + + 976 + 00200000010000001000FFFF01001100434D4643546F6F6C426172427574746F6ECF7F0000000004001C0000000000000000000000000000000001000000010000000180D07F0000000000001D000000000000000000000000000000000100000001000000018030800000000000001E000000000000000000000000000000000100000001000000FFFF01001500434D4643546F6F6C4261724D656E75427574746F6EC7040000000000006A0000000C4261746368204275696C2664000000000000000000000000010000000100000000000000000000000100000004000580C7040000000000006A0000000C4261746368204275696C266400000000000000000000000001000000010000000000000000000000010000000000058046070000000000006B0000000D42617463682052656275696C640000000000000000000000000100000001000000000000000000000001000000000005804707000000000000FFFFFFFF0B426174636820436C65616E0100000000000000000000000100000001000000000000000000000001000000000005809E8A0000000000001F0000000F4261746326682053657475702E2E2E000000000000000000000000010000000100000000000000000000000100000000000180D17F0000000004002000000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001804C8A0000000000002100000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000FFFF01001900434D4643546F6F6C426172436F6D626F426F78427574746F6EBA000000000000000000000000000000000000000000000000010000000100000096000000030020500000000008546172676574203196000000000000000100085461726765742031000000000180EB880000000000002200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C07F000000000000230000000000000000000000000000000001000000010000000180B08A000000000400240000000000000000000000000000000001000000010000000180A8010000000000004E00000000000000000000000000000000010000000100000001807202000000000000530000000000000000000000000000000001000000010000000180BE010000000000005000000000000000000000000000000000010000000100000000000000054275696C64DC010000 + + + 583 + 1000FFFF01001100434D4643546F6F6C426172427574746F6ECF7F000000000000FFFFFFFF0001000000000000000100000000000000010000000180D07F000000000000FFFFFFFF00010000000000000001000000000000000100000001803080000000000000FFFFFFFF00010000000000000001000000000000000100000001809E8A000000000000FFFFFFFF0001000000000000000100000000000000010000000180D17F000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001804C8A000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001806680000000000000FFFFFFFF0001000000000000000100000000000000010000000180EB88000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180C07F000000000000FFFFFFFF0001000000000000000100000000000000010000000180B08A000000000000FFFFFFFF0001000000000000000100000000000000010000000180A801000000000000FFFFFFFF00010000000000000001000000000000000100000001807202000000000000FFFFFFFF0001000000000000000100000000000000010000000180BE01000000000000FFFFFFFF000100000000000000010000000000000001000000 + + + 583 + 1000FFFF01001100434D4643546F6F6C426172427574746F6ECF7F000000000000000000000000000000000000000000000001000000010000000180D07F00000000000001000000000000000000000000000000000100000001000000018030800000000000000200000000000000000000000000000000010000000100000001809E8A000000000000030000000000000000000000000000000001000000010000000180D17F0000000000000400000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001804C8A0000000000000500000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001806680000000000000060000000000000000000000000000000001000000010000000180EB880000000000000700000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C07F000000000000080000000000000000000000000000000001000000010000000180B08A000000000000090000000000000000000000000000000001000000010000000180A8010000000000000A000000000000000000000000000000000100000001000000018072020000000000000B0000000000000000000000000000000001000000010000000180BE010000000000000C000000000000000000000000000000000100000001000000 + + + + 59400 + Debug + + 2373 + 00200000000000001900FFFF01001100434D4643546F6F6C426172427574746F6ECC880000000000002500000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018017800000000000002600000000000000000000000000000000010000000100000001801D800000000000002700000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001801A800000000000002800000000000000000000000000000000010000000100000001801B80000000000000290000000000000000000000000000000001000000010000000180E57F0000000000002A00000000000000000000000000000000010000000100000001801C800000000000002B00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018000890000000000002C00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180E48B0000000000002D0000000000000000000000000000000001000000010000000180F07F0000000000002E0000000000000000000000000000000001000000010000000180E8880000000000003700000000000000000000000000000000010000000100000001803B010000000000002F0000000000000000000000000000000001000000010000000180BB8A00000000000030000000000000000000000000000000000100000001000000FFFF01001500434D4643546F6F6C4261724D656E75427574746F6E0E01000000000000310000000D57617463682057696E646F7773000000000000000000000000010000000100000000000000000000000100000003001380D88B00000000000031000000085761746368202631000000000000000000000000010000000100000000000000000000000100000000001380D98B00000000000031000000085761746368202632000000000000000000000000010000000100000000000000000000000100000000001380CE01000000000000FFFFFFFF0C576174636820416E63686F720000000000000000010000000000000001000000000000000000000001000000000013800F01000000000000320000000E4D656D6F72792057696E646F7773000000000000000000000000010000000100000000000000000000000100000004001380D28B00000000000032000000094D656D6F7279202631000000000000000000000000010000000100000000000000000000000100000000001380D38B00000000000032000000094D656D6F7279202632000000000000000000000000010000000100000000000000000000000100000000001380D48B00000000000032000000094D656D6F7279202633000000000000000000000000010000000100000000000000000000000100000000001380D58B00000000000032000000094D656D6F72792026340000000000000000000000000100000001000000000000000000000001000000000013801001000000000000330000000E53657269616C2057696E646F77730000000000000000000000000100000001000000000000000000000001000000040013809307000000000000330000000855415254202326310000000000000000000000000100000001000000000000000000000001000000000013809407000000000000330000000855415254202326320000000000000000000000000100000001000000000000000000000001000000000013809507000000000000330000000855415254202326330000000000000000000000000100000001000000000000000000000001000000000013809607000000000000330000001626446562756720287072696E746629205669657765720000000000000000000000000100000001000000000000000000000001000000000013803C010000000000007200000010416E616C797369732057696E646F7773000000000000000000000000010000000100000000000000000000000100000004001380658A000000000000340000000F264C6F67696320416E616C797A6572000000000000000000000000010000000100000000000000000000000100000000001380DC7F0000000000003E0000001526506572666F726D616E636520416E616C797A6572000000000000000000000000010000000100000000000000000000000100000000001380E788000000000000380000000E26436F646520436F766572616765000000000000000000000000010000000100000000000000000000000100000000001380CD01000000000000FFFFFFFF0F416E616C7973697320416E63686F7200000000000000000100000000000000010000000000000000000000010000000000138053010000000000003F0000000D54726163652057696E646F77730000000000000000000000000100000001000000000000000000000001000000010013805401000000000000FFFFFFFF115472616365204D656E7520416E63686F720000000000000000010000000000000001000000000000000000000001000000000013802901000000000000350000001553797374656D205669657765722057696E646F77730000000000000000000000000100000001000000000000000000000001000000010013804B01000000000000FFFFFFFF1453797374656D2056696577657220416E63686F720000000000000000010000000000000001000000000000000000000001000000000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000013800189000000000000360000000F26546F6F6C626F782057696E646F7700000000000000000000000001000000010000000000000000000000010000000300138044C5000000000000FFFFFFFF0E5570646174652057696E646F77730000000000000000010000000000000001000000000000000000000001000000000013800000000000000400FFFFFFFF000000000000000000010000000000000001000000000000000000000001000000000013805B01000000000000FFFFFFFF12546F6F6C626F78204D656E75416E63686F72000000000000000001000000000000000100000000000000000000000100000000000000000005446562756764020000 + + + 898 + 1900FFFF01001100434D4643546F6F6C426172427574746F6ECC88000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001801780000000000000FFFFFFFF00010000000000000001000000000000000100000001801D80000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001801A80000000000000FFFFFFFF00010000000000000001000000000000000100000001801B80000000000000FFFFFFFF0001000000000000000100000000000000010000000180E57F000000000000FFFFFFFF00010000000000000001000000000000000100000001801C80000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001800089000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180E48B000000000000FFFFFFFF0001000000000000000100000000000000010000000180F07F000000000000FFFFFFFF0001000000000000000100000000000000010000000180E888000000000000FFFFFFFF00010000000000000001000000000000000100000001803B01000000000000FFFFFFFF0001000000000000000100000000000000010000000180BB8A000000000000FFFFFFFF0001000000000000000100000000000000010000000180D88B000000000000FFFFFFFF0001000000000000000100000000000000010000000180D28B000000000000FFFFFFFF00010000000000000001000000000000000100000001809307000000000000FFFFFFFF0001000000000000000100000000000000010000000180658A000000000000FFFFFFFF0001000000000000000100000000000000010000000180C18A000000000000FFFFFFFF0001000000000000000100000000000000010000000180EE8B000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001800189000000000000FFFFFFFF000100000000000000010000000000000001000000 + + + 898 + 1900FFFF01001100434D4643546F6F6C426172427574746F6ECC880000000000000000000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018017800000000000000100000000000000000000000000000000010000000100000001801D800000000000000200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001801A800000000000000300000000000000000000000000000000010000000100000001801B80000000000000040000000000000000000000000000000001000000010000000180E57F0000000000000500000000000000000000000000000000010000000100000001801C800000000000000600000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018000890000000000000700000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180E48B000000000000080000000000000000000000000000000001000000010000000180F07F000000000000090000000000000000000000000000000001000000010000000180E8880000000000000A00000000000000000000000000000000010000000100000001803B010000000000000B0000000000000000000000000000000001000000010000000180BB8A0000000000000C0000000000000000000000000000000001000000010000000180D88B0000000000000D0000000000000000000000000000000001000000010000000180D28B0000000000000E000000000000000000000000000000000100000001000000018093070000000000000F0000000000000000000000000000000001000000010000000180658A000000000000100000000000000000000000000000000001000000010000000180C18A000000000000110000000000000000000000000000000001000000010000000180EE8B0000000000001200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180018900000000000013000000000000000000000000000000000100000001000000 + + + + 0 + 1920 + 1080 + + + + 1 + Debug + + -1 + -1 + 1 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + F40000004F00000080070000DF000000 + + + 16 + F40000006600000080070000F6000000 + + + + 1005 + 1005 + 1 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 0300000066000000ED00000025030000 + + + 16 + 560000006D0000004601000038010000 + + + + 109 + 109 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 0300000066000000ED00000025030000 + + + 16 + 560000006D00000072010000AD020000 + + + + 1465 + 1465 + 1 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + C6030000590300007D070000CD030000 + + + 16 + 560000006D0000001E030000FD000000 + + + + 1466 + 1466 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + C6030000590300007D070000CD030000 + + + 16 + 560000006D0000001E030000FD000000 + + + + 1467 + 1467 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + C6030000590300007D070000CD030000 + + + 16 + 560000006D0000001E030000FD000000 + + + + 1468 + 1468 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + C6030000590300007D070000CD030000 + + + 16 + 560000006D0000001E030000FD000000 + + + + 1506 + 1506 + 0 + 0 + 0 + 0 + 32767 + 0 + 16384 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 560000006D0000004601000038010000 + + + + 1913 + 1913 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + F7000000660000007D070000C6000000 + + + 16 + 560000006D0000001E030000FD000000 + + + + 1935 + 1935 + 1 + 0 + 0 + 0 + 32767 + 0 + 32768 + 0 + + 16 + C6030000590300007D070000CD030000 + + + 16 + 560000006D0000004601000038010000 + + + + 1936 + 1936 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + C6030000590300007D070000CD030000 + + + 16 + 560000006D0000004601000038010000 + + + + 1937 + 1937 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + C6030000590300007D070000CD030000 + + + 16 + 560000006D0000004601000038010000 + + + + 1939 + 1939 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + C6030000590300007D070000CD030000 + + + 16 + 560000006D0000001E030000FD000000 + + + + 1940 + 1940 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + C6030000590300007D070000CD030000 + + + 16 + 560000006D0000001E030000FD000000 + + + + 1941 + 1941 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + C6030000590300007D070000CD030000 + + + 16 + 560000006D0000001E030000FD000000 + + + + 1942 + 1942 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + C6030000590300007D070000CD030000 + + + 16 + 560000006D0000001E030000FD000000 + + + + 195 + 195 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 0300000066000000ED00000025030000 + + + 16 + 560000006D00000072010000AD020000 + + + + 196 + 196 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 0300000066000000ED00000025030000 + + + 16 + 560000006D00000072010000AD020000 + + + + 197 + 197 + 0 + 0 + 0 + 0 + 32767 + 0 + 32768 + 0 + + 16 + 03000000440200008D050000A4020000 + + + 16 + 560000006D0000001E030000FD000000 + + + + 198 + 198 + 1 + 0 + 0 + 0 + 32767 + 0 + 32768 + 0 + + 16 + 0000000042030000BF030000E6030000 + + + 16 + 560000006D0000001E030000FD000000 + + + + 199 + 199 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 03000000440200008D050000A4020000 + + + 16 + 560000006D0000001E030000FD000000 + + + + 203 + 203 + 1 + 0 + 0 + 0 + 32767 + 0 + 8192 + 0 + + 16 + F40000006300000080070000DF000000 + + + 16 + 560000006D0000001E030000FD000000 + + + + 204 + 204 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + F7000000660000007D070000C6000000 + + + 16 + 560000006D0000001E030000FD000000 + + + + 221 + 221 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 00000000000000000000000000000000 + + + 16 + 0A0000000A0000006E0000006E000000 + + + + 2506 + 2506 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 560000006D0000004601000038010000 + + + + 2507 + 2507 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + C6030000590300007D070000CD030000 + + + 16 + 560000006D0000001E030000FD000000 + + + + 343 + 343 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + F7000000660000007D070000C6000000 + + + 16 + 560000006D0000001E030000FD000000 + + + + 346 + 346 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + F7000000660000007D070000C6000000 + + + 16 + 560000006D0000001E030000FD000000 + + + + 35141 + 35141 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + F7000000660000007D070000C6000000 + + + 16 + 560000006D0000004601000038010000 + + + + 35824 + 35824 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + F7000000660000007D070000C6000000 + + + 16 + 560000006D0000001E030000FD000000 + + + + 35885 + 35885 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 560000006D0000004601000038010000 + + + + 35886 + 35886 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 560000006D0000004601000038010000 + + + + 35887 + 35887 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 560000006D0000004601000038010000 + + + + 35888 + 35888 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 560000006D0000004601000038010000 + + + + 35889 + 35889 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 560000006D0000004601000038010000 + + + + 35890 + 35890 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 560000006D0000004601000038010000 + + + + 35891 + 35891 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 560000006D0000004601000038010000 + + + + 35892 + 35892 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 560000006D0000004601000038010000 + + + + 35893 + 35893 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 560000006D0000004601000038010000 + + + + 35894 + 35894 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 560000006D0000004601000038010000 + + + + 35895 + 35895 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 560000006D0000004601000038010000 + + + + 35896 + 35896 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 560000006D0000004601000038010000 + + + + 35897 + 35897 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 560000006D0000004601000038010000 + + + + 35898 + 35898 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 560000006D0000004601000038010000 + + + + 35899 + 35899 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 560000006D0000004601000038010000 + + + + 35900 + 35900 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 560000006D0000004601000038010000 + + + + 35901 + 35901 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 560000006D0000004601000038010000 + + + + 35902 + 35902 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 560000006D0000004601000038010000 + + + + 35903 + 35903 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 560000006D0000004601000038010000 + + + + 35904 + 35904 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 560000006D0000004601000038010000 + + + + 35905 + 35905 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 560000006D0000004601000038010000 + + + + 38003 + 38003 + 1 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 0300000066000000ED00000025030000 + + + 16 + 560000006D00000072010000AD020000 + + + + 38007 + 38007 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 03000000440200008D050000A4020000 + + + 16 + 560000006D0000001E030000FD000000 + + + + 436 + 436 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 03000000440200008D050000A4020000 + + + 16 + 560000006D00000072010000AD020000 + + + + 437 + 437 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + C6030000590300007D070000CD030000 + + + 16 + 560000006D0000004601000038010000 + + + + 440 + 440 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + C6030000590300007D070000CD030000 + + + 16 + 560000006D0000004601000038010000 + + + + 463 + 463 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 03000000440200008D050000A4020000 + + + 16 + 560000006D00000072010000AD020000 + + + + 466 + 466 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 03000000440200008D050000A4020000 + + + 16 + 560000006D00000072010000AD020000 + + + + 470 + 470 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + F7000000660000007D070000C6000000 + + + 16 + 560000006D0000001E030000FD000000 + + + + 50000 + 50000 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 560000006D0000004601000038010000 + + + + 50001 + 50001 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 560000006D0000004601000038010000 + + + + 50002 + 50002 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 560000006D0000004601000038010000 + + + + 50003 + 50003 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 560000006D0000004601000038010000 + + + + 50004 + 50004 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 560000006D0000004601000038010000 + + + + 50005 + 50005 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 560000006D0000004601000038010000 + + + + 50006 + 50006 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 560000006D0000004601000038010000 + + + + 50007 + 50007 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 560000006D0000004601000038010000 + + + + 50008 + 50008 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 560000006D0000004601000038010000 + + + + 50009 + 50009 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 560000006D0000004601000038010000 + + + + 50010 + 50010 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 560000006D0000004601000038010000 + + + + 50011 + 50011 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 560000006D0000004601000038010000 + + + + 50012 + 50012 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 560000006D0000004601000038010000 + + + + 50013 + 50013 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 560000006D0000004601000038010000 + + + + 50014 + 50014 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 560000006D0000004601000038010000 + + + + 50015 + 50015 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 560000006D0000004601000038010000 + + + + 50016 + 50016 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 560000006D0000004601000038010000 + + + + 50017 + 50017 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 560000006D0000004601000038010000 + + + + 50018 + 50018 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 560000006D0000004601000038010000 + + + + 50019 + 50019 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + A3040000660000008D05000010020000 + + + 16 + 560000006D0000004601000038010000 + + + + 59392 + 59392 + 1 + 0 + 0 + 0 + 966 + 0 + 8192 + 0 + + 16 + 0000000000000000D10300001C000000 + + + 16 + 0A0000000A0000006E0000006E000000 + + + + 59393 + 0 + 1 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + 00000000E603000080070000F9030000 + + + 16 + 0A0000000A0000006E0000006E000000 + + + + 59399 + 59399 + 0 + 0 + 0 + 0 + 476 + 0 + 8192 + 1 + + 16 + 000000001C000000E701000038000000 + + + 16 + 0A0000000A0000006E0000006E000000 + + + + 59400 + 59400 + 1 + 0 + 0 + 0 + 612 + 0 + 8192 + 2 + + 16 + 000000001C0000006F02000038000000 + + + 16 + 0A0000000A0000006E0000006E000000 + + + + 824 + 824 + 0 + 0 + 0 + 0 + 32767 + 0 + 4096 + 0 + + 16 + C6030000590300007D070000CD030000 + + + 16 + 560000006D0000004601000038010000 + + + + 3311 + 000000000B000000000000000020000001000000FFFFFFFFFFFFFFFFF4000000DF00000080070000E3000000010000000100001004000000010000000000000000000000FFFFFFFF08000000CB00000057010000CC000000F08B00005A01000079070000D601000045890000FFFF02000B004354616262656450616E650020000001000000F40000006600000080070000F6000000F40000004F00000080070000DF0000000000000040280056080000000B446973617373656D626C7901000000CB00000001000000FFFFFFFFFFFFFFFF14506572666F726D616E636520416E616C797A6572000000005701000001000000FFFFFFFFFFFFFFFF14506572666F726D616E636520416E616C797A657200000000CC00000001000000FFFFFFFFFFFFFFFF0E4C6F67696320416E616C797A657200000000F08B000001000000FFFFFFFFFFFFFFFF0D436F646520436F766572616765000000005A01000001000000FFFFFFFFFFFFFFFF11496E737472756374696F6E205472616365000000007907000001000000FFFFFFFFFFFFFFFF0F53797374656D20416E616C797A657200000000D601000001000000FFFFFFFFFFFFFFFF104576656E742053746174697374696373000000004589000001000000FFFFFFFFFFFFFFFF00000000000000000000000000000000000000000000000001000000FFFFFFFFCB00000001000000FFFFFFFFCB000000000000000040000000000000FFFFFFFFFFFFFFFF9C0400004F000000A004000029020000000000000200000004000000010000000000000000000000FFFFFFFF2B000000E2050000CA0900002D8C00002E8C00002F8C0000308C0000318C0000328C0000338C0000348C0000358C0000368C0000378C0000388C0000398C00003A8C00003B8C00003C8C00003D8C00003E8C00003F8C0000408C0000418C000050C3000051C3000052C3000053C3000054C3000055C3000056C3000057C3000058C3000059C300005AC300005BC300005CC300005DC300005EC300005FC3000060C3000061C3000062C3000063C3000001800040000000000000A0040000660000009005000040020000A00400004F000000900500002902000000000000404100462B0000000753796D626F6C7300000000E205000001000000FFFFFFFFFFFFFFFF0A5472616365204461746100000000CA09000001000000FFFFFFFFFFFFFFFF00000000002D8C000001000000FFFFFFFFFFFFFFFF00000000002E8C000001000000FFFFFFFFFFFFFFFF00000000002F8C000001000000FFFFFFFFFFFFFFFF0000000000308C000001000000FFFFFFFFFFFFFFFF0000000000318C000001000000FFFFFFFFFFFFFFFF0000000000328C000001000000FFFFFFFFFFFFFFFF0000000000338C000001000000FFFFFFFFFFFFFFFF0000000000348C000001000000FFFFFFFFFFFFFFFF0000000000358C000001000000FFFFFFFFFFFFFFFF0000000000368C000001000000FFFFFFFFFFFFFFFF0000000000378C000001000000FFFFFFFFFFFFFFFF0000000000388C000001000000FFFFFFFFFFFFFFFF0000000000398C000001000000FFFFFFFFFFFFFFFF00000000003A8C000001000000FFFFFFFFFFFFFFFF00000000003B8C000001000000FFFFFFFFFFFFFFFF00000000003C8C000001000000FFFFFFFFFFFFFFFF00000000003D8C000001000000FFFFFFFFFFFFFFFF00000000003E8C000001000000FFFFFFFFFFFFFFFF00000000003F8C000001000000FFFFFFFFFFFFFFFF0000000000408C000001000000FFFFFFFFFFFFFFFF0000000000418C000001000000FFFFFFFFFFFFFFFF000000000050C3000001000000FFFFFFFFFFFFFFFF000000000051C3000001000000FFFFFFFFFFFFFFFF000000000052C3000001000000FFFFFFFFFFFFFFFF000000000053C3000001000000FFFFFFFFFFFFFFFF000000000054C3000001000000FFFFFFFFFFFFFFFF000000000055C3000001000000FFFFFFFFFFFFFFFF000000000056C3000001000000FFFFFFFFFFFFFFFF000000000057C3000001000000FFFFFFFFFFFFFFFF000000000058C3000001000000FFFFFFFFFFFFFFFF000000000059C3000001000000FFFFFFFFFFFFFFFF00000000005AC3000001000000FFFFFFFFFFFFFFFF00000000005BC3000001000000FFFFFFFFFFFFFFFF00000000005CC3000001000000FFFFFFFFFFFFFFFF00000000005DC3000001000000FFFFFFFFFFFFFFFF00000000005EC3000001000000FFFFFFFFFFFFFFFF00000000005FC3000001000000FFFFFFFFFFFFFFFF000000000060C3000001000000FFFFFFFFFFFFFFFF000000000061C3000001000000FFFFFFFFFFFFFFFF000000000062C3000001000000FFFFFFFFFFFFFFFF000000000063C3000001000000FFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000000000000000000000001000000FFFFFFFFE205000001000000FFFFFFFFE2050000000000000010000001000000FFFFFFFFFFFFFFFFF00000004F000000F40000003E030000010000000200001004000000010000000000000000000000FFFFFFFF05000000ED0300006D000000C3000000C400000073940000018000100000010000000000000066000000F000000055030000000000004F000000F00000003E0300000000000040410056050000000750726F6A65637401000000ED03000001000000FFFFFFFFFFFFFFFF05426F6F6B73000000006D00000001000000FFFFFFFFFFFFFFFF0946756E6374696F6E7300000000C300000001000000FFFFFFFFFFFFFFFF0954656D706C6174657300000000C400000001000000FFFFFFFFFFFFFFFF09526567697374657273010000007394000001000000FFFFFFFFFFFFFFFF04000000000000000000000000000000000000000000000001000000FFFFFFFFED03000001000000FFFFFFFFED030000000000000080000001000000FFFFFFFFFFFFFFFF000000003E030000800700004203000001000000010000100400000001000000000000000000000000000000000000000000000001000000C6000000FFFFFFFF0F0000008F070000930700009407000095070000960700009007000091070000B5010000B801000038030000B9050000BA050000BB050000BC050000CB09000001800080000001000000C30300005903000080070000FD030000C30300004203000080070000E603000000000000404100560F0000001343616C6C20537461636B202B204C6F63616C73010000008F07000001000000FFFFFFFFFFFFFFFF0755415254202331000000009307000001000000FFFFFFFFFFFFFFFF0755415254202332000000009407000001000000FFFFFFFFFFFFFFFF0755415254202333000000009507000001000000FFFFFFFFFFFFFFFF15446562756720287072696E74662920566965776572000000009607000001000000FFFFFFFFFFFFFFFF0757617463682031000000009007000001000000FFFFFFFFFFFFFFFF0757617463682032000000009107000001000000FFFFFFFFFFFFFFFF10547261636520457863657074696F6E7300000000B501000001000000FFFFFFFFFFFFFFFF0E4576656E7420436F756E7465727300000000B801000001000000FFFFFFFFFFFFFFFF09554C494E4B706C7573000000003803000001000000FFFFFFFFFFFFFFFF084D656D6F7279203101000000B905000001000000FFFFFFFFFFFFFFFF084D656D6F7279203200000000BA05000001000000FFFFFFFFFFFFFFFF084D656D6F7279203300000000BB05000001000000FFFFFFFFFFFFFFFF084D656D6F7279203400000000BC05000001000000FFFFFFFFFFFFFFFF105472616365204E617669676174696F6E00000000CB09000001000000FFFFFFFFFFFFFFFF000000000000000001000000000000000100000001000000FFFFFFFFBF03000042030000C3030000E603000001000000020000100400000000000000000000000000000000000000000000000000000002000000C6000000FFFFFFFF8F07000001000000FFFFFFFF8F07000001000000C6000000000000000080000000000000FFFFFFFFFFFFFFFF0000000029020000900500002D020000000000000100000004000000010000000000000000000000FFFFFFFF06000000C5000000C7000000B4010000D2010000CF0100007794000001800080000000000000000000004402000090050000D4020000000000002D02000090050000BD0200000000000040820046060000000C4275696C64204F757470757400000000C500000001000000FFFFFFFFFFFFFFFF0D46696E6420496E2046696C657300000000C700000001000000FFFFFFFFFFFFFFFF0A4572726F72204C69737400000000B401000001000000FFFFFFFFFFFFFFFF0E536F757263652042726F7773657200000000D201000001000000FFFFFFFFFFFFFFFF0E416C6C205265666572656E63657300000000CF01000001000000FFFFFFFFFFFFFFFF0642726F777365000000007794000001000000FFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000000000000000000000001000000FFFFFFFFC500000001000000FFFFFFFFC5000000000000000000000000000000 + + + 59392 + File + + 2962 + 00200000010000002800FFFF01001100434D4643546F6F6C426172427574746F6E00E100000000000000000000000000000000000000000000000100000001000000018001E100000000000001000000000000000000000000000000000100000001000000018003E1000000000000020000000000000000000000000000000001000000010000000180CD7F0000000000000300000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018023E100000000040004000000000000000000000000000000000100000001000000018022E100000000040005000000000000000000000000000000000100000001000000018025E10000000000000600000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001802BE10000000000000700000000000000000000000000000000010000000100000001802CE10000000004000800000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001807A8A0000000000000900000000000000000000000000000000010000000100000001807B8A0000000004000A00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180D3B00000000000000B000000000000000000000000000000000100000001000000018015B10000000004000C0000000000000000000000000000000001000000010000000180F4B00000000004000D000000000000000000000000000000000100000001000000018036B10000000004000E00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FF88000000000400460000000000000000000000000000000001000000010000000180FE880000000004004500000000000000000000000000000000010000000100000001800B810000000004001300000000000000000000000000000000010000000100000001800C810000000004001400000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180F0880000020000000F000000000000000000000000000000000100000001000000FFFF0100120043555646696E64436F6D626F427574746F6EE80300000000000000000000000000000000000000000000000100000001000000960000000200205000000000064D415354455296000000000000001400064D41535445520C46494C5445525F53484946541050574D5F46494C5445525F53484946540D626C64634F757470757450776D0E50574D5F66696C7465725F7265670E626C64635F6F757470757450776D1770686173655F706572696F645F66696C7465725F7265670B626C64635F656E61626C650D626C646349696E70757450776D0D626C64635F696E70757450776D14626C64635F6F757470757446696C74657250776D13626C64635F696E70757446696C74657250776D0A66696C7465725F7265670C7370656564436F756E7465720C5049445F504152414D5F4B500B74656D706572617475726512734D6173746572536C6176655265636F72641B55706461746555534152544D6173746572536C617665496E7075741A436865636B55534152544D6173746572536C617665496E7075741D7355534152544D6173746572536C6176655265636F72644275666665720000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018024E10000000000001100000000000000000000000000000000010000000100000001800A810000000000001200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000FFFF01001500434D4643546F6F6C4261724D656E75427574746F6E2280000002000100150000002153746172742F53746F70202644656275672053657373696F6E094374726C2B46350000000000000000000000000100000001000000000000000000000001000000020021802280000000000000150000002153746172742F53746F70202644656275672053657373696F6E094374726C2B4635000000000000000000000000010000000100000000000000000000000100000000002180E0010000000000007500000021456E65726779204D6561737572656D656E742026776974686F75742044656275670000000000000000000000000100000001000000000000000000000001000000000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C488000000000400160000000000000000000000000000000001000000010000000180C988000000000400180000000000000000000000000000000001000000010000000180C788000000000000190000000000000000000000000000000001000000010000002180C8880000000000001700000027264B696C6C20416C6C20427265616B706F696E747320696E2043757272656E7420546172676574000000000000000000000000010000000100000000000000000000000100000003002180C8880000000000001700000027264B696C6C20416C6C20427265616B706F696E747320696E2043757272656E7420546172676574000000000000000000000000010000000100000000000000000000000100000000002180E50100000000000078000000264B696C6C20416C6C20427265616B706F696E747320696E204163746976652050726F6A656374000000000000000000000000010000000100000000000000000000000100000000002180E601000000000000790000002F4B696C6C20416C6C20427265616B706F696E747320696E204D756C74692D50726F6A65637420576F726B73706163650000000000000000000000000100000001000000000000000000000001000000000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000021804C010000020001001A0000000F2650726F6A6563742057696E646F77000000000000000000000000010000000100000000000000000000000100000008002180DD880000000000001A0000000750726F6A656374000000000000000000000000010000000100000000000000000000000100000000002180DC8B0000000000003A00000005426F6F6B73000000000000000000000000010000000100000000000000000000000100000000002180E18B0000000000003B0000000946756E6374696F6E73000000000000000000000000010000000100000000000000000000000100000000002180E28B000000000000400000000954656D706C6174657300000000000000000000000001000000010000000000000000000000010000000000218018890000000000003D0000000E536F757263652042726F777365720000000000000000000000000100000001000000000000000000000001000000000021800000000000000400FFFFFFFF00000000000000000001000000000000000100000000000000000000000100000000002180D988000000000000390000000C4275696C64204F7574707574000000000000000000000000010000000100000000000000000000000100000000002180E38B000000000000410000000B46696E64204F75747075740000000000000000000000000100000001000000000000000000000001000000000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FB7F0000000000001B000000000000000000000000000000000100000001000000000000000446696C65C6030000 + + + 1423 + 2800FFFF01001100434D4643546F6F6C426172427574746F6E00E1000000000000FFFFFFFF000100000000000000010000000000000001000000018001E1000000000000FFFFFFFF000100000000000000010000000000000001000000018003E1000000000000FFFFFFFF0001000000000000000100000000000000010000000180CD7F000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF000000000000000000010000000000000001000000018023E1000000000000FFFFFFFF000100000000000000010000000000000001000000018022E1000000000000FFFFFFFF000100000000000000010000000000000001000000018025E1000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001802BE1000000000000FFFFFFFF00010000000000000001000000000000000100000001802CE1000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001807A8A000000000000FFFFFFFF00010000000000000001000000000000000100000001807B8A000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180D3B0000000000000FFFFFFFF000100000000000000010000000000000001000000018015B1000000000000FFFFFFFF0001000000000000000100000000000000010000000180F4B0000000000000FFFFFFFF000100000000000000010000000000000001000000018036B1000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180FF88000000000000FFFFFFFF0001000000000000000100000000000000010000000180FE88000000000000FFFFFFFF00010000000000000001000000000000000100000001800B81000000000000FFFFFFFF00010000000000000001000000000000000100000001800C81000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180F088000000000000FFFFFFFF0001000000000000000100000000000000010000000180EE7F000000000000FFFFFFFF000100000000000000010000000000000001000000018024E1000000000000FFFFFFFF00010000000000000001000000000000000100000001800A81000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001802280000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180C488000000000000FFFFFFFF0001000000000000000100000000000000010000000180C988000000000000FFFFFFFF0001000000000000000100000000000000010000000180C788000000000000FFFFFFFF0001000000000000000100000000000000010000000180C888000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180DD88000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180FB7F000000000000FFFFFFFF000100000000000000010000000000000001000000 + + + 1423 + 2800FFFF01001100434D4643546F6F6C426172427574746F6E00E100000000000000000000000000000000000000000000000100000001000000018001E100000000000001000000000000000000000000000000000100000001000000018003E1000000000000020000000000000000000000000000000001000000010000000180CD7F0000000000000300000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018023E100000000000004000000000000000000000000000000000100000001000000018022E100000000000005000000000000000000000000000000000100000001000000018025E10000000000000600000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001802BE10000000000000700000000000000000000000000000000010000000100000001802CE10000000000000800000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001807A8A0000000000000900000000000000000000000000000000010000000100000001807B8A0000000000000A00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180D3B00000000000000B000000000000000000000000000000000100000001000000018015B10000000000000C0000000000000000000000000000000001000000010000000180F4B00000000000000D000000000000000000000000000000000100000001000000018036B10000000000000E00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FF880000000000000F0000000000000000000000000000000001000000010000000180FE880000000000001000000000000000000000000000000000010000000100000001800B810000000000001100000000000000000000000000000000010000000100000001800C810000000000001200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180F088000000000000130000000000000000000000000000000001000000010000000180EE7F00000000000014000000000000000000000000000000000100000001000000018024E10000000000001500000000000000000000000000000000010000000100000001800A810000000000001600000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018022800000000000001700000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C488000000000000180000000000000000000000000000000001000000010000000180C988000000000000190000000000000000000000000000000001000000010000000180C7880000000000001A0000000000000000000000000000000001000000010000000180C8880000000000001B00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180DD880000000000001C00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FB7F0000000000001D000000000000000000000000000000000100000001000000 + + + + 59399 + Build + + 955 + 00200000000000001000FFFF01001100434D4643546F6F6C426172427574746F6ECF7F0000000000001C0000000000000000000000000000000001000000010000000180D07F0000000000001D000000000000000000000000000000000100000001000000018030800000000000001E000000000000000000000000000000000100000001000000FFFF01001500434D4643546F6F6C4261724D656E75427574746F6EC7040000000000006A0000000C4261746368204275696C2664000000000000000000000000010000000100000000000000000000000100000004000580C7040000000000006A0000000C4261746368204275696C266400000000000000000000000001000000010000000000000000000000010000000000058046070000000000006B0000000D42617463682052656275696C640000000000000000000000000100000001000000000000000000000001000000000005804707000000000000FFFFFFFF0B426174636820436C65616E0100000000000000010000000000000001000000000000000000000001000000000005809E8A0000000000001F0000000F4261746326682053657475702E2E2E000000000000000000000000010000000100000000000000000000000100000000000180D17F0000000000002000000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001804C8A0000000000002100000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000FFFF01001900434D4643546F6F6C426172436F6D626F426F78427574746F6EBA00000000000000000000000000000000000000000000000001000000010000009600000003002050FFFFFFFF00960000000000000000000180EB880000000000002200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C07F000000000000230000000000000000000000000000000001000000010000000180B08A000000000000240000000000000000000000000000000001000000010000000180A8010000000000004E00000000000000000000000000000000010000000100000001807202000000000000530000000000000000000000000000000001000000010000000180BE010000000000005000000000000000000000000000000000010000000100000000000000054275696C64DC010000 + + + 583 + 1000FFFF01001100434D4643546F6F6C426172427574746F6ECF7F000000000000FFFFFFFF0001000000000000000100000000000000010000000180D07F000000000000FFFFFFFF00010000000000000001000000000000000100000001803080000000000000FFFFFFFF00010000000000000001000000000000000100000001809E8A000000000000FFFFFFFF0001000000000000000100000000000000010000000180D17F000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001804C8A000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001806680000000000000FFFFFFFF0001000000000000000100000000000000010000000180EB88000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180C07F000000000000FFFFFFFF0001000000000000000100000000000000010000000180B08A000000000000FFFFFFFF0001000000000000000100000000000000010000000180A801000000000000FFFFFFFF00010000000000000001000000000000000100000001807202000000000000FFFFFFFF0001000000000000000100000000000000010000000180BE01000000000000FFFFFFFF000100000000000000010000000000000001000000 + + + 583 + 1000FFFF01001100434D4643546F6F6C426172427574746F6ECF7F000000000000000000000000000000000000000000000001000000010000000180D07F00000000000001000000000000000000000000000000000100000001000000018030800000000000000200000000000000000000000000000000010000000100000001809E8A000000000000030000000000000000000000000000000001000000010000000180D17F0000000000000400000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001804C8A0000000000000500000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001806680000000000000060000000000000000000000000000000001000000010000000180EB880000000000000700000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C07F000000000000080000000000000000000000000000000001000000010000000180B08A000000000000090000000000000000000000000000000001000000010000000180A8010000000000000A000000000000000000000000000000000100000001000000018072020000000000000B0000000000000000000000000000000001000000010000000180BE010000000000000C000000000000000000000000000000000100000001000000 + + + + 59400 + Debug + + 2362 + 00200000010000001900FFFF01001100434D4643546F6F6C426172427574746F6ECC880000000000002500000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018017800000000000002600000000000000000000000000000000010000000100000001801D800000000004002700000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001801A800000000000002800000000000000000000000000000000010000000100000001801B80000000000000290000000000000000000000000000000001000000010000000180E57F0000000000002A00000000000000000000000000000000010000000100000001801C800000000004002B00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018000890000000000002C00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180E48B0000020001002D0000000000000000000000000000000001000000010000000180F07F0000020001002E0000000000000000000000000000000001000000010000000180E8880000020000003700000000000000000000000000000000010000000100000001803B010000020001002F0000000000000000000000000000000001000000010000000180BB8A00000200010030000000000000000000000000000000000100000001000000FFFF01001500434D4643546F6F6C4261724D656E75427574746F6E0E01000002000000310000000D57617463682057696E646F7773000000000000000000000000010000000100000000000000000000000100000003001380D88B00000000000031000000085761746368202631000000000000000000000000010000000100000000000000000000000100000000001380D98B00000000000031000000085761746368202632000000000000000000000000010000000100000000000000000000000100000000001380CE01000000000000FFFFFFFF0C576174636820416E63686F720100000000000000010000000000000001000000000000000000000001000000000013800F0100000200010032000000094D656D6F7279202631000000000000000000000000010000000100000000000000000000000100000004001380D28B00000000000032000000094D656D6F7279202631000000000000000000000000010000000100000000000000000000000100000000001380D38B00000000000032000000094D656D6F7279202632000000000000000000000000010000000100000000000000000000000100000000001380D48B00000000000032000000094D656D6F7279202633000000000000000000000000010000000100000000000000000000000100000000001380D58B00000000000032000000094D656D6F72792026340000000000000000000000000100000001000000000000000000000001000000000013801001000002000000330000000855415254202326310000000000000000000000000100000001000000000000000000000001000000040013809307000000000000330000000855415254202326310000000000000000000000000100000001000000000000000000000001000000000013809407000000000000330000000855415254202326320000000000000000000000000100000001000000000000000000000001000000000013809507000000000000330000000855415254202326330000000000000000000000000100000001000000000000000000000001000000000013809607000000000000330000001626446562756720287072696E746629205669657765720000000000000000000000000100000001000000000000000000000001000000000013803C010000000000007200000010416E616C797369732057696E646F7773000000000000000000000000010000000100000000000000000000000100000004001380658A000000000000340000000F264C6F67696320416E616C797A6572000000000000000000000000010000000100000000000000000000000100000000001380DC7F0000000000003E0000001526506572666F726D616E636520416E616C797A6572000000000000000000000000010000000100000000000000000000000100000000001380E788000000000000380000000E26436F646520436F766572616765000000000000000000000000010000000100000000000000000000000100000000001380CD01000000000000FFFFFFFF0F416E616C7973697320416E63686F7201000000000000000100000000000000010000000000000000000000010000000000138053010000000000003F0000000D54726163652057696E646F77730000000000000000000000000100000001000000000000000000000001000000010013805401000000000000FFFFFFFF115472616365204D656E7520416E63686F720100000000000000010000000000000001000000000000000000000001000000000013802901000000000000350000001553797374656D205669657765722057696E646F77730000000000000000000000000100000001000000000000000000000001000000010013804B01000000000000FFFFFFFF1453797374656D2056696577657220416E63686F720100000000000000010000000000000001000000000000000000000001000000000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000013800189000002000000360000000F26546F6F6C626F782057696E646F7700000000000000000000000001000000010000000000000000000000010000000300138044C5000000000000FFFFFFFF0E5570646174652057696E646F77730100000000000000010000000000000001000000000000000000000001000000000013800000000000000400FFFFFFFF000000000000000000010000000000000001000000000000000000000001000000000013805B01000000000000FFFFFFFF12546F6F6C626F78204D656E75416E63686F72010000000000000001000000000000000100000000000000000000000100000000000000000005446562756764020000 + + + 898 + 1900FFFF01001100434D4643546F6F6C426172427574746F6ECC88000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001801780000000000000FFFFFFFF00010000000000000001000000000000000100000001801D80000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001801A80000000000000FFFFFFFF00010000000000000001000000000000000100000001801B80000000000000FFFFFFFF0001000000000000000100000000000000010000000180E57F000000000000FFFFFFFF00010000000000000001000000000000000100000001801C80000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001800089000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180E48B000000000000FFFFFFFF0001000000000000000100000000000000010000000180F07F000000000000FFFFFFFF0001000000000000000100000000000000010000000180E888000000000000FFFFFFFF00010000000000000001000000000000000100000001803B01000000000000FFFFFFFF0001000000000000000100000000000000010000000180BB8A000000000000FFFFFFFF0001000000000000000100000000000000010000000180D88B000000000000FFFFFFFF0001000000000000000100000000000000010000000180D28B000000000000FFFFFFFF00010000000000000001000000000000000100000001809307000000000000FFFFFFFF0001000000000000000100000000000000010000000180658A000000000000FFFFFFFF0001000000000000000100000000000000010000000180C18A000000000000FFFFFFFF0001000000000000000100000000000000010000000180EE8B000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001800189000000000000FFFFFFFF000100000000000000010000000000000001000000 + + + 898 + 1900FFFF01001100434D4643546F6F6C426172427574746F6ECC880000000000000000000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018017800000000000000100000000000000000000000000000000010000000100000001801D800000000000000200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001801A800000000000000300000000000000000000000000000000010000000100000001801B80000000000000040000000000000000000000000000000001000000010000000180E57F0000000000000500000000000000000000000000000000010000000100000001801C800000000000000600000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018000890000000000000700000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180E48B000000000000080000000000000000000000000000000001000000010000000180F07F000000000000090000000000000000000000000000000001000000010000000180E8880000000000000A00000000000000000000000000000000010000000100000001803B010000000000000B0000000000000000000000000000000001000000010000000180BB8A0000000000000C0000000000000000000000000000000001000000010000000180D88B0000000000000D0000000000000000000000000000000001000000010000000180D28B0000000000000E000000000000000000000000000000000100000001000000018093070000000000000F0000000000000000000000000000000001000000010000000180658A000000000000100000000000000000000000000000000001000000010000000180C18A000000000000110000000000000000000000000000000001000000010000000180EE8B0000000000001200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180018900000000000013000000000000000000000000000000000100000001000000 + + + + 0 + 1920 + 1080 + + + + + + 1 + 0 + + 100 + 8 + + RTE\Device\GD32F130C8\startup_gd32f1x0.s + 0 + 135 + 149 + 1 + + 0 + + + .\Src\main.c + 0 + 1 + 1 + 1 + + 0 + + + .\Src\commsHUGS.c + 0 + 294 + 331 + 1 + + 0 + + + .\Src\bldc.c + 40 + 421 + 426 + 1 + + 0 + + + .\Inc\bldc.h + 0 + 41 + 72 + 1 + + 0 + + + .\Inc\config.h + 0 + 1 + 1 + 1 + + 0 + + + .\Inc\setup.h + 0 + 1 + 1 + 1 + + 0 + + + .\Inc\defines.h + 0 + 1 + 1 + 1 + + 0 + + + D:\Users\Phil\GitHub\HUGS\README.md + 0 + 1 + 10 + 1 + + 0 + + + + +
diff --git a/HUGS/HUGS.uvoptx b/HUGS/HUGS.uvoptx new file mode 100644 index 00000000..7bf474a9 --- /dev/null +++ b/HUGS/HUGS.uvoptx @@ -0,0 +1,441 @@ + + + + 1.0 + +
### uVision Project, (C) Keil Software
+ + + *.c + *.s*; *.src; *.a* + *.obj; *.o + *.lib + *.txt; *.h; *.inc; *.md + *.plm + *.cpp + 0 + + + + 0 + 0 + + + + Target 1 + 0x4 + ARM-ADS + + 12000000 + + 1 + 1 + 0 + 1 + 0 + + + 1 + 65535 + 0 + 0 + 0 + + + 79 + 66 + 8 + .\Listings\ + + + 1 + 1 + 1 + 0 + 1 + 1 + 0 + 1 + 0 + 0 + 0 + 0 + + + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + + + 1 + 0 + 1 + + 255 + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 1 + 1 + 1 + 0 + 0 + 1 + 0 + 0 + 6 + + + + + + + + + + + STLink\ST-LINKIII-KEIL_SWO.dll + + + + 0 + ARMRTXEVENTFLAGS + -L70 -Z18 -C0 -M0 -T1 + + + 0 + DLGTARM + (1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0) + + + 0 + ARMDBGFLAGS + + + + 0 + ST-LINKIII-KEIL_SWO + -U-O206 -O206 -SF4000 -C0 -A0 -I0 -HNlocalhost -HP7184 -P1 -N00("ARM CoreSight SW-DP") -D00(1BA01477) -L00(0) -TO131090 -TC10000000 -TT10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO7 -FD20000000 -FC1000 -FN1 -FF0GD32F1x0_64.FLM -FS08000000 -FL010000 -FP0($$Device:GD32F130C8$Flash\GD32F1x0_64.FLM) + + + 0 + DLGUARM + (105=-1,-1,-1,-1,0) + + + 0 + UL2CM3 + UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0GD32F1x0_64 -FS08000000 -FL010000 -FP0($$Device:GD32F130C8$Flash\GD32F1x0_64.FLM)) + + + + + + 1 + 0 + \\Hoverboard\Src/bldc.c\realSpeed + 0 + + + + 0 + + + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + + + + 0 + 0 + 0 + + + + + + + + + + + + + Src + 1 + 0 + 0 + 0 + + 1 + 1 + 1 + 0 + 0 + 0 + .\Src\main.c + main.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + .\Src\bldc.c + bldc.c + 0 + 0 + + + 1 + 3 + 1 + 0 + 0 + 0 + .\Src\setup.c + setup.c + 0 + 0 + + + 1 + 4 + 1 + 0 + 0 + 0 + .\Src\it.c + it.c + 0 + 0 + + + 1 + 5 + 1 + 0 + 0 + 0 + .\Src\comms.c + comms.c + 0 + 0 + + + 1 + 6 + 1 + 0 + 0 + 0 + .\Src\commsSteering.c + commsSteering.c + 0 + 0 + + + 1 + 7 + 1 + 0 + 0 + 0 + .\Src\led.c + led.c + 0 + 0 + + + 1 + 8 + 1 + 0 + 0 + 0 + .\Src\commsHUGS.c + commsHUGS.c + 0 + 0 + + + + + Inc + 1 + 0 + 0 + 0 + + 2 + 9 + 5 + 0 + 0 + 0 + .\Inc\defines.h + defines.h + 0 + 0 + + + 2 + 10 + 5 + 0 + 0 + 0 + .\Inc\config.h + config.h + 0 + 0 + + + 2 + 11 + 5 + 0 + 0 + 0 + .\Inc\bldc.h + bldc.h + 0 + 0 + + + 2 + 12 + 5 + 0 + 0 + 0 + .\Inc\setup.h + setup.h + 0 + 0 + + + 2 + 13 + 5 + 0 + 0 + 0 + .\Inc\it.h + it.h + 0 + 0 + + + 2 + 14 + 5 + 0 + 0 + 0 + .\Inc\comms.h + comms.h + 0 + 0 + + + 2 + 15 + 5 + 0 + 0 + 0 + .\Inc\commsSteering.h + commsSteering.h + 0 + 0 + + + 2 + 16 + 5 + 0 + 0 + 0 + .\Inc\led.h + led.h + 0 + 0 + + + 2 + 17 + 5 + 0 + 0 + 0 + .\Inc\commsHUGS.h + commsHUGS.h + 0 + 0 + + + + + ::CMSIS + 0 + 0 + 0 + 1 + + + + ::Device + 1 + 0 + 0 + 1 + + +
diff --git a/HoverBoardGigaDevice/Hoverboard.uvprojx b/HUGS/HUGS.uvprojx similarity index 91% rename from HoverBoardGigaDevice/Hoverboard.uvprojx rename to HUGS/HUGS.uvprojx index 13bf90df..68fac816 100644 --- a/HoverBoardGigaDevice/Hoverboard.uvprojx +++ b/HUGS/HUGS.uvprojx @@ -10,7 +10,7 @@ Target 1 0x4 ARM-ADS - 5060750::V5.06 update 6 (build 750)::ARMCC + 5060960::V5.06 update 7 (build 960)::.\ARMCC 0 @@ -49,10 +49,10 @@ 1 .\Objects\ - Hoverboard + HUGS 1 0 - 0 + 1 1 1 .\Listings\ @@ -184,6 +184,8 @@ 0 0 0 + 0 + 0 0 0 8 @@ -350,7 +352,7 @@ 0 0 0 - 0 + 4 @@ -359,7 +361,7 @@ - 0 + 1 0 0 0 @@ -380,6 +382,75 @@ Src + + + 0 + 0 + 0 + 0 + 0 + 2 + 2 + 2 + 2 + 2 + 11 + + + 1 + + + + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + 2 + 2 + 2 + 2 + 2 + 0 + 0 + 2 + 2 + 2 + 2 + 2 + + + + + C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include;C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.2.0\Device\Firmware\Peripherals\inc;.\Inc;.\RTE\target_1 + + + + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 0 + + + + + + + + + main.c @@ -406,25 +477,20 @@ 1 .\Src\comms.c - - commsBluetooth.c - 1 - .\Src\commsBluetooth.c - commsSteering.c 1 .\Src\commsSteering.c - commsMasterSlave.c + led.c 1 - .\Src\commsMasterSlave.c + .\Src\led.c - led.c + commsHUGS.c 1 - .\Src\led.c + .\Src\commsHUGS.c @@ -461,25 +527,20 @@ 5 .\Inc\comms.h - - commsBluetooth.h - 5 - .\Inc\commsBluetooth.h - commsSteering.h 5 .\Inc\commsSteering.h - commsMasterSlave.h + led.h 5 - .\Inc\commsMasterSlave.h + .\Inc\led.h - led.h + commsHUGS.h 5 - .\Inc\led.h + .\Inc\commsHUGS.h diff --git a/HoverBoardGigaDevice/Hoverboard.uvguix.Florian b/HUGS/Hoverboard.uvguix.Florian similarity index 100% rename from HoverBoardGigaDevice/Hoverboard.uvguix.Florian rename to HUGS/Hoverboard.uvguix.Florian diff --git a/HoverBoardGigaDevice/Hoverboard.uvoptx b/HUGS/Hoverboard.uvoptx similarity index 100% rename from HoverBoardGigaDevice/Hoverboard.uvoptx rename to HUGS/Hoverboard.uvoptx diff --git a/HoverBoardGigaDevice/Inc/commsMasterSlave.h b/HUGS/Inc/bldc.h similarity index 51% rename from HoverBoardGigaDevice/Inc/commsMasterSlave.h rename to HUGS/Inc/bldc.h index acdfbd0e..21291dba 100644 --- a/HoverBoardGigaDevice/Inc/commsMasterSlave.h +++ b/HUGS/Inc/bldc.h @@ -1,110 +1,101 @@ -/* -* This file is part of the hoverboard-firmware-hack-V2 project. The -* firmware is used to hack the generation 2 board of the hoverboard. -* These new hoverboards have no mainboard anymore. They consist of -* two Sensorboards which have their own BLDC-Bridge per Motor and an -* ARM Cortex-M3 processor GD32F130C8. -* -* Copyright (C) 2018 Florian Staeblein -* Copyright (C) 2018 Jakob Broemauer -* Copyright (C) 2018 Kai Liebich -* Copyright (C) 2018 Christoph Lehnert -* -* The program is based on the hoverboard project by Niklas Fauth. The -* structure was tried to be as similar as possible, so that everyone -* could find a better way through the code. -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -*/ - -#ifndef COMMSMASTERSLAVE_H -#define COMMSMASTERSLAVE_H - -#include "gd32f1x0.h" -#include "../Inc/config.h" - -//---------------------------------------------------------------------------- -// Update USART master slave input -//---------------------------------------------------------------------------- -void UpdateUSARTMasterSlaveInput(void); - -#ifdef MASTER -//---------------------------------------------------------------------------- -// Send slave frame via USART -//---------------------------------------------------------------------------- -void SendSlave(int16_t pwmSlave, FlagStatus enable, FlagStatus shutoff, FlagStatus chargeState, uint8_t identifier, int16_t value); -#endif -#ifdef SLAVE -//---------------------------------------------------------------------------- -// Send master frame via USART -//---------------------------------------------------------------------------- -void SendMaster(FlagStatus upperLEDMaster, FlagStatus lowerLEDMaster, FlagStatus mosfetOutMaster, FlagStatus beepsBackwards); - -//---------------------------------------------------------------------------- -// Returns current value sent by master -//---------------------------------------------------------------------------- -int16_t GetCurrentDCMaster(void); - -//---------------------------------------------------------------------------- -// Returns battery value sent by master -//---------------------------------------------------------------------------- -int16_t GetBatteryMaster(void); - -//---------------------------------------------------------------------------- -// Returns realspeed value sent by master -//---------------------------------------------------------------------------- -int16_t GetRealSpeedMaster(void); - -//---------------------------------------------------------------------------- -// Sets upper LED value which will be send to master -//---------------------------------------------------------------------------- -void SetUpperLEDMaster(FlagStatus value); - -//---------------------------------------------------------------------------- -// Returns upper LED value sent by master -//---------------------------------------------------------------------------- -FlagStatus GetUpperLEDMaster(void); - -//---------------------------------------------------------------------------- -// Sets lower LED value which will be send to master -//---------------------------------------------------------------------------- -void SetLowerLEDMaster(FlagStatus value); - -//---------------------------------------------------------------------------- -// Returns lower LED value sent by master -//---------------------------------------------------------------------------- -FlagStatus GetLowerLEDMaster(void); - -//---------------------------------------------------------------------------- -// Sets mosfetOut value which will be send to master -//---------------------------------------------------------------------------- -void SetMosfetOutMaster(FlagStatus value); - -//---------------------------------------------------------------------------- -// Returns MosfetOut value sent by master -//---------------------------------------------------------------------------- -FlagStatus GetMosfetOutMaster(void); - -//---------------------------------------------------------------------------- -// Sets beepsBackwards value which will be send to master -//---------------------------------------------------------------------------- -void SetBeepsBackwardsMaster(FlagStatus value); - -//---------------------------------------------------------------------------- -// Returns beepsBackwardsMaster value sent by master -//---------------------------------------------------------------------------- -FlagStatus GetBeepsBackwardsMaster(void); -#endif - -#endif +/* +* This file is part of the Hoverboard Utility Gateway System (HUGS) project. +* +* The HUGS project goal is to enable Hoverboards, or Hoverboard drive components +* to be re-purposed to provide low-cost mobility to other systems, such +* as assistive devices for the disabled, general purpose robots or other +* labor saving devices. +* +* Copyright (C) 2020 Phil Malone +* Copyright (C) 2018 Florian Staeblein +* Copyright (C) 2018 Jakob Broemauer +* Copyright (C) 2018 Kai Liebich +* Copyright (C) 2018 Christoph Lehnert +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +*/ + +#ifndef BLDC_H +#define BLDC_H + +#include "gd32f1x0.h" +#include "../Inc/config.h" + +#define SPEED_MODE_PF 0 +#define SPEED_MODE_STEP 1 +#define SPEED_MODE_DUAL 2 +#define DEFAULT_SPEED_MODE SPEED_MODE_PF +#define DEFAULT_MAX_STEP_SPEED 200 + +//---------------------------------------------------------------------------- +// Set motor enable +//---------------------------------------------------------------------------- +void SetEnable(FlagStatus setEnable); + +//---------------------------------------------------------------------------- +// Set speed -100 to 100 +//---------------------------------------------------------------------------- +void SetSpeed(int16_t setPwm); + +//---------------------------------------------------------------------------- +// Set power -100 to 100 +//---------------------------------------------------------------------------- +void SetPower(int16_t setPwm); + +//---------------------------------------------------------------------------- +// Set pwm -1000 to 1000 +//---------------------------------------------------------------------------- +void SetPWM(int16_t setPwm); + +//---------------------------------------------------------------------------- +// Get pwm -1000 to 1000 +//---------------------------------------------------------------------------- +int16_t GetPWM(void); + +//---------------------------------------------------------------------------- +// Get pwm -1000 to 1000 +//---------------------------------------------------------------------------- +void CalculateSpeed(void); +int16_t GetSpeed(void); + +//---------------------------------------------------------------------------- +// Get position in mm +//---------------------------------------------------------------------------- +int32_t GetPosition(void); + +//---------------------------------------------------------------------------- +// Calculation-Routine for BLDC => calculates with 32kHz +//---------------------------------------------------------------------------- +void CalculateBLDC(void); + +//---------------------------------------------------------------------------- +// Calculate output power based on closed loop control +//---------------------------------------------------------------------------- +int16_t runPID(void) ; + +//---------------------------------------------------------------------------- +// Determine Absolute values +//---------------------------------------------------------------------------- +int16_t abs16(int16_t value) ; +int32_t abs32(int32_t value) ; + +//---------------------------------------------------------------------------- +// Determine the current commutation position (0-5) +//---------------------------------------------------------------------------- +uint8_t hallToPos(void) ; + +//---------------------------------------------------------------------------- +// Set the correct y b g phase angles based on pos and speedDir +//---------------------------------------------------------------------------- +void setPhaseAngle(int16_t Yangle); +int16_t getTransitionAngle(void); + +#endif diff --git a/HoverBoardGigaDevice/Inc/comms.h b/HUGS/Inc/comms.h similarity index 63% rename from HoverBoardGigaDevice/Inc/comms.h rename to HUGS/Inc/comms.h index bbc157b7..9bbca48b 100644 --- a/HoverBoardGigaDevice/Inc/comms.h +++ b/HUGS/Inc/comms.h @@ -1,47 +1,42 @@ -/* -* This file is part of the hoverboard-firmware-hack-V2 project. The -* firmware is used to hack the generation 2 board of the hoverboard. -* These new hoverboards have no mainboard anymore. They consist of -* two Sensorboards which have their own BLDC-Bridge per Motor and an -* ARM Cortex-M3 processor GD32F130C8. -* -* Copyright (C) 2018 Florian Staeblein -* Copyright (C) 2018 Jakob Broemauer -* Copyright (C) 2018 Kai Liebich -* Copyright (C) 2018 Christoph Lehnert -* -* The program is based on the hoverboard project by Niklas Fauth. The -* structure was tried to be as similar as possible, so that everyone -* could find a better way through the code. -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -*/ - -#ifndef COMMS_H -#define COMMS_H - -#include "gd32f1x0.h" -#include "../Inc/config.h" - -//---------------------------------------------------------------------------- -// Send buffer via USART -//---------------------------------------------------------------------------- -void SendBuffer(uint32_t usart_periph, uint8_t buffer[], uint8_t length); - -//---------------------------------------------------------------------------- -// Calculate CRC -//---------------------------------------------------------------------------- -uint16_t CalcCRC(uint8_t *ptr, int count); - -#endif +/* +* This file is part of the Hoverboard Utility Gateway System (HUGS) project. +* +* The HUGS project goal is to enable Hoverboards, or Hoverboard drive components +* to be re-purposed to provide low-cost mobility to other systems, such +* as assistive devices for the disabled, general purpose robots or other +* labor saving devices. +* +* Copyright (C) 2020 Phil Malone +* Copyright (C) 2018 Florian Staeblein +* Copyright (C) 2018 Jakob Broemauer +* Copyright (C) 2018 Kai Liebich +* Copyright (C) 2018 Christoph Lehnert +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +*/ + +#ifndef COMMS_H +#define COMMS_H + +#include "gd32f1x0.h" +#include "../Inc/config.h" + +//---------------------------------------------------------------------------- +// Send buffer via USART +//---------------------------------------------------------------------------- +void SendBuffer(uint32_t usart_periph, uint8_t buffer[], uint8_t length); + +//---------------------------------------------------------------------------- +// Calculate CRC +//---------------------------------------------------------------------------- +uint16_t CalcCRC(uint8_t *ptr, int count); + +#endif diff --git a/PPMDeviceArduino_V1.0/PPMDevice/RCReceiver.h b/HUGS/Inc/commsHUGS.h similarity index 56% rename from PPMDeviceArduino_V1.0/PPMDevice/RCReceiver.h rename to HUGS/Inc/commsHUGS.h index 6724d9b8..a5892b95 100644 --- a/PPMDeviceArduino_V1.0/PPMDevice/RCReceiver.h +++ b/HUGS/Inc/commsHUGS.h @@ -1,19 +1,17 @@ /* -* This file is part of the hoverboard-firmware-hack-V2 project. The -* firmware is used to hack the generation 2 board of the hoverboard. -* These new hoverboards have no mainboard anymore. They consist of -* two Sensorboards which have their own BLDC-Bridge per Motor and an -* ARM Cortex-M3 processor GD32F130C8. +* This file is part of the Hoverboard Utility Gateway System (HUGS) project. * +* The HUGS project goal is to enable Hoverboards, or Hoverboard drive components +* to be re-purposed to provide low-cost mobility to other systems, such +* as assistive devices for the disabled, general purpose robots or other +* labor saving devices. +* +* Copyright (C) 2020 Phil Malone * Copyright (C) 2018 Florian Staeblein * Copyright (C) 2018 Jakob Broemauer * Copyright (C) 2018 Kai Liebich * Copyright (C) 2018 Christoph Lehnert * -* The program is based on the hoverboard project by Niklas Fauth. The -* structure was tried to be as similar as possible, so that everyone -* could find a better way through the code. -* * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or @@ -23,36 +21,38 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . */ -#ifndef RCRECEIVER_H -#define RCRECEIVER_H +#ifndef COMMSHUGS_H +#define COMMSHUGS_H + +#include "gd32f1x0.h" +#include "../Inc/config.h" + +#define MAX_SPEED 5000 + +typedef enum {NOP = 0, RSP, RES, ENA, DIS, POW, SPE, ABS, REL, DOG, MOD, DSPE=0x86, XXX = 0xFF} CMD_ID; +typedef enum {NOR = 0, SMOT, SPOW, SSPE, SPOS, SVOL, SAMP, SDOG, SMOD, SFPI, STOP = 0xFF} RSP_ID; -#include -#include -#include "utils.h" //---------------------------------------------------------------------------- -// Defines +// Update USART master slave input //---------------------------------------------------------------------------- -#define SERVOS 3 -#define ZERO_US 1500 +void UpdateUSARTHUGSInput(void); //---------------------------------------------------------------------------- -// Initializes the RC receiver +// Send a command across to the other controller. //---------------------------------------------------------------------------- -void InitRCReceiver(void); +void SendHUGSCmd(CMD_ID SlaveCmd, int16_t value); //---------------------------------------------------------------------------- -// Starts the receiver +// Send reply frame via USART //---------------------------------------------------------------------------- -void RCReceiverStart(); +void SendHUGSReply(void); //---------------------------------------------------------------------------- -// Returns the current result value of specified pin +// Signal an ESTOP power down //---------------------------------------------------------------------------- -uint16_t GetRCValue(uint8_t pin); +void SetESTOP(void); + -#endif +#endif diff --git a/HoverBoardGigaDevice/Inc/commsSteering.h b/HUGS/Inc/commsSteering.h similarity index 62% rename from HoverBoardGigaDevice/Inc/commsSteering.h rename to HUGS/Inc/commsSteering.h index b868961a..8aba7a76 100644 --- a/HoverBoardGigaDevice/Inc/commsSteering.h +++ b/HUGS/Inc/commsSteering.h @@ -1,50 +1,47 @@ -/* -* This file is part of the hoverboard-firmware-hack-V2 project. The -* firmware is used to hack the generation 2 board of the hoverboard. -* These new hoverboards have no mainboard anymore. They consist of -* two Sensorboards which have their own BLDC-Bridge per Motor and an -* ARM Cortex-M3 processor GD32F130C8. -* -* Copyright (C) 2018 Florian Staeblein -* Copyright (C) 2018 Jakob Broemauer -* Copyright (C) 2018 Kai Liebich -* Copyright (C) 2018 Christoph Lehnert -* -* The program is based on the hoverboard project by Niklas Fauth. The -* structure was tried to be as similar as possible, so that everyone -* could find a better way through the code. -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -*/ - -#ifndef COMMSSTEERING_H -#define COMMSSTEERING_H - -#include "gd32f1x0.h" -#include "../Inc/config.h" - -// Only master communicates with steering device -#ifdef MASTER -//---------------------------------------------------------------------------- -// Update USART steer input -//---------------------------------------------------------------------------- -void UpdateUSARTSteerInput(void); - -//---------------------------------------------------------------------------- -// Send frame to steer device -//---------------------------------------------------------------------------- -void SendSteerDevice(void); -#endif - -#endif +/* +* This file is part of the Hoverboard Utility Gateway System (HUGS) project. +* +* The HUGS project goal is to enable Hoverboards, or Hoverboard drive components +* to be re-purposed to provide low-cost mobility to other systems, such +* as assistive devices for the disabled, general purpose robots or other +* labor saving devices. +* +* Copyright (C) 2020 Phil Malone +* Copyright (C) 2018 Florian Staeblein +* Copyright (C) 2018 Jakob Broemauer +* Copyright (C) 2018 Kai Liebich +* Copyright (C) 2018 Christoph Lehnert +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +*/ + +#ifndef COMMSSTEERING_H +#define COMMSSTEERING_H + +#include "gd32f1x0.h" +#include "../Inc/config.h" + +#define MM_PER_DEGREE 3.508 +#define DEGREE_PER_MM 0.2851 + +// Only master communicates with steering device +//---------------------------------------------------------------------------- +// Update USART steer input +//---------------------------------------------------------------------------- +void UpdateUSARTSteerInput(void); + + +//---------------------------------------------------------------------------- +// Send frame to steer device +//---------------------------------------------------------------------------- +int16_t max(int16_t a, int16_t b); + +#endif diff --git a/HoverBoardGigaDevice/Inc/config.h b/HUGS/Inc/config.h similarity index 53% rename from HoverBoardGigaDevice/Inc/config.h rename to HUGS/Inc/config.h index 07c23edd..0d227d97 100644 --- a/HoverBoardGigaDevice/Inc/config.h +++ b/HUGS/Inc/config.h @@ -1,78 +1,56 @@ -/* -* This file is part of the hoverboard-firmware-hack-V2 project. The -* firmware is used to hack the generation 2 board of the hoverboard. -* These new hoverboards have no mainboard anymore. They consist of -* two Sensorboards which have their own BLDC-Bridge per Motor and an -* ARM Cortex-M3 processor GD32F130C8. -* -* Copyright (C) 2018 Florian Staeblein -* Copyright (C) 2018 Jakob Broemauer -* Copyright (C) 2018 Kai Liebich -* Copyright (C) 2018 Christoph Lehnert -* -* The program is based on the hoverboard project by Niklas Fauth. The -* structure was tried to be as similar as possible, so that everyone -* could find a better way through the code. -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -*/ - -#ifndef CONFIG_H -#define CONFIG_H - -#include "gd32f1x0.h" - -// ################################################################################ - -#define MASTER // Select if firmware is for master or slave board -//#define SLAVE // Select if firmware is for master or slave board - -// ################################################################################ - -#define PWM_FREQ 16000 // PWM frequency in Hz -#define DEAD_TIME 60 // PWM deadtime (60 = 1s, measured by oscilloscope) - -#define DC_CUR_LIMIT 15 // Motor DC current limit in amps - -// ################################################################################ - -#define DELAY_IN_MAIN_LOOP 5 // Delay in ms - -#define TIMEOUT_MS 2000 // Time in milliseconds without steering commands before pwm emergency off - -#ifdef MASTER -#define INACTIVITY_TIMEOUT 8 // Minutes of not driving until poweroff (not very precise) - -// ################################################################################ - -#define BAT_LOW_LVL1 35.0 // Gently beeps, show green battery symbol above this Level. -#define BAT_LOW_LVL2 33.0 // Battery almost empty, show orange battery symbol above this Level. Charge now! -#define BAT_LOW_DEAD 31.0 // Undervoltage lockout, show red battery symbol above this Level. -// ONLY DEBUG-LEVEL!!! -//#define BAT_LOW_LVL1 29.0 -//#define BAT_LOW_LVL2 28.0 -//#define BAT_LOW_DEAD 27.0 - -// ################################################################################ -#endif - -// ###### ARMCHAIR ###### -#define FILTER_SHIFT 12 // Low-pass filter for pwm, rank k=12 - -#ifdef MASTER -#define SPEED_COEFFICIENT -1 -#define STEER_COEFFICIENT 1 -#endif - -#endif +/* +* This file is part of the hoverboard-firmware-hack-V2 project. The +* firmware is used to hack the generation 2 board of the hoverboard. +* These new hoverboards have no mainboard anymore. They consist of +* two Sensorboards which have their own BLDC-Bridge per Motor and an +* ARM Cortex-M3 processor GD32F130C8. +* +* Copyright (C) 2018 Florian Staeblein +* Copyright (C) 2018 Jakob Broemauer +* Copyright (C) 2018 Kai Liebich +* Copyright (C) 2018 Christoph Lehnert +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "gd32f1x0.h" + +// ################################################################################ + +#define PWM_FREQ 16000 // PWM frequency in Hz +#define DEAD_TIME 60 // PWM deadtime (60 = 1s, measured by oscilloscope) +#define DC_CUR_LIMIT_MA 15000 // Motor DC current limit in milli Amps + +// ################################################################################ + +#define DELAY_IN_MAIN_LOOP 50 // Delay in ms +#define INACTIVITY_TIMEOUT 10 // Minutes of not driving until poweroff + +#define INACTIVITY_COUNTER ((INACTIVITY_TIMEOUT * 60 * 1000) / (DELAY_IN_MAIN_LOOP)) +#define INACTIVITY_WARNING (INACTIVITY_COUNTER - (15000 / DELAY_IN_MAIN_LOOP)) + + +// ################################################################################ + +#define BAT_LOW_LVL1_MV 35000 // Gently beeps, show green battery symbol above this Level. +#define BAT_LOW_LVL2_MV 33000 // Battery almost empty, show orange battery symbol above this Level. Charge now! +#define BAT_LOW_DEAD_MV 31000 // Undervoltage lockout, show red battery symbol above this Level. + +// ################################################################################ + +// ###### ARMCHAIR ###### +#define PWM_FILTER_SHIFT 10 // Low-pass filter for pwm, rank k=12 +#define SPEED_FILTER_SHIFT 7 // Low-pass filter for phase period, rank k=10 + +#endif diff --git a/HoverBoardGigaDevice/Inc/defines.h b/HUGS/Inc/defines.h similarity index 73% rename from HoverBoardGigaDevice/Inc/defines.h rename to HUGS/Inc/defines.h index 5652f639..a010ce8e 100644 --- a/HoverBoardGigaDevice/Inc/defines.h +++ b/HUGS/Inc/defines.h @@ -1,149 +1,147 @@ -/* -* This file is part of the hoverboard-firmware-hack-V2 project. The -* firmware is used to hack the generation 2 board of the hoverboard. -* These new hoverboards have no mainboard anymore. They consist of -* two Sensorboards which have their own BLDC-Bridge per Motor and an -* ARM Cortex-M3 processor GD32F130C8. -* -* Copyright (C) 2018 Florian Staeblein -* Copyright (C) 2018 Jakob Broemauer -* Copyright (C) 2018 Kai Liebich -* Copyright (C) 2018 Christoph Lehnert -* -* The program is based on the hoverboard project by Niklas Fauth. The -* structure was tried to be as similar as possible, so that everyone -* could find a better way through the code. -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -*/ - -#ifndef DEFINES_H -#define DEFINES_H - -#include "gd32f1x0.h" -#include "../Inc/config.h" - -// LED defines -#define LED_GREEN GPIO_PIN_15 -#define LED_GREEN_PORT GPIOA -#define LED_ORANGE GPIO_PIN_12 -#define LED_ORANGE_PORT GPIOA -#define LED_RED GPIO_PIN_3 -#define LED_RED_PORT GPIOB - -#define UPPER_LED_PIN GPIO_PIN_1 -#define UPPER_LED_PORT GPIOA -#define LOWER_LED_PIN GPIO_PIN_0 -#define LOWER_LED_PORT GPIOA - -// Mosfet output -#define MOSFET_OUT_PIN GPIO_PIN_13 -#define MOSFET_OUT_PORT GPIOC - -// Brushless Control DC (BLDC) defines -// Channel G -#define RCU_TIMER_BLDC RCU_TIMER0 -#define TIMER_BLDC TIMER0 -#define TIMER_BLDC_CHANNEL_G TIMER_CH_2 -#define TIMER_BLDC_GH_PIN GPIO_PIN_10 -#define TIMER_BLDC_GH_PORT GPIOA -#define TIMER_BLDC_GL_PIN GPIO_PIN_15 -#define TIMER_BLDC_GL_PORT GPIOB -// Channel B -#define TIMER_BLDC_CHANNEL_B TIMER_CH_1 -#define TIMER_BLDC_BH_PIN GPIO_PIN_9 -#define TIMER_BLDC_BH_PORT GPIOA -#define TIMER_BLDC_BL_PIN GPIO_PIN_14 -#define TIMER_BLDC_BL_PORT GPIOB -// Channel Y -#define TIMER_BLDC_CHANNEL_Y TIMER_CH_0 -#define TIMER_BLDC_YH_PIN GPIO_PIN_8 -#define TIMER_BLDC_YH_PORT GPIOA -#define TIMER_BLDC_YL_PIN GPIO_PIN_13 -#define TIMER_BLDC_YL_PORT GPIOB - -// Timer BLDC short circuit emergency shutoff define -#define TIMER_BLDC_EMERGENCY_SHUTDOWN_PIN GPIO_PIN_12 -#define TIMER_BLDC_EMERGENCY_SHUTDOWN_PORT GPIOB - -// Hall sensor defines -#define HALL_A_PIN GPIO_PIN_11 -#define HALL_A_PORT GPIOB -#define HALL_B_PIN GPIO_PIN_1 -#define HALL_B_PORT GPIOF -#define HALL_C_PIN GPIO_PIN_14 -#define HALL_C_PORT GPIOC - -// Usart master slave defines -#define USART_MASTERSLAVE USART1 -#define USART_MASTERSLAVE_TX_PIN GPIO_PIN_2 -#define USART_MASTERSLAVE_TX_PORT GPIOA -#define USART_MASTERSLAVE_RX_PIN GPIO_PIN_3 -#define USART_MASTERSLAVE_RX_PORT GPIOA - -// ADC defines -#define VBATT_PIN GPIO_PIN_4 -#define VBATT_PORT GPIOA -#define VBATT_CHANNEL ADC_CHANNEL_4 -#define CURRENT_DC_PIN GPIO_PIN_6 -#define CURRENT_DC_PORT GPIOA -#define CURRENT_DC_CHANNEL ADC_CHANNEL_6 - -// Self hold defines -#define SELF_HOLD_PIN GPIO_PIN_2 -#define SELF_HOLD_PORT GPIOB - -// Button defines -#define BUTTON_PIN GPIO_PIN_15 -#define BUTTON_PORT GPIOC - -// Usart steer defines -#define USART_STEER_COM USART0 -#define USART_STEER_COM_TX_PIN GPIO_PIN_6 -#define USART_STEER_COM_TX_PORT GPIOB -#define USART_STEER_COM_RX_PIN GPIO_PIN_7 -#define USART_STEER_COM_RX_PORT GPIOB - -#ifdef MASTER -// Buzzer defins -#define BUZZER_PIN GPIO_PIN_10 -#define BUZZER_PORT GPIOB - -// Charge state defines -#define CHARGE_STATE_PIN GPIO_PIN_0 -#define CHARGE_STATE_PORT GPIOF -#endif - -// Debug pin defines -#define DEBUG_PIN GPIO_PIN_4 -#define DEBUG_PORT GPIOB - -// ADC value conversion defines -#define MOTOR_AMP_CONV_DC_AMP 0.201465201465 // 3,3V * 1/3 - 0,004Ohm * IL(ampere) = (ADC-Data/4095) *3,3V -#define ADC_BATTERY_VOLT 0.024169921875 // V_Batt to V_BattMeasure = factor 30: ( (ADC-Data/4095) *3,3V *30 ) - -// Useful math function defines -#define ABS(a) (((a) < 0.0) ? -(a) : (a)) -#define CLAMP(x, low, high) (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x))) -#define MAX(x, high) (((x) > (high)) ? (high) : (x)) -#define MAP(x, xMin, xMax, yMin, yMax) ((x - xMin) * (yMax - yMin) / (xMax - xMin) + yMin) - -// ADC buffer struct -typedef struct -{ - uint16_t v_batt; - uint16_t current_dc; -} adc_buf_t; - -#endif +/* +* This file is part of the Hoverboard Utility Gateway System (HUGS) project. +* +* The HUGS project goal is to enable Hoverboards, or Hoverboard drive components +* to be re-purposed to provide low-cost mobility to other systems, such +* as assistive devices for the disabled, general purpose robots or other +* labor saving devices. +* +* Copyright (C) 2020 Phil Malone +* Copyright (C) 2018 Florian Staeblein +* Copyright (C) 2018 Jakob Broemauer +* Copyright (C) 2018 Kai Liebich +* Copyright (C) 2018 Christoph Lehnert +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +*/ + +#ifndef DEFINES_H +#define DEFINES_H + +#include "gd32f1x0.h" +#include "../Inc/config.h" + +// LED defines +#define LED_GREEN GPIO_PIN_15 +#define LED_GREEN_PORT GPIOA +#define LED_ORANGE GPIO_PIN_12 +#define LED_ORANGE_PORT GPIOA +#define LED_RED GPIO_PIN_3 +#define LED_RED_PORT GPIOB + +#define UPPER_LED_PIN GPIO_PIN_1 +#define UPPER_LED_PORT GPIOA +#define LOWER_LED_PIN GPIO_PIN_0 +#define LOWER_LED_PORT GPIOA + +// Mosfet output +#define MOSFET_OUT_PIN GPIO_PIN_13 +#define MOSFET_OUT_PORT GPIOC + +// Brushless Control DC (BLDC) defines +// Channel G +#define RCU_TIMER_BLDC RCU_TIMER0 +#define TIMER_BLDC TIMER0 +#define TIMER_BLDC_CHANNEL_G TIMER_CH_2 +#define TIMER_BLDC_GH_PIN GPIO_PIN_10 +#define TIMER_BLDC_GH_PORT GPIOA +#define TIMER_BLDC_GL_PIN GPIO_PIN_15 +#define TIMER_BLDC_GL_PORT GPIOB +// Channel B +#define TIMER_BLDC_CHANNEL_B TIMER_CH_1 +#define TIMER_BLDC_BH_PIN GPIO_PIN_9 +#define TIMER_BLDC_BH_PORT GPIOA +#define TIMER_BLDC_BL_PIN GPIO_PIN_14 +#define TIMER_BLDC_BL_PORT GPIOB +// Channel Y +#define TIMER_BLDC_CHANNEL_Y TIMER_CH_0 +#define TIMER_BLDC_YH_PIN GPIO_PIN_8 +#define TIMER_BLDC_YH_PORT GPIOA +#define TIMER_BLDC_YL_PIN GPIO_PIN_13 +#define TIMER_BLDC_YL_PORT GPIOB + +// Timer BLDC short circuit emergency shutoff define +#define TIMER_BLDC_EMERGENCY_SHUTDOWN_PIN GPIO_PIN_12 +#define TIMER_BLDC_EMERGENCY_SHUTDOWN_PORT GPIOB + +// Hall sensor defines +#define HALL_A_PIN GPIO_PIN_11 +#define HALL_A_PORT GPIOB +#define HALL_B_PIN GPIO_PIN_1 +#define HALL_B_PORT GPIOF +#define HALL_C_PIN GPIO_PIN_14 +#define HALL_C_PORT GPIOC + +// Usart HUGS defines +#define USART_HUGS USART1 +#define USART_HUGS_TX_PIN GPIO_PIN_2 +#define USART_HUGS_TX_PORT GPIOA +#define USART_HUGS_RX_PIN GPIO_PIN_3 +#define USART_HUGS_RX_PORT GPIOA + +// ADC defines +#define VBATT_PIN GPIO_PIN_4 +#define VBATT_PORT GPIOA +#define VBATT_CHANNEL ADC_CHANNEL_4 +#define CURRENT_DC_PIN GPIO_PIN_6 +#define CURRENT_DC_PORT GPIOA +#define CURRENT_DC_CHANNEL ADC_CHANNEL_6 + +// Self hold defines +#define SELF_HOLD_PIN GPIO_PIN_2 +#define SELF_HOLD_PORT GPIOB + +// Button defines +#define BUTTON_PIN GPIO_PIN_15 +#define BUTTON_PORT GPIOC + +// Usart steer defines +#define USART_STEER_COM USART0 +#define USART_STEER_COM_TX_PIN GPIO_PIN_6 +#define USART_STEER_COM_TX_PORT GPIOB +#define USART_STEER_COM_RX_PIN GPIO_PIN_7 +#define USART_STEER_COM_RX_PORT GPIOB + +// Buzzer defins +#define BUZZER_PIN GPIO_PIN_10 +#define BUZZER_PORT GPIOB + +// Charge state defines +#define CHARGE_STATE_PIN GPIO_PIN_0 +#define CHARGE_STATE_PORT GPIOF +#endif + +// Debug pin defines +#define DEBUG_PIN GPIO_PIN_4 +#define DEBUG_PORT GPIOB + +// ADC value conversion defines +#define MOTOR_AMP_CONV_DC_AMP 0.2015 // 3,3V * 1/3 - 0,004Ohm * IL(ampere) = (ADC-Data/4095) *3,3v +#define MOTOR_AMP_CONV_DC_MICRO_AMP 201500 // 3,3V * 1/3 - 0,004Ohm * IL(u ampere) = (ADC-Data/4095) *3,3V * 1000000 +#define ADC_BATTERY_VOLT 0.02417 // V_Batt to V_BattMeasure = factor 30: ( (ADC-Data/4095) *3,3V *30 ) +#define ADC_BATTERY_MICRO_VOLT 24170 // V_Batt to V_BattMeasure = factor 30: ( (ADC-Data/4095) *3,3V * 30 * 1000000 ) + +// Useful math function defines +#define ABS(a) (((a) < 0.0) ? -(a) : (a)) +#define CLAMP(x, low, high) (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x))) +#define MAX(x, high) (((x) > (high)) ? (high) : (x)) +#define MAP(x, xMin, xMax, yMin, yMax) ((x - xMin) * (yMax - yMin) / (xMax - xMin) + yMin) + +// ADC buffer struct +typedef struct +{ + uint16_t v_batt; + uint16_t current_dc; +} adc_buf_t; + +void resetInactivityTimer(void); + diff --git a/HoverBoardGigaDevice/Inc/it.h b/HUGS/Inc/it.h similarity index 67% rename from HoverBoardGigaDevice/Inc/it.h rename to HUGS/Inc/it.h index 6c98b113..c8a8140d 100644 --- a/HoverBoardGigaDevice/Inc/it.h +++ b/HUGS/Inc/it.h @@ -1,52 +1,47 @@ -/* -* This file is part of the hoverboard-firmware-hack-V2 project. The -* firmware is used to hack the generation 2 board of the hoverboard. -* These new hoverboards have no mainboard anymore. They consist of -* two Sensorboards which have their own BLDC-Bridge per Motor and an -* ARM Cortex-M3 processor GD32F130C8. -* -* Copyright (C) 2018 Florian Staeblein -* Copyright (C) 2018 Jakob Broemauer -* Copyright (C) 2018 Kai Liebich -* Copyright (C) 2018 Christoph Lehnert -* -* The program is based on the hoverboard project by Niklas Fauth. The -* structure was tried to be as similar as possible, so that everyone -* could find a better way through the code. -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -*/ - -#ifndef IT_H -#define IT_H - -#include "gd32f1x0.h" -#include "../Inc/config.h" - -//---------------------------------------------------------------------------- -// Resets the timeout to zero -//---------------------------------------------------------------------------- -void ResetTimeout(void); - -//---------------------------------------------------------------------------- -// Returns number of milliseconds since system start -//---------------------------------------------------------------------------- -uint32_t millis( void ); - -//---------------------------------------------------------------------------- -// Delays number of tick Systicks (happens every 10 ms) -//---------------------------------------------------------------------------- -void Delay (uint32_t dlyTicks); - -#endif +/* +* This file is part of the Hoverboard Utility Gateway System (HUGS) project. +* +* The HUGS project goal is to enable Hoverboards, or Hoverboard drive components +* to be re-purposed to provide low-cost mobility to other systems, such +* as assistive devices for the disabled, general purpose robots or other +* labor saving devices. +* +* Copyright (C) 2020 Phil Malone +* Copyright (C) 2018 Florian Staeblein +* Copyright (C) 2018 Jakob Broemauer +* Copyright (C) 2018 Kai Liebich +* Copyright (C) 2018 Christoph Lehnert +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +*/ + +#ifndef IT_H +#define IT_H + +#include "gd32f1x0.h" +#include "../Inc/config.h" + +//---------------------------------------------------------------------------- +// Resets the timeout to zero +//---------------------------------------------------------------------------- +void ResetTimeout(void); + +//---------------------------------------------------------------------------- +// Returns number of milliseconds since system start +//---------------------------------------------------------------------------- +uint32_t millis( void ); + +//---------------------------------------------------------------------------- +// Delays number of tick Systicks (happens every 10 ms) +//---------------------------------------------------------------------------- +void Delay (uint32_t dlyTicks); + +#endif diff --git a/HoverBoardGigaDevice/Inc/led.h b/HUGS/Inc/led.h similarity index 81% rename from HoverBoardGigaDevice/Inc/led.h rename to HUGS/Inc/led.h index 0a502297..a0bf3754 100644 --- a/HoverBoardGigaDevice/Inc/led.h +++ b/HUGS/Inc/led.h @@ -1,107 +1,102 @@ -/* -* This file is part of the hoverboard-firmware-hack-V2 project. The -* firmware is used to hack the generation 2 board of the hoverboard. -* These new hoverboards have no mainboard anymore. They consist of -* two Sensorboards which have their own BLDC-Bridge per Motor and an -* ARM Cortex-M3 processor GD32F130C8. -* -* Copyright (C) 2018 Florian Staeblein -* Copyright (C) 2018 Jakob Broemauer -* Copyright (C) 2018 Kai Liebich -* Copyright (C) 2018 Christoph Lehnert -* -* The program is based on the hoverboard project by Niklas Fauth. The -* structure was tried to be as similar as possible, so that everyone -* could find a better way through the code. -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -*/ - -#ifndef LED_H -#define LED_H - -#include "gd32f1x0.h" -#include "../Inc/config.h" - -// Only slave has LED mechanism -#ifdef SLAVE - -// Modes for RGB-LED operation -typedef enum -{ - LED_OFF = 0, - LED_HSB = 1, - LED_HSB_BLINK = 2, - LED_HSB_FADE = 3, - LED_HSB_STROBE = 4 -} LED_PROGRAM; - -#define COUNT_PROGRAMS 6 // Count of LED programs!! - -//---------------------------------------------------------------------------- -// Update RGB LED output with 16kHz -//---------------------------------------------------------------------------- -void CalculateLEDPWM(void); - -//---------------------------------------------------------------------------- -// Update RGB LED program every 1ms -//---------------------------------------------------------------------------- -void CalculateLEDProgram(void); - -//---------------------------------------------------------------------------- -// Sets/Gets LED program -//---------------------------------------------------------------------------- -void SetRGBProgram(LED_PROGRAM Program); -LED_PROGRAM GetRGBProgram(void); - -//---------------------------------------------------------------------------- -// Sets/Gets hue from 0-764 -//---------------------------------------------------------------------------- -void SetHSBHue(uint16_t hue); -uint16_t GetHSBHue(void); - -//---------------------------------------------------------------------------- -// Sets/Gets saturation from 0-128 -//---------------------------------------------------------------------------- -void SetHSBSaturation(uint8_t saturation); -uint8_t GetHSBSaturation(void); - -//---------------------------------------------------------------------------- -// Sets/Gets brightness from 0-63 -//---------------------------------------------------------------------------- -void SetHSBBrightness(uint8_t brightnessVal); -uint8_t GetHSBBrightness(void); - - -//---------------------------------------------------------------------------- -// Sets/Gets fading speed from 200-1000 -//---------------------------------------------------------------------------- -void SetSpeedFading(uint16_t speed); -uint16_t GetSpeedFading(void); - -//---------------------------------------------------------------------------- -// Sets/Gets blink speed from 700-2400 -//---------------------------------------------------------------------------- -void SetSpeedBlink(uint16_t speed); -uint16_t GetSpeedBlink(void); - -//---------------------------------------------------------------------------- -// Sets/Gets strobe speed from 0-1000 -//---------------------------------------------------------------------------- -void SetSpeedStrobe(uint16_t speed); -uint16_t GetSpeedStrobe(void); - -#endif - -#endif +/* +* This file is part of the Hoverboard Utility Gateway System (HUGS) project. +* +* The HUGS project goal is to enable Hoverboards, or Hoverboard drive components +* to be re-purposed to provide low-cost mobility to other systems, such +* as assistive devices for the disabled, general purpose robots or other +* labor saving devices. +* +* Copyright (C) 2020 Phil Malone +* Copyright (C) 2018 Florian Staeblein +* Copyright (C) 2018 Jakob Broemauer +* Copyright (C) 2018 Kai Liebich +* Copyright (C) 2018 Christoph Lehnert +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +*/ + +#ifndef LED_H +#define LED_H + +#include "gd32f1x0.h" +#include "../Inc/config.h" + +// Only slave has LED mechanism +#ifdef SLAVE + +// Modes for RGB-LED operation +typedef enum +{ + LED_OFF = 0, + LED_HSB = 1, + LED_HSB_BLINK = 2, + LED_HSB_FADE = 3, + LED_HSB_STROBE = 4 +} LED_PROGRAM; + +#define COUNT_PROGRAMS 6 // Count of LED programs!! + +//---------------------------------------------------------------------------- +// Update RGB LED output with 16kHz +//---------------------------------------------------------------------------- +void CalculateLEDPWM(void); + +//---------------------------------------------------------------------------- +// Update RGB LED program every 1ms +//---------------------------------------------------------------------------- +void CalculateLEDProgram(void); + +//---------------------------------------------------------------------------- +// Sets/Gets LED program +//---------------------------------------------------------------------------- +void SetRGBProgram(LED_PROGRAM Program); +LED_PROGRAM GetRGBProgram(void); + +//---------------------------------------------------------------------------- +// Sets/Gets hue from 0-764 +//---------------------------------------------------------------------------- +void SetHSBHue(uint16_t hue); +uint16_t GetHSBHue(void); + +//---------------------------------------------------------------------------- +// Sets/Gets saturation from 0-128 +//---------------------------------------------------------------------------- +void SetHSBSaturation(uint8_t saturation); +uint8_t GetHSBSaturation(void); + +//---------------------------------------------------------------------------- +// Sets/Gets brightness from 0-63 +//---------------------------------------------------------------------------- +void SetHSBBrightness(uint8_t brightnessVal); +uint8_t GetHSBBrightness(void); + + +//---------------------------------------------------------------------------- +// Sets/Gets fading speed from 200-1000 +//---------------------------------------------------------------------------- +void SetSpeedFading(uint16_t speed); +uint16_t GetSpeedFading(void); + +//---------------------------------------------------------------------------- +// Sets/Gets blink speed from 700-2400 +//---------------------------------------------------------------------------- +void SetSpeedBlink(uint16_t speed); +uint16_t GetSpeedBlink(void); + +//---------------------------------------------------------------------------- +// Sets/Gets strobe speed from 0-1000 +//---------------------------------------------------------------------------- +void SetSpeedStrobe(uint16_t speed); +uint16_t GetSpeedStrobe(void); + +#endif + +#endif diff --git a/HoverBoardGigaDevice/Inc/setup.h b/HUGS/Inc/setup.h similarity index 74% rename from HoverBoardGigaDevice/Inc/setup.h rename to HUGS/Inc/setup.h index ec0cdbb8..b1e13aa0 100644 --- a/HoverBoardGigaDevice/Inc/setup.h +++ b/HUGS/Inc/setup.h @@ -1,84 +1,79 @@ -/* -* This file is part of the hoverboard-firmware-hack-V2 project. The -* firmware is used to hack the generation 2 board of the hoverboard. -* These new hoverboards have no mainboard anymore. They consist of -* two Sensorboards which have their own BLDC-Bridge per Motor and an -* ARM Cortex-M3 processor GD32F130C8. -* -* Copyright (C) 2018 Florian Staeblein -* Copyright (C) 2018 Jakob Broemauer -* Copyright (C) 2018 Kai Liebich -* Copyright (C) 2018 Christoph Lehnert -* -* The program is based on the hoverboard project by Niklas Fauth. The -* structure was tried to be as similar as possible, so that everyone -* could find a better way through the code. -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -*/ - -#ifndef SETUP_H -#define SETUP_H - -#include "gd32f1x0.h" -#include "../Inc/config.h" - - -#define USART_MASTERSLAVE_RX_BUFFERSIZE 1 -#define USART_MASTERSLAVE_DATA_RX_ADDRESS ((uint32_t)0x40004424) - -#define USART_STEER_COM_RX_BUFFERSIZE 1 -#define USART_STEER_COM_DATA_RX_ADDRESS ((uint32_t)0x40013824) - -//---------------------------------------------------------------------------- -// Initializes the interrupts -//---------------------------------------------------------------------------- -void Interrupt_init(void); - -//---------------------------------------------------------------------------- -// Initializes the watchdog -//---------------------------------------------------------------------------- -ErrStatus Watchdog_init(void); - -//---------------------------------------------------------------------------- -// Initializes the timeout timer -//---------------------------------------------------------------------------- -void TimeoutTimer_init(void); - -//---------------------------------------------------------------------------- -// Initializes the GPIOs -//---------------------------------------------------------------------------- -void GPIO_init(void); - -//---------------------------------------------------------------------------- -// Initializes the PWM -//---------------------------------------------------------------------------- -void PWM_init(void); - -//---------------------------------------------------------------------------- -// Initializes the ADC -//---------------------------------------------------------------------------- -void ADC_init(void); - -//---------------------------------------------------------------------------- -// Initializes the usart master slave -//---------------------------------------------------------------------------- -void USART_MasterSlave_init(void); - -//---------------------------------------------------------------------------- -// Initializes the steer/bluetooth usart -//---------------------------------------------------------------------------- -void USART_Steer_COM_init(void); - -#endif +/* +* This file is part of the Hoverboard Utility Gateway System (HUGS) project. +* +* The HUGS project goal is to enable Hoverboards, or Hoverboard drive components +* to be re-purposed to provide low-cost mobility to other systems, such +* as assistive devices for the disabled, general purpose robots or other +* labor saving devices. +* +* Copyright (C) 2020 Phil Malone +* Copyright (C) 2018 Florian Staeblein +* Copyright (C) 2018 Jakob Broemauer +* Copyright (C) 2018 Kai Liebich +* Copyright (C) 2018 Christoph Lehnert +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +*/ + +#ifndef SETUP_H +#define SETUP_H + +#include "gd32f1x0.h" +#include "../Inc/config.h" + + +#define USART_HUGS_RX_BUFFERSIZE 1 +#define USART_HUGS_DATA_RX_ADDRESS ((uint32_t)0x40004424) + +#define USART_STEER_COM_RX_BUFFERSIZE 1 +#define USART_STEER_COM_DATA_RX_ADDRESS ((uint32_t)0x40013824) + +//---------------------------------------------------------------------------- +// Initializes the interrupts +//---------------------------------------------------------------------------- +void Interrupt_init(void); + +//---------------------------------------------------------------------------- +// Initializes the watchdog +//---------------------------------------------------------------------------- +ErrStatus Watchdog_init(void); + +//---------------------------------------------------------------------------- +// Initializes the timeout timer +//---------------------------------------------------------------------------- +void TimeoutTimer_init(void); + +//---------------------------------------------------------------------------- +// Initializes the GPIOs +//---------------------------------------------------------------------------- +void GPIO_init(void); + +//---------------------------------------------------------------------------- +// Initializes the PWM +//---------------------------------------------------------------------------- +void PWM_init(void); + +//---------------------------------------------------------------------------- +// Initializes the ADC +//---------------------------------------------------------------------------- +void ADC_init(void); + +//---------------------------------------------------------------------------- +// Initializes the usart master slave +//---------------------------------------------------------------------------- +void USART_HUGS_init(void); + +//---------------------------------------------------------------------------- +// Initializes the steer/bluetooth usart +//---------------------------------------------------------------------------- +void USART_Steer_COM_init(void); + +#endif diff --git a/HoverBoardGigaDevice/Listings/Hoverboard.map b/HUGS/Listings/HUGS.map similarity index 51% rename from HoverBoardGigaDevice/Listings/Hoverboard.map rename to HUGS/Listings/HUGS.map index 27a65abe..1ba9e4f8 100644 --- a/HoverBoardGigaDevice/Listings/Hoverboard.map +++ b/HUGS/Listings/HUGS.map @@ -1,1423 +1,1354 @@ -Component: ARM Compiler 5.06 update 6 (build 750) Tool: armlink [4d35ed] - -============================================================================== - -Section Cross References - - main.o(.text) refers to it.o(.text) for Delay - main.o(.text) refers to commsmasterslave.o(.text) for SendSlave - main.o(.text) refers to gd32f1x0_usart.o(.text) for usart_deinit - main.o(.text) refers to bldc.o(.text) for SetEnable - main.o(.text) refers to gd32f1x0_gpio.o(.text) for gpio_bit_write - main.o(.text) refers to gd32f1x0_fwdgt.o(.text) for fwdgt_counter_reload - main.o(.text) refers to system_gd32f1x0.o(.text) for SystemCoreClockUpdate - main.o(.text) refers to setup.o(.text) for Watchdog_init - main.o(.text) refers to commssteering.o(.text) for SendSteerDevice - main.o(.text) refers to dflt_clz.o(x$fpl$dflt) for __aeabi_i2d - main.o(.text) refers to dleqf.o(x$fpl$dleqf) for __aeabi_cdcmple - main.o(.text) refers to fflt_clz.o(x$fpl$fflt) for __aeabi_i2f - main.o(.text) refers to faddsub_clz.o(x$fpl$fsub) for __aeabi_fsub - main.o(.text) refers to f2d.o(x$fpl$f2d) for __aeabi_f2d - main.o(.text) refers to dmul.o(x$fpl$dmul) for __aeabi_dmul - main.o(.text) refers to ddiv.o(x$fpl$ddiv) for __aeabi_ddiv - main.o(.text) refers to daddsub_clz.o(x$fpl$dadd) for __aeabi_dadd - main.o(.text) refers to d2f.o(x$fpl$d2f) for __aeabi_d2f - main.o(.text) refers to fmul.o(x$fpl$fmul) for __aeabi_fmul - main.o(.text) refers to ffix.o(x$fpl$ffix) for __aeabi_f2iz - main.o(.text) refers to fdiv.o(x$fpl$fdiv) for __aeabi_fdiv - main.o(.text) refers to faddsub_clz.o(x$fpl$fadd) for __aeabi_fadd - main.o(.text) refers to ffixu.o(x$fpl$ffixu) for __aeabi_f2uiz - main.o(.text) refers to frleqf.o(x$fpl$frleqf) for __aeabi_cfrcmple - main.o(.text) refers to fleqf.o(x$fpl$fleqf) for __aeabi_cfcmple - main.o(.text) refers to bldc.o(.data) for buzzerPattern - main.o(.text) refers to main.o(.data) for speed - main.o(.text) refers to system_gd32f1x0.o(.data) for SystemCoreClock - main.o(.text) refers to main.o(.constdata) for lookUpTableAngle - main.o(.text) refers to it.o(.data) for timedOut - main.o(.text) refers to drleqf.o(x$fpl$drleqf) for __aeabi_cdrcmple - bldc.o(.text) refers to fflt_clz.o(x$fpl$ffltu) for __aeabi_ui2f - bldc.o(.text) refers to f2d.o(x$fpl$f2d) for __aeabi_f2d - bldc.o(.text) refers to dmul.o(x$fpl$dmul) for __aeabi_dmul - bldc.o(.text) refers to daddsub_clz.o(x$fpl$dadd) for __aeabi_dadd - bldc.o(.text) refers to d2f.o(x$fpl$d2f) for __aeabi_d2f - bldc.o(.text) refers to gd32f1x0_gpio.o(.text) for gpio_bit_write - bldc.o(.text) refers to dflt_clz.o(x$fpl$dflt) for __aeabi_i2d - bldc.o(.text) refers to dleqf.o(x$fpl$dleqf) for __aeabi_cdcmple - bldc.o(.text) refers to frleqf.o(x$fpl$frleqf) for __aeabi_cfrcmple - bldc.o(.text) refers to gd32f1x0_timer.o(.text) for timer_automatic_output_disable - bldc.o(.text) refers to bldc.o(i.blockPWM) for blockPWM - bldc.o(.text) refers to fdiv.o(x$fpl$fdiv) for __aeabi_fdiv - bldc.o(.text) refers to bldc.o(.data) for bldc_enable - bldc.o(.text) refers to it.o(.data) for timedOut - bldc.o(.text) refers to bldc.o(.constdata) for hall_to_pos - setup.o(.text) refers to gd32f1x0_misc.o(.text) for nvic_priority_group_set - setup.o(.text) refers to gd32f1x0_rcu.o(.text) for rcu_flag_get - setup.o(.text) refers to gd32f1x0_fwdgt.o(.text) for fwdgt_config - setup.o(.text) refers to gd32f1x0_timer.o(.text) for timer_deinit - setup.o(.text) refers to gd32f1x0_gpio.o(.text) for gpio_mode_set - setup.o(.text) refers to setup.o(.bss) for timeoutTimer_paramter_struct - setup.o(.text) refers to gd32f1x0_dma.o(.text) for dma_deinit - setup.o(.text) refers to rt_memcpy_w.o(.text) for __aeabi_memcpy4 - setup.o(.text) refers to gd32f1x0_adc.o(.text) for adc_channel_length_config - setup.o(.text) refers to gd32f1x0_usart.o(.text) for usart_baudrate_set - setup.o(.text) refers to bldc.o(.data) for adc_buffer - setup.o(.text) refers to setup.o(.data) for usartMasterSlave_rx_buf - it.o(.text) refers to gd32f1x0_timer.o(.text) for timer_interrupt_flag_clear - it.o(.text) refers to gd32f1x0_adc.o(.text) for adc_software_trigger_enable - it.o(.text) refers to bldc.o(.text) for CalculateBLDC - it.o(.text) refers to gd32f1x0_dma.o(.text) for dma_interrupt_flag_get - it.o(.text) refers to commssteering.o(.text) for UpdateUSARTSteerInput - it.o(.text) refers to commsmasterslave.o(.text) for UpdateUSARTMasterSlaveInput - it.o(.text) refers to it.o(.data) for msTicks - it.o(.text) refers to main.o(.data) for steer - comms.o(.text) refers to gd32f1x0_usart.o(.text) for usart_data_transmit - commssteering.o(.text) refers to comms.o(.text) for SendBuffer - commssteering.o(.text) refers to it.o(.text) for ResetTimeout - commssteering.o(.text) refers to main.o(.data) for speed - commssteering.o(.text) refers to setup.o(.data) for usartSteer_COM_rx_buf - commssteering.o(.text) refers to commssteering.o(.data) for sUSARTSteerRecordBufferCounter - commsmasterslave.o(.text) refers to comms.o(.text) for CalcCRC - commsmasterslave.o(.text) refers to gd32f1x0_gpio.o(.text) for gpio_bit_write - commsmasterslave.o(.text) refers to main.o(.data) for beepsBackwards - commsmasterslave.o(.text) refers to setup.o(.data) for usartMasterSlave_rx_buf - commsmasterslave.o(.text) refers to commsmasterslave.o(.data) for sUSARTMasterSlaveRecordBufferCounter - gd32f1x0_adc.o(.text) refers to gd32f1x0_rcu.o(.text) for rcu_periph_reset_enable - gd32f1x0_gpio.o(.text) refers to gd32f1x0_rcu.o(.text) for rcu_periph_reset_enable - gd32f1x0_i2c.o(.text) refers to gd32f1x0_rcu.o(.text) for rcu_periph_reset_enable - gd32f1x0_pmu.o(.text) refers to gd32f1x0_rcu.o(.text) for rcu_periph_reset_enable - gd32f1x0_pmu.o(.text) refers to gd32f1x0_pmu.o(.bss) for reg_snap - gd32f1x0_syscfg.o(.text) refers to gd32f1x0_rcu.o(.text) for rcu_periph_reset_enable - gd32f1x0_timer.o(.text) refers to gd32f1x0_rcu.o(.text) for rcu_periph_reset_enable - gd32f1x0_usart.o(.text) refers to gd32f1x0_rcu.o(.text) for rcu_periph_reset_enable - gd32f1x0_wwdgt.o(.text) refers to gd32f1x0_rcu.o(.text) for rcu_periph_reset_enable - startup_gd32f1x0.o(STACK) refers (Special) to heapauxi.o(.text) for __use_two_region_memory - startup_gd32f1x0.o(HEAP) refers (Special) to heapauxi.o(.text) for __use_two_region_memory - startup_gd32f1x0.o(RESET) refers (Special) to heapauxi.o(.text) for __use_two_region_memory - startup_gd32f1x0.o(RESET) refers to startup_gd32f1x0.o(STACK) for __initial_sp - startup_gd32f1x0.o(RESET) refers to startup_gd32f1x0.o(.text) for Reset_Handler - startup_gd32f1x0.o(RESET) refers to it.o(.text) for NMI_Handler - startup_gd32f1x0.o(.text) refers (Special) to heapauxi.o(.text) for __use_two_region_memory - startup_gd32f1x0.o(.text) refers to system_gd32f1x0.o(.text) for SystemInit - startup_gd32f1x0.o(.text) refers to __main.o(!!!main) for __main - startup_gd32f1x0.o(.text) refers to startup_gd32f1x0.o(HEAP) for Heap_Mem - startup_gd32f1x0.o(.text) refers to startup_gd32f1x0.o(STACK) for Stack_Mem - system_gd32f1x0.o(.text) refers to system_gd32f1x0.o(.data) for SystemCoreClock - __main.o(!!!main) refers to __rtentry.o(.ARM.Collect$$rtentry$$00000000) for __rt_entry - d2f.o(x$fpl$d2f) refers (Special) to usenofp.o(x$fpl$usenofp) for __I$use$fp - d2f.o(x$fpl$d2f) refers to fretinf.o(x$fpl$fretinf) for __fpl_fretinf - d2f.o(x$fpl$d2f) refers to dnaninf.o(x$fpl$dnaninf) for __fpl_dnaninf - daddsub_clz.o(x$fpl$dadd) refers (Special) to usenofp.o(x$fpl$usenofp) for __I$use$fp - daddsub_clz.o(x$fpl$dadd) refers to daddsub_clz.o(x$fpl$dsub) for _dsub1 - daddsub_clz.o(x$fpl$dadd) refers to dretinf.o(x$fpl$dretinf) for __fpl_dretinf - daddsub_clz.o(x$fpl$dadd) refers to dnaninf.o(x$fpl$dnaninf) for __fpl_dnaninf - daddsub_clz.o(x$fpl$drsb) refers (Special) to usenofp.o(x$fpl$usenofp) for __I$use$fp - daddsub_clz.o(x$fpl$drsb) refers to daddsub_clz.o(x$fpl$dadd) for _dadd1 - daddsub_clz.o(x$fpl$drsb) refers to daddsub_clz.o(x$fpl$dsub) for _dsub1 - daddsub_clz.o(x$fpl$dsub) refers (Special) to usenofp.o(x$fpl$usenofp) for __I$use$fp - daddsub_clz.o(x$fpl$dsub) refers to daddsub_clz.o(x$fpl$dadd) for _dadd1 - daddsub_clz.o(x$fpl$dsub) refers to dnaninf.o(x$fpl$dnaninf) for __fpl_dnaninf - ddiv.o(x$fpl$drdiv) refers (Special) to usenofp.o(x$fpl$usenofp) for __I$use$fp - ddiv.o(x$fpl$drdiv) refers to ddiv.o(x$fpl$ddiv) for ddiv_entry - ddiv.o(x$fpl$ddiv) refers (Special) to usenofp.o(x$fpl$usenofp) for __I$use$fp - ddiv.o(x$fpl$ddiv) refers to dretinf.o(x$fpl$dretinf) for __fpl_dretinf - ddiv.o(x$fpl$ddiv) refers to dnaninf.o(x$fpl$dnaninf) for __fpl_dnaninf - dflt_clz.o(x$fpl$dfltu) refers (Special) to usenofp.o(x$fpl$usenofp) for __I$use$fp - dflt_clz.o(x$fpl$dflt) refers (Special) to usenofp.o(x$fpl$usenofp) for __I$use$fp - dflt_clz.o(x$fpl$dfltn) refers (Special) to usenofp.o(x$fpl$usenofp) for __I$use$fp - dleqf.o(x$fpl$dleqf) refers (Special) to usenofp.o(x$fpl$usenofp) for __I$use$fp - dleqf.o(x$fpl$dleqf) refers to dnaninf.o(x$fpl$dnaninf) for __fpl_dnaninf - dleqf.o(x$fpl$dleqf) refers to dcmpi.o(x$fpl$dcmpinf) for __fpl_dcmp_Inf - dmul.o(x$fpl$dmul) refers (Special) to usenofp.o(x$fpl$usenofp) for __I$use$fp - dmul.o(x$fpl$dmul) refers to dretinf.o(x$fpl$dretinf) for __fpl_dretinf - dmul.o(x$fpl$dmul) refers to dnaninf.o(x$fpl$dnaninf) for __fpl_dnaninf - drleqf.o(x$fpl$drleqf) refers (Special) to usenofp.o(x$fpl$usenofp) for __I$use$fp - drleqf.o(x$fpl$drleqf) refers to dleqf.o(x$fpl$dleqf) for __fpl_dcmple_InfNaN - f2d.o(x$fpl$f2d) refers (Special) to usenofp.o(x$fpl$usenofp) for __I$use$fp - f2d.o(x$fpl$f2d) refers to fnaninf.o(x$fpl$fnaninf) for __fpl_fnaninf - f2d.o(x$fpl$f2d) refers to dretinf.o(x$fpl$dretinf) for __fpl_dretinf - faddsub_clz.o(x$fpl$fadd) refers (Special) to usenofp.o(x$fpl$usenofp) for __I$use$fp - faddsub_clz.o(x$fpl$fadd) refers to faddsub_clz.o(x$fpl$fsub) for _fsub1 - faddsub_clz.o(x$fpl$fadd) refers to fretinf.o(x$fpl$fretinf) for __fpl_fretinf - faddsub_clz.o(x$fpl$fadd) refers to fnaninf.o(x$fpl$fnaninf) for __fpl_fnaninf - faddsub_clz.o(x$fpl$frsb) refers (Special) to usenofp.o(x$fpl$usenofp) for __I$use$fp - faddsub_clz.o(x$fpl$frsb) refers to faddsub_clz.o(x$fpl$fadd) for _fadd1 - faddsub_clz.o(x$fpl$frsb) refers to faddsub_clz.o(x$fpl$fsub) for _fsub1 - faddsub_clz.o(x$fpl$fsub) refers (Special) to usenofp.o(x$fpl$usenofp) for __I$use$fp - faddsub_clz.o(x$fpl$fsub) refers to faddsub_clz.o(x$fpl$fadd) for _fadd1 - faddsub_clz.o(x$fpl$fsub) refers to fnaninf.o(x$fpl$fnaninf) for __fpl_fnaninf - fdiv.o(x$fpl$frdiv) refers (Special) to usenofp.o(x$fpl$usenofp) for __I$use$fp - fdiv.o(x$fpl$frdiv) refers to fdiv.o(x$fpl$fdiv) for _fdiv1 - fdiv.o(x$fpl$fdiv) refers (Special) to usenofp.o(x$fpl$usenofp) for __I$use$fp - fdiv.o(x$fpl$fdiv) refers to fretinf.o(x$fpl$fretinf) for __fpl_fretinf - fdiv.o(x$fpl$fdiv) refers to fnaninf.o(x$fpl$fnaninf) for __fpl_fnaninf - ffix.o(x$fpl$ffix) refers (Special) to usenofp.o(x$fpl$usenofp) for __I$use$fp - ffix.o(x$fpl$ffix) refers to fnaninf.o(x$fpl$fnaninf) for __fpl_fnaninf - ffix.o(x$fpl$ffixr) refers (Special) to usenofp.o(x$fpl$usenofp) for __I$use$fp - ffix.o(x$fpl$ffixr) refers to fnaninf.o(x$fpl$fnaninf) for __fpl_fnaninf - ffixu.o(x$fpl$ffixu) refers (Special) to usenofp.o(x$fpl$usenofp) for __I$use$fp - ffixu.o(x$fpl$ffixu) refers to fnaninf.o(x$fpl$fnaninf) for __fpl_fnaninf - ffixu.o(x$fpl$ffixur) refers (Special) to usenofp.o(x$fpl$usenofp) for __I$use$fp - ffixu.o(x$fpl$ffixur) refers to fnaninf.o(x$fpl$fnaninf) for __fpl_fnaninf - fflt_clz.o(x$fpl$ffltu) refers (Special) to usenofp.o(x$fpl$usenofp) for __I$use$fp - fflt_clz.o(x$fpl$fflt) refers (Special) to usenofp.o(x$fpl$usenofp) for __I$use$fp - fflt_clz.o(x$fpl$ffltn) refers (Special) to usenofp.o(x$fpl$usenofp) for __I$use$fp - fleqf.o(x$fpl$fleqf) refers (Special) to usenofp.o(x$fpl$usenofp) for __I$use$fp - fleqf.o(x$fpl$fleqf) refers to fnaninf.o(x$fpl$fnaninf) for __fpl_fnaninf - fleqf.o(x$fpl$fleqf) refers to fcmpi.o(x$fpl$fcmpinf) for __fpl_fcmp_Inf - fmul.o(x$fpl$fmul) refers (Special) to usenofp.o(x$fpl$usenofp) for __I$use$fp - fmul.o(x$fpl$fmul) refers to fretinf.o(x$fpl$fretinf) for __fpl_fretinf - fmul.o(x$fpl$fmul) refers to fnaninf.o(x$fpl$fnaninf) for __fpl_fnaninf - frleqf.o(x$fpl$frleqf) refers (Special) to usenofp.o(x$fpl$usenofp) for __I$use$fp - frleqf.o(x$fpl$frleqf) refers to fleqf.o(x$fpl$fleqf) for __fpl_fcmple_InfNaN - __rtentry.o(.ARM.Collect$$rtentry$$00000000) refers (Special) to __rtentry2.o(.ARM.Collect$$rtentry$$0000000A) for __rt_entry_li - __rtentry.o(.ARM.Collect$$rtentry$$00000000) refers (Special) to __rtentry2.o(.ARM.Collect$$rtentry$$0000000D) for __rt_entry_main - __rtentry.o(.ARM.Collect$$rtentry$$00000000) refers (Special) to __rtentry2.o(.ARM.Collect$$rtentry$$0000000C) for __rt_entry_postli_1 - __rtentry.o(.ARM.Collect$$rtentry$$00000000) refers (Special) to __rtentry2.o(.ARM.Collect$$rtentry$$00000009) for __rt_entry_postsh_1 - __rtentry.o(.ARM.Collect$$rtentry$$00000000) refers (Special) to __rtentry2.o(.ARM.Collect$$rtentry$$00000002) for __rt_entry_presh_1 - __rtentry.o(.ARM.Collect$$rtentry$$00000000) refers (Special) to __rtentry4.o(.ARM.Collect$$rtentry$$00000004) for __rt_entry_sh - dcmpi.o(x$fpl$dcmpinf) refers (Special) to usenofp.o(x$fpl$usenofp) for __I$use$fp - dnaninf.o(x$fpl$dnaninf) refers (Special) to usenofp.o(x$fpl$usenofp) for __I$use$fp - dretinf.o(x$fpl$dretinf) refers (Special) to usenofp.o(x$fpl$usenofp) for __I$use$fp - fcmpi.o(x$fpl$fcmpinf) refers (Special) to usenofp.o(x$fpl$usenofp) for __I$use$fp - fnaninf.o(x$fpl$fnaninf) refers (Special) to usenofp.o(x$fpl$usenofp) for __I$use$fp - fretinf.o(x$fpl$fretinf) refers (Special) to usenofp.o(x$fpl$usenofp) for __I$use$fp - __rtentry2.o(.ARM.Collect$$rtentry$$00000008) refers to boardinit2.o(.text) for _platform_post_stackheap_init - __rtentry2.o(.ARM.Collect$$rtentry$$0000000A) refers to libinit.o(.ARM.Collect$$libinit$$00000000) for __rt_lib_init - __rtentry2.o(.ARM.Collect$$rtentry$$0000000B) refers to boardinit3.o(.text) for _platform_post_lib_init - __rtentry2.o(.ARM.Collect$$rtentry$$0000000D) refers to main.o(.text) for main - __rtentry2.o(.ARM.Collect$$rtentry$$0000000D) refers to exit.o(.text) for exit - __rtentry2.o(.ARM.exidx) refers to __rtentry2.o(.ARM.Collect$$rtentry$$00000001) for .ARM.Collect$$rtentry$$00000001 - __rtentry2.o(.ARM.exidx) refers to __rtentry2.o(.ARM.Collect$$rtentry$$00000008) for .ARM.Collect$$rtentry$$00000008 - __rtentry2.o(.ARM.exidx) refers to __rtentry2.o(.ARM.Collect$$rtentry$$0000000A) for .ARM.Collect$$rtentry$$0000000A - __rtentry2.o(.ARM.exidx) refers to __rtentry2.o(.ARM.Collect$$rtentry$$0000000B) for .ARM.Collect$$rtentry$$0000000B - __rtentry2.o(.ARM.exidx) refers to __rtentry2.o(.ARM.Collect$$rtentry$$0000000D) for .ARM.Collect$$rtentry$$0000000D - __rtentry4.o(.ARM.Collect$$rtentry$$00000004) refers to sys_stackheap_outer.o(.text) for __user_setup_stackheap - __rtentry4.o(.ARM.exidx) refers to __rtentry4.o(.ARM.Collect$$rtentry$$00000004) for .ARM.Collect$$rtentry$$00000004 - sys_stackheap_outer.o(.text) refers to libspace.o(.text) for __user_perproc_libspace - sys_stackheap_outer.o(.text) refers to startup_gd32f1x0.o(.text) for __user_initial_stackheap - exit.o(.text) refers to rtexit.o(.ARM.Collect$$rtexit$$00000000) for __rt_exit - libinit.o(.ARM.Collect$$libinit$$00000000) refers (Special) to libinit2.o(.ARM.Collect$$libinit$$0000002E) for __rt_lib_init_alloca_1 - libinit.o(.ARM.Collect$$libinit$$00000000) refers (Special) to libinit2.o(.ARM.Collect$$libinit$$0000002C) for __rt_lib_init_argv_1 - libinit.o(.ARM.Collect$$libinit$$00000000) refers (Special) to libinit2.o(.ARM.Collect$$libinit$$0000001B) for __rt_lib_init_atexit_1 - libinit.o(.ARM.Collect$$libinit$$00000000) refers (Special) to libinit2.o(.ARM.Collect$$libinit$$00000021) for __rt_lib_init_clock_1 - libinit.o(.ARM.Collect$$libinit$$00000000) refers (Special) to libinit2.o(.ARM.Collect$$libinit$$00000032) for __rt_lib_init_cpp_1 - libinit.o(.ARM.Collect$$libinit$$00000000) refers (Special) to libinit2.o(.ARM.Collect$$libinit$$00000030) for __rt_lib_init_exceptions_1 - libinit.o(.ARM.Collect$$libinit$$00000000) refers (Special) to libinit2.o(.ARM.Collect$$libinit$$00000002) for __rt_lib_init_fp_1 - libinit.o(.ARM.Collect$$libinit$$00000000) refers (Special) to libinit2.o(.ARM.Collect$$libinit$$0000001F) for __rt_lib_init_fp_trap_1 - libinit.o(.ARM.Collect$$libinit$$00000000) refers (Special) to libinit2.o(.ARM.Collect$$libinit$$00000023) for __rt_lib_init_getenv_1 - libinit.o(.ARM.Collect$$libinit$$00000000) refers (Special) to libinit2.o(.ARM.Collect$$libinit$$0000000A) for __rt_lib_init_heap_1 - libinit.o(.ARM.Collect$$libinit$$00000000) refers (Special) to libinit2.o(.ARM.Collect$$libinit$$00000011) for __rt_lib_init_lc_collate_1 - libinit.o(.ARM.Collect$$libinit$$00000000) refers (Special) to libinit2.o(.ARM.Collect$$libinit$$00000013) for __rt_lib_init_lc_ctype_1 - libinit.o(.ARM.Collect$$libinit$$00000000) refers (Special) to libinit2.o(.ARM.Collect$$libinit$$00000015) for __rt_lib_init_lc_monetary_1 - libinit.o(.ARM.Collect$$libinit$$00000000) refers (Special) to libinit2.o(.ARM.Collect$$libinit$$00000017) for __rt_lib_init_lc_numeric_1 - libinit.o(.ARM.Collect$$libinit$$00000000) refers (Special) to libinit2.o(.ARM.Collect$$libinit$$00000019) for __rt_lib_init_lc_time_1 - libinit.o(.ARM.Collect$$libinit$$00000000) refers (Special) to libinit2.o(.ARM.Collect$$libinit$$00000004) for __rt_lib_init_preinit_1 - libinit.o(.ARM.Collect$$libinit$$00000000) refers (Special) to libinit2.o(.ARM.Collect$$libinit$$0000000E) for __rt_lib_init_rand_1 - libinit.o(.ARM.Collect$$libinit$$00000000) refers (Special) to libinit2.o(.ARM.Collect$$libinit$$00000033) for __rt_lib_init_return - libinit.o(.ARM.Collect$$libinit$$00000000) refers (Special) to libinit2.o(.ARM.Collect$$libinit$$0000001D) for __rt_lib_init_signal_1 - libinit.o(.ARM.Collect$$libinit$$00000000) refers (Special) to libinit2.o(.ARM.Collect$$libinit$$00000025) for __rt_lib_init_stdio_1 - libinit.o(.ARM.Collect$$libinit$$00000000) refers (Special) to libinit2.o(.ARM.Collect$$libinit$$0000000C) for __rt_lib_init_user_alloc_1 - libspace.o(.text) refers to libspace.o(.bss) for __libspace_start - rtexit.o(.ARM.Collect$$rtexit$$00000000) refers (Special) to rtexit2.o(.ARM.Collect$$rtexit$$00000004) for __rt_exit_exit - rtexit.o(.ARM.Collect$$rtexit$$00000000) refers (Special) to rtexit2.o(.ARM.Collect$$rtexit$$00000003) for __rt_exit_ls - rtexit.o(.ARM.Collect$$rtexit$$00000000) refers (Special) to rtexit2.o(.ARM.Collect$$rtexit$$00000002) for __rt_exit_prels_1 - rtexit.o(.ARM.exidx) refers (Special) to rtexit2.o(.ARM.Collect$$rtexit$$00000004) for __rt_exit_exit - rtexit.o(.ARM.exidx) refers (Special) to rtexit2.o(.ARM.Collect$$rtexit$$00000003) for __rt_exit_ls - rtexit.o(.ARM.exidx) refers (Special) to rtexit2.o(.ARM.Collect$$rtexit$$00000002) for __rt_exit_prels_1 - rtexit.o(.ARM.exidx) refers to rtexit.o(.ARM.Collect$$rtexit$$00000000) for .ARM.Collect$$rtexit$$00000000 - libinit2.o(.ARM.Collect$$libinit$$00000010) refers to libinit2.o(.ARM.Collect$$libinit$$0000000F) for .ARM.Collect$$libinit$$0000000F - libinit2.o(.ARM.Collect$$libinit$$00000012) refers to libinit2.o(.ARM.Collect$$libinit$$0000000F) for .ARM.Collect$$libinit$$0000000F - libinit2.o(.ARM.Collect$$libinit$$00000014) refers to libinit2.o(.ARM.Collect$$libinit$$0000000F) for .ARM.Collect$$libinit$$0000000F - libinit2.o(.ARM.Collect$$libinit$$00000016) refers to libinit2.o(.ARM.Collect$$libinit$$0000000F) for .ARM.Collect$$libinit$$0000000F - libinit2.o(.ARM.Collect$$libinit$$00000018) refers to libinit2.o(.ARM.Collect$$libinit$$0000000F) for .ARM.Collect$$libinit$$0000000F - libinit2.o(.ARM.Collect$$libinit$$00000026) refers to argv_veneer.o(.emb_text) for __ARM_argv_veneer - libinit2.o(.ARM.Collect$$libinit$$00000027) refers to argv_veneer.o(.emb_text) for __ARM_argv_veneer - rtexit2.o(.ARM.Collect$$rtexit$$00000003) refers to libshutdown.o(.ARM.Collect$$libshutdown$$00000000) for __rt_lib_shutdown - rtexit2.o(.ARM.Collect$$rtexit$$00000004) refers to sys_exit.o(.text) for _sys_exit - rtexit2.o(.ARM.exidx) refers to rtexit2.o(.ARM.Collect$$rtexit$$00000001) for .ARM.Collect$$rtexit$$00000001 - rtexit2.o(.ARM.exidx) refers to rtexit2.o(.ARM.Collect$$rtexit$$00000003) for .ARM.Collect$$rtexit$$00000003 - rtexit2.o(.ARM.exidx) refers to rtexit2.o(.ARM.Collect$$rtexit$$00000004) for .ARM.Collect$$rtexit$$00000004 - argv_veneer.o(.emb_text) refers to no_argv.o(.text) for __ARM_get_argv - sys_exit.o(.text) refers (Special) to use_no_semi.o(.text) for __I$use$semihosting - sys_exit.o(.text) refers (Special) to indicate_semi.o(.text) for __semihosting_library_function - _get_argv_nomalloc.o(.text) refers (Special) to hrguard.o(.text) for __heap_region$guard - _get_argv_nomalloc.o(.text) refers to defsig_rtmem_outer.o(.text) for __rt_SIGRTMEM - _get_argv_nomalloc.o(.text) refers to sys_command.o(.text) for _sys_command_string - libshutdown.o(.ARM.Collect$$libshutdown$$00000000) refers (Special) to libshutdown2.o(.ARM.Collect$$libshutdown$$00000002) for __rt_lib_shutdown_cpp_1 - libshutdown.o(.ARM.Collect$$libshutdown$$00000000) refers (Special) to libshutdown2.o(.ARM.Collect$$libshutdown$$00000007) for __rt_lib_shutdown_fp_trap_1 - libshutdown.o(.ARM.Collect$$libshutdown$$00000000) refers (Special) to libshutdown2.o(.ARM.Collect$$libshutdown$$0000000F) for __rt_lib_shutdown_heap_1 - libshutdown.o(.ARM.Collect$$libshutdown$$00000000) refers (Special) to libshutdown2.o(.ARM.Collect$$libshutdown$$00000010) for __rt_lib_shutdown_return - libshutdown.o(.ARM.Collect$$libshutdown$$00000000) refers (Special) to libshutdown2.o(.ARM.Collect$$libshutdown$$0000000A) for __rt_lib_shutdown_signal_1 - libshutdown.o(.ARM.Collect$$libshutdown$$00000000) refers (Special) to libshutdown2.o(.ARM.Collect$$libshutdown$$00000004) for __rt_lib_shutdown_stdio_1 - libshutdown.o(.ARM.Collect$$libshutdown$$00000000) refers (Special) to libshutdown2.o(.ARM.Collect$$libshutdown$$0000000C) for __rt_lib_shutdown_user_alloc_1 - sys_command.o(.text) refers (Special) to use_no_semi.o(.text) for __I$use$semihosting - sys_command.o(.text) refers (Special) to indicate_semi.o(.text) for __semihosting_library_function - defsig_rtmem_outer.o(.text) refers to defsig_rtmem_inner.o(.text) for __rt_SIGRTMEM_inner - defsig_rtmem_outer.o(.text) refers to defsig_exit.o(.text) for __sig_exit - defsig_rtmem_formal.o(.text) refers to rt_raise.o(.text) for __rt_raise - rt_raise.o(.text) refers to __raise.o(.text) for __raise - rt_raise.o(.text) refers to sys_exit.o(.text) for _sys_exit - defsig_exit.o(.text) refers to sys_exit.o(.text) for _sys_exit - defsig_rtmem_inner.o(.text) refers to defsig_general.o(.text) for __default_signal_display - __raise.o(.text) refers to defsig.o(CL$$defsig) for __default_signal_handler - defsig_general.o(.text) refers to sys_wrch.o(.text) for _ttywrch - sys_wrch.o(.text) refers (Special) to use_no_semi.o(.text) for __I$use$semihosting - sys_wrch.o(.text) refers (Special) to indicate_semi.o(.text) for __semihosting_library_function - defsig.o(CL$$defsig) refers to defsig_rtmem_inner.o(.text) for __rt_SIGRTMEM_inner - defsig_abrt_inner.o(.text) refers to defsig_general.o(.text) for __default_signal_display - defsig_fpe_inner.o(.text) refers to defsig_general.o(.text) for __default_signal_display - defsig_rtred_inner.o(.text) refers to defsig_general.o(.text) for __default_signal_display - defsig_stak_inner.o(.text) refers to defsig_general.o(.text) for __default_signal_display - defsig_pvfn_inner.o(.text) refers to defsig_general.o(.text) for __default_signal_display - defsig_cppl_inner.o(.text) refers to defsig_general.o(.text) for __default_signal_display - defsig_segv_inner.o(.text) refers to defsig_general.o(.text) for __default_signal_display - defsig_other.o(.text) refers to defsig_general.o(.text) for __default_signal_display - - -============================================================================== - -Removing Unused input sections from the image. - - Removing main.o(.rev16_text), (4 bytes). - Removing main.o(.revsh_text), (4 bytes). - Removing main.o(.rrx_text), (6 bytes). - Removing bldc.o(.rev16_text), (4 bytes). - Removing bldc.o(.revsh_text), (4 bytes). - Removing bldc.o(.rrx_text), (6 bytes). - Removing setup.o(.rev16_text), (4 bytes). - Removing setup.o(.revsh_text), (4 bytes). - Removing setup.o(.rrx_text), (6 bytes). - Removing it.o(.rev16_text), (4 bytes). - Removing it.o(.revsh_text), (4 bytes). - Removing it.o(.rrx_text), (6 bytes). - Removing comms.o(.rev16_text), (4 bytes). - Removing comms.o(.revsh_text), (4 bytes). - Removing comms.o(.rrx_text), (6 bytes). - Removing commsbluetooth.o(.rev16_text), (4 bytes). - Removing commsbluetooth.o(.revsh_text), (4 bytes). - Removing commsbluetooth.o(.rrx_text), (6 bytes). - Removing commssteering.o(.rev16_text), (4 bytes). - Removing commssteering.o(.revsh_text), (4 bytes). - Removing commssteering.o(.rrx_text), (6 bytes). - Removing commsmasterslave.o(.rev16_text), (4 bytes). - Removing commsmasterslave.o(.revsh_text), (4 bytes). - Removing commsmasterslave.o(.rrx_text), (6 bytes). - Removing led.o(.rev16_text), (4 bytes). - Removing led.o(.revsh_text), (4 bytes). - Removing led.o(.rrx_text), (6 bytes). - Removing gd32f1x0_adc.o(.rev16_text), (4 bytes). - Removing gd32f1x0_adc.o(.revsh_text), (4 bytes). - Removing gd32f1x0_adc.o(.rrx_text), (6 bytes). - Removing gd32f1x0_dbg.o(.rev16_text), (4 bytes). - Removing gd32f1x0_dbg.o(.revsh_text), (4 bytes). - Removing gd32f1x0_dbg.o(.rrx_text), (6 bytes). - Removing gd32f1x0_dbg.o(.text), (100 bytes). - Removing gd32f1x0_dma.o(.rev16_text), (4 bytes). - Removing gd32f1x0_dma.o(.revsh_text), (4 bytes). - Removing gd32f1x0_dma.o(.rrx_text), (6 bytes). - Removing gd32f1x0_fwdgt.o(.rev16_text), (4 bytes). - Removing gd32f1x0_fwdgt.o(.revsh_text), (4 bytes). - Removing gd32f1x0_fwdgt.o(.rrx_text), (6 bytes). - Removing gd32f1x0_gpio.o(.rev16_text), (4 bytes). - Removing gd32f1x0_gpio.o(.revsh_text), (4 bytes). - Removing gd32f1x0_gpio.o(.rrx_text), (6 bytes). - Removing gd32f1x0_i2c.o(.rev16_text), (4 bytes). - Removing gd32f1x0_i2c.o(.revsh_text), (4 bytes). - Removing gd32f1x0_i2c.o(.rrx_text), (6 bytes). - Removing gd32f1x0_i2c.o(.text), (824 bytes). - Removing gd32f1x0_misc.o(.rev16_text), (4 bytes). - Removing gd32f1x0_misc.o(.revsh_text), (4 bytes). - Removing gd32f1x0_misc.o(.rrx_text), (6 bytes). - Removing gd32f1x0_pmu.o(.rev16_text), (4 bytes). - Removing gd32f1x0_pmu.o(.revsh_text), (4 bytes). - Removing gd32f1x0_pmu.o(.rrx_text), (6 bytes). - Removing gd32f1x0_pmu.o(.text), (448 bytes). - Removing gd32f1x0_pmu.o(.bss), (16 bytes). - Removing gd32f1x0_rcu.o(.rev16_text), (4 bytes). - Removing gd32f1x0_rcu.o(.revsh_text), (4 bytes). - Removing gd32f1x0_rcu.o(.rrx_text), (6 bytes). - Removing gd32f1x0_syscfg.o(.rev16_text), (4 bytes). - Removing gd32f1x0_syscfg.o(.revsh_text), (4 bytes). - Removing gd32f1x0_syscfg.o(.rrx_text), (6 bytes). - Removing gd32f1x0_syscfg.o(.text), (272 bytes). - Removing gd32f1x0_timer.o(.rev16_text), (4 bytes). - Removing gd32f1x0_timer.o(.revsh_text), (4 bytes). - Removing gd32f1x0_timer.o(.rrx_text), (6 bytes). - Removing gd32f1x0_usart.o(.rev16_text), (4 bytes). - Removing gd32f1x0_usart.o(.revsh_text), (4 bytes). - Removing gd32f1x0_usart.o(.rrx_text), (6 bytes). - Removing gd32f1x0_wwdgt.o(.rev16_text), (4 bytes). - Removing gd32f1x0_wwdgt.o(.revsh_text), (4 bytes). - Removing gd32f1x0_wwdgt.o(.rrx_text), (6 bytes). - Removing gd32f1x0_wwdgt.o(.text), (168 bytes). - Removing system_gd32f1x0.o(.rev16_text), (4 bytes). - Removing system_gd32f1x0.o(.revsh_text), (4 bytes). - Removing system_gd32f1x0.o(.rrx_text), (6 bytes). - -75 unused section(s) (total 2150 bytes) removed from the image. - -============================================================================== - -Image Symbol Table - - Local Symbols - - Symbol Name Value Ov Type Size Object(Section) - - ../clib/angel/boardlib.s 0x00000000 Number 0 boardshut.o ABSOLUTE - ../clib/angel/boardlib.s 0x00000000 Number 0 boardinit1.o ABSOLUTE - ../clib/angel/boardlib.s 0x00000000 Number 0 boardinit2.o ABSOLUTE - ../clib/angel/boardlib.s 0x00000000 Number 0 boardinit3.o ABSOLUTE - ../clib/angel/handlers.s 0x00000000 Number 0 __scatter_copy.o ABSOLUTE - ../clib/angel/handlers.s 0x00000000 Number 0 __scatter_zi.o ABSOLUTE - ../clib/angel/kernel.s 0x00000000 Number 0 __rtentry2.o ABSOLUTE - ../clib/angel/kernel.s 0x00000000 Number 0 __rtentry4.o ABSOLUTE - ../clib/angel/kernel.s 0x00000000 Number 0 rtexit.o ABSOLUTE - ../clib/angel/kernel.s 0x00000000 Number 0 rtexit2.o ABSOLUTE - ../clib/angel/kernel.s 0x00000000 Number 0 __rtentry.o ABSOLUTE - ../clib/angel/rt.s 0x00000000 Number 0 rt_raise.o ABSOLUTE - ../clib/angel/scatter.s 0x00000000 Number 0 __scatter.o ABSOLUTE - ../clib/angel/startup.s 0x00000000 Number 0 __main.o ABSOLUTE - ../clib/angel/sys.s 0x00000000 Number 0 sys_stackheap_outer.o ABSOLUTE - ../clib/angel/sys.s 0x00000000 Number 0 indicate_semi.o ABSOLUTE - ../clib/angel/sys.s 0x00000000 Number 0 use_no_semi.o ABSOLUTE - ../clib/angel/sys.s 0x00000000 Number 0 libspace.o ABSOLUTE - ../clib/angel/sysapp.c 0x00000000 Number 0 sys_exit.o ABSOLUTE - ../clib/angel/sysapp.c 0x00000000 Number 0 sys_command.o ABSOLUTE - ../clib/angel/sysapp.c 0x00000000 Number 0 sys_wrch.o ABSOLUTE - ../clib/armsys.c 0x00000000 Number 0 no_argv.o ABSOLUTE - ../clib/armsys.c 0x00000000 Number 0 argv_veneer.o ABSOLUTE - ../clib/armsys.c 0x00000000 Number 0 _get_argv_nomalloc.o ABSOLUTE - ../clib/armsys.c 0x00000000 Number 0 argv_veneer.o ABSOLUTE - ../clib/heapalloc.c 0x00000000 Number 0 hrguard.o ABSOLUTE - ../clib/heapaux.c 0x00000000 Number 0 heapauxi.o ABSOLUTE - ../clib/libinit.s 0x00000000 Number 0 libshutdown2.o ABSOLUTE - ../clib/libinit.s 0x00000000 Number 0 libinit.o ABSOLUTE - ../clib/libinit.s 0x00000000 Number 0 libshutdown.o ABSOLUTE - ../clib/libinit.s 0x00000000 Number 0 libinit2.o ABSOLUTE - ../clib/memcpset.s 0x00000000 Number 0 rt_memcpy_w.o ABSOLUTE - ../clib/signal.c 0x00000000 Number 0 defsig_rtred_inner.o ABSOLUTE - ../clib/signal.c 0x00000000 Number 0 defsig_rtmem_formal.o ABSOLUTE - ../clib/signal.c 0x00000000 Number 0 defsig_fpe_inner.o ABSOLUTE - ../clib/signal.c 0x00000000 Number 0 defsig_abrt_inner.o ABSOLUTE - ../clib/signal.c 0x00000000 Number 0 defsig_rtmem_outer.o ABSOLUTE - ../clib/signal.c 0x00000000 Number 0 defsig_general.o ABSOLUTE - ../clib/signal.c 0x00000000 Number 0 defsig_other.o ABSOLUTE - ../clib/signal.c 0x00000000 Number 0 defsig_segv_inner.o ABSOLUTE - ../clib/signal.c 0x00000000 Number 0 defsig_cppl_inner.o ABSOLUTE - ../clib/signal.c 0x00000000 Number 0 __raise.o ABSOLUTE - ../clib/signal.c 0x00000000 Number 0 defsig_rtmem_inner.o ABSOLUTE - ../clib/signal.c 0x00000000 Number 0 defsig_pvfn_inner.o ABSOLUTE - ../clib/signal.c 0x00000000 Number 0 defsig_stak_inner.o ABSOLUTE - ../clib/signal.c 0x00000000 Number 0 defsig_exit.o ABSOLUTE - ../clib/signal.s 0x00000000 Number 0 defsig.o ABSOLUTE - ../clib/stdlib.c 0x00000000 Number 0 exit.o ABSOLUTE - ../fplib/d2f.s 0x00000000 Number 0 d2f.o ABSOLUTE - ../fplib/daddsub.s 0x00000000 Number 0 daddsub_clz.o ABSOLUTE - ../fplib/dcmpi.s 0x00000000 Number 0 dcmpi.o ABSOLUTE - ../fplib/ddiv.s 0x00000000 Number 0 ddiv.o ABSOLUTE - ../fplib/dflt.s 0x00000000 Number 0 dflt_clz.o ABSOLUTE - ../fplib/dleqf.s 0x00000000 Number 0 dleqf.o ABSOLUTE - ../fplib/dmul.s 0x00000000 Number 0 dmul.o ABSOLUTE - ../fplib/dnaninf.s 0x00000000 Number 0 dnaninf.o ABSOLUTE - ../fplib/dretinf.s 0x00000000 Number 0 dretinf.o ABSOLUTE - ../fplib/drleqf.s 0x00000000 Number 0 drleqf.o ABSOLUTE - ../fplib/f2d.s 0x00000000 Number 0 f2d.o ABSOLUTE - ../fplib/faddsub.s 0x00000000 Number 0 faddsub_clz.o ABSOLUTE - ../fplib/fcmpi.s 0x00000000 Number 0 fcmpi.o ABSOLUTE - ../fplib/fdiv.s 0x00000000 Number 0 fdiv.o ABSOLUTE - ../fplib/ffix.s 0x00000000 Number 0 ffix.o ABSOLUTE - ../fplib/ffixu.s 0x00000000 Number 0 ffixu.o ABSOLUTE - ../fplib/fflt.s 0x00000000 Number 0 fflt_clz.o ABSOLUTE - ../fplib/fleqf.s 0x00000000 Number 0 fleqf.o ABSOLUTE - ../fplib/fmul.s 0x00000000 Number 0 fmul.o ABSOLUTE - ../fplib/fnaninf.s 0x00000000 Number 0 fnaninf.o ABSOLUTE - ../fplib/fpinit.s 0x00000000 Number 0 fpinit.o ABSOLUTE - ../fplib/fretinf.s 0x00000000 Number 0 fretinf.o ABSOLUTE - ../fplib/frleqf.s 0x00000000 Number 0 frleqf.o ABSOLUTE - ../fplib/usenofp.s 0x00000000 Number 0 usenofp.o ABSOLUTE - RTE\Device\GD32F130C8\gd32f1x0_adc.c 0x00000000 Number 0 gd32f1x0_adc.o ABSOLUTE - RTE\Device\GD32F130C8\gd32f1x0_dbg.c 0x00000000 Number 0 gd32f1x0_dbg.o ABSOLUTE - RTE\Device\GD32F130C8\gd32f1x0_dma.c 0x00000000 Number 0 gd32f1x0_dma.o ABSOLUTE - RTE\Device\GD32F130C8\gd32f1x0_fwdgt.c 0x00000000 Number 0 gd32f1x0_fwdgt.o ABSOLUTE - RTE\Device\GD32F130C8\gd32f1x0_gpio.c 0x00000000 Number 0 gd32f1x0_gpio.o ABSOLUTE - RTE\Device\GD32F130C8\gd32f1x0_i2c.c 0x00000000 Number 0 gd32f1x0_i2c.o ABSOLUTE - RTE\Device\GD32F130C8\gd32f1x0_misc.c 0x00000000 Number 0 gd32f1x0_misc.o ABSOLUTE - RTE\Device\GD32F130C8\gd32f1x0_opa.c 0x00000000 Number 0 gd32f1x0_opa.o ABSOLUTE - RTE\Device\GD32F130C8\gd32f1x0_pmu.c 0x00000000 Number 0 gd32f1x0_pmu.o ABSOLUTE - RTE\Device\GD32F130C8\gd32f1x0_rcu.c 0x00000000 Number 0 gd32f1x0_rcu.o ABSOLUTE - RTE\Device\GD32F130C8\gd32f1x0_syscfg.c 0x00000000 Number 0 gd32f1x0_syscfg.o ABSOLUTE - RTE\Device\GD32F130C8\gd32f1x0_timer.c 0x00000000 Number 0 gd32f1x0_timer.o ABSOLUTE - RTE\Device\GD32F130C8\gd32f1x0_usart.c 0x00000000 Number 0 gd32f1x0_usart.o ABSOLUTE - RTE\Device\GD32F130C8\gd32f1x0_wwdgt.c 0x00000000 Number 0 gd32f1x0_wwdgt.o ABSOLUTE - RTE\Device\GD32F130C8\startup_gd32f1x0.s 0x00000000 Number 0 startup_gd32f1x0.o ABSOLUTE - RTE\Device\GD32F130C8\system_gd32f1x0.c 0x00000000 Number 0 system_gd32f1x0.o ABSOLUTE - RTE\\Device\\GD32F130C8\\gd32f1x0_adc.c 0x00000000 Number 0 gd32f1x0_adc.o ABSOLUTE - RTE\\Device\\GD32F130C8\\gd32f1x0_dbg.c 0x00000000 Number 0 gd32f1x0_dbg.o ABSOLUTE - RTE\\Device\\GD32F130C8\\gd32f1x0_dma.c 0x00000000 Number 0 gd32f1x0_dma.o ABSOLUTE - RTE\\Device\\GD32F130C8\\gd32f1x0_fwdgt.c 0x00000000 Number 0 gd32f1x0_fwdgt.o ABSOLUTE - RTE\\Device\\GD32F130C8\\gd32f1x0_gpio.c 0x00000000 Number 0 gd32f1x0_gpio.o ABSOLUTE - RTE\\Device\\GD32F130C8\\gd32f1x0_i2c.c 0x00000000 Number 0 gd32f1x0_i2c.o ABSOLUTE - RTE\\Device\\GD32F130C8\\gd32f1x0_misc.c 0x00000000 Number 0 gd32f1x0_misc.o ABSOLUTE - RTE\\Device\\GD32F130C8\\gd32f1x0_pmu.c 0x00000000 Number 0 gd32f1x0_pmu.o ABSOLUTE - RTE\\Device\\GD32F130C8\\gd32f1x0_rcu.c 0x00000000 Number 0 gd32f1x0_rcu.o ABSOLUTE - RTE\\Device\\GD32F130C8\\gd32f1x0_syscfg.c 0x00000000 Number 0 gd32f1x0_syscfg.o ABSOLUTE - RTE\\Device\\GD32F130C8\\gd32f1x0_timer.c 0x00000000 Number 0 gd32f1x0_timer.o ABSOLUTE - RTE\\Device\\GD32F130C8\\gd32f1x0_usart.c 0x00000000 Number 0 gd32f1x0_usart.o ABSOLUTE - RTE\\Device\\GD32F130C8\\gd32f1x0_wwdgt.c 0x00000000 Number 0 gd32f1x0_wwdgt.o ABSOLUTE - RTE\\Device\\GD32F130C8\\system_gd32f1x0.c 0x00000000 Number 0 system_gd32f1x0.o ABSOLUTE - Src\\bldc.c 0x00000000 Number 0 bldc.o ABSOLUTE - Src\\comms.c 0x00000000 Number 0 comms.o ABSOLUTE - Src\\commsBluetooth.c 0x00000000 Number 0 commsbluetooth.o ABSOLUTE - Src\\commsMasterSlave.c 0x00000000 Number 0 commsmasterslave.o ABSOLUTE - Src\\commsSteering.c 0x00000000 Number 0 commssteering.o ABSOLUTE - Src\\it.c 0x00000000 Number 0 it.o ABSOLUTE - Src\\led.c 0x00000000 Number 0 led.o ABSOLUTE - Src\\main.c 0x00000000 Number 0 main.o ABSOLUTE - Src\\setup.c 0x00000000 Number 0 setup.o ABSOLUTE - Src\bldc.c 0x00000000 Number 0 bldc.o ABSOLUTE - Src\comms.c 0x00000000 Number 0 comms.o ABSOLUTE - Src\commsBluetooth.c 0x00000000 Number 0 commsbluetooth.o ABSOLUTE - Src\commsMasterSlave.c 0x00000000 Number 0 commsmasterslave.o ABSOLUTE - Src\commsSteering.c 0x00000000 Number 0 commssteering.o ABSOLUTE - Src\it.c 0x00000000 Number 0 it.o ABSOLUTE - Src\led.c 0x00000000 Number 0 led.o ABSOLUTE - Src\main.c 0x00000000 Number 0 main.o ABSOLUTE - Src\setup.c 0x00000000 Number 0 setup.o ABSOLUTE - dc.s 0x00000000 Number 0 dc.o ABSOLUTE - RESET 0x08000000 Section 360 startup_gd32f1x0.o(RESET) - !!!main 0x08000168 Section 8 __main.o(!!!main) - !!!scatter 0x08000170 Section 52 __scatter.o(!!!scatter) - !!handler_copy 0x080001a4 Section 26 __scatter_copy.o(!!handler_copy) - !!handler_zi 0x080001c0 Section 28 __scatter_zi.o(!!handler_zi) - .ARM.Collect$$libinit$$00000000 0x080001dc Section 2 libinit.o(.ARM.Collect$$libinit$$00000000) - .ARM.Collect$$libinit$$00000002 0x080001de Section 0 libinit2.o(.ARM.Collect$$libinit$$00000002) - .ARM.Collect$$libinit$$00000004 0x080001de Section 0 libinit2.o(.ARM.Collect$$libinit$$00000004) - .ARM.Collect$$libinit$$0000000A 0x080001de Section 0 libinit2.o(.ARM.Collect$$libinit$$0000000A) - .ARM.Collect$$libinit$$0000000C 0x080001de Section 0 libinit2.o(.ARM.Collect$$libinit$$0000000C) - .ARM.Collect$$libinit$$0000000E 0x080001de Section 0 libinit2.o(.ARM.Collect$$libinit$$0000000E) - .ARM.Collect$$libinit$$00000011 0x080001de Section 0 libinit2.o(.ARM.Collect$$libinit$$00000011) - .ARM.Collect$$libinit$$00000013 0x080001de Section 0 libinit2.o(.ARM.Collect$$libinit$$00000013) - .ARM.Collect$$libinit$$00000015 0x080001de Section 0 libinit2.o(.ARM.Collect$$libinit$$00000015) - .ARM.Collect$$libinit$$00000017 0x080001de Section 0 libinit2.o(.ARM.Collect$$libinit$$00000017) - .ARM.Collect$$libinit$$00000019 0x080001de Section 0 libinit2.o(.ARM.Collect$$libinit$$00000019) - .ARM.Collect$$libinit$$0000001B 0x080001de Section 0 libinit2.o(.ARM.Collect$$libinit$$0000001B) - .ARM.Collect$$libinit$$0000001D 0x080001de Section 0 libinit2.o(.ARM.Collect$$libinit$$0000001D) - .ARM.Collect$$libinit$$0000001F 0x080001de Section 0 libinit2.o(.ARM.Collect$$libinit$$0000001F) - .ARM.Collect$$libinit$$00000021 0x080001de Section 0 libinit2.o(.ARM.Collect$$libinit$$00000021) - .ARM.Collect$$libinit$$00000023 0x080001de Section 0 libinit2.o(.ARM.Collect$$libinit$$00000023) - .ARM.Collect$$libinit$$00000025 0x080001de Section 0 libinit2.o(.ARM.Collect$$libinit$$00000025) - .ARM.Collect$$libinit$$0000002C 0x080001de Section 0 libinit2.o(.ARM.Collect$$libinit$$0000002C) - .ARM.Collect$$libinit$$0000002E 0x080001de Section 0 libinit2.o(.ARM.Collect$$libinit$$0000002E) - .ARM.Collect$$libinit$$00000030 0x080001de Section 0 libinit2.o(.ARM.Collect$$libinit$$00000030) - .ARM.Collect$$libinit$$00000032 0x080001de Section 0 libinit2.o(.ARM.Collect$$libinit$$00000032) - .ARM.Collect$$libinit$$00000033 0x080001de Section 2 libinit2.o(.ARM.Collect$$libinit$$00000033) - .ARM.Collect$$libshutdown$$00000000 0x080001e0 Section 2 libshutdown.o(.ARM.Collect$$libshutdown$$00000000) - .ARM.Collect$$libshutdown$$00000002 0x080001e2 Section 0 libshutdown2.o(.ARM.Collect$$libshutdown$$00000002) - .ARM.Collect$$libshutdown$$00000004 0x080001e2 Section 0 libshutdown2.o(.ARM.Collect$$libshutdown$$00000004) - .ARM.Collect$$libshutdown$$00000007 0x080001e2 Section 0 libshutdown2.o(.ARM.Collect$$libshutdown$$00000007) - .ARM.Collect$$libshutdown$$0000000A 0x080001e2 Section 0 libshutdown2.o(.ARM.Collect$$libshutdown$$0000000A) - .ARM.Collect$$libshutdown$$0000000C 0x080001e2 Section 0 libshutdown2.o(.ARM.Collect$$libshutdown$$0000000C) - .ARM.Collect$$libshutdown$$0000000F 0x080001e2 Section 0 libshutdown2.o(.ARM.Collect$$libshutdown$$0000000F) - .ARM.Collect$$libshutdown$$00000010 0x080001e2 Section 2 libshutdown2.o(.ARM.Collect$$libshutdown$$00000010) - .ARM.Collect$$rtentry$$00000000 0x080001e4 Section 0 __rtentry.o(.ARM.Collect$$rtentry$$00000000) - .ARM.Collect$$rtentry$$00000002 0x080001e4 Section 0 __rtentry2.o(.ARM.Collect$$rtentry$$00000002) - .ARM.Collect$$rtentry$$00000004 0x080001e4 Section 6 __rtentry4.o(.ARM.Collect$$rtentry$$00000004) - .ARM.Collect$$rtentry$$00000009 0x080001ea Section 0 __rtentry2.o(.ARM.Collect$$rtentry$$00000009) - .ARM.Collect$$rtentry$$0000000A 0x080001ea Section 4 __rtentry2.o(.ARM.Collect$$rtentry$$0000000A) - .ARM.Collect$$rtentry$$0000000C 0x080001ee Section 0 __rtentry2.o(.ARM.Collect$$rtentry$$0000000C) - .ARM.Collect$$rtentry$$0000000D 0x080001ee Section 8 __rtentry2.o(.ARM.Collect$$rtentry$$0000000D) - .ARM.Collect$$rtexit$$00000000 0x080001f6 Section 2 rtexit.o(.ARM.Collect$$rtexit$$00000000) - .ARM.Collect$$rtexit$$00000002 0x080001f8 Section 0 rtexit2.o(.ARM.Collect$$rtexit$$00000002) - .ARM.Collect$$rtexit$$00000003 0x080001f8 Section 4 rtexit2.o(.ARM.Collect$$rtexit$$00000003) - .ARM.Collect$$rtexit$$00000004 0x080001fc Section 6 rtexit2.o(.ARM.Collect$$rtexit$$00000004) - .text 0x08000204 Section 0 main.o(.text) - .text 0x08000854 Section 0 bldc.o(.text) - .text 0x08000c18 Section 0 setup.o(.text) - .text 0x0800141c Section 0 it.o(.text) - .text 0x08001524 Section 0 comms.o(.text) - .text 0x08001594 Section 0 commssteering.o(.text) - .text 0x0800166c Section 0 commsmasterslave.o(.text) - .text 0x0800182c Section 0 gd32f1x0_adc.o(.text) - .text 0x08001eb0 Section 0 gd32f1x0_dma.o(.text) - .text 0x08002364 Section 0 gd32f1x0_fwdgt.o(.text) - .text 0x08002430 Section 0 gd32f1x0_gpio.o(.text) - .text 0x0800260c Section 0 gd32f1x0_misc.o(.text) - .text 0x08002730 Section 0 gd32f1x0_rcu.o(.text) - .text 0x08002fd8 Section 0 gd32f1x0_timer.o(.text) - .text 0x08003d04 Section 0 gd32f1x0_usart.o(.text) - .text 0x08004354 Section 64 startup_gd32f1x0.o(.text) - .text 0x08004394 Section 0 system_gd32f1x0.o(.text) - system_clock_72m_irc8m 0x08004395 Thumb Code 106 system_gd32f1x0.o(.text) - system_clock_config 0x080043ff Thumb Code 8 system_gd32f1x0.o(.text) - .text 0x08004580 Section 100 rt_memcpy_w.o(.text) - .text 0x080045e4 Section 0 heapauxi.o(.text) - .text 0x080045ea Section 74 sys_stackheap_outer.o(.text) - .text 0x08004634 Section 0 exit.o(.text) - .text 0x08004648 Section 8 libspace.o(.text) - .text 0x08004650 Section 0 sys_exit.o(.text) - .text 0x0800465c Section 2 use_no_semi.o(.text) - .text 0x0800465e Section 0 indicate_semi.o(.text) - i.blockPWM 0x0800465e Section 0 bldc.o(i.blockPWM) - x$fpl$d2f 0x080046c8 Section 98 d2f.o(x$fpl$d2f) - x$fpl$dadd 0x0800472c Section 336 daddsub_clz.o(x$fpl$dadd) - _dadd1 0x0800473d Thumb Code 0 daddsub_clz.o(x$fpl$dadd) - x$fpl$dcmpinf 0x0800487c Section 24 dcmpi.o(x$fpl$dcmpinf) - x$fpl$ddiv 0x08004894 Section 688 ddiv.o(x$fpl$ddiv) - ddiv_entry 0x0800489b Thumb Code 0 ddiv.o(x$fpl$ddiv) - x$fpl$dflt 0x08004b44 Section 46 dflt_clz.o(x$fpl$dflt) - x$fpl$dleqf 0x08004b74 Section 120 dleqf.o(x$fpl$dleqf) - x$fpl$dmul 0x08004bec Section 340 dmul.o(x$fpl$dmul) - x$fpl$dnaninf 0x08004d40 Section 156 dnaninf.o(x$fpl$dnaninf) - x$fpl$dretinf 0x08004ddc Section 12 dretinf.o(x$fpl$dretinf) - x$fpl$drleqf 0x08004de8 Section 108 drleqf.o(x$fpl$drleqf) - x$fpl$dsub 0x08004e54 Section 468 daddsub_clz.o(x$fpl$dsub) - _dsub1 0x08004e65 Thumb Code 0 daddsub_clz.o(x$fpl$dsub) - x$fpl$f2d 0x08005028 Section 86 f2d.o(x$fpl$f2d) - x$fpl$fadd 0x08005080 Section 196 faddsub_clz.o(x$fpl$fadd) - _fadd1 0x0800508f Thumb Code 0 faddsub_clz.o(x$fpl$fadd) - x$fpl$fcmpinf 0x08005144 Section 24 fcmpi.o(x$fpl$fcmpinf) - x$fpl$fdiv 0x0800515c Section 388 fdiv.o(x$fpl$fdiv) - _fdiv1 0x0800515d Thumb Code 0 fdiv.o(x$fpl$fdiv) - x$fpl$ffix 0x080052e0 Section 54 ffix.o(x$fpl$ffix) - x$fpl$ffixu 0x08005318 Section 62 ffixu.o(x$fpl$ffixu) - x$fpl$fflt 0x08005358 Section 48 fflt_clz.o(x$fpl$fflt) - x$fpl$ffltu 0x08005388 Section 38 fflt_clz.o(x$fpl$ffltu) - x$fpl$fleqf 0x080053b0 Section 104 fleqf.o(x$fpl$fleqf) - x$fpl$fmul 0x08005418 Section 258 fmul.o(x$fpl$fmul) - x$fpl$fnaninf 0x0800551a Section 140 fnaninf.o(x$fpl$fnaninf) - x$fpl$fretinf 0x080055a6 Section 10 fretinf.o(x$fpl$fretinf) - x$fpl$frleqf 0x080055b0 Section 98 frleqf.o(x$fpl$frleqf) - x$fpl$fsub 0x08005614 Section 234 faddsub_clz.o(x$fpl$fsub) - _fsub1 0x08005623 Thumb Code 0 faddsub_clz.o(x$fpl$fsub) - x$fpl$usenofp 0x080056fe Section 0 usenofp.o(x$fpl$usenofp) - .constdata 0x08005700 Section 724 main.o(.constdata) - .constdata 0x080059d4 Section 10 bldc.o(.constdata) - .data 0x20000000 Section 20 main.o(.data) - .data 0x20000014 Section 48 bldc.o(.data) - .data 0x20000044 Section 2 setup.o(.data) - .data 0x20000048 Section 9 it.o(.data) - .data 0x20000051 Section 10 commssteering.o(.data) - sSteerRecord 0x20000051 Data 1 commssteering.o(.data) - sUSARTSteerRecordBuffer 0x20000052 Data 8 commssteering.o(.data) - sUSARTSteerRecordBufferCounter 0x2000005a Data 1 commssteering.o(.data) - .data 0x2000005b Section 7 commsmasterslave.o(.data) - sMasterSlaveRecord 0x2000005b Data 1 commsmasterslave.o(.data) - sUSARTMasterSlaveRecordBuffer 0x2000005c Data 5 commsmasterslave.o(.data) - sUSARTMasterSlaveRecordBufferCounter 0x20000061 Data 1 commsmasterslave.o(.data) - .data 0x20000064 Section 4 system_gd32f1x0.o(.data) - .bss 0x20000068 Section 132 setup.o(.bss) - .bss 0x200000ec Section 96 libspace.o(.bss) - HEAP 0x20000150 Section 1024 startup_gd32f1x0.o(HEAP) - Heap_Mem 0x20000150 Data 1024 startup_gd32f1x0.o(HEAP) - STACK 0x20000550 Section 1024 startup_gd32f1x0.o(STACK) - Stack_Mem 0x20000550 Data 1024 startup_gd32f1x0.o(STACK) - __initial_sp 0x20000950 Data 0 startup_gd32f1x0.o(STACK) - - Global Symbols - - Symbol Name Value Ov Type Size Object(Section) - - BuildAttributes$$THM_ISAv4$P$D$K$B$S$PE$A:L22UL41UL21$X:L11$S22US41US21$IEEE1$IW$USESV6$~STKCKD$USESV7$~SHL$OSPACE$ROPI$EBA8$UX$STANDARDLIB$REQ8$PRES8$EABIv2 0x00000000 Number 0 anon$$obj.o ABSOLUTE - __ARM_use_no_argv 0x00000000 Number 0 main.o ABSOLUTE - __ARM_exceptions_init - Undefined Weak Reference - __alloca_initialize - Undefined Weak Reference - __arm_preinit_ - Undefined Weak Reference - __cpp_initialize__aeabi_ - Undefined Weak Reference - __cxa_finalize - Undefined Weak Reference - __rt_locale - Undefined Weak Reference - __sigvec_lookup - Undefined Weak Reference - _atexit_init - Undefined Weak Reference - _call_atexit_fns - Undefined Weak Reference - _clock_init - Undefined Weak Reference - _fp_trap_init - Undefined Weak Reference - _fp_trap_shutdown - Undefined Weak Reference - _get_lc_collate - Undefined Weak Reference - _get_lc_ctype - Undefined Weak Reference - _get_lc_monetary - Undefined Weak Reference - _get_lc_numeric - Undefined Weak Reference - _get_lc_time - Undefined Weak Reference - _getenv_init - Undefined Weak Reference - _handle_redirection - Undefined Weak Reference - _init_alloc - Undefined Weak Reference - _init_user_alloc - Undefined Weak Reference - _initio - Undefined Weak Reference - _rand_init - Undefined Weak Reference - _signal_finish - Undefined Weak Reference - _signal_init - Undefined Weak Reference - _terminate_alloc - Undefined Weak Reference - _terminate_user_alloc - Undefined Weak Reference - _terminateio - Undefined Weak Reference - __Vectors_Size 0x00000168 Number 0 startup_gd32f1x0.o ABSOLUTE - __Vectors 0x08000000 Data 4 startup_gd32f1x0.o(RESET) - __Vectors_End 0x08000168 Data 0 startup_gd32f1x0.o(RESET) - __main 0x08000169 Thumb Code 8 __main.o(!!!main) - __scatterload 0x08000171 Thumb Code 0 __scatter.o(!!!scatter) - __scatterload_rt2 0x08000171 Thumb Code 44 __scatter.o(!!!scatter) - __scatterload_rt2_thumb_only 0x08000171 Thumb Code 0 __scatter.o(!!!scatter) - __scatterload_null 0x0800017f Thumb Code 0 __scatter.o(!!!scatter) - __scatterload_copy 0x080001a5 Thumb Code 26 __scatter_copy.o(!!handler_copy) - __scatterload_zeroinit 0x080001c1 Thumb Code 28 __scatter_zi.o(!!handler_zi) - __rt_lib_init 0x080001dd Thumb Code 0 libinit.o(.ARM.Collect$$libinit$$00000000) - __rt_lib_init_alloca_1 0x080001df Thumb Code 0 libinit2.o(.ARM.Collect$$libinit$$0000002E) - __rt_lib_init_argv_1 0x080001df Thumb Code 0 libinit2.o(.ARM.Collect$$libinit$$0000002C) - __rt_lib_init_atexit_1 0x080001df Thumb Code 0 libinit2.o(.ARM.Collect$$libinit$$0000001B) - __rt_lib_init_clock_1 0x080001df Thumb Code 0 libinit2.o(.ARM.Collect$$libinit$$00000021) - __rt_lib_init_cpp_1 0x080001df Thumb Code 0 libinit2.o(.ARM.Collect$$libinit$$00000032) - __rt_lib_init_exceptions_1 0x080001df Thumb Code 0 libinit2.o(.ARM.Collect$$libinit$$00000030) - __rt_lib_init_fp_1 0x080001df Thumb Code 0 libinit2.o(.ARM.Collect$$libinit$$00000002) - __rt_lib_init_fp_trap_1 0x080001df Thumb Code 0 libinit2.o(.ARM.Collect$$libinit$$0000001F) - __rt_lib_init_getenv_1 0x080001df Thumb Code 0 libinit2.o(.ARM.Collect$$libinit$$00000023) - __rt_lib_init_heap_1 0x080001df Thumb Code 0 libinit2.o(.ARM.Collect$$libinit$$0000000A) - __rt_lib_init_lc_collate_1 0x080001df Thumb Code 0 libinit2.o(.ARM.Collect$$libinit$$00000011) - __rt_lib_init_lc_ctype_1 0x080001df Thumb Code 0 libinit2.o(.ARM.Collect$$libinit$$00000013) - __rt_lib_init_lc_monetary_1 0x080001df Thumb Code 0 libinit2.o(.ARM.Collect$$libinit$$00000015) - __rt_lib_init_lc_numeric_1 0x080001df Thumb Code 0 libinit2.o(.ARM.Collect$$libinit$$00000017) - __rt_lib_init_lc_time_1 0x080001df Thumb Code 0 libinit2.o(.ARM.Collect$$libinit$$00000019) - __rt_lib_init_preinit_1 0x080001df Thumb Code 0 libinit2.o(.ARM.Collect$$libinit$$00000004) - __rt_lib_init_rand_1 0x080001df Thumb Code 0 libinit2.o(.ARM.Collect$$libinit$$0000000E) - __rt_lib_init_return 0x080001df Thumb Code 0 libinit2.o(.ARM.Collect$$libinit$$00000033) - __rt_lib_init_signal_1 0x080001df Thumb Code 0 libinit2.o(.ARM.Collect$$libinit$$0000001D) - __rt_lib_init_stdio_1 0x080001df Thumb Code 0 libinit2.o(.ARM.Collect$$libinit$$00000025) - __rt_lib_init_user_alloc_1 0x080001df Thumb Code 0 libinit2.o(.ARM.Collect$$libinit$$0000000C) - __rt_lib_shutdown 0x080001e1 Thumb Code 0 libshutdown.o(.ARM.Collect$$libshutdown$$00000000) - __rt_lib_shutdown_cpp_1 0x080001e3 Thumb Code 0 libshutdown2.o(.ARM.Collect$$libshutdown$$00000002) - __rt_lib_shutdown_fp_trap_1 0x080001e3 Thumb Code 0 libshutdown2.o(.ARM.Collect$$libshutdown$$00000007) - __rt_lib_shutdown_heap_1 0x080001e3 Thumb Code 0 libshutdown2.o(.ARM.Collect$$libshutdown$$0000000F) - __rt_lib_shutdown_return 0x080001e3 Thumb Code 0 libshutdown2.o(.ARM.Collect$$libshutdown$$00000010) - __rt_lib_shutdown_signal_1 0x080001e3 Thumb Code 0 libshutdown2.o(.ARM.Collect$$libshutdown$$0000000A) - __rt_lib_shutdown_stdio_1 0x080001e3 Thumb Code 0 libshutdown2.o(.ARM.Collect$$libshutdown$$00000004) - __rt_lib_shutdown_user_alloc_1 0x080001e3 Thumb Code 0 libshutdown2.o(.ARM.Collect$$libshutdown$$0000000C) - __rt_entry 0x080001e5 Thumb Code 0 __rtentry.o(.ARM.Collect$$rtentry$$00000000) - __rt_entry_presh_1 0x080001e5 Thumb Code 0 __rtentry2.o(.ARM.Collect$$rtentry$$00000002) - __rt_entry_sh 0x080001e5 Thumb Code 0 __rtentry4.o(.ARM.Collect$$rtentry$$00000004) - __rt_entry_li 0x080001eb Thumb Code 0 __rtentry2.o(.ARM.Collect$$rtentry$$0000000A) - __rt_entry_postsh_1 0x080001eb Thumb Code 0 __rtentry2.o(.ARM.Collect$$rtentry$$00000009) - __rt_entry_main 0x080001ef Thumb Code 0 __rtentry2.o(.ARM.Collect$$rtentry$$0000000D) - __rt_entry_postli_1 0x080001ef Thumb Code 0 __rtentry2.o(.ARM.Collect$$rtentry$$0000000C) - __rt_exit 0x080001f7 Thumb Code 0 rtexit.o(.ARM.Collect$$rtexit$$00000000) - __rt_exit_ls 0x080001f9 Thumb Code 0 rtexit2.o(.ARM.Collect$$rtexit$$00000003) - __rt_exit_prels_1 0x080001f9 Thumb Code 0 rtexit2.o(.ARM.Collect$$rtexit$$00000002) - __rt_exit_exit 0x080001fd Thumb Code 0 rtexit2.o(.ARM.Collect$$rtexit$$00000004) - ShutOff 0x08000205 Thumb Code 84 main.o(.text) - ShowBatteryState 0x08000259 Thumb Code 78 main.o(.text) - BeepsBackwards 0x080002a7 Thumb Code 40 main.o(.text) - main 0x080002cf Thumb Code 1360 main.o(.text) - SetEnable 0x08000855 Thumb Code 6 bldc.o(.text) - SetPWM 0x0800085b Thumb Code 30 bldc.o(.text) - CalculateBLDC 0x08000879 Thumb Code 778 bldc.o(.text) - Interrupt_init 0x08000c19 Thumb Code 12 setup.o(.text) - Watchdog_init 0x08000c25 Thumb Code 54 setup.o(.text) - TimeoutTimer_init 0x08000c5b Thumb Code 80 setup.o(.text) - GPIO_init 0x08000cab Thumb Code 836 setup.o(.text) - PWM_init 0x08000fef Thumb Code 388 setup.o(.text) - ADC_init 0x08001173 Thumb Code 226 setup.o(.text) - USART_MasterSlave_init 0x08001255 Thumb Code 206 setup.o(.text) - USART_Steer_COM_init 0x08001323 Thumb Code 206 setup.o(.text) - SysTick_Handler 0x0800141d Thumb Code 12 it.o(.text) - ResetTimeout 0x08001429 Thumb Code 8 it.o(.text) - TIMER13_IRQHandler 0x08001431 Thumb Code 66 it.o(.text) - TIMER0_BRK_UP_TRG_COM_IRQHandler 0x08001473 Thumb Code 18 it.o(.text) - DMA_Channel0_IRQHandler 0x08001485 Thumb Code 26 it.o(.text) - DMA_Channel1_2_IRQHandler 0x0800149f Thumb Code 26 it.o(.text) - DMA_Channel3_4_IRQHandler 0x080014b9 Thumb Code 26 it.o(.text) - millis 0x080014d3 Thumb Code 6 it.o(.text) - Delay 0x080014d9 Thumb Code 20 it.o(.text) - NMI_Handler 0x080014ed Thumb Code 2 it.o(.text) - HardFault_Handler 0x080014ef Thumb Code 4 it.o(.text) - MemManage_Handler 0x080014f3 Thumb Code 4 it.o(.text) - BusFault_Handler 0x080014f7 Thumb Code 4 it.o(.text) - UsageFault_Handler 0x080014fb Thumb Code 4 it.o(.text) - SVC_Handler 0x080014ff Thumb Code 2 it.o(.text) - DebugMon_Handler 0x08001501 Thumb Code 2 it.o(.text) - PendSV_Handler 0x08001503 Thumb Code 2 it.o(.text) - SendBuffer 0x08001525 Thumb Code 50 comms.o(.text) - CalcCRC 0x08001557 Thumb Code 62 comms.o(.text) - SendSteerDevice 0x08001595 Thumb Code 36 commssteering.o(.text) - CheckUSARTSteerInput 0x080015b9 Thumb Code 82 commssteering.o(.text) - UpdateUSARTSteerInput 0x0800160b Thumb Code 70 commssteering.o(.text) - CheckUSARTMasterSlaveInput 0x0800166d Thumb Code 118 commsmasterslave.o(.text) - UpdateUSARTMasterSlaveInput 0x080016e3 Thumb Code 70 commsmasterslave.o(.text) - SendSlave 0x08001729 Thumb Code 226 commsmasterslave.o(.text) - adc_deinit 0x0800182d Thumb Code 20 gd32f1x0_adc.o(.text) - adc_enable 0x08001841 Thumb Code 24 gd32f1x0_adc.o(.text) - adc_disable 0x08001859 Thumb Code 14 gd32f1x0_adc.o(.text) - adc_calibration_enable 0x08001867 Thumb Code 54 gd32f1x0_adc.o(.text) - adc_dma_mode_enable 0x0800189d Thumb Code 14 gd32f1x0_adc.o(.text) - adc_dma_mode_disable 0x080018ab Thumb Code 14 gd32f1x0_adc.o(.text) - adc_tempsensor_vrefint_enable 0x080018b9 Thumb Code 14 gd32f1x0_adc.o(.text) - adc_tempsensor_vrefint_disable 0x080018c7 Thumb Code 14 gd32f1x0_adc.o(.text) - adc_vbat_enable 0x080018d5 Thumb Code 14 gd32f1x0_adc.o(.text) - adc_vbat_disable 0x080018e3 Thumb Code 14 gd32f1x0_adc.o(.text) - adc_discontinuous_mode_config 0x080018f1 Thumb Code 94 gd32f1x0_adc.o(.text) - adc_special_function_config 0x0800194f Thumb Code 130 gd32f1x0_adc.o(.text) - adc_data_alignment_config 0x080019d1 Thumb Code 30 gd32f1x0_adc.o(.text) - adc_channel_length_config 0x080019ef Thumb Code 88 gd32f1x0_adc.o(.text) - adc_regular_channel_config 0x08001a47 Thumb Code 218 gd32f1x0_adc.o(.text) - adc_inserted_channel_config 0x08001b21 Thumb Code 146 gd32f1x0_adc.o(.text) - adc_inserted_channel_offset_config 0x08001bb3 Thumb Code 42 gd32f1x0_adc.o(.text) - adc_external_trigger_config 0x08001bdd Thumb Code 88 gd32f1x0_adc.o(.text) - adc_external_trigger_source_config 0x08001c35 Thumb Code 60 gd32f1x0_adc.o(.text) - adc_software_trigger_enable 0x08001c71 Thumb Code 38 gd32f1x0_adc.o(.text) - adc_regular_data_read 0x08001c97 Thumb Code 10 gd32f1x0_adc.o(.text) - adc_inserted_data_read 0x08001ca1 Thumb Code 60 gd32f1x0_adc.o(.text) - adc_flag_get 0x08001cdd Thumb Code 18 gd32f1x0_adc.o(.text) - adc_flag_clear 0x08001cef Thumb Code 16 gd32f1x0_adc.o(.text) - adc_interrupt_flag_get 0x08001cff Thumb Code 108 gd32f1x0_adc.o(.text) - adc_interrupt_flag_clear 0x08001d6b Thumb Code 16 gd32f1x0_adc.o(.text) - adc_interrupt_enable 0x08001d7b Thumb Code 68 gd32f1x0_adc.o(.text) - adc_interrupt_disable 0x08001dbf Thumb Code 68 gd32f1x0_adc.o(.text) - adc_watchdog_single_channel_enable 0x08001e03 Thumb Code 40 gd32f1x0_adc.o(.text) - adc_watchdog_group_channel_enable 0x08001e2b Thumb Code 92 gd32f1x0_adc.o(.text) - adc_watchdog_disable 0x08001e87 Thumb Code 18 gd32f1x0_adc.o(.text) - adc_watchdog_threshold_config 0x08001e99 Thumb Code 12 gd32f1x0_adc.o(.text) - dma_deinit 0x08001eb1 Thumb Code 88 gd32f1x0_dma.o(.text) - dma_init 0x08001f09 Thumb Code 270 gd32f1x0_dma.o(.text) - dma_circulation_enable 0x08002017 Thumb Code 30 gd32f1x0_dma.o(.text) - dma_circulation_disable 0x08002035 Thumb Code 30 gd32f1x0_dma.o(.text) - dma_memory_to_memory_enable 0x08002053 Thumb Code 30 gd32f1x0_dma.o(.text) - dma_memory_to_memory_disable 0x08002071 Thumb Code 30 gd32f1x0_dma.o(.text) - dma_channel_enable 0x0800208f Thumb Code 30 gd32f1x0_dma.o(.text) - dma_channel_disable 0x080020ad Thumb Code 30 gd32f1x0_dma.o(.text) - dma_periph_address_config 0x080020cb Thumb Code 14 gd32f1x0_dma.o(.text) - dma_memory_address_config 0x080020d9 Thumb Code 14 gd32f1x0_dma.o(.text) - dma_transfer_number_config 0x080020e7 Thumb Code 14 gd32f1x0_dma.o(.text) - dma_transfer_number_get 0x080020f5 Thumb Code 16 gd32f1x0_dma.o(.text) - dma_priority_config 0x08002105 Thumb Code 34 gd32f1x0_dma.o(.text) - dma_memory_width_config 0x08002127 Thumb Code 34 gd32f1x0_dma.o(.text) - dma_periph_width_config 0x08002149 Thumb Code 34 gd32f1x0_dma.o(.text) - dma_memory_increase_enable 0x0800216b Thumb Code 30 gd32f1x0_dma.o(.text) - dma_memory_increase_disable 0x08002189 Thumb Code 30 gd32f1x0_dma.o(.text) - dma_periph_increase_enable 0x080021a7 Thumb Code 30 gd32f1x0_dma.o(.text) - dma_periph_increase_disable 0x080021c5 Thumb Code 30 gd32f1x0_dma.o(.text) - dma_transfer_direction_config 0x080021e3 Thumb Code 64 gd32f1x0_dma.o(.text) - dma_interrupt_flag_get 0x08002223 Thumb Code 196 gd32f1x0_dma.o(.text) - dma_interrupt_flag_clear 0x080022e7 Thumb Code 18 gd32f1x0_dma.o(.text) - dma_interrupt_enable 0x080022f9 Thumb Code 30 gd32f1x0_dma.o(.text) - dma_interrupt_disable 0x08002317 Thumb Code 30 gd32f1x0_dma.o(.text) - dma_flag_get 0x08002335 Thumb Code 26 gd32f1x0_dma.o(.text) - dma_flag_clear 0x0800234f Thumb Code 18 gd32f1x0_dma.o(.text) - fwdgt_write_disable 0x08002365 Thumb Code 8 gd32f1x0_fwdgt.o(.text) - fwdgt_counter_reload 0x0800236d Thumb Code 10 gd32f1x0_fwdgt.o(.text) - fwdgt_enable 0x08002377 Thumb Code 10 gd32f1x0_fwdgt.o(.text) - fwdgt_window_value_config 0x08002381 Thumb Code 54 gd32f1x0_fwdgt.o(.text) - fwdgt_config 0x080023b7 Thumb Code 94 gd32f1x0_fwdgt.o(.text) - fwdgt_flag_get 0x08002415 Thumb Code 18 gd32f1x0_fwdgt.o(.text) - gpio_deinit 0x08002431 Thumb Code 140 gd32f1x0_gpio.o(.text) - gpio_mode_set 0x080024bd Thumb Code 78 gd32f1x0_gpio.o(.text) - gpio_output_options_set 0x0800250b Thumb Code 66 gd32f1x0_gpio.o(.text) - gpio_bit_set 0x0800254d Thumb Code 4 gd32f1x0_gpio.o(.text) - gpio_bit_reset 0x08002551 Thumb Code 4 gd32f1x0_gpio.o(.text) - gpio_bit_write 0x08002555 Thumb Code 10 gd32f1x0_gpio.o(.text) - gpio_port_write 0x0800255f Thumb Code 4 gd32f1x0_gpio.o(.text) - gpio_input_bit_get 0x08002563 Thumb Code 16 gd32f1x0_gpio.o(.text) - gpio_input_port_get 0x08002573 Thumb Code 8 gd32f1x0_gpio.o(.text) - gpio_output_bit_get 0x0800257b Thumb Code 16 gd32f1x0_gpio.o(.text) - gpio_output_port_get 0x0800258b Thumb Code 8 gd32f1x0_gpio.o(.text) - gpio_af_set 0x08002593 Thumb Code 94 gd32f1x0_gpio.o(.text) - gpio_pin_lock 0x080025f1 Thumb Code 18 gd32f1x0_gpio.o(.text) - nvic_priority_group_set 0x0800260d Thumb Code 10 gd32f1x0_misc.o(.text) - nvic_irq_enable 0x08002617 Thumb Code 156 gd32f1x0_misc.o(.text) - nvic_irq_disable 0x080026b3 Thumb Code 18 gd32f1x0_misc.o(.text) - nvic_vector_table_set 0x080026c5 Thumb Code 14 gd32f1x0_misc.o(.text) - system_lowpower_set 0x080026d3 Thumb Code 16 gd32f1x0_misc.o(.text) - system_lowpower_reset 0x080026e3 Thumb Code 16 gd32f1x0_misc.o(.text) - systick_clksource_set 0x080026f3 Thumb Code 40 gd32f1x0_misc.o(.text) - rcu_deinit 0x08002731 Thumb Code 112 gd32f1x0_rcu.o(.text) - rcu_periph_clock_enable 0x080027a1 Thumb Code 28 gd32f1x0_rcu.o(.text) - rcu_periph_clock_disable 0x080027bd Thumb Code 28 gd32f1x0_rcu.o(.text) - rcu_periph_clock_sleep_enable 0x080027d9 Thumb Code 28 gd32f1x0_rcu.o(.text) - rcu_periph_clock_sleep_disable 0x080027f5 Thumb Code 28 gd32f1x0_rcu.o(.text) - rcu_periph_reset_enable 0x08002811 Thumb Code 28 gd32f1x0_rcu.o(.text) - rcu_periph_reset_disable 0x0800282d Thumb Code 28 gd32f1x0_rcu.o(.text) - rcu_bkp_reset_enable 0x08002849 Thumb Code 14 gd32f1x0_rcu.o(.text) - rcu_bkp_reset_disable 0x08002857 Thumb Code 14 gd32f1x0_rcu.o(.text) - rcu_system_clock_source_config 0x08002865 Thumb Code 22 gd32f1x0_rcu.o(.text) - rcu_system_clock_source_get 0x0800287b Thumb Code 10 gd32f1x0_rcu.o(.text) - rcu_ahb_clock_config 0x08002885 Thumb Code 22 gd32f1x0_rcu.o(.text) - rcu_apb1_clock_config 0x0800289b Thumb Code 22 gd32f1x0_rcu.o(.text) - rcu_apb2_clock_config 0x080028b1 Thumb Code 22 gd32f1x0_rcu.o(.text) - rcu_adc_clock_config 0x080028c7 Thumb Code 148 gd32f1x0_rcu.o(.text) - rcu_usbd_clock_config 0x0800295b Thumb Code 22 gd32f1x0_rcu.o(.text) - rcu_ckout_config 0x08002971 Thumb Code 24 gd32f1x0_rcu.o(.text) - rcu_pll_config 0x08002989 Thumb Code 28 gd32f1x0_rcu.o(.text) - rcu_usart_clock_config 0x080029a5 Thumb Code 22 gd32f1x0_rcu.o(.text) - rcu_cec_clock_config 0x080029bb Thumb Code 22 gd32f1x0_rcu.o(.text) - rcu_rtc_clock_config 0x080029d1 Thumb Code 22 gd32f1x0_rcu.o(.text) - rcu_hxtal_prediv_config 0x080029e7 Thumb Code 20 gd32f1x0_rcu.o(.text) - rcu_lxtal_drive_capability_config 0x080029fb Thumb Code 22 gd32f1x0_rcu.o(.text) - rcu_flag_get 0x08002a11 Thumb Code 30 gd32f1x0_rcu.o(.text) - rcu_all_reset_flag_clear 0x08002a2f Thumb Code 14 gd32f1x0_rcu.o(.text) - rcu_interrupt_flag_get 0x08002a3d Thumb Code 18 gd32f1x0_rcu.o(.text) - rcu_interrupt_flag_clear 0x08002a4f Thumb Code 12 gd32f1x0_rcu.o(.text) - rcu_interrupt_enable 0x08002a5b Thumb Code 12 gd32f1x0_rcu.o(.text) - rcu_interrupt_disable 0x08002a67 Thumb Code 12 gd32f1x0_rcu.o(.text) - rcu_osci_stab_wait 0x08002a73 Thumb Code 284 gd32f1x0_rcu.o(.text) - rcu_osci_on 0x08002b8f Thumb Code 28 gd32f1x0_rcu.o(.text) - rcu_osci_off 0x08002bab Thumb Code 28 gd32f1x0_rcu.o(.text) - rcu_osci_bypass_mode_enable 0x08002bc7 Thumb Code 94 gd32f1x0_rcu.o(.text) - rcu_osci_bypass_mode_disable 0x08002c25 Thumb Code 94 gd32f1x0_rcu.o(.text) - rcu_hxtal_clock_monitor_enable 0x08002c83 Thumb Code 14 gd32f1x0_rcu.o(.text) - rcu_hxtal_clock_monitor_disable 0x08002c91 Thumb Code 14 gd32f1x0_rcu.o(.text) - rcu_irc8m_adjust_value_set 0x08002c9f Thumb Code 20 gd32f1x0_rcu.o(.text) - rcu_irc14m_adjust_value_set 0x08002cb3 Thumb Code 20 gd32f1x0_rcu.o(.text) - rcu_voltage_key_unlock 0x08002cc7 Thumb Code 28 gd32f1x0_rcu.o(.text) - rcu_deepsleep_voltage_set 0x08002ce3 Thumb Code 30 gd32f1x0_rcu.o(.text) - rcu_power_down_voltage_set 0x08002d01 Thumb Code 30 gd32f1x0_rcu.o(.text) - rcu_clock_freq_get 0x08002d1f Thumb Code 690 gd32f1x0_rcu.o(.text) - timer_deinit 0x08002fd9 Thumb Code 210 gd32f1x0_timer.o(.text) - timer_init 0x080030ab Thumb Code 126 gd32f1x0_timer.o(.text) - timer_enable 0x08003129 Thumb Code 10 gd32f1x0_timer.o(.text) - timer_disable 0x08003133 Thumb Code 10 gd32f1x0_timer.o(.text) - timer_auto_reload_shadow_enable 0x0800313d Thumb Code 10 gd32f1x0_timer.o(.text) - timer_auto_reload_shadow_disable 0x08003147 Thumb Code 10 gd32f1x0_timer.o(.text) - timer_update_event_enable 0x08003151 Thumb Code 10 gd32f1x0_timer.o(.text) - timer_update_event_disable 0x0800315b Thumb Code 10 gd32f1x0_timer.o(.text) - timer_counter_alignment 0x08003165 Thumb Code 16 gd32f1x0_timer.o(.text) - timer_counter_up_direction 0x08003175 Thumb Code 14 gd32f1x0_timer.o(.text) - timer_counter_down_direction 0x08003183 Thumb Code 18 gd32f1x0_timer.o(.text) - timer_prescaler_config 0x08003195 Thumb Code 14 gd32f1x0_timer.o(.text) - timer_repetition_value_config 0x080031a3 Thumb Code 4 gd32f1x0_timer.o(.text) - timer_autoreload_value_config 0x080031a7 Thumb Code 4 gd32f1x0_timer.o(.text) - timer_counter_value_config 0x080031ab Thumb Code 4 gd32f1x0_timer.o(.text) - timer_counter_read 0x080031af Thumb Code 8 gd32f1x0_timer.o(.text) - timer_prescaler_read 0x080031b7 Thumb Code 10 gd32f1x0_timer.o(.text) - timer_single_pulse_mode_config 0x080031c1 Thumb Code 26 gd32f1x0_timer.o(.text) - timer_update_source_config 0x080031db Thumb Code 26 gd32f1x0_timer.o(.text) - timer_interrupt_enable 0x080031f5 Thumb Code 8 gd32f1x0_timer.o(.text) - timer_interrupt_disable 0x080031fd Thumb Code 8 gd32f1x0_timer.o(.text) - timer_interrupt_flag_get 0x08003205 Thumb Code 32 gd32f1x0_timer.o(.text) - timer_interrupt_flag_clear 0x08003225 Thumb Code 8 gd32f1x0_timer.o(.text) - timer_flag_get 0x0800322d Thumb Code 18 gd32f1x0_timer.o(.text) - timer_flag_clear 0x0800323f Thumb Code 8 gd32f1x0_timer.o(.text) - timer_dma_enable 0x08003247 Thumb Code 8 gd32f1x0_timer.o(.text) - timer_dma_disable 0x0800324f Thumb Code 8 gd32f1x0_timer.o(.text) - timer_channel_dma_request_source_select 0x08003257 Thumb Code 26 gd32f1x0_timer.o(.text) - timer_dma_transfer_config 0x08003271 Thumb Code 24 gd32f1x0_timer.o(.text) - timer_event_software_generate 0x08003289 Thumb Code 8 gd32f1x0_timer.o(.text) - timer_break_config 0x08003291 Thumb Code 30 gd32f1x0_timer.o(.text) - timer_break_enable 0x080032af Thumb Code 10 gd32f1x0_timer.o(.text) - timer_break_disable 0x080032b9 Thumb Code 8 gd32f1x0_timer.o(.text) - timer_automatic_output_enable 0x080032c1 Thumb Code 10 gd32f1x0_timer.o(.text) - timer_automatic_output_disable 0x080032cb Thumb Code 8 gd32f1x0_timer.o(.text) - timer_primary_output_config 0x080032d3 Thumb Code 22 gd32f1x0_timer.o(.text) - timer_channel_control_shadow_config 0x080032e9 Thumb Code 22 gd32f1x0_timer.o(.text) - timer_channel_control_shadow_update_config 0x080032ff Thumb Code 26 gd32f1x0_timer.o(.text) - timer_channel_output_config 0x08003319 Thumb Code 472 gd32f1x0_timer.o(.text) - timer_channel_output_mode_config 0x080034f1 Thumb Code 90 gd32f1x0_timer.o(.text) - timer_channel_output_pulse_value_config 0x0800354b Thumb Code 38 gd32f1x0_timer.o(.text) - timer_channel_output_shadow_config 0x08003571 Thumb Code 90 gd32f1x0_timer.o(.text) - timer_channel_output_fast_config 0x080035cb Thumb Code 90 gd32f1x0_timer.o(.text) - timer_channel_output_clear_config 0x08003625 Thumb Code 90 gd32f1x0_timer.o(.text) - timer_channel_output_polarity_config 0x0800367f Thumb Code 92 gd32f1x0_timer.o(.text) - timer_channel_complementary_output_polarity_config 0x080036db Thumb Code 70 gd32f1x0_timer.o(.text) - timer_ocpre_clear_source_config 0x08003721 Thumb Code 26 gd32f1x0_timer.o(.text) - timer_channel_output_state_config 0x0800373b Thumb Code 92 gd32f1x0_timer.o(.text) - timer_channel_complementary_output_state_config 0x08003797 Thumb Code 70 gd32f1x0_timer.o(.text) - timer_channel_input_capture_prescaler_config 0x080037dd Thumb Code 90 gd32f1x0_timer.o(.text) - timer_input_capture_config 0x08003837 Thumb Code 332 gd32f1x0_timer.o(.text) - timer_channel_capture_value_register_read 0x08003983 Thumb Code 42 gd32f1x0_timer.o(.text) - timer_input_pwm_capture_config 0x080039ad Thumb Code 352 gd32f1x0_timer.o(.text) - timer_hall_mode_config 0x08003b0d Thumb Code 26 gd32f1x0_timer.o(.text) - timer_input_trigger_source_select 0x08003b27 Thumb Code 16 gd32f1x0_timer.o(.text) - timer_master_output_trigger_source_select 0x08003b37 Thumb Code 16 gd32f1x0_timer.o(.text) - timer_slave_mode_select 0x08003b47 Thumb Code 16 gd32f1x0_timer.o(.text) - timer_master_slave_mode_config 0x08003b57 Thumb Code 26 gd32f1x0_timer.o(.text) - timer_external_trigger_config 0x08003b71 Thumb Code 30 gd32f1x0_timer.o(.text) - timer_quadrature_decoder_mode_config 0x08003b8f Thumb Code 64 gd32f1x0_timer.o(.text) - timer_internal_clock_config 0x08003bcf Thumb Code 8 gd32f1x0_timer.o(.text) - timer_internal_trigger_as_external_clock_config 0x08003bd7 Thumb Code 32 gd32f1x0_timer.o(.text) - timer_external_trigger_as_external_clock_config 0x08003bf7 Thumb Code 164 gd32f1x0_timer.o(.text) - timer_external_clock_mode0_config 0x08003c9b Thumb Code 56 gd32f1x0_timer.o(.text) - timer_external_clock_mode1_config 0x08003cd3 Thumb Code 32 gd32f1x0_timer.o(.text) - timer_external_clock_mode1_disable 0x08003cf3 Thumb Code 10 gd32f1x0_timer.o(.text) - timer_channel_remap_config 0x08003cfd Thumb Code 6 gd32f1x0_timer.o(.text) - usart_deinit 0x08003d05 Thumb Code 58 gd32f1x0_usart.o(.text) - usart_baudrate_set 0x08003d3f Thumb Code 120 gd32f1x0_usart.o(.text) - usart_parity_config 0x08003db7 Thumb Code 24 gd32f1x0_usart.o(.text) - usart_word_length_set 0x08003dcf Thumb Code 24 gd32f1x0_usart.o(.text) - usart_stop_bit_set 0x08003de7 Thumb Code 24 gd32f1x0_usart.o(.text) - usart_enable 0x08003dff Thumb Code 10 gd32f1x0_usart.o(.text) - usart_disable 0x08003e09 Thumb Code 10 gd32f1x0_usart.o(.text) - usart_transmit_config 0x08003e13 Thumb Code 16 gd32f1x0_usart.o(.text) - usart_receive_config 0x08003e23 Thumb Code 16 gd32f1x0_usart.o(.text) - usart_data_transmit 0x08003e33 Thumb Code 8 gd32f1x0_usart.o(.text) - usart_data_receive 0x08003e3b Thumb Code 10 gd32f1x0_usart.o(.text) - usart_data_first_config 0x08003e45 Thumb Code 28 gd32f1x0_usart.o(.text) - usart_invert_config 0x08003e61 Thumb Code 110 gd32f1x0_usart.o(.text) - usart_overrun_enable 0x08003ecf Thumb Code 18 gd32f1x0_usart.o(.text) - usart_overrun_disable 0x08003ee1 Thumb Code 18 gd32f1x0_usart.o(.text) - usart_oversample_config 0x08003ef3 Thumb Code 24 gd32f1x0_usart.o(.text) - usart_sample_bit_config 0x08003f0b Thumb Code 24 gd32f1x0_usart.o(.text) - usart_autobaud_detection_enable 0x08003f23 Thumb Code 10 gd32f1x0_usart.o(.text) - usart_autobaud_detection_disable 0x08003f2d Thumb Code 10 gd32f1x0_usart.o(.text) - usart_autobaud_detection_mode_config 0x08003f37 Thumb Code 16 gd32f1x0_usart.o(.text) - usart_mute_mode_enable 0x08003f47 Thumb Code 10 gd32f1x0_usart.o(.text) - usart_mute_mode_disable 0x08003f51 Thumb Code 10 gd32f1x0_usart.o(.text) - usart_mute_mode_wakeup_config 0x08003f5b Thumb Code 24 gd32f1x0_usart.o(.text) - usart_address_detection_mode_config 0x08003f73 Thumb Code 28 gd32f1x0_usart.o(.text) - usart_address_config 0x08003f8f Thumb Code 32 gd32f1x0_usart.o(.text) - usart_receiver_timeout_enable 0x08003faf Thumb Code 10 gd32f1x0_usart.o(.text) - usart_receiver_timeout_disable 0x08003fb9 Thumb Code 10 gd32f1x0_usart.o(.text) - usart_receiver_timeout_config 0x08003fc3 Thumb Code 16 gd32f1x0_usart.o(.text) - usart_lin_mode_enable 0x08003fd3 Thumb Code 18 gd32f1x0_usart.o(.text) - usart_lin_mode_disable 0x08003fe5 Thumb Code 18 gd32f1x0_usart.o(.text) - usart_lin_break_dection_length_config 0x08003ff7 Thumb Code 20 gd32f1x0_usart.o(.text) - usart_halfduplex_enable 0x0800400b Thumb Code 18 gd32f1x0_usart.o(.text) - usart_halfduplex_disable 0x0800401d Thumb Code 18 gd32f1x0_usart.o(.text) - usart_clock_enable 0x0800402f Thumb Code 18 gd32f1x0_usart.o(.text) - usart_clock_disable 0x08004041 Thumb Code 18 gd32f1x0_usart.o(.text) - usart_synchronous_clock_config 0x08004053 Thumb Code 50 gd32f1x0_usart.o(.text) - usart_smartcard_mode_enable 0x08004085 Thumb Code 18 gd32f1x0_usart.o(.text) - usart_smartcard_mode_disable 0x08004097 Thumb Code 18 gd32f1x0_usart.o(.text) - usart_smartcard_mode_nack_enable 0x080040a9 Thumb Code 18 gd32f1x0_usart.o(.text) - usart_smartcard_mode_nack_disable 0x080040bb Thumb Code 18 gd32f1x0_usart.o(.text) - usart_guard_time_config 0x080040cd Thumb Code 36 gd32f1x0_usart.o(.text) - usart_block_length_config 0x080040f1 Thumb Code 24 gd32f1x0_usart.o(.text) - usart_smartcard_autoretry_config 0x08004109 Thumb Code 32 gd32f1x0_usart.o(.text) - usart_irda_mode_enable 0x08004129 Thumb Code 18 gd32f1x0_usart.o(.text) - usart_irda_mode_disable 0x0800413b Thumb Code 18 gd32f1x0_usart.o(.text) - usart_irda_lowpower_config 0x0800414d Thumb Code 20 gd32f1x0_usart.o(.text) - usart_prescaler_config 0x08004161 Thumb Code 24 gd32f1x0_usart.o(.text) - usart_hardware_flow_rts_config 0x08004179 Thumb Code 24 gd32f1x0_usart.o(.text) - usart_hardware_flow_cts_config 0x08004191 Thumb Code 24 gd32f1x0_usart.o(.text) - usart_rs485_driver_enable 0x080041a9 Thumb Code 18 gd32f1x0_usart.o(.text) - usart_rs485_driver_disable 0x080041bb Thumb Code 18 gd32f1x0_usart.o(.text) - usart_driver_assertime_config 0x080041cd Thumb Code 32 gd32f1x0_usart.o(.text) - usart_driver_deassertime_config 0x080041ed Thumb Code 32 gd32f1x0_usart.o(.text) - usart_depolarity_config 0x0800420d Thumb Code 28 gd32f1x0_usart.o(.text) - usart_dma_receive_config 0x08004229 Thumb Code 16 gd32f1x0_usart.o(.text) - usart_dma_transmit_config 0x08004239 Thumb Code 16 gd32f1x0_usart.o(.text) - usart_reception_error_dma_disable 0x08004249 Thumb Code 18 gd32f1x0_usart.o(.text) - usart_reception_error_dma_enable 0x0800425b Thumb Code 18 gd32f1x0_usart.o(.text) - usart_wakeup_enable 0x0800426d Thumb Code 10 gd32f1x0_usart.o(.text) - usart_wakeup_disable 0x08004277 Thumb Code 10 gd32f1x0_usart.o(.text) - usart_wakeup_mode_config 0x08004281 Thumb Code 28 gd32f1x0_usart.o(.text) - usart_flag_get 0x0800429d Thumb Code 30 gd32f1x0_usart.o(.text) - usart_flag_clear 0x080042bb Thumb Code 18 gd32f1x0_usart.o(.text) - usart_interrupt_enable 0x080042cd Thumb Code 26 gd32f1x0_usart.o(.text) - usart_interrupt_disable 0x080042e7 Thumb Code 26 gd32f1x0_usart.o(.text) - usart_command_enable 0x08004301 Thumb Code 8 gd32f1x0_usart.o(.text) - usart_interrupt_flag_get 0x08004309 Thumb Code 56 gd32f1x0_usart.o(.text) - usart_interrupt_flag_clear 0x08004341 Thumb Code 18 gd32f1x0_usart.o(.text) - Reset_Handler 0x08004355 Thumb Code 8 startup_gd32f1x0.o(.text) - ADC_CMP_IRQHandler 0x0800436f Thumb Code 0 startup_gd32f1x0.o(.text) - CAN0_RX0_IRQHandler 0x0800436f Thumb Code 0 startup_gd32f1x0.o(.text) - CAN0_RX1_IRQHandler 0x0800436f Thumb Code 0 startup_gd32f1x0.o(.text) - CAN0_SCE_IRQHandler 0x0800436f Thumb Code 0 startup_gd32f1x0.o(.text) - CAN0_TX_IRQHandler 0x0800436f Thumb Code 0 startup_gd32f1x0.o(.text) - CAN1_RX0_IRQHandler 0x0800436f Thumb Code 0 startup_gd32f1x0.o(.text) - CAN1_RX1_IRQHandler 0x0800436f Thumb Code 0 startup_gd32f1x0.o(.text) - CAN1_SCE_IRQHandler 0x0800436f Thumb Code 0 startup_gd32f1x0.o(.text) - CAN1_TX_IRQHandler 0x0800436f Thumb Code 0 startup_gd32f1x0.o(.text) - CEC_IRQHandler 0x0800436f Thumb Code 0 startup_gd32f1x0.o(.text) - DMA_Channel5_6_IRQHandler 0x0800436f Thumb Code 0 startup_gd32f1x0.o(.text) - EXTI0_1_IRQHandler 0x0800436f Thumb Code 0 startup_gd32f1x0.o(.text) - EXTI2_3_IRQHandler 0x0800436f Thumb Code 0 startup_gd32f1x0.o(.text) - EXTI4_15_IRQHandler 0x0800436f Thumb Code 0 startup_gd32f1x0.o(.text) - FMC_IRQHandler 0x0800436f Thumb Code 0 startup_gd32f1x0.o(.text) - I2C0_ER_IRQHandler 0x0800436f Thumb Code 0 startup_gd32f1x0.o(.text) - I2C0_EV_IRQHandler 0x0800436f Thumb Code 0 startup_gd32f1x0.o(.text) - I2C1_ER_IRQHandler 0x0800436f Thumb Code 0 startup_gd32f1x0.o(.text) - I2C1_EV_IRQHandler 0x0800436f Thumb Code 0 startup_gd32f1x0.o(.text) - I2C2_ER_IRQHandler 0x0800436f Thumb Code 0 startup_gd32f1x0.o(.text) - I2C2_EV_IRQHandler 0x0800436f Thumb Code 0 startup_gd32f1x0.o(.text) - LVD_IRQHandler 0x0800436f Thumb Code 0 startup_gd32f1x0.o(.text) - RCU_IRQHandler 0x0800436f Thumb Code 0 startup_gd32f1x0.o(.text) - RTC_IRQHandler 0x0800436f Thumb Code 0 startup_gd32f1x0.o(.text) - SLCD_IRQHandler 0x0800436f Thumb Code 0 startup_gd32f1x0.o(.text) - SPI0_IRQHandler 0x0800436f Thumb Code 0 startup_gd32f1x0.o(.text) - SPI1_IRQHandler 0x0800436f Thumb Code 0 startup_gd32f1x0.o(.text) - SPI2_IRQHandler 0x0800436f Thumb Code 0 startup_gd32f1x0.o(.text) - TIMER0_Channel_IRQHandler 0x0800436f Thumb Code 0 startup_gd32f1x0.o(.text) - TIMER14_IRQHandler 0x0800436f Thumb Code 0 startup_gd32f1x0.o(.text) - TIMER15_IRQHandler 0x0800436f Thumb Code 0 startup_gd32f1x0.o(.text) - TIMER16_IRQHandler 0x0800436f Thumb Code 0 startup_gd32f1x0.o(.text) - TIMER1_IRQHandler 0x0800436f Thumb Code 0 startup_gd32f1x0.o(.text) - TIMER2_IRQHandler 0x0800436f Thumb Code 0 startup_gd32f1x0.o(.text) - TIMER5_DAC_IRQHandler 0x0800436f Thumb Code 0 startup_gd32f1x0.o(.text) - TSI_IRQHandler 0x0800436f Thumb Code 0 startup_gd32f1x0.o(.text) - USART0_IRQHandler 0x0800436f Thumb Code 0 startup_gd32f1x0.o(.text) - USART1_IRQHandler 0x0800436f Thumb Code 0 startup_gd32f1x0.o(.text) - USBDWakeUp_IRQHandler 0x0800436f Thumb Code 0 startup_gd32f1x0.o(.text) - USBD_HP_IRQHandler 0x0800436f Thumb Code 0 startup_gd32f1x0.o(.text) - USBD_LP_IRQHandler 0x0800436f Thumb Code 0 startup_gd32f1x0.o(.text) - WWDGT_IRQHandler 0x0800436f Thumb Code 0 startup_gd32f1x0.o(.text) - __user_initial_stackheap 0x08004371 Thumb Code 10 startup_gd32f1x0.o(.text) - SystemInit 0x08004407 Thumb Code 118 system_gd32f1x0.o(.text) - SystemCoreClockUpdate 0x0800447d Thumb Code 208 system_gd32f1x0.o(.text) - __aeabi_memcpy4 0x08004581 Thumb Code 0 rt_memcpy_w.o(.text) - __aeabi_memcpy8 0x08004581 Thumb Code 0 rt_memcpy_w.o(.text) - __rt_memcpy_w 0x08004581 Thumb Code 100 rt_memcpy_w.o(.text) - _memcpy_lastbytes_aligned 0x080045c9 Thumb Code 0 rt_memcpy_w.o(.text) - __use_two_region_memory 0x080045e5 Thumb Code 2 heapauxi.o(.text) - __rt_heap_escrow$2region 0x080045e7 Thumb Code 2 heapauxi.o(.text) - __rt_heap_expand$2region 0x080045e9 Thumb Code 2 heapauxi.o(.text) - __user_setup_stackheap 0x080045eb Thumb Code 74 sys_stackheap_outer.o(.text) - exit 0x08004635 Thumb Code 18 exit.o(.text) - __user_libspace 0x08004649 Thumb Code 8 libspace.o(.text) - __user_perproc_libspace 0x08004649 Thumb Code 0 libspace.o(.text) - __user_perthread_libspace 0x08004649 Thumb Code 0 libspace.o(.text) - _sys_exit 0x08004651 Thumb Code 8 sys_exit.o(.text) - __I$use$semihosting 0x0800465d Thumb Code 0 use_no_semi.o(.text) - __use_no_semihosting_swi 0x0800465d Thumb Code 2 use_no_semi.o(.text) - __semihosting_library_function 0x0800465f Thumb Code 0 indicate_semi.o(.text) - blockPWM 0x0800465f Thumb Code 106 bldc.o(i.blockPWM) - __aeabi_d2f 0x080046c9 Thumb Code 0 d2f.o(x$fpl$d2f) - _d2f 0x080046c9 Thumb Code 98 d2f.o(x$fpl$d2f) - __aeabi_dadd 0x0800472d Thumb Code 0 daddsub_clz.o(x$fpl$dadd) - _dadd 0x0800472d Thumb Code 332 daddsub_clz.o(x$fpl$dadd) - __fpl_dcmp_Inf 0x0800487d Thumb Code 24 dcmpi.o(x$fpl$dcmpinf) - __aeabi_ddiv 0x08004895 Thumb Code 0 ddiv.o(x$fpl$ddiv) - _ddiv 0x08004895 Thumb Code 552 ddiv.o(x$fpl$ddiv) - __aeabi_i2d 0x08004b45 Thumb Code 0 dflt_clz.o(x$fpl$dflt) - _dflt 0x08004b45 Thumb Code 46 dflt_clz.o(x$fpl$dflt) - __aeabi_cdcmple 0x08004b75 Thumb Code 0 dleqf.o(x$fpl$dleqf) - _dcmple 0x08004b75 Thumb Code 120 dleqf.o(x$fpl$dleqf) - __fpl_dcmple_InfNaN 0x08004bd7 Thumb Code 0 dleqf.o(x$fpl$dleqf) - __aeabi_dmul 0x08004bed Thumb Code 0 dmul.o(x$fpl$dmul) - _dmul 0x08004bed Thumb Code 332 dmul.o(x$fpl$dmul) - __fpl_dnaninf 0x08004d41 Thumb Code 156 dnaninf.o(x$fpl$dnaninf) - __fpl_dretinf 0x08004ddd Thumb Code 12 dretinf.o(x$fpl$dretinf) - __aeabi_cdrcmple 0x08004de9 Thumb Code 0 drleqf.o(x$fpl$drleqf) - _drcmple 0x08004de9 Thumb Code 108 drleqf.o(x$fpl$drleqf) - __aeabi_dsub 0x08004e55 Thumb Code 0 daddsub_clz.o(x$fpl$dsub) - _dsub 0x08004e55 Thumb Code 464 daddsub_clz.o(x$fpl$dsub) - __aeabi_f2d 0x08005029 Thumb Code 0 f2d.o(x$fpl$f2d) - _f2d 0x08005029 Thumb Code 86 f2d.o(x$fpl$f2d) - __aeabi_fadd 0x08005081 Thumb Code 0 faddsub_clz.o(x$fpl$fadd) - _fadd 0x08005081 Thumb Code 196 faddsub_clz.o(x$fpl$fadd) - __fpl_fcmp_Inf 0x08005145 Thumb Code 24 fcmpi.o(x$fpl$fcmpinf) - __aeabi_fdiv 0x0800515d Thumb Code 0 fdiv.o(x$fpl$fdiv) - _fdiv 0x0800515d Thumb Code 384 fdiv.o(x$fpl$fdiv) - __aeabi_f2iz 0x080052e1 Thumb Code 0 ffix.o(x$fpl$ffix) - _ffix 0x080052e1 Thumb Code 54 ffix.o(x$fpl$ffix) - __aeabi_f2uiz 0x08005319 Thumb Code 0 ffixu.o(x$fpl$ffixu) - _ffixu 0x08005319 Thumb Code 62 ffixu.o(x$fpl$ffixu) - __aeabi_i2f 0x08005359 Thumb Code 0 fflt_clz.o(x$fpl$fflt) - _fflt 0x08005359 Thumb Code 48 fflt_clz.o(x$fpl$fflt) - __aeabi_ui2f 0x08005389 Thumb Code 0 fflt_clz.o(x$fpl$ffltu) - _ffltu 0x08005389 Thumb Code 38 fflt_clz.o(x$fpl$ffltu) - __aeabi_cfcmple 0x080053b1 Thumb Code 0 fleqf.o(x$fpl$fleqf) - _fcmple 0x080053b1 Thumb Code 104 fleqf.o(x$fpl$fleqf) - __fpl_fcmple_InfNaN 0x08005403 Thumb Code 0 fleqf.o(x$fpl$fleqf) - __aeabi_fmul 0x08005419 Thumb Code 0 fmul.o(x$fpl$fmul) - _fmul 0x08005419 Thumb Code 258 fmul.o(x$fpl$fmul) - __fpl_fnaninf 0x0800551b Thumb Code 140 fnaninf.o(x$fpl$fnaninf) - __fpl_fretinf 0x080055a7 Thumb Code 10 fretinf.o(x$fpl$fretinf) - __aeabi_cfrcmple 0x080055b1 Thumb Code 0 frleqf.o(x$fpl$frleqf) - _frcmple 0x080055b1 Thumb Code 98 frleqf.o(x$fpl$frleqf) - __aeabi_fsub 0x08005615 Thumb Code 0 faddsub_clz.o(x$fpl$fsub) - _fsub 0x08005615 Thumb Code 234 faddsub_clz.o(x$fpl$fsub) - __I$use$fp 0x080056fe Number 0 usenofp.o(x$fpl$usenofp) - lookUpTableAngle 0x08005700 Data 724 main.o(.constdata) - pwm_res 0x080059d4 Data 2 bldc.o(.constdata) - hall_to_pos 0x080059d6 Data 8 bldc.o(.constdata) - Region$$Table$$Base 0x080059e0 Number 0 anon$$obj.o(Region$$Table) - Region$$Table$$Limit 0x08005a00 Number 0 anon$$obj.o(Region$$Table) - steer 0x20000000 Data 4 main.o(.data) - speed 0x20000004 Data 4 main.o(.data) - activateWeakening 0x20000008 Data 1 main.o(.data) - beepsBackwards 0x20000009 Data 1 main.o(.data) - slaveError 0x2000000a Data 1 main.o(.data) - inactivity_timeout_counter 0x2000000c Data 4 main.o(.data) - steerCounter 0x20000010 Data 4 main.o(.data) - batteryVoltage 0x20000014 Data 4 bldc.o(.data) - currentDC 0x20000018 Data 4 bldc.o(.data) - realSpeed 0x2000001c Data 4 bldc.o(.data) - bldc_inputFilterPwm 0x20000020 Data 2 bldc.o(.data) - bldc_enable 0x20000022 Data 1 bldc.o(.data) - adc_buffer 0x20000024 Data 4 bldc.o(.data) - hall_a 0x20000028 Data 1 bldc.o(.data) - hall_b 0x20000029 Data 1 bldc.o(.data) - hall_c 0x2000002a Data 1 bldc.o(.data) - hall 0x2000002b Data 1 bldc.o(.data) - pos 0x2000002c Data 1 bldc.o(.data) - lastPos 0x2000002d Data 1 bldc.o(.data) - bldc_outputFilterPwm 0x2000002e Data 2 bldc.o(.data) - filter_reg 0x20000030 Data 4 bldc.o(.data) - buzzerToggle 0x20000034 Data 1 bldc.o(.data) - buzzerFreq 0x20000035 Data 1 bldc.o(.data) - buzzerPattern 0x20000036 Data 1 bldc.o(.data) - buzzerTimer 0x20000038 Data 2 bldc.o(.data) - offsetcount 0x2000003a Data 2 bldc.o(.data) - offsetdc 0x2000003c Data 2 bldc.o(.data) - speedCounter 0x20000040 Data 4 bldc.o(.data) - usartMasterSlave_rx_buf 0x20000044 Data 1 setup.o(.data) - usartSteer_COM_rx_buf 0x20000045 Data 1 setup.o(.data) - msTicks 0x20000048 Data 4 it.o(.data) - timeoutCounter_ms 0x2000004c Data 4 it.o(.data) - timedOut 0x20000050 Data 1 it.o(.data) - SystemCoreClock 0x20000064 Data 4 system_gd32f1x0.o(.data) - timeoutTimer_paramter_struct 0x20000068 Data 16 setup.o(.bss) - timerBldc_paramter_struct 0x20000078 Data 16 setup.o(.bss) - timerBldc_break_parameter_struct 0x20000088 Data 14 setup.o(.bss) - timerBldc_oc_parameter_struct 0x20000096 Data 12 setup.o(.bss) - dma_init_struct_usart 0x200000a4 Data 36 setup.o(.bss) - dma_init_struct_adc 0x200000c8 Data 36 setup.o(.bss) - __libspace_start 0x200000ec Data 96 libspace.o(.bss) - __temporary_stack_top$libspace 0x2000014c Data 0 libspace.o(.bss) - - - -============================================================================== - -Memory Map of the image - - Image Entry point : 0x08000169 - - Load Region LR_IROM1 (Base: 0x08000000, Size: 0x00005a68, Max: 0x00010000, ABSOLUTE) - - Execution Region ER_IROM1 (Exec base: 0x08000000, Load base: 0x08000000, Size: 0x00005a00, Max: 0x00010000, ABSOLUTE) - - Exec Addr Load Addr Size Type Attr Idx E Section Name Object - - 0x08000000 0x08000000 0x00000168 Data RO 691 RESET startup_gd32f1x0.o - 0x08000168 0x08000168 0x00000008 Code RO 732 * !!!main c_w.l(__main.o) - 0x08000170 0x08000170 0x00000034 Code RO 958 !!!scatter c_w.l(__scatter.o) - 0x080001a4 0x080001a4 0x0000001a Code RO 960 !!handler_copy c_w.l(__scatter_copy.o) - 0x080001be 0x080001be 0x00000002 PAD - 0x080001c0 0x080001c0 0x0000001c Code RO 962 !!handler_zi c_w.l(__scatter_zi.o) - 0x080001dc 0x080001dc 0x00000002 Code RO 828 .ARM.Collect$$libinit$$00000000 c_w.l(libinit.o) - 0x080001de 0x080001de 0x00000000 Code RO 835 .ARM.Collect$$libinit$$00000002 c_w.l(libinit2.o) - 0x080001de 0x080001de 0x00000000 Code RO 837 .ARM.Collect$$libinit$$00000004 c_w.l(libinit2.o) - 0x080001de 0x080001de 0x00000000 Code RO 840 .ARM.Collect$$libinit$$0000000A c_w.l(libinit2.o) - 0x080001de 0x080001de 0x00000000 Code RO 842 .ARM.Collect$$libinit$$0000000C c_w.l(libinit2.o) - 0x080001de 0x080001de 0x00000000 Code RO 844 .ARM.Collect$$libinit$$0000000E c_w.l(libinit2.o) - 0x080001de 0x080001de 0x00000000 Code RO 847 .ARM.Collect$$libinit$$00000011 c_w.l(libinit2.o) - 0x080001de 0x080001de 0x00000000 Code RO 849 .ARM.Collect$$libinit$$00000013 c_w.l(libinit2.o) - 0x080001de 0x080001de 0x00000000 Code RO 851 .ARM.Collect$$libinit$$00000015 c_w.l(libinit2.o) - 0x080001de 0x080001de 0x00000000 Code RO 853 .ARM.Collect$$libinit$$00000017 c_w.l(libinit2.o) - 0x080001de 0x080001de 0x00000000 Code RO 855 .ARM.Collect$$libinit$$00000019 c_w.l(libinit2.o) - 0x080001de 0x080001de 0x00000000 Code RO 857 .ARM.Collect$$libinit$$0000001B c_w.l(libinit2.o) - 0x080001de 0x080001de 0x00000000 Code RO 859 .ARM.Collect$$libinit$$0000001D c_w.l(libinit2.o) - 0x080001de 0x080001de 0x00000000 Code RO 861 .ARM.Collect$$libinit$$0000001F c_w.l(libinit2.o) - 0x080001de 0x080001de 0x00000000 Code RO 863 .ARM.Collect$$libinit$$00000021 c_w.l(libinit2.o) - 0x080001de 0x080001de 0x00000000 Code RO 865 .ARM.Collect$$libinit$$00000023 c_w.l(libinit2.o) - 0x080001de 0x080001de 0x00000000 Code RO 867 .ARM.Collect$$libinit$$00000025 c_w.l(libinit2.o) - 0x080001de 0x080001de 0x00000000 Code RO 871 .ARM.Collect$$libinit$$0000002C c_w.l(libinit2.o) - 0x080001de 0x080001de 0x00000000 Code RO 873 .ARM.Collect$$libinit$$0000002E c_w.l(libinit2.o) - 0x080001de 0x080001de 0x00000000 Code RO 875 .ARM.Collect$$libinit$$00000030 c_w.l(libinit2.o) - 0x080001de 0x080001de 0x00000000 Code RO 877 .ARM.Collect$$libinit$$00000032 c_w.l(libinit2.o) - 0x080001de 0x080001de 0x00000002 Code RO 878 .ARM.Collect$$libinit$$00000033 c_w.l(libinit2.o) - 0x080001e0 0x080001e0 0x00000002 Code RO 898 .ARM.Collect$$libshutdown$$00000000 c_w.l(libshutdown.o) - 0x080001e2 0x080001e2 0x00000000 Code RO 911 .ARM.Collect$$libshutdown$$00000002 c_w.l(libshutdown2.o) - 0x080001e2 0x080001e2 0x00000000 Code RO 913 .ARM.Collect$$libshutdown$$00000004 c_w.l(libshutdown2.o) - 0x080001e2 0x080001e2 0x00000000 Code RO 916 .ARM.Collect$$libshutdown$$00000007 c_w.l(libshutdown2.o) - 0x080001e2 0x080001e2 0x00000000 Code RO 919 .ARM.Collect$$libshutdown$$0000000A c_w.l(libshutdown2.o) - 0x080001e2 0x080001e2 0x00000000 Code RO 921 .ARM.Collect$$libshutdown$$0000000C c_w.l(libshutdown2.o) - 0x080001e2 0x080001e2 0x00000000 Code RO 924 .ARM.Collect$$libshutdown$$0000000F c_w.l(libshutdown2.o) - 0x080001e2 0x080001e2 0x00000002 Code RO 925 .ARM.Collect$$libshutdown$$00000010 c_w.l(libshutdown2.o) - 0x080001e4 0x080001e4 0x00000000 Code RO 790 .ARM.Collect$$rtentry$$00000000 c_w.l(__rtentry.o) - 0x080001e4 0x080001e4 0x00000000 Code RO 805 .ARM.Collect$$rtentry$$00000002 c_w.l(__rtentry2.o) - 0x080001e4 0x080001e4 0x00000006 Code RO 817 .ARM.Collect$$rtentry$$00000004 c_w.l(__rtentry4.o) - 0x080001ea 0x080001ea 0x00000000 Code RO 807 .ARM.Collect$$rtentry$$00000009 c_w.l(__rtentry2.o) - 0x080001ea 0x080001ea 0x00000004 Code RO 808 .ARM.Collect$$rtentry$$0000000A c_w.l(__rtentry2.o) - 0x080001ee 0x080001ee 0x00000000 Code RO 810 .ARM.Collect$$rtentry$$0000000C c_w.l(__rtentry2.o) - 0x080001ee 0x080001ee 0x00000008 Code RO 811 .ARM.Collect$$rtentry$$0000000D c_w.l(__rtentry2.o) - 0x080001f6 0x080001f6 0x00000002 Code RO 832 .ARM.Collect$$rtexit$$00000000 c_w.l(rtexit.o) - 0x080001f8 0x080001f8 0x00000000 Code RO 880 .ARM.Collect$$rtexit$$00000002 c_w.l(rtexit2.o) - 0x080001f8 0x080001f8 0x00000004 Code RO 881 .ARM.Collect$$rtexit$$00000003 c_w.l(rtexit2.o) - 0x080001fc 0x080001fc 0x00000006 Code RO 882 .ARM.Collect$$rtexit$$00000004 c_w.l(rtexit2.o) - 0x08000202 0x08000202 0x00000002 PAD - 0x08000204 0x08000204 0x00000650 Code RO 4 .text main.o - 0x08000854 0x08000854 0x000003c4 Code RO 148 .text bldc.o - 0x08000c18 0x08000c18 0x00000804 Code RO 187 .text setup.o - 0x0800141c 0x0800141c 0x00000108 Code RO 216 .text it.o - 0x08001524 0x08001524 0x00000070 Code RO 250 .text comms.o - 0x08001594 0x08001594 0x000000d8 Code RO 301 .text commssteering.o - 0x0800166c 0x0800166c 0x000001c0 Code RO 328 .text commsmasterslave.o - 0x0800182c 0x0800182c 0x00000684 Code RO 376 .text gd32f1x0_adc.o - 0x08001eb0 0x08001eb0 0x000004b4 Code RO 424 .text gd32f1x0_dma.o - 0x08002364 0x08002364 0x000000cc Code RO 448 .text gd32f1x0_fwdgt.o - 0x08002430 0x08002430 0x000001dc Code RO 472 .text gd32f1x0_gpio.o - 0x0800260c 0x0800260c 0x00000124 Code RO 520 .text gd32f1x0_misc.o - 0x08002730 0x08002730 0x000008a8 Code RO 572 .text gd32f1x0_rcu.o - 0x08002fd8 0x08002fd8 0x00000d2a Code RO 620 .text gd32f1x0_timer.o - 0x08003d02 0x08003d02 0x00000002 PAD - 0x08003d04 0x08003d04 0x0000064e Code RO 644 .text gd32f1x0_usart.o - 0x08004352 0x08004352 0x00000002 PAD - 0x08004354 0x08004354 0x00000040 Code RO 692 .text startup_gd32f1x0.o - 0x08004394 0x08004394 0x000001ec Code RO 699 .text system_gd32f1x0.o - 0x08004580 0x08004580 0x00000064 Code RO 728 .text c_w.l(rt_memcpy_w.o) - 0x080045e4 0x080045e4 0x00000006 Code RO 730 .text c_w.l(heapauxi.o) - 0x080045ea 0x080045ea 0x0000004a Code RO 819 .text c_w.l(sys_stackheap_outer.o) - 0x08004634 0x08004634 0x00000012 Code RO 821 .text c_w.l(exit.o) - 0x08004646 0x08004646 0x00000002 PAD - 0x08004648 0x08004648 0x00000008 Code RO 829 .text c_w.l(libspace.o) - 0x08004650 0x08004650 0x0000000c Code RO 890 .text c_w.l(sys_exit.o) - 0x0800465c 0x0800465c 0x00000002 Code RO 901 .text c_w.l(use_no_semi.o) - 0x0800465e 0x0800465e 0x00000000 Code RO 903 .text c_w.l(indicate_semi.o) - 0x0800465e 0x0800465e 0x0000006a Code RO 170 i.blockPWM bldc.o - 0x080046c8 0x080046c8 0x00000062 Code RO 734 x$fpl$d2f fz_ws.l(d2f.o) - 0x0800472a 0x0800472a 0x00000002 PAD - 0x0800472c 0x0800472c 0x00000150 Code RO 736 x$fpl$dadd fz_ws.l(daddsub_clz.o) - 0x0800487c 0x0800487c 0x00000018 Code RO 791 x$fpl$dcmpinf fz_ws.l(dcmpi.o) - 0x08004894 0x08004894 0x000002b0 Code RO 743 x$fpl$ddiv fz_ws.l(ddiv.o) - 0x08004b44 0x08004b44 0x0000002e Code RO 747 x$fpl$dflt fz_ws.l(dflt_clz.o) - 0x08004b72 0x08004b72 0x00000002 PAD - 0x08004b74 0x08004b74 0x00000078 Code RO 752 x$fpl$dleqf fz_ws.l(dleqf.o) - 0x08004bec 0x08004bec 0x00000154 Code RO 754 x$fpl$dmul fz_ws.l(dmul.o) - 0x08004d40 0x08004d40 0x0000009c Code RO 793 x$fpl$dnaninf fz_ws.l(dnaninf.o) - 0x08004ddc 0x08004ddc 0x0000000c Code RO 795 x$fpl$dretinf fz_ws.l(dretinf.o) - 0x08004de8 0x08004de8 0x0000006c Code RO 756 x$fpl$drleqf fz_ws.l(drleqf.o) - 0x08004e54 0x08004e54 0x000001d4 Code RO 738 x$fpl$dsub fz_ws.l(daddsub_clz.o) - 0x08005028 0x08005028 0x00000056 Code RO 758 x$fpl$f2d fz_ws.l(f2d.o) - 0x0800507e 0x0800507e 0x00000002 PAD - 0x08005080 0x08005080 0x000000c4 Code RO 760 x$fpl$fadd fz_ws.l(faddsub_clz.o) - 0x08005144 0x08005144 0x00000018 Code RO 797 x$fpl$fcmpinf fz_ws.l(fcmpi.o) - 0x0800515c 0x0800515c 0x00000184 Code RO 767 x$fpl$fdiv fz_ws.l(fdiv.o) - 0x080052e0 0x080052e0 0x00000036 Code RO 770 x$fpl$ffix fz_ws.l(ffix.o) - 0x08005316 0x08005316 0x00000002 PAD - 0x08005318 0x08005318 0x0000003e Code RO 774 x$fpl$ffixu fz_ws.l(ffixu.o) - 0x08005356 0x08005356 0x00000002 PAD - 0x08005358 0x08005358 0x00000030 Code RO 779 x$fpl$fflt fz_ws.l(fflt_clz.o) - 0x08005388 0x08005388 0x00000026 Code RO 778 x$fpl$ffltu fz_ws.l(fflt_clz.o) - 0x080053ae 0x080053ae 0x00000002 PAD - 0x080053b0 0x080053b0 0x00000068 Code RO 784 x$fpl$fleqf fz_ws.l(fleqf.o) - 0x08005418 0x08005418 0x00000102 Code RO 786 x$fpl$fmul fz_ws.l(fmul.o) - 0x0800551a 0x0800551a 0x0000008c Code RO 799 x$fpl$fnaninf fz_ws.l(fnaninf.o) - 0x080055a6 0x080055a6 0x0000000a Code RO 801 x$fpl$fretinf fz_ws.l(fretinf.o) - 0x080055b0 0x080055b0 0x00000062 Code RO 788 x$fpl$frleqf fz_ws.l(frleqf.o) - 0x08005612 0x08005612 0x00000002 PAD - 0x08005614 0x08005614 0x000000ea Code RO 762 x$fpl$fsub fz_ws.l(faddsub_clz.o) - 0x080056fe 0x080056fe 0x00000000 Code RO 803 x$fpl$usenofp fz_ws.l(usenofp.o) - 0x080056fe 0x080056fe 0x00000002 PAD - 0x08005700 0x08005700 0x000002d4 Data RO 5 .constdata main.o - 0x080059d4 0x080059d4 0x0000000a Data RO 149 .constdata bldc.o - 0x080059de 0x080059de 0x00000002 PAD - 0x080059e0 0x080059e0 0x00000020 Data RO 956 Region$$Table anon$$obj.o - - - Execution Region RW_IRAM1 (Exec base: 0x20000000, Load base: 0x08005a00, Size: 0x00000950, Max: 0x00002000, ABSOLUTE) - - Exec Addr Load Addr Size Type Attr Idx E Section Name Object - - 0x20000000 0x08005a00 0x00000014 Data RW 6 .data main.o - 0x20000014 0x08005a14 0x00000030 Data RW 150 .data bldc.o - 0x20000044 0x08005a44 0x00000002 Data RW 189 .data setup.o - 0x20000046 0x08005a46 0x00000002 PAD - 0x20000048 0x08005a48 0x00000009 Data RW 217 .data it.o - 0x20000051 0x08005a51 0x0000000a Data RW 302 .data commssteering.o - 0x2000005b 0x08005a5b 0x00000007 Data RW 329 .data commsmasterslave.o - 0x20000062 0x08005a62 0x00000002 PAD - 0x20000064 0x08005a64 0x00000004 Data RW 700 .data system_gd32f1x0.o - 0x20000068 - 0x00000084 Zero RW 188 .bss setup.o - 0x200000ec - 0x00000060 Zero RW 830 .bss c_w.l(libspace.o) - 0x2000014c 0x08005a68 0x00000004 PAD - 0x20000150 - 0x00000400 Zero RW 690 HEAP startup_gd32f1x0.o - 0x20000550 - 0x00000400 Zero RW 689 STACK startup_gd32f1x0.o - - -============================================================================== - -Image component sizes - - - Code (inc. data) RO Data RW Data ZI Data Debug Object Name - - 1070 158 10 48 0 3397 bldc.o - 112 0 0 0 0 1221 comms.o - 448 34 0 7 0 2784 commsmasterslave.o - 216 28 0 10 0 2033 commssteering.o - 1668 22 0 0 0 6889 gd32f1x0_adc.o - 1204 8 0 0 0 5835 gd32f1x0_dma.o - 204 10 0 0 0 1746 gd32f1x0_fwdgt.o - 476 10 0 0 0 3701 gd32f1x0_gpio.o - 292 22 0 0 0 1821 gd32f1x0_misc.o - 2216 90 0 0 0 9272 gd32f1x0_rcu.o - 3370 30 0 0 0 17820 gd32f1x0_timer.o - 1614 12 0 0 0 14129 gd32f1x0_usart.o - 264 32 0 9 0 2853 it.o - 1616 150 724 20 0 91516 main.o - 2052 74 0 2 132 3514 setup.o - 64 26 360 0 2048 868 startup_gd32f1x0.o - 492 52 0 4 0 1957 system_gd32f1x0.o - - ---------------------------------------------------------------------- - 17382 758 1128 104 2180 171356 Object Totals - 0 0 32 0 0 0 (incl. Generated) - 4 0 2 4 0 0 (incl. Padding) - - ---------------------------------------------------------------------- - - Code (inc. data) RO Data RW Data ZI Data Debug Library Member Name - - 8 0 0 0 0 68 __main.o - 0 0 0 0 0 0 __rtentry.o - 12 0 0 0 0 0 __rtentry2.o - 6 0 0 0 0 0 __rtentry4.o - 52 8 0 0 0 0 __scatter.o - 26 0 0 0 0 0 __scatter_copy.o - 28 0 0 0 0 0 __scatter_zi.o - 18 0 0 0 0 80 exit.o - 6 0 0 0 0 152 heapauxi.o - 0 0 0 0 0 0 indicate_semi.o - 2 0 0 0 0 0 libinit.o - 2 0 0 0 0 0 libinit2.o - 2 0 0 0 0 0 libshutdown.o - 2 0 0 0 0 0 libshutdown2.o - 8 4 0 0 96 68 libspace.o - 100 0 0 0 0 80 rt_memcpy_w.o - 2 0 0 0 0 0 rtexit.o - 10 0 0 0 0 0 rtexit2.o - 12 4 0 0 0 68 sys_exit.o - 74 0 0 0 0 80 sys_stackheap_outer.o - 2 0 0 0 0 68 use_no_semi.o - 98 4 0 0 0 92 d2f.o - 804 16 0 0 0 272 daddsub_clz.o - 24 0 0 0 0 68 dcmpi.o - 688 140 0 0 0 208 ddiv.o - 46 0 0 0 0 68 dflt_clz.o - 120 4 0 0 0 92 dleqf.o - 340 12 0 0 0 104 dmul.o - 156 4 0 0 0 92 dnaninf.o - 12 0 0 0 0 68 dretinf.o - 108 0 0 0 0 80 drleqf.o - 86 4 0 0 0 84 f2d.o - 430 8 0 0 0 168 faddsub_clz.o - 24 0 0 0 0 68 fcmpi.o - 388 76 0 0 0 96 fdiv.o - 54 4 0 0 0 84 ffix.o - 62 4 0 0 0 84 ffixu.o - 86 0 0 0 0 136 fflt_clz.o - 104 4 0 0 0 84 fleqf.o - 258 4 0 0 0 84 fmul.o - 140 4 0 0 0 84 fnaninf.o - 10 0 0 0 0 68 fretinf.o - 98 0 0 0 0 68 frleqf.o - 0 0 0 0 0 0 usenofp.o - - ---------------------------------------------------------------------- - 4530 304 0 0 100 2916 Library Totals - 22 0 0 0 4 0 (incl. Padding) - - ---------------------------------------------------------------------- - - Code (inc. data) RO Data RW Data ZI Data Debug Library Name - - 372 16 0 0 96 664 c_w.l - 4136 288 0 0 0 2252 fz_ws.l - - ---------------------------------------------------------------------- - 4530 304 0 0 100 2916 Library Totals - - ---------------------------------------------------------------------- - -============================================================================== - - - Code (inc. data) RO Data RW Data ZI Data Debug - - 21912 1062 1128 104 2280 170992 Grand Totals - 21912 1062 1128 104 2280 170992 ELF Image Totals - 21912 1062 1128 104 0 0 ROM Totals - -============================================================================== - - Total RO Size (Code + RO Data) 23040 ( 22.50kB) - Total RW Size (RW Data + ZI Data) 2384 ( 2.33kB) - Total ROM Size (Code + RO Data + RW Data) 23144 ( 22.60kB) - -============================================================================== - +Component: ARM Compiler 5.06 update 7 (build 960) Tool: armlink [4d3601] + +============================================================================== + +Section Cross References + + main.o(.text) refers to gd32f1x0_fwdgt.o(.text) for fwdgt_counter_reload + main.o(.text) refers to bldc.o(.text) for SetPWM + main.o(.text) refers to commshugs.o(.text) for SendHUGSReply + main.o(.text) refers to it.o(.text) for Delay + main.o(.text) refers to gd32f1x0_usart.o(.text) for usart_deinit + main.o(.text) refers to gd32f1x0_gpio.o(.text) for gpio_bit_write + main.o(.text) refers to system_gd32f1x0.o(.text) for SystemCoreClockUpdate + main.o(.text) refers to setup.o(.text) for Watchdog_init + main.o(.text) refers to bldc.o(.data) for buzzerPattern + main.o(.text) refers to commshugs.o(.data) for HUGS_ESTOP + main.o(.text) refers to system_gd32f1x0.o(.data) for SystemCoreClock + main.o(.text) refers to main.o(.data) for inactivityTimer + bldc.o(.text) refers to main.o(.text) for resetInactivityTimer + bldc.o(.text) refers to fflt_clz.o(x$fpl$fflt) for __aeabi_i2f + bldc.o(.text) refers to fmul.o(x$fpl$fmul) for __aeabi_fmul + bldc.o(.text) refers to ffix.o(x$fpl$ffix) for __aeabi_f2iz + bldc.o(.text) refers to gd32f1x0_gpio.o(.text) for gpio_input_bit_get + bldc.o(.text) refers to bldc.o(.data) for bldcEnable + bldc.o(.text) refers to bldc.o(.constdata) for hall_to_pos + bldc.o(.text) refers to dflt_clz.o(x$fpl$dflt) for __aeabi_i2d + bldc.o(.text) refers to dleqf.o(x$fpl$dleqf) for __aeabi_cdcmple + bldc.o(.text) refers to gd32f1x0_timer.o(.text) for timer_automatic_output_disable + bldc.o(.text) refers to bldc.o(i.blockPWM) for blockPWM + bldc.o(.text) refers to it.o(.data) for timedOut + setup.o(.text) refers to gd32f1x0_misc.o(.text) for nvic_priority_group_set + setup.o(.text) refers to gd32f1x0_rcu.o(.text) for rcu_flag_get + setup.o(.text) refers to gd32f1x0_fwdgt.o(.text) for fwdgt_config + setup.o(.text) refers to gd32f1x0_timer.o(.text) for timer_deinit + setup.o(.text) refers to gd32f1x0_gpio.o(.text) for gpio_mode_set + setup.o(.text) refers to setup.o(.bss) for timeoutTimer_paramter_struct + setup.o(.text) refers to gd32f1x0_dma.o(.text) for dma_deinit + setup.o(.text) refers to rt_memcpy_w.o(.text) for __aeabi_memcpy4 + setup.o(.text) refers to gd32f1x0_adc.o(.text) for adc_channel_length_config + setup.o(.text) refers to gd32f1x0_usart.o(.text) for usart_baudrate_set + setup.o(.text) refers to bldc.o(.data) for adc_buffer + setup.o(.text) refers to setup.o(.data) for usartHUGS_rx_buf + it.o(.text) refers to bldc.o(.text) for CalculateSpeed + it.o(.text) refers to gd32f1x0_timer.o(.text) for timer_interrupt_flag_clear + it.o(.text) refers to gd32f1x0_adc.o(.text) for adc_software_trigger_enable + it.o(.text) refers to gd32f1x0_dma.o(.text) for dma_interrupt_flag_get + it.o(.text) refers to commssteering.o(.text) for UpdateUSARTSteerInput + it.o(.text) refers to commshugs.o(.text) for UpdateUSARTHUGSInput + it.o(.text) refers to it.o(.data) for sysTicks + it.o(.text) refers to commshugs.o(.data) for HUGS_WatchDog + comms.o(.text) refers to gd32f1x0_usart.o(.text) for usart_data_transmit + commssteering.o(.text) refers to comms.o(.text) for CalcCRC + commssteering.o(.text) refers to bldc.o(.text) for SetEnable + commssteering.o(.text) refers to fflt_clz.o(x$fpl$fflt) for __aeabi_i2f + commssteering.o(.text) refers to f2d.o(x$fpl$f2d) for __aeabi_f2d + commssteering.o(.text) refers to dmul.o(x$fpl$dmul) for __aeabi_dmul + commssteering.o(.text) refers to dfix.o(x$fpl$dfix) for __aeabi_d2iz + commssteering.o(.text) refers to commshugs.o(.text) for SendHUGSCmd + commssteering.o(.text) refers to it.o(.text) for ResetTimeout + commssteering.o(.text) refers to rt_memcpy_v6.o(.text) for __aeabi_memcpy + commssteering.o(.text) refers to commssteering.o(.data) for Steer_CommandID + commssteering.o(.text) refers to setup.o(.data) for usartSteer_COM_rx_buf + commssteering.o(.text) refers to commssteering.o(.bss) for sUSARTSteerRecordBuffer + commshugs.o(.text) refers to bldc.o(.text) for GetPosition + commshugs.o(.text) refers to comms.o(.text) for CalcCRC + commshugs.o(.text) refers to it.o(.text) for ResetTimeout + commshugs.o(.text) refers to rt_memcpy_v6.o(.text) for __aeabi_memcpy + commshugs.o(.text) refers to commshugs.o(.data) for HUGS_ESTOP + commshugs.o(.text) refers to bldc.o(.data) for controlMode + commshugs.o(.text) refers to setup.o(.data) for usartHUGS_rx_buf + commshugs.o(.text) refers to commshugs.o(.bss) for sUSARTHUGSRecordBuffer + gd32f1x0_adc.o(.text) refers to gd32f1x0_rcu.o(.text) for rcu_periph_reset_enable + gd32f1x0_gpio.o(.text) refers to gd32f1x0_rcu.o(.text) for rcu_periph_reset_enable + gd32f1x0_i2c.o(.text) refers to gd32f1x0_rcu.o(.text) for rcu_periph_reset_enable + gd32f1x0_pmu.o(.text) refers to gd32f1x0_rcu.o(.text) for rcu_periph_reset_enable + gd32f1x0_pmu.o(.text) refers to gd32f1x0_pmu.o(.bss) for reg_snap + gd32f1x0_syscfg.o(.text) refers to gd32f1x0_rcu.o(.text) for rcu_periph_reset_enable + gd32f1x0_timer.o(.text) refers to gd32f1x0_rcu.o(.text) for rcu_periph_reset_enable + gd32f1x0_usart.o(.text) refers to gd32f1x0_rcu.o(.text) for rcu_periph_reset_enable + gd32f1x0_wwdgt.o(.text) refers to gd32f1x0_rcu.o(.text) for rcu_periph_reset_enable + startup_gd32f1x0.o(STACK) refers (Special) to heapauxi.o(.text) for __use_two_region_memory + startup_gd32f1x0.o(HEAP) refers (Special) to heapauxi.o(.text) for __use_two_region_memory + startup_gd32f1x0.o(RESET) refers (Special) to heapauxi.o(.text) for __use_two_region_memory + startup_gd32f1x0.o(RESET) refers to startup_gd32f1x0.o(STACK) for __initial_sp + startup_gd32f1x0.o(RESET) refers to startup_gd32f1x0.o(.text) for Reset_Handler + startup_gd32f1x0.o(RESET) refers to it.o(.text) for NMI_Handler + startup_gd32f1x0.o(.text) refers (Special) to heapauxi.o(.text) for __use_two_region_memory + startup_gd32f1x0.o(.text) refers to system_gd32f1x0.o(.text) for SystemInit + startup_gd32f1x0.o(.text) refers to __main.o(!!!main) for __main + startup_gd32f1x0.o(.text) refers to startup_gd32f1x0.o(HEAP) for Heap_Mem + startup_gd32f1x0.o(.text) refers to startup_gd32f1x0.o(STACK) for Stack_Mem + system_gd32f1x0.o(.text) refers to system_gd32f1x0.o(.data) for SystemCoreClock + rt_memcpy_v6.o(.text) refers to rt_memcpy_w.o(.text) for __aeabi_memcpy4 + __main.o(!!!main) refers to __rtentry.o(.ARM.Collect$$rtentry$$00000000) for __rt_entry + dfix.o(x$fpl$dfix) refers (Special) to usenofp.o(x$fpl$usenofp) for __I$use$fp + dfix.o(x$fpl$dfix) refers to dnaninf.o(x$fpl$dnaninf) for __fpl_dnaninf + dfix.o(x$fpl$dfixr) refers (Special) to usenofp.o(x$fpl$usenofp) for __I$use$fp + dfix.o(x$fpl$dfixr) refers to dnaninf.o(x$fpl$dnaninf) for __fpl_dnaninf + dflt_clz.o(x$fpl$dfltu) refers (Special) to usenofp.o(x$fpl$usenofp) for __I$use$fp + dflt_clz.o(x$fpl$dflt) refers (Special) to usenofp.o(x$fpl$usenofp) for __I$use$fp + dflt_clz.o(x$fpl$dfltn) refers (Special) to usenofp.o(x$fpl$usenofp) for __I$use$fp + dleqf.o(x$fpl$dleqf) refers (Special) to usenofp.o(x$fpl$usenofp) for __I$use$fp + dleqf.o(x$fpl$dleqf) refers to dnaninf.o(x$fpl$dnaninf) for __fpl_dnaninf + dleqf.o(x$fpl$dleqf) refers to dcmpi.o(x$fpl$dcmpinf) for __fpl_dcmp_Inf + dmul.o(x$fpl$dmul) refers (Special) to usenofp.o(x$fpl$usenofp) for __I$use$fp + dmul.o(x$fpl$dmul) refers to dretinf.o(x$fpl$dretinf) for __fpl_dretinf + dmul.o(x$fpl$dmul) refers to dnaninf.o(x$fpl$dnaninf) for __fpl_dnaninf + f2d.o(x$fpl$f2d) refers (Special) to usenofp.o(x$fpl$usenofp) for __I$use$fp + f2d.o(x$fpl$f2d) refers to fnaninf.o(x$fpl$fnaninf) for __fpl_fnaninf + f2d.o(x$fpl$f2d) refers to dretinf.o(x$fpl$dretinf) for __fpl_dretinf + ffix.o(x$fpl$ffix) refers (Special) to usenofp.o(x$fpl$usenofp) for __I$use$fp + ffix.o(x$fpl$ffix) refers to fnaninf.o(x$fpl$fnaninf) for __fpl_fnaninf + ffix.o(x$fpl$ffixr) refers (Special) to usenofp.o(x$fpl$usenofp) for __I$use$fp + ffix.o(x$fpl$ffixr) refers to fnaninf.o(x$fpl$fnaninf) for __fpl_fnaninf + fflt_clz.o(x$fpl$ffltu) refers (Special) to usenofp.o(x$fpl$usenofp) for __I$use$fp + fflt_clz.o(x$fpl$fflt) refers (Special) to usenofp.o(x$fpl$usenofp) for __I$use$fp + fflt_clz.o(x$fpl$ffltn) refers (Special) to usenofp.o(x$fpl$usenofp) for __I$use$fp + fmul.o(x$fpl$fmul) refers (Special) to usenofp.o(x$fpl$usenofp) for __I$use$fp + fmul.o(x$fpl$fmul) refers to fretinf.o(x$fpl$fretinf) for __fpl_fretinf + fmul.o(x$fpl$fmul) refers to fnaninf.o(x$fpl$fnaninf) for __fpl_fnaninf + __rtentry.o(.ARM.Collect$$rtentry$$00000000) refers (Special) to __rtentry2.o(.ARM.Collect$$rtentry$$0000000A) for __rt_entry_li + __rtentry.o(.ARM.Collect$$rtentry$$00000000) refers (Special) to __rtentry2.o(.ARM.Collect$$rtentry$$0000000D) for __rt_entry_main + __rtentry.o(.ARM.Collect$$rtentry$$00000000) refers (Special) to __rtentry2.o(.ARM.Collect$$rtentry$$0000000C) for __rt_entry_postli_1 + __rtentry.o(.ARM.Collect$$rtentry$$00000000) refers (Special) to __rtentry2.o(.ARM.Collect$$rtentry$$00000009) for __rt_entry_postsh_1 + __rtentry.o(.ARM.Collect$$rtentry$$00000000) refers (Special) to __rtentry2.o(.ARM.Collect$$rtentry$$00000002) for __rt_entry_presh_1 + __rtentry.o(.ARM.Collect$$rtentry$$00000000) refers (Special) to __rtentry4.o(.ARM.Collect$$rtentry$$00000004) for __rt_entry_sh + dcmpi.o(x$fpl$dcmpinf) refers (Special) to usenofp.o(x$fpl$usenofp) for __I$use$fp + dnaninf.o(x$fpl$dnaninf) refers (Special) to usenofp.o(x$fpl$usenofp) for __I$use$fp + dretinf.o(x$fpl$dretinf) refers (Special) to usenofp.o(x$fpl$usenofp) for __I$use$fp + fnaninf.o(x$fpl$fnaninf) refers (Special) to usenofp.o(x$fpl$usenofp) for __I$use$fp + fretinf.o(x$fpl$fretinf) refers (Special) to usenofp.o(x$fpl$usenofp) for __I$use$fp + __rtentry2.o(.ARM.Collect$$rtentry$$00000008) refers to boardinit2.o(.text) for _platform_post_stackheap_init + __rtentry2.o(.ARM.Collect$$rtentry$$0000000A) refers to libinit.o(.ARM.Collect$$libinit$$00000000) for __rt_lib_init + __rtentry2.o(.ARM.Collect$$rtentry$$0000000B) refers to boardinit3.o(.text) for _platform_post_lib_init + __rtentry2.o(.ARM.Collect$$rtentry$$0000000D) refers to main.o(.text) for main + __rtentry2.o(.ARM.Collect$$rtentry$$0000000D) refers to exit.o(.text) for exit + __rtentry2.o(.ARM.exidx) refers to __rtentry2.o(.ARM.Collect$$rtentry$$00000001) for .ARM.Collect$$rtentry$$00000001 + __rtentry2.o(.ARM.exidx) refers to __rtentry2.o(.ARM.Collect$$rtentry$$00000008) for .ARM.Collect$$rtentry$$00000008 + __rtentry2.o(.ARM.exidx) refers to __rtentry2.o(.ARM.Collect$$rtentry$$0000000A) for .ARM.Collect$$rtentry$$0000000A + __rtentry2.o(.ARM.exidx) refers to __rtentry2.o(.ARM.Collect$$rtentry$$0000000B) for .ARM.Collect$$rtentry$$0000000B + __rtentry2.o(.ARM.exidx) refers to __rtentry2.o(.ARM.Collect$$rtentry$$0000000D) for .ARM.Collect$$rtentry$$0000000D + __rtentry4.o(.ARM.Collect$$rtentry$$00000004) refers to sys_stackheap_outer.o(.text) for __user_setup_stackheap + __rtentry4.o(.ARM.exidx) refers to __rtentry4.o(.ARM.Collect$$rtentry$$00000004) for .ARM.Collect$$rtentry$$00000004 + sys_stackheap_outer.o(.text) refers to libspace.o(.text) for __user_perproc_libspace + sys_stackheap_outer.o(.text) refers to startup_gd32f1x0.o(.text) for __user_initial_stackheap + exit.o(.text) refers to rtexit.o(.ARM.Collect$$rtexit$$00000000) for __rt_exit + libinit.o(.ARM.Collect$$libinit$$00000000) refers (Special) to libinit2.o(.ARM.Collect$$libinit$$0000002E) for __rt_lib_init_alloca_1 + libinit.o(.ARM.Collect$$libinit$$00000000) refers (Special) to libinit2.o(.ARM.Collect$$libinit$$0000002C) for __rt_lib_init_argv_1 + libinit.o(.ARM.Collect$$libinit$$00000000) refers (Special) to libinit2.o(.ARM.Collect$$libinit$$0000001B) for __rt_lib_init_atexit_1 + libinit.o(.ARM.Collect$$libinit$$00000000) refers (Special) to libinit2.o(.ARM.Collect$$libinit$$00000021) for __rt_lib_init_clock_1 + libinit.o(.ARM.Collect$$libinit$$00000000) refers (Special) to libinit2.o(.ARM.Collect$$libinit$$00000032) for __rt_lib_init_cpp_1 + libinit.o(.ARM.Collect$$libinit$$00000000) refers (Special) to libinit2.o(.ARM.Collect$$libinit$$00000030) for __rt_lib_init_exceptions_1 + libinit.o(.ARM.Collect$$libinit$$00000000) refers (Special) to libinit2.o(.ARM.Collect$$libinit$$00000002) for __rt_lib_init_fp_1 + libinit.o(.ARM.Collect$$libinit$$00000000) refers (Special) to libinit2.o(.ARM.Collect$$libinit$$0000001F) for __rt_lib_init_fp_trap_1 + libinit.o(.ARM.Collect$$libinit$$00000000) refers (Special) to libinit2.o(.ARM.Collect$$libinit$$00000023) for __rt_lib_init_getenv_1 + libinit.o(.ARM.Collect$$libinit$$00000000) refers (Special) to libinit2.o(.ARM.Collect$$libinit$$0000000A) for __rt_lib_init_heap_1 + libinit.o(.ARM.Collect$$libinit$$00000000) refers (Special) to libinit2.o(.ARM.Collect$$libinit$$00000011) for __rt_lib_init_lc_collate_1 + libinit.o(.ARM.Collect$$libinit$$00000000) refers (Special) to libinit2.o(.ARM.Collect$$libinit$$00000013) for __rt_lib_init_lc_ctype_1 + libinit.o(.ARM.Collect$$libinit$$00000000) refers (Special) to libinit2.o(.ARM.Collect$$libinit$$00000015) for __rt_lib_init_lc_monetary_1 + libinit.o(.ARM.Collect$$libinit$$00000000) refers (Special) to libinit2.o(.ARM.Collect$$libinit$$00000017) for __rt_lib_init_lc_numeric_1 + libinit.o(.ARM.Collect$$libinit$$00000000) refers (Special) to libinit2.o(.ARM.Collect$$libinit$$00000019) for __rt_lib_init_lc_time_1 + libinit.o(.ARM.Collect$$libinit$$00000000) refers (Special) to libinit2.o(.ARM.Collect$$libinit$$00000004) for __rt_lib_init_preinit_1 + libinit.o(.ARM.Collect$$libinit$$00000000) refers (Special) to libinit2.o(.ARM.Collect$$libinit$$0000000E) for __rt_lib_init_rand_1 + libinit.o(.ARM.Collect$$libinit$$00000000) refers (Special) to libinit2.o(.ARM.Collect$$libinit$$00000033) for __rt_lib_init_return + libinit.o(.ARM.Collect$$libinit$$00000000) refers (Special) to libinit2.o(.ARM.Collect$$libinit$$0000001D) for __rt_lib_init_signal_1 + libinit.o(.ARM.Collect$$libinit$$00000000) refers (Special) to libinit2.o(.ARM.Collect$$libinit$$00000025) for __rt_lib_init_stdio_1 + libinit.o(.ARM.Collect$$libinit$$00000000) refers (Special) to libinit2.o(.ARM.Collect$$libinit$$0000000C) for __rt_lib_init_user_alloc_1 + libspace.o(.text) refers to libspace.o(.bss) for __libspace_start + rtexit.o(.ARM.Collect$$rtexit$$00000000) refers (Special) to rtexit2.o(.ARM.Collect$$rtexit$$00000004) for __rt_exit_exit + rtexit.o(.ARM.Collect$$rtexit$$00000000) refers (Special) to rtexit2.o(.ARM.Collect$$rtexit$$00000003) for __rt_exit_ls + rtexit.o(.ARM.Collect$$rtexit$$00000000) refers (Special) to rtexit2.o(.ARM.Collect$$rtexit$$00000002) for __rt_exit_prels_1 + rtexit.o(.ARM.exidx) refers (Special) to rtexit2.o(.ARM.Collect$$rtexit$$00000004) for __rt_exit_exit + rtexit.o(.ARM.exidx) refers (Special) to rtexit2.o(.ARM.Collect$$rtexit$$00000003) for __rt_exit_ls + rtexit.o(.ARM.exidx) refers (Special) to rtexit2.o(.ARM.Collect$$rtexit$$00000002) for __rt_exit_prels_1 + rtexit.o(.ARM.exidx) refers to rtexit.o(.ARM.Collect$$rtexit$$00000000) for .ARM.Collect$$rtexit$$00000000 + libinit2.o(.ARM.Collect$$libinit$$00000010) refers to libinit2.o(.ARM.Collect$$libinit$$0000000F) for .ARM.Collect$$libinit$$0000000F + libinit2.o(.ARM.Collect$$libinit$$00000012) refers to libinit2.o(.ARM.Collect$$libinit$$0000000F) for .ARM.Collect$$libinit$$0000000F + libinit2.o(.ARM.Collect$$libinit$$00000014) refers to libinit2.o(.ARM.Collect$$libinit$$0000000F) for .ARM.Collect$$libinit$$0000000F + libinit2.o(.ARM.Collect$$libinit$$00000016) refers to libinit2.o(.ARM.Collect$$libinit$$0000000F) for .ARM.Collect$$libinit$$0000000F + libinit2.o(.ARM.Collect$$libinit$$00000018) refers to libinit2.o(.ARM.Collect$$libinit$$0000000F) for .ARM.Collect$$libinit$$0000000F + libinit2.o(.ARM.Collect$$libinit$$00000026) refers to argv_veneer.o(.emb_text) for __ARM_argv_veneer + libinit2.o(.ARM.Collect$$libinit$$00000027) refers to argv_veneer.o(.emb_text) for __ARM_argv_veneer + rtexit2.o(.ARM.Collect$$rtexit$$00000003) refers to libshutdown.o(.ARM.Collect$$libshutdown$$00000000) for __rt_lib_shutdown + rtexit2.o(.ARM.Collect$$rtexit$$00000004) refers to sys_exit.o(.text) for _sys_exit + rtexit2.o(.ARM.exidx) refers to rtexit2.o(.ARM.Collect$$rtexit$$00000001) for .ARM.Collect$$rtexit$$00000001 + rtexit2.o(.ARM.exidx) refers to rtexit2.o(.ARM.Collect$$rtexit$$00000003) for .ARM.Collect$$rtexit$$00000003 + rtexit2.o(.ARM.exidx) refers to rtexit2.o(.ARM.Collect$$rtexit$$00000004) for .ARM.Collect$$rtexit$$00000004 + argv_veneer.o(.emb_text) refers to no_argv.o(.text) for __ARM_get_argv + sys_exit.o(.text) refers (Special) to use_no_semi.o(.text) for __I$use$semihosting + sys_exit.o(.text) refers (Special) to indicate_semi.o(.text) for __semihosting_library_function + _get_argv_nomalloc.o(.text) refers (Special) to hrguard.o(.text) for __heap_region$guard + _get_argv_nomalloc.o(.text) refers to defsig_rtmem_outer.o(.text) for __rt_SIGRTMEM + _get_argv_nomalloc.o(.text) refers to sys_command.o(.text) for _sys_command_string + libshutdown.o(.ARM.Collect$$libshutdown$$00000000) refers (Special) to libshutdown2.o(.ARM.Collect$$libshutdown$$00000004) for __rt_lib_shutdown_cpp_1 + libshutdown.o(.ARM.Collect$$libshutdown$$00000000) refers (Special) to libshutdown2.o(.ARM.Collect$$libshutdown$$00000002) for __rt_lib_shutdown_fini_1 + libshutdown.o(.ARM.Collect$$libshutdown$$00000000) refers (Special) to libshutdown2.o(.ARM.Collect$$libshutdown$$00000009) for __rt_lib_shutdown_fp_trap_1 + libshutdown.o(.ARM.Collect$$libshutdown$$00000000) refers (Special) to libshutdown2.o(.ARM.Collect$$libshutdown$$00000011) for __rt_lib_shutdown_heap_1 + libshutdown.o(.ARM.Collect$$libshutdown$$00000000) refers (Special) to libshutdown2.o(.ARM.Collect$$libshutdown$$00000012) for __rt_lib_shutdown_return + libshutdown.o(.ARM.Collect$$libshutdown$$00000000) refers (Special) to libshutdown2.o(.ARM.Collect$$libshutdown$$0000000C) for __rt_lib_shutdown_signal_1 + libshutdown.o(.ARM.Collect$$libshutdown$$00000000) refers (Special) to libshutdown2.o(.ARM.Collect$$libshutdown$$00000006) for __rt_lib_shutdown_stdio_1 + libshutdown.o(.ARM.Collect$$libshutdown$$00000000) refers (Special) to libshutdown2.o(.ARM.Collect$$libshutdown$$0000000E) for __rt_lib_shutdown_user_alloc_1 + sys_command.o(.text) refers (Special) to use_no_semi.o(.text) for __I$use$semihosting + sys_command.o(.text) refers (Special) to indicate_semi.o(.text) for __semihosting_library_function + defsig_rtmem_outer.o(.text) refers to defsig_rtmem_inner.o(.text) for __rt_SIGRTMEM_inner + defsig_rtmem_outer.o(.text) refers to defsig_exit.o(.text) for __sig_exit + defsig_rtmem_formal.o(.text) refers to rt_raise.o(.text) for __rt_raise + rt_raise.o(.text) refers to __raise.o(.text) for __raise + rt_raise.o(.text) refers to sys_exit.o(.text) for _sys_exit + defsig_exit.o(.text) refers to sys_exit.o(.text) for _sys_exit + defsig_rtmem_inner.o(.text) refers to defsig_general.o(.text) for __default_signal_display + __raise.o(.text) refers to defsig.o(CL$$defsig) for __default_signal_handler + defsig_general.o(.text) refers to sys_wrch.o(.text) for _ttywrch + sys_wrch.o(.text) refers (Special) to use_no_semi.o(.text) for __I$use$semihosting + sys_wrch.o(.text) refers (Special) to indicate_semi.o(.text) for __semihosting_library_function + defsig.o(CL$$defsig) refers to defsig_rtmem_inner.o(.text) for __rt_SIGRTMEM_inner + defsig_abrt_inner.o(.text) refers to defsig_general.o(.text) for __default_signal_display + defsig_fpe_inner.o(.text) refers to defsig_general.o(.text) for __default_signal_display + defsig_rtred_inner.o(.text) refers to defsig_general.o(.text) for __default_signal_display + defsig_stak_inner.o(.text) refers to defsig_general.o(.text) for __default_signal_display + defsig_pvfn_inner.o(.text) refers to defsig_general.o(.text) for __default_signal_display + defsig_cppl_inner.o(.text) refers to defsig_general.o(.text) for __default_signal_display + defsig_segv_inner.o(.text) refers to defsig_general.o(.text) for __default_signal_display + defsig_other.o(.text) refers to defsig_general.o(.text) for __default_signal_display + + +============================================================================== + +Removing Unused input sections from the image. + + Removing main.o(.rev16_text), (4 bytes). + Removing main.o(.revsh_text), (4 bytes). + Removing main.o(.rrx_text), (6 bytes). + Removing bldc.o(.rev16_text), (4 bytes). + Removing bldc.o(.revsh_text), (4 bytes). + Removing bldc.o(.rrx_text), (6 bytes). + Removing setup.o(.rev16_text), (4 bytes). + Removing setup.o(.revsh_text), (4 bytes). + Removing setup.o(.rrx_text), (6 bytes). + Removing it.o(.rev16_text), (4 bytes). + Removing it.o(.revsh_text), (4 bytes). + Removing it.o(.rrx_text), (6 bytes). + Removing comms.o(.rev16_text), (4 bytes). + Removing comms.o(.revsh_text), (4 bytes). + Removing comms.o(.rrx_text), (6 bytes). + Removing commssteering.o(.rev16_text), (4 bytes). + Removing commssteering.o(.revsh_text), (4 bytes). + Removing commssteering.o(.rrx_text), (6 bytes). + Removing led.o(.rev16_text), (4 bytes). + Removing led.o(.revsh_text), (4 bytes). + Removing led.o(.rrx_text), (6 bytes). + Removing commshugs.o(.rev16_text), (4 bytes). + Removing commshugs.o(.revsh_text), (4 bytes). + Removing commshugs.o(.rrx_text), (6 bytes). + Removing gd32f1x0_adc.o(.rev16_text), (4 bytes). + Removing gd32f1x0_adc.o(.revsh_text), (4 bytes). + Removing gd32f1x0_adc.o(.rrx_text), (6 bytes). + Removing gd32f1x0_dbg.o(.rev16_text), (4 bytes). + Removing gd32f1x0_dbg.o(.revsh_text), (4 bytes). + Removing gd32f1x0_dbg.o(.rrx_text), (6 bytes). + Removing gd32f1x0_dbg.o(.text), (100 bytes). + Removing gd32f1x0_dma.o(.rev16_text), (4 bytes). + Removing gd32f1x0_dma.o(.revsh_text), (4 bytes). + Removing gd32f1x0_dma.o(.rrx_text), (6 bytes). + Removing gd32f1x0_fwdgt.o(.rev16_text), (4 bytes). + Removing gd32f1x0_fwdgt.o(.revsh_text), (4 bytes). + Removing gd32f1x0_fwdgt.o(.rrx_text), (6 bytes). + Removing gd32f1x0_gpio.o(.rev16_text), (4 bytes). + Removing gd32f1x0_gpio.o(.revsh_text), (4 bytes). + Removing gd32f1x0_gpio.o(.rrx_text), (6 bytes). + Removing gd32f1x0_i2c.o(.rev16_text), (4 bytes). + Removing gd32f1x0_i2c.o(.revsh_text), (4 bytes). + Removing gd32f1x0_i2c.o(.rrx_text), (6 bytes). + Removing gd32f1x0_i2c.o(.text), (824 bytes). + Removing gd32f1x0_misc.o(.rev16_text), (4 bytes). + Removing gd32f1x0_misc.o(.revsh_text), (4 bytes). + Removing gd32f1x0_misc.o(.rrx_text), (6 bytes). + Removing gd32f1x0_pmu.o(.rev16_text), (4 bytes). + Removing gd32f1x0_pmu.o(.revsh_text), (4 bytes). + Removing gd32f1x0_pmu.o(.rrx_text), (6 bytes). + Removing gd32f1x0_pmu.o(.text), (448 bytes). + Removing gd32f1x0_pmu.o(.bss), (16 bytes). + Removing gd32f1x0_rcu.o(.rev16_text), (4 bytes). + Removing gd32f1x0_rcu.o(.revsh_text), (4 bytes). + Removing gd32f1x0_rcu.o(.rrx_text), (6 bytes). + Removing gd32f1x0_syscfg.o(.rev16_text), (4 bytes). + Removing gd32f1x0_syscfg.o(.revsh_text), (4 bytes). + Removing gd32f1x0_syscfg.o(.rrx_text), (6 bytes). + Removing gd32f1x0_syscfg.o(.text), (272 bytes). + Removing gd32f1x0_timer.o(.rev16_text), (4 bytes). + Removing gd32f1x0_timer.o(.revsh_text), (4 bytes). + Removing gd32f1x0_timer.o(.rrx_text), (6 bytes). + Removing gd32f1x0_usart.o(.rev16_text), (4 bytes). + Removing gd32f1x0_usart.o(.revsh_text), (4 bytes). + Removing gd32f1x0_usart.o(.rrx_text), (6 bytes). + Removing gd32f1x0_wwdgt.o(.rev16_text), (4 bytes). + Removing gd32f1x0_wwdgt.o(.revsh_text), (4 bytes). + Removing gd32f1x0_wwdgt.o(.rrx_text), (6 bytes). + Removing gd32f1x0_wwdgt.o(.text), (168 bytes). + Removing system_gd32f1x0.o(.rev16_text), (4 bytes). + Removing system_gd32f1x0.o(.revsh_text), (4 bytes). + Removing system_gd32f1x0.o(.rrx_text), (6 bytes). + +72 unused section(s) (total 2136 bytes) removed from the image. + +============================================================================== + +Image Symbol Table + + Local Symbols + + Symbol Name Value Ov Type Size Object(Section) + + ../clib/angel/boardlib.s 0x00000000 Number 0 boardinit3.o ABSOLUTE + ../clib/angel/boardlib.s 0x00000000 Number 0 boardinit2.o ABSOLUTE + ../clib/angel/boardlib.s 0x00000000 Number 0 boardshut.o ABSOLUTE + ../clib/angel/boardlib.s 0x00000000 Number 0 boardinit1.o ABSOLUTE + ../clib/angel/handlers.s 0x00000000 Number 0 __scatter_copy.o ABSOLUTE + ../clib/angel/handlers.s 0x00000000 Number 0 __scatter_zi.o ABSOLUTE + ../clib/angel/kernel.s 0x00000000 Number 0 rtexit.o ABSOLUTE + ../clib/angel/kernel.s 0x00000000 Number 0 __rtentry.o ABSOLUTE + ../clib/angel/kernel.s 0x00000000 Number 0 __rtentry4.o ABSOLUTE + ../clib/angel/kernel.s 0x00000000 Number 0 __rtentry2.o ABSOLUTE + ../clib/angel/kernel.s 0x00000000 Number 0 rtexit2.o ABSOLUTE + ../clib/angel/rt.s 0x00000000 Number 0 rt_raise.o ABSOLUTE + ../clib/angel/scatter.s 0x00000000 Number 0 __scatter.o ABSOLUTE + ../clib/angel/startup.s 0x00000000 Number 0 __main.o ABSOLUTE + ../clib/angel/sys.s 0x00000000 Number 0 libspace.o ABSOLUTE + ../clib/angel/sys.s 0x00000000 Number 0 indicate_semi.o ABSOLUTE + ../clib/angel/sys.s 0x00000000 Number 0 use_no_semi.o ABSOLUTE + ../clib/angel/sys.s 0x00000000 Number 0 sys_stackheap_outer.o ABSOLUTE + ../clib/angel/sysapp.c 0x00000000 Number 0 sys_wrch.o ABSOLUTE + ../clib/angel/sysapp.c 0x00000000 Number 0 sys_command.o ABSOLUTE + ../clib/angel/sysapp.c 0x00000000 Number 0 sys_exit.o ABSOLUTE + ../clib/armsys.c 0x00000000 Number 0 no_argv.o ABSOLUTE + ../clib/armsys.c 0x00000000 Number 0 _get_argv_nomalloc.o ABSOLUTE + ../clib/armsys.c 0x00000000 Number 0 argv_veneer.o ABSOLUTE + ../clib/armsys.c 0x00000000 Number 0 argv_veneer.o ABSOLUTE + ../clib/heapalloc.c 0x00000000 Number 0 hrguard.o ABSOLUTE + ../clib/heapaux.c 0x00000000 Number 0 heapauxi.o ABSOLUTE + ../clib/libinit.s 0x00000000 Number 0 libshutdown.o ABSOLUTE + ../clib/libinit.s 0x00000000 Number 0 libshutdown2.o ABSOLUTE + ../clib/libinit.s 0x00000000 Number 0 libinit.o ABSOLUTE + ../clib/libinit.s 0x00000000 Number 0 libinit2.o ABSOLUTE + ../clib/memcpset.s 0x00000000 Number 0 rt_memcpy_v6.o ABSOLUTE + ../clib/memcpset.s 0x00000000 Number 0 rt_memcpy_w.o ABSOLUTE + ../clib/signal.c 0x00000000 Number 0 __raise.o ABSOLUTE + ../clib/signal.c 0x00000000 Number 0 defsig_rtmem_inner.o ABSOLUTE + ../clib/signal.c 0x00000000 Number 0 defsig_exit.o ABSOLUTE + ../clib/signal.c 0x00000000 Number 0 defsig_rtmem_outer.o ABSOLUTE + ../clib/signal.c 0x00000000 Number 0 defsig_general.o ABSOLUTE + ../clib/signal.c 0x00000000 Number 0 defsig_rtmem_formal.o ABSOLUTE + ../clib/signal.c 0x00000000 Number 0 defsig_abrt_inner.o ABSOLUTE + ../clib/signal.c 0x00000000 Number 0 defsig_fpe_inner.o ABSOLUTE + ../clib/signal.c 0x00000000 Number 0 defsig_rtred_inner.o ABSOLUTE + ../clib/signal.c 0x00000000 Number 0 defsig_stak_inner.o ABSOLUTE + ../clib/signal.c 0x00000000 Number 0 defsig_pvfn_inner.o ABSOLUTE + ../clib/signal.c 0x00000000 Number 0 defsig_cppl_inner.o ABSOLUTE + ../clib/signal.c 0x00000000 Number 0 defsig_segv_inner.o ABSOLUTE + ../clib/signal.c 0x00000000 Number 0 defsig_other.o ABSOLUTE + ../clib/signal.s 0x00000000 Number 0 defsig.o ABSOLUTE + ../clib/stdlib.c 0x00000000 Number 0 exit.o ABSOLUTE + ../fplib/dcmpi.s 0x00000000 Number 0 dcmpi.o ABSOLUTE + ../fplib/dfix.s 0x00000000 Number 0 dfix.o ABSOLUTE + ../fplib/dflt.s 0x00000000 Number 0 dflt_clz.o ABSOLUTE + ../fplib/dleqf.s 0x00000000 Number 0 dleqf.o ABSOLUTE + ../fplib/dmul.s 0x00000000 Number 0 dmul.o ABSOLUTE + ../fplib/dnaninf.s 0x00000000 Number 0 dnaninf.o ABSOLUTE + ../fplib/dretinf.s 0x00000000 Number 0 dretinf.o ABSOLUTE + ../fplib/f2d.s 0x00000000 Number 0 f2d.o ABSOLUTE + ../fplib/ffix.s 0x00000000 Number 0 ffix.o ABSOLUTE + ../fplib/fflt.s 0x00000000 Number 0 fflt_clz.o ABSOLUTE + ../fplib/fmul.s 0x00000000 Number 0 fmul.o ABSOLUTE + ../fplib/fnaninf.s 0x00000000 Number 0 fnaninf.o ABSOLUTE + ../fplib/fpinit.s 0x00000000 Number 0 fpinit.o ABSOLUTE + ../fplib/fretinf.s 0x00000000 Number 0 fretinf.o ABSOLUTE + ../fplib/usenofp.s 0x00000000 Number 0 usenofp.o ABSOLUTE + RTE\Device\GD32F130C8\gd32f1x0_adc.c 0x00000000 Number 0 gd32f1x0_adc.o ABSOLUTE + RTE\Device\GD32F130C8\gd32f1x0_dbg.c 0x00000000 Number 0 gd32f1x0_dbg.o ABSOLUTE + RTE\Device\GD32F130C8\gd32f1x0_dma.c 0x00000000 Number 0 gd32f1x0_dma.o ABSOLUTE + RTE\Device\GD32F130C8\gd32f1x0_fwdgt.c 0x00000000 Number 0 gd32f1x0_fwdgt.o ABSOLUTE + RTE\Device\GD32F130C8\gd32f1x0_gpio.c 0x00000000 Number 0 gd32f1x0_gpio.o ABSOLUTE + RTE\Device\GD32F130C8\gd32f1x0_i2c.c 0x00000000 Number 0 gd32f1x0_i2c.o ABSOLUTE + RTE\Device\GD32F130C8\gd32f1x0_misc.c 0x00000000 Number 0 gd32f1x0_misc.o ABSOLUTE + RTE\Device\GD32F130C8\gd32f1x0_opa.c 0x00000000 Number 0 gd32f1x0_opa.o ABSOLUTE + RTE\Device\GD32F130C8\gd32f1x0_pmu.c 0x00000000 Number 0 gd32f1x0_pmu.o ABSOLUTE + RTE\Device\GD32F130C8\gd32f1x0_rcu.c 0x00000000 Number 0 gd32f1x0_rcu.o ABSOLUTE + RTE\Device\GD32F130C8\gd32f1x0_syscfg.c 0x00000000 Number 0 gd32f1x0_syscfg.o ABSOLUTE + RTE\Device\GD32F130C8\gd32f1x0_timer.c 0x00000000 Number 0 gd32f1x0_timer.o ABSOLUTE + RTE\Device\GD32F130C8\gd32f1x0_usart.c 0x00000000 Number 0 gd32f1x0_usart.o ABSOLUTE + RTE\Device\GD32F130C8\gd32f1x0_wwdgt.c 0x00000000 Number 0 gd32f1x0_wwdgt.o ABSOLUTE + RTE\Device\GD32F130C8\startup_gd32f1x0.s 0x00000000 Number 0 startup_gd32f1x0.o ABSOLUTE + RTE\Device\GD32F130C8\system_gd32f1x0.c 0x00000000 Number 0 system_gd32f1x0.o ABSOLUTE + RTE\\Device\\GD32F130C8\\gd32f1x0_adc.c 0x00000000 Number 0 gd32f1x0_adc.o ABSOLUTE + RTE\\Device\\GD32F130C8\\gd32f1x0_dbg.c 0x00000000 Number 0 gd32f1x0_dbg.o ABSOLUTE + RTE\\Device\\GD32F130C8\\gd32f1x0_dma.c 0x00000000 Number 0 gd32f1x0_dma.o ABSOLUTE + RTE\\Device\\GD32F130C8\\gd32f1x0_fwdgt.c 0x00000000 Number 0 gd32f1x0_fwdgt.o ABSOLUTE + RTE\\Device\\GD32F130C8\\gd32f1x0_gpio.c 0x00000000 Number 0 gd32f1x0_gpio.o ABSOLUTE + RTE\\Device\\GD32F130C8\\gd32f1x0_i2c.c 0x00000000 Number 0 gd32f1x0_i2c.o ABSOLUTE + RTE\\Device\\GD32F130C8\\gd32f1x0_misc.c 0x00000000 Number 0 gd32f1x0_misc.o ABSOLUTE + RTE\\Device\\GD32F130C8\\gd32f1x0_pmu.c 0x00000000 Number 0 gd32f1x0_pmu.o ABSOLUTE + RTE\\Device\\GD32F130C8\\gd32f1x0_rcu.c 0x00000000 Number 0 gd32f1x0_rcu.o ABSOLUTE + RTE\\Device\\GD32F130C8\\gd32f1x0_syscfg.c 0x00000000 Number 0 gd32f1x0_syscfg.o ABSOLUTE + RTE\\Device\\GD32F130C8\\gd32f1x0_timer.c 0x00000000 Number 0 gd32f1x0_timer.o ABSOLUTE + RTE\\Device\\GD32F130C8\\gd32f1x0_usart.c 0x00000000 Number 0 gd32f1x0_usart.o ABSOLUTE + RTE\\Device\\GD32F130C8\\gd32f1x0_wwdgt.c 0x00000000 Number 0 gd32f1x0_wwdgt.o ABSOLUTE + RTE\\Device\\GD32F130C8\\system_gd32f1x0.c 0x00000000 Number 0 system_gd32f1x0.o ABSOLUTE + Src\\bldc.c 0x00000000 Number 0 bldc.o ABSOLUTE + Src\\comms.c 0x00000000 Number 0 comms.o ABSOLUTE + Src\\commsHUGS.c 0x00000000 Number 0 commshugs.o ABSOLUTE + Src\\commsSteering.c 0x00000000 Number 0 commssteering.o ABSOLUTE + Src\\it.c 0x00000000 Number 0 it.o ABSOLUTE + Src\\led.c 0x00000000 Number 0 led.o ABSOLUTE + Src\\main.c 0x00000000 Number 0 main.o ABSOLUTE + Src\\setup.c 0x00000000 Number 0 setup.o ABSOLUTE + Src\bldc.c 0x00000000 Number 0 bldc.o ABSOLUTE + Src\comms.c 0x00000000 Number 0 comms.o ABSOLUTE + Src\commsHUGS.c 0x00000000 Number 0 commshugs.o ABSOLUTE + Src\commsSteering.c 0x00000000 Number 0 commssteering.o ABSOLUTE + Src\it.c 0x00000000 Number 0 it.o ABSOLUTE + Src\led.c 0x00000000 Number 0 led.o ABSOLUTE + Src\main.c 0x00000000 Number 0 main.o ABSOLUTE + Src\setup.c 0x00000000 Number 0 setup.o ABSOLUTE + dc.s 0x00000000 Number 0 dc.o ABSOLUTE + RESET 0x08000000 Section 360 startup_gd32f1x0.o(RESET) + !!!main 0x08000168 Section 8 __main.o(!!!main) + !!!scatter 0x08000170 Section 52 __scatter.o(!!!scatter) + !!handler_copy 0x080001a4 Section 26 __scatter_copy.o(!!handler_copy) + !!handler_zi 0x080001c0 Section 28 __scatter_zi.o(!!handler_zi) + .ARM.Collect$$libinit$$00000000 0x080001dc Section 2 libinit.o(.ARM.Collect$$libinit$$00000000) + .ARM.Collect$$libinit$$00000002 0x080001de Section 0 libinit2.o(.ARM.Collect$$libinit$$00000002) + .ARM.Collect$$libinit$$00000004 0x080001de Section 0 libinit2.o(.ARM.Collect$$libinit$$00000004) + .ARM.Collect$$libinit$$0000000A 0x080001de Section 0 libinit2.o(.ARM.Collect$$libinit$$0000000A) + .ARM.Collect$$libinit$$0000000C 0x080001de Section 0 libinit2.o(.ARM.Collect$$libinit$$0000000C) + .ARM.Collect$$libinit$$0000000E 0x080001de Section 0 libinit2.o(.ARM.Collect$$libinit$$0000000E) + .ARM.Collect$$libinit$$00000011 0x080001de Section 0 libinit2.o(.ARM.Collect$$libinit$$00000011) + .ARM.Collect$$libinit$$00000013 0x080001de Section 0 libinit2.o(.ARM.Collect$$libinit$$00000013) + .ARM.Collect$$libinit$$00000015 0x080001de Section 0 libinit2.o(.ARM.Collect$$libinit$$00000015) + .ARM.Collect$$libinit$$00000017 0x080001de Section 0 libinit2.o(.ARM.Collect$$libinit$$00000017) + .ARM.Collect$$libinit$$00000019 0x080001de Section 0 libinit2.o(.ARM.Collect$$libinit$$00000019) + .ARM.Collect$$libinit$$0000001B 0x080001de Section 0 libinit2.o(.ARM.Collect$$libinit$$0000001B) + .ARM.Collect$$libinit$$0000001D 0x080001de Section 0 libinit2.o(.ARM.Collect$$libinit$$0000001D) + .ARM.Collect$$libinit$$0000001F 0x080001de Section 0 libinit2.o(.ARM.Collect$$libinit$$0000001F) + .ARM.Collect$$libinit$$00000021 0x080001de Section 0 libinit2.o(.ARM.Collect$$libinit$$00000021) + .ARM.Collect$$libinit$$00000023 0x080001de Section 0 libinit2.o(.ARM.Collect$$libinit$$00000023) + .ARM.Collect$$libinit$$00000025 0x080001de Section 0 libinit2.o(.ARM.Collect$$libinit$$00000025) + .ARM.Collect$$libinit$$0000002C 0x080001de Section 0 libinit2.o(.ARM.Collect$$libinit$$0000002C) + .ARM.Collect$$libinit$$0000002E 0x080001de Section 0 libinit2.o(.ARM.Collect$$libinit$$0000002E) + .ARM.Collect$$libinit$$00000030 0x080001de Section 0 libinit2.o(.ARM.Collect$$libinit$$00000030) + .ARM.Collect$$libinit$$00000032 0x080001de Section 0 libinit2.o(.ARM.Collect$$libinit$$00000032) + .ARM.Collect$$libinit$$00000033 0x080001de Section 2 libinit2.o(.ARM.Collect$$libinit$$00000033) + .ARM.Collect$$libshutdown$$00000000 0x080001e0 Section 2 libshutdown.o(.ARM.Collect$$libshutdown$$00000000) + .ARM.Collect$$libshutdown$$00000002 0x080001e2 Section 0 libshutdown2.o(.ARM.Collect$$libshutdown$$00000002) + .ARM.Collect$$libshutdown$$00000004 0x080001e2 Section 0 libshutdown2.o(.ARM.Collect$$libshutdown$$00000004) + .ARM.Collect$$libshutdown$$00000006 0x080001e2 Section 0 libshutdown2.o(.ARM.Collect$$libshutdown$$00000006) + .ARM.Collect$$libshutdown$$00000009 0x080001e2 Section 0 libshutdown2.o(.ARM.Collect$$libshutdown$$00000009) + .ARM.Collect$$libshutdown$$0000000C 0x080001e2 Section 0 libshutdown2.o(.ARM.Collect$$libshutdown$$0000000C) + .ARM.Collect$$libshutdown$$0000000E 0x080001e2 Section 0 libshutdown2.o(.ARM.Collect$$libshutdown$$0000000E) + .ARM.Collect$$libshutdown$$00000011 0x080001e2 Section 0 libshutdown2.o(.ARM.Collect$$libshutdown$$00000011) + .ARM.Collect$$libshutdown$$00000012 0x080001e2 Section 2 libshutdown2.o(.ARM.Collect$$libshutdown$$00000012) + .ARM.Collect$$rtentry$$00000000 0x080001e4 Section 0 __rtentry.o(.ARM.Collect$$rtentry$$00000000) + .ARM.Collect$$rtentry$$00000002 0x080001e4 Section 0 __rtentry2.o(.ARM.Collect$$rtentry$$00000002) + .ARM.Collect$$rtentry$$00000004 0x080001e4 Section 6 __rtentry4.o(.ARM.Collect$$rtentry$$00000004) + .ARM.Collect$$rtentry$$00000009 0x080001ea Section 0 __rtentry2.o(.ARM.Collect$$rtentry$$00000009) + .ARM.Collect$$rtentry$$0000000A 0x080001ea Section 4 __rtentry2.o(.ARM.Collect$$rtentry$$0000000A) + .ARM.Collect$$rtentry$$0000000C 0x080001ee Section 0 __rtentry2.o(.ARM.Collect$$rtentry$$0000000C) + .ARM.Collect$$rtentry$$0000000D 0x080001ee Section 8 __rtentry2.o(.ARM.Collect$$rtentry$$0000000D) + .ARM.Collect$$rtexit$$00000000 0x080001f6 Section 2 rtexit.o(.ARM.Collect$$rtexit$$00000000) + .ARM.Collect$$rtexit$$00000002 0x080001f8 Section 0 rtexit2.o(.ARM.Collect$$rtexit$$00000002) + .ARM.Collect$$rtexit$$00000003 0x080001f8 Section 4 rtexit2.o(.ARM.Collect$$rtexit$$00000003) + .ARM.Collect$$rtexit$$00000004 0x080001fc Section 6 rtexit2.o(.ARM.Collect$$rtexit$$00000004) + .text 0x08000204 Section 0 main.o(.text) + .text 0x08000460 Section 0 bldc.o(.text) + .text 0x08000c84 Section 0 setup.o(.text) + .text 0x08001488 Section 0 it.o(.text) + .text 0x080015b0 Section 0 comms.o(.text) + .text 0x08001620 Section 0 commssteering.o(.text) + .text 0x08001840 Section 0 commshugs.o(.text) + .text 0x08001cd0 Section 0 gd32f1x0_adc.o(.text) + .text 0x08002354 Section 0 gd32f1x0_dma.o(.text) + .text 0x08002808 Section 0 gd32f1x0_fwdgt.o(.text) + .text 0x080028d4 Section 0 gd32f1x0_gpio.o(.text) + .text 0x08002ab0 Section 0 gd32f1x0_misc.o(.text) + .text 0x08002bd4 Section 0 gd32f1x0_rcu.o(.text) + .text 0x0800347c Section 0 gd32f1x0_timer.o(.text) + .text 0x080041a8 Section 0 gd32f1x0_usart.o(.text) + .text 0x080047f8 Section 64 startup_gd32f1x0.o(.text) + .text 0x08004838 Section 0 system_gd32f1x0.o(.text) + system_clock_72m_hxtal 0x08004839 Thumb Code 154 system_gd32f1x0.o(.text) + system_clock_config 0x080048d3 Thumb Code 8 system_gd32f1x0.o(.text) + .text 0x08004a4c Section 138 rt_memcpy_v6.o(.text) + .text 0x08004ad6 Section 100 rt_memcpy_w.o(.text) + .text 0x08004b3a Section 0 heapauxi.o(.text) + .text 0x08004b40 Section 74 sys_stackheap_outer.o(.text) + .text 0x08004b8a Section 0 exit.o(.text) + .text 0x08004b9c Section 8 libspace.o(.text) + .text 0x08004ba4 Section 0 sys_exit.o(.text) + .text 0x08004bb0 Section 2 use_no_semi.o(.text) + .text 0x08004bb2 Section 0 indicate_semi.o(.text) + i.blockPWM 0x08004bb2 Section 0 bldc.o(i.blockPWM) + x$fpl$dcmpinf 0x08004c1a Section 24 dcmpi.o(x$fpl$dcmpinf) + x$fpl$dfix 0x08004c34 Section 94 dfix.o(x$fpl$dfix) + x$fpl$dflt 0x08004c92 Section 46 dflt_clz.o(x$fpl$dflt) + x$fpl$dleqf 0x08004cc0 Section 120 dleqf.o(x$fpl$dleqf) + x$fpl$dmul 0x08004d38 Section 340 dmul.o(x$fpl$dmul) + x$fpl$dnaninf 0x08004e8c Section 156 dnaninf.o(x$fpl$dnaninf) + x$fpl$dretinf 0x08004f28 Section 12 dretinf.o(x$fpl$dretinf) + x$fpl$f2d 0x08004f34 Section 86 f2d.o(x$fpl$f2d) + x$fpl$ffix 0x08004f8c Section 54 ffix.o(x$fpl$ffix) + x$fpl$fflt 0x08004fc4 Section 48 fflt_clz.o(x$fpl$fflt) + x$fpl$fmul 0x08004ff4 Section 258 fmul.o(x$fpl$fmul) + x$fpl$fnaninf 0x080050f6 Section 140 fnaninf.o(x$fpl$fnaninf) + x$fpl$fretinf 0x08005182 Section 10 fretinf.o(x$fpl$fretinf) + .constdata 0x0800518c Section 776 bldc.o(.constdata) + x$fpl$usenofp 0x0800518c Section 0 usenofp.o(x$fpl$usenofp) + .data 0x20000000 Section 8 main.o(.data) + .data 0x20000008 Section 114 bldc.o(.data) + .data 0x2000007a Section 2 setup.o(.data) + .data 0x2000007c Section 14 it.o(.data) + .data 0x2000008a Section 6 commssteering.o(.data) + sSteerRecord 0x2000008a Data 1 commssteering.o(.data) + sUSARTSteerRecordBufferCounter 0x2000008b Data 1 commssteering.o(.data) + steerReply 0x2000008c Data 2 commssteering.o(.data) + .data 0x20000090 Section 10 commshugs.o(.data) + sHUGSRecord 0x20000090 Data 1 commshugs.o(.data) + sUSARTHUGSRecordBufferCounter 0x20000091 Data 1 commshugs.o(.data) + .data 0x2000009c Section 4 system_gd32f1x0.o(.data) + .bss 0x200000a0 Section 132 setup.o(.bss) + .bss 0x20000124 Section 12 commssteering.o(.bss) + sUSARTSteerRecordBuffer 0x20000124 Data 12 commssteering.o(.bss) + .bss 0x20000130 Section 17 commshugs.o(.bss) + sUSARTHUGSRecordBuffer 0x20000130 Data 17 commshugs.o(.bss) + .bss 0x20000144 Section 96 libspace.o(.bss) + HEAP 0x200001a8 Section 1024 startup_gd32f1x0.o(HEAP) + Heap_Mem 0x200001a8 Data 1024 startup_gd32f1x0.o(HEAP) + STACK 0x200005a8 Section 1024 startup_gd32f1x0.o(STACK) + Stack_Mem 0x200005a8 Data 1024 startup_gd32f1x0.o(STACK) + __initial_sp 0x200009a8 Data 0 startup_gd32f1x0.o(STACK) + + Global Symbols + + Symbol Name Value Ov Type Size Object(Section) + + BuildAttributes$$THM_ISAv4$P$D$K$B$S$PE$A:L22UL41UL21$X:L11$S22US41US21$IEEE1$IW$USESV6$~STKCKD$USESV7$~SHL$OSPACE$ROPI$EBA8$UX$STANDARDLIB$REQ8$PRES8$EABIv2 0x00000000 Number 0 anon$$obj.o ABSOLUTE + __ARM_use_no_argv 0x00000000 Number 0 main.o ABSOLUTE + __ARM_exceptions_init - Undefined Weak Reference + __alloca_initialize - Undefined Weak Reference + __arm_fini_ - Undefined Weak Reference + __arm_preinit_ - Undefined Weak Reference + __cpp_initialize__aeabi_ - Undefined Weak Reference + __cxa_finalize - Undefined Weak Reference + __rt_locale - Undefined Weak Reference + __sigvec_lookup - Undefined Weak Reference + _atexit_init - Undefined Weak Reference + _call_atexit_fns - Undefined Weak Reference + _clock_init - Undefined Weak Reference + _fp_trap_init - Undefined Weak Reference + _fp_trap_shutdown - Undefined Weak Reference + _get_lc_collate - Undefined Weak Reference + _get_lc_ctype - Undefined Weak Reference + _get_lc_monetary - Undefined Weak Reference + _get_lc_numeric - Undefined Weak Reference + _get_lc_time - Undefined Weak Reference + _getenv_init - Undefined Weak Reference + _handle_redirection - Undefined Weak Reference + _init_alloc - Undefined Weak Reference + _init_user_alloc - Undefined Weak Reference + _initio - Undefined Weak Reference + _rand_init - Undefined Weak Reference + _signal_finish - Undefined Weak Reference + _signal_init - Undefined Weak Reference + _terminate_alloc - Undefined Weak Reference + _terminate_user_alloc - Undefined Weak Reference + _terminateio - Undefined Weak Reference + __Vectors_Size 0x00000168 Number 0 startup_gd32f1x0.o ABSOLUTE + __Vectors 0x08000000 Data 4 startup_gd32f1x0.o(RESET) + __Vectors_End 0x08000168 Data 0 startup_gd32f1x0.o(RESET) + __main 0x08000169 Thumb Code 8 __main.o(!!!main) + __scatterload 0x08000171 Thumb Code 0 __scatter.o(!!!scatter) + __scatterload_rt2 0x08000171 Thumb Code 44 __scatter.o(!!!scatter) + __scatterload_rt2_thumb_only 0x08000171 Thumb Code 0 __scatter.o(!!!scatter) + __scatterload_null 0x0800017f Thumb Code 0 __scatter.o(!!!scatter) + __scatterload_copy 0x080001a5 Thumb Code 26 __scatter_copy.o(!!handler_copy) + __scatterload_zeroinit 0x080001c1 Thumb Code 28 __scatter_zi.o(!!handler_zi) + __rt_lib_init 0x080001dd Thumb Code 0 libinit.o(.ARM.Collect$$libinit$$00000000) + __rt_lib_init_alloca_1 0x080001df Thumb Code 0 libinit2.o(.ARM.Collect$$libinit$$0000002E) + __rt_lib_init_argv_1 0x080001df Thumb Code 0 libinit2.o(.ARM.Collect$$libinit$$0000002C) + __rt_lib_init_atexit_1 0x080001df Thumb Code 0 libinit2.o(.ARM.Collect$$libinit$$0000001B) + __rt_lib_init_clock_1 0x080001df Thumb Code 0 libinit2.o(.ARM.Collect$$libinit$$00000021) + __rt_lib_init_cpp_1 0x080001df Thumb Code 0 libinit2.o(.ARM.Collect$$libinit$$00000032) + __rt_lib_init_exceptions_1 0x080001df Thumb Code 0 libinit2.o(.ARM.Collect$$libinit$$00000030) + __rt_lib_init_fp_1 0x080001df Thumb Code 0 libinit2.o(.ARM.Collect$$libinit$$00000002) + __rt_lib_init_fp_trap_1 0x080001df Thumb Code 0 libinit2.o(.ARM.Collect$$libinit$$0000001F) + __rt_lib_init_getenv_1 0x080001df Thumb Code 0 libinit2.o(.ARM.Collect$$libinit$$00000023) + __rt_lib_init_heap_1 0x080001df Thumb Code 0 libinit2.o(.ARM.Collect$$libinit$$0000000A) + __rt_lib_init_lc_collate_1 0x080001df Thumb Code 0 libinit2.o(.ARM.Collect$$libinit$$00000011) + __rt_lib_init_lc_ctype_1 0x080001df Thumb Code 0 libinit2.o(.ARM.Collect$$libinit$$00000013) + __rt_lib_init_lc_monetary_1 0x080001df Thumb Code 0 libinit2.o(.ARM.Collect$$libinit$$00000015) + __rt_lib_init_lc_numeric_1 0x080001df Thumb Code 0 libinit2.o(.ARM.Collect$$libinit$$00000017) + __rt_lib_init_lc_time_1 0x080001df Thumb Code 0 libinit2.o(.ARM.Collect$$libinit$$00000019) + __rt_lib_init_preinit_1 0x080001df Thumb Code 0 libinit2.o(.ARM.Collect$$libinit$$00000004) + __rt_lib_init_rand_1 0x080001df Thumb Code 0 libinit2.o(.ARM.Collect$$libinit$$0000000E) + __rt_lib_init_return 0x080001df Thumb Code 0 libinit2.o(.ARM.Collect$$libinit$$00000033) + __rt_lib_init_signal_1 0x080001df Thumb Code 0 libinit2.o(.ARM.Collect$$libinit$$0000001D) + __rt_lib_init_stdio_1 0x080001df Thumb Code 0 libinit2.o(.ARM.Collect$$libinit$$00000025) + __rt_lib_init_user_alloc_1 0x080001df Thumb Code 0 libinit2.o(.ARM.Collect$$libinit$$0000000C) + __rt_lib_shutdown 0x080001e1 Thumb Code 0 libshutdown.o(.ARM.Collect$$libshutdown$$00000000) + __rt_lib_shutdown_cpp_1 0x080001e3 Thumb Code 0 libshutdown2.o(.ARM.Collect$$libshutdown$$00000004) + __rt_lib_shutdown_fini_1 0x080001e3 Thumb Code 0 libshutdown2.o(.ARM.Collect$$libshutdown$$00000002) + __rt_lib_shutdown_fp_trap_1 0x080001e3 Thumb Code 0 libshutdown2.o(.ARM.Collect$$libshutdown$$00000009) + __rt_lib_shutdown_heap_1 0x080001e3 Thumb Code 0 libshutdown2.o(.ARM.Collect$$libshutdown$$00000011) + __rt_lib_shutdown_return 0x080001e3 Thumb Code 0 libshutdown2.o(.ARM.Collect$$libshutdown$$00000012) + __rt_lib_shutdown_signal_1 0x080001e3 Thumb Code 0 libshutdown2.o(.ARM.Collect$$libshutdown$$0000000C) + __rt_lib_shutdown_stdio_1 0x080001e3 Thumb Code 0 libshutdown2.o(.ARM.Collect$$libshutdown$$00000006) + __rt_lib_shutdown_user_alloc_1 0x080001e3 Thumb Code 0 libshutdown2.o(.ARM.Collect$$libshutdown$$0000000E) + __rt_entry 0x080001e5 Thumb Code 0 __rtentry.o(.ARM.Collect$$rtentry$$00000000) + __rt_entry_presh_1 0x080001e5 Thumb Code 0 __rtentry2.o(.ARM.Collect$$rtentry$$00000002) + __rt_entry_sh 0x080001e5 Thumb Code 0 __rtentry4.o(.ARM.Collect$$rtentry$$00000004) + __rt_entry_li 0x080001eb Thumb Code 0 __rtentry2.o(.ARM.Collect$$rtentry$$0000000A) + __rt_entry_postsh_1 0x080001eb Thumb Code 0 __rtentry2.o(.ARM.Collect$$rtentry$$00000009) + __rt_entry_main 0x080001ef Thumb Code 0 __rtentry2.o(.ARM.Collect$$rtentry$$0000000D) + __rt_entry_postli_1 0x080001ef Thumb Code 0 __rtentry2.o(.ARM.Collect$$rtentry$$0000000C) + __rt_exit 0x080001f7 Thumb Code 0 rtexit.o(.ARM.Collect$$rtexit$$00000000) + __rt_exit_ls 0x080001f9 Thumb Code 0 rtexit2.o(.ARM.Collect$$rtexit$$00000003) + __rt_exit_prels_1 0x080001f9 Thumb Code 0 rtexit2.o(.ARM.Collect$$rtexit$$00000002) + __rt_exit_exit 0x080001fd Thumb Code 0 rtexit2.o(.ARM.Collect$$rtexit$$00000004) + ShutOff 0x08000205 Thumb Code 92 main.o(.text) + ShowBatteryState 0x08000261 Thumb Code 78 main.o(.text) + main 0x080002af Thumb Code 382 main.o(.text) + resetInactivityTimer 0x0800042d Thumb Code 8 main.o(.text) + SetEnable 0x08000461 Thumb Code 20 bldc.o(.text) + abs16 0x08000475 Thumb Code 10 bldc.o(.text) + SetSpeed 0x0800047f Thumb Code 172 bldc.o(.text) + SetPWM 0x0800052b Thumb Code 30 bldc.o(.text) + SetPower 0x08000549 Thumb Code 46 bldc.o(.text) + GetPWM 0x08000577 Thumb Code 8 bldc.o(.text) + GetSpeed 0x0800057f Thumb Code 8 bldc.o(.text) + CalculateSpeed 0x08000587 Thumb Code 64 bldc.o(.text) + GetPosition 0x080005c7 Thumb Code 26 bldc.o(.text) + setPhaseAngle 0x080005e1 Thumb Code 112 bldc.o(.text) + abs32 0x08000651 Thumb Code 8 bldc.o(.text) + runPID 0x08000659 Thumb Code 194 bldc.o(.text) + getTransitionAngle 0x0800071b Thumb Code 46 bldc.o(.text) + hallToPos 0x08000749 Thumb Code 56 bldc.o(.text) + CalculateBLDC 0x08000781 Thumb Code 1150 bldc.o(.text) + Interrupt_init 0x08000c85 Thumb Code 12 setup.o(.text) + Watchdog_init 0x08000c91 Thumb Code 54 setup.o(.text) + TimeoutTimer_init 0x08000cc7 Thumb Code 80 setup.o(.text) + GPIO_init 0x08000d17 Thumb Code 836 setup.o(.text) + PWM_init 0x0800105b Thumb Code 388 setup.o(.text) + ADC_init 0x080011df Thumb Code 226 setup.o(.text) + USART_HUGS_init 0x080012c1 Thumb Code 206 setup.o(.text) + USART_Steer_COM_init 0x0800138f Thumb Code 206 setup.o(.text) + SysTick_Handler 0x08001489 Thumb Code 12 it.o(.text) + ResetTimeout 0x08001495 Thumb Code 8 it.o(.text) + TIMER13_IRQHandler 0x0800149d Thumb Code 98 it.o(.text) + TIMER0_BRK_UP_TRG_COM_IRQHandler 0x080014ff Thumb Code 18 it.o(.text) + DMA_Channel0_IRQHandler 0x08001511 Thumb Code 26 it.o(.text) + DMA_Channel1_2_IRQHandler 0x0800152b Thumb Code 26 it.o(.text) + DMA_Channel3_4_IRQHandler 0x08001545 Thumb Code 26 it.o(.text) + millis 0x0800155f Thumb Code 6 it.o(.text) + Delay 0x08001565 Thumb Code 20 it.o(.text) + NMI_Handler 0x08001579 Thumb Code 2 it.o(.text) + HardFault_Handler 0x0800157b Thumb Code 4 it.o(.text) + MemManage_Handler 0x0800157f Thumb Code 4 it.o(.text) + BusFault_Handler 0x08001583 Thumb Code 4 it.o(.text) + UsageFault_Handler 0x08001587 Thumb Code 4 it.o(.text) + SVC_Handler 0x0800158b Thumb Code 2 it.o(.text) + DebugMon_Handler 0x0800158d Thumb Code 2 it.o(.text) + PendSV_Handler 0x0800158f Thumb Code 2 it.o(.text) + SendBuffer 0x080015b1 Thumb Code 50 comms.o(.text) + CalcCRC 0x080015e3 Thumb Code 62 comms.o(.text) + max 0x08001621 Thumb Code 14 commssteering.o(.text) + CheckUSARTSteerInput 0x0800162f Thumb Code 300 commssteering.o(.text) + UpdateUSARTSteerInput 0x0800175b Thumb Code 188 commssteering.o(.text) + SetESTOP 0x08001841 Thumb Code 8 commshugs.o(.text) + SendHUGSReply 0x08001849 Thumb Code 490 commshugs.o(.text) + CheckUSARTHUGSInput 0x08001a33 Thumb Code 266 commshugs.o(.text) + UpdateUSARTHUGSInput 0x08001b3d Thumb Code 188 commshugs.o(.text) + SendHUGSCmd 0x08001bf9 Thumb Code 212 commshugs.o(.text) + adc_deinit 0x08001cd1 Thumb Code 20 gd32f1x0_adc.o(.text) + adc_enable 0x08001ce5 Thumb Code 24 gd32f1x0_adc.o(.text) + adc_disable 0x08001cfd Thumb Code 14 gd32f1x0_adc.o(.text) + adc_calibration_enable 0x08001d0b Thumb Code 54 gd32f1x0_adc.o(.text) + adc_dma_mode_enable 0x08001d41 Thumb Code 14 gd32f1x0_adc.o(.text) + adc_dma_mode_disable 0x08001d4f Thumb Code 14 gd32f1x0_adc.o(.text) + adc_tempsensor_vrefint_enable 0x08001d5d Thumb Code 14 gd32f1x0_adc.o(.text) + adc_tempsensor_vrefint_disable 0x08001d6b Thumb Code 14 gd32f1x0_adc.o(.text) + adc_vbat_enable 0x08001d79 Thumb Code 14 gd32f1x0_adc.o(.text) + adc_vbat_disable 0x08001d87 Thumb Code 14 gd32f1x0_adc.o(.text) + adc_discontinuous_mode_config 0x08001d95 Thumb Code 94 gd32f1x0_adc.o(.text) + adc_special_function_config 0x08001df3 Thumb Code 130 gd32f1x0_adc.o(.text) + adc_data_alignment_config 0x08001e75 Thumb Code 30 gd32f1x0_adc.o(.text) + adc_channel_length_config 0x08001e93 Thumb Code 88 gd32f1x0_adc.o(.text) + adc_regular_channel_config 0x08001eeb Thumb Code 218 gd32f1x0_adc.o(.text) + adc_inserted_channel_config 0x08001fc5 Thumb Code 146 gd32f1x0_adc.o(.text) + adc_inserted_channel_offset_config 0x08002057 Thumb Code 42 gd32f1x0_adc.o(.text) + adc_external_trigger_config 0x08002081 Thumb Code 88 gd32f1x0_adc.o(.text) + adc_external_trigger_source_config 0x080020d9 Thumb Code 60 gd32f1x0_adc.o(.text) + adc_software_trigger_enable 0x08002115 Thumb Code 38 gd32f1x0_adc.o(.text) + adc_regular_data_read 0x0800213b Thumb Code 10 gd32f1x0_adc.o(.text) + adc_inserted_data_read 0x08002145 Thumb Code 60 gd32f1x0_adc.o(.text) + adc_flag_get 0x08002181 Thumb Code 18 gd32f1x0_adc.o(.text) + adc_flag_clear 0x08002193 Thumb Code 16 gd32f1x0_adc.o(.text) + adc_interrupt_flag_get 0x080021a3 Thumb Code 108 gd32f1x0_adc.o(.text) + adc_interrupt_flag_clear 0x0800220f Thumb Code 16 gd32f1x0_adc.o(.text) + adc_interrupt_enable 0x0800221f Thumb Code 68 gd32f1x0_adc.o(.text) + adc_interrupt_disable 0x08002263 Thumb Code 68 gd32f1x0_adc.o(.text) + adc_watchdog_single_channel_enable 0x080022a7 Thumb Code 40 gd32f1x0_adc.o(.text) + adc_watchdog_group_channel_enable 0x080022cf Thumb Code 92 gd32f1x0_adc.o(.text) + adc_watchdog_disable 0x0800232b Thumb Code 18 gd32f1x0_adc.o(.text) + adc_watchdog_threshold_config 0x0800233d Thumb Code 12 gd32f1x0_adc.o(.text) + dma_deinit 0x08002355 Thumb Code 88 gd32f1x0_dma.o(.text) + dma_init 0x080023ad Thumb Code 270 gd32f1x0_dma.o(.text) + dma_circulation_enable 0x080024bb Thumb Code 30 gd32f1x0_dma.o(.text) + dma_circulation_disable 0x080024d9 Thumb Code 30 gd32f1x0_dma.o(.text) + dma_memory_to_memory_enable 0x080024f7 Thumb Code 30 gd32f1x0_dma.o(.text) + dma_memory_to_memory_disable 0x08002515 Thumb Code 30 gd32f1x0_dma.o(.text) + dma_channel_enable 0x08002533 Thumb Code 30 gd32f1x0_dma.o(.text) + dma_channel_disable 0x08002551 Thumb Code 30 gd32f1x0_dma.o(.text) + dma_periph_address_config 0x0800256f Thumb Code 14 gd32f1x0_dma.o(.text) + dma_memory_address_config 0x0800257d Thumb Code 14 gd32f1x0_dma.o(.text) + dma_transfer_number_config 0x0800258b Thumb Code 14 gd32f1x0_dma.o(.text) + dma_transfer_number_get 0x08002599 Thumb Code 16 gd32f1x0_dma.o(.text) + dma_priority_config 0x080025a9 Thumb Code 34 gd32f1x0_dma.o(.text) + dma_memory_width_config 0x080025cb Thumb Code 34 gd32f1x0_dma.o(.text) + dma_periph_width_config 0x080025ed Thumb Code 34 gd32f1x0_dma.o(.text) + dma_memory_increase_enable 0x0800260f Thumb Code 30 gd32f1x0_dma.o(.text) + dma_memory_increase_disable 0x0800262d Thumb Code 30 gd32f1x0_dma.o(.text) + dma_periph_increase_enable 0x0800264b Thumb Code 30 gd32f1x0_dma.o(.text) + dma_periph_increase_disable 0x08002669 Thumb Code 30 gd32f1x0_dma.o(.text) + dma_transfer_direction_config 0x08002687 Thumb Code 64 gd32f1x0_dma.o(.text) + dma_interrupt_flag_get 0x080026c7 Thumb Code 196 gd32f1x0_dma.o(.text) + dma_interrupt_flag_clear 0x0800278b Thumb Code 18 gd32f1x0_dma.o(.text) + dma_interrupt_enable 0x0800279d Thumb Code 30 gd32f1x0_dma.o(.text) + dma_interrupt_disable 0x080027bb Thumb Code 30 gd32f1x0_dma.o(.text) + dma_flag_get 0x080027d9 Thumb Code 26 gd32f1x0_dma.o(.text) + dma_flag_clear 0x080027f3 Thumb Code 18 gd32f1x0_dma.o(.text) + fwdgt_write_disable 0x08002809 Thumb Code 8 gd32f1x0_fwdgt.o(.text) + fwdgt_counter_reload 0x08002811 Thumb Code 10 gd32f1x0_fwdgt.o(.text) + fwdgt_enable 0x0800281b Thumb Code 10 gd32f1x0_fwdgt.o(.text) + fwdgt_window_value_config 0x08002825 Thumb Code 54 gd32f1x0_fwdgt.o(.text) + fwdgt_config 0x0800285b Thumb Code 94 gd32f1x0_fwdgt.o(.text) + fwdgt_flag_get 0x080028b9 Thumb Code 18 gd32f1x0_fwdgt.o(.text) + gpio_deinit 0x080028d5 Thumb Code 140 gd32f1x0_gpio.o(.text) + gpio_mode_set 0x08002961 Thumb Code 78 gd32f1x0_gpio.o(.text) + gpio_output_options_set 0x080029af Thumb Code 66 gd32f1x0_gpio.o(.text) + gpio_bit_set 0x080029f1 Thumb Code 4 gd32f1x0_gpio.o(.text) + gpio_bit_reset 0x080029f5 Thumb Code 4 gd32f1x0_gpio.o(.text) + gpio_bit_write 0x080029f9 Thumb Code 10 gd32f1x0_gpio.o(.text) + gpio_port_write 0x08002a03 Thumb Code 4 gd32f1x0_gpio.o(.text) + gpio_input_bit_get 0x08002a07 Thumb Code 16 gd32f1x0_gpio.o(.text) + gpio_input_port_get 0x08002a17 Thumb Code 8 gd32f1x0_gpio.o(.text) + gpio_output_bit_get 0x08002a1f Thumb Code 16 gd32f1x0_gpio.o(.text) + gpio_output_port_get 0x08002a2f Thumb Code 8 gd32f1x0_gpio.o(.text) + gpio_af_set 0x08002a37 Thumb Code 94 gd32f1x0_gpio.o(.text) + gpio_pin_lock 0x08002a95 Thumb Code 18 gd32f1x0_gpio.o(.text) + nvic_priority_group_set 0x08002ab1 Thumb Code 10 gd32f1x0_misc.o(.text) + nvic_irq_enable 0x08002abb Thumb Code 156 gd32f1x0_misc.o(.text) + nvic_irq_disable 0x08002b57 Thumb Code 18 gd32f1x0_misc.o(.text) + nvic_vector_table_set 0x08002b69 Thumb Code 14 gd32f1x0_misc.o(.text) + system_lowpower_set 0x08002b77 Thumb Code 16 gd32f1x0_misc.o(.text) + system_lowpower_reset 0x08002b87 Thumb Code 16 gd32f1x0_misc.o(.text) + systick_clksource_set 0x08002b97 Thumb Code 40 gd32f1x0_misc.o(.text) + rcu_deinit 0x08002bd5 Thumb Code 112 gd32f1x0_rcu.o(.text) + rcu_periph_clock_enable 0x08002c45 Thumb Code 28 gd32f1x0_rcu.o(.text) + rcu_periph_clock_disable 0x08002c61 Thumb Code 28 gd32f1x0_rcu.o(.text) + rcu_periph_clock_sleep_enable 0x08002c7d Thumb Code 28 gd32f1x0_rcu.o(.text) + rcu_periph_clock_sleep_disable 0x08002c99 Thumb Code 28 gd32f1x0_rcu.o(.text) + rcu_periph_reset_enable 0x08002cb5 Thumb Code 28 gd32f1x0_rcu.o(.text) + rcu_periph_reset_disable 0x08002cd1 Thumb Code 28 gd32f1x0_rcu.o(.text) + rcu_bkp_reset_enable 0x08002ced Thumb Code 14 gd32f1x0_rcu.o(.text) + rcu_bkp_reset_disable 0x08002cfb Thumb Code 14 gd32f1x0_rcu.o(.text) + rcu_system_clock_source_config 0x08002d09 Thumb Code 22 gd32f1x0_rcu.o(.text) + rcu_system_clock_source_get 0x08002d1f Thumb Code 10 gd32f1x0_rcu.o(.text) + rcu_ahb_clock_config 0x08002d29 Thumb Code 22 gd32f1x0_rcu.o(.text) + rcu_apb1_clock_config 0x08002d3f Thumb Code 22 gd32f1x0_rcu.o(.text) + rcu_apb2_clock_config 0x08002d55 Thumb Code 22 gd32f1x0_rcu.o(.text) + rcu_adc_clock_config 0x08002d6b Thumb Code 148 gd32f1x0_rcu.o(.text) + rcu_usbd_clock_config 0x08002dff Thumb Code 22 gd32f1x0_rcu.o(.text) + rcu_ckout_config 0x08002e15 Thumb Code 24 gd32f1x0_rcu.o(.text) + rcu_pll_config 0x08002e2d Thumb Code 28 gd32f1x0_rcu.o(.text) + rcu_usart_clock_config 0x08002e49 Thumb Code 22 gd32f1x0_rcu.o(.text) + rcu_cec_clock_config 0x08002e5f Thumb Code 22 gd32f1x0_rcu.o(.text) + rcu_rtc_clock_config 0x08002e75 Thumb Code 22 gd32f1x0_rcu.o(.text) + rcu_hxtal_prediv_config 0x08002e8b Thumb Code 20 gd32f1x0_rcu.o(.text) + rcu_lxtal_drive_capability_config 0x08002e9f Thumb Code 22 gd32f1x0_rcu.o(.text) + rcu_flag_get 0x08002eb5 Thumb Code 30 gd32f1x0_rcu.o(.text) + rcu_all_reset_flag_clear 0x08002ed3 Thumb Code 14 gd32f1x0_rcu.o(.text) + rcu_interrupt_flag_get 0x08002ee1 Thumb Code 18 gd32f1x0_rcu.o(.text) + rcu_interrupt_flag_clear 0x08002ef3 Thumb Code 12 gd32f1x0_rcu.o(.text) + rcu_interrupt_enable 0x08002eff Thumb Code 12 gd32f1x0_rcu.o(.text) + rcu_interrupt_disable 0x08002f0b Thumb Code 12 gd32f1x0_rcu.o(.text) + rcu_osci_stab_wait 0x08002f17 Thumb Code 284 gd32f1x0_rcu.o(.text) + rcu_osci_on 0x08003033 Thumb Code 28 gd32f1x0_rcu.o(.text) + rcu_osci_off 0x0800304f Thumb Code 28 gd32f1x0_rcu.o(.text) + rcu_osci_bypass_mode_enable 0x0800306b Thumb Code 94 gd32f1x0_rcu.o(.text) + rcu_osci_bypass_mode_disable 0x080030c9 Thumb Code 94 gd32f1x0_rcu.o(.text) + rcu_hxtal_clock_monitor_enable 0x08003127 Thumb Code 14 gd32f1x0_rcu.o(.text) + rcu_hxtal_clock_monitor_disable 0x08003135 Thumb Code 14 gd32f1x0_rcu.o(.text) + rcu_irc8m_adjust_value_set 0x08003143 Thumb Code 20 gd32f1x0_rcu.o(.text) + rcu_irc14m_adjust_value_set 0x08003157 Thumb Code 20 gd32f1x0_rcu.o(.text) + rcu_voltage_key_unlock 0x0800316b Thumb Code 28 gd32f1x0_rcu.o(.text) + rcu_deepsleep_voltage_set 0x08003187 Thumb Code 30 gd32f1x0_rcu.o(.text) + rcu_power_down_voltage_set 0x080031a5 Thumb Code 30 gd32f1x0_rcu.o(.text) + rcu_clock_freq_get 0x080031c3 Thumb Code 690 gd32f1x0_rcu.o(.text) + timer_deinit 0x0800347d Thumb Code 210 gd32f1x0_timer.o(.text) + timer_init 0x0800354f Thumb Code 126 gd32f1x0_timer.o(.text) + timer_enable 0x080035cd Thumb Code 10 gd32f1x0_timer.o(.text) + timer_disable 0x080035d7 Thumb Code 10 gd32f1x0_timer.o(.text) + timer_auto_reload_shadow_enable 0x080035e1 Thumb Code 10 gd32f1x0_timer.o(.text) + timer_auto_reload_shadow_disable 0x080035eb Thumb Code 10 gd32f1x0_timer.o(.text) + timer_update_event_enable 0x080035f5 Thumb Code 10 gd32f1x0_timer.o(.text) + timer_update_event_disable 0x080035ff Thumb Code 10 gd32f1x0_timer.o(.text) + timer_counter_alignment 0x08003609 Thumb Code 16 gd32f1x0_timer.o(.text) + timer_counter_up_direction 0x08003619 Thumb Code 14 gd32f1x0_timer.o(.text) + timer_counter_down_direction 0x08003627 Thumb Code 18 gd32f1x0_timer.o(.text) + timer_prescaler_config 0x08003639 Thumb Code 14 gd32f1x0_timer.o(.text) + timer_repetition_value_config 0x08003647 Thumb Code 4 gd32f1x0_timer.o(.text) + timer_autoreload_value_config 0x0800364b Thumb Code 4 gd32f1x0_timer.o(.text) + timer_counter_value_config 0x0800364f Thumb Code 4 gd32f1x0_timer.o(.text) + timer_counter_read 0x08003653 Thumb Code 8 gd32f1x0_timer.o(.text) + timer_prescaler_read 0x0800365b Thumb Code 10 gd32f1x0_timer.o(.text) + timer_single_pulse_mode_config 0x08003665 Thumb Code 26 gd32f1x0_timer.o(.text) + timer_update_source_config 0x0800367f Thumb Code 26 gd32f1x0_timer.o(.text) + timer_interrupt_enable 0x08003699 Thumb Code 8 gd32f1x0_timer.o(.text) + timer_interrupt_disable 0x080036a1 Thumb Code 8 gd32f1x0_timer.o(.text) + timer_interrupt_flag_get 0x080036a9 Thumb Code 32 gd32f1x0_timer.o(.text) + timer_interrupt_flag_clear 0x080036c9 Thumb Code 8 gd32f1x0_timer.o(.text) + timer_flag_get 0x080036d1 Thumb Code 18 gd32f1x0_timer.o(.text) + timer_flag_clear 0x080036e3 Thumb Code 8 gd32f1x0_timer.o(.text) + timer_dma_enable 0x080036eb Thumb Code 8 gd32f1x0_timer.o(.text) + timer_dma_disable 0x080036f3 Thumb Code 8 gd32f1x0_timer.o(.text) + timer_channel_dma_request_source_select 0x080036fb Thumb Code 26 gd32f1x0_timer.o(.text) + timer_dma_transfer_config 0x08003715 Thumb Code 24 gd32f1x0_timer.o(.text) + timer_event_software_generate 0x0800372d Thumb Code 8 gd32f1x0_timer.o(.text) + timer_break_config 0x08003735 Thumb Code 30 gd32f1x0_timer.o(.text) + timer_break_enable 0x08003753 Thumb Code 10 gd32f1x0_timer.o(.text) + timer_break_disable 0x0800375d Thumb Code 8 gd32f1x0_timer.o(.text) + timer_automatic_output_enable 0x08003765 Thumb Code 10 gd32f1x0_timer.o(.text) + timer_automatic_output_disable 0x0800376f Thumb Code 8 gd32f1x0_timer.o(.text) + timer_primary_output_config 0x08003777 Thumb Code 22 gd32f1x0_timer.o(.text) + timer_channel_control_shadow_config 0x0800378d Thumb Code 22 gd32f1x0_timer.o(.text) + timer_channel_control_shadow_update_config 0x080037a3 Thumb Code 26 gd32f1x0_timer.o(.text) + timer_channel_output_config 0x080037bd Thumb Code 472 gd32f1x0_timer.o(.text) + timer_channel_output_mode_config 0x08003995 Thumb Code 90 gd32f1x0_timer.o(.text) + timer_channel_output_pulse_value_config 0x080039ef Thumb Code 38 gd32f1x0_timer.o(.text) + timer_channel_output_shadow_config 0x08003a15 Thumb Code 90 gd32f1x0_timer.o(.text) + timer_channel_output_fast_config 0x08003a6f Thumb Code 90 gd32f1x0_timer.o(.text) + timer_channel_output_clear_config 0x08003ac9 Thumb Code 90 gd32f1x0_timer.o(.text) + timer_channel_output_polarity_config 0x08003b23 Thumb Code 92 gd32f1x0_timer.o(.text) + timer_channel_complementary_output_polarity_config 0x08003b7f Thumb Code 70 gd32f1x0_timer.o(.text) + timer_ocpre_clear_source_config 0x08003bc5 Thumb Code 26 gd32f1x0_timer.o(.text) + timer_channel_output_state_config 0x08003bdf Thumb Code 92 gd32f1x0_timer.o(.text) + timer_channel_complementary_output_state_config 0x08003c3b Thumb Code 70 gd32f1x0_timer.o(.text) + timer_channel_input_capture_prescaler_config 0x08003c81 Thumb Code 90 gd32f1x0_timer.o(.text) + timer_input_capture_config 0x08003cdb Thumb Code 332 gd32f1x0_timer.o(.text) + timer_channel_capture_value_register_read 0x08003e27 Thumb Code 42 gd32f1x0_timer.o(.text) + timer_input_pwm_capture_config 0x08003e51 Thumb Code 352 gd32f1x0_timer.o(.text) + timer_hall_mode_config 0x08003fb1 Thumb Code 26 gd32f1x0_timer.o(.text) + timer_input_trigger_source_select 0x08003fcb Thumb Code 16 gd32f1x0_timer.o(.text) + timer_master_output_trigger_source_select 0x08003fdb Thumb Code 16 gd32f1x0_timer.o(.text) + timer_slave_mode_select 0x08003feb Thumb Code 16 gd32f1x0_timer.o(.text) + timer_master_slave_mode_config 0x08003ffb Thumb Code 26 gd32f1x0_timer.o(.text) + timer_external_trigger_config 0x08004015 Thumb Code 30 gd32f1x0_timer.o(.text) + timer_quadrature_decoder_mode_config 0x08004033 Thumb Code 64 gd32f1x0_timer.o(.text) + timer_internal_clock_config 0x08004073 Thumb Code 8 gd32f1x0_timer.o(.text) + timer_internal_trigger_as_external_clock_config 0x0800407b Thumb Code 32 gd32f1x0_timer.o(.text) + timer_external_trigger_as_external_clock_config 0x0800409b Thumb Code 164 gd32f1x0_timer.o(.text) + timer_external_clock_mode0_config 0x0800413f Thumb Code 56 gd32f1x0_timer.o(.text) + timer_external_clock_mode1_config 0x08004177 Thumb Code 32 gd32f1x0_timer.o(.text) + timer_external_clock_mode1_disable 0x08004197 Thumb Code 10 gd32f1x0_timer.o(.text) + timer_channel_remap_config 0x080041a1 Thumb Code 6 gd32f1x0_timer.o(.text) + usart_deinit 0x080041a9 Thumb Code 58 gd32f1x0_usart.o(.text) + usart_baudrate_set 0x080041e3 Thumb Code 120 gd32f1x0_usart.o(.text) + usart_parity_config 0x0800425b Thumb Code 24 gd32f1x0_usart.o(.text) + usart_word_length_set 0x08004273 Thumb Code 24 gd32f1x0_usart.o(.text) + usart_stop_bit_set 0x0800428b Thumb Code 24 gd32f1x0_usart.o(.text) + usart_enable 0x080042a3 Thumb Code 10 gd32f1x0_usart.o(.text) + usart_disable 0x080042ad Thumb Code 10 gd32f1x0_usart.o(.text) + usart_transmit_config 0x080042b7 Thumb Code 16 gd32f1x0_usart.o(.text) + usart_receive_config 0x080042c7 Thumb Code 16 gd32f1x0_usart.o(.text) + usart_data_transmit 0x080042d7 Thumb Code 8 gd32f1x0_usart.o(.text) + usart_data_receive 0x080042df Thumb Code 10 gd32f1x0_usart.o(.text) + usart_data_first_config 0x080042e9 Thumb Code 28 gd32f1x0_usart.o(.text) + usart_invert_config 0x08004305 Thumb Code 110 gd32f1x0_usart.o(.text) + usart_overrun_enable 0x08004373 Thumb Code 18 gd32f1x0_usart.o(.text) + usart_overrun_disable 0x08004385 Thumb Code 18 gd32f1x0_usart.o(.text) + usart_oversample_config 0x08004397 Thumb Code 24 gd32f1x0_usart.o(.text) + usart_sample_bit_config 0x080043af Thumb Code 24 gd32f1x0_usart.o(.text) + usart_autobaud_detection_enable 0x080043c7 Thumb Code 10 gd32f1x0_usart.o(.text) + usart_autobaud_detection_disable 0x080043d1 Thumb Code 10 gd32f1x0_usart.o(.text) + usart_autobaud_detection_mode_config 0x080043db Thumb Code 16 gd32f1x0_usart.o(.text) + usart_mute_mode_enable 0x080043eb Thumb Code 10 gd32f1x0_usart.o(.text) + usart_mute_mode_disable 0x080043f5 Thumb Code 10 gd32f1x0_usart.o(.text) + usart_mute_mode_wakeup_config 0x080043ff Thumb Code 24 gd32f1x0_usart.o(.text) + usart_address_detection_mode_config 0x08004417 Thumb Code 28 gd32f1x0_usart.o(.text) + usart_address_config 0x08004433 Thumb Code 32 gd32f1x0_usart.o(.text) + usart_receiver_timeout_enable 0x08004453 Thumb Code 10 gd32f1x0_usart.o(.text) + usart_receiver_timeout_disable 0x0800445d Thumb Code 10 gd32f1x0_usart.o(.text) + usart_receiver_timeout_config 0x08004467 Thumb Code 16 gd32f1x0_usart.o(.text) + usart_lin_mode_enable 0x08004477 Thumb Code 18 gd32f1x0_usart.o(.text) + usart_lin_mode_disable 0x08004489 Thumb Code 18 gd32f1x0_usart.o(.text) + usart_lin_break_dection_length_config 0x0800449b Thumb Code 20 gd32f1x0_usart.o(.text) + usart_halfduplex_enable 0x080044af Thumb Code 18 gd32f1x0_usart.o(.text) + usart_halfduplex_disable 0x080044c1 Thumb Code 18 gd32f1x0_usart.o(.text) + usart_clock_enable 0x080044d3 Thumb Code 18 gd32f1x0_usart.o(.text) + usart_clock_disable 0x080044e5 Thumb Code 18 gd32f1x0_usart.o(.text) + usart_synchronous_clock_config 0x080044f7 Thumb Code 50 gd32f1x0_usart.o(.text) + usart_smartcard_mode_enable 0x08004529 Thumb Code 18 gd32f1x0_usart.o(.text) + usart_smartcard_mode_disable 0x0800453b Thumb Code 18 gd32f1x0_usart.o(.text) + usart_smartcard_mode_nack_enable 0x0800454d Thumb Code 18 gd32f1x0_usart.o(.text) + usart_smartcard_mode_nack_disable 0x0800455f Thumb Code 18 gd32f1x0_usart.o(.text) + usart_guard_time_config 0x08004571 Thumb Code 36 gd32f1x0_usart.o(.text) + usart_block_length_config 0x08004595 Thumb Code 24 gd32f1x0_usart.o(.text) + usart_smartcard_autoretry_config 0x080045ad Thumb Code 32 gd32f1x0_usart.o(.text) + usart_irda_mode_enable 0x080045cd Thumb Code 18 gd32f1x0_usart.o(.text) + usart_irda_mode_disable 0x080045df Thumb Code 18 gd32f1x0_usart.o(.text) + usart_irda_lowpower_config 0x080045f1 Thumb Code 20 gd32f1x0_usart.o(.text) + usart_prescaler_config 0x08004605 Thumb Code 24 gd32f1x0_usart.o(.text) + usart_hardware_flow_rts_config 0x0800461d Thumb Code 24 gd32f1x0_usart.o(.text) + usart_hardware_flow_cts_config 0x08004635 Thumb Code 24 gd32f1x0_usart.o(.text) + usart_rs485_driver_enable 0x0800464d Thumb Code 18 gd32f1x0_usart.o(.text) + usart_rs485_driver_disable 0x0800465f Thumb Code 18 gd32f1x0_usart.o(.text) + usart_driver_assertime_config 0x08004671 Thumb Code 32 gd32f1x0_usart.o(.text) + usart_driver_deassertime_config 0x08004691 Thumb Code 32 gd32f1x0_usart.o(.text) + usart_depolarity_config 0x080046b1 Thumb Code 28 gd32f1x0_usart.o(.text) + usart_dma_receive_config 0x080046cd Thumb Code 16 gd32f1x0_usart.o(.text) + usart_dma_transmit_config 0x080046dd Thumb Code 16 gd32f1x0_usart.o(.text) + usart_reception_error_dma_disable 0x080046ed Thumb Code 18 gd32f1x0_usart.o(.text) + usart_reception_error_dma_enable 0x080046ff Thumb Code 18 gd32f1x0_usart.o(.text) + usart_wakeup_enable 0x08004711 Thumb Code 10 gd32f1x0_usart.o(.text) + usart_wakeup_disable 0x0800471b Thumb Code 10 gd32f1x0_usart.o(.text) + usart_wakeup_mode_config 0x08004725 Thumb Code 28 gd32f1x0_usart.o(.text) + usart_flag_get 0x08004741 Thumb Code 30 gd32f1x0_usart.o(.text) + usart_flag_clear 0x0800475f Thumb Code 18 gd32f1x0_usart.o(.text) + usart_interrupt_enable 0x08004771 Thumb Code 26 gd32f1x0_usart.o(.text) + usart_interrupt_disable 0x0800478b Thumb Code 26 gd32f1x0_usart.o(.text) + usart_command_enable 0x080047a5 Thumb Code 8 gd32f1x0_usart.o(.text) + usart_interrupt_flag_get 0x080047ad Thumb Code 56 gd32f1x0_usart.o(.text) + usart_interrupt_flag_clear 0x080047e5 Thumb Code 18 gd32f1x0_usart.o(.text) + Reset_Handler 0x080047f9 Thumb Code 8 startup_gd32f1x0.o(.text) + ADC_CMP_IRQHandler 0x08004813 Thumb Code 0 startup_gd32f1x0.o(.text) + CAN0_RX0_IRQHandler 0x08004813 Thumb Code 0 startup_gd32f1x0.o(.text) + CAN0_RX1_IRQHandler 0x08004813 Thumb Code 0 startup_gd32f1x0.o(.text) + CAN0_SCE_IRQHandler 0x08004813 Thumb Code 0 startup_gd32f1x0.o(.text) + CAN0_TX_IRQHandler 0x08004813 Thumb Code 0 startup_gd32f1x0.o(.text) + CAN1_RX0_IRQHandler 0x08004813 Thumb Code 0 startup_gd32f1x0.o(.text) + CAN1_RX1_IRQHandler 0x08004813 Thumb Code 0 startup_gd32f1x0.o(.text) + CAN1_SCE_IRQHandler 0x08004813 Thumb Code 0 startup_gd32f1x0.o(.text) + CAN1_TX_IRQHandler 0x08004813 Thumb Code 0 startup_gd32f1x0.o(.text) + CEC_IRQHandler 0x08004813 Thumb Code 0 startup_gd32f1x0.o(.text) + DMA_Channel5_6_IRQHandler 0x08004813 Thumb Code 0 startup_gd32f1x0.o(.text) + EXTI0_1_IRQHandler 0x08004813 Thumb Code 0 startup_gd32f1x0.o(.text) + EXTI2_3_IRQHandler 0x08004813 Thumb Code 0 startup_gd32f1x0.o(.text) + EXTI4_15_IRQHandler 0x08004813 Thumb Code 0 startup_gd32f1x0.o(.text) + FMC_IRQHandler 0x08004813 Thumb Code 0 startup_gd32f1x0.o(.text) + I2C0_ER_IRQHandler 0x08004813 Thumb Code 0 startup_gd32f1x0.o(.text) + I2C0_EV_IRQHandler 0x08004813 Thumb Code 0 startup_gd32f1x0.o(.text) + I2C1_ER_IRQHandler 0x08004813 Thumb Code 0 startup_gd32f1x0.o(.text) + I2C1_EV_IRQHandler 0x08004813 Thumb Code 0 startup_gd32f1x0.o(.text) + I2C2_ER_IRQHandler 0x08004813 Thumb Code 0 startup_gd32f1x0.o(.text) + I2C2_EV_IRQHandler 0x08004813 Thumb Code 0 startup_gd32f1x0.o(.text) + LVD_IRQHandler 0x08004813 Thumb Code 0 startup_gd32f1x0.o(.text) + RCU_IRQHandler 0x08004813 Thumb Code 0 startup_gd32f1x0.o(.text) + RTC_IRQHandler 0x08004813 Thumb Code 0 startup_gd32f1x0.o(.text) + SLCD_IRQHandler 0x08004813 Thumb Code 0 startup_gd32f1x0.o(.text) + SPI0_IRQHandler 0x08004813 Thumb Code 0 startup_gd32f1x0.o(.text) + SPI1_IRQHandler 0x08004813 Thumb Code 0 startup_gd32f1x0.o(.text) + SPI2_IRQHandler 0x08004813 Thumb Code 0 startup_gd32f1x0.o(.text) + TIMER0_Channel_IRQHandler 0x08004813 Thumb Code 0 startup_gd32f1x0.o(.text) + TIMER14_IRQHandler 0x08004813 Thumb Code 0 startup_gd32f1x0.o(.text) + TIMER15_IRQHandler 0x08004813 Thumb Code 0 startup_gd32f1x0.o(.text) + TIMER16_IRQHandler 0x08004813 Thumb Code 0 startup_gd32f1x0.o(.text) + TIMER1_IRQHandler 0x08004813 Thumb Code 0 startup_gd32f1x0.o(.text) + TIMER2_IRQHandler 0x08004813 Thumb Code 0 startup_gd32f1x0.o(.text) + TIMER5_DAC_IRQHandler 0x08004813 Thumb Code 0 startup_gd32f1x0.o(.text) + TSI_IRQHandler 0x08004813 Thumb Code 0 startup_gd32f1x0.o(.text) + USART0_IRQHandler 0x08004813 Thumb Code 0 startup_gd32f1x0.o(.text) + USART1_IRQHandler 0x08004813 Thumb Code 0 startup_gd32f1x0.o(.text) + USBDWakeUp_IRQHandler 0x08004813 Thumb Code 0 startup_gd32f1x0.o(.text) + USBD_HP_IRQHandler 0x08004813 Thumb Code 0 startup_gd32f1x0.o(.text) + USBD_LP_IRQHandler 0x08004813 Thumb Code 0 startup_gd32f1x0.o(.text) + WWDGT_IRQHandler 0x08004813 Thumb Code 0 startup_gd32f1x0.o(.text) + __user_initial_stackheap 0x08004815 Thumb Code 10 startup_gd32f1x0.o(.text) + SystemInit 0x080048db Thumb Code 118 system_gd32f1x0.o(.text) + SystemCoreClockUpdate 0x08004951 Thumb Code 208 system_gd32f1x0.o(.text) + __aeabi_memcpy 0x08004a4d Thumb Code 0 rt_memcpy_v6.o(.text) + __rt_memcpy 0x08004a4d Thumb Code 138 rt_memcpy_v6.o(.text) + _memcpy_lastbytes 0x08004ab3 Thumb Code 0 rt_memcpy_v6.o(.text) + __aeabi_memcpy4 0x08004ad7 Thumb Code 0 rt_memcpy_w.o(.text) + __aeabi_memcpy8 0x08004ad7 Thumb Code 0 rt_memcpy_w.o(.text) + __rt_memcpy_w 0x08004ad7 Thumb Code 100 rt_memcpy_w.o(.text) + _memcpy_lastbytes_aligned 0x08004b1f Thumb Code 0 rt_memcpy_w.o(.text) + __use_two_region_memory 0x08004b3b Thumb Code 2 heapauxi.o(.text) + __rt_heap_escrow$2region 0x08004b3d Thumb Code 2 heapauxi.o(.text) + __rt_heap_expand$2region 0x08004b3f Thumb Code 2 heapauxi.o(.text) + __user_setup_stackheap 0x08004b41 Thumb Code 74 sys_stackheap_outer.o(.text) + exit 0x08004b8b Thumb Code 18 exit.o(.text) + __user_libspace 0x08004b9d Thumb Code 8 libspace.o(.text) + __user_perproc_libspace 0x08004b9d Thumb Code 0 libspace.o(.text) + __user_perthread_libspace 0x08004b9d Thumb Code 0 libspace.o(.text) + _sys_exit 0x08004ba5 Thumb Code 8 sys_exit.o(.text) + __I$use$semihosting 0x08004bb1 Thumb Code 0 use_no_semi.o(.text) + __use_no_semihosting_swi 0x08004bb1 Thumb Code 2 use_no_semi.o(.text) + __semihosting_library_function 0x08004bb3 Thumb Code 0 indicate_semi.o(.text) + blockPWM 0x08004bb3 Thumb Code 104 bldc.o(i.blockPWM) + __fpl_dcmp_Inf 0x08004c1b Thumb Code 24 dcmpi.o(x$fpl$dcmpinf) + __aeabi_d2iz 0x08004c35 Thumb Code 0 dfix.o(x$fpl$dfix) + _dfix 0x08004c35 Thumb Code 94 dfix.o(x$fpl$dfix) + __aeabi_i2d 0x08004c93 Thumb Code 0 dflt_clz.o(x$fpl$dflt) + _dflt 0x08004c93 Thumb Code 46 dflt_clz.o(x$fpl$dflt) + __aeabi_cdcmple 0x08004cc1 Thumb Code 0 dleqf.o(x$fpl$dleqf) + _dcmple 0x08004cc1 Thumb Code 120 dleqf.o(x$fpl$dleqf) + __fpl_dcmple_InfNaN 0x08004d23 Thumb Code 0 dleqf.o(x$fpl$dleqf) + __aeabi_dmul 0x08004d39 Thumb Code 0 dmul.o(x$fpl$dmul) + _dmul 0x08004d39 Thumb Code 332 dmul.o(x$fpl$dmul) + __fpl_dnaninf 0x08004e8d Thumb Code 156 dnaninf.o(x$fpl$dnaninf) + __fpl_dretinf 0x08004f29 Thumb Code 12 dretinf.o(x$fpl$dretinf) + __aeabi_f2d 0x08004f35 Thumb Code 0 f2d.o(x$fpl$f2d) + _f2d 0x08004f35 Thumb Code 86 f2d.o(x$fpl$f2d) + __aeabi_f2iz 0x08004f8d Thumb Code 0 ffix.o(x$fpl$ffix) + _ffix 0x08004f8d Thumb Code 54 ffix.o(x$fpl$ffix) + __aeabi_i2f 0x08004fc5 Thumb Code 0 fflt_clz.o(x$fpl$fflt) + _fflt 0x08004fc5 Thumb Code 48 fflt_clz.o(x$fpl$fflt) + __aeabi_fmul 0x08004ff5 Thumb Code 0 fmul.o(x$fpl$fmul) + _fmul 0x08004ff5 Thumb Code 258 fmul.o(x$fpl$fmul) + __fpl_fnaninf 0x080050f7 Thumb Code 140 fnaninf.o(x$fpl$fnaninf) + __fpl_fretinf 0x08005183 Thumb Code 10 fretinf.o(x$fpl$fretinf) + __I$use$fp 0x0800518c Number 0 usenofp.o(x$fpl$usenofp) + pwm_res 0x0800518c Data 2 bldc.o(.constdata) + WHEEL_PERIMETER 0x08005190 Data 4 bldc.o(.constdata) + SPEED_TICKS_FACTOR 0x08005194 Data 4 bldc.o(.constdata) + SINE_TICKS_FACTOR 0x08005198 Data 4 bldc.o(.constdata) + MIN_SPEED 0x0800519c Data 4 bldc.o(.constdata) + MAX_PHASE_PERIOD 0x080051a0 Data 4 bldc.o(.constdata) + MM_PER_CYCLE_FLOAT 0x080051a4 Data 4 bldc.o(.constdata) + sineTable 0x080051a8 Data 720 bldc.o(.constdata) + hall_to_pos 0x08005478 Data 8 bldc.o(.constdata) + KF 0x08005480 Data 4 bldc.o(.constdata) + KFO 0x08005484 Data 4 bldc.o(.constdata) + KP 0x08005488 Data 4 bldc.o(.constdata) + KI 0x0800548c Data 4 bldc.o(.constdata) + ILIMIT 0x08005490 Data 4 bldc.o(.constdata) + Region$$Table$$Base 0x08005494 Number 0 anon$$obj.o(Region$$Table) + Region$$Table$$Limit 0x080054b4 Number 0 anon$$obj.o(Region$$Table) + activateWeakening 0x20000000 Data 1 main.o(.data) + inactivityTimer 0x20000004 Data 4 main.o(.data) + batteryVoltagemV 0x20000008 Data 2 bldc.o(.data) + currentDCmA 0x2000000a Data 2 bldc.o(.data) + cycles 0x2000000c Data 4 bldc.o(.data) + speedCounter 0x20000010 Data 4 bldc.o(.data) + phasePeriod 0x20000014 Data 4 bldc.o(.data) + stepDir 0x20000018 Data 1 bldc.o(.data) + speedDir 0x20000019 Data 1 bldc.o(.data) + controlMode 0x2000001a Data 1 bldc.o(.data) + speedMode 0x2000001b Data 1 bldc.o(.data) + maxStepSpeed 0x2000001c Data 1 bldc.o(.data) + outF 0x2000001e Data 2 bldc.o(.data) + outP 0x20000020 Data 2 bldc.o(.data) + outI 0x20000022 Data 2 bldc.o(.data) + speedError 0x20000024 Data 4 bldc.o(.data) + errorIntegral 0x20000028 Data 4 bldc.o(.data) + stepperMode 0x2000002c Data 1 bldc.o(.data) + phaseRestart 0x2000002d Data 1 bldc.o(.data) + stepperPeriod 0x20000030 Data 4 bldc.o(.data) + stepperTicks 0x20000034 Data 4 bldc.o(.data) + step_y 0x20000038 Data 2 bldc.o(.data) + step_b 0x2000003a Data 2 bldc.o(.data) + step_g 0x2000003c Data 2 bldc.o(.data) + y 0x20000040 Data 4 bldc.o(.data) + b 0x20000044 Data 4 bldc.o(.data) + g 0x20000048 Data 4 bldc.o(.data) + bldcInputPwm 0x2000004c Data 2 bldc.o(.data) + bldcEnable 0x2000004e Data 1 bldc.o(.data) + speedSetpoint 0x20000050 Data 4 bldc.o(.data) + lastSpeedSetpoint 0x20000054 Data 4 bldc.o(.data) + closedLoopSpeed 0x20000058 Data 1 bldc.o(.data) + adc_buffer 0x2000005a Data 4 bldc.o(.data) + pos 0x2000005e Data 1 bldc.o(.data) + lastPos 0x2000005f Data 1 bldc.o(.data) + buzzerToggle 0x20000060 Data 1 bldc.o(.data) + buzzerFreq 0x20000061 Data 1 bldc.o(.data) + buzzerPattern 0x20000062 Data 1 bldc.o(.data) + buzzerTimer 0x20000064 Data 2 bldc.o(.data) + offsetcount 0x20000066 Data 2 bldc.o(.data) + offsetdc 0x20000068 Data 2 bldc.o(.data) + realSpeedFilterReg 0x2000006c Data 4 bldc.o(.data) + realSpeedmmPS 0x20000070 Data 2 bldc.o(.data) + PWMFilterReg 0x20000074 Data 4 bldc.o(.data) + bldcFilteredPwm 0x20000078 Data 2 bldc.o(.data) + usartHUGS_rx_buf 0x2000007a Data 1 setup.o(.data) + usartSteer_COM_rx_buf 0x2000007b Data 1 setup.o(.data) + msTicks 0x2000007c Data 4 it.o(.data) + sysTicks 0x20000080 Data 4 it.o(.data) + driveSafeMs 0x20000084 Data 4 it.o(.data) + timedOut 0x20000088 Data 1 it.o(.data) + msToggle 0x20000089 Data 1 it.o(.data) + Steer_CommandID 0x2000008e Data 1 commssteering.o(.data) + Steer_ResponseID 0x2000008f Data 1 commssteering.o(.data) + HUGS_ESTOP 0x20000092 Data 1 commshugs.o(.data) + HUGS_WatchDog 0x20000094 Data 2 commshugs.o(.data) + HUGS_Destination 0x20000096 Data 1 commshugs.o(.data) + HUGS_Sequence 0x20000097 Data 1 commshugs.o(.data) + HUGS_CommandID 0x20000098 Data 1 commshugs.o(.data) + HUGS_ResponseID 0x20000099 Data 1 commshugs.o(.data) + SystemCoreClock 0x2000009c Data 4 system_gd32f1x0.o(.data) + timeoutTimer_paramter_struct 0x200000a0 Data 16 setup.o(.bss) + timerBldc_paramter_struct 0x200000b0 Data 16 setup.o(.bss) + timerBldc_break_parameter_struct 0x200000c0 Data 14 setup.o(.bss) + timerBldc_oc_parameter_struct 0x200000ce Data 12 setup.o(.bss) + dma_init_struct_usart 0x200000dc Data 36 setup.o(.bss) + dma_init_struct_adc 0x20000100 Data 36 setup.o(.bss) + __libspace_start 0x20000144 Data 96 libspace.o(.bss) + __temporary_stack_top$libspace 0x200001a4 Data 0 libspace.o(.bss) + + + +============================================================================== + +Memory Map of the image + + Image Entry point : 0x08000169 + + Load Region LR_IROM1 (Base: 0x08000000, Size: 0x00005554, Max: 0x00010000, ABSOLUTE) + + Execution Region ER_IROM1 (Exec base: 0x08000000, Load base: 0x08000000, Size: 0x000054b4, Max: 0x00010000, ABSOLUTE) + + Exec Addr Load Addr Size Type Attr Idx E Section Name Object + + 0x08000000 0x08000000 0x00000168 Data RO 667 RESET startup_gd32f1x0.o + 0x08000168 0x08000168 0x00000008 Code RO 710 * !!!main c_w.l(__main.o) + 0x08000170 0x08000170 0x00000034 Code RO 908 !!!scatter c_w.l(__scatter.o) + 0x080001a4 0x080001a4 0x0000001a Code RO 910 !!handler_copy c_w.l(__scatter_copy.o) + 0x080001be 0x080001be 0x00000002 PAD + 0x080001c0 0x080001c0 0x0000001c Code RO 912 !!handler_zi c_w.l(__scatter_zi.o) + 0x080001dc 0x080001dc 0x00000002 Code RO 776 .ARM.Collect$$libinit$$00000000 c_w.l(libinit.o) + 0x080001de 0x080001de 0x00000000 Code RO 783 .ARM.Collect$$libinit$$00000002 c_w.l(libinit2.o) + 0x080001de 0x080001de 0x00000000 Code RO 785 .ARM.Collect$$libinit$$00000004 c_w.l(libinit2.o) + 0x080001de 0x080001de 0x00000000 Code RO 788 .ARM.Collect$$libinit$$0000000A c_w.l(libinit2.o) + 0x080001de 0x080001de 0x00000000 Code RO 790 .ARM.Collect$$libinit$$0000000C c_w.l(libinit2.o) + 0x080001de 0x080001de 0x00000000 Code RO 792 .ARM.Collect$$libinit$$0000000E c_w.l(libinit2.o) + 0x080001de 0x080001de 0x00000000 Code RO 795 .ARM.Collect$$libinit$$00000011 c_w.l(libinit2.o) + 0x080001de 0x080001de 0x00000000 Code RO 797 .ARM.Collect$$libinit$$00000013 c_w.l(libinit2.o) + 0x080001de 0x080001de 0x00000000 Code RO 799 .ARM.Collect$$libinit$$00000015 c_w.l(libinit2.o) + 0x080001de 0x080001de 0x00000000 Code RO 801 .ARM.Collect$$libinit$$00000017 c_w.l(libinit2.o) + 0x080001de 0x080001de 0x00000000 Code RO 803 .ARM.Collect$$libinit$$00000019 c_w.l(libinit2.o) + 0x080001de 0x080001de 0x00000000 Code RO 805 .ARM.Collect$$libinit$$0000001B c_w.l(libinit2.o) + 0x080001de 0x080001de 0x00000000 Code RO 807 .ARM.Collect$$libinit$$0000001D c_w.l(libinit2.o) + 0x080001de 0x080001de 0x00000000 Code RO 809 .ARM.Collect$$libinit$$0000001F c_w.l(libinit2.o) + 0x080001de 0x080001de 0x00000000 Code RO 811 .ARM.Collect$$libinit$$00000021 c_w.l(libinit2.o) + 0x080001de 0x080001de 0x00000000 Code RO 813 .ARM.Collect$$libinit$$00000023 c_w.l(libinit2.o) + 0x080001de 0x080001de 0x00000000 Code RO 815 .ARM.Collect$$libinit$$00000025 c_w.l(libinit2.o) + 0x080001de 0x080001de 0x00000000 Code RO 819 .ARM.Collect$$libinit$$0000002C c_w.l(libinit2.o) + 0x080001de 0x080001de 0x00000000 Code RO 821 .ARM.Collect$$libinit$$0000002E c_w.l(libinit2.o) + 0x080001de 0x080001de 0x00000000 Code RO 823 .ARM.Collect$$libinit$$00000030 c_w.l(libinit2.o) + 0x080001de 0x080001de 0x00000000 Code RO 825 .ARM.Collect$$libinit$$00000032 c_w.l(libinit2.o) + 0x080001de 0x080001de 0x00000002 Code RO 826 .ARM.Collect$$libinit$$00000033 c_w.l(libinit2.o) + 0x080001e0 0x080001e0 0x00000002 Code RO 846 .ARM.Collect$$libshutdown$$00000000 c_w.l(libshutdown.o) + 0x080001e2 0x080001e2 0x00000000 Code RO 859 .ARM.Collect$$libshutdown$$00000002 c_w.l(libshutdown2.o) + 0x080001e2 0x080001e2 0x00000000 Code RO 861 .ARM.Collect$$libshutdown$$00000004 c_w.l(libshutdown2.o) + 0x080001e2 0x080001e2 0x00000000 Code RO 863 .ARM.Collect$$libshutdown$$00000006 c_w.l(libshutdown2.o) + 0x080001e2 0x080001e2 0x00000000 Code RO 866 .ARM.Collect$$libshutdown$$00000009 c_w.l(libshutdown2.o) + 0x080001e2 0x080001e2 0x00000000 Code RO 869 .ARM.Collect$$libshutdown$$0000000C c_w.l(libshutdown2.o) + 0x080001e2 0x080001e2 0x00000000 Code RO 871 .ARM.Collect$$libshutdown$$0000000E c_w.l(libshutdown2.o) + 0x080001e2 0x080001e2 0x00000000 Code RO 874 .ARM.Collect$$libshutdown$$00000011 c_w.l(libshutdown2.o) + 0x080001e2 0x080001e2 0x00000002 Code RO 875 .ARM.Collect$$libshutdown$$00000012 c_w.l(libshutdown2.o) + 0x080001e4 0x080001e4 0x00000000 Code RO 740 .ARM.Collect$$rtentry$$00000000 c_w.l(__rtentry.o) + 0x080001e4 0x080001e4 0x00000000 Code RO 753 .ARM.Collect$$rtentry$$00000002 c_w.l(__rtentry2.o) + 0x080001e4 0x080001e4 0x00000006 Code RO 765 .ARM.Collect$$rtentry$$00000004 c_w.l(__rtentry4.o) + 0x080001ea 0x080001ea 0x00000000 Code RO 755 .ARM.Collect$$rtentry$$00000009 c_w.l(__rtentry2.o) + 0x080001ea 0x080001ea 0x00000004 Code RO 756 .ARM.Collect$$rtentry$$0000000A c_w.l(__rtentry2.o) + 0x080001ee 0x080001ee 0x00000000 Code RO 758 .ARM.Collect$$rtentry$$0000000C c_w.l(__rtentry2.o) + 0x080001ee 0x080001ee 0x00000008 Code RO 759 .ARM.Collect$$rtentry$$0000000D c_w.l(__rtentry2.o) + 0x080001f6 0x080001f6 0x00000002 Code RO 780 .ARM.Collect$$rtexit$$00000000 c_w.l(rtexit.o) + 0x080001f8 0x080001f8 0x00000000 Code RO 828 .ARM.Collect$$rtexit$$00000002 c_w.l(rtexit2.o) + 0x080001f8 0x080001f8 0x00000004 Code RO 829 .ARM.Collect$$rtexit$$00000003 c_w.l(rtexit2.o) + 0x080001fc 0x080001fc 0x00000006 Code RO 830 .ARM.Collect$$rtexit$$00000004 c_w.l(rtexit2.o) + 0x08000202 0x08000202 0x00000002 PAD + 0x08000204 0x08000204 0x0000025c Code RO 4 .text main.o + 0x08000460 0x08000460 0x00000824 Code RO 144 .text bldc.o + 0x08000c84 0x08000c84 0x00000804 Code RO 183 .text setup.o + 0x08001488 0x08001488 0x00000128 Code RO 212 .text it.o + 0x080015b0 0x080015b0 0x00000070 Code RO 246 .text comms.o + 0x08001620 0x08001620 0x00000220 Code RO 270 .text commssteering.o + 0x08001840 0x08001840 0x00000490 Code RO 323 .text commshugs.o + 0x08001cd0 0x08001cd0 0x00000684 Code RO 352 .text gd32f1x0_adc.o + 0x08002354 0x08002354 0x000004b4 Code RO 400 .text gd32f1x0_dma.o + 0x08002808 0x08002808 0x000000cc Code RO 424 .text gd32f1x0_fwdgt.o + 0x080028d4 0x080028d4 0x000001dc Code RO 448 .text gd32f1x0_gpio.o + 0x08002ab0 0x08002ab0 0x00000124 Code RO 496 .text gd32f1x0_misc.o + 0x08002bd4 0x08002bd4 0x000008a8 Code RO 548 .text gd32f1x0_rcu.o + 0x0800347c 0x0800347c 0x00000d2a Code RO 596 .text gd32f1x0_timer.o + 0x080041a6 0x080041a6 0x00000002 PAD + 0x080041a8 0x080041a8 0x0000064e Code RO 620 .text gd32f1x0_usart.o + 0x080047f6 0x080047f6 0x00000002 PAD + 0x080047f8 0x080047f8 0x00000040 Code RO 668 .text startup_gd32f1x0.o + 0x08004838 0x08004838 0x00000214 Code RO 675 .text system_gd32f1x0.o + 0x08004a4c 0x08004a4c 0x0000008a Code RO 704 .text c_w.l(rt_memcpy_v6.o) + 0x08004ad6 0x08004ad6 0x00000064 Code RO 706 .text c_w.l(rt_memcpy_w.o) + 0x08004b3a 0x08004b3a 0x00000006 Code RO 708 .text c_w.l(heapauxi.o) + 0x08004b40 0x08004b40 0x0000004a Code RO 767 .text c_w.l(sys_stackheap_outer.o) + 0x08004b8a 0x08004b8a 0x00000012 Code RO 769 .text c_w.l(exit.o) + 0x08004b9c 0x08004b9c 0x00000008 Code RO 777 .text c_w.l(libspace.o) + 0x08004ba4 0x08004ba4 0x0000000c Code RO 838 .text c_w.l(sys_exit.o) + 0x08004bb0 0x08004bb0 0x00000002 Code RO 849 .text c_w.l(use_no_semi.o) + 0x08004bb2 0x08004bb2 0x00000000 Code RO 851 .text c_w.l(indicate_semi.o) + 0x08004bb2 0x08004bb2 0x00000068 Code RO 166 i.blockPWM bldc.o + 0x08004c1a 0x08004c1a 0x00000018 Code RO 741 x$fpl$dcmpinf fz_ws.l(dcmpi.o) + 0x08004c32 0x08004c32 0x00000002 PAD + 0x08004c34 0x08004c34 0x0000005e Code RO 712 x$fpl$dfix fz_ws.l(dfix.o) + 0x08004c92 0x08004c92 0x0000002e Code RO 717 x$fpl$dflt fz_ws.l(dflt_clz.o) + 0x08004cc0 0x08004cc0 0x00000078 Code RO 722 x$fpl$dleqf fz_ws.l(dleqf.o) + 0x08004d38 0x08004d38 0x00000154 Code RO 724 x$fpl$dmul fz_ws.l(dmul.o) + 0x08004e8c 0x08004e8c 0x0000009c Code RO 743 x$fpl$dnaninf fz_ws.l(dnaninf.o) + 0x08004f28 0x08004f28 0x0000000c Code RO 745 x$fpl$dretinf fz_ws.l(dretinf.o) + 0x08004f34 0x08004f34 0x00000056 Code RO 726 x$fpl$f2d fz_ws.l(f2d.o) + 0x08004f8a 0x08004f8a 0x00000002 PAD + 0x08004f8c 0x08004f8c 0x00000036 Code RO 728 x$fpl$ffix fz_ws.l(ffix.o) + 0x08004fc2 0x08004fc2 0x00000002 PAD + 0x08004fc4 0x08004fc4 0x00000030 Code RO 733 x$fpl$fflt fz_ws.l(fflt_clz.o) + 0x08004ff4 0x08004ff4 0x00000102 Code RO 738 x$fpl$fmul fz_ws.l(fmul.o) + 0x080050f6 0x080050f6 0x0000008c Code RO 747 x$fpl$fnaninf fz_ws.l(fnaninf.o) + 0x08005182 0x08005182 0x0000000a Code RO 749 x$fpl$fretinf fz_ws.l(fretinf.o) + 0x0800518c 0x0800518c 0x00000000 Code RO 751 x$fpl$usenofp fz_ws.l(usenofp.o) + 0x0800518c 0x0800518c 0x00000308 Data RO 145 .constdata bldc.o + 0x08005494 0x08005494 0x00000020 Data RO 906 Region$$Table anon$$obj.o + + + Execution Region RW_IRAM1 (Exec base: 0x20000000, Load base: 0x080054b4, Size: 0x000009a8, Max: 0x00002000, ABSOLUTE) + + Exec Addr Load Addr Size Type Attr Idx E Section Name Object + + 0x20000000 0x080054b4 0x00000008 Data RW 5 .data main.o + 0x20000008 0x080054bc 0x00000072 Data RW 146 .data bldc.o + 0x2000007a 0x0800552e 0x00000002 Data RW 185 .data setup.o + 0x2000007c 0x08005530 0x0000000e Data RW 213 .data it.o + 0x2000008a 0x0800553e 0x00000006 Data RW 272 .data commssteering.o + 0x20000090 0x08005544 0x0000000a Data RW 325 .data commshugs.o + 0x2000009a 0x0800554e 0x00000002 PAD + 0x2000009c 0x08005550 0x00000004 Data RW 676 .data system_gd32f1x0.o + 0x200000a0 - 0x00000084 Zero RW 184 .bss setup.o + 0x20000124 - 0x0000000c Zero RW 271 .bss commssteering.o + 0x20000130 - 0x00000011 Zero RW 324 .bss commshugs.o + 0x20000141 0x08005554 0x00000003 PAD + 0x20000144 - 0x00000060 Zero RW 778 .bss c_w.l(libspace.o) + 0x200001a4 0x08005554 0x00000004 PAD + 0x200001a8 - 0x00000400 Zero RW 666 HEAP startup_gd32f1x0.o + 0x200005a8 - 0x00000400 Zero RW 665 STACK startup_gd32f1x0.o + + +============================================================================== + +Image component sizes + + + Code (inc. data) RO Data RW Data ZI Data Debug Object Name + + 2188 316 776 114 0 7153 bldc.o + 112 0 0 0 0 1245 comms.o + 1168 94 0 10 17 4142 commshugs.o + 544 42 0 6 12 2932 commssteering.o + 1668 22 0 0 0 6889 gd32f1x0_adc.o + 1204 8 0 0 0 5839 gd32f1x0_dma.o + 204 10 0 0 0 1746 gd32f1x0_fwdgt.o + 476 10 0 0 0 3701 gd32f1x0_gpio.o + 292 22 0 0 0 1821 gd32f1x0_misc.o + 2216 90 0 0 0 9288 gd32f1x0_rcu.o + 3370 30 0 0 0 17836 gd32f1x0_timer.o + 1614 12 0 0 0 14129 gd32f1x0_usart.o + 296 32 0 14 0 2925 it.o + 604 44 0 8 0 89836 main.o + 2052 74 0 2 132 3508 setup.o + 64 26 360 0 2048 868 startup_gd32f1x0.o + 532 44 0 4 0 2097 system_gd32f1x0.o + + ---------------------------------------------------------------------- + 18608 876 1168 160 2212 175955 Object Totals + 0 0 32 0 0 0 (incl. Generated) + 4 0 0 2 3 0 (incl. Padding) + + ---------------------------------------------------------------------- + + Code (inc. data) RO Data RW Data ZI Data Debug Library Member Name + + 8 0 0 0 0 68 __main.o + 0 0 0 0 0 0 __rtentry.o + 12 0 0 0 0 0 __rtentry2.o + 6 0 0 0 0 0 __rtentry4.o + 52 8 0 0 0 0 __scatter.o + 26 0 0 0 0 0 __scatter_copy.o + 28 0 0 0 0 0 __scatter_zi.o + 18 0 0 0 0 80 exit.o + 6 0 0 0 0 152 heapauxi.o + 0 0 0 0 0 0 indicate_semi.o + 2 0 0 0 0 0 libinit.o + 2 0 0 0 0 0 libinit2.o + 2 0 0 0 0 0 libshutdown.o + 2 0 0 0 0 0 libshutdown2.o + 8 4 0 0 96 68 libspace.o + 138 0 0 0 0 68 rt_memcpy_v6.o + 100 0 0 0 0 80 rt_memcpy_w.o + 2 0 0 0 0 0 rtexit.o + 10 0 0 0 0 0 rtexit2.o + 12 4 0 0 0 68 sys_exit.o + 74 0 0 0 0 80 sys_stackheap_outer.o + 2 0 0 0 0 68 use_no_semi.o + 24 0 0 0 0 68 dcmpi.o + 94 4 0 0 0 92 dfix.o + 46 0 0 0 0 68 dflt_clz.o + 120 4 0 0 0 92 dleqf.o + 340 12 0 0 0 104 dmul.o + 156 4 0 0 0 92 dnaninf.o + 12 0 0 0 0 68 dretinf.o + 86 4 0 0 0 84 f2d.o + 54 4 0 0 0 84 ffix.o + 48 0 0 0 0 68 fflt_clz.o + 258 4 0 0 0 84 fmul.o + 140 4 0 0 0 84 fnaninf.o + 10 0 0 0 0 68 fretinf.o + 0 0 0 0 0 0 usenofp.o + + ---------------------------------------------------------------------- + 1908 56 0 0 100 1788 Library Totals + 10 0 0 0 4 0 (incl. Padding) + + ---------------------------------------------------------------------- + + Code (inc. data) RO Data RW Data ZI Data Debug Library Name + + 510 16 0 0 96 732 c_w.l + 1388 40 0 0 0 1056 fz_ws.l + + ---------------------------------------------------------------------- + 1908 56 0 0 100 1788 Library Totals + + ---------------------------------------------------------------------- + +============================================================================== + + + Code (inc. data) RO Data RW Data ZI Data Debug + + 20516 932 1168 160 2312 174879 Grand Totals + 20516 932 1168 160 2312 174879 ELF Image Totals + 20516 932 1168 160 0 0 ROM Totals + +============================================================================== + + Total RO Size (Code + RO Data) 21684 ( 21.18kB) + Total RW Size (RW Data + ZI Data) 2472 ( 2.41kB) + Total ROM Size (Code + RO Data + RW Data) 21844 ( 21.33kB) + +============================================================================== + diff --git a/HoverBoardGigaDevice/Listings/startup_gd32f1x0.lst b/HUGS/Listings/startup_gd32f1x0.lst similarity index 96% rename from HoverBoardGigaDevice/Listings/startup_gd32f1x0.lst rename to HUGS/Listings/startup_gd32f1x0.lst index a63579d9..c1325581 100644 --- a/HoverBoardGigaDevice/Listings/startup_gd32f1x0.lst +++ b/HUGS/Listings/startup_gd32f1x0.lst @@ -1,1287 +1,1288 @@ - - - -ARM Macro Assembler Page 1 - - - 1 00000000 ;/*! - 2 00000000 ; \file startup_gd32f1x0.s - 3 00000000 ; \brief start up file - 4 00000000 ;*/ - 5 00000000 - 6 00000000 ;/* - 7 00000000 ; Copyright (C) 2017 GigaDevice - 8 00000000 - 9 00000000 ; 2014-12-26, V1.0.0, firmware for GD32F1x0(x=3,5) - 10 00000000 ; 2016-01-15, V2.0.0, firmware for GD32F1x0(x=3,5,7,9 - ) - 11 00000000 ; 2016-04-30, V3.0.0, firmware update for GD32F1x0(x= - 3,5,7,9) - 12 00000000 ; 2017-06-19, V3.1.0, firmware update for GD32F1x0(x= - 3,5,7,9) - 13 00000000 ;*/ - 14 00000000 - 15 00000000 ; Stack Configuration - 16 00000000 ; Stack Size (in Bytes) <0x0-0xFFFFFFFF:8> - 17 00000000 ; - 18 00000000 - 19 00000000 00000400 - Stack_Size - EQU 0x00000400 - 20 00000000 - 21 00000000 AREA STACK, NOINIT, READWRITE, ALIGN -=3 - 22 00000000 Stack_Mem - SPACE Stack_Size - 23 00000400 __initial_sp - 24 00000400 - 25 00000400 - 26 00000400 ; Heap Configuration - 27 00000400 ; Heap Size (in Bytes) <0x0-0xFFFFFFFF:8> - 28 00000400 ; - 29 00000400 - 30 00000400 00000400 - Heap_Size - EQU 0x00000400 - 31 00000400 - 32 00000400 AREA HEAP, NOINIT, READWRITE, ALIGN= -3 - 33 00000000 __heap_base - 34 00000000 Heap_Mem - SPACE Heap_Size - 35 00000400 __heap_limit - 36 00000400 - 37 00000400 PRESERVE8 - 38 00000400 THUMB - 39 00000400 - 40 00000400 ; /* reset Vector Mapped to at Address 0 * - / - 41 00000400 AREA RESET, DATA, READONLY - 42 00000000 EXPORT __Vectors - 43 00000000 EXPORT __Vectors_End - 44 00000000 EXPORT __Vectors_Size - 45 00000000 - 46 00000000 00000000 - __Vectors - - - -ARM Macro Assembler Page 2 - - - DCD __initial_sp ; Top of Stack - 47 00000004 00000000 DCD Reset_Handler ; Reset Handler - 48 00000008 00000000 DCD NMI_Handler ; NMI Handler - 49 0000000C 00000000 DCD HardFault_Handler ; Hard Fault - Handler - 50 00000010 00000000 DCD MemManage_Handler - ; MPU Fault Handler - - 51 00000014 00000000 DCD BusFault_Handler - ; Bus Fault Handler - - 52 00000018 00000000 DCD UsageFault_Handler ; Usage Faul - t Handler - 53 0000001C 00000000 DCD 0 ; Reserved - 54 00000020 00000000 DCD 0 ; Reserved - 55 00000024 00000000 DCD 0 ; Reserved - 56 00000028 00000000 DCD 0 ; Reserved - 57 0000002C 00000000 DCD SVC_Handler ; SVCall Handler - 58 00000030 00000000 DCD DebugMon_Handler ; Debug Monito - r Handler - 59 00000034 00000000 DCD 0 ; Reserved - 60 00000038 00000000 DCD PendSV_Handler ; PendSV Handler - - 61 0000003C 00000000 DCD SysTick_Handler - ; SysTick Handler - 62 00000040 - 63 00000040 ; /* external interrupts handler */ - 64 00000040 00000000 DCD WWDGT_IRQHandler ; 16:Window Wa - tchdog Timer - 65 00000044 00000000 DCD LVD_IRQHandler ; 17:LVD through - EXTI Line detect - 66 00000048 00000000 DCD RTC_IRQHandler ; 18:RTC through - EXTI Line - 67 0000004C 00000000 DCD FMC_IRQHandler ; 19:FMC - 68 00000050 00000000 DCD RCU_IRQHandler ; 20:RCU - 69 00000054 00000000 DCD EXTI0_1_IRQHandler ; 21:EXTI Li - ne 0 and EXTI Line - 1 - 70 00000058 00000000 DCD EXTI2_3_IRQHandler ; 22:EXTI Li - ne 2 and EXTI Line - 3 - 71 0000005C 00000000 DCD EXTI4_15_IRQHandler ; 23:EXTI L - ine 4 to EXTI Line - 15 - 72 00000060 00000000 DCD TSI_IRQHandler ; 24:TSI - 73 00000064 00000000 DCD DMA_Channel0_IRQHandler - ; 25:DMA Channel 0 - - 74 00000068 00000000 DCD DMA_Channel1_2_IRQHandler ; 26: - DMA Channel 1 and D - MA Channel 2 - 75 0000006C 00000000 DCD DMA_Channel3_4_IRQHandler ; 27: - DMA Channel 3 and D - MA Channel 4 - 76 00000070 00000000 DCD ADC_CMP_IRQHandler ; 28:ADC and - Comparator 0-1 - 77 00000074 00000000 DCD TIMER0_BRK_UP_TRG_COM_IRQHandle -r - ; 29:TIMER0 Break,U - - - -ARM Macro Assembler Page 3 - - - pdate,Trigger and C - ommutation - 78 00000078 00000000 DCD TIMER0_Channel_IRQHandler - ; 30:TIMER0 Channel - - 79 0000007C 00000000 DCD TIMER1_IRQHandler ; 31:TIMER1 - 80 00000080 00000000 DCD TIMER2_IRQHandler ; 32:TIMER2 - 81 00000084 00000000 DCD TIMER5_DAC_IRQHandler - ; 33:TIMER5 and DAC - - 82 00000088 00000000 DCD 0 ; Reserved - 83 0000008C 00000000 DCD TIMER13_IRQHandler ; 35:TIMER13 - - 84 00000090 00000000 DCD TIMER14_IRQHandler ; 36:TIMER14 - - 85 00000094 00000000 DCD TIMER15_IRQHandler ; 37:TIMER15 - - 86 00000098 00000000 DCD TIMER16_IRQHandler ; 38:TIMER16 - - 87 0000009C 00000000 DCD I2C0_EV_IRQHandler - ; 39:I2C0 Event - 88 000000A0 00000000 DCD I2C1_EV_IRQHandler - ; 40:I2C1 Event - 89 000000A4 00000000 DCD SPI0_IRQHandler ; 41:SPI0 - 90 000000A8 00000000 DCD SPI1_IRQHandler ; 42:SPI1 - 91 000000AC 00000000 DCD USART0_IRQHandler ; 43:USART0 - 92 000000B0 00000000 DCD USART1_IRQHandler ; 44:USART1 - 93 000000B4 00000000 DCD 0 ; Reserved - 94 000000B8 00000000 DCD CEC_IRQHandler ; 46:CEC - 95 000000BC 00000000 DCD 0 ; Reserved - 96 000000C0 00000000 DCD I2C0_ER_IRQHandler - ; 48:I2C0 Error - 97 000000C4 00000000 DCD 0 ; Reserved - 98 000000C8 00000000 DCD I2C1_ER_IRQHandler - ; 50:I2C1 Error - 99 000000CC 00000000 DCD I2C2_EV_IRQHandler - ; 51:I2C2 Event - 100 000000D0 00000000 DCD I2C2_ER_IRQHandler - ; 52:I2C2 Error - 101 000000D4 00000000 DCD USBD_LP_IRQHandler ; 53:USBD LP - - 102 000000D8 00000000 DCD USBD_HP_IRQHandler ; 54:USBD HP - - 103 000000DC 00000000 DCD 0 ; Reserved - 104 000000E0 00000000 DCD 0 ; Reserved - 105 000000E4 00000000 DCD 0 ; Reserved - 106 000000E8 00000000 DCD USBDWakeUp_IRQHandler - ; 58:USBD Wakeup - 107 000000EC 00000000 DCD CAN0_TX_IRQHandler ; 59:CAN0 TX - - 108 000000F0 00000000 DCD CAN0_RX0_IRQHandler - ; 60:CAN0 RX0 - 109 000000F4 00000000 DCD CAN0_RX1_IRQHandler - ; 61:CAN0 RX1 - 110 000000F8 00000000 DCD CAN0_SCE_IRQHandler - ; 62:CAN0 SCE - 111 000000FC 00000000 DCD SLCD_IRQHandler ; 63:SLCD - 112 00000100 00000000 DCD DMA_Channel5_6_IRQHandler ; 64: - DMA Channel5 and Ch - - - -ARM Macro Assembler Page 4 - - - annel6 - 113 00000104 00000000 DCD 0 ; Reserved - 114 00000108 00000000 DCD 0 ; Reserved - 115 0000010C 00000000 DCD SPI2_IRQHandler ; 67:SPI2 - 116 00000110 00000000 DCD 0 ; Reserved - 117 00000114 00000000 DCD 0 ; Reserved - 118 00000118 00000000 DCD 0 ; Reserved - 119 0000011C 00000000 DCD 0 ; Reserved - 120 00000120 00000000 DCD 0 ; Reserved - 121 00000124 00000000 DCD 0 ; Reserved - 122 00000128 00000000 DCD 0 ; Reserved - 123 0000012C 00000000 DCD 0 ; Reserved - 124 00000130 00000000 DCD 0 ; Reserved - 125 00000134 00000000 DCD 0 ; Reserved - 126 00000138 00000000 DCD 0 ; Reserved - 127 0000013C 00000000 DCD 0 ; Reserved - 128 00000140 00000000 DCD 0 ; Reserved - 129 00000144 00000000 DCD 0 ; Reserved - 130 00000148 00000000 DCD 0 ; Reserved - 131 0000014C 00000000 DCD 0 ; Reserved - 132 00000150 00000000 DCD 0 ; Reserved - 133 00000154 00000000 DCD 0 ; Reserved - 134 00000158 00000000 DCD CAN1_TX_IRQHandler ; 86:CAN1 TX - - 135 0000015C 00000000 DCD CAN1_RX0_IRQHandler - ; 87:CAN1 RX0 - 136 00000160 00000000 DCD CAN1_RX1_IRQHandler - ; 88:CAN1 RX1 - 137 00000164 00000000 DCD CAN1_SCE_IRQHandler - ; 89:CAN1 SCE - 138 00000168 __Vectors_End - 139 00000168 - 140 00000168 00000168 - __Vectors_Size - EQU __Vectors_End - __Vectors - 141 00000168 - 142 00000168 AREA |.text|, CODE, READONLY - 143 00000000 - 144 00000000 ;/* reset Handler */ - 145 00000000 Reset_Handler - PROC - 146 00000000 EXPORT Reset_Handler - [WEAK] - 147 00000000 IMPORT SystemInit - 148 00000000 IMPORT __main - 149 00000000 4809 LDR R0, =SystemInit - 150 00000002 4780 BLX R0 - 151 00000004 4809 LDR R0, =__main - 152 00000006 4700 BX R0 - 153 00000008 ENDP - 154 00000008 - 155 00000008 ;/* dummy Exception Handlers */ - 156 00000008 NMI_Handler - PROC - 157 00000008 EXPORT NMI_Handler - [WEAK] - 158 00000008 E7FE B . - 159 0000000A ENDP - 161 0000000A HardFault_Handler - - - -ARM Macro Assembler Page 5 - - - PROC - 162 0000000A EXPORT HardFault_Handler - [WEAK] - 163 0000000A E7FE B . - 164 0000000C ENDP - 166 0000000C MemManage_Handler - PROC - 167 0000000C EXPORT MemManage_Handler - [WEAK] - 168 0000000C E7FE B . - 169 0000000E ENDP - 171 0000000E BusFault_Handler - PROC - 172 0000000E EXPORT BusFault_Handler - [WEAK] - 173 0000000E E7FE B . - 174 00000010 ENDP - 176 00000010 UsageFault_Handler - PROC - 177 00000010 EXPORT UsageFault_Handler - [WEAK] - 178 00000010 E7FE B . - 179 00000012 ENDP - 180 00000012 SVC_Handler - PROC - 181 00000012 EXPORT SVC_Handler - [WEAK] - 182 00000012 E7FE B . - 183 00000014 ENDP - 185 00000014 DebugMon_Handler - PROC - 186 00000014 EXPORT DebugMon_Handler - [WEAK] - 187 00000014 E7FE B . - 188 00000016 ENDP - 190 00000016 PendSV_Handler - PROC - 191 00000016 EXPORT PendSV_Handler - [WEAK] - 192 00000016 E7FE B . - 193 00000018 ENDP - 195 00000018 SysTick_Handler - PROC - 196 00000018 EXPORT SysTick_Handler - [WEAK] - 197 00000018 E7FE B . - 198 0000001A ENDP - 199 0000001A - 200 0000001A Default_Handler - PROC - 201 0000001A ; /* external interrupts handler */ - 202 0000001A EXPORT WWDGT_IRQHandler - [WEAK] - 203 0000001A EXPORT LVD_IRQHandler - [WEAK] - 204 0000001A EXPORT RTC_IRQHandler - [WEAK] - 205 0000001A EXPORT FMC_IRQHandler - [WEAK] - - - -ARM Macro Assembler Page 6 - - - 206 0000001A EXPORT RCU_IRQHandler - [WEAK] - 207 0000001A EXPORT EXTI0_1_IRQHandler - [WEAK] - 208 0000001A EXPORT EXTI2_3_IRQHandler - [WEAK] - 209 0000001A EXPORT EXTI4_15_IRQHandler - [WEAK] - 210 0000001A EXPORT TSI_IRQHandler - [WEAK] - 211 0000001A EXPORT DMA_Channel0_IRQHandler - [WEAK] - 212 0000001A EXPORT DMA_Channel1_2_IRQHandler - [WEAK] - 213 0000001A EXPORT DMA_Channel3_4_IRQHandler - [WEAK] - 214 0000001A EXPORT ADC_CMP_IRQHandler - [WEAK] - 215 0000001A EXPORT TIMER0_BRK_UP_TRG_COM_IRQHandle -r [WEAK] - 216 0000001A EXPORT TIMER0_Channel_IRQHandler - [WEAK] - 217 0000001A EXPORT TIMER1_IRQHandler - [WEAK] - 218 0000001A EXPORT TIMER2_IRQHandler - [WEAK] - 219 0000001A EXPORT TIMER5_DAC_IRQHandler - [WEAK] - 220 0000001A EXPORT TIMER13_IRQHandler - [WEAK] - 221 0000001A EXPORT TIMER14_IRQHandler - [WEAK] - 222 0000001A EXPORT TIMER15_IRQHandler - [WEAK] - 223 0000001A EXPORT TIMER16_IRQHandler - [WEAK] - 224 0000001A EXPORT I2C0_EV_IRQHandler - [WEAK] - 225 0000001A EXPORT I2C1_EV_IRQHandler - [WEAK] - 226 0000001A EXPORT SPI0_IRQHandler - [WEAK] - 227 0000001A EXPORT SPI1_IRQHandler - [WEAK] - 228 0000001A EXPORT USART0_IRQHandler - [WEAK] - 229 0000001A EXPORT USART1_IRQHandler - [WEAK] - 230 0000001A EXPORT CEC_IRQHandler - [WEAK] - 231 0000001A EXPORT I2C0_ER_IRQHandler - [WEAK] - 232 0000001A EXPORT I2C1_ER_IRQHandler - [WEAK] - 233 0000001A EXPORT I2C2_EV_IRQHandler - [WEAK] - 234 0000001A EXPORT I2C2_ER_IRQHandler - [WEAK] - 235 0000001A EXPORT USBD_LP_IRQHandler - - - -ARM Macro Assembler Page 7 - - - [WEAK] - 236 0000001A EXPORT USBD_HP_IRQHandler - [WEAK] - 237 0000001A EXPORT USBDWakeUp_IRQHandler - [WEAK] - 238 0000001A EXPORT CAN0_TX_IRQHandler - [WEAK] - 239 0000001A EXPORT CAN0_RX0_IRQHandler - [WEAK] - 240 0000001A EXPORT CAN0_RX1_IRQHandler - [WEAK] - 241 0000001A EXPORT CAN0_SCE_IRQHandler - [WEAK] - 242 0000001A EXPORT SLCD_IRQHandler - [WEAK] - 243 0000001A EXPORT DMA_Channel5_6_IRQHandler - [WEAK] - 244 0000001A EXPORT SPI2_IRQHandler - [WEAK] - 245 0000001A EXPORT CAN1_TX_IRQHandler - [WEAK] - 246 0000001A EXPORT CAN1_RX0_IRQHandler - [WEAK] - 247 0000001A EXPORT CAN1_RX1_IRQHandler - [WEAK] - 248 0000001A EXPORT CAN1_SCE_IRQHandler - [WEAK] - 249 0000001A - 250 0000001A ;/* external interrupts handler */ - 251 0000001A WWDGT_IRQHandler - 252 0000001A LVD_IRQHandler - 253 0000001A RTC_IRQHandler - 254 0000001A FMC_IRQHandler - 255 0000001A RCU_IRQHandler - 256 0000001A EXTI0_1_IRQHandler - 257 0000001A EXTI2_3_IRQHandler - 258 0000001A EXTI4_15_IRQHandler - 259 0000001A TSI_IRQHandler - 260 0000001A DMA_Channel0_IRQHandler - 261 0000001A DMA_Channel1_2_IRQHandler - 262 0000001A DMA_Channel3_4_IRQHandler - 263 0000001A ADC_CMP_IRQHandler - 264 0000001A TIMER0_BRK_UP_TRG_COM_IRQHandler - 265 0000001A TIMER0_Channel_IRQHandler - 266 0000001A TIMER1_IRQHandler - 267 0000001A TIMER2_IRQHandler - 268 0000001A TIMER5_DAC_IRQHandler - 269 0000001A TIMER13_IRQHandler - 270 0000001A TIMER14_IRQHandler - 271 0000001A TIMER15_IRQHandler - 272 0000001A TIMER16_IRQHandler - 273 0000001A I2C0_EV_IRQHandler - 274 0000001A I2C1_EV_IRQHandler - 275 0000001A SPI0_IRQHandler - 276 0000001A SPI1_IRQHandler - 277 0000001A USART0_IRQHandler - 278 0000001A USART1_IRQHandler - 279 0000001A CEC_IRQHandler - 280 0000001A I2C0_ER_IRQHandler - - - -ARM Macro Assembler Page 8 - - - 281 0000001A I2C1_ER_IRQHandler - 282 0000001A I2C2_EV_IRQHandler - 283 0000001A I2C2_ER_IRQHandler - 284 0000001A USBD_LP_IRQHandler - 285 0000001A USBD_HP_IRQHandler - 286 0000001A USBDWakeUp_IRQHandler - 287 0000001A CAN0_TX_IRQHandler - 288 0000001A CAN0_RX0_IRQHandler - 289 0000001A CAN0_RX1_IRQHandler - 290 0000001A CAN0_SCE_IRQHandler - 291 0000001A SLCD_IRQHandler - 292 0000001A DMA_Channel5_6_IRQHandler - 293 0000001A SPI2_IRQHandler - 294 0000001A CAN1_TX_IRQHandler - 295 0000001A CAN1_RX0_IRQHandler - 296 0000001A CAN1_RX1_IRQHandler - 297 0000001A CAN1_SCE_IRQHandler - 298 0000001A E7FE B . - 299 0000001C ENDP - 300 0000001C - 301 0000001C ALIGN - 302 0000001C - 303 0000001C ; user Initial Stack & Heap - 304 0000001C - 305 0000001C IF :DEF:__MICROLIB - 312 0000001C - 313 0000001C IMPORT __use_two_region_memory - 314 0000001C EXPORT __user_initial_stackheap - 315 0000001C - 316 0000001C __user_initial_stackheap - PROC - 317 0000001C 4804 LDR R0, = Heap_Mem - 318 0000001E 4905 LDR R1, =(Stack_Mem + Stack_Size) - 319 00000020 4A05 LDR R2, = (Heap_Mem + Heap_Size) - 320 00000022 4B06 LDR R3, = Stack_Mem - 321 00000024 4770 BX LR - 322 00000026 ENDP - 323 00000026 - 324 00000026 00 00 ALIGN - 325 00000028 - 326 00000028 ENDIF - 327 00000028 - 328 00000028 END - 00000000 - 00000000 - 00000000 - 00000400 - 00000400 - 00000000 -Command Line: --debug --xref --diag_suppress=9931 --cpu=Cortex-M3 --apcs=interw -ork --depend=.\objects\startup_gd32f1x0.d -o.\objects\startup_gd32f1x0.o -I.\RT -E\_Target_1 -IC:\Keil_v5\ARM\PACK\ARM\CMSIS\5.3.0\CMSIS\Include -IC:\Keil_v5\AR -M\PACK\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc -IC:\Keil_ -v5\ARM\PACK\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include --predefine="__EVAL SE -TA 1" --predefine="__UVISION_VERSION SETA 525" --predefine="_RTE_ SETA 1" --pre -define="GD32F1x0 SETA 1" --predefine="GD32F130_150 SETA 1" --predefine="USE_STD -PERIPH_DRIVER SETA 1" --list=.\listings\startup_gd32f1x0.lst RTE\Device\GD32F13 -0C8\startup_gd32f1x0.s - - - -ARM Macro Assembler Page 1 Alphabetic symbol ordering -Relocatable symbols - -STACK 00000000 - -Symbol: STACK - Definitions - At line 21 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - None -Comment: STACK unused -Stack_Mem 00000000 - -Symbol: Stack_Mem - Definitions - At line 22 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - At line 318 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - At line 320 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - -__initial_sp 00000400 - -Symbol: __initial_sp - Definitions - At line 23 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - At line 46 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s -Comment: __initial_sp used once -3 symbols - - - -ARM Macro Assembler Page 1 Alphabetic symbol ordering -Relocatable symbols - -HEAP 00000000 - -Symbol: HEAP - Definitions - At line 32 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - None -Comment: HEAP unused -Heap_Mem 00000000 - -Symbol: Heap_Mem - Definitions - At line 34 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - At line 317 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - At line 319 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - -__heap_base 00000000 - -Symbol: __heap_base - Definitions - At line 33 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - None -Comment: __heap_base unused -__heap_limit 00000400 - -Symbol: __heap_limit - Definitions - At line 35 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - None -Comment: __heap_limit unused -4 symbols - - - -ARM Macro Assembler Page 1 Alphabetic symbol ordering -Relocatable symbols - -RESET 00000000 - -Symbol: RESET - Definitions - At line 41 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - None -Comment: RESET unused -__Vectors 00000000 - -Symbol: __Vectors - Definitions - At line 46 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - At line 42 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - At line 140 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - -__Vectors_End 00000168 - -Symbol: __Vectors_End - Definitions - At line 138 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - At line 43 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - At line 140 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - -3 symbols - - - -ARM Macro Assembler Page 1 Alphabetic symbol ordering -Relocatable symbols - -.text 00000000 - -Symbol: .text - Definitions - At line 142 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - None -Comment: .text unused -ADC_CMP_IRQHandler 0000001A - -Symbol: ADC_CMP_IRQHandler - Definitions - At line 263 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - At line 76 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - At line 214 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - -BusFault_Handler 0000000E - -Symbol: BusFault_Handler - Definitions - At line 171 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - At line 51 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - At line 172 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - -CAN0_RX0_IRQHandler 0000001A - -Symbol: CAN0_RX0_IRQHandler - Definitions - At line 288 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - At line 108 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - At line 239 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - -CAN0_RX1_IRQHandler 0000001A - -Symbol: CAN0_RX1_IRQHandler - Definitions - At line 289 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - At line 109 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - At line 240 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - -CAN0_SCE_IRQHandler 0000001A - -Symbol: CAN0_SCE_IRQHandler - Definitions - At line 290 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - At line 110 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - At line 241 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - -CAN0_TX_IRQHandler 0000001A - -Symbol: CAN0_TX_IRQHandler - Definitions - At line 287 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - - - -ARM Macro Assembler Page 2 Alphabetic symbol ordering -Relocatable symbols - - At line 107 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - At line 238 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - -CAN1_RX0_IRQHandler 0000001A - -Symbol: CAN1_RX0_IRQHandler - Definitions - At line 295 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - At line 135 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - At line 246 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - -CAN1_RX1_IRQHandler 0000001A - -Symbol: CAN1_RX1_IRQHandler - Definitions - At line 296 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - At line 136 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - At line 247 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - -CAN1_SCE_IRQHandler 0000001A - -Symbol: CAN1_SCE_IRQHandler - Definitions - At line 297 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - At line 137 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - At line 248 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - -CAN1_TX_IRQHandler 0000001A - -Symbol: CAN1_TX_IRQHandler - Definitions - At line 294 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - At line 134 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - At line 245 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - -CEC_IRQHandler 0000001A - -Symbol: CEC_IRQHandler - Definitions - At line 279 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - At line 94 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - At line 230 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - -DMA_Channel0_IRQHandler 0000001A - -Symbol: DMA_Channel0_IRQHandler - Definitions - At line 260 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - At line 73 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - At line 211 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - -DMA_Channel1_2_IRQHandler 0000001A - - - - -ARM Macro Assembler Page 3 Alphabetic symbol ordering -Relocatable symbols - -Symbol: DMA_Channel1_2_IRQHandler - Definitions - At line 261 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - At line 74 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - At line 212 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - -DMA_Channel3_4_IRQHandler 0000001A - -Symbol: DMA_Channel3_4_IRQHandler - Definitions - At line 262 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - At line 75 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - At line 213 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - -DMA_Channel5_6_IRQHandler 0000001A - -Symbol: DMA_Channel5_6_IRQHandler - Definitions - At line 292 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - At line 112 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - At line 243 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - -DebugMon_Handler 00000014 - -Symbol: DebugMon_Handler - Definitions - At line 185 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - At line 58 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - At line 186 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - -Default_Handler 0000001A - -Symbol: Default_Handler - Definitions - At line 200 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - None -Comment: Default_Handler unused -EXTI0_1_IRQHandler 0000001A - -Symbol: EXTI0_1_IRQHandler - Definitions - At line 256 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - At line 69 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - At line 207 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - -EXTI2_3_IRQHandler 0000001A - -Symbol: EXTI2_3_IRQHandler - Definitions - At line 257 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - At line 70 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - At line 208 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - - - -ARM Macro Assembler Page 4 Alphabetic symbol ordering -Relocatable symbols - - -EXTI4_15_IRQHandler 0000001A - -Symbol: EXTI4_15_IRQHandler - Definitions - At line 258 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - At line 71 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - At line 209 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - -FMC_IRQHandler 0000001A - -Symbol: FMC_IRQHandler - Definitions - At line 254 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - At line 67 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - At line 205 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - -HardFault_Handler 0000000A - -Symbol: HardFault_Handler - Definitions - At line 161 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - At line 49 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - At line 162 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - -I2C0_ER_IRQHandler 0000001A - -Symbol: I2C0_ER_IRQHandler - Definitions - At line 280 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - At line 96 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - At line 231 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - -I2C0_EV_IRQHandler 0000001A - -Symbol: I2C0_EV_IRQHandler - Definitions - At line 273 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - At line 87 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - At line 224 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - -I2C1_ER_IRQHandler 0000001A - -Symbol: I2C1_ER_IRQHandler - Definitions - At line 281 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - At line 98 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - At line 232 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - -I2C1_EV_IRQHandler 0000001A - -Symbol: I2C1_EV_IRQHandler - Definitions - - - -ARM Macro Assembler Page 5 Alphabetic symbol ordering -Relocatable symbols - - At line 274 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - At line 88 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - At line 225 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - -I2C2_ER_IRQHandler 0000001A - -Symbol: I2C2_ER_IRQHandler - Definitions - At line 283 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - At line 100 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - At line 234 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - -I2C2_EV_IRQHandler 0000001A - -Symbol: I2C2_EV_IRQHandler - Definitions - At line 282 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - At line 99 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - At line 233 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - -LVD_IRQHandler 0000001A - -Symbol: LVD_IRQHandler - Definitions - At line 252 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - At line 65 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - At line 203 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - -MemManage_Handler 0000000C - -Symbol: MemManage_Handler - Definitions - At line 166 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - At line 50 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - At line 167 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - -NMI_Handler 00000008 - -Symbol: NMI_Handler - Definitions - At line 156 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - At line 48 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - At line 157 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - -PendSV_Handler 00000016 - -Symbol: PendSV_Handler - Definitions - At line 190 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - At line 60 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - At line 191 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - - - - -ARM Macro Assembler Page 6 Alphabetic symbol ordering -Relocatable symbols - -RCU_IRQHandler 0000001A - -Symbol: RCU_IRQHandler - Definitions - At line 255 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - At line 68 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - At line 206 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - -RTC_IRQHandler 0000001A - -Symbol: RTC_IRQHandler - Definitions - At line 253 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - At line 66 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - At line 204 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - -Reset_Handler 00000000 - -Symbol: Reset_Handler - Definitions - At line 145 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - At line 47 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - At line 146 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - -SLCD_IRQHandler 0000001A - -Symbol: SLCD_IRQHandler - Definitions - At line 291 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - At line 111 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - At line 242 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - -SPI0_IRQHandler 0000001A - -Symbol: SPI0_IRQHandler - Definitions - At line 275 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - At line 89 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - At line 226 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - -SPI1_IRQHandler 0000001A - -Symbol: SPI1_IRQHandler - Definitions - At line 276 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - At line 90 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - At line 227 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - -SPI2_IRQHandler 0000001A - -Symbol: SPI2_IRQHandler - Definitions - At line 293 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - - - -ARM Macro Assembler Page 7 Alphabetic symbol ordering -Relocatable symbols - - Uses - At line 115 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - At line 244 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - -SVC_Handler 00000012 - -Symbol: SVC_Handler - Definitions - At line 180 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - At line 57 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - At line 181 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - -SysTick_Handler 00000018 - -Symbol: SysTick_Handler - Definitions - At line 195 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - At line 61 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - At line 196 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - -TIMER0_BRK_UP_TRG_COM_IRQHandler 0000001A - -Symbol: TIMER0_BRK_UP_TRG_COM_IRQHandler - Definitions - At line 264 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - At line 77 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - At line 215 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - -TIMER0_Channel_IRQHandler 0000001A - -Symbol: TIMER0_Channel_IRQHandler - Definitions - At line 265 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - At line 78 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - At line 216 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - -TIMER13_IRQHandler 0000001A - -Symbol: TIMER13_IRQHandler - Definitions - At line 269 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - At line 83 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - At line 220 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - -TIMER14_IRQHandler 0000001A - -Symbol: TIMER14_IRQHandler - Definitions - At line 270 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - At line 84 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - At line 221 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - -TIMER15_IRQHandler 0000001A - - - -ARM Macro Assembler Page 8 Alphabetic symbol ordering -Relocatable symbols - - -Symbol: TIMER15_IRQHandler - Definitions - At line 271 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - At line 85 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - At line 222 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - -TIMER16_IRQHandler 0000001A - -Symbol: TIMER16_IRQHandler - Definitions - At line 272 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - At line 86 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - At line 223 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - -TIMER1_IRQHandler 0000001A - -Symbol: TIMER1_IRQHandler - Definitions - At line 266 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - At line 79 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - At line 217 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - -TIMER2_IRQHandler 0000001A - -Symbol: TIMER2_IRQHandler - Definitions - At line 267 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - At line 80 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - At line 218 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - -TIMER5_DAC_IRQHandler 0000001A - -Symbol: TIMER5_DAC_IRQHandler - Definitions - At line 268 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - At line 81 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - At line 219 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - -TSI_IRQHandler 0000001A - -Symbol: TSI_IRQHandler - Definitions - At line 259 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - At line 72 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - At line 210 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - -USART0_IRQHandler 0000001A - -Symbol: USART0_IRQHandler - Definitions - At line 277 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - - - -ARM Macro Assembler Page 9 Alphabetic symbol ordering -Relocatable symbols - - At line 91 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - At line 228 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - -USART1_IRQHandler 0000001A - -Symbol: USART1_IRQHandler - Definitions - At line 278 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - At line 92 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - At line 229 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - -USBDWakeUp_IRQHandler 0000001A - -Symbol: USBDWakeUp_IRQHandler - Definitions - At line 286 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - At line 106 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - At line 237 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - -USBD_HP_IRQHandler 0000001A - -Symbol: USBD_HP_IRQHandler - Definitions - At line 285 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - At line 102 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - At line 236 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - -USBD_LP_IRQHandler 0000001A - -Symbol: USBD_LP_IRQHandler - Definitions - At line 284 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - At line 101 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - At line 235 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - -UsageFault_Handler 00000010 - -Symbol: UsageFault_Handler - Definitions - At line 176 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - At line 52 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - At line 177 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - -WWDGT_IRQHandler 0000001A - -Symbol: WWDGT_IRQHandler - Definitions - At line 251 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - At line 64 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - At line 202 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - -__user_initial_stackheap 0000001C - - - - -ARM Macro Assembler Page 10 Alphabetic symbol ordering -Relocatable symbols - -Symbol: __user_initial_stackheap - Definitions - At line 316 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - At line 314 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s -Comment: __user_initial_stackheap used once -60 symbols - - - -ARM Macro Assembler Page 1 Alphabetic symbol ordering -Absolute symbols - -Heap_Size 00000400 - -Symbol: Heap_Size - Definitions - At line 30 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - At line 34 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - At line 319 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - -Stack_Size 00000400 - -Symbol: Stack_Size - Definitions - At line 19 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - At line 22 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - At line 318 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - -__Vectors_Size 00000168 - -Symbol: __Vectors_Size - Definitions - At line 140 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - At line 44 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s -Comment: __Vectors_Size used once -3 symbols - - - -ARM Macro Assembler Page 1 Alphabetic symbol ordering -External symbols - -SystemInit 00000000 - -Symbol: SystemInit - Definitions - At line 147 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - At line 149 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s -Comment: SystemInit used once -__main 00000000 - -Symbol: __main - Definitions - At line 148 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - At line 151 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s -Comment: __main used once -__use_two_region_memory 00000000 - -Symbol: __use_two_region_memory - Definitions - At line 313 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s - Uses - None -Comment: __use_two_region_memory unused -3 symbols -416 symbols in table + + + +ARM Macro Assembler Page 1 + + + 1 00000000 ;/*! + 2 00000000 ; \file startup_gd32f1x0.s + 3 00000000 ; \brief start up file + 4 00000000 ;*/ + 5 00000000 + 6 00000000 ;/* + 7 00000000 ; Copyright (C) 2017 GigaDevice + 8 00000000 + 9 00000000 ; 2014-12-26, V1.0.0, firmware for GD32F1x0(x=3,5) + 10 00000000 ; 2016-01-15, V2.0.0, firmware for GD32F1x0(x=3,5,7,9 + ) + 11 00000000 ; 2016-04-30, V3.0.0, firmware update for GD32F1x0(x= + 3,5,7,9) + 12 00000000 ; 2017-06-19, V3.1.0, firmware update for GD32F1x0(x= + 3,5,7,9) + 13 00000000 ;*/ + 14 00000000 + 15 00000000 ; Stack Configuration + 16 00000000 ; Stack Size (in Bytes) <0x0-0xFFFFFFFF:8> + 17 00000000 ; + 18 00000000 + 19 00000000 00000400 + Stack_Size + EQU 0x00000400 + 20 00000000 + 21 00000000 AREA STACK, NOINIT, READWRITE, ALIGN +=3 + 22 00000000 Stack_Mem + SPACE Stack_Size + 23 00000400 __initial_sp + 24 00000400 + 25 00000400 + 26 00000400 ; Heap Configuration + 27 00000400 ; Heap Size (in Bytes) <0x0-0xFFFFFFFF:8> + 28 00000400 ; + 29 00000400 + 30 00000400 00000400 + Heap_Size + EQU 0x00000400 + 31 00000400 + 32 00000400 AREA HEAP, NOINIT, READWRITE, ALIGN= +3 + 33 00000000 __heap_base + 34 00000000 Heap_Mem + SPACE Heap_Size + 35 00000400 __heap_limit + 36 00000400 + 37 00000400 PRESERVE8 + 38 00000400 THUMB + 39 00000400 + 40 00000400 ; /* reset Vector Mapped to at Address 0 * + / + 41 00000400 AREA RESET, DATA, READONLY + 42 00000000 EXPORT __Vectors + 43 00000000 EXPORT __Vectors_End + 44 00000000 EXPORT __Vectors_Size + 45 00000000 + 46 00000000 00000000 + __Vectors + + + +ARM Macro Assembler Page 2 + + + DCD __initial_sp ; Top of Stack + 47 00000004 00000000 DCD Reset_Handler ; Reset Handler + 48 00000008 00000000 DCD NMI_Handler ; NMI Handler + 49 0000000C 00000000 DCD HardFault_Handler ; Hard Fault + Handler + 50 00000010 00000000 DCD MemManage_Handler + ; MPU Fault Handler + + 51 00000014 00000000 DCD BusFault_Handler + ; Bus Fault Handler + + 52 00000018 00000000 DCD UsageFault_Handler ; Usage Faul + t Handler + 53 0000001C 00000000 DCD 0 ; Reserved + 54 00000020 00000000 DCD 0 ; Reserved + 55 00000024 00000000 DCD 0 ; Reserved + 56 00000028 00000000 DCD 0 ; Reserved + 57 0000002C 00000000 DCD SVC_Handler ; SVCall Handler + 58 00000030 00000000 DCD DebugMon_Handler ; Debug Monito + r Handler + 59 00000034 00000000 DCD 0 ; Reserved + 60 00000038 00000000 DCD PendSV_Handler ; PendSV Handler + + 61 0000003C 00000000 DCD SysTick_Handler + ; SysTick Handler + 62 00000040 + 63 00000040 ; /* external interrupts handler */ + 64 00000040 00000000 DCD WWDGT_IRQHandler ; 16:Window Wa + tchdog Timer + 65 00000044 00000000 DCD LVD_IRQHandler ; 17:LVD through + EXTI Line detect + 66 00000048 00000000 DCD RTC_IRQHandler ; 18:RTC through + EXTI Line + 67 0000004C 00000000 DCD FMC_IRQHandler ; 19:FMC + 68 00000050 00000000 DCD RCU_IRQHandler ; 20:RCU + 69 00000054 00000000 DCD EXTI0_1_IRQHandler ; 21:EXTI Li + ne 0 and EXTI Line + 1 + 70 00000058 00000000 DCD EXTI2_3_IRQHandler ; 22:EXTI Li + ne 2 and EXTI Line + 3 + 71 0000005C 00000000 DCD EXTI4_15_IRQHandler ; 23:EXTI L + ine 4 to EXTI Line + 15 + 72 00000060 00000000 DCD TSI_IRQHandler ; 24:TSI + 73 00000064 00000000 DCD DMA_Channel0_IRQHandler + ; 25:DMA Channel 0 + + 74 00000068 00000000 DCD DMA_Channel1_2_IRQHandler ; 26: + DMA Channel 1 and D + MA Channel 2 + 75 0000006C 00000000 DCD DMA_Channel3_4_IRQHandler ; 27: + DMA Channel 3 and D + MA Channel 4 + 76 00000070 00000000 DCD ADC_CMP_IRQHandler ; 28:ADC and + Comparator 0-1 + 77 00000074 00000000 DCD TIMER0_BRK_UP_TRG_COM_IRQHandle +r + ; 29:TIMER0 Break,U + + + +ARM Macro Assembler Page 3 + + + pdate,Trigger and C + ommutation + 78 00000078 00000000 DCD TIMER0_Channel_IRQHandler + ; 30:TIMER0 Channel + + 79 0000007C 00000000 DCD TIMER1_IRQHandler ; 31:TIMER1 + 80 00000080 00000000 DCD TIMER2_IRQHandler ; 32:TIMER2 + 81 00000084 00000000 DCD TIMER5_DAC_IRQHandler + ; 33:TIMER5 and DAC + + 82 00000088 00000000 DCD 0 ; Reserved + 83 0000008C 00000000 DCD TIMER13_IRQHandler ; 35:TIMER13 + + 84 00000090 00000000 DCD TIMER14_IRQHandler ; 36:TIMER14 + + 85 00000094 00000000 DCD TIMER15_IRQHandler ; 37:TIMER15 + + 86 00000098 00000000 DCD TIMER16_IRQHandler ; 38:TIMER16 + + 87 0000009C 00000000 DCD I2C0_EV_IRQHandler + ; 39:I2C0 Event + 88 000000A0 00000000 DCD I2C1_EV_IRQHandler + ; 40:I2C1 Event + 89 000000A4 00000000 DCD SPI0_IRQHandler ; 41:SPI0 + 90 000000A8 00000000 DCD SPI1_IRQHandler ; 42:SPI1 + 91 000000AC 00000000 DCD USART0_IRQHandler ; 43:USART0 + 92 000000B0 00000000 DCD USART1_IRQHandler ; 44:USART1 + 93 000000B4 00000000 DCD 0 ; Reserved + 94 000000B8 00000000 DCD CEC_IRQHandler ; 46:CEC + 95 000000BC 00000000 DCD 0 ; Reserved + 96 000000C0 00000000 DCD I2C0_ER_IRQHandler + ; 48:I2C0 Error + 97 000000C4 00000000 DCD 0 ; Reserved + 98 000000C8 00000000 DCD I2C1_ER_IRQHandler + ; 50:I2C1 Error + 99 000000CC 00000000 DCD I2C2_EV_IRQHandler + ; 51:I2C2 Event + 100 000000D0 00000000 DCD I2C2_ER_IRQHandler + ; 52:I2C2 Error + 101 000000D4 00000000 DCD USBD_LP_IRQHandler ; 53:USBD LP + + 102 000000D8 00000000 DCD USBD_HP_IRQHandler ; 54:USBD HP + + 103 000000DC 00000000 DCD 0 ; Reserved + 104 000000E0 00000000 DCD 0 ; Reserved + 105 000000E4 00000000 DCD 0 ; Reserved + 106 000000E8 00000000 DCD USBDWakeUp_IRQHandler + ; 58:USBD Wakeup + 107 000000EC 00000000 DCD CAN0_TX_IRQHandler ; 59:CAN0 TX + + 108 000000F0 00000000 DCD CAN0_RX0_IRQHandler + ; 60:CAN0 RX0 + 109 000000F4 00000000 DCD CAN0_RX1_IRQHandler + ; 61:CAN0 RX1 + 110 000000F8 00000000 DCD CAN0_SCE_IRQHandler + ; 62:CAN0 SCE + 111 000000FC 00000000 DCD SLCD_IRQHandler ; 63:SLCD + 112 00000100 00000000 DCD DMA_Channel5_6_IRQHandler ; 64: + DMA Channel5 and Ch + + + +ARM Macro Assembler Page 4 + + + annel6 + 113 00000104 00000000 DCD 0 ; Reserved + 114 00000108 00000000 DCD 0 ; Reserved + 115 0000010C 00000000 DCD SPI2_IRQHandler ; 67:SPI2 + 116 00000110 00000000 DCD 0 ; Reserved + 117 00000114 00000000 DCD 0 ; Reserved + 118 00000118 00000000 DCD 0 ; Reserved + 119 0000011C 00000000 DCD 0 ; Reserved + 120 00000120 00000000 DCD 0 ; Reserved + 121 00000124 00000000 DCD 0 ; Reserved + 122 00000128 00000000 DCD 0 ; Reserved + 123 0000012C 00000000 DCD 0 ; Reserved + 124 00000130 00000000 DCD 0 ; Reserved + 125 00000134 00000000 DCD 0 ; Reserved + 126 00000138 00000000 DCD 0 ; Reserved + 127 0000013C 00000000 DCD 0 ; Reserved + 128 00000140 00000000 DCD 0 ; Reserved + 129 00000144 00000000 DCD 0 ; Reserved + 130 00000148 00000000 DCD 0 ; Reserved + 131 0000014C 00000000 DCD 0 ; Reserved + 132 00000150 00000000 DCD 0 ; Reserved + 133 00000154 00000000 DCD 0 ; Reserved + 134 00000158 00000000 DCD CAN1_TX_IRQHandler ; 86:CAN1 TX + + 135 0000015C 00000000 DCD CAN1_RX0_IRQHandler + ; 87:CAN1 RX0 + 136 00000160 00000000 DCD CAN1_RX1_IRQHandler + ; 88:CAN1 RX1 + 137 00000164 00000000 DCD CAN1_SCE_IRQHandler + ; 89:CAN1 SCE + 138 00000168 __Vectors_End + 139 00000168 + 140 00000168 00000168 + __Vectors_Size + EQU __Vectors_End - __Vectors + 141 00000168 + 142 00000168 AREA |.text|, CODE, READONLY + 143 00000000 + 144 00000000 ;/* reset Handler */ + 145 00000000 Reset_Handler + PROC + 146 00000000 EXPORT Reset_Handler + [WEAK] + 147 00000000 IMPORT SystemInit + 148 00000000 IMPORT __main + 149 00000000 4809 LDR R0, =SystemInit + 150 00000002 4780 BLX R0 + 151 00000004 4809 LDR R0, =__main + 152 00000006 4700 BX R0 + 153 00000008 ENDP + 154 00000008 + 155 00000008 ;/* dummy Exception Handlers */ + 156 00000008 NMI_Handler + PROC + 157 00000008 EXPORT NMI_Handler + [WEAK] + 158 00000008 E7FE B . + 159 0000000A ENDP + 161 0000000A HardFault_Handler + + + +ARM Macro Assembler Page 5 + + + PROC + 162 0000000A EXPORT HardFault_Handler + [WEAK] + 163 0000000A E7FE B . + 164 0000000C ENDP + 166 0000000C MemManage_Handler + PROC + 167 0000000C EXPORT MemManage_Handler + [WEAK] + 168 0000000C E7FE B . + 169 0000000E ENDP + 171 0000000E BusFault_Handler + PROC + 172 0000000E EXPORT BusFault_Handler + [WEAK] + 173 0000000E E7FE B . + 174 00000010 ENDP + 176 00000010 UsageFault_Handler + PROC + 177 00000010 EXPORT UsageFault_Handler + [WEAK] + 178 00000010 E7FE B . + 179 00000012 ENDP + 180 00000012 SVC_Handler + PROC + 181 00000012 EXPORT SVC_Handler + [WEAK] + 182 00000012 E7FE B . + 183 00000014 ENDP + 185 00000014 DebugMon_Handler + PROC + 186 00000014 EXPORT DebugMon_Handler + [WEAK] + 187 00000014 E7FE B . + 188 00000016 ENDP + 190 00000016 PendSV_Handler + PROC + 191 00000016 EXPORT PendSV_Handler + [WEAK] + 192 00000016 E7FE B . + 193 00000018 ENDP + 195 00000018 SysTick_Handler + PROC + 196 00000018 EXPORT SysTick_Handler + [WEAK] + 197 00000018 E7FE B . + 198 0000001A ENDP + 199 0000001A + 200 0000001A Default_Handler + PROC + 201 0000001A ; /* external interrupts handler */ + 202 0000001A EXPORT WWDGT_IRQHandler + [WEAK] + 203 0000001A EXPORT LVD_IRQHandler + [WEAK] + 204 0000001A EXPORT RTC_IRQHandler + [WEAK] + 205 0000001A EXPORT FMC_IRQHandler + [WEAK] + + + +ARM Macro Assembler Page 6 + + + 206 0000001A EXPORT RCU_IRQHandler + [WEAK] + 207 0000001A EXPORT EXTI0_1_IRQHandler + [WEAK] + 208 0000001A EXPORT EXTI2_3_IRQHandler + [WEAK] + 209 0000001A EXPORT EXTI4_15_IRQHandler + [WEAK] + 210 0000001A EXPORT TSI_IRQHandler + [WEAK] + 211 0000001A EXPORT DMA_Channel0_IRQHandler + [WEAK] + 212 0000001A EXPORT DMA_Channel1_2_IRQHandler + [WEAK] + 213 0000001A EXPORT DMA_Channel3_4_IRQHandler + [WEAK] + 214 0000001A EXPORT ADC_CMP_IRQHandler + [WEAK] + 215 0000001A EXPORT TIMER0_BRK_UP_TRG_COM_IRQHandle +r [WEAK] + 216 0000001A EXPORT TIMER0_Channel_IRQHandler + [WEAK] + 217 0000001A EXPORT TIMER1_IRQHandler + [WEAK] + 218 0000001A EXPORT TIMER2_IRQHandler + [WEAK] + 219 0000001A EXPORT TIMER5_DAC_IRQHandler + [WEAK] + 220 0000001A EXPORT TIMER13_IRQHandler + [WEAK] + 221 0000001A EXPORT TIMER14_IRQHandler + [WEAK] + 222 0000001A EXPORT TIMER15_IRQHandler + [WEAK] + 223 0000001A EXPORT TIMER16_IRQHandler + [WEAK] + 224 0000001A EXPORT I2C0_EV_IRQHandler + [WEAK] + 225 0000001A EXPORT I2C1_EV_IRQHandler + [WEAK] + 226 0000001A EXPORT SPI0_IRQHandler + [WEAK] + 227 0000001A EXPORT SPI1_IRQHandler + [WEAK] + 228 0000001A EXPORT USART0_IRQHandler + [WEAK] + 229 0000001A EXPORT USART1_IRQHandler + [WEAK] + 230 0000001A EXPORT CEC_IRQHandler + [WEAK] + 231 0000001A EXPORT I2C0_ER_IRQHandler + [WEAK] + 232 0000001A EXPORT I2C1_ER_IRQHandler + [WEAK] + 233 0000001A EXPORT I2C2_EV_IRQHandler + [WEAK] + 234 0000001A EXPORT I2C2_ER_IRQHandler + [WEAK] + 235 0000001A EXPORT USBD_LP_IRQHandler + + + +ARM Macro Assembler Page 7 + + + [WEAK] + 236 0000001A EXPORT USBD_HP_IRQHandler + [WEAK] + 237 0000001A EXPORT USBDWakeUp_IRQHandler + [WEAK] + 238 0000001A EXPORT CAN0_TX_IRQHandler + [WEAK] + 239 0000001A EXPORT CAN0_RX0_IRQHandler + [WEAK] + 240 0000001A EXPORT CAN0_RX1_IRQHandler + [WEAK] + 241 0000001A EXPORT CAN0_SCE_IRQHandler + [WEAK] + 242 0000001A EXPORT SLCD_IRQHandler + [WEAK] + 243 0000001A EXPORT DMA_Channel5_6_IRQHandler + [WEAK] + 244 0000001A EXPORT SPI2_IRQHandler + [WEAK] + 245 0000001A EXPORT CAN1_TX_IRQHandler + [WEAK] + 246 0000001A EXPORT CAN1_RX0_IRQHandler + [WEAK] + 247 0000001A EXPORT CAN1_RX1_IRQHandler + [WEAK] + 248 0000001A EXPORT CAN1_SCE_IRQHandler + [WEAK] + 249 0000001A + 250 0000001A ;/* external interrupts handler */ + 251 0000001A WWDGT_IRQHandler + 252 0000001A LVD_IRQHandler + 253 0000001A RTC_IRQHandler + 254 0000001A FMC_IRQHandler + 255 0000001A RCU_IRQHandler + 256 0000001A EXTI0_1_IRQHandler + 257 0000001A EXTI2_3_IRQHandler + 258 0000001A EXTI4_15_IRQHandler + 259 0000001A TSI_IRQHandler + 260 0000001A DMA_Channel0_IRQHandler + 261 0000001A DMA_Channel1_2_IRQHandler + 262 0000001A DMA_Channel3_4_IRQHandler + 263 0000001A ADC_CMP_IRQHandler + 264 0000001A TIMER0_BRK_UP_TRG_COM_IRQHandler + 265 0000001A TIMER0_Channel_IRQHandler + 266 0000001A TIMER1_IRQHandler + 267 0000001A TIMER2_IRQHandler + 268 0000001A TIMER5_DAC_IRQHandler + 269 0000001A TIMER13_IRQHandler + 270 0000001A TIMER14_IRQHandler + 271 0000001A TIMER15_IRQHandler + 272 0000001A TIMER16_IRQHandler + 273 0000001A I2C0_EV_IRQHandler + 274 0000001A I2C1_EV_IRQHandler + 275 0000001A SPI0_IRQHandler + 276 0000001A SPI1_IRQHandler + 277 0000001A USART0_IRQHandler + 278 0000001A USART1_IRQHandler + 279 0000001A CEC_IRQHandler + 280 0000001A I2C0_ER_IRQHandler + + + +ARM Macro Assembler Page 8 + + + 281 0000001A I2C1_ER_IRQHandler + 282 0000001A I2C2_EV_IRQHandler + 283 0000001A I2C2_ER_IRQHandler + 284 0000001A USBD_LP_IRQHandler + 285 0000001A USBD_HP_IRQHandler + 286 0000001A USBDWakeUp_IRQHandler + 287 0000001A CAN0_TX_IRQHandler + 288 0000001A CAN0_RX0_IRQHandler + 289 0000001A CAN0_RX1_IRQHandler + 290 0000001A CAN0_SCE_IRQHandler + 291 0000001A SLCD_IRQHandler + 292 0000001A DMA_Channel5_6_IRQHandler + 293 0000001A SPI2_IRQHandler + 294 0000001A CAN1_TX_IRQHandler + 295 0000001A CAN1_RX0_IRQHandler + 296 0000001A CAN1_RX1_IRQHandler + 297 0000001A CAN1_SCE_IRQHandler + 298 0000001A E7FE B . + 299 0000001C ENDP + 300 0000001C + 301 0000001C ALIGN + 302 0000001C + 303 0000001C ; user Initial Stack & Heap + 304 0000001C + 305 0000001C IF :DEF:__MICROLIB + 312 0000001C + 313 0000001C IMPORT __use_two_region_memory + 314 0000001C EXPORT __user_initial_stackheap + 315 0000001C + 316 0000001C __user_initial_stackheap + PROC + 317 0000001C 4804 LDR R0, = Heap_Mem + 318 0000001E 4905 LDR R1, =(Stack_Mem + Stack_Size) + 319 00000020 4A05 LDR R2, = (Heap_Mem + Heap_Size) + 320 00000022 4B06 LDR R3, = Stack_Mem + 321 00000024 4770 BX LR + 322 00000026 ENDP + 323 00000026 + 324 00000026 00 00 ALIGN + 325 00000028 + 326 00000028 ENDIF + 327 00000028 + 328 00000028 END + 00000000 + 00000000 + 00000000 + 00000400 + 00000400 + 00000000 +Command Line: --debug --xref --diag_suppress=9931 --cpu=Cortex-M3 --apcs=interw +ork --depend=.\objects\startup_gd32f1x0.d -o.\objects\startup_gd32f1x0.o -I.\RT +E\_Target_1 -IC:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core +\Include -IC:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0 +\Device\Firmware\Peripherals\inc -IC:\Users\13015\AppData\Local\Arm\Packs\GigaD +evice\GD32F1x0_DFP\3.1.0\Device\Include --predefine="__EVAL SETA 1" --predefine +="__UVISION_VERSION SETA 534" --predefine="_RTE_ SETA 1" --predefine="GD32F1x0 +SETA 1" --predefine="GD32F130_150 SETA 1" --predefine="USE_STDPERIPH_DRIVER SET +A 1" --predefine="_RTE_ SETA 1" --list=.\listings\startup_gd32f1x0.lst RTE\Devi +ce\GD32F130C8\startup_gd32f1x0.s + + + +ARM Macro Assembler Page 1 Alphabetic symbol ordering +Relocatable symbols + +STACK 00000000 + +Symbol: STACK + Definitions + At line 21 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + None +Comment: STACK unused +Stack_Mem 00000000 + +Symbol: Stack_Mem + Definitions + At line 22 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + At line 318 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + At line 320 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + +__initial_sp 00000400 + +Symbol: __initial_sp + Definitions + At line 23 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + At line 46 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s +Comment: __initial_sp used once +3 symbols + + + +ARM Macro Assembler Page 1 Alphabetic symbol ordering +Relocatable symbols + +HEAP 00000000 + +Symbol: HEAP + Definitions + At line 32 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + None +Comment: HEAP unused +Heap_Mem 00000000 + +Symbol: Heap_Mem + Definitions + At line 34 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + At line 317 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + At line 319 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + +__heap_base 00000000 + +Symbol: __heap_base + Definitions + At line 33 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + None +Comment: __heap_base unused +__heap_limit 00000400 + +Symbol: __heap_limit + Definitions + At line 35 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + None +Comment: __heap_limit unused +4 symbols + + + +ARM Macro Assembler Page 1 Alphabetic symbol ordering +Relocatable symbols + +RESET 00000000 + +Symbol: RESET + Definitions + At line 41 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + None +Comment: RESET unused +__Vectors 00000000 + +Symbol: __Vectors + Definitions + At line 46 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + At line 42 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + At line 140 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + +__Vectors_End 00000168 + +Symbol: __Vectors_End + Definitions + At line 138 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + At line 43 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + At line 140 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + +3 symbols + + + +ARM Macro Assembler Page 1 Alphabetic symbol ordering +Relocatable symbols + +.text 00000000 + +Symbol: .text + Definitions + At line 142 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + None +Comment: .text unused +ADC_CMP_IRQHandler 0000001A + +Symbol: ADC_CMP_IRQHandler + Definitions + At line 263 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + At line 76 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + At line 214 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + +BusFault_Handler 0000000E + +Symbol: BusFault_Handler + Definitions + At line 171 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + At line 51 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + At line 172 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + +CAN0_RX0_IRQHandler 0000001A + +Symbol: CAN0_RX0_IRQHandler + Definitions + At line 288 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + At line 108 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + At line 239 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + +CAN0_RX1_IRQHandler 0000001A + +Symbol: CAN0_RX1_IRQHandler + Definitions + At line 289 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + At line 109 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + At line 240 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + +CAN0_SCE_IRQHandler 0000001A + +Symbol: CAN0_SCE_IRQHandler + Definitions + At line 290 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + At line 110 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + At line 241 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + +CAN0_TX_IRQHandler 0000001A + +Symbol: CAN0_TX_IRQHandler + Definitions + At line 287 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + + + +ARM Macro Assembler Page 2 Alphabetic symbol ordering +Relocatable symbols + + At line 107 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + At line 238 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + +CAN1_RX0_IRQHandler 0000001A + +Symbol: CAN1_RX0_IRQHandler + Definitions + At line 295 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + At line 135 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + At line 246 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + +CAN1_RX1_IRQHandler 0000001A + +Symbol: CAN1_RX1_IRQHandler + Definitions + At line 296 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + At line 136 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + At line 247 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + +CAN1_SCE_IRQHandler 0000001A + +Symbol: CAN1_SCE_IRQHandler + Definitions + At line 297 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + At line 137 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + At line 248 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + +CAN1_TX_IRQHandler 0000001A + +Symbol: CAN1_TX_IRQHandler + Definitions + At line 294 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + At line 134 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + At line 245 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + +CEC_IRQHandler 0000001A + +Symbol: CEC_IRQHandler + Definitions + At line 279 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + At line 94 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + At line 230 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + +DMA_Channel0_IRQHandler 0000001A + +Symbol: DMA_Channel0_IRQHandler + Definitions + At line 260 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + At line 73 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + At line 211 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + +DMA_Channel1_2_IRQHandler 0000001A + + + + +ARM Macro Assembler Page 3 Alphabetic symbol ordering +Relocatable symbols + +Symbol: DMA_Channel1_2_IRQHandler + Definitions + At line 261 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + At line 74 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + At line 212 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + +DMA_Channel3_4_IRQHandler 0000001A + +Symbol: DMA_Channel3_4_IRQHandler + Definitions + At line 262 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + At line 75 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + At line 213 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + +DMA_Channel5_6_IRQHandler 0000001A + +Symbol: DMA_Channel5_6_IRQHandler + Definitions + At line 292 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + At line 112 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + At line 243 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + +DebugMon_Handler 00000014 + +Symbol: DebugMon_Handler + Definitions + At line 185 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + At line 58 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + At line 186 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + +Default_Handler 0000001A + +Symbol: Default_Handler + Definitions + At line 200 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + None +Comment: Default_Handler unused +EXTI0_1_IRQHandler 0000001A + +Symbol: EXTI0_1_IRQHandler + Definitions + At line 256 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + At line 69 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + At line 207 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + +EXTI2_3_IRQHandler 0000001A + +Symbol: EXTI2_3_IRQHandler + Definitions + At line 257 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + At line 70 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + At line 208 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + + + +ARM Macro Assembler Page 4 Alphabetic symbol ordering +Relocatable symbols + + +EXTI4_15_IRQHandler 0000001A + +Symbol: EXTI4_15_IRQHandler + Definitions + At line 258 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + At line 71 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + At line 209 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + +FMC_IRQHandler 0000001A + +Symbol: FMC_IRQHandler + Definitions + At line 254 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + At line 67 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + At line 205 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + +HardFault_Handler 0000000A + +Symbol: HardFault_Handler + Definitions + At line 161 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + At line 49 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + At line 162 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + +I2C0_ER_IRQHandler 0000001A + +Symbol: I2C0_ER_IRQHandler + Definitions + At line 280 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + At line 96 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + At line 231 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + +I2C0_EV_IRQHandler 0000001A + +Symbol: I2C0_EV_IRQHandler + Definitions + At line 273 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + At line 87 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + At line 224 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + +I2C1_ER_IRQHandler 0000001A + +Symbol: I2C1_ER_IRQHandler + Definitions + At line 281 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + At line 98 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + At line 232 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + +I2C1_EV_IRQHandler 0000001A + +Symbol: I2C1_EV_IRQHandler + Definitions + + + +ARM Macro Assembler Page 5 Alphabetic symbol ordering +Relocatable symbols + + At line 274 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + At line 88 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + At line 225 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + +I2C2_ER_IRQHandler 0000001A + +Symbol: I2C2_ER_IRQHandler + Definitions + At line 283 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + At line 100 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + At line 234 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + +I2C2_EV_IRQHandler 0000001A + +Symbol: I2C2_EV_IRQHandler + Definitions + At line 282 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + At line 99 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + At line 233 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + +LVD_IRQHandler 0000001A + +Symbol: LVD_IRQHandler + Definitions + At line 252 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + At line 65 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + At line 203 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + +MemManage_Handler 0000000C + +Symbol: MemManage_Handler + Definitions + At line 166 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + At line 50 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + At line 167 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + +NMI_Handler 00000008 + +Symbol: NMI_Handler + Definitions + At line 156 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + At line 48 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + At line 157 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + +PendSV_Handler 00000016 + +Symbol: PendSV_Handler + Definitions + At line 190 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + At line 60 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + At line 191 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + + + + +ARM Macro Assembler Page 6 Alphabetic symbol ordering +Relocatable symbols + +RCU_IRQHandler 0000001A + +Symbol: RCU_IRQHandler + Definitions + At line 255 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + At line 68 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + At line 206 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + +RTC_IRQHandler 0000001A + +Symbol: RTC_IRQHandler + Definitions + At line 253 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + At line 66 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + At line 204 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + +Reset_Handler 00000000 + +Symbol: Reset_Handler + Definitions + At line 145 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + At line 47 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + At line 146 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + +SLCD_IRQHandler 0000001A + +Symbol: SLCD_IRQHandler + Definitions + At line 291 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + At line 111 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + At line 242 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + +SPI0_IRQHandler 0000001A + +Symbol: SPI0_IRQHandler + Definitions + At line 275 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + At line 89 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + At line 226 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + +SPI1_IRQHandler 0000001A + +Symbol: SPI1_IRQHandler + Definitions + At line 276 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + At line 90 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + At line 227 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + +SPI2_IRQHandler 0000001A + +Symbol: SPI2_IRQHandler + Definitions + At line 293 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + + + +ARM Macro Assembler Page 7 Alphabetic symbol ordering +Relocatable symbols + + Uses + At line 115 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + At line 244 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + +SVC_Handler 00000012 + +Symbol: SVC_Handler + Definitions + At line 180 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + At line 57 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + At line 181 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + +SysTick_Handler 00000018 + +Symbol: SysTick_Handler + Definitions + At line 195 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + At line 61 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + At line 196 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + +TIMER0_BRK_UP_TRG_COM_IRQHandler 0000001A + +Symbol: TIMER0_BRK_UP_TRG_COM_IRQHandler + Definitions + At line 264 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + At line 77 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + At line 215 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + +TIMER0_Channel_IRQHandler 0000001A + +Symbol: TIMER0_Channel_IRQHandler + Definitions + At line 265 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + At line 78 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + At line 216 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + +TIMER13_IRQHandler 0000001A + +Symbol: TIMER13_IRQHandler + Definitions + At line 269 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + At line 83 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + At line 220 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + +TIMER14_IRQHandler 0000001A + +Symbol: TIMER14_IRQHandler + Definitions + At line 270 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + At line 84 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + At line 221 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + +TIMER15_IRQHandler 0000001A + + + +ARM Macro Assembler Page 8 Alphabetic symbol ordering +Relocatable symbols + + +Symbol: TIMER15_IRQHandler + Definitions + At line 271 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + At line 85 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + At line 222 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + +TIMER16_IRQHandler 0000001A + +Symbol: TIMER16_IRQHandler + Definitions + At line 272 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + At line 86 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + At line 223 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + +TIMER1_IRQHandler 0000001A + +Symbol: TIMER1_IRQHandler + Definitions + At line 266 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + At line 79 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + At line 217 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + +TIMER2_IRQHandler 0000001A + +Symbol: TIMER2_IRQHandler + Definitions + At line 267 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + At line 80 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + At line 218 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + +TIMER5_DAC_IRQHandler 0000001A + +Symbol: TIMER5_DAC_IRQHandler + Definitions + At line 268 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + At line 81 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + At line 219 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + +TSI_IRQHandler 0000001A + +Symbol: TSI_IRQHandler + Definitions + At line 259 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + At line 72 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + At line 210 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + +USART0_IRQHandler 0000001A + +Symbol: USART0_IRQHandler + Definitions + At line 277 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + + + +ARM Macro Assembler Page 9 Alphabetic symbol ordering +Relocatable symbols + + At line 91 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + At line 228 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + +USART1_IRQHandler 0000001A + +Symbol: USART1_IRQHandler + Definitions + At line 278 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + At line 92 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + At line 229 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + +USBDWakeUp_IRQHandler 0000001A + +Symbol: USBDWakeUp_IRQHandler + Definitions + At line 286 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + At line 106 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + At line 237 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + +USBD_HP_IRQHandler 0000001A + +Symbol: USBD_HP_IRQHandler + Definitions + At line 285 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + At line 102 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + At line 236 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + +USBD_LP_IRQHandler 0000001A + +Symbol: USBD_LP_IRQHandler + Definitions + At line 284 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + At line 101 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + At line 235 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + +UsageFault_Handler 00000010 + +Symbol: UsageFault_Handler + Definitions + At line 176 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + At line 52 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + At line 177 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + +WWDGT_IRQHandler 0000001A + +Symbol: WWDGT_IRQHandler + Definitions + At line 251 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + At line 64 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + At line 202 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + +__user_initial_stackheap 0000001C + + + + +ARM Macro Assembler Page 10 Alphabetic symbol ordering +Relocatable symbols + +Symbol: __user_initial_stackheap + Definitions + At line 316 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + At line 314 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s +Comment: __user_initial_stackheap used once +60 symbols + + + +ARM Macro Assembler Page 1 Alphabetic symbol ordering +Absolute symbols + +Heap_Size 00000400 + +Symbol: Heap_Size + Definitions + At line 30 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + At line 34 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + At line 319 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + +Stack_Size 00000400 + +Symbol: Stack_Size + Definitions + At line 19 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + At line 22 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + At line 318 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + +__Vectors_Size 00000168 + +Symbol: __Vectors_Size + Definitions + At line 140 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + At line 44 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s +Comment: __Vectors_Size used once +3 symbols + + + +ARM Macro Assembler Page 1 Alphabetic symbol ordering +External symbols + +SystemInit 00000000 + +Symbol: SystemInit + Definitions + At line 147 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + At line 149 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s +Comment: SystemInit used once +__main 00000000 + +Symbol: __main + Definitions + At line 148 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + At line 151 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s +Comment: __main used once +__use_two_region_memory 00000000 + +Symbol: __use_two_region_memory + Definitions + At line 313 in file RTE\Device\GD32F130C8\startup_gd32f1x0.s + Uses + None +Comment: __use_two_region_memory unused +3 symbols +416 symbols in table diff --git a/HUGS/Objects/HUGS.axf b/HUGS/Objects/HUGS.axf new file mode 100644 index 00000000..54f2153b Binary files /dev/null and b/HUGS/Objects/HUGS.axf differ diff --git a/HUGS/Objects/HUGS.build_log.htm b/HUGS/Objects/HUGS.build_log.htm new file mode 100644 index 00000000..a1570c49 --- /dev/null +++ b/HUGS/Objects/HUGS.build_log.htm @@ -0,0 +1,141 @@ + + +
+

Vision Build Log

+

Tool Versions:

+IDE-Version: Vision V5.34.0.0 +Copyright (C) 2021 ARM Ltd and ARM Germany GmbH. All rights reserved. +License Information: Philip Malone, GEARS, LIC=---- + +Tool Versions: +Toolchain: MDK-Lite Version: 5.34.0.0 +Toolchain Path: C:\Keil_v5\ARM\ARMCC\Bin +C Compiler: Armcc.exe V5.06 update 7 (build 960) +Assembler: Armasm.exe V5.06 update 7 (build 960) +Linker/Locator: ArmLink.exe V5.06 update 7 (build 960) +Library Manager: ArmAr.exe V5.06 update 7 (build 960) +Hex Converter: FromElf.exe V5.06 update 7 (build 960) +CPU DLL: SARMCM3.DLL V5.34.0.0 +Dialog DLL: DCM.DLL V1.17.3.0 +Target DLL: STLink\ST-LINKIII-KEIL_SWO.dll V3.0.8.0 +Dialog DLL: TCM.DLL V1.48.0.0 + +

Project:

+D:\Users\Phil\GitHub\Hoverboard_Utility_Gateway_System\HUGS\HUGS.uvprojx +Project File Date: 06/15/2021 + +

Output:

+*** Using Compiler 'V5.06 update 7 (build 960)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin' +Build target 'Target 1' +compiling setup.c... +linking... +Program Size: Code=20516 RO-data=1168 RW-data=160 ZI-data=2312 +FromELF: creating hex file... +".\Objects\HUGS.axf" - 0 Error(s), 0 Warning(s). + +

Software Packages used:

+ +Package Vendor: ARM + http://www.keil.com/pack/ARM.CMSIS.5.7.0.pack + ARM.CMSIS.5.7.0 + CMSIS (Cortex Microcontroller Software Interface Standard) + * Component: CORE Version: 5.4.0 + +Package Vendor: GigaDevice + http://gd32mcu.21ic.com/data/documents/yingyongruanjian/GigaDevice.GD32F1x0_DFP.3.1.0.pack + GigaDevice.GD32F1x0_DFP.3.1.0 + GigaDevice GD32F1x0 Series Device Support and Examples + * Component: ADC Version: 3.1.0 + * Component: DMA Version: 3.1.0 + * Component: FWDGT Version: 3.1.0 + * Component: GPIO Version: 3.1.0 + * Component: I2C Version: 3.1.0 + * Component: MCUDBG Version: 3.1.0 + * Component: MISC Version: 3.1.0 + * Component: OPA Version: 3.1.0 + * Component: PMU Version: 3.1.0 + * Component: RCU Version: 3.1.0 + * Component: SYSCFG Version: 3.1.0 + * Component: TIMER Version: 3.1.0 + * Component: USART Version: 3.1.0 + * Component: WWDGT Version: 3.1.0 + * Component: GD32F1x0_libopt Version: 3.1.0 + * Component: Startup Version: 3.1.0 + +

Collection of Component include folders:

+ .\RTE\_Target_1 + C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include + C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc + C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include + +

Collection of Component Files used:

+ + * Component: ARM::CMSIS:CORE:5.4.0 + + * Component: GigaDevice::Device:GD32F1x0_StdPeripherals:ADC:3.1.0 + Include file: Device\Firmware\Peripherals\inc\gd32f1x0_adc.h + Source file: Device\Firmware\Peripherals\src\gd32f1x0_adc.c + + * Component: GigaDevice::Device:GD32F1x0_StdPeripherals:DMA:3.1.0 + Include file: Device\Firmware\Peripherals\inc\gd32f1x0_dma.h + Source file: Device\Firmware\Peripherals\src\gd32f1x0_dma.c + + * Component: GigaDevice::Device:GD32F1x0_StdPeripherals:FWDGT:3.1.0 + Include file: Device\Firmware\Peripherals\inc\gd32f1x0_fwdgt.h + Source file: Device\Firmware\Peripherals\src\gd32f1x0_fwdgt.c + + * Component: GigaDevice::Device:GD32F1x0_StdPeripherals:GPIO:3.1.0 + Include file: Device\Firmware\Peripherals\inc\gd32f1x0_gpio.h + Source file: Device\Firmware\Peripherals\src\gd32f1x0_gpio.c + + * Component: GigaDevice::Device:GD32F1x0_StdPeripherals:I2C:3.1.0 + Source file: Device\Firmware\Peripherals\src\gd32f1x0_i2c.c + Include file: Device\Firmware\Peripherals\inc\gd32f1x0_i2c.h + + * Component: GigaDevice::Device:GD32F1x0_StdPeripherals:MCUDBG:3.1.0 + Source file: Device\Firmware\Peripherals\src\gd32f1x0_dbg.c + Include file: Device\Firmware\Peripherals\inc\gd32f1x0_dbg.h + + * Component: GigaDevice::Device:GD32F1x0_StdPeripherals:MISC:3.1.0 + Source file: Device\Firmware\Peripherals\src\gd32f1x0_misc.c + Include file: Device\Firmware\Peripherals\inc\gd32f1x0_misc.h + + * Component: GigaDevice::Device:GD32F1x0_StdPeripherals:OPA:3.1.0 + Include file: Device\Firmware\Peripherals\inc\gd32f1x0_opa.h + Source file: Device\Firmware\Peripherals\src\gd32f1x0_opa.c + + * Component: GigaDevice::Device:GD32F1x0_StdPeripherals:PMU:3.1.0 + Include file: Device\Firmware\Peripherals\inc\gd32f1x0_pmu.h + Source file: Device\Firmware\Peripherals\src\gd32f1x0_pmu.c + + * Component: GigaDevice::Device:GD32F1x0_StdPeripherals:RCU:3.1.0 + Source file: Device\Firmware\Peripherals\src\gd32f1x0_rcu.c + Include file: Device\Firmware\Peripherals\inc\gd32f1x0_rcu.h + + * Component: GigaDevice::Device:GD32F1x0_StdPeripherals:SYSCFG:3.1.0 + Include file: Device\Firmware\Peripherals\inc\gd32f1x0_syscfg.h + Source file: Device\Firmware\Peripherals\src\gd32f1x0_syscfg.c + + * Component: GigaDevice::Device:GD32F1x0_StdPeripherals:TIMER:3.1.0 + Include file: Device\Firmware\Peripherals\inc\gd32f1x0_timer.h + Source file: Device\Firmware\Peripherals\src\gd32f1x0_timer.c + + * Component: GigaDevice::Device:GD32F1x0_StdPeripherals:USART:3.1.0 + Source file: Device\Firmware\Peripherals\src\gd32f1x0_usart.c + Include file: Device\Firmware\Peripherals\inc\gd32f1x0_usart.h + + * Component: GigaDevice::Device:GD32F1x0_StdPeripherals:WWDGT:3.1.0 + Include file: Device\Firmware\Peripherals\inc\gd32f1x0_wwdgt.h + Source file: Device\Firmware\Peripherals\src\gd32f1x0_wwdgt.c + + * Component: GigaDevice::Device:GD32F1x0_libopt:3.1.0 + Include file: Device\Include\gd32f1x0_libopt.h + + * Component: GigaDevice::Device:Startup:3.1.0 + Include file: Device\Include\gd32f1x0.h + Source file: Device\Source\system_gd32f1x0.c + Source file: Device\Source\startup_gd32f1x0.s +Build Time Elapsed: 00:00:00 +
+ + diff --git a/HUGS/Objects/HUGS.hex b/HUGS/Objects/HUGS.hex new file mode 100644 index 00000000..9d34aec5 --- /dev/null +++ b/HUGS/Objects/HUGS.hex @@ -0,0 +1,1369 @@ +:020000040800F2 +:10000000A8090020F9470008791500087B150008A9 +:100010007F15000883150008871500080000000000 +:100020000000000000000000000000008B15000828 +:100030008D150008000000008F15000889140008C5 +:100040001348000813480008134800081348000824 +:100050001348000813480008134800081348000814 +:1000600013480008111500082B1500084515000855 +:1000700013480008FF14000813480008134800083C +:100080001348000813480008000000009D140008F1 +:1000900013480008134800081348000813480008D4 +:1000A00013480008134800081348000813480008C4 +:1000B000134800080000000013480008000000007A +:1000C0001348000800000000134800081348000807 +:1000D00013480008134800081348000800000000F7 +:1000E000000000000000000013480008134800084A +:1000F0001348000813480008134800081348000874 +:100100001348000800000000000000001348000829 +:1001100000000000000000000000000000000000DF +:1001200000000000000000000000000000000000CF +:1001300000000000000000000000000000000000BF +:1001400000000000000000000000000000000000AF +:1001500000000000000000001348000813480008D9 +:10016000134800081348000800F002F800F03AF8BD +:100170000AA090E8000C82448344AAF10107DA4502 +:1001800001D100F02FF8AFF2090EBAE80F0013F01A +:10019000010F18BFFB1A43F001031847F852000083 +:1001A00018530000103A24BF78C878C1FAD8520713 +:1001B00024BF30C830C144BF04680C6070470000E1 +:1001C0000023002400250026103A28BF78C1FBD860 +:1001D000520728BF30C148BF0B6070471FB51FBD15 +:1001E00010B510BD04F0ACFC1146FFF7F7FF00F0AE +:1001F0005EF804F0CAFC03B4FFF7F2FF03BC04F09E +:10020000D1FC0000002400208A49087002F000FBA5 +:10021000002000F08AF9012087490870002000F0D2 +:100220001FF901F011FB0021FF2001F0E5FC00BFE8 +:1002300005E082490C70642001F094F9641C082CDC +:10024000F7DB00207D4908707D4803F0ADFF0022F8 +:1002500004217C4802F0D0FB01E002F0D9FAFCE76F +:1002600010B50446B4F5004F01D1012000E0002094 +:1002700002464FF400414FF0904002F0BDFBB4F550 +:10028000805F01D1012000E0002002464FF4805140 +:100290004FF0904002F0B0FB082C01D1012000E0AB +:1002A000002002460821674802F0A6FB10BD04F0BA +:1002B0004FFB654800686422B0FBF2F1481EB0F1C4 +:1002C000807F00D31BE0481E4FF0E02250615017A2 +:1002D0000F22002804DB13071C0E5C4B1C5406E0A5 +:1002E00013071D0E5A4B00F00F04241F1D5500BFAD +:1002F00000204FF0E02290610720106100BF00F065 +:10030000C7FC08B900BFFEE700F0BCFC00F0DBFC56 +:1003100000F001FD012204214A4802F06DFB00F0CB +:10032000CFFF00F05CFF00F098FE02F071FA01F0E0 +:100330002EF80720414908704FF47A7001F012F945 +:1003400002F066FA00203D49087001E002F060FA10 +:100350004FF400413F4802F056FB0028F6D164E01C +:100360003548007828B94FF400413A4802F04BFB79 +:1003700008B1FFF747FF384801680068401C364A5B +:10038000106042F6E060814201D9FFF73BFF32483E +:10039000006842F6B451884205D908202749087000 +:1003A000244908703CE02D48008848F6B80188428E +:1003B00007DD4FF40040FFF753FF00201F4908708E +:1003C0002EE02648008848F2E801884210DD2348E4 +:1003D000008848F6B80188420ADA4FF48050FFF7E7 +:1003E0003FFF05201549087008201249087017E0E2 +:1003F0001A48008847F6181188420FDD1748008810 +:1004000048F2E801884209DA0820FFF729FF0520B1 +:100410000A49087001200749087001E0FFF7F2FE61 +:10042000322001F09FF802F0F3F999E700200A4921 +:1004300008607047620000209200002061000020E8 +:1004400000440040000400489C00002000E400E05C +:1004500018ED00E00008004804000020080000201B +:10046000FE49097801B110B90021FD4A1170FB491C +:1004700008707047002801DA414208B2704710B591 +:1004800004462046FFF7F6FF0A2801DBFFF7CEFF00 +:100490000120F349087041F28830844200DD04E015 +:1004A000F048844200DA00E02046EF490860002C62 +:1004B00003DD0120ED4908700AE0002C03DAFF207B +:1004C000EA49087004E00020E8490870E84908702B +:1004D000E848007860B1E748007802280ED1E24889 +:1004E000008800B2FFF7C6FFE3490978884205DDBE +:1004F0000020E2490870E249087015E0DC48007805 +:10050000032803D10120DE49087002E00120DB4905 +:100510000870D548008800B2FFF7ACFF40F6C23142 +:1005200091FBF0F0D749086010BDB0F57A7F02DD8D +:100530004FF47A7105E010F57A7F01DAD24900E0D4 +:100540000146D24A1180704710B504462046FFF795 +:1005500091FF052801DDFFF769FF0020C049087001 +:10056000C6490870C04908600CB9C14908702046E6 +:10057000FFF7DBFF10BDC648B0F900007047C54863 +:10058000B0F900007047C449096849F23832914215 +:1005900001D1002009E0C0490968C04A92FBF1F18D +:1005A000BF4A92F90020514308B2BE490968A1EB45 +:1005B000E1110144BB4A116011460968C91109B231 +:1005C000B44A1180704770B5B748006804F0FAFC6F +:1005D0000546B64904F00EFD044604F0D7FC70BD94 +:1005E00001B2B34A118000F1780109B2B14A118019 +:1005F00000F1F00109B2B04A1180AD49B1F9001023 +:1006000001F5B4714FF4B47291FBF2F302FB1311D4 +:1006100009B2A74A1180A749B1F9001001F5B471D8 +:100620004FF4B47291FBF2F302FB131109B2A14A29 +:100630001180A149B1F9001001F5B4714FF4B47201 +:1006400091FBF2F302FB131109B29B4A1180704730 +:10065000002800DA4042704700B5834800688D49A1 +:10066000B1F90010401A954908607F48006841F2CE +:100670007A4148437D4991F90010C1EBC10100EB7B +:100680004140C01300B28E4908808C48006841F692 +:1006900099114843C01300B28A4908807248006823 +:1006A000FFF7D6FF052806DB6F4800688649096812 +:1006B0004843002803DA00208449086019E07F4895 +:1006C0000068824909680844804908600846006853 +:1006D000B0F5960F02DD4FF4960008E07B48006805 +:1006E00010F5960F01DA7A4801E0784800687749FA +:1006F000086076480068C01300B2764908805A48FE +:100700000068714908606E4800886E49098808448D +:1007100070490988084400B200BD544991F900109D +:10072000002907DD6C490978C1EB0111E92202EBD0 +:10073000810008E068490978C1EB0111B42202EB9D +:100740008101E93908B270472DE9F0414FF40061A9 +:10075000624802F058F904460221614802F053F958 +:1007600005464FF480415F4802F04DF9064604EB20 +:10077000450000EB8600C7B25B48C05DBDE8F08174 +:100780002DE9F84359480088401C584908805848CA +:10079000007830B30846008841F2883190FBF1F1CF +:1007A00054480078401C91FBF0F200FB1210C0B9D5 +:1007B0004E4800884E49097890FBF1F201FB120087 +:1007C000A8B94D48007808B9012000E000204A4946 +:1007D0000870084602784FF48061404802F00CF936 +:1007E00005E000224FF480613C4802F005F94348DF +:1007F000B0F90000B0F57A7F13DA40480088401C59 +:1008000000B23E4908803E4949883E4AB2F900207C +:10081000881800EBD071491009B23A4A1180BDE83E +:10082000F88332480088642190FBF1F201FB12004A +:10083000002812D13248008845F66A6148434FF4D7 +:100840007A71B0FBF1F080B206462D4949882D4AF5 +:10085000B2F90020891A2C4A58E08FE04E0000209F +:100860005800002078ECFFFF500000201900002005 +:100870001A0000201B0000201C0000202C0000207B +:100880002D0000203000002018FCFFFF4C0000204D +:100890007800002070000020140000201CE00200FE +:1008A000180000206C0000200C0000207F6ABC4073 +:1008B000380000203A0000203C00002024000020E6 +:1008C0001E000020200000205400002028000020EE +:1008D0000000B5FF220000205E0000200004004858 +:1008E0000014004800080048785400086400002004 +:1008F00061000020620000206000002066000020EF +:100900005A000020680000201C13030001FB02F0C5 +:1009100004F0BFF907460022134604F0D1F909D2CA +:10092000B7484088B749B1F90010401AB649484362 +:10093000404207E0B2484088B249B1F90010401A7D +:10094000B14948434FF47A7190FBF1F085B2AF485A +:100950000088301A642190FBF1F0AC490988084402 +:10096000AA490880AA480088281A642190FBF1F05F +:10097000A74909880844A649088000BFA448008800 +:1009800043F69821884206DCA248007818B1A248B4 +:100990000078012803D1A14802F0E9FE02E09F4857 +:1009A00002F0E0FEFFF7D0FE9D490870084600788F +:1009B0009C490978884231D09B4800689B4908606F +:1009C0000020994908609648007896490978401AAD +:1009D00044B2012C01D0601D18B90120944908705F +:1009E00006E0601C08B1052C02D1FF209049087078 +:1009F000904800688E4991F9001008448D490860BC +:100A00008D48007850B100208B49087001208B4937 +:100A10000870FFF782FE0546FFF7E2FD8248006896 +:100A200049F23831884205DA7F480068401C7E4927 +:100A3000086006E049F238307C49086000208049AF +:100A4000088080480078002864D07F48006818B982 +:100A50000020FFF76AFD04E0FFF7FEFD0346FFF705 +:100A600064FD7A480068A0EBA0207949B1F9001034 +:100A700008447649086008460068801200B275494B +:100A800008806E480078A8B3022073490870734844 +:100A90000068401C71490860084600687049096890 +:100AA00088420BDB6F4909886F4A92F90020114494 +:100AB00008B2FFF795FD0020684908606B48694956 +:100AC000B1F9001030F91100C01069490860674899 +:100AD0006849B1F9001030F91100C010664908608A +:100AE00062486649B1F9001030F91100C01064493C +:100AF00008602DE0FFE703205749087060485E4B0F +:100B00005B4A0090464801785248B0F9000004F072 +:100B100050F81DE00120504908704C480068A0EBD7 +:100B2000A0204B49B1F90010084448490860084624 +:100B30000068801200B24749088051484E4B4C4A29 +:100B40000090374801784348B0F9000004F031F8CC +:100B50004B48006800F26540B0F50C6F02DD4FF4C1 +:100B60000C600BE04648006800F265400A2801DA94 +:100B70000A2003E04248006800F265400246022174 +:100B8000264802F034FF3C48006800F26540B0F5AA +:100B90000C6F02DD4FF40C600BE03748006800F288 +:100BA00065400A2801DA0A2003E03348006800F2B1 +:100BB000654002460121194802F019FF2C480068DF +:100BC00000F26540B0F50C6F02DD4FF40C600BE0F5 +:100BD0002748006800F265400A2801DA0A2003E08D +:100BE0002348006800F26540024600210B4802F0ED +:100BF000FEFE0B4800780B49087000BF0FE60000AE +:100C00005A000020680000201C1303000800002088 +:100C10000A0000204E00002088000020002C014027 +:100C20005E0000205F000020100000201400002063 +:100C3000180000200C0000202D0000202C000020B7 +:100C40007000002058000020500000207400002098 +:100C50004C000020780000201A0000203400002002 +:100C6000300000203800002019000020A8510008A2 +:100C7000400000203C000020440000203A000020FA +:100C80004800002010B54FF4407001F011FF10BD76 +:100C900010B540F61D1002F00DF908B102F019F977 +:100CA000022140F6FF7001F0D8FD012805D140F681 +:100CB000FF7001F0B7FD012801D0002010BD01F048 +:100CC000ACFD0120FAE710B54FF4E16001F0BAFF86 +:100CD000FE4802F0D3FB0020FD49888008802020D8 +:100CE000488048F6A0408860002088818873F748D3 +:100CF00002F07BFCF649F54802F029FC002211467F +:100D0000132001F0DAFE0121F04802F0C5FCEF48A3 +:100D100002F05CFC10BD10B540F2115001F092FFE2 +:100D200040F2125001F08EFF40F2135001F08AFFA2 +:100D300040F2165001F086FF4FF4004300220121DB +:100D40004FF0904001F00CFE4FF4004301220021CF +:100D50004FF0904001F02BFE082300220121DD48D6 +:100D600001F0FEFD082301220021DA4801F01FFEF8 +:100D70004FF48053002201214FF0904001F0F0FD2C +:100D80004FF48053012200214FF0904001F00FFEFC +:100D90000223002201214FF0904001F0E1FD0223E7 +:100DA000012200214FF0904001F001FE01230022BA +:100DB00019464FF0904001F0D3FD01231A4600215F +:100DC0004FF0904001F0F3FD4FF400530022012159 +:100DD000C14801F0C5FD4FF4005303220021BE4875 +:100DE00001F0E5FD4FF4006300221146B94801F01F +:100DF000B7FD022300221146B84801F0B1FD4FF4BF +:100E0000804300221146B44801F0AAFD04230122C8 +:100E100002214FF0904001F0A3FD0823012202219E +:100E20004FF0904001F09CFD0423032200214FF07D +:100E3000904001F0BCFD0823032200214FF09040B8 +:100E400001F0B5FD042201214FF0904001F0F3FDC7 +:100E5000082201214FF0904001F0EDFD1023002207 +:100E600003214FF0904001F07BFD4023002203213D +:100E70004FF0904001F074FD4023002203214FF019 +:100E8000904001F06DFD012300220321914801F003 +:100E900067FD1023002201218E4801F061FD10231F +:100EA000032200218B4801F082FD4FF48053002281 +:100EB0000221884801F054FD4FF4805202218548F8 +:100EC00001F0B9FD4FF48063002202214FF0904001 +:100ED00001F046FD4FF40073002202214FF09040D4 +:100EE00001F03EFD4FF48073002202214FF090404C +:100EF00001F036FD4FF4004300220221754801F055 +:100F00002FFD4FF4804300220221724801F028FD9A +:100F10004FF40053002202216E4801F021FD4FF4EE +:100F20008063002211464FF0904001F040FD4FF4E5 +:100F30000073002211464FF0904001F038FD4FF44D +:100F40008073002211464FF0904001F030FD4FF4C5 +:100F50000043002211465F4801F029FD4FF4804311 +:100F6000002211465B4801F022FD4FF4005300229D +:100F70001146584801F01BFD4FF4806202214FF0EA +:100F8000904001F058FD4FF4007202214FF0904064 +:100F900001F051FD4FF4807202214FF0904001F0BA +:100FA0004AFD4FF4004202214A4801F044FD4FF44B +:100FB00080420221474801F03EFD4FF400520221D9 +:100FC000444801F038FD042300220121414801F08A +:100FD000C7FC0423012200213E4801F0E8FC402325 +:100FE000012202213B4801F0BBFC802301220221A7 +:100FF000384801F0B5FC402303220021354801F0B8 +:10100000D6FC802303220021324801F0D0FC40228C +:101010000021304801F00FFD802200212D4801F011 +:101020000AFD4FF48063002201212A4801F098FC58 +:101030004FF4806303220021264801F0B8FC4FF4EE +:10104000004300221146244801F08AFC01231A467D +:101050000021224801F084FC10BD10B540F20B6065 +:1010600001F0F0FD1E4802F009FA00201D498880B9 +:1010700008802020488040F6CA00886000208881CF +:101080008873174802F0B1FA1649154802F05FFA62 +:1010900000220221124802F0EAFC0022012110483D +:1010A00002F0E5FC002211460D4802F0E0FC0022AF +:1010B00002210B4802F0AEFC00220121084802F098 +:1010C000A9FC0022114606480EE000000020004066 +:1010D000A000002000040048000800480014004858 +:1010E000002C0140B000002002F094FC702202218C +:1010F000DA4802F04FFC70220121D84802F04AFC85 +:1011000070220021D54802F045FC00220221D3487C +:1011100002F06DFC00220121D04802F068FC0022A0 +:101120001146CE4802F063FC0020CD49888008209B +:10113000C880002008814FF4007048810A460221CF +:10114000C64802F03BFBC64A0121C44802F036FB08 +:10115000C34A0021C14802F031FB4FF40060C1498D +:1011600008800020488048813C2088804FF48050CF +:1011700088810020C8804FF480400881B74802F081 +:10118000D9FAB64802F027FA01220221B34802F048 +:1011900026FD01221146B14802F021FD0122002165 +:1011A000AE4802F01CFD04220221AC4802F045FDCD +:1011B00004220121A94802F040FD04220021A74891 +:1011C00002F03BFD002211460D2001F076FC0121CA +:1011D000A24802F061FAA14802F0F8F910BD00B58A +:1011E00087B040F2096001F02DFD4FF4A06001F0DE +:1011F00029FD032001F0B9FD00220121092001F0A1 +:101200005CFC002001F0A6F800209749886197480F +:10121000C860002048614FF4806008610220C86106 +:101220009348086001208860000248604FF44050F5 +:10123000086218220C31684603F04DFC8A480EC83B +:10124000002001F0B3F8002001F037F9002001F090 +:1012500061F90221002001F0A1FA0221002001F031 +:1012600094F9002001F065F90221012000F011FE3F +:1012700002220421002000F038FE02220621012073 +:1012800000F033FE002000F0F5FD0121084600F0DB +:10129000F7FE4FF46021012000F01EFF00F065FD15 +:1012A00000F071FD01F041F800F01CFD00F02DFD93 +:1012B00000F046FD0121080200F09BFD07B000BDD3 +:1012C00000B587B040F2117001F0BCFC4FF4A06093 +:1012D00001F0B8FC4FF4E131664802F082FF0021D2 +:1012E000644802F0BAFF0021624802F0C2FF002108 +:1012F000604802F0CAFF00215E4803F04CF8082164 +:101300005C4802F0D8FF04215A4802F0DCFF59483B +:1013100002F0C7FF002202210B2001F0CEFB0420C7 +:1013200001F018F80020544988615448C860002032 +:10133000486108610120C8614E48243008600120DE +:101340008860002048604FF44050086218220C3139 +:10135000684603F0C0FB48480EC8042001F026F898 +:10136000042001F0AAF8042001F0D4F840214148FB +:1013700003F0ACF90221042001F010FA012104204D +:1013800001F003F9042001F0D4F807B000BD00B566 +:1013900087B040F20E6001F055FC4FF4A06001F000 +:1013A00051FC4FF41641364802F01BFF002134482F +:1013B00002F053FF0021324802F05BFF0021304869 +:1013C00002F063FF00212E4802F0E5FF08212C48BF +:1013D00002F071FF04212A4802F075FF284802F04C +:1013E00060FF002202210A2001F067FB022000F0CA +:1013F000B1FF0020204988612248C8600020486170 +:1014000008610120C8611E482430086001208860FE +:10141000002048604FF44050086218220C316846A2 +:1014200003F059FB14480EC8022000F0BFFF022051 +:1014300001F043F8022001F06DF84021104803F05C +:1014400045F90221084601F0A9F90121022001F025 +:101450009CF8022001F06DF807B000BD002C01409F +:10146000CE000020C0000020000100205A00002013 +:101470004C24014000440040DC0000207A000020A1 +:10148000003801407B00002041480068401C404972 +:101490000860704700203F490860704710B53E481B +:1014A000007808B9012000E000203B490870084698 +:1014B0000078F8B139480068401C38490860FFF7E7 +:1014C00062F8344800683649B1F90010884209D9F9 +:1014D0003448007810B90020FFF736F80120314970 +:1014E000087007E000202F4908702A480068401C57 +:1014F0002849086001212C4802F0E6F810BD10B51B +:10150000012000F007FE0121284802F0DDF810BD9F +:1015100010B5FFF735F90221002001F0D4F818B119 +:101520000221002001F031F910BD10B5022108465A +:1015300001F0C9F828B100F010F90221084601F0C5 +:1015400024F910BD10B50221042001F0BCF828B127 +:1015500000F0F4FA0221042001F017F910BD0F4841 +:10156000006870470D4A116800E000BF0B4A12681E +:10157000521A8242F9D37047704700BFFEE700BF9E +:10158000FEE700BFFEE700BFFEE770477047704709 +:101590008000002084000020890000207C000020C2 +:1015A000940000208800002000200040002C014012 +:1015B0002DE9F04107460D46164600240DE0295D51 +:1015C000384602F088FE00BF40F20671384603F04C +:1015D000B7F80028F8D0601CC4B2B442EFDBBDE815 +:1015E000F08130B50246002016E012F8015B80EA77 +:1015F0000520082300BF00F400442CB141F221046F +:1016000084EA4004A0B203E04FF6FF7404EA40000D +:101610005C1EE4B2231EEED14C1E211EE5DA30BD65 +:1016200002468A4201DB104670470846FCE72DE976 +:10163000FF5F044694F8018020782F2804D108F138 +:101640000700205C0A2803D0002004B0BDE8F09F0A +:1016500008F105012046FFF7C4FF074608F1050021 +:10166000215CF8B2814205D108F10600205CB0EBA4 +:10167000172F01D00020E8E7E0786749087020794B +:101680006649087064480078862802D0FF2859D13E +:101690004AE00120FEF7E4FEA079617901EB002029 +:1016A00005B2A946217A090209B2E279881803F045 +:1016B00089FC834603F03EFC594A5A4BCDE90001B0 +:1016C00003F03AFBCDE9020103F0B4FA0FFA80FA15 +:1016D00005EB0A0005B2A9EB0A000FFA80F94846AB +:1016E000FEF7C8FE83462846FEF7C4FE594603901F +:1016F000FFF796FF064641F288318E420BDD084621 +:10170000684390FBF6F005B2084609FB00F090FB39 +:10171000F6F00FFA80F9684201B2062000F06CFA88 +:101720004846FEF7ACFE0EE00021062000F064FA09 +:101730000021FF2000F060FA0020FEF705FF00F016 +:101740007FF800E000BF00BF022237493748FFF7AB +:101750002FFFFFF79FFE012077E72DE9F041344886 +:1017600006783448007838B92F2E05D10020324948 +:10177000087001202F4908702E480078002848D0B2 +:101780002E482D49097846542B480078401C2A4998 +:1017900008700846007801283BDD28484778042F68 +:1017A00004DD002008702349087032E022480178E7 +:1017B000F81D81422DDD2148FFF739FF28B10020B7 +:1017C0001D4908701B49087023E00025012406E02C +:1017D0001A48005D2F2801D1254604E0641C1648F4 +:1017E00000788442F4DB00BF002D0CDD1248007845 +:1017F000401B11490870114841190F4802780F48E1 +:1018000003F024F904E000200B490870094908702E +:1018100000BFBDE8F08100008E0000208F00002096 +:10182000AAF1D24D62100C408C000020003801401B +:101830007B0000208A0000208B0000202401002073 +:101840000120F749087070472DE9F04385B0012564 +:101850004FF00008F248007808B1012000E00020B5 +:10186000814600260027EF48007849EA400000F052 +:10187000FF092F208DF8000001208DF80100EA48B3 +:1018800000780007000E8DF8020001208DF803009B +:10189000E64800788DF804008DF80590E34800785C +:1018A000062837D006DC06287CD2DFE800F0A27CD0 +:1018B0003E0C1728072843D008284CD0092854D0BC +:1018C000FF286FD193E00325D94800788DF80600F2 +:1018D000D7480088000A8DF807008BE00525FEF741 +:1018E00072FE0446E0B28DF80600200A8DF807006B +:1018F000200C8DF80800200E8DF809007AE00325F1 +:10190000CC4800788DF80600CA48008800128DF88F +:1019100007006FE00325C84800788DF80600C64828 +:10192000008800128DF8070064E00325FEF723FE0F +:101930000646F0B28DF80600300A8DF8070059E02F +:101940000325BE4800788DF80600BC4800880012C8 +:101950008DF807004EE00325B94800788DF80600A1 +:10196000B84800788DF8070044E00725B6480078AD +:101970008DF80600B4480088000A8DF80700B348C7 +:1019800000788DF80800B1480088000A8DF8090039 +:10199000AF4800788DF80A00AD480088000A8DF83D +:1019A0000B0027E025E00925FEF7E5FD0646FEF7DA +:1019B0000AFE04469E4800788DF806009C48008880 +:1019C000000A8DF807002746F8B28DF80800380A9B +:1019D0008DF80900380C8DF80A00380E8DF80B00D0 +:1019E000F0B28DF80C00300A8DF80D0002E00125F0 +:1019F00000E000BF00BF8DF80150691D6846FFF789 +:101A0000F0FD804608F0FF01681D0DF800104FEA58 +:101A10001821A81D0DF800100A21E81D0DF800106E +:101A2000401CC2B269468B48FFF7C2FD05B0BDE855 +:101A3000F08370B50446667820782F2803D1F01D16 +:101A4000205C0A2801D0002070BD711D2046FFF7E0 +:101A5000C8FD0546701D205CE9B2884204D1B01D66 +:101A6000205CB0EB152F01D00020EDE7A07800F04E +:101A70000F0079490870A07800096B490870E07878 +:101A800076490870207969490870744800780628FA +:101A900035D008DC02282ED003280BD004280DD026 +:101AA000052840D10EE0092817D00A281CD0FF28AD +:101AB00039D12FE00120FEF7D3FC35E00020FEF7FE +:101AC000CFFC31E00120FEF7CBFCA179627902EB7B +:101AD000012108B2FEF738FD26E06079A17900EB1C +:101AE0000120564908801FE0607955490870A079A7 +:101AF0005449087018E000205949086014E001209A +:101B0000FEF7AEFCA179627902EB012108B2FEF783 +:101B1000B6FC09E00020FEF717FDFFF791FEFF205D +:101B20004249087000E000BF00BF4048007808B19B +:101B3000FFF78AFEFFF7AEFC012085E72DE9F041B3 +:101B4000484806784848007838B92F2E05D100203B +:101B5000464908700120444908704348007800282D +:101B600048D0434841490978465440480078401CD1 +:101B70003E4908700846007801283BDD3C4847781C +:101B8000092F04DD002008703749087032E037481B +:101B90000178F81D81422DDD3548FFF74AFF28B155 +:101BA0000020324908703049087023E000250124E4 +:101BB00006E02F48005D2F2801D1254604E0641C73 +:101BC0002A4800788442F4DB00BF002D0CDD274852 +:101BD0000078401B254908702548411923480278A0 +:101BE000234802F033FF04E00020204908701E491A +:101BF000087000BFBDE8F081F0B585B005460E461F +:101C00004FF0FF340027062D02D0FF2D34D131E0F4 +:101C10000224F0B28DF80500300A8DF806002CE0A1 +:101C2000920000201A000020970000209900002058 +:101C300070000020080000200A000020940000200E +:101C40001B0000201C0000201E000020200000209F +:101C50002200002000440040960000209800002050 +:101C60000C0000207A00002090000020910000204D +:101C700030010020002400E000BF00BF002C23DB67 +:101C80002F208DF80000E0B28DF8010000208DF8C3 +:101C900002008DF803508DF80400611D6846FFF7BF +:101CA000A0FC0746F9B2601D0DF80010390AA01D0E +:101CB0000DF800100A21E01D0DF80010401CC2B202 +:101CC00069460248FFF774FC05B0F0BD00440040CF +:101CD00010B540F2093000F0EDFF40F2093000F09D +:101CE000F7FF10BDFA48006800F0010028B9F84875 +:101CF000006840F00100F64908607047F448006849 +:101D000020F00100F24908607047F148006840F097 +:101D10000800EF49086000BFED48006800F00800C7 +:101D20000028F9D1EA48006840F00400E84908605A +:101D300000BFE748006800F004000028F9D17047B0 +:101D4000E348006840F48070E14908607047E0486B +:101D5000006820F48070DE4908607047DC48006845 +:101D600040F40000DA4908607047D948006820F460 +:101D70000000D74908607047D548006840F080707F +:101D8000D34908607047D248006820F08070D0497D +:101D900008607047CE4A121F126822F4C052CC4B22 +:101DA0001B1F1A60012802D002281FD115E0C84A63 +:101DB000121F126822F46042C54B1B1F1A601A469C +:101DC00013684A1E43EA4232C14B1B1F1A601A466F +:101DD000126842F400621A6009E0BD4A121F1268DC +:101DE00042F48052BA4B1B1F1A6000E000BF00BFD4 +:101DF0007047F9B100F480723AB1B54A121F126807 +:101E000042F48072B24B1B1F1A6000F480623AB138 +:101E1000AF4A121F126842F48062AD4B1B1F1A605A +:101E200000F002022AB3AA4A126842F00202A84B4A +:101E30001A601EE000F480723AB1A54A121F1268BF +:101E400022F48072A24B1B1F1A6000F480623AB128 +:101E50009F4A121F126822F480629D4B1B1F1A605A +:101E600000F002022AB19A4A126822F00202984B4C +:101E70001A60704730B19649096841F40061944A8C +:101E8000116005E09249096821F40061904A1160EF +:101E90007047012802D0022824D111E08C4A243254 +:101EA00013684A1E23EA0252894B24331A601A46E9 +:101EB00013684A1E43EA0252854B24331A6012E02B +:101EC000834A303213684A1E23EA0252804B303371 +:101ED0001A601A4613684A1E43EA02527C4B30339A +:101EE0001A6000E000BF00BF704770B514461229A9 +:101EF00000D10021062810D2754D2C352A6800EB40 +:101F000080061F25B540AA4300EB800501FA05F5C0 +:101F10002A436F4D2C352A602AE00C2812D26C4DD2 +:101F200028352A68851F05EB85061F25B540AA437D +:101F3000851F05EB850501FA05F52A43644D283513 +:101F40002A6015E0102813D2614D24352A68A0F1CB +:101F50000C0505EB85061F25B540AA43A0F10C052D +:101F600005EB850501FA05F52A43594D24352A600C +:101F70000A2910D2564D08352B6801EB410607257A +:101F8000B540AB4301EB410504FA05F52B43504D39 +:101F900008352B6015E0122913D24D4D2D1D2B68ED +:101FA000A1F10A0505EB45060725B540AB43A1F1B4 +:101FB0000A0505EB450504FA05F52B43444D2D1D97 +:101FC0002B6070BDF0B50346414E30363668C6F31F +:101FD0000155052B15D23E4E30363468EE1A06EB0D +:101FE0008606C6F10F071F26BE40B443EE1A06EB65 +:101FF0008606C6F10F0601FA06F63443344E303633 +:1020000034600A2910D2324E0836306801EB41079D +:102010000726BE40B04301EB410602FA06F6304304 +:102020002B4E0836306015E0132913D2284E361D8A +:102030003068A1F10A0606EB46070726BE40B0430A +:10204000A1F10A0606EB460602FA06F63043204ED8 +:10205000361D3060F0BD30B5024600201C4C3034D7 +:102060002468C4F301539C1AC4F10300032806D862 +:102070008000C1F30B04174D0544C5F8144430BD6E +:1020800091B100F001022AB1114A126842F48012A3 +:102090000F4B1A6000F00202C2B10D4A126842F4FE +:1020A00000420B4B1A6011E000F001022AB1084A0D +:1020B000126822F48012064B1A6000F002022AB164 +:1020C000034A126822F40042014B1A607047000074 +:1020D0000824014000200140012802D0022816D126 +:1020E0000AE0994A126822F46022974B1A601A4655 +:1020F00012680A431A600BE0934A126822F4E04225 +:10210000914B1A601A4612680A431A6000E000BF39 +:1021100000BF704700F0010129B18B49096841F403 +:102120008001894A116000F0020129B186490968DD +:1021300041F40011844A11607047834844300068BC +:1021400080B27047024632B1012A08D0022A0AD072 +:10215000032A10D10BE07C48343001680DE07A4846 +:102160003830016809E078483C30016805E076487D +:102170004030016801E0002100BF00BF88B2704715 +:1021800001460020704A083A12680A4002B1012054 +:1021900070476D490839096881436B4A083A1160F4 +:1021A000704702460020012A04D0022A10D0042AD7 +:1021B0002AD11BE0644B083B1B6803F00101624B12 +:1021C0001B1F1B6803F040030BB101B101201CE091 +:1021D0005D4B083B1B6803F002015B4B1B1F1B6838 +:1021E00003F020030BB101B101200EE0564B083B78 +:1021F0001B6803F00401544B1B1F1B6803F0800392 +:102200000BB101B1012000E000BF00BF70474E4993 +:102210000839096881434C4A083A1160704700F058 +:10222000010139B14849091F096841F04001464A96 +:10223000121F116000F0020139B14349091F0968FA +:1022400041F02001404A121F116000F0040139B131 +:102250003D49091F096841F080013B4A121F116086 +:10226000704700F0010139B13749091F096821F0B1 +:102270004001354A121F116000F0020139B13249A4 +:10228000091F096821F020012F4A121F116000F078 +:10229000040139B12C49091F096821F080012A4A3B +:1022A000121F116070472849091F0968274A114009 +:1022B000254A121F11601146096801431160114639 +:1022C0000968234A1143204A121F116070471E49B2 +:1022D000091F09681D4A1F3211401B4A121F116055 +:1022E000012804D002280BD003281BD111E0164985 +:1022F000091F096841F40001134A121F116012E01E +:102300001149091F096841F480010F4A121F116029 +:1023100009E00D49091F096841F440010A4A121FEA +:10232000116000E000BF00BF70470748001F006851 +:10233000064908400449091F08607047024A2032D4 +:102340001060121F1160704708240140E0FD3FFF3C +:102350000002C00000EB8001FD4A02EB81018968A8 +:1023600021F0010100EB8002F94B03EB8202916046 +:10237000002100EB800203EB8202916000EB8002FF +:1023800003EB8202D16000EB800203EB8202116159 +:1023900000EB800203EB8202516119464968830019 +:1023A0000F229A401143EA4A516070470FB410B5AA +:1023B00000EB8003E64C04EB8303039A1A6100EB05 +:1023C000800304EB8303069A5A6100EB800304EB5D +:1023D00083030A9ADA6000EB8002234603EB820251 +:1023E000916821F47C51079B049A1A430B9B1A4372 +:1023F000114300EB8002234603EB82029160059AB1 +:1024000062B900EB800203EB8202926842F0400264 +:1024100000EB800304EB83039A600DE000EB800285 +:10242000CB4B03EB8202926822F0400200EB800368 +:10243000C74C04EB83039A60089A72B900EB8002E0 +:10244000C34B03EB8202926842F0800200EB8003F0 +:10245000BF4C04EB83039A600DE000EB8002BC4BA1 +:1024600003EB8202926822F0800200EB8003B84CFA +:1024700004EB83039A60099A72B900EB8002B44BB3 +:1024800003EB8202926822F0100200EB8003B04C52 +:1024900004EB83039A600DE000EB8002AC4B03EB8E +:1024A0008202926842F0100200EB8003A84C04EB19 +:1024B00083039A6010BC5DF814FB00EB8001A44A12 +:1024C00002EB8101896841F0200100EB8002A04B02 +:1024D00003EB82029160704700EB80019C4A02EBA3 +:1024E0008101896821F0200100EB8002984B03EB09 +:1024F00082029160704700EB8001954A02EB8101F6 +:10250000896841F4804100EB8002914B03EB820229 +:102510009160704700EB80018D4A02EB8101896870 +:1025200021F4804100EB8002894B03EB8202916031 +:10253000704700EB8001864A02EB8101896841F017 +:10254000010100EB8002824B03EB82029160704735 +:1025500000EB80017E4A02EB8101896821F00101D4 +:1025600000EB80027A4B03EB82029160704700EB34 +:102570008002774B03EB82021161704700EB80020F +:10258000734B03EB82025161704700EB8002704B8A +:1025900003EB8202D1607047014601EB81006C4A77 +:1025A00002EB8000C068704710B50A4600EB80035C +:1025B000674C04EB8303996821F44051114300EB0D +:1025C000800304EB8303996010BD10B50A4600EB4D +:1025D00080035F4C04EB8303996821F4406111434D +:1025E00000EB800304EB8303996010BD10B50A462D +:1025F00000EB8003564C04EB8303996821F440718F +:10260000114300EB800304EB8303996010BD00EBE2 +:1026100080014F4A02EB8101896841F0800100EBA3 +:1026200080024B4B03EB82029160704700EB80010C +:10263000474A02EB8101896821F0800100EB8002AA +:10264000434B03EB82029160704700EB8001404AEC +:1026500002EB8101896841F0400100EB80023C4BB4 +:1026600003EB82029160704700EB8001384A02EB75 +:102670008101896821F0400100EB8002344B03EBBB +:1026800082029160704710B571B900EB8002304B47 +:1026900003EB8202926822F0100200EB80032C4CC4 +:1026A00004EB83039A600DE000EB8002284B03EB00 +:1026B0008202926842F0100200EB8003244C04EB8B +:1026C00083039A6010BDF0B50246002300240F2555 +:1026D0000E2601293ED0022904D0042914D008294D +:1026E0004AD123E01A480068970001FA07F700EA88 +:1026F00007049000C44002EB8200154F07EB8000F6 +:10270000806800F0020338E011480068970001FA81 +:1027100007F700EA07049000C44002EB82000C4F68 +:1027200007EB8000806800F0040326E0084800689A +:10273000970001FA07F700EA07049000C44002EB93 +:102740008200034F07EB8000806800F0080314E06C +:10275000000002402B480068970005FA07F700EADE +:1027600007049000C44002EB8200264F07EB800074 +:10277000806800EA060300E000BF00BF04EA03002F +:1027800008B10120F0BD0020FCE71E4A526883001A +:1027900001FA03F31A431B4B5A60704710B500EB64 +:1027A0008002184B03EB820292680A4300EB80031D +:1027B000144C04EB83039A6010BD10B500EB80024B +:1027C000104B03EB820292688A4300EB80030D4CAE +:1027D00004EB83039A6010BD10B50246094B1B68D9 +:1027E000940001FA04F423400BB1012000E0002022 +:1027F00010BD044A5268830001FA03F31A43014BE7 +:102800005A6070470000024000203049086070475D +:102810004AF6AA202D49086070474CF6CC402B4957 +:102820000860704710B50146294B002245F255500B +:10283000264C206000BF2548C06800F00402581EE6 +:10284000031E01D0002AF6D10AB1002010BDC1F349 +:102850000B001E4C20610120F8E730B502460B4604 +:102860001B4C002145F25550184D286000BF1748F9 +:10287000C06800F00101601E041E01D00029F6D1DD +:1028800009B1002030BD11484360114C00BF0F4812 +:10289000C06800F00201601E041E01D00029F6D1BC +:1028A00009B10020EEE7C2F30B00084DA8604AF61C +:1028B000AA2028600120E5E701460448C0680840D6 +:1028C00008B1012070470020FCE700000030004004 +:1028D000FFFF0F0010B504467349601A8C4220D0E8 +:1028E00006DCB4F1904F0AD070482044A0BB0FE042 +:1028F000B0F5806F1ED0B0F5406F2ED123E040F6CA +:10290000112000F0D7F940F6112000F0E1F925E0A0 +:1029100040F6122000F0CEF940F6122000F0D8F96F +:102920001CE040F6132000F0C5F940F6132000F03B +:10293000CFF913E040F6142000F0BCF940F6142063 +:1029400000F0C6F90AE040F6162000F0B3F940F6B0 +:10295000162000F0BDF901E0FFE700BF00BF10BD89 +:10296000F0B504460D4616462168E268002019E0DD +:10297000012787401F409FB14FEA400C032707FA09 +:102980000CF7B943470005FA07F739434FEA400C03 +:10299000032707FA0CF7BA43470006FA07F73A434A +:1029A000471CB8B21028E3D32160E260F0BDF0B557 +:1029B0000C461546012C03D146681E43466002E0D2 +:1029C00046689E434660826800210DE001268E40E5 +:1029D0001E403EB14F000326BE40B2434E0005FAF2 +:1029E00006F632434E1CB1B21029EFD38260F0BD1F +:1029F00081617047816270470AB1816100E0816244 +:102A000070474161704702461069084008B10120D3 +:102A100070470020FCE70146086980B27047024613 +:102A20005069084008B1012070470020FCE70146CA +:102A3000486980B27047F0B503461C6A5D6A0020A1 +:102A40000DE00126864016403EB187000F26BE40AD +:102A5000B443860001FA06F63443461CB0B2082897 +:102A6000EFD3082011E00126864016405EB1A0F1A8 +:102A70000806B7000F26BE40B543A0F10806B60011 +:102A800001FA06F63543461CB0B21028EBD31C629F +:102A90005D62F0BD4FF480320A43C261C161C26120 +:102AA000C269C269704700000008004800FCFFB717 +:102AB00043490143434A11607047F0B50B4600217A +:102AC000002400253F4E366806F4E066B6F5E06F58 +:102AD00002D100BF042526E03A4E366806F4E066CF +:102AE000B6F5C06F02D1012403251CE0354E3668CF +:102AF00006F4E066B6F5A06F02D10224022512E0CA +:102B0000304E366806F4E066B6F5806F02D10324D5 +:102B1000012508E02B4E366806F4E066B6F5407FE6 +:102B200001D104240025C4F1040603FA06F1C5F11D +:102B300004070F26FE40164031430901224E31544E +:102B400000F01F070126BE404711BF0007F1E02734 +:102B5000C7F80061F0BD00F01F02012191401B4A3F +:102B6000431142F823107047194A0A400243154B9B +:102B70001B1F1A6070471349091D09680143114A58 +:102B8000121D116070470F49091D096881430D4AE4 +:102B9000121D11607047042808D14FF0E021096927 +:102BA00041F004014FF0E022116107E04FF0E02115 +:102BB000096921F004014FF0E02211617047000023 +:102BC0000000FA050CED00E000E400E080E100E028 +:102BD00080FFFF1FFD48006840F00100FB490860CE +:102BE00000BFFA48006800F002000028F9D0F7485A +:102BF0004068F7490840F549486008464068F5498B +:102C00000840F24948600846406820F440004860A7 +:102C100008460068F0490840EC4908600846C06A68 +:102C200020F00F00C8620846006B40F24311884351 +:102C3000E64908630846406B20F001004863002025 +:102C400088607047E14A02EB9011096800F01F03A9 +:102C500001229A401143DD4B03EB90121160704743 +:102C6000DA4A02EB9011096800F01F0301229A4032 +:102C70009143D64B03EB901211607047D34A02EB9D +:102C80009011096800F01F0301229A401143CF4BB5 +:102C900003EB901211607047CC4A02EB9011096867 +:102CA00000F01F0301229A409143C84B03EB90129E +:102CB00011607047C54A02EB9011096800F01F03CC +:102CC00001229A401143C14B03EB901211607047EF +:102CD000BE4A02EB9011096800F01F0301229A40DE +:102CE0009143BA4B03EB901211607047B748006AEA +:102CF00040F48030B54908627047B448006A20F457 +:102D00008030B2490862704701460020AF4A5068DF +:102D100020F0030041EA0002AC4B5A607047AB4818 +:102D2000406800F00C00704701460020A74A506838 +:102D300020F0F00041EA0002A44B5A6070470146BF +:102D40000020A24A506820F4E06041EA00029F4B54 +:102D50005A607047014600209C4A506820F4605039 +:102D600041EA0002994B5A6070479849496821F43A +:102D70004041964A51601146096B21F480711163FC +:102D8000052839D2DFE800F0030A14202C008F490F +:102D9000096B21F480718D4A11632EE08B494968DB +:102DA0008A4A51601146096B41F48071116324E035 +:102DB0008649496841F48041844A51601146096B53 +:102DC00041F48071116318E08049496841F4004181 +:102DD0007E4A51601146096B41F4807111630CE029 +:102DE0007A49496841F44041784A51601146096B7B +:102DF00041F48071116300E000BF00BF7047734968 +:102E0000496821F44001714A516011464968014303 +:102E10005160704710B500226C4B5A6822F077421F +:102E200042EA00030B43694C636010BD674A526875 +:102E30006A4B1A40654B5A601A46526840EA0103D1 +:102E40001A43624B5A6070476049096B21F00301D5 +:102E50005E4A11631146096B0143116370475B4978 +:102E6000096B21F04001594A11631146096B014376 +:102E7000116370475549096A21F44071534A116240 +:102E80001146096A01431162704700214F4AD16A15 +:102E900021F00F0141EA00024C4BDA6270474B49C6 +:102EA000096A21F01801494A11621146096A014371 +:102EB000116270470146454A02EB9110006801F02B +:102EC0001F0301229A40104008B1012070470020E2 +:102ED000FCE73E48406A40F080703C4948627047D9 +:102EE00001463A488068084008B101207047002038 +:102EF000FCE7364989680143344A91607047334999 +:102F000089680143314A916070473049896881433B +:102F10002E4A91607047F0B5064600240027002530 +:102F2000B6F5006F1DD005DC76B3102E09D0182E33 +:102F30007BD169E0B6F5106F54D0B6F5506F74D1FF +:102F400032E004E01120FFF7B5FF0546641C15B917 +:102F5000B4F5006FF6D11120FFF7ACFF00B10127E7 +:102F600064E005E040F60100FFF7A4FF0546641C9D +:102F70001DB96FF07C408442F4D140F60100FFF7A8 +:102F800099FF00B1012751E004E00120FFF792FF13 +:102F90000546641C15B9B4F5A06FF6D10120FFF702 +:102FA00089FF00B1012741E005E040F60150FFF73D +:102FB00081FF0546641C15B909488442F5D140F6E5 +:102FC0000150FFF777FF00B101272FE0001002400A +:102FD0000C00FF08FFFFC277FFFFF2FEFFFFC2F702 +:102FE000FFFF0F0005E040F60110FFF763FF054605 +:102FF000641C15B9F8488442F5D140F60110FFF77A +:1030000059FF00B1012711E004E01920FFF752FF3A +:103010000546641C15B9F0488442F6D11920FFF723 +:1030200049FF00B1012701E0FFE700BF00BF3846BC +:10303000F0BDEA4A02EB9011096800F01F0301227B +:103040009A401143E54B03EB901211607047E34A3D +:1030500002EB9011096800F01F0301229A4091438E +:10306000DE4B03EB9012116070470146B1F5006F23 +:1030700018D005DC09B3102909D0182921D11FE087 +:10308000B1F5106F1BD0B1F5506F1AD116E0D34ACD +:103090001068126822F48032D04B1A6040F480220B +:1030A0001A600FE0CD4A106A126A22F00102CB4B7F +:1030B0001A6240F004021A6204E000BF00BF00BFC1 +:1030C00000E000BF00BF70470146B1F5006F18D0A7 +:1030D00005DC09B3102909D0182921D11FE0B1F569 +:1030E000106F1BD0B1F5506F1AD116E0BB4A1068B3 +:1030F000126822F48032B94B1A6020F480221A60E0 +:103100000FE0B64A106A126A22F00102B34B1A624B +:1031100020F004021A6204E000BF00BF00BF00E01C +:1031200000BF00BF7047AD48006840F40020AB49C5 +:1031300008607047A948006820F40020A74908608B +:1031400070470021A54A116821F0F80141EAC00248 +:10315000A24B1A6070470021A04A516B21F0F80180 +:1031600041EAC0029D4B5A6370479D4800680020A9 +:103170009A49C1F800019A4800689A49084397495A +:10318000C1F80001704796493431096821F0070100 +:10319000924AC2F834111146D1F834110143C2F8F1 +:1031A000341170478E493831096821F001018B4A8A +:1031B000C2F838111146D1F838110143C2F838115C +:1031C00070472DE9F04F8FB004464FF0000CE046F9 +:1031D0000020002200258146CDF838900021CDF84E +:1031E0003490CDF83090CDF82C900023CDF8289075 +:1031F000CDF82490CDF82090002600270FF2E81992 +:1032000099E8004CD9F80C90CDE905BECDF810A096 +:10321000CDF81C900FF2D41ADAE9009ACDE9029A9F +:103220000FF2C81ADAE9009ACDE9009ADFF8AC91FA +:10323000D9F80490C9F3810CBCF1000F06D0BCF1A1 +:10324000010F05D0BCF1020F3FD103E06A4A3EE016 +:10325000694A3CE0DFF88491D9F80490C9F38343CC +:10326000DFF87891D9F80490C9F3C069CDF82890B7 +:10327000DDF82890B9F1000F01D0113300E09B1C5C +:10328000DFF85891D9F80490C9F30049CDF824909B +:10329000DDF82490B9F1000F12D0DFF84091D9F891 +:1032A0002C9009F00F0909F10109CDF82090DFF801 +:1032B00048A1DDF82090BAFBF9F909FB03F203E01D +:1032C000DFF8389103FB09F201E04B4A00BF00BF71 +:1032D000DFF80891D9F80490C9F303160DF110092D +:1032E00019F8067022FA07F5DFF8F090D9F8049083 +:1032F000C9F302260DF1080919F8067025FA07F935 +:10330000CDF83890DFF8D490D9F80490C9F3C226EC +:103310001DF8067025FA07F1072C5CD2DFE804F0EF +:103320000406080A0C47720010469FE028469DE0FC +:103330000E989BE0084699E0DFF8A090D9F830900D +:1033400009F48079B9F5807F04D0DFF8B490CDF826 +:1033500034902AE0DFF88490D9F80490C9F38138DA +:10336000B8F1000F09D0B8F1010F0BD0B8F1020F7E +:103370000DD0B8F1030F16D110E04FEA5109CDF886 +:10338000349011E04FEA9109CDF834900CE04FF001 +:103390000609B1FBF9F9CDF8349005E04FEAD109FF +:1033A000CDF8349000E000BF00BF0D985EE0DFF87C +:1033B0002C90D9F8309009F04009B9F1400F04D0B1 +:1033C00048F21209CDF8309003E04FF40049CDF8EF +:1033D00030900C984AE048E0FFFF0F0000100240D8 +:1033E000001102404D3C2B1A0000000000000000BC +:1033F000010203040607080900127A0000093D00D3 +:10340000809FD500DFF86C90D9F8309009F003095F +:10341000B9F1000F01D10B9125E0DFF85890D9F8F0 +:10342000309009F00309B9F1010F01D10B921AE0B4 +:10343000DFF84090D9F8309009F00309B9F1020F94 +:1034400004D14FF40049CDF82C900CE0DFF8249023 +:10345000D9F8309009F00309B9F1030F03D1DFF86F +:103460001890CDF82C900B9800E000BF00BF0FB073 +:10347000BDE8F08F0010024000127A0010B504463B +:10348000FE49601A8C4217D00CDCB4F1804F1CD07E +:10349000FB48204410B3B0F5406F28D0B0F5E05F92 +:1034A00052D12DE0B0F5A05F33D0B0F5C05F39D078 +:1034B000B0F5E05F48D13EE040F20B30FFF7FAFB99 +:1034C00040F20B30FFF704FC3FE04FF48060FFF761 +:1034D000F1FB4FF48060FFF7FBFB36E040F2014068 +:1034E000FFF7E8FB40F20140FFF7F2FB2DE040F26E +:1034F0000440FFF7DFFB40F20440FFF7E9FB24E064 +:103500004FF48160FFF7D6FB4FF48160FFF7E0FBDB +:103510001BE04FF44470FFF7CDFB4FF44470FFF70E +:10352000D7FB12E040F21130FFF7C4FB40F211303C +:10353000FFF7CEFB09E040F21230FFF7BBFB40F291 +:103540001230FFF7C5FB00E000BF00BF10BD0A88C6 +:103550008262CA4A904206D0B0F1804F03D0C84A76 +:10356000524290420CD1026822F0100202600268BE +:103570004B881A43026002688B881A43026007E096 +:10358000026822F01002026002688B881A4302600F +:103590008A68C262BB4A904207D0026822F4407235 +:1035A000026002688B891A430260B44A904208D0D4 +:1035B000B54A904205D0B54A904202D0B44A9042F2 +:1035C00001D18A7B0263426942617047016841F020 +:1035D000010101607047016821F00101016070473D +:1035E000016841F0800101607047016821F08001AD +:1035F00001607047016841F0020101607047016895 +:1036000021F0020101607047026822F0600202604E +:1036100002680A4302607047016821F010010160EE +:10362000016801607047016821F0100101600168C4 +:1036300041F010010160704781621AB9436943F09B +:1036400001034361704701637047C1627047416283 +:10365000704701460020486A7047014600208A6A88 +:1036600090B2704721B9026842F00802026005E09A +:10367000012903D1026822F008020260704721B9D3 +:10368000026842F00402026005E0012903D10268E9 +:1036900022F0040202607047C2680A43C2607047A9 +:1036A000C2688A43C260704710B5024600230024F6 +:1036B0001069084083B2D068084084B213B10CB1DD +:1036C000012010BD0020FCE702698A4302617047B7 +:1036D00002461069084080B208B1012070470020FE +:1036E000FCE702698A4302617047C2680A43C2600C +:1036F0007047C2688A43C260704721B9426842F08D +:103700000802426005E0012903D1426822F0080264 +:103710004260704710B5836C41F61F74A343836405 +:10372000836C41EA02042343836410BD42690A4367 +:10373000426170470A884B881A438B881A43CB88AA +:103740001A430B891A434B891A438B891A434264E3 +:103750007047416C41F4805141647047416C0021D5 +:1037600041647047416C41F4804141647047416C51 +:1037700000214164704721B1426C42F4004242642E +:1037800003E0426C22F400424264704721B1426877 +:1037900042F00102426003E0426822F0010242600E +:1037A000704721B9426822F00402426005E0012915 +:1037B00003D1426842F004024260704710B531B153 +:1037C000012941D002297DD003297CD1C0E0036AC0 +:1037D00023F001030362036A148823430362036A2C +:1037E00023F002030362036A948823430362234B9A +:1037F000984208D0244B984205D0244B984202D0DE +:10380000234B98421FD1036A23F004030362036A27 +:10381000548823430362036A23F008030362036AA4 +:10382000D48823430362436823F48073436043686E +:10383000148923434360436823F40073436043685F +:10384000548923434360A3E0036A23F01003036217 +:10385000036A148843EA04130362036A23F0200313 +:103860000362036A948843EA04130362034B984299 +:1038700033D1036A23F0400303620BE0002C0140C4 +:1038800000FCFFBF00100040004001400044014028 +:1038900000480140036A548843EA04130362036A40 +:1038A00023F080030362036AD48843EA04130362AB +:1038B000436823F4806343604368148943EA8403C4 +:1038C000436001E00AE062E0436823F40063436080 +:1038D0004368548943EA8403436059E0036A23F44C +:1038E00080730362036A148843EA04230362036A51 +:1038F00023F400730362036A948843EA0423036297 +:10390000FC4B984223D1036A23F480630362036A69 +:10391000548843EA04230362036A23F400630362C6 +:10392000036AD48843EA04230362436823F4805380 +:1039300043604368148943EA04134360436823F4F3 +:10394000005343604368548943EA041343601FE013 +:10395000036A23F480530362036A148843EA04333E +:103960000362036A23F400530362036A948843EA00 +:1039700004330362DF4B984208D1436823F4804349 +:1039800043604368148943EA8413436000E000BF46 +:1039900000BF10BD31B101290CD0022913D0032979 +:1039A00022D118E0836923F0700383618369134394 +:1039B00083611AE0836923F4E0438361836943EA06 +:1039C0000223836111E0C36923F07003C361C369FB +:1039D0001343C36109E0C36923F4E043C361C369CE +:1039E00043EA0223C36100E000BF00BF704731B16A +:1039F000012906D0022906D0032908D105E0426337 +:103A000006E0826304E0C26302E0026400E000BFFB +:103A100000BF704731B101290CD0022913D003290E +:103A200022D118E0836923F008038361836913437B +:103A300083611AE0836923F400638361836943EA45 +:103A40000223836111E0C36923F00803C361C369E2 +:103A50001343C36109E0C36923F40063C361C3690D +:103A600043EA0223C36100E000BF00BF704731B1E9 +:103A700001290CD0022913D0032922D118E083692F +:103A800023F0040383618369134383611AE083692C +:103A900023F480638361836943EA0223836111E035 +:103AA000C36923F00403C361C3691343C36109E01D +:103AB000C36923F48063C361C36943EA0223C3611A +:103AC00000E000BF00BF704731B101290CD00229CE +:103AD00013D0032922D118E0836923F08003836186 +:103AE0008369134383611AE0836923F4004383618C +:103AF000836943EA0223836111E0C36923F08003F1 +:103B0000C361C3691343C36109E0C36923F400437C +:103B1000C361C36943EA0223C36100E000BF00BF81 +:103B2000704731B101290CD0022913D0032923D1C8 +:103B300019E0036A23F002030362036A134303627A +:103B40001BE0036A23F020030362036A43EA0213C3 +:103B5000036212E0036A23F400730362036A43EA18 +:103B60000223036209E0036A23F400530362036A39 +:103B700043EA0233036200E000BF00BF704721B197 +:103B800001290AD002291AD110E0036A23F00803A0 +:103B90000362036A1343036212E0036A23F08003A3 +:103BA0000362036A43EA0213036209E0036A23F42F +:103BB00000630362036A43EA0223036200E000BF7A +:103BC00000BF7047012904D1826842F00802826078 +:103BD00004E019B9826822F008028260704731B1AE +:103BE00001290CD0022913D0032923D119E0036A3B +:103BF00023F001030362036A134303621BE0036AB9 +:103C000023F010030362036A43EA0213036212E023 +:103C1000036A23F480730362036A43EA02230362A4 +:103C200009E0036A23F480530362036A43EA023320 +:103C3000036200E000BF00BF704721B101290AD034 +:103C400002291AD110E0036A23F004030362036A15 +:103C50001343036212E0036A23F040030362036A22 +:103C600043EA0213036209E0036A23F480630362F8 +:103C7000036A43EA0223036200E000BF00BF70470B +:103C800031B101290CD0022913D0032922D118E027 +:103C9000836923F00C0383618369134383611AE012 +:103CA000836923F440638361836943EA0223836168 +:103CB00011E0C36923F00C03C361C3691343C361FB +:103CC00009E0C36923F44063C361C36943EA022383 +:103CD000C36100E000BF00BF704770B504460E46E8 +:103CE00015464EB1012E29D0022E4BD0032E7DD188 +:103CF0006BE00000002C0140206A20F001002062EF +:103D0000206A20F00A002062206A29880843206285 +:103D1000A06920F00300A061A06969880843A06140 +:103D2000A06920F0F000A061A069E98840EA0110D4 +:103D3000A061206A40F0010020626DE0206A20F05E +:103D400010002062206A20F0A0002062206A2988EA +:103D500040EA01102062A06920F44070A061A069CF +:103D6000698840EA0120A061A06920F47040A06148 +:103D7000A069E98840EA0130A061206A40F01000A3 +:103D8000206249E0206A20F480702062206A20F4DA +:103D900020602062206A298840EA01202062E069D0 +:103DA00020F00300E061E06969880843E061E069B0 +:103DB00020F0F000E061E069E98840EA0110E0618C +:103DC000206A40F48070206226E0206A20F480504F +:103DD0002062206A20F400502062206A298840EA8C +:103DE00001302062E06920F4407000E013E0E061FF +:103DF000E069698840EA0120E061E06920F47040F0 +:103E0000E061E069E98840EA0130E061206A40F45D +:103E10008050206200E000BF00BFAA8831462046E3 +:103E2000FFF72EFF70BD0246002031B1012906D0F8 +:103E3000022906D0032908D105E0506B06E0906BFB +:103E400004E0D06B02E0106C00E000BF00BF7047E0 +:103E50002DE9F04104460E4615460027B84628884D +:103E600008B9022700E000276888012802D14FF036 +:103E7000020801E04FF00108002E4BD1206A20F02B +:103E800001002062206A20F00A002062206A29884E +:103E900008432062A06920F00300A061A06969883E +:103EA0000843A061A06920F0F000A061A069E98842 +:103EB0000843A061206A40F001002062AA88002126 +:103EC0002046FFF7DDFE206A20F010002062206A05 +:103ED00020F0A0002062206A40EA07102062A0695A +:103EE00020F44070A061A06940EA0820A061A069A8 +:103EF00020F47040A061A069E98840EA0120A06137 +:103F0000206A40F010002062AA8801212046FFF7B5 +:103F1000B7FE4BE0206A20F010002062206A20F0FB +:103F2000A0002062206A298840EA01102062A0696E +:103F300020F44070A061A069698840EA0120A06176 +:103F4000A06920F47040A061A069E98840EA0120DE +:103F5000A061206A40F010002062AA88012120465A +:103F6000FFF78EFE206A20F001002062206A20F018 +:103F70000A002062206A38432062A06920F0030012 +:103F8000A061A06940EA0800A061A06920F0F000EB +:103F9000A061A069E9880843A061206A40F001009F +:103FA0002062AA8800212046FFF76AFEBDE8F08162 +:103FB00021B9426842F08002426005E0012903D144 +:103FC000426822F0800242607047826822F07002EC +:103FD000826082680A4382607047426822F0700201 +:103FE000426042680A4342607047826822F00702DA +:103FF000826082680A438260704721B9826842F019 +:104000008002826005E0012903D1826822F08002EB +:104010008260704730B5846824F43F4484608468CB +:1040200041EA02052C438460846844EA03248460E6 +:1040300030BD30B5846824F00704846084680C4384 +:104040008460846940F20335AC438461846940F242 +:1040500001152C438461046A24F00A040462046A92 +:1040600024F0A0040462046A42EA03152C430462AB +:1040700030BD816800218160704710B503460C4651 +:1040800021461846FFF7A1FF986820F007009860C6 +:10409000986840F00700986010BD70B504460E4661 +:1040A0001546602E20D1206A20F010002062206A80 +:1040B00020F0A0002062206A40EA05102062A0697A +:1040C00020F44070A061A06940F48070A061A069F4 +:1040D00020F47040A061A06940EA0320A061206A3A +:1040E00040F0100020621DE0206A20F001002062F4 +:1040F000206A20F00A002062206A28432062A0691A +:1041000020F00300A061A06940F00100A061A06957 +:1041100020F0F000A061A0691843A061206A40F07F +:104120000100206231462046FFF74FFFA06820F0D3 +:104130000700A060A06840F00700A06070BDF0B567 +:1041400004460D4616461F463B4632462946204643 +:10415000FFF760FFA06820F00700A060A06840F0B3 +:104160000700A060A06820F07000A060A06840F088 +:104170007000A060F0BDF0B504460D4616461F461F +:104180003B46324629462046FFF744FFA06840F4EC +:104190008040A060F0BD816821F48041816070475B +:1041A00001B902657047000010B50446F848204484 +:1041B00058B1B0F5744F11D140F20E30FEF77AFDD0 +:1041C00040F20E30FEF784FD09E040F21140FEF7A8 +:1041D00071FD40F21140FEF77BFD00E000BF00BF23 +:1041E00010BD2DE9F04704460D460027B846B946F4 +:1041F0000026E748204438B1B0F5744F09D10620B5 +:10420000FEF7DFFF074605E00220FEF7DAFF07466C +:1042100000E000BF00BF206800F4004070B17800EB +:1042200000EB5500B0FBF5F64FF6F07006EA00081B +:10423000C6F3420948EA0900E0600CE007EB5500CC +:10424000B0FBF5F64FF6F07006EA000806F00F092D +:1042500048EA0900E060BDE8F087026822F0010248 +:104260000260026822F4C062026002680A430260CF +:104270007047026822F001020260026822F4805254 +:10428000026002680A4302607047026822F001027D +:104290000260426822F44052426042680A4342602F +:1042A0007047016841F0010101607047016821F029 +:1042B000010101607047026822F008020260026892 +:1042C0000A4302607047026822F00402026002683A +:1042D0000A4302607047C1F30802826270470146D8 +:1042E000486AC0F308007047026822F001020260C9 +:1042F000426822F400224260426801F400231A431B +:1043000042607047026822F00102026008292DD243 +:10431000DFE801F004091D0E22132718426842F459 +:104320008022426023E0426822F4802242601EE044 +:10433000426822F40032426019E0426822F480327E +:10434000426014E0426822F4004242600FE042689A +:1043500042F4003242600AE0426842F48032426035 +:1043600005E0426842F40042426000E000BF00BF46 +:104370007047016821F001010160816821F48051DA +:1043800081607047016821F001010160816841F49A +:10439000805181607047026822F001020260026869 +:1043A00022F40042026002680A4302607047026819 +:1043B00022F001020260826822F400628260826858 +:1043C0000A4382607047416841F480114160704740 +:1043D000416821F4801141607047426822F4C002B4 +:1043E000426042680A4342607047016841F40051EC +:1043F00001607047016821F4005101607047026854 +:1044000022F001020260026822F400620260026887 +:104410000A4302607047026822F0010202604268AB +:1044200022F010024260426801F010031A43426019 +:104430007047026822F001020260426822F07F4267 +:10444000426042684FF07F4303EA01631A434260CF +:104450007047416841F4000141607047416821F4B0 +:10446000000141607047426902F07F424261426947 +:104470000A4342617047016821F00101016041680F +:1044800041F4804141607047016821F00101016001 +:10449000416821F4804141607047026822F00102C6 +:1044A0000260426801F020031A43426070470168CD +:1044B00021F001010160816841F0080181607047CD +:1044C000016821F001010160816821F0080181602B +:1044D0007047016821F001010160416841F4006109 +:1044E00041607047016821F001010160416821F4D9 +:1044F00000614160704730B5046824F00104046035 +:10450000446824F4E0644460446801F480752C43FA +:104510004460446802F400752C434460446803F42A +:1045200080652C43446030BD016821F001010160C9 +:10453000816841F0200181607047016821F001012C +:104540000160816821F0200181607047016821F0DD +:1045500001010160816841F01001816070470168CC +:1045600021F001010160816821F010018160704734 +:10457000026822F001020260026922F47F420261B5 +:1045800002694FF47F4303EA01231A430261704733 +:1045900000BCFFBF426922F07F42426142694FF096 +:1045A0007F4303EA01631A4342617047026822F0C5 +:1045B00001020260826822F46022826082684FF405 +:1045C000602303EA41431A4382607047016821F087 +:1045D00001010160816841F002018160704701685A +:1045E00021F001010160816821F0020181607047C2 +:1045F000026822F001020260826801F004031A439B +:1046000082607047026822F001020260026922F0B3 +:10461000FF02026102690A4302617047026822F0E8 +:1046200001020260826822F48072826082680A431A +:1046300082607047026822F001020260826822F400 +:104640000072826082680A4382607047016821F0CC +:1046500001010160816841F4804181607047016817 +:1046600021F001010160816821F48041816070477F +:10467000026822F001020260026822F07872026091 +:1046800002684FF0787303EA41531A43026070479F +:10469000026822F001020260026822F4F81202604D +:1046A00002684FF4F81303EA01431A4302607047AB +:1046B000026822F001020260826822F400428260F5 +:1046C000826801F400431A4382607047826822F0D6 +:1046D0004002826082680A4382607047826822F0EA +:1046E0008002826082680A4382607047016821F01C +:1046F00001010160816841F40051816070470168E7 +:1047000021F001010160816821F40051816070474E +:10471000016841F0020101607047016821F0020167 +:1047200001607047026822F001020260826822F490 +:1047300040128260826801F440131A43826070471D +:1047400010B5024602EB9110006801F01F0401232E +:10475000A340184008B1012010BD0020FCE710B5AF +:10476000026A01F01F040123A3401A43026210BD34 +:1047700010B5C1F38912825801F01F040123A34030 +:104780001A43C1F38913C25010BD10B5C1F3891289 +:10479000825801F01F040123A3409A43C1F38913F7 +:1047A000C25010BD82690A438261704770B50246EB +:1047B00000230024C1F38910105801F01F060125C1 +:1047C000B54000EA050302EB91500068C1F30446CE +:1047D0000125B54000EA050414B10BB1012070BDFC +:1047E0000020FCE710B5026AC1F304440123A34092 +:1047F0001A43026210BD000009488047094800477B +:10480000FEE7FEE7FEE7FEE7FEE7FEE7FEE7FEE780 +:10481000FEE7FEE704480549054A064B70470000DD +:10482000DB48000869010008A8010020A809002051 +:10483000A8050020A805002000200021784A126861 +:1048400042F48032764B1A6000BF401C744A1268F2 +:1048500002F4003111B9B0F5006FF6D1704A126858 +:1048600002F4003202B970476D4A52686C4B5A60CC +:104870001A4652685A601A4652685A601A46526876 +:10488000684B1A40664B5A601A46526842F4E81266 +:104890005A601A46126842F080721A6000BF604A7D +:1048A000126802F00072002AF9D05D4A526822F0C4 +:1048B00003025B4B5A601A46526842F002025A6089 +:1048C00000BF574A526802F00802002AF9D000BF20 +:1048D000C9E710B5FFF7B0FF10BD10B5504800682C +:1048E00040F001004E49086000BF4D48006800F0EC +:1048F00002000028F9D04A4840684B49084048491E +:1049000048600846406847490840454948600846AD +:10491000406820F440004860084600684349084069 +:104920003F4908600846C06A20F00F00C862084688 +:10493000006B40F243118843394908630846406BD5 +:1049400020F00100486300208860FFF7C2FF10BD1F +:104950002DE9FF4300210020002200230024002530 +:1049600000260FF2CC09D9E901C8D9F80070D9F8AE +:104970000C90CDE901C8CDF80C900097284F7F68C6 +:10498000C7F3810121B1012908D0022932D10BE0FE +:104990002B4FDFF8B0C0CCF8007031E0284FDFF8C3 +:1049A000A4C0CCF800702BE01D4F7F68C7F3834094 +:1049B0001B4F7F68C7F3C0620AB1113000E0801C52 +:1049C000174F7F68C7F300436BB1154FFF6A07F0BD +:1049D0000F077C1C1A4FB7FBF4F74743DFF864C09E +:1049E000CCF8007005E0184F4743DFF858C0CCF80A +:1049F000007005E0124FDFF84CC0CCF8007000BF2B +:104A000000BF074F7F68C7F303151DF805600D4F02 +:104A10003F68F740DFF82CC0CCF80070BDE8FF839A +:104A200000100240FFFFC2770C00FF08FFFFF2FEFC +:104A3000000000000000000001020304060708094E +:104A400000127A009C00002000093D00032A40F279 +:104A5000308010F0030C00F0158011F8013BBCF120 +:104A6000020F624498BF11F801CB00F8013B38BF38 +:104A700011F8013BA2F1040298BF00F801CB38BF46 +:104A800000F8013B11F0030300F02580083AC0F064 +:104A9000088051F8043B083A51F804CBA0E808100C +:104AA000F5E7121D5CBF51F8043B40F8043BAFF33F +:104AB0000080D20724BF11F8013B11F801CB48BF99 +:104AC00011F8012B24BF00F8013B00F801CB48BFCF +:104AD00000F8012B704710B5203AC0F00B80B1E808 +:104AE0001850203AA0E81850B1E81850A0E8185023 +:104AF000BFF4F5AF5FEA027C24BFB1E81850A0E82C +:104B0000185044BF18C918C0BDE810405FEA827C45 +:104B100024BF51F8043B40F8043B08BF7047D2075C +:104B200028BF31F8023B48BF11F8012B28BF20F8FD +:104B3000023B48BF00F8012B704770477047704731 +:104B4000754600F02BF8AE4605006946534620F046 +:104B50000700854618B020B5FFF75CFEBDE8204091 +:104B60004FF000064FF000074FF000084FF0000B29 +:104B700021F00701AC46ACE8C009ACE8C009ACE8DC +:104B8000C009ACE8C0098D46704710B50446AFF3C4 +:104B900000802046BDE81040FBF72DBB0048704761 +:104BA0004401002001491820ABBEFEE726000200A8 +:104BB000704730B5039C062928D2DFE801F00309CD +:104BC0000F151B210025156045421D60206022E065 +:104BD000106045421D60002525601CE01060002526 +:104BE0001D604542256016E00025156018604542AD +:104BF000256010E0454215601860002525600AE038 +:104C00004542156000251D60206004E00025156008 +:104C10001D60256000BF00BF30BD491058BFC1F105 +:104C200040415B1058BFC3F140438B42EFF300801B +:104C3000704700004FEA41034FEA5353A3F58063E6 +:104C4000D3F11E03C8BFD3F1210C0CDD4FF000429D +:104C500042EAC12242EA505232FA03FC8CEAE17C79 +:104C6000ACEBE1707047102BC4BF0020704703F518 +:104C7000787CBCF1FF3F04D06FF0004282EA210053 +:104C8000704770B500F002F9499224800020704707 +:104C9000F2E710F0004248BF4042B0FA80F310FA49 +:104CA00003F10AD0C3F11D0303F580634FEA4150BD +:104CB00002EB035202EBD12170474FF00000704726 +:104CC00051EA030C17D41CF5801F58BFBCF5801F98 +:104CD00000F10680994218BF704708BF90427047A4 +:104CE00007D711F5801F58BF13F5801F19D49942BB +:104CF0007047894270471CF5801F08D5BCF5801F9E +:104D0000F7D58B4218BF704708BF824270474FF4F7 +:104D1000001C1CEB410F38BF1CEB430F01D28B4230 +:104D2000704770B500F0B2F8922449004FF000517E +:104D30004FF08053FFF771BFDFF848C170B51CEA30 +:104D4000111E1EBF1CEA13159EEA0C0F95EA0C0FEC +:104D500000F06F8081EA030423EA4C134EEAD47E0C +:104D600021EA4C1141F4801143F48013AE44A1FBBD +:104D7000024CA0FB0365AEF17F7E361955EB0C05A6 +:104D8000A1FB034C4CF10003A0FB021C16EB0C062C +:104D9000654153F10003094218BF46F0010613F4C0 +:104DA000007F0BD14FEA03314FEA0530340341EA6B +:104DB000155140EA16506FF003020AE04FEAC32192 +:104DC0004FEAC520F40241EA555140EA56506FF0CF +:104DD000020202EB2E4201EB025585EACE710AD0A7 +:104DE0005FEA440C18BF24F0004450F1000041F188 +:104DF000000120EAD47040F2FE7C624500D270BD12 +:104E0000A84214BF4FF080444FF04044002E08BF2A +:104E10000024BEF1806FA8BFA1F1C041BDE8704081 +:104E200080F282804FF0000001F1C04101F00041AA +:104E300070479EEA0C0F0CEA131518BF95EA0C0F89 +:104E400006D04FF0000081EA030E0EF0004170BD65 +:104E500000F01CF88900013E00F007B800F009B826 +:104E60004FEA430C5FEA5C5C08D081EA030100F082 +:104E70005BB84FEA410C5FEA5C5CF6D14FF0000092 +:104E8000014970470000FF070000F87F0EF1020E95 +:104E90002EF0030E5EF8046B364205D4012A43EB74 +:104EA000030515F5001F12D8012841EB010C1CF574 +:104EB000001F0CD80ED14FEAD17C15F5001F0CEB6A +:104EC0004C0C0CF1020C08BF4CEBD37C04E04FF00F +:104ED000080C01E04FEAD37C0CEB4C0526FA05F6F2 +:104EE00006F00706B6F1040C06D20EEB860CBDE800 +:104EF00070404CF0010C6047DFE80CF0090B020237 +:104F00004FF000414FF00000A1F5002170BD19469F +:104F10001046012851EB010418BFD4F5001484BFDA +:104F2000002001F0004170BD0808A0F500114FEA13 +:104F30003101704743004FEAD30C4FEA3C0C434029 +:104F40001FBF40070CF1605113F0FE4F70471CF07B +:104F5000006F03D100200CF0004170470CF00043BB +:104F600043EA507010B540EACC0000F0C4F800BF2E +:104F7000000000924FEA0001FFF7D6BF4FF000415A +:104F80004FF00000A1F500217047000041000B0E1A +:104F9000D3F19E0208D950F400034FEA032323FA09 +:104FA00002F048BF4042704710B500F0A4F800BFBF +:104FB00049922480002070476FF0004282EA20006E +:104FC0007047000010F0004148BF4042B0FA80F343 +:104FD00010FA03F2C3F19D030BD051EAC35101EB68 +:104FE0001220530638BF704700F1010008BF20F0BF +:104FF000010070474FF47F0C1CEAD0121EBF1CEA60 +:10500000D11392EA0C0F93EA0C0F00F0478090EA5C +:10501000010F48BF42F480724FF0004C4CEA002070 +:105020004CEA012102EB0302A0FB0113A2F50002EE +:10503000002918BF43F001035B0028BF4FEA330388 +:1050400042EB22425FEA132C4CEBC2502EBFBCEB6A +:10505000436FB2F57C0F70474FEA036CBCF1004F11 +:1050600008BF20F00100B2F57C0F38BF70470BD5A8 +:1050700082F0FF0212F5803FC8BF704700F1C040C8 +:10508000D8BF00F00040704700F5000C5FEA4C0C00 +:1050900048BF7047B0F1C04000F073B890EA010F0C +:1050A0000CEAD11348BF42F48072624538BF6345B1 +:1050B00004D280EA010000F00040704710B500F013 +:1050C0001AF800BF8900013E00F007B800F009B8E7 +:1050D0005FEA410C5FEA1C6C08D080EA010000F036 +:1050E00050B85FEA400C5FEA1C6CF6D14FF000400C +:1050F000A0F5800070470EF1020E2EF0030E5EF850 +:10510000044B244204D44FEA4102B2F17F4F11D83C +:105110004FEA4003B3F17F4F0CD80ED14FEAD07C59 +:10512000B2F17F4F0CEB4C0C0CF1020C08BF4CEBB6 +:10513000D17C04E04FF0080C01E04FEAD17C0CEB8D +:105140004C0324FA03F404F00704B4F1040C06D26F +:105150000EEB840CBDE810404CF0010C6047DFE81A +:105160000CF0070802024FF00040A0F5800010BDCF +:105170000846420018BFD2F1807288BF00F000409C +:1051800010BDFF2141EAD050C0057047CA08000099 +:10519000120200001CE00200C20B0000050000002B +:1051A000389300007F6ABC4000001F003F005E0093 +:1051B00075009400B400D300F2000A0129014801EF +:1051C000670187019E01BD01DD01F4011302330275 +:1051D0004A0269028802A002BF02D702F6020D034A +:1051E0002D0344035B0363036B0373037B0382039D +:1051F0008A0392039A03A203AA03AA03B103B90381 +:10520000B903C103C903C903D103D103D103D8032F +:10521000D803D803E003E003E003E003E003E00386 +:10522000E003E003E003E003E003E003E003D8036E +:10523000D803D803D103D103D103C903C903C103E0 +:10524000B903B903B103AA03AA03A2039A03920301 +:105250008A0382037B0373036B0363035B036303B0 +:105260006B0373037B0382038A0392039A03A203F3 +:10527000AA03AA03B103B903B903C103C903C9034C +:10528000D103D103D103D803D803D803E003E0034B +:10529000E003E003E003E003E003E003E003E003F6 +:1052A000E003E003E003D803D803D803D103D1031C +:1052B000D103C903C903C103B903B903B103AA03E5 +:1052C000AA03A2039A0392038A0382037B03730354 +:1052D0006B0363035B0344032D030D03F602D70244 +:1052E000BF02A002880269024A0233021302F401DB +:1052F000DD01BD019E0187016701480129010A0105 +:10530000F200D300B400940075005E003F001F005F +:105310000000E1FFC1FFA2FF8BFF6CFF4CFF2DFFE0 +:105320000EFFF6FED7FEB8FE99FE79FE62FE43FE42 +:1053300023FE0CFEEDFDCDFDB6FD97FD78FD60FD75 +:1053400041FD29FD0AFDF3FCD3FCBCFCA5FC9DFC42 +:1053500095FC8DFC85FC7EFC76FC6EFC66FC5EFCA0 +:1053600056FC56FC4FFC47FC47FC3FFC37FC37FC27 +:105370002FFC2FFC2FFC28FC28FC28FC20FC20FC08 +:1053800020FC20FC20FC20FC20FC20FC20FC20FC3D +:1053900020FC20FC20FC28FC28FC28FC2FFC2FFCF7 +:1053A0002FFC37FC37FC3FFC47FC47FC4FFC56FC0E +:1053B00056FC5EFC66FC6EFC76FC7EFC85FC8DFC7F +:1053C00095FC9DFCA5FC9DFC95FC8DFC85FC7EFC64 +:1053D00076FC6EFC66FC5EFC56FC56FC4FFC47FC03 +:1053E00047FC3FFC37FC37FC2FFC2FFC2FFC28FC34 +:1053F00028FC28FC20FC20FC20FC20FC20FC20FCBD +:1054000020FC20FC20FC20FC20FC20FC20FC28FCB4 +:1054100028FC28FC2FFC2FFC2FFC37FC37FC3FFC22 +:1054200047FC47FC4FFC56FC56FC5EFC66FC6EFCE1 +:1054300076FC7EFC85FC8DFC95FC9DFCA5FCBCFCF3 +:10544000D3FCF3FC0AFD29FD41FD60FD78FD97FDCD +:10545000B6FDCDFDEDFD0CFE23FE43FE62FE79FEA2 +:1054600099FEB8FED7FEF6FE0EFF2DFF4CFF6CFF37 +:105470008BFFA2FFC1FFE1FF060204030001050646 +:105480007A14000000000E009919000001000000CD +:1054900000004B00B454000800000020A0000000F1 +:1054A000A401000854550008A000002008090000CD +:1054B000C00100080000000000000000409C000047 +:1054C00000000000000000000000000000000000DC +:1054D000C800000000000000000000000000000004 +:1054E0000000000000000000000000000000780044 +:1054F000F0000000000000000000000000000000BC +:10550000000000000000000000000000000000009B +:10551000000000000000000000000000D0070000B4 +:10552000000000000000000000000000000000007B +:10553000000000000000000000000000010000006A +:105540002F0A000000000000E80300000000000037 +:0455500000A24A0467 +:040000050800016985 +:00000001FF diff --git a/HUGS/Objects/HUGS.htm b/HUGS/Objects/HUGS.htm new file mode 100644 index 00000000..7aa3d990 --- /dev/null +++ b/HUGS/Objects/HUGS.htm @@ -0,0 +1,1842 @@ + + +Static Call Graph - [.\Objects\HUGS.axf] +
+

Static Call Graph for image .\Objects\HUGS.axf


+

#<CALLGRAPH># ARM Linker, 5060960: Last Updated: Tue Jun 15 20:05:43 2021 +

+

Maximum Stack Usage = 160 bytes + Unknown(Cycles, Untraceable Function Pointers)

+Call chain for Maximum Stack Depth:

+DMA_Channel1_2_IRQHandler ⇒ UpdateUSARTSteerInput ⇒ CheckUSARTSteerInput ⇒ SendHUGSCmd ⇒ SendBuffer ⇒ usart_flag_get +

+

+Mutually Recursive functions +

  • ADC_CMP_IRQHandler   ⇒   ADC_CMP_IRQHandler
    + +

    +

    +Function Pointers +

      +
    • ADC_CMP_IRQHandler from startup_gd32f1x0.o(.text) referenced from startup_gd32f1x0.o(RESET) +
    • BusFault_Handler from it.o(.text) referenced from startup_gd32f1x0.o(RESET) +
    • CAN0_RX0_IRQHandler from startup_gd32f1x0.o(.text) referenced from startup_gd32f1x0.o(RESET) +
    • CAN0_RX1_IRQHandler from startup_gd32f1x0.o(.text) referenced from startup_gd32f1x0.o(RESET) +
    • CAN0_SCE_IRQHandler from startup_gd32f1x0.o(.text) referenced from startup_gd32f1x0.o(RESET) +
    • CAN0_TX_IRQHandler from startup_gd32f1x0.o(.text) referenced from startup_gd32f1x0.o(RESET) +
    • CAN1_RX0_IRQHandler from startup_gd32f1x0.o(.text) referenced from startup_gd32f1x0.o(RESET) +
    • CAN1_RX1_IRQHandler from startup_gd32f1x0.o(.text) referenced from startup_gd32f1x0.o(RESET) +
    • CAN1_SCE_IRQHandler from startup_gd32f1x0.o(.text) referenced from startup_gd32f1x0.o(RESET) +
    • CAN1_TX_IRQHandler from startup_gd32f1x0.o(.text) referenced from startup_gd32f1x0.o(RESET) +
    • CEC_IRQHandler from startup_gd32f1x0.o(.text) referenced from startup_gd32f1x0.o(RESET) +
    • DMA_Channel0_IRQHandler from it.o(.text) referenced from startup_gd32f1x0.o(RESET) +
    • DMA_Channel1_2_IRQHandler from it.o(.text) referenced from startup_gd32f1x0.o(RESET) +
    • DMA_Channel3_4_IRQHandler from it.o(.text) referenced from startup_gd32f1x0.o(RESET) +
    • DMA_Channel5_6_IRQHandler from startup_gd32f1x0.o(.text) referenced from startup_gd32f1x0.o(RESET) +
    • DebugMon_Handler from it.o(.text) referenced from startup_gd32f1x0.o(RESET) +
    • EXTI0_1_IRQHandler from startup_gd32f1x0.o(.text) referenced from startup_gd32f1x0.o(RESET) +
    • EXTI2_3_IRQHandler from startup_gd32f1x0.o(.text) referenced from startup_gd32f1x0.o(RESET) +
    • EXTI4_15_IRQHandler from startup_gd32f1x0.o(.text) referenced from startup_gd32f1x0.o(RESET) +
    • FMC_IRQHandler from startup_gd32f1x0.o(.text) referenced from startup_gd32f1x0.o(RESET) +
    • HardFault_Handler from it.o(.text) referenced from startup_gd32f1x0.o(RESET) +
    • I2C0_ER_IRQHandler from startup_gd32f1x0.o(.text) referenced from startup_gd32f1x0.o(RESET) +
    • I2C0_EV_IRQHandler from startup_gd32f1x0.o(.text) referenced from startup_gd32f1x0.o(RESET) +
    • I2C1_ER_IRQHandler from startup_gd32f1x0.o(.text) referenced from startup_gd32f1x0.o(RESET) +
    • I2C1_EV_IRQHandler from startup_gd32f1x0.o(.text) referenced from startup_gd32f1x0.o(RESET) +
    • I2C2_ER_IRQHandler from startup_gd32f1x0.o(.text) referenced from startup_gd32f1x0.o(RESET) +
    • I2C2_EV_IRQHandler from startup_gd32f1x0.o(.text) referenced from startup_gd32f1x0.o(RESET) +
    • LVD_IRQHandler from startup_gd32f1x0.o(.text) referenced from startup_gd32f1x0.o(RESET) +
    • MemManage_Handler from it.o(.text) referenced from startup_gd32f1x0.o(RESET) +
    • NMI_Handler from it.o(.text) referenced from startup_gd32f1x0.o(RESET) +
    • PendSV_Handler from it.o(.text) referenced from startup_gd32f1x0.o(RESET) +
    • RCU_IRQHandler from startup_gd32f1x0.o(.text) referenced from startup_gd32f1x0.o(RESET) +
    • RTC_IRQHandler from startup_gd32f1x0.o(.text) referenced from startup_gd32f1x0.o(RESET) +
    • Reset_Handler from startup_gd32f1x0.o(.text) referenced from startup_gd32f1x0.o(RESET) +
    • SLCD_IRQHandler from startup_gd32f1x0.o(.text) referenced from startup_gd32f1x0.o(RESET) +
    • SPI0_IRQHandler from startup_gd32f1x0.o(.text) referenced from startup_gd32f1x0.o(RESET) +
    • SPI1_IRQHandler from startup_gd32f1x0.o(.text) referenced from startup_gd32f1x0.o(RESET) +
    • SPI2_IRQHandler from startup_gd32f1x0.o(.text) referenced from startup_gd32f1x0.o(RESET) +
    • SVC_Handler from it.o(.text) referenced from startup_gd32f1x0.o(RESET) +
    • SysTick_Handler from it.o(.text) referenced from startup_gd32f1x0.o(RESET) +
    • SystemInit from system_gd32f1x0.o(.text) referenced from startup_gd32f1x0.o(.text) +
    • TIMER0_BRK_UP_TRG_COM_IRQHandler from it.o(.text) referenced from startup_gd32f1x0.o(RESET) +
    • TIMER0_Channel_IRQHandler from startup_gd32f1x0.o(.text) referenced from startup_gd32f1x0.o(RESET) +
    • TIMER13_IRQHandler from it.o(.text) referenced from startup_gd32f1x0.o(RESET) +
    • TIMER14_IRQHandler from startup_gd32f1x0.o(.text) referenced from startup_gd32f1x0.o(RESET) +
    • TIMER15_IRQHandler from startup_gd32f1x0.o(.text) referenced from startup_gd32f1x0.o(RESET) +
    • TIMER16_IRQHandler from startup_gd32f1x0.o(.text) referenced from startup_gd32f1x0.o(RESET) +
    • TIMER1_IRQHandler from startup_gd32f1x0.o(.text) referenced from startup_gd32f1x0.o(RESET) +
    • TIMER2_IRQHandler from startup_gd32f1x0.o(.text) referenced from startup_gd32f1x0.o(RESET) +
    • TIMER5_DAC_IRQHandler from startup_gd32f1x0.o(.text) referenced from startup_gd32f1x0.o(RESET) +
    • TSI_IRQHandler from startup_gd32f1x0.o(.text) referenced from startup_gd32f1x0.o(RESET) +
    • USART0_IRQHandler from startup_gd32f1x0.o(.text) referenced from startup_gd32f1x0.o(RESET) +
    • USART1_IRQHandler from startup_gd32f1x0.o(.text) referenced from startup_gd32f1x0.o(RESET) +
    • USBDWakeUp_IRQHandler from startup_gd32f1x0.o(.text) referenced from startup_gd32f1x0.o(RESET) +
    • USBD_HP_IRQHandler from startup_gd32f1x0.o(.text) referenced from startup_gd32f1x0.o(RESET) +
    • USBD_LP_IRQHandler from startup_gd32f1x0.o(.text) referenced from startup_gd32f1x0.o(RESET) +
    • UsageFault_Handler from it.o(.text) referenced from startup_gd32f1x0.o(RESET) +
    • WWDGT_IRQHandler from startup_gd32f1x0.o(.text) referenced from startup_gd32f1x0.o(RESET) +
    • __main from __main.o(!!!main) referenced from startup_gd32f1x0.o(.text) +
    +

    +

    +Global Symbols +

    +

    __main (Thumb, 8 bytes, Stack size 0 bytes, __main.o(!!!main)) +

    [Calls]

    • >>   __scatterload +
    • >>   __rt_entry +
    + +

    __scatterload (Thumb, 0 bytes, Stack size unknown bytes, __scatter.o(!!!scatter)) +

    [Called By]

    • >>   __main +
    + +

    __scatterload_rt2 (Thumb, 44 bytes, Stack size unknown bytes, __scatter.o(!!!scatter), UNUSED) +

    [Calls]

    • >>   __rt_entry +
    + +

    __scatterload_rt2_thumb_only (Thumb, 0 bytes, Stack size unknown bytes, __scatter.o(!!!scatter), UNUSED) + +

    __scatterload_null (Thumb, 0 bytes, Stack size unknown bytes, __scatter.o(!!!scatter), UNUSED) + +

    __scatterload_copy (Thumb, 26 bytes, Stack size unknown bytes, __scatter_copy.o(!!handler_copy), UNUSED) +

    [Calls]

    • >>   __scatterload_copy +
    +
    [Called By]
    • >>   __scatterload_copy +
    + +

    __scatterload_zeroinit (Thumb, 28 bytes, Stack size unknown bytes, __scatter_zi.o(!!handler_zi), UNUSED) + +

    __rt_lib_init (Thumb, 0 bytes, Stack size unknown bytes, libinit.o(.ARM.Collect$$libinit$$00000000)) +

    [Called By]

    • >>   __rt_entry_li +
    + +

    __rt_lib_init_alloca_1 (Thumb, 0 bytes, Stack size unknown bytes, libinit2.o(.ARM.Collect$$libinit$$0000002E)) + +

    __rt_lib_init_argv_1 (Thumb, 0 bytes, Stack size unknown bytes, libinit2.o(.ARM.Collect$$libinit$$0000002C)) + +

    __rt_lib_init_atexit_1 (Thumb, 0 bytes, Stack size unknown bytes, libinit2.o(.ARM.Collect$$libinit$$0000001B)) + +

    __rt_lib_init_clock_1 (Thumb, 0 bytes, Stack size unknown bytes, libinit2.o(.ARM.Collect$$libinit$$00000021)) + +

    __rt_lib_init_cpp_1 (Thumb, 0 bytes, Stack size unknown bytes, libinit2.o(.ARM.Collect$$libinit$$00000032)) + +

    __rt_lib_init_exceptions_1 (Thumb, 0 bytes, Stack size unknown bytes, libinit2.o(.ARM.Collect$$libinit$$00000030)) + +

    __rt_lib_init_fp_1 (Thumb, 0 bytes, Stack size unknown bytes, libinit2.o(.ARM.Collect$$libinit$$00000002)) + +

    __rt_lib_init_fp_trap_1 (Thumb, 0 bytes, Stack size unknown bytes, libinit2.o(.ARM.Collect$$libinit$$0000001F)) + +

    __rt_lib_init_getenv_1 (Thumb, 0 bytes, Stack size unknown bytes, libinit2.o(.ARM.Collect$$libinit$$00000023)) + +

    __rt_lib_init_heap_1 (Thumb, 0 bytes, Stack size unknown bytes, libinit2.o(.ARM.Collect$$libinit$$0000000A)) + +

    __rt_lib_init_lc_collate_1 (Thumb, 0 bytes, Stack size unknown bytes, libinit2.o(.ARM.Collect$$libinit$$00000011)) + +

    __rt_lib_init_lc_ctype_1 (Thumb, 0 bytes, Stack size unknown bytes, libinit2.o(.ARM.Collect$$libinit$$00000013)) + +

    __rt_lib_init_lc_monetary_1 (Thumb, 0 bytes, Stack size unknown bytes, libinit2.o(.ARM.Collect$$libinit$$00000015)) + +

    __rt_lib_init_lc_numeric_1 (Thumb, 0 bytes, Stack size unknown bytes, libinit2.o(.ARM.Collect$$libinit$$00000017)) + +

    __rt_lib_init_lc_time_1 (Thumb, 0 bytes, Stack size unknown bytes, libinit2.o(.ARM.Collect$$libinit$$00000019)) + +

    __rt_lib_init_preinit_1 (Thumb, 0 bytes, Stack size unknown bytes, libinit2.o(.ARM.Collect$$libinit$$00000004)) + +

    __rt_lib_init_rand_1 (Thumb, 0 bytes, Stack size unknown bytes, libinit2.o(.ARM.Collect$$libinit$$0000000E)) + +

    __rt_lib_init_return (Thumb, 0 bytes, Stack size unknown bytes, libinit2.o(.ARM.Collect$$libinit$$00000033)) + +

    __rt_lib_init_signal_1 (Thumb, 0 bytes, Stack size unknown bytes, libinit2.o(.ARM.Collect$$libinit$$0000001D)) + +

    __rt_lib_init_stdio_1 (Thumb, 0 bytes, Stack size unknown bytes, libinit2.o(.ARM.Collect$$libinit$$00000025)) + +

    __rt_lib_init_user_alloc_1 (Thumb, 0 bytes, Stack size unknown bytes, libinit2.o(.ARM.Collect$$libinit$$0000000C)) + +

    __rt_lib_shutdown (Thumb, 0 bytes, Stack size unknown bytes, libshutdown.o(.ARM.Collect$$libshutdown$$00000000)) +

    [Called By]

    • >>   __rt_exit_ls +
    + +

    __rt_lib_shutdown_cpp_1 (Thumb, 0 bytes, Stack size unknown bytes, libshutdown2.o(.ARM.Collect$$libshutdown$$00000004)) + +

    __rt_lib_shutdown_fini_1 (Thumb, 0 bytes, Stack size unknown bytes, libshutdown2.o(.ARM.Collect$$libshutdown$$00000002)) + +

    __rt_lib_shutdown_fp_trap_1 (Thumb, 0 bytes, Stack size unknown bytes, libshutdown2.o(.ARM.Collect$$libshutdown$$00000009)) + +

    __rt_lib_shutdown_heap_1 (Thumb, 0 bytes, Stack size unknown bytes, libshutdown2.o(.ARM.Collect$$libshutdown$$00000011)) + +

    __rt_lib_shutdown_return (Thumb, 0 bytes, Stack size unknown bytes, libshutdown2.o(.ARM.Collect$$libshutdown$$00000012)) + +

    __rt_lib_shutdown_signal_1 (Thumb, 0 bytes, Stack size unknown bytes, libshutdown2.o(.ARM.Collect$$libshutdown$$0000000C)) + +

    __rt_lib_shutdown_stdio_1 (Thumb, 0 bytes, Stack size unknown bytes, libshutdown2.o(.ARM.Collect$$libshutdown$$00000006)) + +

    __rt_lib_shutdown_user_alloc_1 (Thumb, 0 bytes, Stack size unknown bytes, libshutdown2.o(.ARM.Collect$$libshutdown$$0000000E)) + +

    __rt_entry (Thumb, 0 bytes, Stack size unknown bytes, __rtentry.o(.ARM.Collect$$rtentry$$00000000)) +

    [Called By]

    • >>   __scatterload_rt2 +
    • >>   __main +
    + +

    __rt_entry_presh_1 (Thumb, 0 bytes, Stack size unknown bytes, __rtentry2.o(.ARM.Collect$$rtentry$$00000002)) + +

    __rt_entry_sh (Thumb, 0 bytes, Stack size unknown bytes, __rtentry4.o(.ARM.Collect$$rtentry$$00000004)) +

    [Stack]

    • Max Depth = 8 + Unknown Stack Size +
    • Call Chain = __rt_entry_sh ⇒ __user_setup_stackheap +
    +
    [Calls]
    • >>   __user_setup_stackheap +
    + +

    __rt_entry_li (Thumb, 0 bytes, Stack size unknown bytes, __rtentry2.o(.ARM.Collect$$rtentry$$0000000A)) +

    [Calls]

    • >>   __rt_lib_init +
    + +

    __rt_entry_postsh_1 (Thumb, 0 bytes, Stack size unknown bytes, __rtentry2.o(.ARM.Collect$$rtentry$$00000009)) + +

    __rt_entry_main (Thumb, 0 bytes, Stack size unknown bytes, __rtentry2.o(.ARM.Collect$$rtentry$$0000000D)) +

    [Stack]

    • Max Depth = 160 + Unknown Stack Size +
    • Call Chain = __rt_entry_main ⇒ main ⇒ USART_Steer_COM_init ⇒ usart_baudrate_set ⇒ rcu_clock_freq_get +
    +
    [Calls]
    • >>   main +
    • >>   exit +
    + +

    __rt_entry_postli_1 (Thumb, 0 bytes, Stack size unknown bytes, __rtentry2.o(.ARM.Collect$$rtentry$$0000000C)) + +

    __rt_exit (Thumb, 0 bytes, Stack size unknown bytes, rtexit.o(.ARM.Collect$$rtexit$$00000000)) +

    [Called By]

    • >>   exit +
    + +

    __rt_exit_ls (Thumb, 0 bytes, Stack size unknown bytes, rtexit2.o(.ARM.Collect$$rtexit$$00000003)) +

    [Calls]

    • >>   __rt_lib_shutdown +
    + +

    __rt_exit_prels_1 (Thumb, 0 bytes, Stack size unknown bytes, rtexit2.o(.ARM.Collect$$rtexit$$00000002)) + +

    __rt_exit_exit (Thumb, 0 bytes, Stack size unknown bytes, rtexit2.o(.ARM.Collect$$rtexit$$00000004)) +

    [Calls]

    • >>   _sys_exit +
    + +

    ShutOff (Thumb, 92 bytes, Stack size 0 bytes, main.o(.text)) +

    [Stack]

    • Max Depth = 80
    • Call Chain = ShutOff ⇒ SendHUGSReply ⇒ SendBuffer ⇒ usart_flag_get +
    +
    [Calls]
    • >>   usart_deinit +
    • >>   gpio_bit_write +
    • >>   fwdgt_counter_reload +
    • >>   SetPWM +
    • >>   SetEnable +
    • >>   SendHUGSReply +
    • >>   SendHUGSCmd +
    • >>   Delay +
    +
    [Called By]
    • >>   main +
    + +

    ShowBatteryState (Thumb, 78 bytes, Stack size 8 bytes, main.o(.text)) +

    [Stack]

    • Max Depth = 8
    • Call Chain = ShowBatteryState +
    +
    [Calls]
    • >>   gpio_bit_write +
    +
    [Called By]
    • >>   main +
    + +

    main (Thumb, 382 bytes, Stack size 0 bytes, main.o(.text)) +

    [Stack]

    • Max Depth = 160
    • Call Chain = main ⇒ USART_Steer_COM_init ⇒ usart_baudrate_set ⇒ rcu_clock_freq_get +
    +
    [Calls]
    • >>   gpio_input_bit_get +
    • >>   gpio_bit_write +
    • >>   fwdgt_counter_reload +
    • >>   Watchdog_init +
    • >>   USART_Steer_COM_init +
    • >>   USART_HUGS_init +
    • >>   TimeoutTimer_init +
    • >>   SystemCoreClockUpdate +
    • >>   PWM_init +
    • >>   Interrupt_init +
    • >>   GPIO_init +
    • >>   Delay +
    • >>   ADC_init +
    • >>   ShowBatteryState +
    • >>   ShutOff +
    +
    [Called By]
    • >>   __rt_entry_main +
    + +

    resetInactivityTimer (Thumb, 8 bytes, Stack size 0 bytes, main.o(.text)) +

    [Called By]

    • >>   SetPower +
    • >>   SetSpeed +
    + +

    SetEnable (Thumb, 20 bytes, Stack size 0 bytes, bldc.o(.text)) +

    [Called By]

    • >>   CheckUSARTHUGSInput +
    • >>   CheckUSARTSteerInput +
    • >>   ShutOff +
    + +

    abs16 (Thumb, 10 bytes, Stack size 0 bytes, bldc.o(.text)) +

    [Called By]

    • >>   CheckUSARTSteerInput +
    • >>   SetPower +
    • >>   SetSpeed +
    + +

    SetSpeed (Thumb, 172 bytes, Stack size 8 bytes, bldc.o(.text)) +

    [Stack]

    • Max Depth = 8
    • Call Chain = SetSpeed +
    +
    [Calls]
    • >>   abs16 +
    • >>   resetInactivityTimer +
    +
    [Called By]
    • >>   CheckUSARTHUGSInput +
    • >>   CheckUSARTSteerInput +
    + +

    SetPWM (Thumb, 30 bytes, Stack size 0 bytes, bldc.o(.text)) +

    [Called By]

    • >>   CalculateBLDC +
    • >>   SetPower +
    • >>   ShutOff +
    + +

    SetPower (Thumb, 46 bytes, Stack size 8 bytes, bldc.o(.text)) +

    [Stack]

    • Max Depth = 8
    • Call Chain = SetPower +
    +
    [Calls]
    • >>   abs16 +
    • >>   SetPWM +
    • >>   resetInactivityTimer +
    +
    [Called By]
    • >>   CheckUSARTHUGSInput +
    • >>   CheckUSARTSteerInput +
    • >>   TIMER13_IRQHandler +
    + +

    GetPWM (Thumb, 8 bytes, Stack size 0 bytes, bldc.o(.text)) +

    [Called By]

    • >>   SendHUGSReply +
    + +

    GetSpeed (Thumb, 8 bytes, Stack size 0 bytes, bldc.o(.text), UNUSED) + +

    CalculateSpeed (Thumb, 64 bytes, Stack size 0 bytes, bldc.o(.text)) +

    [Called By]

    • >>   TIMER13_IRQHandler +
    + +

    GetPosition (Thumb, 26 bytes, Stack size 16 bytes, bldc.o(.text)) +

    [Stack]

    • Max Depth = 32
    • Call Chain = GetPosition ⇒ __aeabi_fmul +
    +
    [Calls]
    • >>   __aeabi_fmul +
    • >>   __aeabi_i2f +
    • >>   __aeabi_f2iz +
    +
    [Called By]
    • >>   SendHUGSReply +
    + +

    setPhaseAngle (Thumb, 112 bytes, Stack size 0 bytes, bldc.o(.text)) +

    [Called By]

    • >>   CalculateBLDC +
    + +

    abs32 (Thumb, 8 bytes, Stack size 0 bytes, bldc.o(.text)) +

    [Called By]

    • >>   runPID +
    + +

    runPID (Thumb, 194 bytes, Stack size 4 bytes, bldc.o(.text)) +

    [Stack]

    • Max Depth = 4
    • Call Chain = runPID +
    +
    [Calls]
    • >>   abs32 +
    +
    [Called By]
    • >>   CalculateBLDC +
    + +

    getTransitionAngle (Thumb, 46 bytes, Stack size 0 bytes, bldc.o(.text)) +

    [Called By]

    • >>   CalculateBLDC +
    + +

    hallToPos (Thumb, 56 bytes, Stack size 24 bytes, bldc.o(.text)) +

    [Stack]

    • Max Depth = 24
    • Call Chain = hallToPos +
    +
    [Calls]
    • >>   gpio_input_bit_get +
    +
    [Called By]
    • >>   CalculateBLDC +
    + +

    CalculateBLDC (Thumb, 1150 bytes, Stack size 32 bytes, bldc.o(.text)) +

    [Stack]

    • Max Depth = 64
    • Call Chain = CalculateBLDC ⇒ __aeabi_cdcmple +
    +
    [Calls]
    • >>   timer_channel_output_pulse_value_config +
    • >>   timer_automatic_output_enable +
    • >>   timer_automatic_output_disable +
    • >>   blockPWM +
    • >>   hallToPos +
    • >>   getTransitionAngle +
    • >>   runPID +
    • >>   setPhaseAngle +
    • >>   gpio_bit_write +
    • >>   SetPWM +
    • >>   __aeabi_cdcmple +
    • >>   __aeabi_i2d +
    +
    [Called By]
    • >>   DMA_Channel0_IRQHandler +
    + +

    Interrupt_init (Thumb, 12 bytes, Stack size 8 bytes, setup.o(.text)) +

    [Stack]

    • Max Depth = 8
    • Call Chain = Interrupt_init +
    +
    [Calls]
    • >>   nvic_priority_group_set +
    +
    [Called By]
    • >>   main +
    + +

    Watchdog_init (Thumb, 54 bytes, Stack size 8 bytes, setup.o(.text)) +

    [Stack]

    • Max Depth = 20
    • Call Chain = Watchdog_init ⇒ fwdgt_config +
    +
    [Calls]
    • >>   rcu_flag_get +
    • >>   rcu_all_reset_flag_clear +
    • >>   fwdgt_window_value_config +
    • >>   fwdgt_enable +
    • >>   fwdgt_config +
    +
    [Called By]
    • >>   main +
    + +

    TimeoutTimer_init (Thumb, 80 bytes, Stack size 8 bytes, setup.o(.text)) +

    [Stack]

    • Max Depth = 28
    • Call Chain = TimeoutTimer_init ⇒ nvic_irq_enable +
    +
    [Calls]
    • >>   timer_interrupt_enable +
    • >>   timer_init +
    • >>   timer_enable +
    • >>   timer_deinit +
    • >>   timer_auto_reload_shadow_disable +
    • >>   rcu_periph_clock_enable +
    • >>   nvic_irq_enable +
    +
    [Called By]
    • >>   main +
    + +

    GPIO_init (Thumb, 836 bytes, Stack size 8 bytes, setup.o(.text)) +

    [Stack]

    • Max Depth = 28
    • Call Chain = GPIO_init ⇒ gpio_output_options_set +
    +
    [Calls]
    • >>   rcu_periph_clock_enable +
    • >>   gpio_output_options_set +
    • >>   gpio_mode_set +
    • >>   gpio_af_set +
    +
    [Called By]
    • >>   main +
    + +

    PWM_init (Thumb, 388 bytes, Stack size 8 bytes, setup.o(.text)) +

    [Stack]

    • Max Depth = 28
    • Call Chain = PWM_init ⇒ nvic_irq_enable +
    +
    [Calls]
    • >>   timer_interrupt_enable +
    • >>   timer_init +
    • >>   timer_enable +
    • >>   timer_disable +
    • >>   timer_deinit +
    • >>   timer_channel_output_state_config +
    • >>   timer_channel_output_shadow_config +
    • >>   timer_channel_output_mode_config +
    • >>   timer_channel_output_fast_config +
    • >>   timer_channel_output_config +
    • >>   timer_channel_complementary_output_state_config +
    • >>   timer_break_config +
    • >>   timer_auto_reload_shadow_disable +
    • >>   rcu_periph_clock_enable +
    • >>   nvic_irq_enable +
    • >>   timer_channel_output_pulse_value_config +
    +
    [Called By]
    • >>   main +
    + +

    ADC_init (Thumb, 226 bytes, Stack size 32 bytes, setup.o(.text)) +

    [Stack]

    • Max Depth = 56
    • Call Chain = ADC_init ⇒ dma_init +
    +
    [Calls]
    • >>   rcu_periph_clock_enable +
    • >>   rcu_adc_clock_config +
    • >>   nvic_irq_enable +
    • >>   dma_transfer_number_config +
    • >>   dma_memory_to_memory_disable +
    • >>   dma_interrupt_enable +
    • >>   dma_init +
    • >>   dma_deinit +
    • >>   dma_circulation_enable +
    • >>   dma_channel_enable +
    • >>   adc_watchdog_disable +
    • >>   adc_vbat_disable +
    • >>   adc_tempsensor_vrefint_disable +
    • >>   adc_special_function_config +
    • >>   adc_regular_channel_config +
    • >>   adc_external_trigger_source_config +
    • >>   adc_external_trigger_config +
    • >>   adc_enable +
    • >>   adc_dma_mode_enable +
    • >>   adc_data_alignment_config +
    • >>   adc_channel_length_config +
    • >>   adc_calibration_enable +
    • >>   __aeabi_memcpy4 +
    +
    [Called By]
    • >>   main +
    + +

    USART_HUGS_init (Thumb, 206 bytes, Stack size 32 bytes, setup.o(.text)) +

    [Stack]

    • Max Depth = 160
    • Call Chain = USART_HUGS_init ⇒ usart_baudrate_set ⇒ rcu_clock_freq_get +
    +
    [Calls]
    • >>   usart_word_length_set +
    • >>   usart_transmit_config +
    • >>   usart_stop_bit_set +
    • >>   usart_receive_config +
    • >>   usart_parity_config +
    • >>   usart_oversample_config +
    • >>   usart_enable +
    • >>   usart_dma_receive_config +
    • >>   usart_baudrate_set +
    • >>   rcu_periph_clock_enable +
    • >>   nvic_irq_enable +
    • >>   dma_transfer_number_config +
    • >>   dma_memory_to_memory_disable +
    • >>   dma_interrupt_enable +
    • >>   dma_init +
    • >>   dma_deinit +
    • >>   dma_circulation_enable +
    • >>   dma_channel_enable +
    • >>   __aeabi_memcpy4 +
    +
    [Called By]
    • >>   main +
    + +

    USART_Steer_COM_init (Thumb, 206 bytes, Stack size 32 bytes, setup.o(.text)) +

    [Stack]

    • Max Depth = 160
    • Call Chain = USART_Steer_COM_init ⇒ usart_baudrate_set ⇒ rcu_clock_freq_get +
    +
    [Calls]
    • >>   usart_word_length_set +
    • >>   usart_transmit_config +
    • >>   usart_stop_bit_set +
    • >>   usart_receive_config +
    • >>   usart_parity_config +
    • >>   usart_oversample_config +
    • >>   usart_enable +
    • >>   usart_dma_receive_config +
    • >>   usart_baudrate_set +
    • >>   rcu_periph_clock_enable +
    • >>   nvic_irq_enable +
    • >>   dma_transfer_number_config +
    • >>   dma_memory_to_memory_disable +
    • >>   dma_interrupt_enable +
    • >>   dma_init +
    • >>   dma_deinit +
    • >>   dma_circulation_enable +
    • >>   dma_channel_enable +
    • >>   __aeabi_memcpy4 +
    +
    [Called By]
    • >>   main +
    + +

    SysTick_Handler (Thumb, 12 bytes, Stack size 0 bytes, it.o(.text)) +
    [Address Reference Count : 1]

    • startup_gd32f1x0.o(RESET) +
    +

    ResetTimeout (Thumb, 8 bytes, Stack size 0 bytes, it.o(.text)) +

    [Called By]

    • >>   CheckUSARTHUGSInput +
    • >>   CheckUSARTSteerInput +
    + +

    TIMER13_IRQHandler (Thumb, 98 bytes, Stack size 8 bytes, it.o(.text)) +

    [Stack]

    • Max Depth = 16
    • Call Chain = TIMER13_IRQHandler ⇒ SetPower +
    +
    [Calls]
    • >>   timer_interrupt_flag_clear +
    • >>   CalculateSpeed +
    • >>   SetPower +
    +
    [Address Reference Count : 1]
    • startup_gd32f1x0.o(RESET) +
    +

    TIMER0_BRK_UP_TRG_COM_IRQHandler (Thumb, 18 bytes, Stack size 8 bytes, it.o(.text)) +

    [Stack]

    • Max Depth = 8
    • Call Chain = TIMER0_BRK_UP_TRG_COM_IRQHandler +
    +
    [Calls]
    • >>   timer_interrupt_flag_clear +
    • >>   adc_software_trigger_enable +
    +
    [Address Reference Count : 1]
    • startup_gd32f1x0.o(RESET) +
    +

    DMA_Channel0_IRQHandler (Thumb, 26 bytes, Stack size 8 bytes, it.o(.text)) +

    [Stack]

    • Max Depth = 72
    • Call Chain = DMA_Channel0_IRQHandler ⇒ CalculateBLDC ⇒ __aeabi_cdcmple +
    +
    [Calls]
    • >>   dma_interrupt_flag_get +
    • >>   dma_interrupt_flag_clear +
    • >>   CalculateBLDC +
    +
    [Address Reference Count : 1]
    • startup_gd32f1x0.o(RESET) +
    +

    DMA_Channel1_2_IRQHandler (Thumb, 26 bytes, Stack size 8 bytes, it.o(.text)) +

    [Stack]

    • Max Depth = 160
    • Call Chain = DMA_Channel1_2_IRQHandler ⇒ UpdateUSARTSteerInput ⇒ CheckUSARTSteerInput ⇒ SendHUGSCmd ⇒ SendBuffer ⇒ usart_flag_get +
    +
    [Calls]
    • >>   dma_interrupt_flag_get +
    • >>   dma_interrupt_flag_clear +
    • >>   UpdateUSARTSteerInput +
    +
    [Address Reference Count : 1]
    • startup_gd32f1x0.o(RESET) +
    +

    DMA_Channel3_4_IRQHandler (Thumb, 26 bytes, Stack size 8 bytes, it.o(.text)) +

    [Stack]

    • Max Depth = 128
    • Call Chain = DMA_Channel3_4_IRQHandler ⇒ UpdateUSARTHUGSInput ⇒ CheckUSARTHUGSInput ⇒ SendHUGSReply ⇒ SendBuffer ⇒ usart_flag_get +
    +
    [Calls]
    • >>   dma_interrupt_flag_get +
    • >>   dma_interrupt_flag_clear +
    • >>   UpdateUSARTHUGSInput +
    +
    [Address Reference Count : 1]
    • startup_gd32f1x0.o(RESET) +
    +

    millis (Thumb, 6 bytes, Stack size 0 bytes, it.o(.text), UNUSED) + +

    Delay (Thumb, 20 bytes, Stack size 0 bytes, it.o(.text)) +

    [Called By]

    • >>   main +
    • >>   ShutOff +
    + +

    NMI_Handler (Thumb, 2 bytes, Stack size 0 bytes, it.o(.text)) +
    [Address Reference Count : 1]

    • startup_gd32f1x0.o(RESET) +
    +

    HardFault_Handler (Thumb, 4 bytes, Stack size 0 bytes, it.o(.text)) +
    [Address Reference Count : 1]

    • startup_gd32f1x0.o(RESET) +
    +

    MemManage_Handler (Thumb, 4 bytes, Stack size 0 bytes, it.o(.text)) +
    [Address Reference Count : 1]

    • startup_gd32f1x0.o(RESET) +
    +

    BusFault_Handler (Thumb, 4 bytes, Stack size 0 bytes, it.o(.text)) +
    [Address Reference Count : 1]

    • startup_gd32f1x0.o(RESET) +
    +

    UsageFault_Handler (Thumb, 4 bytes, Stack size 0 bytes, it.o(.text)) +
    [Address Reference Count : 1]

    • startup_gd32f1x0.o(RESET) +
    +

    SVC_Handler (Thumb, 2 bytes, Stack size 0 bytes, it.o(.text)) +
    [Address Reference Count : 1]

    • startup_gd32f1x0.o(RESET) +
    +

    DebugMon_Handler (Thumb, 2 bytes, Stack size 0 bytes, it.o(.text)) +
    [Address Reference Count : 1]

    • startup_gd32f1x0.o(RESET) +
    +

    PendSV_Handler (Thumb, 2 bytes, Stack size 0 bytes, it.o(.text)) +
    [Address Reference Count : 1]

    • startup_gd32f1x0.o(RESET) +
    +

    SendBuffer (Thumb, 50 bytes, Stack size 24 bytes, comms.o(.text)) +

    [Stack]

    • Max Depth = 32
    • Call Chain = SendBuffer ⇒ usart_flag_get +
    +
    [Calls]
    • >>   usart_flag_get +
    • >>   usart_data_transmit +
    +
    [Called By]
    • >>   CheckUSARTSteerInput +
    • >>   SendHUGSReply +
    • >>   SendHUGSCmd +
    + +

    CalcCRC (Thumb, 62 bytes, Stack size 12 bytes, comms.o(.text)) +

    [Stack]

    • Max Depth = 12
    • Call Chain = CalcCRC +
    +
    [Called By]
    • >>   CheckUSARTHUGSInput +
    • >>   CheckUSARTSteerInput +
    • >>   SendHUGSReply +
    • >>   SendHUGSCmd +
    + +

    max (Thumb, 14 bytes, Stack size 0 bytes, commssteering.o(.text)) +

    [Called By]

    • >>   CheckUSARTSteerInput +
    + +

    CheckUSARTSteerInput (Thumb, 300 bytes, Stack size 56 bytes, commssteering.o(.text)) +

    [Stack]

    • Max Depth = 128
    • Call Chain = CheckUSARTSteerInput ⇒ SendHUGSCmd ⇒ SendBuffer ⇒ usart_flag_get +
    +
    [Calls]
    • >>   SetESTOP +
    • >>   max +
    • >>   CalcCRC +
    • >>   SendBuffer +
    • >>   ResetTimeout +
    • >>   SetPower +
    • >>   SetSpeed +
    • >>   abs16 +
    • >>   SetEnable +
    • >>   SendHUGSCmd +
    • >>   __aeabi_i2f +
    • >>   __aeabi_f2d +
    • >>   __aeabi_dmul +
    • >>   __aeabi_d2iz +
    +
    [Called By]
    • >>   UpdateUSARTSteerInput +
    + +

    UpdateUSARTSteerInput (Thumb, 188 bytes, Stack size 24 bytes, commssteering.o(.text)) +

    [Stack]

    • Max Depth = 152
    • Call Chain = UpdateUSARTSteerInput ⇒ CheckUSARTSteerInput ⇒ SendHUGSCmd ⇒ SendBuffer ⇒ usart_flag_get +
    +
    [Calls]
    • >>   CheckUSARTSteerInput +
    • >>   __aeabi_memcpy +
    +
    [Called By]
    • >>   DMA_Channel1_2_IRQHandler +
    + +

    SetESTOP (Thumb, 8 bytes, Stack size 0 bytes, commshugs.o(.text)) +

    [Called By]

    • >>   CheckUSARTHUGSInput +
    • >>   CheckUSARTSteerInput +
    + +

    SendHUGSReply (Thumb, 490 bytes, Stack size 48 bytes, commshugs.o(.text)) +

    [Stack]

    • Max Depth = 80
    • Call Chain = SendHUGSReply ⇒ SendBuffer ⇒ usart_flag_get +
    +
    [Calls]
    • >>   CalcCRC +
    • >>   SendBuffer +
    • >>   GetPosition +
    • >>   GetPWM +
    +
    [Called By]
    • >>   CheckUSARTHUGSInput +
    • >>   ShutOff +
    + +

    CheckUSARTHUGSInput (Thumb, 266 bytes, Stack size 16 bytes, commshugs.o(.text)) +

    [Stack]

    • Max Depth = 96
    • Call Chain = CheckUSARTHUGSInput ⇒ SendHUGSReply ⇒ SendBuffer ⇒ usart_flag_get +
    +
    [Calls]
    • >>   SetESTOP +
    • >>   CalcCRC +
    • >>   ResetTimeout +
    • >>   SetPower +
    • >>   SetSpeed +
    • >>   SetEnable +
    • >>   SendHUGSReply +
    +
    [Called By]
    • >>   UpdateUSARTHUGSInput +
    + +

    UpdateUSARTHUGSInput (Thumb, 188 bytes, Stack size 24 bytes, commshugs.o(.text)) +

    [Stack]

    • Max Depth = 120
    • Call Chain = UpdateUSARTHUGSInput ⇒ CheckUSARTHUGSInput ⇒ SendHUGSReply ⇒ SendBuffer ⇒ usart_flag_get +
    +
    [Calls]
    • >>   CheckUSARTHUGSInput +
    • >>   __aeabi_memcpy +
    +
    [Called By]
    • >>   DMA_Channel3_4_IRQHandler +
    + +

    SendHUGSCmd (Thumb, 212 bytes, Stack size 40 bytes, commshugs.o(.text)) +

    [Stack]

    • Max Depth = 72
    • Call Chain = SendHUGSCmd ⇒ SendBuffer ⇒ usart_flag_get +
    +
    [Calls]
    • >>   CalcCRC +
    • >>   SendBuffer +
    +
    [Called By]
    • >>   CheckUSARTSteerInput +
    • >>   ShutOff +
    + +

    adc_deinit (Thumb, 20 bytes, Stack size 8 bytes, gd32f1x0_adc.o(.text), UNUSED) +

    [Calls]

    • >>   rcu_periph_reset_enable +
    • >>   rcu_periph_reset_disable +
    + +

    adc_enable (Thumb, 24 bytes, Stack size 0 bytes, gd32f1x0_adc.o(.text)) +

    [Called By]

    • >>   ADC_init +
    + +

    adc_disable (Thumb, 14 bytes, Stack size 0 bytes, gd32f1x0_adc.o(.text), UNUSED) + +

    adc_calibration_enable (Thumb, 54 bytes, Stack size 0 bytes, gd32f1x0_adc.o(.text)) +

    [Called By]

    • >>   ADC_init +
    + +

    adc_dma_mode_enable (Thumb, 14 bytes, Stack size 0 bytes, gd32f1x0_adc.o(.text)) +

    [Called By]

    • >>   ADC_init +
    + +

    adc_dma_mode_disable (Thumb, 14 bytes, Stack size 0 bytes, gd32f1x0_adc.o(.text), UNUSED) + +

    adc_tempsensor_vrefint_enable (Thumb, 14 bytes, Stack size 0 bytes, gd32f1x0_adc.o(.text), UNUSED) + +

    adc_tempsensor_vrefint_disable (Thumb, 14 bytes, Stack size 0 bytes, gd32f1x0_adc.o(.text)) +

    [Called By]

    • >>   ADC_init +
    + +

    adc_vbat_enable (Thumb, 14 bytes, Stack size 0 bytes, gd32f1x0_adc.o(.text), UNUSED) + +

    adc_vbat_disable (Thumb, 14 bytes, Stack size 0 bytes, gd32f1x0_adc.o(.text)) +

    [Called By]

    • >>   ADC_init +
    + +

    adc_discontinuous_mode_config (Thumb, 94 bytes, Stack size 0 bytes, gd32f1x0_adc.o(.text), UNUSED) + +

    adc_special_function_config (Thumb, 130 bytes, Stack size 0 bytes, gd32f1x0_adc.o(.text)) +

    [Called By]

    • >>   ADC_init +
    + +

    adc_data_alignment_config (Thumb, 30 bytes, Stack size 0 bytes, gd32f1x0_adc.o(.text)) +

    [Called By]

    • >>   ADC_init +
    + +

    adc_channel_length_config (Thumb, 88 bytes, Stack size 0 bytes, gd32f1x0_adc.o(.text)) +

    [Called By]

    • >>   ADC_init +
    + +

    adc_regular_channel_config (Thumb, 218 bytes, Stack size 16 bytes, gd32f1x0_adc.o(.text)) +

    [Stack]

    • Max Depth = 16
    • Call Chain = adc_regular_channel_config +
    +
    [Called By]
    • >>   ADC_init +
    + +

    adc_inserted_channel_config (Thumb, 146 bytes, Stack size 20 bytes, gd32f1x0_adc.o(.text), UNUSED) + +

    adc_inserted_channel_offset_config (Thumb, 42 bytes, Stack size 12 bytes, gd32f1x0_adc.o(.text), UNUSED) + +

    adc_external_trigger_config (Thumb, 88 bytes, Stack size 0 bytes, gd32f1x0_adc.o(.text)) +

    [Called By]

    • >>   ADC_init +
    + +

    adc_external_trigger_source_config (Thumb, 60 bytes, Stack size 0 bytes, gd32f1x0_adc.o(.text)) +

    [Called By]

    • >>   ADC_init +
    + +

    adc_software_trigger_enable (Thumb, 38 bytes, Stack size 0 bytes, gd32f1x0_adc.o(.text)) +

    [Called By]

    • >>   TIMER0_BRK_UP_TRG_COM_IRQHandler +
    + +

    adc_regular_data_read (Thumb, 10 bytes, Stack size 0 bytes, gd32f1x0_adc.o(.text), UNUSED) + +

    adc_inserted_data_read (Thumb, 60 bytes, Stack size 0 bytes, gd32f1x0_adc.o(.text), UNUSED) + +

    adc_flag_get (Thumb, 18 bytes, Stack size 0 bytes, gd32f1x0_adc.o(.text), UNUSED) + +

    adc_flag_clear (Thumb, 16 bytes, Stack size 0 bytes, gd32f1x0_adc.o(.text), UNUSED) + +

    adc_interrupt_flag_get (Thumb, 108 bytes, Stack size 0 bytes, gd32f1x0_adc.o(.text), UNUSED) + +

    adc_interrupt_flag_clear (Thumb, 16 bytes, Stack size 0 bytes, gd32f1x0_adc.o(.text), UNUSED) + +

    adc_interrupt_enable (Thumb, 68 bytes, Stack size 0 bytes, gd32f1x0_adc.o(.text), UNUSED) + +

    adc_interrupt_disable (Thumb, 68 bytes, Stack size 0 bytes, gd32f1x0_adc.o(.text), UNUSED) + +

    adc_watchdog_single_channel_enable (Thumb, 40 bytes, Stack size 0 bytes, gd32f1x0_adc.o(.text), UNUSED) + +

    adc_watchdog_group_channel_enable (Thumb, 92 bytes, Stack size 0 bytes, gd32f1x0_adc.o(.text), UNUSED) + +

    adc_watchdog_disable (Thumb, 18 bytes, Stack size 0 bytes, gd32f1x0_adc.o(.text)) +

    [Called By]

    • >>   ADC_init +
    + +

    adc_watchdog_threshold_config (Thumb, 12 bytes, Stack size 0 bytes, gd32f1x0_adc.o(.text), UNUSED) + +

    dma_deinit (Thumb, 88 bytes, Stack size 0 bytes, gd32f1x0_dma.o(.text)) +

    [Called By]

    • >>   USART_Steer_COM_init +
    • >>   USART_HUGS_init +
    • >>   ADC_init +
    + +

    dma_init (Thumb, 270 bytes, Stack size 24 bytes, gd32f1x0_dma.o(.text)) +

    [Stack]

    • Max Depth = 24
    • Call Chain = dma_init +
    +
    [Called By]
    • >>   USART_Steer_COM_init +
    • >>   USART_HUGS_init +
    • >>   ADC_init +
    + +

    dma_circulation_enable (Thumb, 30 bytes, Stack size 0 bytes, gd32f1x0_dma.o(.text)) +

    [Called By]

    • >>   USART_Steer_COM_init +
    • >>   USART_HUGS_init +
    • >>   ADC_init +
    + +

    dma_circulation_disable (Thumb, 30 bytes, Stack size 0 bytes, gd32f1x0_dma.o(.text), UNUSED) + +

    dma_memory_to_memory_enable (Thumb, 30 bytes, Stack size 0 bytes, gd32f1x0_dma.o(.text), UNUSED) + +

    dma_memory_to_memory_disable (Thumb, 30 bytes, Stack size 0 bytes, gd32f1x0_dma.o(.text)) +

    [Called By]

    • >>   USART_Steer_COM_init +
    • >>   USART_HUGS_init +
    • >>   ADC_init +
    + +

    dma_channel_enable (Thumb, 30 bytes, Stack size 0 bytes, gd32f1x0_dma.o(.text)) +

    [Called By]

    • >>   USART_Steer_COM_init +
    • >>   USART_HUGS_init +
    • >>   ADC_init +
    + +

    dma_channel_disable (Thumb, 30 bytes, Stack size 0 bytes, gd32f1x0_dma.o(.text), UNUSED) + +

    dma_periph_address_config (Thumb, 14 bytes, Stack size 0 bytes, gd32f1x0_dma.o(.text), UNUSED) + +

    dma_memory_address_config (Thumb, 14 bytes, Stack size 0 bytes, gd32f1x0_dma.o(.text), UNUSED) + +

    dma_transfer_number_config (Thumb, 14 bytes, Stack size 0 bytes, gd32f1x0_dma.o(.text)) +

    [Called By]

    • >>   USART_Steer_COM_init +
    • >>   USART_HUGS_init +
    • >>   ADC_init +
    + +

    dma_transfer_number_get (Thumb, 16 bytes, Stack size 0 bytes, gd32f1x0_dma.o(.text), UNUSED) + +

    dma_priority_config (Thumb, 34 bytes, Stack size 8 bytes, gd32f1x0_dma.o(.text), UNUSED) + +

    dma_memory_width_config (Thumb, 34 bytes, Stack size 8 bytes, gd32f1x0_dma.o(.text), UNUSED) + +

    dma_periph_width_config (Thumb, 34 bytes, Stack size 8 bytes, gd32f1x0_dma.o(.text), UNUSED) + +

    dma_memory_increase_enable (Thumb, 30 bytes, Stack size 0 bytes, gd32f1x0_dma.o(.text), UNUSED) + +

    dma_memory_increase_disable (Thumb, 30 bytes, Stack size 0 bytes, gd32f1x0_dma.o(.text), UNUSED) + +

    dma_periph_increase_enable (Thumb, 30 bytes, Stack size 0 bytes, gd32f1x0_dma.o(.text), UNUSED) + +

    dma_periph_increase_disable (Thumb, 30 bytes, Stack size 0 bytes, gd32f1x0_dma.o(.text), UNUSED) + +

    dma_transfer_direction_config (Thumb, 64 bytes, Stack size 8 bytes, gd32f1x0_dma.o(.text), UNUSED) + +

    dma_interrupt_flag_get (Thumb, 196 bytes, Stack size 20 bytes, gd32f1x0_dma.o(.text)) +

    [Stack]

    • Max Depth = 20
    • Call Chain = dma_interrupt_flag_get +
    +
    [Called By]
    • >>   DMA_Channel3_4_IRQHandler +
    • >>   DMA_Channel1_2_IRQHandler +
    • >>   DMA_Channel0_IRQHandler +
    + +

    dma_interrupt_flag_clear (Thumb, 18 bytes, Stack size 0 bytes, gd32f1x0_dma.o(.text)) +

    [Called By]

    • >>   DMA_Channel3_4_IRQHandler +
    • >>   DMA_Channel1_2_IRQHandler +
    • >>   DMA_Channel0_IRQHandler +
    + +

    dma_interrupt_enable (Thumb, 30 bytes, Stack size 8 bytes, gd32f1x0_dma.o(.text)) +

    [Stack]

    • Max Depth = 8
    • Call Chain = dma_interrupt_enable +
    +
    [Called By]
    • >>   USART_Steer_COM_init +
    • >>   USART_HUGS_init +
    • >>   ADC_init +
    + +

    dma_interrupt_disable (Thumb, 30 bytes, Stack size 8 bytes, gd32f1x0_dma.o(.text), UNUSED) + +

    dma_flag_get (Thumb, 26 bytes, Stack size 8 bytes, gd32f1x0_dma.o(.text), UNUSED) + +

    dma_flag_clear (Thumb, 18 bytes, Stack size 0 bytes, gd32f1x0_dma.o(.text), UNUSED) + +

    fwdgt_write_disable (Thumb, 8 bytes, Stack size 0 bytes, gd32f1x0_fwdgt.o(.text), UNUSED) + +

    fwdgt_counter_reload (Thumb, 10 bytes, Stack size 0 bytes, gd32f1x0_fwdgt.o(.text)) +

    [Called By]

    • >>   main +
    • >>   ShutOff +
    + +

    fwdgt_enable (Thumb, 10 bytes, Stack size 0 bytes, gd32f1x0_fwdgt.o(.text)) +

    [Called By]

    • >>   Watchdog_init +
    + +

    fwdgt_window_value_config (Thumb, 54 bytes, Stack size 8 bytes, gd32f1x0_fwdgt.o(.text)) +

    [Stack]

    • Max Depth = 8
    • Call Chain = fwdgt_window_value_config +
    +
    [Called By]
    • >>   Watchdog_init +
    + +

    fwdgt_config (Thumb, 94 bytes, Stack size 12 bytes, gd32f1x0_fwdgt.o(.text)) +

    [Stack]

    • Max Depth = 12
    • Call Chain = fwdgt_config +
    +
    [Called By]
    • >>   Watchdog_init +
    + +

    fwdgt_flag_get (Thumb, 18 bytes, Stack size 0 bytes, gd32f1x0_fwdgt.o(.text), UNUSED) + +

    gpio_deinit (Thumb, 140 bytes, Stack size 8 bytes, gd32f1x0_gpio.o(.text), UNUSED) +

    [Calls]

    • >>   rcu_periph_reset_enable +
    • >>   rcu_periph_reset_disable +
    + +

    gpio_mode_set (Thumb, 78 bytes, Stack size 20 bytes, gd32f1x0_gpio.o(.text)) +

    [Stack]

    • Max Depth = 20
    • Call Chain = gpio_mode_set +
    +
    [Called By]
    • >>   GPIO_init +
    + +

    gpio_output_options_set (Thumb, 66 bytes, Stack size 20 bytes, gd32f1x0_gpio.o(.text)) +

    [Stack]

    • Max Depth = 20
    • Call Chain = gpio_output_options_set +
    +
    [Called By]
    • >>   GPIO_init +
    + +

    gpio_bit_set (Thumb, 4 bytes, Stack size 0 bytes, gd32f1x0_gpio.o(.text), UNUSED) + +

    gpio_bit_reset (Thumb, 4 bytes, Stack size 0 bytes, gd32f1x0_gpio.o(.text), UNUSED) + +

    gpio_bit_write (Thumb, 10 bytes, Stack size 0 bytes, gd32f1x0_gpio.o(.text)) +

    [Called By]

    • >>   CalculateBLDC +
    • >>   main +
    • >>   ShowBatteryState +
    • >>   ShutOff +
    + +

    gpio_port_write (Thumb, 4 bytes, Stack size 0 bytes, gd32f1x0_gpio.o(.text), UNUSED) + +

    gpio_input_bit_get (Thumb, 16 bytes, Stack size 0 bytes, gd32f1x0_gpio.o(.text)) +

    [Called By]

    • >>   hallToPos +
    • >>   main +
    + +

    gpio_input_port_get (Thumb, 8 bytes, Stack size 0 bytes, gd32f1x0_gpio.o(.text), UNUSED) + +

    gpio_output_bit_get (Thumb, 16 bytes, Stack size 0 bytes, gd32f1x0_gpio.o(.text), UNUSED) + +

    gpio_output_port_get (Thumb, 8 bytes, Stack size 0 bytes, gd32f1x0_gpio.o(.text), UNUSED) + +

    gpio_af_set (Thumb, 94 bytes, Stack size 20 bytes, gd32f1x0_gpio.o(.text)) +

    [Stack]

    • Max Depth = 20
    • Call Chain = gpio_af_set +
    +
    [Called By]
    • >>   GPIO_init +
    + +

    gpio_pin_lock (Thumb, 18 bytes, Stack size 0 bytes, gd32f1x0_gpio.o(.text), UNUSED) + +

    nvic_priority_group_set (Thumb, 10 bytes, Stack size 0 bytes, gd32f1x0_misc.o(.text)) +

    [Called By]

    • >>   Interrupt_init +
    + +

    nvic_irq_enable (Thumb, 156 bytes, Stack size 20 bytes, gd32f1x0_misc.o(.text)) +

    [Stack]

    • Max Depth = 20
    • Call Chain = nvic_irq_enable +
    +
    [Called By]
    • >>   USART_Steer_COM_init +
    • >>   USART_HUGS_init +
    • >>   TimeoutTimer_init +
    • >>   PWM_init +
    • >>   ADC_init +
    + +

    nvic_irq_disable (Thumb, 18 bytes, Stack size 0 bytes, gd32f1x0_misc.o(.text), UNUSED) + +

    nvic_vector_table_set (Thumb, 14 bytes, Stack size 0 bytes, gd32f1x0_misc.o(.text), UNUSED) + +

    system_lowpower_set (Thumb, 16 bytes, Stack size 0 bytes, gd32f1x0_misc.o(.text), UNUSED) + +

    system_lowpower_reset (Thumb, 16 bytes, Stack size 0 bytes, gd32f1x0_misc.o(.text), UNUSED) + +

    systick_clksource_set (Thumb, 40 bytes, Stack size 0 bytes, gd32f1x0_misc.o(.text), UNUSED) + +

    rcu_deinit (Thumb, 112 bytes, Stack size 0 bytes, gd32f1x0_rcu.o(.text), UNUSED) + +

    rcu_periph_clock_enable (Thumb, 28 bytes, Stack size 0 bytes, gd32f1x0_rcu.o(.text)) +

    [Called By]

    • >>   USART_Steer_COM_init +
    • >>   USART_HUGS_init +
    • >>   TimeoutTimer_init +
    • >>   PWM_init +
    • >>   GPIO_init +
    • >>   ADC_init +
    + +

    rcu_periph_clock_disable (Thumb, 28 bytes, Stack size 0 bytes, gd32f1x0_rcu.o(.text), UNUSED) + +

    rcu_periph_clock_sleep_enable (Thumb, 28 bytes, Stack size 0 bytes, gd32f1x0_rcu.o(.text), UNUSED) + +

    rcu_periph_clock_sleep_disable (Thumb, 28 bytes, Stack size 0 bytes, gd32f1x0_rcu.o(.text), UNUSED) + +

    rcu_periph_reset_enable (Thumb, 28 bytes, Stack size 0 bytes, gd32f1x0_rcu.o(.text)) +

    [Called By]

    • >>   gpio_deinit +
    • >>   adc_deinit +
    • >>   timer_deinit +
    • >>   usart_deinit +
    + +

    rcu_periph_reset_disable (Thumb, 28 bytes, Stack size 0 bytes, gd32f1x0_rcu.o(.text)) +

    [Called By]

    • >>   gpio_deinit +
    • >>   adc_deinit +
    • >>   timer_deinit +
    • >>   usart_deinit +
    + +

    rcu_bkp_reset_enable (Thumb, 14 bytes, Stack size 0 bytes, gd32f1x0_rcu.o(.text), UNUSED) + +

    rcu_bkp_reset_disable (Thumb, 14 bytes, Stack size 0 bytes, gd32f1x0_rcu.o(.text), UNUSED) + +

    rcu_system_clock_source_config (Thumb, 22 bytes, Stack size 0 bytes, gd32f1x0_rcu.o(.text), UNUSED) + +

    rcu_system_clock_source_get (Thumb, 10 bytes, Stack size 0 bytes, gd32f1x0_rcu.o(.text), UNUSED) + +

    rcu_ahb_clock_config (Thumb, 22 bytes, Stack size 0 bytes, gd32f1x0_rcu.o(.text), UNUSED) + +

    rcu_apb1_clock_config (Thumb, 22 bytes, Stack size 0 bytes, gd32f1x0_rcu.o(.text), UNUSED) + +

    rcu_apb2_clock_config (Thumb, 22 bytes, Stack size 0 bytes, gd32f1x0_rcu.o(.text), UNUSED) + +

    rcu_adc_clock_config (Thumb, 148 bytes, Stack size 0 bytes, gd32f1x0_rcu.o(.text)) +

    [Called By]

    • >>   ADC_init +
    + +

    rcu_usbd_clock_config (Thumb, 22 bytes, Stack size 0 bytes, gd32f1x0_rcu.o(.text), UNUSED) + +

    rcu_ckout_config (Thumb, 24 bytes, Stack size 8 bytes, gd32f1x0_rcu.o(.text), UNUSED) + +

    rcu_pll_config (Thumb, 28 bytes, Stack size 0 bytes, gd32f1x0_rcu.o(.text), UNUSED) + +

    rcu_usart_clock_config (Thumb, 22 bytes, Stack size 0 bytes, gd32f1x0_rcu.o(.text), UNUSED) + +

    rcu_cec_clock_config (Thumb, 22 bytes, Stack size 0 bytes, gd32f1x0_rcu.o(.text), UNUSED) + +

    rcu_rtc_clock_config (Thumb, 22 bytes, Stack size 0 bytes, gd32f1x0_rcu.o(.text), UNUSED) + +

    rcu_hxtal_prediv_config (Thumb, 20 bytes, Stack size 0 bytes, gd32f1x0_rcu.o(.text), UNUSED) + +

    rcu_lxtal_drive_capability_config (Thumb, 22 bytes, Stack size 0 bytes, gd32f1x0_rcu.o(.text), UNUSED) + +

    rcu_flag_get (Thumb, 30 bytes, Stack size 0 bytes, gd32f1x0_rcu.o(.text)) +

    [Called By]

    • >>   Watchdog_init +
    • >>   rcu_osci_stab_wait +
    + +

    rcu_all_reset_flag_clear (Thumb, 14 bytes, Stack size 0 bytes, gd32f1x0_rcu.o(.text)) +

    [Called By]

    • >>   Watchdog_init +
    + +

    rcu_interrupt_flag_get (Thumb, 18 bytes, Stack size 0 bytes, gd32f1x0_rcu.o(.text), UNUSED) + +

    rcu_interrupt_flag_clear (Thumb, 12 bytes, Stack size 0 bytes, gd32f1x0_rcu.o(.text), UNUSED) + +

    rcu_interrupt_enable (Thumb, 12 bytes, Stack size 0 bytes, gd32f1x0_rcu.o(.text), UNUSED) + +

    rcu_interrupt_disable (Thumb, 12 bytes, Stack size 0 bytes, gd32f1x0_rcu.o(.text), UNUSED) + +

    rcu_osci_stab_wait (Thumb, 284 bytes, Stack size 20 bytes, gd32f1x0_rcu.o(.text), UNUSED) +

    [Calls]

    • >>   rcu_flag_get +
    + +

    rcu_osci_on (Thumb, 28 bytes, Stack size 0 bytes, gd32f1x0_rcu.o(.text), UNUSED) + +

    rcu_osci_off (Thumb, 28 bytes, Stack size 0 bytes, gd32f1x0_rcu.o(.text), UNUSED) + +

    rcu_osci_bypass_mode_enable (Thumb, 94 bytes, Stack size 0 bytes, gd32f1x0_rcu.o(.text), UNUSED) + +

    rcu_osci_bypass_mode_disable (Thumb, 94 bytes, Stack size 0 bytes, gd32f1x0_rcu.o(.text), UNUSED) + +

    rcu_hxtal_clock_monitor_enable (Thumb, 14 bytes, Stack size 0 bytes, gd32f1x0_rcu.o(.text), UNUSED) + +

    rcu_hxtal_clock_monitor_disable (Thumb, 14 bytes, Stack size 0 bytes, gd32f1x0_rcu.o(.text), UNUSED) + +

    rcu_irc8m_adjust_value_set (Thumb, 20 bytes, Stack size 0 bytes, gd32f1x0_rcu.o(.text), UNUSED) + +

    rcu_irc14m_adjust_value_set (Thumb, 20 bytes, Stack size 0 bytes, gd32f1x0_rcu.o(.text), UNUSED) + +

    rcu_voltage_key_unlock (Thumb, 28 bytes, Stack size 0 bytes, gd32f1x0_rcu.o(.text), UNUSED) + +

    rcu_deepsleep_voltage_set (Thumb, 30 bytes, Stack size 0 bytes, gd32f1x0_rcu.o(.text), UNUSED) + +

    rcu_power_down_voltage_set (Thumb, 30 bytes, Stack size 0 bytes, gd32f1x0_rcu.o(.text), UNUSED) + +

    rcu_clock_freq_get (Thumb, 690 bytes, Stack size 96 bytes, gd32f1x0_rcu.o(.text)) +

    [Stack]

    • Max Depth = 96
    • Call Chain = rcu_clock_freq_get +
    +
    [Called By]
    • >>   usart_baudrate_set +
    + +

    timer_deinit (Thumb, 210 bytes, Stack size 8 bytes, gd32f1x0_timer.o(.text)) +

    [Stack]

    • Max Depth = 8
    • Call Chain = timer_deinit +
    +
    [Calls]
    • >>   rcu_periph_reset_enable +
    • >>   rcu_periph_reset_disable +
    +
    [Called By]
    • >>   TimeoutTimer_init +
    • >>   PWM_init +
    + +

    timer_init (Thumb, 126 bytes, Stack size 0 bytes, gd32f1x0_timer.o(.text)) +

    [Called By]

    • >>   TimeoutTimer_init +
    • >>   PWM_init +
    + +

    timer_enable (Thumb, 10 bytes, Stack size 0 bytes, gd32f1x0_timer.o(.text)) +

    [Called By]

    • >>   TimeoutTimer_init +
    • >>   PWM_init +
    + +

    timer_disable (Thumb, 10 bytes, Stack size 0 bytes, gd32f1x0_timer.o(.text)) +

    [Called By]

    • >>   PWM_init +
    + +

    timer_auto_reload_shadow_enable (Thumb, 10 bytes, Stack size 0 bytes, gd32f1x0_timer.o(.text), UNUSED) + +

    timer_auto_reload_shadow_disable (Thumb, 10 bytes, Stack size 0 bytes, gd32f1x0_timer.o(.text)) +

    [Called By]

    • >>   TimeoutTimer_init +
    • >>   PWM_init +
    + +

    timer_update_event_enable (Thumb, 10 bytes, Stack size 0 bytes, gd32f1x0_timer.o(.text), UNUSED) + +

    timer_update_event_disable (Thumb, 10 bytes, Stack size 0 bytes, gd32f1x0_timer.o(.text), UNUSED) + +

    timer_counter_alignment (Thumb, 16 bytes, Stack size 0 bytes, gd32f1x0_timer.o(.text), UNUSED) + +

    timer_counter_up_direction (Thumb, 14 bytes, Stack size 0 bytes, gd32f1x0_timer.o(.text), UNUSED) + +

    timer_counter_down_direction (Thumb, 18 bytes, Stack size 0 bytes, gd32f1x0_timer.o(.text), UNUSED) + +

    timer_prescaler_config (Thumb, 14 bytes, Stack size 0 bytes, gd32f1x0_timer.o(.text), UNUSED) + +

    timer_repetition_value_config (Thumb, 4 bytes, Stack size 0 bytes, gd32f1x0_timer.o(.text), UNUSED) + +

    timer_autoreload_value_config (Thumb, 4 bytes, Stack size 0 bytes, gd32f1x0_timer.o(.text), UNUSED) + +

    timer_counter_value_config (Thumb, 4 bytes, Stack size 0 bytes, gd32f1x0_timer.o(.text), UNUSED) + +

    timer_counter_read (Thumb, 8 bytes, Stack size 0 bytes, gd32f1x0_timer.o(.text), UNUSED) + +

    timer_prescaler_read (Thumb, 10 bytes, Stack size 0 bytes, gd32f1x0_timer.o(.text), UNUSED) + +

    timer_single_pulse_mode_config (Thumb, 26 bytes, Stack size 0 bytes, gd32f1x0_timer.o(.text), UNUSED) + +

    timer_update_source_config (Thumb, 26 bytes, Stack size 0 bytes, gd32f1x0_timer.o(.text), UNUSED) + +

    timer_interrupt_enable (Thumb, 8 bytes, Stack size 0 bytes, gd32f1x0_timer.o(.text)) +

    [Called By]

    • >>   TimeoutTimer_init +
    • >>   PWM_init +
    + +

    timer_interrupt_disable (Thumb, 8 bytes, Stack size 0 bytes, gd32f1x0_timer.o(.text), UNUSED) + +

    timer_interrupt_flag_get (Thumb, 32 bytes, Stack size 8 bytes, gd32f1x0_timer.o(.text), UNUSED) + +

    timer_interrupt_flag_clear (Thumb, 8 bytes, Stack size 0 bytes, gd32f1x0_timer.o(.text)) +

    [Called By]

    • >>   TIMER0_BRK_UP_TRG_COM_IRQHandler +
    • >>   TIMER13_IRQHandler +
    + +

    timer_flag_get (Thumb, 18 bytes, Stack size 0 bytes, gd32f1x0_timer.o(.text), UNUSED) + +

    timer_flag_clear (Thumb, 8 bytes, Stack size 0 bytes, gd32f1x0_timer.o(.text), UNUSED) + +

    timer_dma_enable (Thumb, 8 bytes, Stack size 0 bytes, gd32f1x0_timer.o(.text), UNUSED) + +

    timer_dma_disable (Thumb, 8 bytes, Stack size 0 bytes, gd32f1x0_timer.o(.text), UNUSED) + +

    timer_channel_dma_request_source_select (Thumb, 26 bytes, Stack size 0 bytes, gd32f1x0_timer.o(.text), UNUSED) + +

    timer_dma_transfer_config (Thumb, 24 bytes, Stack size 8 bytes, gd32f1x0_timer.o(.text), UNUSED) + +

    timer_event_software_generate (Thumb, 8 bytes, Stack size 0 bytes, gd32f1x0_timer.o(.text), UNUSED) + +

    timer_break_config (Thumb, 30 bytes, Stack size 0 bytes, gd32f1x0_timer.o(.text)) +

    [Called By]

    • >>   PWM_init +
    + +

    timer_break_enable (Thumb, 10 bytes, Stack size 0 bytes, gd32f1x0_timer.o(.text), UNUSED) + +

    timer_break_disable (Thumb, 8 bytes, Stack size 0 bytes, gd32f1x0_timer.o(.text), UNUSED) + +

    timer_automatic_output_enable (Thumb, 10 bytes, Stack size 0 bytes, gd32f1x0_timer.o(.text)) +

    [Called By]

    • >>   CalculateBLDC +
    + +

    timer_automatic_output_disable (Thumb, 8 bytes, Stack size 0 bytes, gd32f1x0_timer.o(.text)) +

    [Called By]

    • >>   CalculateBLDC +
    + +

    timer_primary_output_config (Thumb, 22 bytes, Stack size 0 bytes, gd32f1x0_timer.o(.text), UNUSED) + +

    timer_channel_control_shadow_config (Thumb, 22 bytes, Stack size 0 bytes, gd32f1x0_timer.o(.text), UNUSED) + +

    timer_channel_control_shadow_update_config (Thumb, 26 bytes, Stack size 0 bytes, gd32f1x0_timer.o(.text), UNUSED) + +

    timer_channel_output_config (Thumb, 472 bytes, Stack size 8 bytes, gd32f1x0_timer.o(.text)) +

    [Stack]

    • Max Depth = 8
    • Call Chain = timer_channel_output_config +
    +
    [Called By]
    • >>   PWM_init +
    + +

    timer_channel_output_mode_config (Thumb, 90 bytes, Stack size 0 bytes, gd32f1x0_timer.o(.text)) +

    [Called By]

    • >>   PWM_init +
    + +

    timer_channel_output_pulse_value_config (Thumb, 38 bytes, Stack size 0 bytes, gd32f1x0_timer.o(.text)) +

    [Called By]

    • >>   CalculateBLDC +
    • >>   PWM_init +
    + +

    timer_channel_output_shadow_config (Thumb, 90 bytes, Stack size 0 bytes, gd32f1x0_timer.o(.text)) +

    [Called By]

    • >>   PWM_init +
    + +

    timer_channel_output_fast_config (Thumb, 90 bytes, Stack size 0 bytes, gd32f1x0_timer.o(.text)) +

    [Called By]

    • >>   PWM_init +
    + +

    timer_channel_output_clear_config (Thumb, 90 bytes, Stack size 0 bytes, gd32f1x0_timer.o(.text), UNUSED) + +

    timer_channel_output_polarity_config (Thumb, 92 bytes, Stack size 0 bytes, gd32f1x0_timer.o(.text), UNUSED) + +

    timer_channel_complementary_output_polarity_config (Thumb, 70 bytes, Stack size 0 bytes, gd32f1x0_timer.o(.text), UNUSED) + +

    timer_ocpre_clear_source_config (Thumb, 26 bytes, Stack size 0 bytes, gd32f1x0_timer.o(.text), UNUSED) + +

    timer_channel_output_state_config (Thumb, 92 bytes, Stack size 0 bytes, gd32f1x0_timer.o(.text)) +

    [Called By]

    • >>   PWM_init +
    + +

    timer_channel_complementary_output_state_config (Thumb, 70 bytes, Stack size 0 bytes, gd32f1x0_timer.o(.text)) +

    [Called By]

    • >>   PWM_init +
    + +

    timer_channel_input_capture_prescaler_config (Thumb, 90 bytes, Stack size 0 bytes, gd32f1x0_timer.o(.text), UNUSED) +

    [Called By]

    • >>   timer_input_pwm_capture_config +
    • >>   timer_input_capture_config +
    + +

    timer_input_capture_config (Thumb, 332 bytes, Stack size 16 bytes, gd32f1x0_timer.o(.text), UNUSED) +

    [Calls]

    • >>   timer_channel_input_capture_prescaler_config +
    + +

    timer_channel_capture_value_register_read (Thumb, 42 bytes, Stack size 0 bytes, gd32f1x0_timer.o(.text), UNUSED) + +

    timer_input_pwm_capture_config (Thumb, 352 bytes, Stack size 24 bytes, gd32f1x0_timer.o(.text), UNUSED) +

    [Calls]

    • >>   timer_channel_input_capture_prescaler_config +
    + +

    timer_hall_mode_config (Thumb, 26 bytes, Stack size 0 bytes, gd32f1x0_timer.o(.text), UNUSED) + +

    timer_input_trigger_source_select (Thumb, 16 bytes, Stack size 0 bytes, gd32f1x0_timer.o(.text), UNUSED) +

    [Called By]

    • >>   timer_external_trigger_as_external_clock_config +
    • >>   timer_internal_trigger_as_external_clock_config +
    + +

    timer_master_output_trigger_source_select (Thumb, 16 bytes, Stack size 0 bytes, gd32f1x0_timer.o(.text), UNUSED) + +

    timer_slave_mode_select (Thumb, 16 bytes, Stack size 0 bytes, gd32f1x0_timer.o(.text), UNUSED) + +

    timer_master_slave_mode_config (Thumb, 26 bytes, Stack size 0 bytes, gd32f1x0_timer.o(.text), UNUSED) + +

    timer_external_trigger_config (Thumb, 30 bytes, Stack size 12 bytes, gd32f1x0_timer.o(.text), UNUSED) +

    [Called By]

    • >>   timer_external_clock_mode1_config +
    • >>   timer_external_clock_mode0_config +
    + +

    timer_quadrature_decoder_mode_config (Thumb, 64 bytes, Stack size 12 bytes, gd32f1x0_timer.o(.text), UNUSED) + +

    timer_internal_clock_config (Thumb, 8 bytes, Stack size 0 bytes, gd32f1x0_timer.o(.text), UNUSED) + +

    timer_internal_trigger_as_external_clock_config (Thumb, 32 bytes, Stack size 8 bytes, gd32f1x0_timer.o(.text), UNUSED) +

    [Calls]

    • >>   timer_input_trigger_source_select +
    + +

    timer_external_trigger_as_external_clock_config (Thumb, 164 bytes, Stack size 16 bytes, gd32f1x0_timer.o(.text), UNUSED) +

    [Calls]

    • >>   timer_input_trigger_source_select +
    + +

    timer_external_clock_mode0_config (Thumb, 56 bytes, Stack size 20 bytes, gd32f1x0_timer.o(.text), UNUSED) +

    [Calls]

    • >>   timer_external_trigger_config +
    + +

    timer_external_clock_mode1_config (Thumb, 32 bytes, Stack size 20 bytes, gd32f1x0_timer.o(.text), UNUSED) +

    [Calls]

    • >>   timer_external_trigger_config +
    + +

    timer_external_clock_mode1_disable (Thumb, 10 bytes, Stack size 0 bytes, gd32f1x0_timer.o(.text), UNUSED) + +

    timer_channel_remap_config (Thumb, 6 bytes, Stack size 0 bytes, gd32f1x0_timer.o(.text), UNUSED) + +

    usart_deinit (Thumb, 58 bytes, Stack size 8 bytes, gd32f1x0_usart.o(.text)) +

    [Stack]

    • Max Depth = 8
    • Call Chain = usart_deinit +
    +
    [Calls]
    • >>   rcu_periph_reset_enable +
    • >>   rcu_periph_reset_disable +
    +
    [Called By]
    • >>   ShutOff +
    + +

    usart_baudrate_set (Thumb, 120 bytes, Stack size 32 bytes, gd32f1x0_usart.o(.text)) +

    [Stack]

    • Max Depth = 128
    • Call Chain = usart_baudrate_set ⇒ rcu_clock_freq_get +
    +
    [Calls]
    • >>   rcu_clock_freq_get +
    +
    [Called By]
    • >>   USART_Steer_COM_init +
    • >>   USART_HUGS_init +
    + +

    usart_parity_config (Thumb, 24 bytes, Stack size 0 bytes, gd32f1x0_usart.o(.text)) +

    [Called By]

    • >>   USART_Steer_COM_init +
    • >>   USART_HUGS_init +
    + +

    usart_word_length_set (Thumb, 24 bytes, Stack size 0 bytes, gd32f1x0_usart.o(.text)) +

    [Called By]

    • >>   USART_Steer_COM_init +
    • >>   USART_HUGS_init +
    + +

    usart_stop_bit_set (Thumb, 24 bytes, Stack size 0 bytes, gd32f1x0_usart.o(.text)) +

    [Called By]

    • >>   USART_Steer_COM_init +
    • >>   USART_HUGS_init +
    + +

    usart_enable (Thumb, 10 bytes, Stack size 0 bytes, gd32f1x0_usart.o(.text)) +

    [Called By]

    • >>   USART_Steer_COM_init +
    • >>   USART_HUGS_init +
    + +

    usart_disable (Thumb, 10 bytes, Stack size 0 bytes, gd32f1x0_usart.o(.text), UNUSED) + +

    usart_transmit_config (Thumb, 16 bytes, Stack size 0 bytes, gd32f1x0_usart.o(.text)) +

    [Called By]

    • >>   USART_Steer_COM_init +
    • >>   USART_HUGS_init +
    + +

    usart_receive_config (Thumb, 16 bytes, Stack size 0 bytes, gd32f1x0_usart.o(.text)) +

    [Called By]

    • >>   USART_Steer_COM_init +
    • >>   USART_HUGS_init +
    + +

    usart_data_transmit (Thumb, 8 bytes, Stack size 0 bytes, gd32f1x0_usart.o(.text)) +

    [Called By]

    • >>   SendBuffer +
    + +

    usart_data_receive (Thumb, 10 bytes, Stack size 0 bytes, gd32f1x0_usart.o(.text), UNUSED) + +

    usart_data_first_config (Thumb, 28 bytes, Stack size 0 bytes, gd32f1x0_usart.o(.text), UNUSED) + +

    usart_invert_config (Thumb, 110 bytes, Stack size 0 bytes, gd32f1x0_usart.o(.text), UNUSED) + +

    usart_overrun_enable (Thumb, 18 bytes, Stack size 0 bytes, gd32f1x0_usart.o(.text), UNUSED) + +

    usart_overrun_disable (Thumb, 18 bytes, Stack size 0 bytes, gd32f1x0_usart.o(.text), UNUSED) + +

    usart_oversample_config (Thumb, 24 bytes, Stack size 0 bytes, gd32f1x0_usart.o(.text)) +

    [Called By]

    • >>   USART_Steer_COM_init +
    • >>   USART_HUGS_init +
    + +

    usart_sample_bit_config (Thumb, 24 bytes, Stack size 0 bytes, gd32f1x0_usart.o(.text), UNUSED) + +

    usart_autobaud_detection_enable (Thumb, 10 bytes, Stack size 0 bytes, gd32f1x0_usart.o(.text), UNUSED) + +

    usart_autobaud_detection_disable (Thumb, 10 bytes, Stack size 0 bytes, gd32f1x0_usart.o(.text), UNUSED) + +

    usart_autobaud_detection_mode_config (Thumb, 16 bytes, Stack size 0 bytes, gd32f1x0_usart.o(.text), UNUSED) + +

    usart_mute_mode_enable (Thumb, 10 bytes, Stack size 0 bytes, gd32f1x0_usart.o(.text), UNUSED) + +

    usart_mute_mode_disable (Thumb, 10 bytes, Stack size 0 bytes, gd32f1x0_usart.o(.text), UNUSED) + +

    usart_mute_mode_wakeup_config (Thumb, 24 bytes, Stack size 0 bytes, gd32f1x0_usart.o(.text), UNUSED) + +

    usart_address_detection_mode_config (Thumb, 28 bytes, Stack size 0 bytes, gd32f1x0_usart.o(.text), UNUSED) + +

    usart_address_config (Thumb, 32 bytes, Stack size 0 bytes, gd32f1x0_usart.o(.text), UNUSED) + +

    usart_receiver_timeout_enable (Thumb, 10 bytes, Stack size 0 bytes, gd32f1x0_usart.o(.text), UNUSED) + +

    usart_receiver_timeout_disable (Thumb, 10 bytes, Stack size 0 bytes, gd32f1x0_usart.o(.text), UNUSED) + +

    usart_receiver_timeout_config (Thumb, 16 bytes, Stack size 0 bytes, gd32f1x0_usart.o(.text), UNUSED) + +

    usart_lin_mode_enable (Thumb, 18 bytes, Stack size 0 bytes, gd32f1x0_usart.o(.text), UNUSED) + +

    usart_lin_mode_disable (Thumb, 18 bytes, Stack size 0 bytes, gd32f1x0_usart.o(.text), UNUSED) + +

    usart_lin_break_dection_length_config (Thumb, 20 bytes, Stack size 0 bytes, gd32f1x0_usart.o(.text), UNUSED) + +

    usart_halfduplex_enable (Thumb, 18 bytes, Stack size 0 bytes, gd32f1x0_usart.o(.text), UNUSED) + +

    usart_halfduplex_disable (Thumb, 18 bytes, Stack size 0 bytes, gd32f1x0_usart.o(.text), UNUSED) + +

    usart_clock_enable (Thumb, 18 bytes, Stack size 0 bytes, gd32f1x0_usart.o(.text), UNUSED) + +

    usart_clock_disable (Thumb, 18 bytes, Stack size 0 bytes, gd32f1x0_usart.o(.text), UNUSED) + +

    usart_synchronous_clock_config (Thumb, 50 bytes, Stack size 12 bytes, gd32f1x0_usart.o(.text), UNUSED) + +

    usart_smartcard_mode_enable (Thumb, 18 bytes, Stack size 0 bytes, gd32f1x0_usart.o(.text), UNUSED) + +

    usart_smartcard_mode_disable (Thumb, 18 bytes, Stack size 0 bytes, gd32f1x0_usart.o(.text), UNUSED) + +

    usart_smartcard_mode_nack_enable (Thumb, 18 bytes, Stack size 0 bytes, gd32f1x0_usart.o(.text), UNUSED) + +

    usart_smartcard_mode_nack_disable (Thumb, 18 bytes, Stack size 0 bytes, gd32f1x0_usart.o(.text), UNUSED) + +

    usart_guard_time_config (Thumb, 36 bytes, Stack size 0 bytes, gd32f1x0_usart.o(.text), UNUSED) + +

    usart_block_length_config (Thumb, 24 bytes, Stack size 0 bytes, gd32f1x0_usart.o(.text), UNUSED) + +

    usart_smartcard_autoretry_config (Thumb, 32 bytes, Stack size 0 bytes, gd32f1x0_usart.o(.text), UNUSED) + +

    usart_irda_mode_enable (Thumb, 18 bytes, Stack size 0 bytes, gd32f1x0_usart.o(.text), UNUSED) + +

    usart_irda_mode_disable (Thumb, 18 bytes, Stack size 0 bytes, gd32f1x0_usart.o(.text), UNUSED) + +

    usart_irda_lowpower_config (Thumb, 20 bytes, Stack size 0 bytes, gd32f1x0_usart.o(.text), UNUSED) + +

    usart_prescaler_config (Thumb, 24 bytes, Stack size 0 bytes, gd32f1x0_usart.o(.text), UNUSED) + +

    usart_hardware_flow_rts_config (Thumb, 24 bytes, Stack size 0 bytes, gd32f1x0_usart.o(.text), UNUSED) + +

    usart_hardware_flow_cts_config (Thumb, 24 bytes, Stack size 0 bytes, gd32f1x0_usart.o(.text), UNUSED) + +

    usart_rs485_driver_enable (Thumb, 18 bytes, Stack size 0 bytes, gd32f1x0_usart.o(.text), UNUSED) + +

    usart_rs485_driver_disable (Thumb, 18 bytes, Stack size 0 bytes, gd32f1x0_usart.o(.text), UNUSED) + +

    usart_driver_assertime_config (Thumb, 32 bytes, Stack size 0 bytes, gd32f1x0_usart.o(.text), UNUSED) + +

    usart_driver_deassertime_config (Thumb, 32 bytes, Stack size 0 bytes, gd32f1x0_usart.o(.text), UNUSED) + +

    usart_depolarity_config (Thumb, 28 bytes, Stack size 0 bytes, gd32f1x0_usart.o(.text), UNUSED) + +

    usart_dma_receive_config (Thumb, 16 bytes, Stack size 0 bytes, gd32f1x0_usart.o(.text)) +

    [Called By]

    • >>   USART_Steer_COM_init +
    • >>   USART_HUGS_init +
    + +

    usart_dma_transmit_config (Thumb, 16 bytes, Stack size 0 bytes, gd32f1x0_usart.o(.text), UNUSED) + +

    usart_reception_error_dma_disable (Thumb, 18 bytes, Stack size 0 bytes, gd32f1x0_usart.o(.text), UNUSED) + +

    usart_reception_error_dma_enable (Thumb, 18 bytes, Stack size 0 bytes, gd32f1x0_usart.o(.text), UNUSED) + +

    usart_wakeup_enable (Thumb, 10 bytes, Stack size 0 bytes, gd32f1x0_usart.o(.text), UNUSED) + +

    usart_wakeup_disable (Thumb, 10 bytes, Stack size 0 bytes, gd32f1x0_usart.o(.text), UNUSED) + +

    usart_wakeup_mode_config (Thumb, 28 bytes, Stack size 0 bytes, gd32f1x0_usart.o(.text), UNUSED) + +

    usart_flag_get (Thumb, 30 bytes, Stack size 8 bytes, gd32f1x0_usart.o(.text)) +

    [Stack]

    • Max Depth = 8
    • Call Chain = usart_flag_get +
    +
    [Called By]
    • >>   SendBuffer +
    + +

    usart_flag_clear (Thumb, 18 bytes, Stack size 8 bytes, gd32f1x0_usart.o(.text), UNUSED) + +

    usart_interrupt_enable (Thumb, 26 bytes, Stack size 8 bytes, gd32f1x0_usart.o(.text), UNUSED) + +

    usart_interrupt_disable (Thumb, 26 bytes, Stack size 8 bytes, gd32f1x0_usart.o(.text), UNUSED) + +

    usart_command_enable (Thumb, 8 bytes, Stack size 0 bytes, gd32f1x0_usart.o(.text), UNUSED) + +

    usart_interrupt_flag_get (Thumb, 56 bytes, Stack size 16 bytes, gd32f1x0_usart.o(.text), UNUSED) + +

    usart_interrupt_flag_clear (Thumb, 18 bytes, Stack size 8 bytes, gd32f1x0_usart.o(.text), UNUSED) + +

    Reset_Handler (Thumb, 8 bytes, Stack size 0 bytes, startup_gd32f1x0.o(.text)) +
    [Address Reference Count : 1]

    • startup_gd32f1x0.o(RESET) +
    +

    ADC_CMP_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_gd32f1x0.o(.text)) +

    [Calls]

    • >>   ADC_CMP_IRQHandler +
    +
    [Called By]
    • >>   ADC_CMP_IRQHandler +
    +
    [Address Reference Count : 1]
    • startup_gd32f1x0.o(RESET) +
    +

    CAN0_RX0_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_gd32f1x0.o(.text)) +
    [Address Reference Count : 1]

    • startup_gd32f1x0.o(RESET) +
    +

    CAN0_RX1_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_gd32f1x0.o(.text)) +
    [Address Reference Count : 1]

    • startup_gd32f1x0.o(RESET) +
    +

    CAN0_SCE_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_gd32f1x0.o(.text)) +
    [Address Reference Count : 1]

    • startup_gd32f1x0.o(RESET) +
    +

    CAN0_TX_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_gd32f1x0.o(.text)) +
    [Address Reference Count : 1]

    • startup_gd32f1x0.o(RESET) +
    +

    CAN1_RX0_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_gd32f1x0.o(.text)) +
    [Address Reference Count : 1]

    • startup_gd32f1x0.o(RESET) +
    +

    CAN1_RX1_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_gd32f1x0.o(.text)) +
    [Address Reference Count : 1]

    • startup_gd32f1x0.o(RESET) +
    +

    CAN1_SCE_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_gd32f1x0.o(.text)) +
    [Address Reference Count : 1]

    • startup_gd32f1x0.o(RESET) +
    +

    CAN1_TX_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_gd32f1x0.o(.text)) +
    [Address Reference Count : 1]

    • startup_gd32f1x0.o(RESET) +
    +

    CEC_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_gd32f1x0.o(.text)) +
    [Address Reference Count : 1]

    • startup_gd32f1x0.o(RESET) +
    +

    DMA_Channel5_6_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_gd32f1x0.o(.text)) +
    [Address Reference Count : 1]

    • startup_gd32f1x0.o(RESET) +
    +

    EXTI0_1_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_gd32f1x0.o(.text)) +
    [Address Reference Count : 1]

    • startup_gd32f1x0.o(RESET) +
    +

    EXTI2_3_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_gd32f1x0.o(.text)) +
    [Address Reference Count : 1]

    • startup_gd32f1x0.o(RESET) +
    +

    EXTI4_15_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_gd32f1x0.o(.text)) +
    [Address Reference Count : 1]

    • startup_gd32f1x0.o(RESET) +
    +

    FMC_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_gd32f1x0.o(.text)) +
    [Address Reference Count : 1]

    • startup_gd32f1x0.o(RESET) +
    +

    I2C0_ER_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_gd32f1x0.o(.text)) +
    [Address Reference Count : 1]

    • startup_gd32f1x0.o(RESET) +
    +

    I2C0_EV_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_gd32f1x0.o(.text)) +
    [Address Reference Count : 1]

    • startup_gd32f1x0.o(RESET) +
    +

    I2C1_ER_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_gd32f1x0.o(.text)) +
    [Address Reference Count : 1]

    • startup_gd32f1x0.o(RESET) +
    +

    I2C1_EV_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_gd32f1x0.o(.text)) +
    [Address Reference Count : 1]

    • startup_gd32f1x0.o(RESET) +
    +

    I2C2_ER_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_gd32f1x0.o(.text)) +
    [Address Reference Count : 1]

    • startup_gd32f1x0.o(RESET) +
    +

    I2C2_EV_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_gd32f1x0.o(.text)) +
    [Address Reference Count : 1]

    • startup_gd32f1x0.o(RESET) +
    +

    LVD_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_gd32f1x0.o(.text)) +
    [Address Reference Count : 1]

    • startup_gd32f1x0.o(RESET) +
    +

    RCU_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_gd32f1x0.o(.text)) +
    [Address Reference Count : 1]

    • startup_gd32f1x0.o(RESET) +
    +

    RTC_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_gd32f1x0.o(.text)) +
    [Address Reference Count : 1]

    • startup_gd32f1x0.o(RESET) +
    +

    SLCD_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_gd32f1x0.o(.text)) +
    [Address Reference Count : 1]

    • startup_gd32f1x0.o(RESET) +
    +

    SPI0_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_gd32f1x0.o(.text)) +
    [Address Reference Count : 1]

    • startup_gd32f1x0.o(RESET) +
    +

    SPI1_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_gd32f1x0.o(.text)) +
    [Address Reference Count : 1]

    • startup_gd32f1x0.o(RESET) +
    +

    SPI2_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_gd32f1x0.o(.text)) +
    [Address Reference Count : 1]

    • startup_gd32f1x0.o(RESET) +
    +

    TIMER0_Channel_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_gd32f1x0.o(.text)) +
    [Address Reference Count : 1]

    • startup_gd32f1x0.o(RESET) +
    +

    TIMER14_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_gd32f1x0.o(.text)) +
    [Address Reference Count : 1]

    • startup_gd32f1x0.o(RESET) +
    +

    TIMER15_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_gd32f1x0.o(.text)) +
    [Address Reference Count : 1]

    • startup_gd32f1x0.o(RESET) +
    +

    TIMER16_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_gd32f1x0.o(.text)) +
    [Address Reference Count : 1]

    • startup_gd32f1x0.o(RESET) +
    +

    TIMER1_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_gd32f1x0.o(.text)) +
    [Address Reference Count : 1]

    • startup_gd32f1x0.o(RESET) +
    +

    TIMER2_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_gd32f1x0.o(.text)) +
    [Address Reference Count : 1]

    • startup_gd32f1x0.o(RESET) +
    +

    TIMER5_DAC_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_gd32f1x0.o(.text)) +
    [Address Reference Count : 1]

    • startup_gd32f1x0.o(RESET) +
    +

    TSI_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_gd32f1x0.o(.text)) +
    [Address Reference Count : 1]

    • startup_gd32f1x0.o(RESET) +
    +

    USART0_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_gd32f1x0.o(.text)) +
    [Address Reference Count : 1]

    • startup_gd32f1x0.o(RESET) +
    +

    USART1_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_gd32f1x0.o(.text)) +
    [Address Reference Count : 1]

    • startup_gd32f1x0.o(RESET) +
    +

    USBDWakeUp_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_gd32f1x0.o(.text)) +
    [Address Reference Count : 1]

    • startup_gd32f1x0.o(RESET) +
    +

    USBD_HP_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_gd32f1x0.o(.text)) +
    [Address Reference Count : 1]

    • startup_gd32f1x0.o(RESET) +
    +

    USBD_LP_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_gd32f1x0.o(.text)) +
    [Address Reference Count : 1]

    • startup_gd32f1x0.o(RESET) +
    +

    WWDGT_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_gd32f1x0.o(.text)) +
    [Address Reference Count : 1]

    • startup_gd32f1x0.o(RESET) +
    +

    __user_initial_stackheap (Thumb, 10 bytes, Stack size 0 bytes, startup_gd32f1x0.o(.text)) +

    [Called By]

    • >>   __user_setup_stackheap +
    + +

    SystemInit (Thumb, 118 bytes, Stack size 8 bytes, system_gd32f1x0.o(.text)) +

    [Stack]

    • Max Depth = 16
    • Call Chain = SystemInit ⇒ system_clock_config +
    +
    [Calls]
    • >>   system_clock_config +
    +
    [Address Reference Count : 1]
    • startup_gd32f1x0.o(.text) +
    +

    SystemCoreClockUpdate (Thumb, 208 bytes, Stack size 44 bytes, system_gd32f1x0.o(.text)) +

    [Stack]

    • Max Depth = 44
    • Call Chain = SystemCoreClockUpdate +
    +
    [Called By]
    • >>   main +
    + +

    __aeabi_memcpy (Thumb, 0 bytes, Stack size 0 bytes, rt_memcpy_v6.o(.text)) +

    [Called By]

    • >>   UpdateUSARTSteerInput +
    • >>   UpdateUSARTHUGSInput +
    + +

    __rt_memcpy (Thumb, 138 bytes, Stack size 0 bytes, rt_memcpy_v6.o(.text), UNUSED) +

    [Calls]

    • >>   __aeabi_memcpy4 +
    + +

    _memcpy_lastbytes (Thumb, 0 bytes, Stack size unknown bytes, rt_memcpy_v6.o(.text), UNUSED) + +

    __aeabi_memcpy4 (Thumb, 0 bytes, Stack size 8 bytes, rt_memcpy_w.o(.text)) +

    [Stack]

    • Max Depth = 8
    • Call Chain = __aeabi_memcpy4 +
    +
    [Called By]
    • >>   USART_Steer_COM_init +
    • >>   USART_HUGS_init +
    • >>   ADC_init +
    • >>   __rt_memcpy +
    + +

    __aeabi_memcpy8 (Thumb, 0 bytes, Stack size 8 bytes, rt_memcpy_w.o(.text), UNUSED) + +

    __rt_memcpy_w (Thumb, 100 bytes, Stack size 8 bytes, rt_memcpy_w.o(.text), UNUSED) + +

    _memcpy_lastbytes_aligned (Thumb, 0 bytes, Stack size unknown bytes, rt_memcpy_w.o(.text), UNUSED) + +

    __use_two_region_memory (Thumb, 2 bytes, Stack size 0 bytes, heapauxi.o(.text), UNUSED) + +

    __rt_heap_escrow$2region (Thumb, 2 bytes, Stack size 0 bytes, heapauxi.o(.text), UNUSED) + +

    __rt_heap_expand$2region (Thumb, 2 bytes, Stack size 0 bytes, heapauxi.o(.text), UNUSED) + +

    __user_setup_stackheap (Thumb, 74 bytes, Stack size 8 bytes, sys_stackheap_outer.o(.text)) +

    [Stack]

    • Max Depth = 8
    • Call Chain = __user_setup_stackheap +
    +
    [Calls]
    • >>   __user_perproc_libspace +
    • >>   __user_initial_stackheap +
    +
    [Called By]
    • >>   __rt_entry_sh +
    + +

    exit (Thumb, 18 bytes, Stack size 8 bytes, exit.o(.text)) +

    [Stack]

    • Max Depth = 8 + Unknown Stack Size +
    • Call Chain = exit +
    +
    [Calls]
    • >>   __rt_exit +
    +
    [Called By]
    • >>   __rt_entry_main +
    + +

    __user_libspace (Thumb, 8 bytes, Stack size 0 bytes, libspace.o(.text), UNUSED) + +

    __user_perproc_libspace (Thumb, 0 bytes, Stack size 0 bytes, libspace.o(.text)) +

    [Called By]

    • >>   __user_setup_stackheap +
    + +

    __user_perthread_libspace (Thumb, 0 bytes, Stack size 0 bytes, libspace.o(.text), UNUSED) + +

    _sys_exit (Thumb, 8 bytes, Stack size 0 bytes, sys_exit.o(.text)) +

    [Called By]

    • >>   __rt_exit_exit +
    + +

    __I$use$semihosting (Thumb, 0 bytes, Stack size 0 bytes, use_no_semi.o(.text), UNUSED) + +

    __use_no_semihosting_swi (Thumb, 2 bytes, Stack size 0 bytes, use_no_semi.o(.text), UNUSED) + +

    __semihosting_library_function (Thumb, 0 bytes, Stack size 12 bytes, indicate_semi.o(.text), UNUSED) + +

    blockPWM (Thumb, 104 bytes, Stack size 12 bytes, bldc.o(i.blockPWM)) +

    [Stack]

    • Max Depth = 12
    • Call Chain = blockPWM +
    +
    [Called By]
    • >>   CalculateBLDC +
    + +

    __fpl_dcmp_Inf (Thumb, 24 bytes, Stack size 0 bytes, dcmpi.o(x$fpl$dcmpinf), UNUSED) +

    [Called By]

    • >>   _dcmple +
    + +

    __aeabi_d2iz (Thumb, 0 bytes, Stack size 32 bytes, dfix.o(x$fpl$dfix)) +

    [Stack]

    • Max Depth = 32
    • Call Chain = __aeabi_d2iz +
    +
    [Called By]
    • >>   CheckUSARTSteerInput +
    + +

    _dfix (Thumb, 94 bytes, Stack size 32 bytes, dfix.o(x$fpl$dfix), UNUSED) +

    [Calls]

    • >>   __fpl_dnaninf +
    + +

    __aeabi_i2d (Thumb, 0 bytes, Stack size 0 bytes, dflt_clz.o(x$fpl$dflt)) +

    [Called By]

    • >>   CalculateBLDC +
    + +

    _dflt (Thumb, 46 bytes, Stack size 0 bytes, dflt_clz.o(x$fpl$dflt), UNUSED) + +

    __aeabi_cdcmple (Thumb, 0 bytes, Stack size 32 bytes, dleqf.o(x$fpl$dleqf)) +

    [Stack]

    • Max Depth = 32
    • Call Chain = __aeabi_cdcmple +
    +
    [Called By]
    • >>   CalculateBLDC +
    + +

    _dcmple (Thumb, 120 bytes, Stack size 32 bytes, dleqf.o(x$fpl$dleqf), UNUSED) +

    [Calls]

    • >>   __fpl_dnaninf +
    • >>   __fpl_dcmp_Inf +
    + +

    __fpl_dcmple_InfNaN (Thumb, 0 bytes, Stack size unknown bytes, dleqf.o(x$fpl$dleqf), UNUSED) + +

    __aeabi_dmul (Thumb, 0 bytes, Stack size 32 bytes, dmul.o(x$fpl$dmul)) +

    [Stack]

    • Max Depth = 32
    • Call Chain = __aeabi_dmul +
    +
    [Called By]
    • >>   CheckUSARTSteerInput +
    + +

    _dmul (Thumb, 332 bytes, Stack size 32 bytes, dmul.o(x$fpl$dmul), UNUSED) +

    [Calls]

    • >>   __fpl_dretinf +
    • >>   __fpl_dnaninf +
    + +

    __fpl_dnaninf (Thumb, 156 bytes, Stack size 16 bytes, dnaninf.o(x$fpl$dnaninf), UNUSED) +

    [Called By]

    • >>   _dmul +
    • >>   _dcmple +
    • >>   _dfix +
    + +

    __fpl_dretinf (Thumb, 12 bytes, Stack size 0 bytes, dretinf.o(x$fpl$dretinf), UNUSED) +

    [Called By]

    • >>   _f2d +
    • >>   _dmul +
    + +

    __aeabi_f2d (Thumb, 0 bytes, Stack size 16 bytes, f2d.o(x$fpl$f2d)) +

    [Stack]

    • Max Depth = 16
    • Call Chain = __aeabi_f2d +
    +
    [Called By]
    • >>   CheckUSARTSteerInput +
    + +

    _f2d (Thumb, 86 bytes, Stack size 16 bytes, f2d.o(x$fpl$f2d), UNUSED) +

    [Calls]

    • >>   __fpl_fnaninf +
    • >>   __fpl_dretinf +
    + +

    __aeabi_f2iz (Thumb, 0 bytes, Stack size 16 bytes, ffix.o(x$fpl$ffix)) +

    [Stack]

    • Max Depth = 16
    • Call Chain = __aeabi_f2iz +
    +
    [Called By]
    • >>   GetPosition +
    + +

    _ffix (Thumb, 54 bytes, Stack size 16 bytes, ffix.o(x$fpl$ffix), UNUSED) +

    [Calls]

    • >>   __fpl_fnaninf +
    + +

    __aeabi_i2f (Thumb, 0 bytes, Stack size 0 bytes, fflt_clz.o(x$fpl$fflt)) +

    [Called By]

    • >>   CheckUSARTSteerInput +
    • >>   GetPosition +
    + +

    _fflt (Thumb, 48 bytes, Stack size 0 bytes, fflt_clz.o(x$fpl$fflt), UNUSED) + +

    __aeabi_fmul (Thumb, 0 bytes, Stack size 16 bytes, fmul.o(x$fpl$fmul)) +

    [Stack]

    • Max Depth = 16
    • Call Chain = __aeabi_fmul +
    +
    [Called By]
    • >>   GetPosition +
    + +

    _fmul (Thumb, 258 bytes, Stack size 16 bytes, fmul.o(x$fpl$fmul), UNUSED) +

    [Calls]

    • >>   __fpl_fretinf +
    • >>   __fpl_fnaninf +
    + +

    __fpl_fnaninf (Thumb, 140 bytes, Stack size 8 bytes, fnaninf.o(x$fpl$fnaninf), UNUSED) +

    [Called By]

    • >>   _fmul +
    • >>   _ffix +
    • >>   _f2d +
    + +

    __fpl_fretinf (Thumb, 10 bytes, Stack size 0 bytes, fretinf.o(x$fpl$fretinf), UNUSED) +

    [Called By]

    • >>   _fmul +
    +

    +

    +Local Symbols +

    +

    system_clock_72m_hxtal (Thumb, 154 bytes, Stack size 0 bytes, system_gd32f1x0.o(.text)) +

    [Called By]

    • >>   system_clock_config +
    + +

    system_clock_config (Thumb, 8 bytes, Stack size 8 bytes, system_gd32f1x0.o(.text)) +

    [Stack]

    • Max Depth = 8
    • Call Chain = system_clock_config +
    +
    [Calls]
    • >>   system_clock_72m_hxtal +
    +
    [Called By]
    • >>   SystemInit +
    +

    +

    +Undefined Global Symbols +


    diff --git a/HUGS/Objects/HUGS.lnp b/HUGS/Objects/HUGS.lnp new file mode 100644 index 00000000..e762f499 --- /dev/null +++ b/HUGS/Objects/HUGS.lnp @@ -0,0 +1,29 @@ +--cpu Cortex-M3 +".\objects\main.o" +".\objects\bldc.o" +".\objects\setup.o" +".\objects\it.o" +".\objects\comms.o" +".\objects\commssteering.o" +".\objects\led.o" +".\objects\commshugs.o" +".\objects\gd32f1x0_adc.o" +".\objects\gd32f1x0_dbg.o" +".\objects\gd32f1x0_dma.o" +".\objects\gd32f1x0_fwdgt.o" +".\objects\gd32f1x0_gpio.o" +".\objects\gd32f1x0_i2c.o" +".\objects\gd32f1x0_misc.o" +".\objects\gd32f1x0_opa.o" +".\objects\gd32f1x0_pmu.o" +".\objects\gd32f1x0_rcu.o" +".\objects\gd32f1x0_syscfg.o" +".\objects\gd32f1x0_timer.o" +".\objects\gd32f1x0_usart.o" +".\objects\gd32f1x0_wwdgt.o" +".\objects\startup_gd32f1x0.o" +".\objects\system_gd32f1x0.o" +--strict --scatter ".\Objects\HUGS.sct" +--summary_stderr --info summarysizes --map --load_addr_map_info --xref --callgraph --symbols +--info sizes --info totals --info unused --info veneers +--list ".\Listings\HUGS.map" -o .\Objects\HUGS.axf \ No newline at end of file diff --git a/HUGS/Objects/HUGS.sct b/HUGS/Objects/HUGS.sct new file mode 100644 index 00000000..6c8e805a --- /dev/null +++ b/HUGS/Objects/HUGS.sct @@ -0,0 +1,16 @@ +; ************************************************************* +; *** Scatter-Loading Description File generated by uVision *** +; ************************************************************* + +LR_IROM1 0x08000000 0x00010000 { ; load region size_region + ER_IROM1 0x08000000 0x00010000 { ; load address = execution address + *.o (RESET, +First) + *(InRoot$$Sections) + .ANY (+RO) + .ANY (+XO) + } + RW_IRAM1 0x20000000 0x00002000 { ; RW data + .ANY (+RW +ZI) + } +} + diff --git a/HUGS/Objects/HUGS_Target 1.dep b/HUGS/Objects/HUGS_Target 1.dep new file mode 100644 index 00000000..e3d63daa --- /dev/null +++ b/HUGS/Objects/HUGS_Target 1.dep @@ -0,0 +1,612 @@ +Dependencies for Project 'HUGS', Target 'Target 1': (DO NOT MODIFY !) +CompilerVersion: 5060960::V5.06 update 7 (build 960)::.\ARMCC +F (.\Src\main.c)(0x60C63284)(-c --cpu Cortex-M3 -D__EVAL -g -O0 --apcs=interwork -I C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include -I C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.2.0\Device\Firmware\Peripherals\inc -I .\Inc -I .\RTE\target_1 -I.\RTE\_Target_1 -IC:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include -IC:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc -IC:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include -D__UVISION_VERSION="534" -D_RTE_ -DGD32F1x0 -DGD32F130_150 -DUSE_STDPERIPH_DRIVER -D_RTE_ -o .\objects\main.o --omf_browse .\objects\main.crf --depend .\objects\main.d) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\core_cm3.h)(0x5E8F79E2) +I (C:\Keil_v5\ARM\ARMCC\include\stdint.h)(0x5E8EE582) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_version.h)(0x5E8F79E2) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_compiler.h)(0x5E83AF82) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_armcc.h)(0x5E8F79E2) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\mpu_armv7.h)(0x5E8F79E2) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\system_gd32f1x0.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0_libopt.h)(0x5A7C59D6) +I (.\RTE\_Target_1\RTE_Components.h)(0x60C93F55) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_adc.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dbg.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dma.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_gpio.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_syscfg.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_i2c.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_fwdgt.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_pmu.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_rcu.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_timer.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_usart.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_wwdgt.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_misc.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_opa.h)(0x5A7B5838) +I (Src\../Inc/setup.h)(0x60C6314A) +I (Src\../Inc/../Inc/config.h)(0x60C63284) +I (Src\../Inc/defines.h)(0x60C63284) +I (Src\../Inc/it.h)(0x60C6314A) +I (Src\../Inc/bldc.h)(0x60C63284) +I (Src\../Inc/comms.h)(0x60C6314A) +I (Src\../Inc/commsHUGS.h)(0x60C63284) +I (Src\../Inc/commsSteering.h)(0x60C63284) +I (C:\Keil_v5\ARM\ARMCC\include\stdio.h)(0x5E8EE582) +I (C:\Keil_v5\ARM\ARMCC\include\stdlib.h)(0x5E8EE582) +I (C:\Keil_v5\ARM\ARMCC\include\string.h)(0x5E8EE582) +I (C:\Keil_v5\ARM\ARMCC\include\math.h)(0x5E8EE582) +F (.\Src\bldc.c)(0x60C63284)(-c --cpu Cortex-M3 -D__EVAL -g -O0 --apcs=interwork -I C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include -I C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.2.0\Device\Firmware\Peripherals\inc -I .\Inc -I .\RTE\target_1 -I.\RTE\_Target_1 -IC:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include -IC:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc -IC:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include -D__UVISION_VERSION="534" -D_RTE_ -DGD32F1x0 -DGD32F130_150 -DUSE_STDPERIPH_DRIVER -D_RTE_ -o .\objects\bldc.o --omf_browse .\objects\bldc.crf --depend .\objects\bldc.d) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\core_cm3.h)(0x5E8F79E2) +I (C:\Keil_v5\ARM\ARMCC\include\stdint.h)(0x5E8EE582) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_version.h)(0x5E8F79E2) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_compiler.h)(0x5E83AF82) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_armcc.h)(0x5E8F79E2) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\mpu_armv7.h)(0x5E8F79E2) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\system_gd32f1x0.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0_libopt.h)(0x5A7C59D6) +I (.\RTE\_Target_1\RTE_Components.h)(0x60C93F55) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_adc.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dbg.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dma.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_gpio.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_syscfg.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_i2c.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_fwdgt.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_pmu.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_rcu.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_timer.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_usart.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_wwdgt.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_misc.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_opa.h)(0x5A7B5838) +I (Src\../Inc/setup.h)(0x60C6314A) +I (Src\../Inc/../Inc/config.h)(0x60C63284) +I (Src\../Inc/defines.h)(0x60C63284) +I (Src\../Inc/bldc.h)(0x60C63284) +F (.\Src\setup.c)(0x60C63284)(-c --cpu Cortex-M3 -D__EVAL -g -O0 --apcs=interwork -I C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include -I C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.2.0\Device\Firmware\Peripherals\inc -I .\Inc -I .\RTE\target_1 -I.\RTE\_Target_1 -IC:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include -IC:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc -IC:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include -D__UVISION_VERSION="534" -D_RTE_ -DGD32F1x0 -DGD32F130_150 -DUSE_STDPERIPH_DRIVER -D_RTE_ -o .\objects\setup.o --omf_browse .\objects\setup.crf --depend .\objects\setup.d) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\core_cm3.h)(0x5E8F79E2) +I (C:\Keil_v5\ARM\ARMCC\include\stdint.h)(0x5E8EE582) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_version.h)(0x5E8F79E2) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_compiler.h)(0x5E83AF82) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_armcc.h)(0x5E8F79E2) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\mpu_armv7.h)(0x5E8F79E2) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\system_gd32f1x0.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0_libopt.h)(0x5A7C59D6) +I (.\RTE\_Target_1\RTE_Components.h)(0x60C93F55) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_adc.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dbg.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dma.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_gpio.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_syscfg.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_i2c.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_fwdgt.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_pmu.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_rcu.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_timer.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_usart.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_wwdgt.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_misc.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_opa.h)(0x5A7B5838) +I (Src\../Inc/setup.h)(0x60C6314A) +I (Src\../Inc/../Inc/config.h)(0x60C63284) +I (Src\../Inc/defines.h)(0x60C63284) +I (Src\../Inc/it.h)(0x60C6314A) +F (.\Src\it.c)(0x60C63284)(-c --cpu Cortex-M3 -D__EVAL -g -O0 --apcs=interwork -I C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include -I C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.2.0\Device\Firmware\Peripherals\inc -I .\Inc -I .\RTE\target_1 -I.\RTE\_Target_1 -IC:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include -IC:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc -IC:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include -D__UVISION_VERSION="534" -D_RTE_ -DGD32F1x0 -DGD32F130_150 -DUSE_STDPERIPH_DRIVER -D_RTE_ -o .\objects\it.o --omf_browse .\objects\it.crf --depend .\objects\it.d) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\core_cm3.h)(0x5E8F79E2) +I (C:\Keil_v5\ARM\ARMCC\include\stdint.h)(0x5E8EE582) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_version.h)(0x5E8F79E2) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_compiler.h)(0x5E83AF82) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_armcc.h)(0x5E8F79E2) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\mpu_armv7.h)(0x5E8F79E2) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\system_gd32f1x0.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0_libopt.h)(0x5A7C59D6) +I (.\RTE\_Target_1\RTE_Components.h)(0x60C93F55) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_adc.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dbg.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dma.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_gpio.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_syscfg.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_i2c.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_fwdgt.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_pmu.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_rcu.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_timer.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_usart.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_wwdgt.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_misc.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_opa.h)(0x5A7B5838) +I (Src\../Inc/it.h)(0x60C6314A) +I (Src\../Inc/../Inc/config.h)(0x60C63284) +I (Src\../Inc/defines.h)(0x60C63284) +I (Src\../Inc/bldc.h)(0x60C63284) +I (Src\../Inc/led.h)(0x60C6314A) +I (Src\../Inc/commsHUGS.h)(0x60C63284) +I (Src\../Inc/commsSteering.h)(0x60C63284) +F (.\Src\comms.c)(0x60C6314B)(-c --cpu Cortex-M3 -D__EVAL -g -O0 --apcs=interwork -I C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include -I C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.2.0\Device\Firmware\Peripherals\inc -I .\Inc -I .\RTE\target_1 -I.\RTE\_Target_1 -IC:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include -IC:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc -IC:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include -D__UVISION_VERSION="534" -D_RTE_ -DGD32F1x0 -DGD32F130_150 -DUSE_STDPERIPH_DRIVER -D_RTE_ -o .\objects\comms.o --omf_browse .\objects\comms.crf --depend .\objects\comms.d) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\core_cm3.h)(0x5E8F79E2) +I (C:\Keil_v5\ARM\ARMCC\include\stdint.h)(0x5E8EE582) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_version.h)(0x5E8F79E2) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_compiler.h)(0x5E83AF82) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_armcc.h)(0x5E8F79E2) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\mpu_armv7.h)(0x5E8F79E2) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\system_gd32f1x0.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0_libopt.h)(0x5A7C59D6) +I (.\RTE\_Target_1\RTE_Components.h)(0x60C93F55) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_adc.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dbg.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dma.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_gpio.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_syscfg.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_i2c.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_fwdgt.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_pmu.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_rcu.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_timer.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_usart.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_wwdgt.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_misc.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_opa.h)(0x5A7B5838) +F (.\Src\commsSteering.c)(0x60C63284)(-c --cpu Cortex-M3 -D__EVAL -g -O0 --apcs=interwork -I C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include -I C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.2.0\Device\Firmware\Peripherals\inc -I .\Inc -I .\RTE\target_1 -I.\RTE\_Target_1 -IC:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include -IC:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc -IC:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include -D__UVISION_VERSION="534" -D_RTE_ -DGD32F1x0 -DGD32F130_150 -DUSE_STDPERIPH_DRIVER -D_RTE_ -o .\objects\commssteering.o --omf_browse .\objects\commssteering.crf --depend .\objects\commssteering.d) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\core_cm3.h)(0x5E8F79E2) +I (C:\Keil_v5\ARM\ARMCC\include\stdint.h)(0x5E8EE582) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_version.h)(0x5E8F79E2) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_compiler.h)(0x5E83AF82) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_armcc.h)(0x5E8F79E2) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\mpu_armv7.h)(0x5E8F79E2) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\system_gd32f1x0.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0_libopt.h)(0x5A7C59D6) +I (.\RTE\_Target_1\RTE_Components.h)(0x60C93F55) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_adc.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dbg.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dma.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_gpio.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_syscfg.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_i2c.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_fwdgt.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_pmu.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_rcu.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_timer.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_usart.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_wwdgt.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_misc.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_opa.h)(0x5A7B5838) +I (Src\../Inc/it.h)(0x60C6314A) +I (Src\../Inc/../Inc/config.h)(0x60C63284) +I (Src\../Inc/comms.h)(0x60C6314A) +I (Src\../Inc/commsHUGS.h)(0x60C63284) +I (Src\../Inc/commsSteering.h)(0x60C63284) +I (Src\../Inc/setup.h)(0x60C6314A) +I (Src\../Inc/defines.h)(0x60C63284) +I (Src\../Inc/bldc.h)(0x60C63284) +I (C:\Keil_v5\ARM\ARMCC\include\stdio.h)(0x5E8EE582) +I (C:\Keil_v5\ARM\ARMCC\include\string.h)(0x5E8EE582) +F (.\Src\led.c)(0x60C6314B)(-c --cpu Cortex-M3 -D__EVAL -g -O0 --apcs=interwork -I C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include -I C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.2.0\Device\Firmware\Peripherals\inc -I .\Inc -I .\RTE\target_1 -I.\RTE\_Target_1 -IC:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include -IC:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc -IC:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include -D__UVISION_VERSION="534" -D_RTE_ -DGD32F1x0 -DGD32F130_150 -DUSE_STDPERIPH_DRIVER -D_RTE_ -o .\objects\led.o --omf_browse .\objects\led.crf --depend .\objects\led.d) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\core_cm3.h)(0x5E8F79E2) +I (C:\Keil_v5\ARM\ARMCC\include\stdint.h)(0x5E8EE582) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_version.h)(0x5E8F79E2) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_compiler.h)(0x5E83AF82) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_armcc.h)(0x5E8F79E2) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\mpu_armv7.h)(0x5E8F79E2) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\system_gd32f1x0.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0_libopt.h)(0x5A7C59D6) +I (.\RTE\_Target_1\RTE_Components.h)(0x60C93F55) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_adc.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dbg.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dma.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_gpio.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_syscfg.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_i2c.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_fwdgt.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_pmu.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_rcu.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_timer.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_usart.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_wwdgt.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_misc.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_opa.h)(0x5A7B5838) +I (Src\../Inc/led.h)(0x60C6314A) +I (Src\../Inc/../Inc/config.h)(0x60C63284) +I (Src\../Inc/defines.h)(0x60C63284) +F (.\Src\commsHUGS.c)(0x60C63284)(-c --cpu Cortex-M3 -D__EVAL -g -O0 --apcs=interwork -I C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include -I C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.2.0\Device\Firmware\Peripherals\inc -I .\Inc -I .\RTE\target_1 -I.\RTE\_Target_1 -IC:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include -IC:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc -IC:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include -D__UVISION_VERSION="534" -D_RTE_ -DGD32F1x0 -DGD32F130_150 -DUSE_STDPERIPH_DRIVER -D_RTE_ -o .\objects\commshugs.o --omf_browse .\objects\commshugs.crf --depend .\objects\commshugs.d) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\core_cm3.h)(0x5E8F79E2) +I (C:\Keil_v5\ARM\ARMCC\include\stdint.h)(0x5E8EE582) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_version.h)(0x5E8F79E2) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_compiler.h)(0x5E83AF82) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_armcc.h)(0x5E8F79E2) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\mpu_armv7.h)(0x5E8F79E2) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\system_gd32f1x0.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0_libopt.h)(0x5A7C59D6) +I (.\RTE\_Target_1\RTE_Components.h)(0x60C93F55) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_adc.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dbg.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dma.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_gpio.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_syscfg.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_i2c.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_fwdgt.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_pmu.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_rcu.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_timer.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_usart.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_wwdgt.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_misc.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_opa.h)(0x5A7B5838) +I (Src\../Inc/it.h)(0x60C6314A) +I (Src\../Inc/../Inc/config.h)(0x60C63284) +I (Src\../Inc/comms.h)(0x60C6314A) +I (Src\../Inc/commsHUGS.h)(0x60C63284) +I (Src\../Inc/setup.h)(0x60C6314A) +I (Src\../Inc/defines.h)(0x60C63284) +I (Src\../Inc/bldc.h)(0x60C63284) +I (C:\Keil_v5\ARM\ARMCC\include\stdio.h)(0x5E8EE582) +I (C:\Keil_v5\ARM\ARMCC\include\string.h)(0x5E8EE582) +F (.\Inc\defines.h)(0x60C63284)() +F (.\Inc\config.h)(0x60C63284)() +F (.\Inc\bldc.h)(0x60C63284)() +F (.\Inc\setup.h)(0x60C6314A)() +F (.\Inc\it.h)(0x60C6314A)() +F (.\Inc\comms.h)(0x60C6314A)() +F (.\Inc\commsSteering.h)(0x60C63284)() +F (.\Inc\led.h)(0x60C6314A)() +F (.\Inc\commsHUGS.h)(0x60C63284)() +F (RTE\Device\GD32F130C8\gd32f1x0_adc.c)(0x5A7B5838)(-c --cpu Cortex-M3 -D__EVAL -g -O0 --apcs=interwork -I.\RTE\_Target_1 -IC:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include -IC:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc -IC:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include -D__UVISION_VERSION="534" -D_RTE_ -DGD32F1x0 -DGD32F130_150 -DUSE_STDPERIPH_DRIVER -D_RTE_ -o .\objects\gd32f1x0_adc.o --omf_browse .\objects\gd32f1x0_adc.crf --depend .\objects\gd32f1x0_adc.d) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_adc.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\core_cm3.h)(0x5E8F79E2) +I (C:\Keil_v5\ARM\ARMCC\include\stdint.h)(0x5E8EE582) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_version.h)(0x5E8F79E2) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_compiler.h)(0x5E83AF82) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_armcc.h)(0x5E8F79E2) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\mpu_armv7.h)(0x5E8F79E2) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\system_gd32f1x0.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0_libopt.h)(0x5A7C59D6) +I (.\RTE\_Target_1\RTE_Components.h)(0x60C93F55) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dbg.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dma.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_gpio.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_syscfg.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_i2c.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_fwdgt.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_pmu.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_rcu.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_timer.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_usart.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_wwdgt.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_misc.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_opa.h)(0x5A7B5838) +F (RTE\Device\GD32F130C8\gd32f1x0_dbg.c)(0x5A7B5838)(-c --cpu Cortex-M3 -D__EVAL -g -O0 --apcs=interwork -I.\RTE\_Target_1 -IC:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include -IC:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc -IC:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include -D__UVISION_VERSION="534" -D_RTE_ -DGD32F1x0 -DGD32F130_150 -DUSE_STDPERIPH_DRIVER -D_RTE_ -o .\objects\gd32f1x0_dbg.o --omf_browse .\objects\gd32f1x0_dbg.crf --depend .\objects\gd32f1x0_dbg.d) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dbg.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\core_cm3.h)(0x5E8F79E2) +I (C:\Keil_v5\ARM\ARMCC\include\stdint.h)(0x5E8EE582) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_version.h)(0x5E8F79E2) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_compiler.h)(0x5E83AF82) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_armcc.h)(0x5E8F79E2) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\mpu_armv7.h)(0x5E8F79E2) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\system_gd32f1x0.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0_libopt.h)(0x5A7C59D6) +I (.\RTE\_Target_1\RTE_Components.h)(0x60C93F55) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_adc.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dma.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_gpio.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_syscfg.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_i2c.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_fwdgt.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_pmu.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_rcu.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_timer.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_usart.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_wwdgt.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_misc.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_opa.h)(0x5A7B5838) +F (RTE\Device\GD32F130C8\gd32f1x0_dma.c)(0x5A7B5838)(-c --cpu Cortex-M3 -D__EVAL -g -O0 --apcs=interwork -I.\RTE\_Target_1 -IC:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include -IC:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc -IC:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include -D__UVISION_VERSION="534" -D_RTE_ -DGD32F1x0 -DGD32F130_150 -DUSE_STDPERIPH_DRIVER -D_RTE_ -o .\objects\gd32f1x0_dma.o --omf_browse .\objects\gd32f1x0_dma.crf --depend .\objects\gd32f1x0_dma.d) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dma.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\core_cm3.h)(0x5E8F79E2) +I (C:\Keil_v5\ARM\ARMCC\include\stdint.h)(0x5E8EE582) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_version.h)(0x5E8F79E2) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_compiler.h)(0x5E83AF82) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_armcc.h)(0x5E8F79E2) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\mpu_armv7.h)(0x5E8F79E2) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\system_gd32f1x0.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0_libopt.h)(0x5A7C59D6) +I (.\RTE\_Target_1\RTE_Components.h)(0x60C93F55) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_adc.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dbg.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_gpio.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_syscfg.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_i2c.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_fwdgt.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_pmu.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_rcu.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_timer.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_usart.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_wwdgt.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_misc.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_opa.h)(0x5A7B5838) +F (RTE\Device\GD32F130C8\gd32f1x0_fwdgt.c)(0x5A7B5838)(-c --cpu Cortex-M3 -D__EVAL -g -O0 --apcs=interwork -I.\RTE\_Target_1 -IC:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include -IC:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc -IC:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include -D__UVISION_VERSION="534" -D_RTE_ -DGD32F1x0 -DGD32F130_150 -DUSE_STDPERIPH_DRIVER -D_RTE_ -o .\objects\gd32f1x0_fwdgt.o --omf_browse .\objects\gd32f1x0_fwdgt.crf --depend .\objects\gd32f1x0_fwdgt.d) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_fwdgt.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\core_cm3.h)(0x5E8F79E2) +I (C:\Keil_v5\ARM\ARMCC\include\stdint.h)(0x5E8EE582) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_version.h)(0x5E8F79E2) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_compiler.h)(0x5E83AF82) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_armcc.h)(0x5E8F79E2) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\mpu_armv7.h)(0x5E8F79E2) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\system_gd32f1x0.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0_libopt.h)(0x5A7C59D6) +I (.\RTE\_Target_1\RTE_Components.h)(0x60C93F55) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_adc.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dbg.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dma.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_gpio.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_syscfg.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_i2c.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_pmu.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_rcu.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_timer.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_usart.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_wwdgt.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_misc.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_opa.h)(0x5A7B5838) +F (RTE\Device\GD32F130C8\gd32f1x0_gpio.c)(0x5A7B5838)(-c --cpu Cortex-M3 -D__EVAL -g -O0 --apcs=interwork -I.\RTE\_Target_1 -IC:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include -IC:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc -IC:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include -D__UVISION_VERSION="534" -D_RTE_ -DGD32F1x0 -DGD32F130_150 -DUSE_STDPERIPH_DRIVER -D_RTE_ -o .\objects\gd32f1x0_gpio.o --omf_browse .\objects\gd32f1x0_gpio.crf --depend .\objects\gd32f1x0_gpio.d) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_gpio.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\core_cm3.h)(0x5E8F79E2) +I (C:\Keil_v5\ARM\ARMCC\include\stdint.h)(0x5E8EE582) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_version.h)(0x5E8F79E2) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_compiler.h)(0x5E83AF82) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_armcc.h)(0x5E8F79E2) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\mpu_armv7.h)(0x5E8F79E2) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\system_gd32f1x0.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0_libopt.h)(0x5A7C59D6) +I (.\RTE\_Target_1\RTE_Components.h)(0x60C93F55) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_adc.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dbg.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dma.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_syscfg.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_i2c.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_fwdgt.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_pmu.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_rcu.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_timer.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_usart.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_wwdgt.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_misc.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_opa.h)(0x5A7B5838) +F (RTE\Device\GD32F130C8\gd32f1x0_i2c.c)(0x5A7B5838)(-c --cpu Cortex-M3 -D__EVAL -g -O0 --apcs=interwork -I.\RTE\_Target_1 -IC:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include -IC:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc -IC:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include -D__UVISION_VERSION="534" -D_RTE_ -DGD32F1x0 -DGD32F130_150 -DUSE_STDPERIPH_DRIVER -D_RTE_ -o .\objects\gd32f1x0_i2c.o --omf_browse .\objects\gd32f1x0_i2c.crf --depend .\objects\gd32f1x0_i2c.d) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_i2c.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\core_cm3.h)(0x5E8F79E2) +I (C:\Keil_v5\ARM\ARMCC\include\stdint.h)(0x5E8EE582) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_version.h)(0x5E8F79E2) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_compiler.h)(0x5E83AF82) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_armcc.h)(0x5E8F79E2) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\mpu_armv7.h)(0x5E8F79E2) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\system_gd32f1x0.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0_libopt.h)(0x5A7C59D6) +I (.\RTE\_Target_1\RTE_Components.h)(0x60C93F55) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_adc.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dbg.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dma.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_gpio.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_syscfg.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_fwdgt.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_pmu.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_rcu.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_timer.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_usart.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_wwdgt.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_misc.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_opa.h)(0x5A7B5838) +F (RTE\Device\GD32F130C8\gd32f1x0_misc.c)(0x5A7B5838)(-c --cpu Cortex-M3 -D__EVAL -g -O0 --apcs=interwork -I.\RTE\_Target_1 -IC:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include -IC:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc -IC:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include -D__UVISION_VERSION="534" -D_RTE_ -DGD32F1x0 -DGD32F130_150 -DUSE_STDPERIPH_DRIVER -D_RTE_ -o .\objects\gd32f1x0_misc.o --omf_browse .\objects\gd32f1x0_misc.crf --depend .\objects\gd32f1x0_misc.d) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_misc.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\core_cm3.h)(0x5E8F79E2) +I (C:\Keil_v5\ARM\ARMCC\include\stdint.h)(0x5E8EE582) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_version.h)(0x5E8F79E2) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_compiler.h)(0x5E83AF82) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_armcc.h)(0x5E8F79E2) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\mpu_armv7.h)(0x5E8F79E2) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\system_gd32f1x0.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0_libopt.h)(0x5A7C59D6) +I (.\RTE\_Target_1\RTE_Components.h)(0x60C93F55) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_adc.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dbg.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dma.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_gpio.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_syscfg.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_i2c.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_fwdgt.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_pmu.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_rcu.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_timer.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_usart.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_wwdgt.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_opa.h)(0x5A7B5838) +F (RTE\Device\GD32F130C8\gd32f1x0_opa.c)(0x5A7B5838)(-c --cpu Cortex-M3 -D__EVAL -g -O0 --apcs=interwork -I.\RTE\_Target_1 -IC:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include -IC:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc -IC:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include -D__UVISION_VERSION="534" -D_RTE_ -DGD32F1x0 -DGD32F130_150 -DUSE_STDPERIPH_DRIVER -D_RTE_ -o .\objects\gd32f1x0_opa.o --omf_browse .\objects\gd32f1x0_opa.crf --depend .\objects\gd32f1x0_opa.d) +F (RTE\Device\GD32F130C8\gd32f1x0_pmu.c)(0x5A7B5838)(-c --cpu Cortex-M3 -D__EVAL -g -O0 --apcs=interwork -I.\RTE\_Target_1 -IC:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include -IC:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc -IC:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include -D__UVISION_VERSION="534" -D_RTE_ -DGD32F1x0 -DGD32F130_150 -DUSE_STDPERIPH_DRIVER -D_RTE_ -o .\objects\gd32f1x0_pmu.o --omf_browse .\objects\gd32f1x0_pmu.crf --depend .\objects\gd32f1x0_pmu.d) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_pmu.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\core_cm3.h)(0x5E8F79E2) +I (C:\Keil_v5\ARM\ARMCC\include\stdint.h)(0x5E8EE582) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_version.h)(0x5E8F79E2) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_compiler.h)(0x5E83AF82) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_armcc.h)(0x5E8F79E2) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\mpu_armv7.h)(0x5E8F79E2) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\system_gd32f1x0.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0_libopt.h)(0x5A7C59D6) +I (.\RTE\_Target_1\RTE_Components.h)(0x60C93F55) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_adc.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dbg.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dma.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_gpio.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_syscfg.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_i2c.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_fwdgt.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_rcu.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_timer.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_usart.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_wwdgt.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_misc.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_opa.h)(0x5A7B5838) +F (RTE\Device\GD32F130C8\gd32f1x0_rcu.c)(0x5A7B5838)(-c --cpu Cortex-M3 -D__EVAL -g -O0 --apcs=interwork -I.\RTE\_Target_1 -IC:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include -IC:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc -IC:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include -D__UVISION_VERSION="534" -D_RTE_ -DGD32F1x0 -DGD32F130_150 -DUSE_STDPERIPH_DRIVER -D_RTE_ -o .\objects\gd32f1x0_rcu.o --omf_browse .\objects\gd32f1x0_rcu.crf --depend .\objects\gd32f1x0_rcu.d) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_rcu.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\core_cm3.h)(0x5E8F79E2) +I (C:\Keil_v5\ARM\ARMCC\include\stdint.h)(0x5E8EE582) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_version.h)(0x5E8F79E2) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_compiler.h)(0x5E83AF82) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_armcc.h)(0x5E8F79E2) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\mpu_armv7.h)(0x5E8F79E2) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\system_gd32f1x0.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0_libopt.h)(0x5A7C59D6) +I (.\RTE\_Target_1\RTE_Components.h)(0x60C93F55) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_adc.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dbg.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dma.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_gpio.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_syscfg.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_i2c.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_fwdgt.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_pmu.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_timer.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_usart.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_wwdgt.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_misc.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_opa.h)(0x5A7B5838) +F (RTE\Device\GD32F130C8\gd32f1x0_syscfg.c)(0x5A7B5838)(-c --cpu Cortex-M3 -D__EVAL -g -O0 --apcs=interwork -I.\RTE\_Target_1 -IC:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include -IC:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc -IC:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include -D__UVISION_VERSION="534" -D_RTE_ -DGD32F1x0 -DGD32F130_150 -DUSE_STDPERIPH_DRIVER -D_RTE_ -o .\objects\gd32f1x0_syscfg.o --omf_browse .\objects\gd32f1x0_syscfg.crf --depend .\objects\gd32f1x0_syscfg.d) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_syscfg.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\core_cm3.h)(0x5E8F79E2) +I (C:\Keil_v5\ARM\ARMCC\include\stdint.h)(0x5E8EE582) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_version.h)(0x5E8F79E2) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_compiler.h)(0x5E83AF82) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_armcc.h)(0x5E8F79E2) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\mpu_armv7.h)(0x5E8F79E2) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\system_gd32f1x0.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0_libopt.h)(0x5A7C59D6) +I (.\RTE\_Target_1\RTE_Components.h)(0x60C93F55) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_adc.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dbg.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dma.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_gpio.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_i2c.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_fwdgt.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_pmu.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_rcu.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_timer.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_usart.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_wwdgt.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_misc.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_opa.h)(0x5A7B5838) +F (RTE\Device\GD32F130C8\gd32f1x0_timer.c)(0x5A7B5838)(-c --cpu Cortex-M3 -D__EVAL -g -O0 --apcs=interwork -I.\RTE\_Target_1 -IC:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include -IC:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc -IC:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include -D__UVISION_VERSION="534" -D_RTE_ -DGD32F1x0 -DGD32F130_150 -DUSE_STDPERIPH_DRIVER -D_RTE_ -o .\objects\gd32f1x0_timer.o --omf_browse .\objects\gd32f1x0_timer.crf --depend .\objects\gd32f1x0_timer.d) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_timer.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\core_cm3.h)(0x5E8F79E2) +I (C:\Keil_v5\ARM\ARMCC\include\stdint.h)(0x5E8EE582) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_version.h)(0x5E8F79E2) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_compiler.h)(0x5E83AF82) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_armcc.h)(0x5E8F79E2) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\mpu_armv7.h)(0x5E8F79E2) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\system_gd32f1x0.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0_libopt.h)(0x5A7C59D6) +I (.\RTE\_Target_1\RTE_Components.h)(0x60C93F55) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_adc.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dbg.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dma.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_gpio.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_syscfg.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_i2c.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_fwdgt.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_pmu.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_rcu.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_usart.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_wwdgt.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_misc.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_opa.h)(0x5A7B5838) +F (RTE\Device\GD32F130C8\gd32f1x0_usart.c)(0x5A7B5838)(-c --cpu Cortex-M3 -D__EVAL -g -O0 --apcs=interwork -I.\RTE\_Target_1 -IC:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include -IC:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc -IC:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include -D__UVISION_VERSION="534" -D_RTE_ -DGD32F1x0 -DGD32F130_150 -DUSE_STDPERIPH_DRIVER -D_RTE_ -o .\objects\gd32f1x0_usart.o --omf_browse .\objects\gd32f1x0_usart.crf --depend .\objects\gd32f1x0_usart.d) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_usart.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\core_cm3.h)(0x5E8F79E2) +I (C:\Keil_v5\ARM\ARMCC\include\stdint.h)(0x5E8EE582) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_version.h)(0x5E8F79E2) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_compiler.h)(0x5E83AF82) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_armcc.h)(0x5E8F79E2) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\mpu_armv7.h)(0x5E8F79E2) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\system_gd32f1x0.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0_libopt.h)(0x5A7C59D6) +I (.\RTE\_Target_1\RTE_Components.h)(0x60C93F55) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_adc.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dbg.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dma.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_gpio.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_syscfg.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_i2c.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_fwdgt.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_pmu.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_rcu.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_timer.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_wwdgt.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_misc.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_opa.h)(0x5A7B5838) +F (RTE\Device\GD32F130C8\gd32f1x0_wwdgt.c)(0x5A7B5838)(-c --cpu Cortex-M3 -D__EVAL -g -O0 --apcs=interwork -I.\RTE\_Target_1 -IC:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include -IC:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc -IC:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include -D__UVISION_VERSION="534" -D_RTE_ -DGD32F1x0 -DGD32F130_150 -DUSE_STDPERIPH_DRIVER -D_RTE_ -o .\objects\gd32f1x0_wwdgt.o --omf_browse .\objects\gd32f1x0_wwdgt.crf --depend .\objects\gd32f1x0_wwdgt.d) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_wwdgt.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\core_cm3.h)(0x5E8F79E2) +I (C:\Keil_v5\ARM\ARMCC\include\stdint.h)(0x5E8EE582) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_version.h)(0x5E8F79E2) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_compiler.h)(0x5E83AF82) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_armcc.h)(0x5E8F79E2) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\mpu_armv7.h)(0x5E8F79E2) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\system_gd32f1x0.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0_libopt.h)(0x5A7C59D6) +I (.\RTE\_Target_1\RTE_Components.h)(0x60C93F55) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_adc.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dbg.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dma.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_gpio.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_syscfg.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_i2c.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_fwdgt.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_pmu.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_rcu.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_timer.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_usart.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_misc.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_opa.h)(0x5A7B5838) +F (RTE\Device\GD32F130C8\startup_gd32f1x0.s)(0x5A7B583A)(--cpu Cortex-M3 --pd "__EVAL SETA 1" -g --apcs=interwork -I.\RTE\_Target_1 -IC:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include -IC:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc -IC:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include --pd "__UVISION_VERSION SETA 534" --pd "_RTE_ SETA 1" --pd "GD32F1x0 SETA 1" --pd "GD32F130_150 SETA 1" --pd "USE_STDPERIPH_DRIVER SETA 1" --pd "_RTE_ SETA 1" --list .\listings\startup_gd32f1x0.lst --xref -o .\objects\startup_gd32f1x0.o --depend .\objects\startup_gd32f1x0.d) +F (RTE\Device\GD32F130C8\system_gd32f1x0.c)(0x5A7B583A)(-c --cpu Cortex-M3 -D__EVAL -g -O0 --apcs=interwork -I.\RTE\_Target_1 -IC:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include -IC:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc -IC:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include -D__UVISION_VERSION="534" -D_RTE_ -DGD32F1x0 -DGD32F130_150 -DUSE_STDPERIPH_DRIVER -D_RTE_ -o .\objects\system_gd32f1x0.o --omf_browse .\objects\system_gd32f1x0.crf --depend .\objects\system_gd32f1x0.d) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\core_cm3.h)(0x5E8F79E2) +I (C:\Keil_v5\ARM\ARMCC\include\stdint.h)(0x5E8EE582) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_version.h)(0x5E8F79E2) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_compiler.h)(0x5E83AF82) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_armcc.h)(0x5E8F79E2) +I (C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\mpu_armv7.h)(0x5E8F79E2) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\system_gd32f1x0.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0_libopt.h)(0x5A7C59D6) +I (.\RTE\_Target_1\RTE_Components.h)(0x60C93F55) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_adc.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dbg.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dma.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_gpio.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_syscfg.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_i2c.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_fwdgt.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_pmu.h)(0x5A7B5838) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_rcu.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_timer.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_usart.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_wwdgt.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_misc.h)(0x5A7B583A) +I (C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_opa.h)(0x5A7B5838) diff --git a/HUGS/Objects/bldc.crf b/HUGS/Objects/bldc.crf new file mode 100644 index 00000000..bb872ecb Binary files /dev/null and b/HUGS/Objects/bldc.crf differ diff --git a/HUGS/Objects/bldc.d b/HUGS/Objects/bldc.d new file mode 100644 index 00000000..81de7077 --- /dev/null +++ b/HUGS/Objects/bldc.d @@ -0,0 +1,30 @@ +.\objects\bldc.o: Src\bldc.c +.\objects\bldc.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0.h +.\objects\bldc.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\core_cm3.h +.\objects\bldc.o: C:\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h +.\objects\bldc.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_version.h +.\objects\bldc.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_compiler.h +.\objects\bldc.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_armcc.h +.\objects\bldc.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\mpu_armv7.h +.\objects\bldc.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\system_gd32f1x0.h +.\objects\bldc.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0_libopt.h +.\objects\bldc.o: .\RTE\_Target_1\RTE_Components.h +.\objects\bldc.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_adc.h +.\objects\bldc.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0.h +.\objects\bldc.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dbg.h +.\objects\bldc.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dma.h +.\objects\bldc.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_gpio.h +.\objects\bldc.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_syscfg.h +.\objects\bldc.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_i2c.h +.\objects\bldc.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_fwdgt.h +.\objects\bldc.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_pmu.h +.\objects\bldc.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_rcu.h +.\objects\bldc.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_timer.h +.\objects\bldc.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_usart.h +.\objects\bldc.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_wwdgt.h +.\objects\bldc.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_misc.h +.\objects\bldc.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_opa.h +.\objects\bldc.o: Src\../Inc/setup.h +.\objects\bldc.o: Src\../Inc/../Inc/config.h +.\objects\bldc.o: Src\../Inc/defines.h +.\objects\bldc.o: Src\../Inc/bldc.h diff --git a/HUGS/Objects/bldc.o b/HUGS/Objects/bldc.o new file mode 100644 index 00000000..0855881e Binary files /dev/null and b/HUGS/Objects/bldc.o differ diff --git a/HUGS/Objects/comms.crf b/HUGS/Objects/comms.crf new file mode 100644 index 00000000..239bfe2f Binary files /dev/null and b/HUGS/Objects/comms.crf differ diff --git a/HUGS/Objects/comms.d b/HUGS/Objects/comms.d new file mode 100644 index 00000000..ee31a096 --- /dev/null +++ b/HUGS/Objects/comms.d @@ -0,0 +1,26 @@ +.\objects\comms.o: Src\comms.c +.\objects\comms.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0.h +.\objects\comms.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\core_cm3.h +.\objects\comms.o: C:\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h +.\objects\comms.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_version.h +.\objects\comms.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_compiler.h +.\objects\comms.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_armcc.h +.\objects\comms.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\mpu_armv7.h +.\objects\comms.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\system_gd32f1x0.h +.\objects\comms.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0_libopt.h +.\objects\comms.o: .\RTE\_Target_1\RTE_Components.h +.\objects\comms.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_adc.h +.\objects\comms.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0.h +.\objects\comms.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dbg.h +.\objects\comms.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dma.h +.\objects\comms.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_gpio.h +.\objects\comms.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_syscfg.h +.\objects\comms.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_i2c.h +.\objects\comms.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_fwdgt.h +.\objects\comms.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_pmu.h +.\objects\comms.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_rcu.h +.\objects\comms.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_timer.h +.\objects\comms.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_usart.h +.\objects\comms.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_wwdgt.h +.\objects\comms.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_misc.h +.\objects\comms.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_opa.h diff --git a/HUGS/Objects/comms.o b/HUGS/Objects/comms.o new file mode 100644 index 00000000..95d7d2a2 Binary files /dev/null and b/HUGS/Objects/comms.o differ diff --git a/HUGS/Objects/commshugs.crf b/HUGS/Objects/commshugs.crf new file mode 100644 index 00000000..68eaad21 Binary files /dev/null and b/HUGS/Objects/commshugs.crf differ diff --git a/HUGS/Objects/commshugs.d b/HUGS/Objects/commshugs.d new file mode 100644 index 00000000..d661ec04 --- /dev/null +++ b/HUGS/Objects/commshugs.d @@ -0,0 +1,35 @@ +.\objects\commshugs.o: Src\commsHUGS.c +.\objects\commshugs.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0.h +.\objects\commshugs.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\core_cm3.h +.\objects\commshugs.o: C:\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h +.\objects\commshugs.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_version.h +.\objects\commshugs.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_compiler.h +.\objects\commshugs.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_armcc.h +.\objects\commshugs.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\mpu_armv7.h +.\objects\commshugs.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\system_gd32f1x0.h +.\objects\commshugs.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0_libopt.h +.\objects\commshugs.o: .\RTE\_Target_1\RTE_Components.h +.\objects\commshugs.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_adc.h +.\objects\commshugs.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0.h +.\objects\commshugs.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dbg.h +.\objects\commshugs.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dma.h +.\objects\commshugs.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_gpio.h +.\objects\commshugs.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_syscfg.h +.\objects\commshugs.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_i2c.h +.\objects\commshugs.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_fwdgt.h +.\objects\commshugs.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_pmu.h +.\objects\commshugs.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_rcu.h +.\objects\commshugs.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_timer.h +.\objects\commshugs.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_usart.h +.\objects\commshugs.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_wwdgt.h +.\objects\commshugs.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_misc.h +.\objects\commshugs.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_opa.h +.\objects\commshugs.o: Src\../Inc/it.h +.\objects\commshugs.o: Src\../Inc/../Inc/config.h +.\objects\commshugs.o: Src\../Inc/comms.h +.\objects\commshugs.o: Src\../Inc/commsHUGS.h +.\objects\commshugs.o: Src\../Inc/setup.h +.\objects\commshugs.o: Src\../Inc/defines.h +.\objects\commshugs.o: Src\../Inc/bldc.h +.\objects\commshugs.o: C:\Keil_v5\ARM\ARMCC\Bin\..\include\stdio.h +.\objects\commshugs.o: C:\Keil_v5\ARM\ARMCC\Bin\..\include\string.h diff --git a/HUGS/Objects/commshugs.o b/HUGS/Objects/commshugs.o new file mode 100644 index 00000000..f6b9ad13 Binary files /dev/null and b/HUGS/Objects/commshugs.o differ diff --git a/HUGS/Objects/commssteering.crf b/HUGS/Objects/commssteering.crf new file mode 100644 index 00000000..daade68a Binary files /dev/null and b/HUGS/Objects/commssteering.crf differ diff --git a/HUGS/Objects/commssteering.d b/HUGS/Objects/commssteering.d new file mode 100644 index 00000000..74fce602 --- /dev/null +++ b/HUGS/Objects/commssteering.d @@ -0,0 +1,36 @@ +.\objects\commssteering.o: Src\commsSteering.c +.\objects\commssteering.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0.h +.\objects\commssteering.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\core_cm3.h +.\objects\commssteering.o: C:\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h +.\objects\commssteering.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_version.h +.\objects\commssteering.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_compiler.h +.\objects\commssteering.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_armcc.h +.\objects\commssteering.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\mpu_armv7.h +.\objects\commssteering.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\system_gd32f1x0.h +.\objects\commssteering.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0_libopt.h +.\objects\commssteering.o: .\RTE\_Target_1\RTE_Components.h +.\objects\commssteering.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_adc.h +.\objects\commssteering.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0.h +.\objects\commssteering.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dbg.h +.\objects\commssteering.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dma.h +.\objects\commssteering.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_gpio.h +.\objects\commssteering.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_syscfg.h +.\objects\commssteering.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_i2c.h +.\objects\commssteering.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_fwdgt.h +.\objects\commssteering.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_pmu.h +.\objects\commssteering.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_rcu.h +.\objects\commssteering.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_timer.h +.\objects\commssteering.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_usart.h +.\objects\commssteering.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_wwdgt.h +.\objects\commssteering.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_misc.h +.\objects\commssteering.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_opa.h +.\objects\commssteering.o: Src\../Inc/it.h +.\objects\commssteering.o: Src\../Inc/../Inc/config.h +.\objects\commssteering.o: Src\../Inc/comms.h +.\objects\commssteering.o: Src\../Inc/commsHUGS.h +.\objects\commssteering.o: Src\../Inc/commsSteering.h +.\objects\commssteering.o: Src\../Inc/setup.h +.\objects\commssteering.o: Src\../Inc/defines.h +.\objects\commssteering.o: Src\../Inc/bldc.h +.\objects\commssteering.o: C:\Keil_v5\ARM\ARMCC\Bin\..\include\stdio.h +.\objects\commssteering.o: C:\Keil_v5\ARM\ARMCC\Bin\..\include\string.h diff --git a/HUGS/Objects/commssteering.o b/HUGS/Objects/commssteering.o new file mode 100644 index 00000000..c91f5e09 Binary files /dev/null and b/HUGS/Objects/commssteering.o differ diff --git a/HUGS/Objects/gd32f1x0_adc.crf b/HUGS/Objects/gd32f1x0_adc.crf new file mode 100644 index 00000000..e7018cc3 Binary files /dev/null and b/HUGS/Objects/gd32f1x0_adc.crf differ diff --git a/HUGS/Objects/gd32f1x0_adc.d b/HUGS/Objects/gd32f1x0_adc.d new file mode 100644 index 00000000..5d770b32 --- /dev/null +++ b/HUGS/Objects/gd32f1x0_adc.d @@ -0,0 +1,27 @@ +.\objects\gd32f1x0_adc.o: RTE\Device\GD32F130C8\gd32f1x0_adc.c +.\objects\gd32f1x0_adc.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_adc.h +.\objects\gd32f1x0_adc.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0.h +.\objects\gd32f1x0_adc.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\core_cm3.h +.\objects\gd32f1x0_adc.o: C:\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h +.\objects\gd32f1x0_adc.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_version.h +.\objects\gd32f1x0_adc.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_compiler.h +.\objects\gd32f1x0_adc.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_armcc.h +.\objects\gd32f1x0_adc.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\mpu_armv7.h +.\objects\gd32f1x0_adc.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\system_gd32f1x0.h +.\objects\gd32f1x0_adc.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0_libopt.h +.\objects\gd32f1x0_adc.o: .\RTE\_Target_1\RTE_Components.h +.\objects\gd32f1x0_adc.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_adc.h +.\objects\gd32f1x0_adc.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dbg.h +.\objects\gd32f1x0_adc.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0.h +.\objects\gd32f1x0_adc.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dma.h +.\objects\gd32f1x0_adc.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_gpio.h +.\objects\gd32f1x0_adc.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_syscfg.h +.\objects\gd32f1x0_adc.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_i2c.h +.\objects\gd32f1x0_adc.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_fwdgt.h +.\objects\gd32f1x0_adc.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_pmu.h +.\objects\gd32f1x0_adc.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_rcu.h +.\objects\gd32f1x0_adc.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_timer.h +.\objects\gd32f1x0_adc.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_usart.h +.\objects\gd32f1x0_adc.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_wwdgt.h +.\objects\gd32f1x0_adc.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_misc.h +.\objects\gd32f1x0_adc.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_opa.h diff --git a/HUGS/Objects/gd32f1x0_adc.o b/HUGS/Objects/gd32f1x0_adc.o new file mode 100644 index 00000000..8d9ed8e4 Binary files /dev/null and b/HUGS/Objects/gd32f1x0_adc.o differ diff --git a/HUGS/Objects/gd32f1x0_dbg.crf b/HUGS/Objects/gd32f1x0_dbg.crf new file mode 100644 index 00000000..5ff3b3ed Binary files /dev/null and b/HUGS/Objects/gd32f1x0_dbg.crf differ diff --git a/HUGS/Objects/gd32f1x0_dbg.d b/HUGS/Objects/gd32f1x0_dbg.d new file mode 100644 index 00000000..000c733b --- /dev/null +++ b/HUGS/Objects/gd32f1x0_dbg.d @@ -0,0 +1,27 @@ +.\objects\gd32f1x0_dbg.o: RTE\Device\GD32F130C8\gd32f1x0_dbg.c +.\objects\gd32f1x0_dbg.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dbg.h +.\objects\gd32f1x0_dbg.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0.h +.\objects\gd32f1x0_dbg.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\core_cm3.h +.\objects\gd32f1x0_dbg.o: C:\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h +.\objects\gd32f1x0_dbg.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_version.h +.\objects\gd32f1x0_dbg.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_compiler.h +.\objects\gd32f1x0_dbg.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_armcc.h +.\objects\gd32f1x0_dbg.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\mpu_armv7.h +.\objects\gd32f1x0_dbg.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\system_gd32f1x0.h +.\objects\gd32f1x0_dbg.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0_libopt.h +.\objects\gd32f1x0_dbg.o: .\RTE\_Target_1\RTE_Components.h +.\objects\gd32f1x0_dbg.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_adc.h +.\objects\gd32f1x0_dbg.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0.h +.\objects\gd32f1x0_dbg.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dbg.h +.\objects\gd32f1x0_dbg.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dma.h +.\objects\gd32f1x0_dbg.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_gpio.h +.\objects\gd32f1x0_dbg.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_syscfg.h +.\objects\gd32f1x0_dbg.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_i2c.h +.\objects\gd32f1x0_dbg.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_fwdgt.h +.\objects\gd32f1x0_dbg.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_pmu.h +.\objects\gd32f1x0_dbg.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_rcu.h +.\objects\gd32f1x0_dbg.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_timer.h +.\objects\gd32f1x0_dbg.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_usart.h +.\objects\gd32f1x0_dbg.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_wwdgt.h +.\objects\gd32f1x0_dbg.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_misc.h +.\objects\gd32f1x0_dbg.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_opa.h diff --git a/HUGS/Objects/gd32f1x0_dbg.o b/HUGS/Objects/gd32f1x0_dbg.o new file mode 100644 index 00000000..258b915c Binary files /dev/null and b/HUGS/Objects/gd32f1x0_dbg.o differ diff --git a/HUGS/Objects/gd32f1x0_dma.crf b/HUGS/Objects/gd32f1x0_dma.crf new file mode 100644 index 00000000..4100f2d2 Binary files /dev/null and b/HUGS/Objects/gd32f1x0_dma.crf differ diff --git a/HUGS/Objects/gd32f1x0_dma.d b/HUGS/Objects/gd32f1x0_dma.d new file mode 100644 index 00000000..57e1bd12 --- /dev/null +++ b/HUGS/Objects/gd32f1x0_dma.d @@ -0,0 +1,27 @@ +.\objects\gd32f1x0_dma.o: RTE\Device\GD32F130C8\gd32f1x0_dma.c +.\objects\gd32f1x0_dma.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dma.h +.\objects\gd32f1x0_dma.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0.h +.\objects\gd32f1x0_dma.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\core_cm3.h +.\objects\gd32f1x0_dma.o: C:\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h +.\objects\gd32f1x0_dma.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_version.h +.\objects\gd32f1x0_dma.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_compiler.h +.\objects\gd32f1x0_dma.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_armcc.h +.\objects\gd32f1x0_dma.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\mpu_armv7.h +.\objects\gd32f1x0_dma.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\system_gd32f1x0.h +.\objects\gd32f1x0_dma.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0_libopt.h +.\objects\gd32f1x0_dma.o: .\RTE\_Target_1\RTE_Components.h +.\objects\gd32f1x0_dma.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_adc.h +.\objects\gd32f1x0_dma.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0.h +.\objects\gd32f1x0_dma.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dbg.h +.\objects\gd32f1x0_dma.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dma.h +.\objects\gd32f1x0_dma.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_gpio.h +.\objects\gd32f1x0_dma.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_syscfg.h +.\objects\gd32f1x0_dma.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_i2c.h +.\objects\gd32f1x0_dma.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_fwdgt.h +.\objects\gd32f1x0_dma.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_pmu.h +.\objects\gd32f1x0_dma.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_rcu.h +.\objects\gd32f1x0_dma.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_timer.h +.\objects\gd32f1x0_dma.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_usart.h +.\objects\gd32f1x0_dma.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_wwdgt.h +.\objects\gd32f1x0_dma.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_misc.h +.\objects\gd32f1x0_dma.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_opa.h diff --git a/HUGS/Objects/gd32f1x0_dma.o b/HUGS/Objects/gd32f1x0_dma.o new file mode 100644 index 00000000..9a40c66b Binary files /dev/null and b/HUGS/Objects/gd32f1x0_dma.o differ diff --git a/HUGS/Objects/gd32f1x0_fwdgt.crf b/HUGS/Objects/gd32f1x0_fwdgt.crf new file mode 100644 index 00000000..2d503f85 Binary files /dev/null and b/HUGS/Objects/gd32f1x0_fwdgt.crf differ diff --git a/HUGS/Objects/gd32f1x0_fwdgt.d b/HUGS/Objects/gd32f1x0_fwdgt.d new file mode 100644 index 00000000..ae789318 --- /dev/null +++ b/HUGS/Objects/gd32f1x0_fwdgt.d @@ -0,0 +1,27 @@ +.\objects\gd32f1x0_fwdgt.o: RTE\Device\GD32F130C8\gd32f1x0_fwdgt.c +.\objects\gd32f1x0_fwdgt.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_fwdgt.h +.\objects\gd32f1x0_fwdgt.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0.h +.\objects\gd32f1x0_fwdgt.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\core_cm3.h +.\objects\gd32f1x0_fwdgt.o: C:\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h +.\objects\gd32f1x0_fwdgt.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_version.h +.\objects\gd32f1x0_fwdgt.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_compiler.h +.\objects\gd32f1x0_fwdgt.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_armcc.h +.\objects\gd32f1x0_fwdgt.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\mpu_armv7.h +.\objects\gd32f1x0_fwdgt.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\system_gd32f1x0.h +.\objects\gd32f1x0_fwdgt.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0_libopt.h +.\objects\gd32f1x0_fwdgt.o: .\RTE\_Target_1\RTE_Components.h +.\objects\gd32f1x0_fwdgt.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_adc.h +.\objects\gd32f1x0_fwdgt.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0.h +.\objects\gd32f1x0_fwdgt.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dbg.h +.\objects\gd32f1x0_fwdgt.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dma.h +.\objects\gd32f1x0_fwdgt.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_gpio.h +.\objects\gd32f1x0_fwdgt.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_syscfg.h +.\objects\gd32f1x0_fwdgt.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_i2c.h +.\objects\gd32f1x0_fwdgt.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_fwdgt.h +.\objects\gd32f1x0_fwdgt.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_pmu.h +.\objects\gd32f1x0_fwdgt.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_rcu.h +.\objects\gd32f1x0_fwdgt.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_timer.h +.\objects\gd32f1x0_fwdgt.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_usart.h +.\objects\gd32f1x0_fwdgt.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_wwdgt.h +.\objects\gd32f1x0_fwdgt.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_misc.h +.\objects\gd32f1x0_fwdgt.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_opa.h diff --git a/HUGS/Objects/gd32f1x0_fwdgt.o b/HUGS/Objects/gd32f1x0_fwdgt.o new file mode 100644 index 00000000..21157122 Binary files /dev/null and b/HUGS/Objects/gd32f1x0_fwdgt.o differ diff --git a/HUGS/Objects/gd32f1x0_gpio.crf b/HUGS/Objects/gd32f1x0_gpio.crf new file mode 100644 index 00000000..381b2c05 Binary files /dev/null and b/HUGS/Objects/gd32f1x0_gpio.crf differ diff --git a/HUGS/Objects/gd32f1x0_gpio.d b/HUGS/Objects/gd32f1x0_gpio.d new file mode 100644 index 00000000..614374b1 --- /dev/null +++ b/HUGS/Objects/gd32f1x0_gpio.d @@ -0,0 +1,27 @@ +.\objects\gd32f1x0_gpio.o: RTE\Device\GD32F130C8\gd32f1x0_gpio.c +.\objects\gd32f1x0_gpio.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_gpio.h +.\objects\gd32f1x0_gpio.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0.h +.\objects\gd32f1x0_gpio.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\core_cm3.h +.\objects\gd32f1x0_gpio.o: C:\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h +.\objects\gd32f1x0_gpio.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_version.h +.\objects\gd32f1x0_gpio.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_compiler.h +.\objects\gd32f1x0_gpio.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_armcc.h +.\objects\gd32f1x0_gpio.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\mpu_armv7.h +.\objects\gd32f1x0_gpio.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\system_gd32f1x0.h +.\objects\gd32f1x0_gpio.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0_libopt.h +.\objects\gd32f1x0_gpio.o: .\RTE\_Target_1\RTE_Components.h +.\objects\gd32f1x0_gpio.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_adc.h +.\objects\gd32f1x0_gpio.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0.h +.\objects\gd32f1x0_gpio.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dbg.h +.\objects\gd32f1x0_gpio.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dma.h +.\objects\gd32f1x0_gpio.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_gpio.h +.\objects\gd32f1x0_gpio.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_syscfg.h +.\objects\gd32f1x0_gpio.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_i2c.h +.\objects\gd32f1x0_gpio.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_fwdgt.h +.\objects\gd32f1x0_gpio.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_pmu.h +.\objects\gd32f1x0_gpio.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_rcu.h +.\objects\gd32f1x0_gpio.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_timer.h +.\objects\gd32f1x0_gpio.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_usart.h +.\objects\gd32f1x0_gpio.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_wwdgt.h +.\objects\gd32f1x0_gpio.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_misc.h +.\objects\gd32f1x0_gpio.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_opa.h diff --git a/HUGS/Objects/gd32f1x0_gpio.o b/HUGS/Objects/gd32f1x0_gpio.o new file mode 100644 index 00000000..03445ace Binary files /dev/null and b/HUGS/Objects/gd32f1x0_gpio.o differ diff --git a/HUGS/Objects/gd32f1x0_i2c.crf b/HUGS/Objects/gd32f1x0_i2c.crf new file mode 100644 index 00000000..1af64e75 Binary files /dev/null and b/HUGS/Objects/gd32f1x0_i2c.crf differ diff --git a/HUGS/Objects/gd32f1x0_i2c.d b/HUGS/Objects/gd32f1x0_i2c.d new file mode 100644 index 00000000..533aaddf --- /dev/null +++ b/HUGS/Objects/gd32f1x0_i2c.d @@ -0,0 +1,27 @@ +.\objects\gd32f1x0_i2c.o: RTE\Device\GD32F130C8\gd32f1x0_i2c.c +.\objects\gd32f1x0_i2c.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_i2c.h +.\objects\gd32f1x0_i2c.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0.h +.\objects\gd32f1x0_i2c.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\core_cm3.h +.\objects\gd32f1x0_i2c.o: C:\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h +.\objects\gd32f1x0_i2c.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_version.h +.\objects\gd32f1x0_i2c.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_compiler.h +.\objects\gd32f1x0_i2c.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_armcc.h +.\objects\gd32f1x0_i2c.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\mpu_armv7.h +.\objects\gd32f1x0_i2c.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\system_gd32f1x0.h +.\objects\gd32f1x0_i2c.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0_libopt.h +.\objects\gd32f1x0_i2c.o: .\RTE\_Target_1\RTE_Components.h +.\objects\gd32f1x0_i2c.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_adc.h +.\objects\gd32f1x0_i2c.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0.h +.\objects\gd32f1x0_i2c.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dbg.h +.\objects\gd32f1x0_i2c.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dma.h +.\objects\gd32f1x0_i2c.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_gpio.h +.\objects\gd32f1x0_i2c.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_syscfg.h +.\objects\gd32f1x0_i2c.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_i2c.h +.\objects\gd32f1x0_i2c.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_fwdgt.h +.\objects\gd32f1x0_i2c.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_pmu.h +.\objects\gd32f1x0_i2c.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_rcu.h +.\objects\gd32f1x0_i2c.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_timer.h +.\objects\gd32f1x0_i2c.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_usart.h +.\objects\gd32f1x0_i2c.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_wwdgt.h +.\objects\gd32f1x0_i2c.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_misc.h +.\objects\gd32f1x0_i2c.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_opa.h diff --git a/HUGS/Objects/gd32f1x0_i2c.o b/HUGS/Objects/gd32f1x0_i2c.o new file mode 100644 index 00000000..30b66590 Binary files /dev/null and b/HUGS/Objects/gd32f1x0_i2c.o differ diff --git a/HUGS/Objects/gd32f1x0_misc.crf b/HUGS/Objects/gd32f1x0_misc.crf new file mode 100644 index 00000000..b4880f08 Binary files /dev/null and b/HUGS/Objects/gd32f1x0_misc.crf differ diff --git a/HUGS/Objects/gd32f1x0_misc.d b/HUGS/Objects/gd32f1x0_misc.d new file mode 100644 index 00000000..702ff4e3 --- /dev/null +++ b/HUGS/Objects/gd32f1x0_misc.d @@ -0,0 +1,27 @@ +.\objects\gd32f1x0_misc.o: RTE\Device\GD32F130C8\gd32f1x0_misc.c +.\objects\gd32f1x0_misc.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_misc.h +.\objects\gd32f1x0_misc.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0.h +.\objects\gd32f1x0_misc.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\core_cm3.h +.\objects\gd32f1x0_misc.o: C:\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h +.\objects\gd32f1x0_misc.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_version.h +.\objects\gd32f1x0_misc.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_compiler.h +.\objects\gd32f1x0_misc.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_armcc.h +.\objects\gd32f1x0_misc.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\mpu_armv7.h +.\objects\gd32f1x0_misc.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\system_gd32f1x0.h +.\objects\gd32f1x0_misc.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0_libopt.h +.\objects\gd32f1x0_misc.o: .\RTE\_Target_1\RTE_Components.h +.\objects\gd32f1x0_misc.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_adc.h +.\objects\gd32f1x0_misc.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0.h +.\objects\gd32f1x0_misc.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dbg.h +.\objects\gd32f1x0_misc.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dma.h +.\objects\gd32f1x0_misc.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_gpio.h +.\objects\gd32f1x0_misc.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_syscfg.h +.\objects\gd32f1x0_misc.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_i2c.h +.\objects\gd32f1x0_misc.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_fwdgt.h +.\objects\gd32f1x0_misc.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_pmu.h +.\objects\gd32f1x0_misc.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_rcu.h +.\objects\gd32f1x0_misc.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_timer.h +.\objects\gd32f1x0_misc.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_usart.h +.\objects\gd32f1x0_misc.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_wwdgt.h +.\objects\gd32f1x0_misc.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_misc.h +.\objects\gd32f1x0_misc.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_opa.h diff --git a/HUGS/Objects/gd32f1x0_misc.o b/HUGS/Objects/gd32f1x0_misc.o new file mode 100644 index 00000000..c91d4d00 Binary files /dev/null and b/HUGS/Objects/gd32f1x0_misc.o differ diff --git a/HUGS/Objects/gd32f1x0_opa.crf b/HUGS/Objects/gd32f1x0_opa.crf new file mode 100644 index 00000000..81d28216 Binary files /dev/null and b/HUGS/Objects/gd32f1x0_opa.crf differ diff --git a/HUGS/Objects/gd32f1x0_opa.d b/HUGS/Objects/gd32f1x0_opa.d new file mode 100644 index 00000000..46570c0a --- /dev/null +++ b/HUGS/Objects/gd32f1x0_opa.d @@ -0,0 +1 @@ +.\objects\gd32f1x0_opa.o: RTE\Device\GD32F130C8\gd32f1x0_opa.c diff --git a/HUGS/Objects/gd32f1x0_opa.o b/HUGS/Objects/gd32f1x0_opa.o new file mode 100644 index 00000000..c03a4997 Binary files /dev/null and b/HUGS/Objects/gd32f1x0_opa.o differ diff --git a/HUGS/Objects/gd32f1x0_pmu.crf b/HUGS/Objects/gd32f1x0_pmu.crf new file mode 100644 index 00000000..10f93b06 Binary files /dev/null and b/HUGS/Objects/gd32f1x0_pmu.crf differ diff --git a/HUGS/Objects/gd32f1x0_pmu.d b/HUGS/Objects/gd32f1x0_pmu.d new file mode 100644 index 00000000..730ed3cb --- /dev/null +++ b/HUGS/Objects/gd32f1x0_pmu.d @@ -0,0 +1,27 @@ +.\objects\gd32f1x0_pmu.o: RTE\Device\GD32F130C8\gd32f1x0_pmu.c +.\objects\gd32f1x0_pmu.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_pmu.h +.\objects\gd32f1x0_pmu.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0.h +.\objects\gd32f1x0_pmu.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\core_cm3.h +.\objects\gd32f1x0_pmu.o: C:\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h +.\objects\gd32f1x0_pmu.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_version.h +.\objects\gd32f1x0_pmu.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_compiler.h +.\objects\gd32f1x0_pmu.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_armcc.h +.\objects\gd32f1x0_pmu.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\mpu_armv7.h +.\objects\gd32f1x0_pmu.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\system_gd32f1x0.h +.\objects\gd32f1x0_pmu.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0_libopt.h +.\objects\gd32f1x0_pmu.o: .\RTE\_Target_1\RTE_Components.h +.\objects\gd32f1x0_pmu.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_adc.h +.\objects\gd32f1x0_pmu.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0.h +.\objects\gd32f1x0_pmu.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dbg.h +.\objects\gd32f1x0_pmu.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dma.h +.\objects\gd32f1x0_pmu.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_gpio.h +.\objects\gd32f1x0_pmu.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_syscfg.h +.\objects\gd32f1x0_pmu.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_i2c.h +.\objects\gd32f1x0_pmu.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_fwdgt.h +.\objects\gd32f1x0_pmu.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_pmu.h +.\objects\gd32f1x0_pmu.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_rcu.h +.\objects\gd32f1x0_pmu.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_timer.h +.\objects\gd32f1x0_pmu.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_usart.h +.\objects\gd32f1x0_pmu.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_wwdgt.h +.\objects\gd32f1x0_pmu.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_misc.h +.\objects\gd32f1x0_pmu.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_opa.h diff --git a/HUGS/Objects/gd32f1x0_pmu.o b/HUGS/Objects/gd32f1x0_pmu.o new file mode 100644 index 00000000..898f1d18 Binary files /dev/null and b/HUGS/Objects/gd32f1x0_pmu.o differ diff --git a/HUGS/Objects/gd32f1x0_rcu.crf b/HUGS/Objects/gd32f1x0_rcu.crf new file mode 100644 index 00000000..48ff942f Binary files /dev/null and b/HUGS/Objects/gd32f1x0_rcu.crf differ diff --git a/HUGS/Objects/gd32f1x0_rcu.d b/HUGS/Objects/gd32f1x0_rcu.d new file mode 100644 index 00000000..1a0f352a --- /dev/null +++ b/HUGS/Objects/gd32f1x0_rcu.d @@ -0,0 +1,27 @@ +.\objects\gd32f1x0_rcu.o: RTE\Device\GD32F130C8\gd32f1x0_rcu.c +.\objects\gd32f1x0_rcu.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_rcu.h +.\objects\gd32f1x0_rcu.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0.h +.\objects\gd32f1x0_rcu.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\core_cm3.h +.\objects\gd32f1x0_rcu.o: C:\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h +.\objects\gd32f1x0_rcu.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_version.h +.\objects\gd32f1x0_rcu.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_compiler.h +.\objects\gd32f1x0_rcu.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_armcc.h +.\objects\gd32f1x0_rcu.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\mpu_armv7.h +.\objects\gd32f1x0_rcu.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\system_gd32f1x0.h +.\objects\gd32f1x0_rcu.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0_libopt.h +.\objects\gd32f1x0_rcu.o: .\RTE\_Target_1\RTE_Components.h +.\objects\gd32f1x0_rcu.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_adc.h +.\objects\gd32f1x0_rcu.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0.h +.\objects\gd32f1x0_rcu.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dbg.h +.\objects\gd32f1x0_rcu.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dma.h +.\objects\gd32f1x0_rcu.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_gpio.h +.\objects\gd32f1x0_rcu.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_syscfg.h +.\objects\gd32f1x0_rcu.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_i2c.h +.\objects\gd32f1x0_rcu.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_fwdgt.h +.\objects\gd32f1x0_rcu.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_pmu.h +.\objects\gd32f1x0_rcu.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_rcu.h +.\objects\gd32f1x0_rcu.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_timer.h +.\objects\gd32f1x0_rcu.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_usart.h +.\objects\gd32f1x0_rcu.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_wwdgt.h +.\objects\gd32f1x0_rcu.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_misc.h +.\objects\gd32f1x0_rcu.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_opa.h diff --git a/HUGS/Objects/gd32f1x0_rcu.o b/HUGS/Objects/gd32f1x0_rcu.o new file mode 100644 index 00000000..213f9673 Binary files /dev/null and b/HUGS/Objects/gd32f1x0_rcu.o differ diff --git a/HUGS/Objects/gd32f1x0_syscfg.crf b/HUGS/Objects/gd32f1x0_syscfg.crf new file mode 100644 index 00000000..9e189a22 Binary files /dev/null and b/HUGS/Objects/gd32f1x0_syscfg.crf differ diff --git a/HUGS/Objects/gd32f1x0_syscfg.d b/HUGS/Objects/gd32f1x0_syscfg.d new file mode 100644 index 00000000..ddaab139 --- /dev/null +++ b/HUGS/Objects/gd32f1x0_syscfg.d @@ -0,0 +1,27 @@ +.\objects\gd32f1x0_syscfg.o: RTE\Device\GD32F130C8\gd32f1x0_syscfg.c +.\objects\gd32f1x0_syscfg.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_syscfg.h +.\objects\gd32f1x0_syscfg.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0.h +.\objects\gd32f1x0_syscfg.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\core_cm3.h +.\objects\gd32f1x0_syscfg.o: C:\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h +.\objects\gd32f1x0_syscfg.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_version.h +.\objects\gd32f1x0_syscfg.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_compiler.h +.\objects\gd32f1x0_syscfg.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_armcc.h +.\objects\gd32f1x0_syscfg.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\mpu_armv7.h +.\objects\gd32f1x0_syscfg.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\system_gd32f1x0.h +.\objects\gd32f1x0_syscfg.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0_libopt.h +.\objects\gd32f1x0_syscfg.o: .\RTE\_Target_1\RTE_Components.h +.\objects\gd32f1x0_syscfg.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_adc.h +.\objects\gd32f1x0_syscfg.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0.h +.\objects\gd32f1x0_syscfg.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dbg.h +.\objects\gd32f1x0_syscfg.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dma.h +.\objects\gd32f1x0_syscfg.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_gpio.h +.\objects\gd32f1x0_syscfg.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_syscfg.h +.\objects\gd32f1x0_syscfg.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_i2c.h +.\objects\gd32f1x0_syscfg.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_fwdgt.h +.\objects\gd32f1x0_syscfg.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_pmu.h +.\objects\gd32f1x0_syscfg.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_rcu.h +.\objects\gd32f1x0_syscfg.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_timer.h +.\objects\gd32f1x0_syscfg.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_usart.h +.\objects\gd32f1x0_syscfg.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_wwdgt.h +.\objects\gd32f1x0_syscfg.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_misc.h +.\objects\gd32f1x0_syscfg.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_opa.h diff --git a/HUGS/Objects/gd32f1x0_syscfg.o b/HUGS/Objects/gd32f1x0_syscfg.o new file mode 100644 index 00000000..e9589be9 Binary files /dev/null and b/HUGS/Objects/gd32f1x0_syscfg.o differ diff --git a/HUGS/Objects/gd32f1x0_timer.crf b/HUGS/Objects/gd32f1x0_timer.crf new file mode 100644 index 00000000..373573c0 Binary files /dev/null and b/HUGS/Objects/gd32f1x0_timer.crf differ diff --git a/HUGS/Objects/gd32f1x0_timer.d b/HUGS/Objects/gd32f1x0_timer.d new file mode 100644 index 00000000..d328de34 --- /dev/null +++ b/HUGS/Objects/gd32f1x0_timer.d @@ -0,0 +1,27 @@ +.\objects\gd32f1x0_timer.o: RTE\Device\GD32F130C8\gd32f1x0_timer.c +.\objects\gd32f1x0_timer.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_timer.h +.\objects\gd32f1x0_timer.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0.h +.\objects\gd32f1x0_timer.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\core_cm3.h +.\objects\gd32f1x0_timer.o: C:\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h +.\objects\gd32f1x0_timer.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_version.h +.\objects\gd32f1x0_timer.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_compiler.h +.\objects\gd32f1x0_timer.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_armcc.h +.\objects\gd32f1x0_timer.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\mpu_armv7.h +.\objects\gd32f1x0_timer.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\system_gd32f1x0.h +.\objects\gd32f1x0_timer.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0_libopt.h +.\objects\gd32f1x0_timer.o: .\RTE\_Target_1\RTE_Components.h +.\objects\gd32f1x0_timer.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_adc.h +.\objects\gd32f1x0_timer.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0.h +.\objects\gd32f1x0_timer.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dbg.h +.\objects\gd32f1x0_timer.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dma.h +.\objects\gd32f1x0_timer.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_gpio.h +.\objects\gd32f1x0_timer.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_syscfg.h +.\objects\gd32f1x0_timer.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_i2c.h +.\objects\gd32f1x0_timer.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_fwdgt.h +.\objects\gd32f1x0_timer.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_pmu.h +.\objects\gd32f1x0_timer.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_rcu.h +.\objects\gd32f1x0_timer.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_timer.h +.\objects\gd32f1x0_timer.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_usart.h +.\objects\gd32f1x0_timer.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_wwdgt.h +.\objects\gd32f1x0_timer.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_misc.h +.\objects\gd32f1x0_timer.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_opa.h diff --git a/HUGS/Objects/gd32f1x0_timer.o b/HUGS/Objects/gd32f1x0_timer.o new file mode 100644 index 00000000..cca9cb4e Binary files /dev/null and b/HUGS/Objects/gd32f1x0_timer.o differ diff --git a/HUGS/Objects/gd32f1x0_usart.crf b/HUGS/Objects/gd32f1x0_usart.crf new file mode 100644 index 00000000..65ae7e3f Binary files /dev/null and b/HUGS/Objects/gd32f1x0_usart.crf differ diff --git a/HUGS/Objects/gd32f1x0_usart.d b/HUGS/Objects/gd32f1x0_usart.d new file mode 100644 index 00000000..51580bd2 --- /dev/null +++ b/HUGS/Objects/gd32f1x0_usart.d @@ -0,0 +1,27 @@ +.\objects\gd32f1x0_usart.o: RTE\Device\GD32F130C8\gd32f1x0_usart.c +.\objects\gd32f1x0_usart.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_usart.h +.\objects\gd32f1x0_usart.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0.h +.\objects\gd32f1x0_usart.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\core_cm3.h +.\objects\gd32f1x0_usart.o: C:\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h +.\objects\gd32f1x0_usart.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_version.h +.\objects\gd32f1x0_usart.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_compiler.h +.\objects\gd32f1x0_usart.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_armcc.h +.\objects\gd32f1x0_usart.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\mpu_armv7.h +.\objects\gd32f1x0_usart.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\system_gd32f1x0.h +.\objects\gd32f1x0_usart.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0_libopt.h +.\objects\gd32f1x0_usart.o: .\RTE\_Target_1\RTE_Components.h +.\objects\gd32f1x0_usart.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_adc.h +.\objects\gd32f1x0_usart.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0.h +.\objects\gd32f1x0_usart.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dbg.h +.\objects\gd32f1x0_usart.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dma.h +.\objects\gd32f1x0_usart.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_gpio.h +.\objects\gd32f1x0_usart.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_syscfg.h +.\objects\gd32f1x0_usart.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_i2c.h +.\objects\gd32f1x0_usart.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_fwdgt.h +.\objects\gd32f1x0_usart.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_pmu.h +.\objects\gd32f1x0_usart.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_rcu.h +.\objects\gd32f1x0_usart.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_timer.h +.\objects\gd32f1x0_usart.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_usart.h +.\objects\gd32f1x0_usart.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_wwdgt.h +.\objects\gd32f1x0_usart.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_misc.h +.\objects\gd32f1x0_usart.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_opa.h diff --git a/HUGS/Objects/gd32f1x0_usart.o b/HUGS/Objects/gd32f1x0_usart.o new file mode 100644 index 00000000..18c9cdf6 Binary files /dev/null and b/HUGS/Objects/gd32f1x0_usart.o differ diff --git a/HUGS/Objects/gd32f1x0_wwdgt.crf b/HUGS/Objects/gd32f1x0_wwdgt.crf new file mode 100644 index 00000000..ce4091a3 Binary files /dev/null and b/HUGS/Objects/gd32f1x0_wwdgt.crf differ diff --git a/HUGS/Objects/gd32f1x0_wwdgt.d b/HUGS/Objects/gd32f1x0_wwdgt.d new file mode 100644 index 00000000..3ee26b2f --- /dev/null +++ b/HUGS/Objects/gd32f1x0_wwdgt.d @@ -0,0 +1,27 @@ +.\objects\gd32f1x0_wwdgt.o: RTE\Device\GD32F130C8\gd32f1x0_wwdgt.c +.\objects\gd32f1x0_wwdgt.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_wwdgt.h +.\objects\gd32f1x0_wwdgt.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0.h +.\objects\gd32f1x0_wwdgt.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\core_cm3.h +.\objects\gd32f1x0_wwdgt.o: C:\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h +.\objects\gd32f1x0_wwdgt.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_version.h +.\objects\gd32f1x0_wwdgt.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_compiler.h +.\objects\gd32f1x0_wwdgt.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_armcc.h +.\objects\gd32f1x0_wwdgt.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\mpu_armv7.h +.\objects\gd32f1x0_wwdgt.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\system_gd32f1x0.h +.\objects\gd32f1x0_wwdgt.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0_libopt.h +.\objects\gd32f1x0_wwdgt.o: .\RTE\_Target_1\RTE_Components.h +.\objects\gd32f1x0_wwdgt.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_adc.h +.\objects\gd32f1x0_wwdgt.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0.h +.\objects\gd32f1x0_wwdgt.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dbg.h +.\objects\gd32f1x0_wwdgt.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dma.h +.\objects\gd32f1x0_wwdgt.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_gpio.h +.\objects\gd32f1x0_wwdgt.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_syscfg.h +.\objects\gd32f1x0_wwdgt.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_i2c.h +.\objects\gd32f1x0_wwdgt.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_fwdgt.h +.\objects\gd32f1x0_wwdgt.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_pmu.h +.\objects\gd32f1x0_wwdgt.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_rcu.h +.\objects\gd32f1x0_wwdgt.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_timer.h +.\objects\gd32f1x0_wwdgt.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_usart.h +.\objects\gd32f1x0_wwdgt.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_wwdgt.h +.\objects\gd32f1x0_wwdgt.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_misc.h +.\objects\gd32f1x0_wwdgt.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_opa.h diff --git a/HUGS/Objects/gd32f1x0_wwdgt.o b/HUGS/Objects/gd32f1x0_wwdgt.o new file mode 100644 index 00000000..76f62c32 Binary files /dev/null and b/HUGS/Objects/gd32f1x0_wwdgt.o differ diff --git a/HUGS/Objects/it.crf b/HUGS/Objects/it.crf new file mode 100644 index 00000000..87c05674 Binary files /dev/null and b/HUGS/Objects/it.crf differ diff --git a/HUGS/Objects/it.d b/HUGS/Objects/it.d new file mode 100644 index 00000000..174d5a8e --- /dev/null +++ b/HUGS/Objects/it.d @@ -0,0 +1,33 @@ +.\objects\it.o: Src\it.c +.\objects\it.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0.h +.\objects\it.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\core_cm3.h +.\objects\it.o: C:\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h +.\objects\it.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_version.h +.\objects\it.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_compiler.h +.\objects\it.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_armcc.h +.\objects\it.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\mpu_armv7.h +.\objects\it.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\system_gd32f1x0.h +.\objects\it.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0_libopt.h +.\objects\it.o: .\RTE\_Target_1\RTE_Components.h +.\objects\it.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_adc.h +.\objects\it.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0.h +.\objects\it.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dbg.h +.\objects\it.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dma.h +.\objects\it.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_gpio.h +.\objects\it.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_syscfg.h +.\objects\it.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_i2c.h +.\objects\it.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_fwdgt.h +.\objects\it.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_pmu.h +.\objects\it.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_rcu.h +.\objects\it.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_timer.h +.\objects\it.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_usart.h +.\objects\it.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_wwdgt.h +.\objects\it.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_misc.h +.\objects\it.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_opa.h +.\objects\it.o: Src\../Inc/it.h +.\objects\it.o: Src\../Inc/../Inc/config.h +.\objects\it.o: Src\../Inc/defines.h +.\objects\it.o: Src\../Inc/bldc.h +.\objects\it.o: Src\../Inc/led.h +.\objects\it.o: Src\../Inc/commsHUGS.h +.\objects\it.o: Src\../Inc/commsSteering.h diff --git a/HUGS/Objects/it.o b/HUGS/Objects/it.o new file mode 100644 index 00000000..a36ff650 Binary files /dev/null and b/HUGS/Objects/it.o differ diff --git a/HUGS/Objects/led.crf b/HUGS/Objects/led.crf new file mode 100644 index 00000000..4cd952af Binary files /dev/null and b/HUGS/Objects/led.crf differ diff --git a/HUGS/Objects/led.d b/HUGS/Objects/led.d new file mode 100644 index 00000000..654230d8 --- /dev/null +++ b/HUGS/Objects/led.d @@ -0,0 +1,29 @@ +.\objects\led.o: Src\led.c +.\objects\led.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0.h +.\objects\led.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\core_cm3.h +.\objects\led.o: C:\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h +.\objects\led.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_version.h +.\objects\led.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_compiler.h +.\objects\led.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_armcc.h +.\objects\led.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\mpu_armv7.h +.\objects\led.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\system_gd32f1x0.h +.\objects\led.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0_libopt.h +.\objects\led.o: .\RTE\_Target_1\RTE_Components.h +.\objects\led.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_adc.h +.\objects\led.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0.h +.\objects\led.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dbg.h +.\objects\led.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dma.h +.\objects\led.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_gpio.h +.\objects\led.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_syscfg.h +.\objects\led.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_i2c.h +.\objects\led.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_fwdgt.h +.\objects\led.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_pmu.h +.\objects\led.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_rcu.h +.\objects\led.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_timer.h +.\objects\led.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_usart.h +.\objects\led.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_wwdgt.h +.\objects\led.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_misc.h +.\objects\led.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_opa.h +.\objects\led.o: Src\../Inc/led.h +.\objects\led.o: Src\../Inc/../Inc/config.h +.\objects\led.o: Src\../Inc/defines.h diff --git a/HUGS/Objects/led.o b/HUGS/Objects/led.o new file mode 100644 index 00000000..e20d6a1b Binary files /dev/null and b/HUGS/Objects/led.o differ diff --git a/HUGS/Objects/main.crf b/HUGS/Objects/main.crf new file mode 100644 index 00000000..25e5572c Binary files /dev/null and b/HUGS/Objects/main.crf differ diff --git a/HUGS/Objects/main.d b/HUGS/Objects/main.d new file mode 100644 index 00000000..184c5ca6 --- /dev/null +++ b/HUGS/Objects/main.d @@ -0,0 +1,38 @@ +.\objects\main.o: Src\main.c +.\objects\main.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0.h +.\objects\main.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\core_cm3.h +.\objects\main.o: C:\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h +.\objects\main.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_version.h +.\objects\main.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_compiler.h +.\objects\main.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_armcc.h +.\objects\main.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\mpu_armv7.h +.\objects\main.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\system_gd32f1x0.h +.\objects\main.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0_libopt.h +.\objects\main.o: .\RTE\_Target_1\RTE_Components.h +.\objects\main.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_adc.h +.\objects\main.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0.h +.\objects\main.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dbg.h +.\objects\main.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dma.h +.\objects\main.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_gpio.h +.\objects\main.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_syscfg.h +.\objects\main.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_i2c.h +.\objects\main.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_fwdgt.h +.\objects\main.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_pmu.h +.\objects\main.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_rcu.h +.\objects\main.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_timer.h +.\objects\main.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_usart.h +.\objects\main.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_wwdgt.h +.\objects\main.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_misc.h +.\objects\main.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_opa.h +.\objects\main.o: Src\../Inc/setup.h +.\objects\main.o: Src\../Inc/../Inc/config.h +.\objects\main.o: Src\../Inc/defines.h +.\objects\main.o: Src\../Inc/it.h +.\objects\main.o: Src\../Inc/bldc.h +.\objects\main.o: Src\../Inc/comms.h +.\objects\main.o: Src\../Inc/commsHUGS.h +.\objects\main.o: Src\../Inc/commsSteering.h +.\objects\main.o: C:\Keil_v5\ARM\ARMCC\Bin\..\include\stdio.h +.\objects\main.o: C:\Keil_v5\ARM\ARMCC\Bin\..\include\stdlib.h +.\objects\main.o: C:\Keil_v5\ARM\ARMCC\Bin\..\include\string.h +.\objects\main.o: C:\Keil_v5\ARM\ARMCC\Bin\..\include\math.h diff --git a/HUGS/Objects/main.o b/HUGS/Objects/main.o new file mode 100644 index 00000000..6adb2cc3 Binary files /dev/null and b/HUGS/Objects/main.o differ diff --git a/HUGS/Objects/setup.crf b/HUGS/Objects/setup.crf new file mode 100644 index 00000000..a7fe5bff Binary files /dev/null and b/HUGS/Objects/setup.crf differ diff --git a/HUGS/Objects/setup.d b/HUGS/Objects/setup.d new file mode 100644 index 00000000..492e8c1e --- /dev/null +++ b/HUGS/Objects/setup.d @@ -0,0 +1,30 @@ +.\objects\setup.o: Src\setup.c +.\objects\setup.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0.h +.\objects\setup.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\core_cm3.h +.\objects\setup.o: C:\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h +.\objects\setup.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_version.h +.\objects\setup.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_compiler.h +.\objects\setup.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_armcc.h +.\objects\setup.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\mpu_armv7.h +.\objects\setup.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\system_gd32f1x0.h +.\objects\setup.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0_libopt.h +.\objects\setup.o: .\RTE\_Target_1\RTE_Components.h +.\objects\setup.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_adc.h +.\objects\setup.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0.h +.\objects\setup.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dbg.h +.\objects\setup.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dma.h +.\objects\setup.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_gpio.h +.\objects\setup.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_syscfg.h +.\objects\setup.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_i2c.h +.\objects\setup.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_fwdgt.h +.\objects\setup.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_pmu.h +.\objects\setup.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_rcu.h +.\objects\setup.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_timer.h +.\objects\setup.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_usart.h +.\objects\setup.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_wwdgt.h +.\objects\setup.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_misc.h +.\objects\setup.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_opa.h +.\objects\setup.o: Src\../Inc/setup.h +.\objects\setup.o: Src\../Inc/../Inc/config.h +.\objects\setup.o: Src\../Inc/defines.h +.\objects\setup.o: Src\../Inc/it.h diff --git a/HUGS/Objects/setup.o b/HUGS/Objects/setup.o new file mode 100644 index 00000000..b2df0ff7 Binary files /dev/null and b/HUGS/Objects/setup.o differ diff --git a/HUGS/Objects/startup_gd32f1x0.d b/HUGS/Objects/startup_gd32f1x0.d new file mode 100644 index 00000000..d1c2a46f --- /dev/null +++ b/HUGS/Objects/startup_gd32f1x0.d @@ -0,0 +1 @@ +.\objects\startup_gd32f1x0.o: RTE\Device\GD32F130C8\startup_gd32f1x0.s diff --git a/HUGS/Objects/startup_gd32f1x0.o b/HUGS/Objects/startup_gd32f1x0.o new file mode 100644 index 00000000..e991f25d Binary files /dev/null and b/HUGS/Objects/startup_gd32f1x0.o differ diff --git a/HUGS/Objects/system_gd32f1x0.crf b/HUGS/Objects/system_gd32f1x0.crf new file mode 100644 index 00000000..52203121 Binary files /dev/null and b/HUGS/Objects/system_gd32f1x0.crf differ diff --git a/HUGS/Objects/system_gd32f1x0.d b/HUGS/Objects/system_gd32f1x0.d new file mode 100644 index 00000000..bb99bd10 --- /dev/null +++ b/HUGS/Objects/system_gd32f1x0.d @@ -0,0 +1,26 @@ +.\objects\system_gd32f1x0.o: RTE\Device\GD32F130C8\system_gd32f1x0.c +.\objects\system_gd32f1x0.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0.h +.\objects\system_gd32f1x0.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\core_cm3.h +.\objects\system_gd32f1x0.o: C:\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h +.\objects\system_gd32f1x0.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_version.h +.\objects\system_gd32f1x0.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_compiler.h +.\objects\system_gd32f1x0.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_armcc.h +.\objects\system_gd32f1x0.o: C:\Users\13015\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\mpu_armv7.h +.\objects\system_gd32f1x0.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\system_gd32f1x0.h +.\objects\system_gd32f1x0.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0_libopt.h +.\objects\system_gd32f1x0.o: .\RTE\_Target_1\RTE_Components.h +.\objects\system_gd32f1x0.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_adc.h +.\objects\system_gd32f1x0.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Include\gd32f1x0.h +.\objects\system_gd32f1x0.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dbg.h +.\objects\system_gd32f1x0.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_dma.h +.\objects\system_gd32f1x0.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_gpio.h +.\objects\system_gd32f1x0.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_syscfg.h +.\objects\system_gd32f1x0.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_i2c.h +.\objects\system_gd32f1x0.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_fwdgt.h +.\objects\system_gd32f1x0.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_pmu.h +.\objects\system_gd32f1x0.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_rcu.h +.\objects\system_gd32f1x0.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_timer.h +.\objects\system_gd32f1x0.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_usart.h +.\objects\system_gd32f1x0.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_wwdgt.h +.\objects\system_gd32f1x0.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_misc.h +.\objects\system_gd32f1x0.o: C:\Users\13015\AppData\Local\Arm\Packs\GigaDevice\GD32F1x0_DFP\3.1.0\Device\Firmware\Peripherals\inc\gd32f1x0_opa.h diff --git a/HUGS/Objects/system_gd32f1x0.o b/HUGS/Objects/system_gd32f1x0.o new file mode 100644 index 00000000..30076190 Binary files /dev/null and b/HUGS/Objects/system_gd32f1x0.o differ diff --git a/HoverBoardGigaDevice/RTE/Device/GD32F130C8/gd32f1x0_adc.c b/HUGS/RTE/Device/GD32F130C8/gd32f1x0_adc.c similarity index 96% rename from HoverBoardGigaDevice/RTE/Device/GD32F130C8/gd32f1x0_adc.c rename to HUGS/RTE/Device/GD32F130C8/gd32f1x0_adc.c index 2f765eb2..c56ab8aa 100644 --- a/HoverBoardGigaDevice/RTE/Device/GD32F130C8/gd32f1x0_adc.c +++ b/HUGS/RTE/Device/GD32F130C8/gd32f1x0_adc.c @@ -1,817 +1,817 @@ -/*! - \file gd32f1x0_adc.c - \brief ADC driver -*/ - -/* - Copyright (C) 2017 GigaDevice - - 2014-12-26, V1.0.0, platform GD32F1x0(x=3,5) - 2016-01-15, V2.0.0, platform GD32F1x0(x=3,5,7,9) - 2016-04-30, V3.0.0, firmware update for GD32F1x0(x=3,5,7,9) - 2017-06-19, V3.1.0, firmware update for GD32F1x0(x=3,5,7,9) -*/ - -#include "gd32f1x0_adc.h" - -/*! - \brief ADC reset - \param[in] none - \param[out] none - \retval none -*/ -void adc_deinit(void) -{ - rcu_periph_reset_enable(RCU_ADCRST); - rcu_periph_reset_disable(RCU_ADCRST); -} - -/*! - \brief enable ADC interface - \param[in] none - \param[out] none - \retval none -*/ -void adc_enable(void) -{ - if(RESET == (ADC_CTL1 & ADC_CTL1_ADCON)){ - ADC_CTL1 |= (uint32_t)ADC_CTL1_ADCON; - } -} - -/*! - \brief disable ADC interface - \param[in] none - \param[out] none - \retval none -*/ -void adc_disable(void) -{ - ADC_CTL1 &= (uint32_t)~(ADC_CTL1_ADCON); -} - -/*! - \brief ADC calibration and reset calibration - \param[in] none - \param[out] none - \retval none -*/ -void adc_calibration_enable(void) -{ - /* reset the selected ADC1 calibration registers */ - ADC_CTL1 |= (uint32_t) ADC_CTL1_RSTCLB; - /* check the RSTCLB bit state */ - while((ADC_CTL1 & ADC_CTL1_RSTCLB)){ - } - /* enable ADC calibration process */ - ADC_CTL1 |= ADC_CTL1_CLB; - /* check the CLB bit state */ - while((ADC_CTL1 & ADC_CTL1_CLB)){ - } -} - -/*! - \brief enable DMA request - \param[in] none - \param[out] none - \retval none -*/ -void adc_dma_mode_enable(void) -{ - ADC_CTL1 |= (uint32_t)(ADC_CTL1_DMA); -} - -/*! - \brief disable DMA request - \param[in] none - \param[out] none - \retval none -*/ -void adc_dma_mode_disable(void) -{ - ADC_CTL1 &= ~((uint32_t)ADC_CTL1_DMA); -} - -/*! - \brief enable ADC0 temperature sensor and Vrefint channel - \param[in] none - \param[out] none - \retval none -*/ -void adc_tempsensor_vrefint_enable(void) -{ - /* enable the temperature sensor and Vrefint channel */ - ADC_CTL1 |= ADC_CTL1_TSVREN; -} - -/*! - \brief disable ADC0 temperature sensor and Vrefint channel - \param[in] none - \param[out] none - \retval none -*/ -void adc_tempsensor_vrefint_disable(void) -{ - /* disable the temperature sensor and Vrefint channel */ - ADC_CTL1 &= ~ADC_CTL1_TSVREN; -} - -/*! - \brief enable the vbat channel - \param[in] none - \param[out] none - \retval none -*/ -void adc_vbat_enable(void) -{ - /* enable the vbat channel */ - ADC_CTL1 |= ADC_CTL1_VBETEN; -} - -/*! - \brief disable the vbat channel - \param[in] none - \param[out] none - \retval none -*/ -void adc_vbat_disable(void) -{ - /* disable the vbat channel */ - ADC_CTL1 &= ~ADC_CTL1_VBETEN; -} - -/*! - \brief adc discontinuous mode config - \param[in] channel_group: select the channel group - \arg ADC_REGULAR_CHANNEL: regular channel group - \arg ADC_INSERTED_CHANNEL: inserted channel group - \param[in] length: number of conversions in discontinuous mode,the number can be 1..8 - for regular channel ,the number is insignificant for inserted channel - \param[out] none - \retval none -*/ -void adc_discontinuous_mode_config(uint8_t channel_group, uint8_t length) -{ - ADC_CTL0 &= ~((uint32_t)(ADC_CTL0_DISRC | ADC_CTL0_DISIC)); - switch(channel_group){ - case ADC_REGULAR_CHANNEL: - /* config the number of conversions in discontinuous mode */ - ADC_CTL0 &= ~((uint32_t)ADC_CTL0_DISNUM); - ADC_CTL0 |= (uint32_t)(((uint32_t)length - 1U) << 13U); - - ADC_CTL0 |= (uint32_t)ADC_CTL0_DISRC; - break; - case ADC_INSERTED_CHANNEL: - ADC_CTL0 |= (uint32_t)ADC_CTL0_DISIC; - break; - default: - break; - } -} - -/*! - \brief enable or disable ADC special function - \param[in] function: the function to config - one or more parameters can be selected below - \arg ADC_SCAN_MODE: scan mode select - \arg ADC_INSERTED_CHANNEL_AUTO: inserted channel group convert automatically - \arg ADC_CONTINUOUS_MODE: continuous mode select - \param[in] newvalue: ENABLE or DISABLE - \param[out] none - \retval none -*/ -void adc_special_function_config(uint32_t function, ControlStatus newvalue) -{ - if(newvalue){ - if(RESET != (function & ADC_SCAN_MODE)){ - ADC_CTL0 |= ADC_SCAN_MODE; - } - if(RESET != (function & ADC_INSERTED_CHANNEL_AUTO)){ - ADC_CTL0 |= ADC_INSERTED_CHANNEL_AUTO; - } - if(RESET != (function & ADC_CONTINUOUS_MODE)){ - ADC_CTL1 |= ADC_CONTINUOUS_MODE; - } - }else{ - if(RESET != (function & ADC_SCAN_MODE)){ - ADC_CTL0 &= ~ADC_SCAN_MODE; - } - if(RESET != (function & ADC_INSERTED_CHANNEL_AUTO)){ - ADC_CTL0 &= ~ADC_INSERTED_CHANNEL_AUTO; - } - if(RESET != (function & ADC_CONTINUOUS_MODE)){ - ADC_CTL1 &= ~ADC_CONTINUOUS_MODE; - } - } -} - -/*! - \brief adc data alignment config - \param[in] data_alignment: data alignment select - only one parameter can be selected - \arg ADC_DATAALIGN_RIGHT: LSB alignment - \arg ADC_DATAALIGN_LEFT: MSB alignment - \param[out] none - \retval none -*/ -void adc_data_alignment_config(uint32_t data_alignment) -{ - if(data_alignment){ - ADC_CTL1 |= ADC_CTL1_DAL; - }else{ - ADC_CTL1 &= ~((uint32_t)ADC_CTL1_DAL); - } -} - -/*! - \brief config the length of regular channel group or inserted channel group - \param[in] channel_group: select the channel group - only one parameter can be selected - \arg ADC_REGULAR_CHANNEL: regular channel group - \arg ADC_INSERTED_CHANNEL: inserted channel group - \param[in] length: the length of the channel - regular channel 1-17 - inserted channel 1-4 - \param[out] none - \retval none -*/ -void adc_channel_length_config(uint8_t channel_group,uint32_t length) -{ - switch(channel_group){ - case ADC_REGULAR_CHANNEL: - ADC_RSQ0 &= ~(((uint32_t)length - 1U) << 20U); - ADC_RSQ0 |= (((uint32_t)length - 1U) << 20U); - break; - case ADC_INSERTED_CHANNEL: - ADC_ISQ &= ~(((uint32_t)length - 1U) << 20U); - ADC_ISQ |= (((uint32_t)length - 1U) << 20U); - break; - default: - break; - } -} - -/*! - \brief ADC regular channel config - \param[in] rank: the regular group sequencer rank,this parameter must be between 0 to 15 - \param[in] channel: the selected ADC channel - \arg ADC_CHANNEL_x(x=0..18): ADC Channelx - \param[in] sample_time: the sample time value - \arg ADC_SAMPLETIME_1POINT5: 1.5 cycles - \arg ADC_SAMPLETIME_7POINT5: 7.5 cycles - \arg ADC_SAMPLETIME_13POINT5: 13.5 cycles - \arg ADC_SAMPLETIME_28POINT5: 28.5 cycles - \arg ADC_SAMPLETIME_41POINT5: 41.5 cycles - \arg ADC_SAMPLETIME_55POINT5: 55.5 cycles - \arg ADC_SAMPLETIME_71POINT5: 71.5 cycles - \arg ADC_SAMPLETIME_239POINT5: 239.5 cycles - \param[out] none - \retval none -*/ -void adc_regular_channel_config(uint8_t rank, uint8_t channel,uint32_t sample_time) -{ - uint32_t rsq,sampt; - -#ifdef GD32F130_150 - if(ADC_CHANNEL_18 == channel){ - channel = ADC_CHANNEL_0; - } -#endif - - /* configure ADC regular sequence */ - if(rank < 6U){ - rsq = ADC_RSQ2; - rsq &= ~((uint32_t)(ADC_RSQX_RSQN << (5U*rank))); - rsq |= ((uint32_t)channel << (5U*rank)); - ADC_RSQ2 = rsq; - }else if(rank < 12U){ - rsq = ADC_RSQ1; - rsq &= ~((uint32_t)(ADC_RSQX_RSQN << (5U*(rank-6U)))); - rsq |= ((uint32_t)channel << (5U*(rank-6U))); - ADC_RSQ1 = rsq; - }else if(rank < 16U){ - rsq = ADC_RSQ0; - rsq &= ~((uint32_t)(ADC_RSQX_RSQN << (5U*(rank-12U)))); - rsq |= ((uint32_t)channel << (5U*(rank-12U))); - ADC_RSQ0 = rsq; - }else{ - /* illegal parameters */ - } - - /* configure ADC sampling time */ - if(channel < 10U){ - sampt = ADC_SAMPT1; - sampt &= ~((uint32_t)(ADC_SAMPTX_SPTN << (3U*channel))); - sampt |= (uint32_t)(sample_time << (3U*channel)); - ADC_SAMPT1 = sampt; - }else if(channel < 18U){ - sampt = ADC_SAMPT0; - sampt &= ~((uint32_t)(ADC_SAMPTX_SPTN << (3U*(channel-10U)))); - sampt |= (uint32_t)(sample_time << (3U*(channel-10U))); - ADC_SAMPT0 = sampt; - }else{ - /* illegal parameters */ - } -} - -/*! - \brief ADC inserted channel config - \param[in] rank: the inserted group sequencer rank,this parameter must be between 0 to 3 - \param[in] channel: the selected ADC channel - \arg ADC_CHANNEL_x(x=0..18): ADC Channelx - \param[in] sample_time: The sample time value - \arg ADC_SAMPLETIME_1POINT5: 1.5 cycles - \arg ADC_SAMPLETIME_7POINT5: 7.5 cycles - \arg ADC_SAMPLETIME_13POINT5: 13.5 cycles - \arg ADC_SAMPLETIME_28POINT5: 28.5 cycles - \arg ADC_SAMPLETIME_41POINT5: 41.5 cycles - \arg ADC_SAMPLETIME_55POINT5: 55.5 cycles - \arg ADC_SAMPLETIME_71POINT5: 71.5 cycles - \arg ADC_SAMPLETIME_239POINT5: 239.5 cycles - \param[out] none - \retval none -*/ -void adc_inserted_channel_config(uint8_t rank, uint8_t channel, uint32_t sample_time) -{ - uint8_t inserted_length; - uint32_t isq,sampt; - - inserted_length = (uint8_t)GET_BITS(ADC_ISQ, 20, 21); - if(rank < 5U){ - isq = ADC_ISQ; - isq &= ~((uint32_t)(ADC_ISQ_ISQN << (15U - (inserted_length - rank)*5U))); - isq |= ((uint32_t)channel << (15U - (inserted_length - rank)*5U)); - ADC_ISQ = isq; - } - - if(channel < 10U){ - sampt = ADC_SAMPT1; - sampt &= ~((uint32_t)(ADC_SAMPTX_SPTN << (3U*channel))); - sampt |= (uint32_t) sample_time << (3U*channel); - ADC_SAMPT1 = sampt; - }else if(channel < 19U){ - sampt = ADC_SAMPT0; - sampt &= ~((uint32_t)(ADC_SAMPTX_SPTN << (3U*(channel-10U)))); - sampt |= ((uint32_t)sample_time << (3U*(channel-10U))); - ADC_SAMPT0 = sampt; - }else{ - /* illegal parameters */ - } -} - -/*! - \brief adc inserted channel offset config - \param[in] inserted_channel : insert channel select - \arg ADC_INSERTED_CHANNEL_0: inserted channel0 - \arg ADC_INSERTED_CHANNEL_1: inserted channel1 - \arg ADC_INSERTED_CHANNEL_2: inserted channel2 - \arg ADC_INSERTED_CHANNEL_3: inserted channel3 - \param[in] offset : the offset data - \param[out] none - \retval the conversion value -*/ -void adc_inserted_channel_offset_config(uint8_t inserted_channel,uint16_t offset) -{ - uint8_t inserted_length; - uint32_t num = 0U; - - inserted_length = (uint8_t)GET_BITS(ADC_ISQ, 20U, 21U); - num = 3U - (inserted_length - inserted_channel); - - if(num <= 3U){ - /* calculate the offset of the register */ - num = num * 4U; - /* config the offset of the selected channels */ - REG32((ADC_BASE) + 0x14U + num) = IOFFX_IOFF((uint32_t)offset); - } -} - -/*! - \brief adc external trigger enable - \param[in] adc_channel_group: select the channel group - \arg ADC_REGULAR_CHANNEL: regular channel group - \arg ADC_INSERTED_CHANNEL: inserted channel group - \param[in] newvalue: ENABLE or DISABLE - \param[out] none - \retval none -*/ -void adc_external_trigger_config(uint8_t channel_group,ControlStatus newvalue) -{ - if(newvalue){ - if(RESET != (channel_group & ADC_REGULAR_CHANNEL)){ - ADC_CTL1 |= ADC_CTL1_ETERC; - } - if(RESET != (channel_group & ADC_INSERTED_CHANNEL)){ - ADC_CTL1 |= ADC_CTL1_ETEIC; - } - }else{ - if(RESET != (channel_group & ADC_REGULAR_CHANNEL)){ - ADC_CTL1 &= ~ADC_CTL1_ETERC; - } - if(RESET != (channel_group & ADC_INSERTED_CHANNEL)){ - ADC_CTL1 &= ~ADC_CTL1_ETEIC; - } - } -} - -/*! - \brief adc external trigger source config - \param[in] adc_channel_group: select the channel group - \arg ADC_REGULAR_CHANNEL: regular channel group - \arg ADC_INSERTED_CHANNEL: inserted channel group - \param[in] external_trigger_source: regular or inserted group trigger source - for regular channel: - \arg ADC_EXTTRIG_REGULAR_T0_CH0: external trigger timer 0 CH0 event select for regular channel - \arg ADC_EXTTRIG_REGULAR_T0_CH1: external trigger timer 0 CH1 event select for regular channel - \arg ADC_EXTTRIG_REGULAR_T0_CH2: external trigger timer 0 CH2 event select for regular channel - \arg ADC_EXTTRIG_REGULAR_T1_CH1: external trigger timer 1 CH1 event select for regular channel - \arg ADC_EXTTRIG_REGULAR_T2_TRGO: external trigger timer 2 TRGO event select for regular channel - \arg ADC_EXTTRIG_REGULAR_T14_CH0: external trigger timer 14 CH0 event select for regular channel - \arg ADC_EXTTRIG_REGULAR_EXT_IT11: external trigger extiline 11 select for regular channel - \arg ADC_EXTTRIG_REGULAR_SWRCST: software trigger select for regular channel - for inserted channel: - \arg ADC_EXTTRIG_INSERTED_T0_TRGO: external trigger timer0 TRGO event select for inserted channel - \arg ADC_EXTTRIG_INSERTED_T0_CH3: external trigger timer0 CH3 event select for inserted channel - \arg ADC_EXTTRIG_INSERTED_T1_TRGO: external trigger timer1 TRGO event select for inserted channel - \arg ADC_EXTTRIG_INSERTED_T1_CH0: external trigger timer1 CH0 event select for inserted channel - \arg ADC_EXTTRIG_INSERTED_T2_CH3: external trigger timer2 CH3 event select for inserted channel - \arg ADC_EXTTRIG_INSERTED_T14_TRGO: external trigger timer14 TRGO event select for inserted channel - \arg ADC_EXTTRIG_INSERTED_EXT_IT15: external interrupt line 15 select for inserted channel - \arg ADC_EXTTRIG_INSERTED_SWRCST: software trigger select for inserted channel - \param[out] none - \retval none -*/ -void adc_external_trigger_source_config(uint8_t channel_group,uint32_t external_trigger_source) -{ - switch(channel_group){ - case ADC_REGULAR_CHANNEL: - ADC_CTL1 &= ~((uint32_t)ADC_CTL1_ETSRC); - ADC_CTL1 |= (uint32_t)external_trigger_source; - break; - case ADC_INSERTED_CHANNEL: - ADC_CTL1 &= ~((uint32_t)ADC_CTL1_ETSIC); - ADC_CTL1 |= (uint32_t)external_trigger_source; - break; - default: - break; - } -} - -/*! - \brief adc software trigger enable - \param[in] adc_channel_group: select the channel group - \arg ADC_REGULAR_CHANNEL: regular channel group - \arg ADC_INSERTED_CHANNEL: inserted channel group - \param[out] none - \retval none -*/ -void adc_software_trigger_enable(uint8_t channel_group) -{ - if(RESET != (channel_group & ADC_REGULAR_CHANNEL)){ - ADC_CTL1 |= ADC_CTL1_SWRCST; - } - if(RESET != (channel_group & ADC_INSERTED_CHANNEL)){ - ADC_CTL1 |= ADC_CTL1_SWICST; - } -} - -/*! - \brief adc regular group data register read - \param[in] none - \param[out] none - \retval the conversion value -*/ -uint16_t adc_regular_data_read(void) -{ - return (uint16_t)(ADC_RDATA); -} - -/*! - \brief adc inserted group data register read - \param[in] inserted_channel : insert channel select - \arg ADC_INSERTED_CHANNEL_0: inserted channel0 - \arg ADC_INSERTED_CHANNEL_1: inserted channel1 - \arg ADC_INSERTED_CHANNEL_2: inserted channel2 - \arg ADC_INSERTED_CHANNEL_3: inserted channel3 - \param[out] none - \retval the conversion value -*/ -uint16_t adc_inserted_data_read(uint8_t inserted_channel) -{ - uint32_t idata; - /* read the data of the selected channel */ - switch(inserted_channel){ - case ADC_INSERTED_CHANNEL_0: - idata = ADC_IDATA0; - break; - case ADC_INSERTED_CHANNEL_1: - idata = ADC_IDATA1; - break; - case ADC_INSERTED_CHANNEL_2: - idata = ADC_IDATA2; - break; - case ADC_INSERTED_CHANNEL_3: - idata = ADC_IDATA3; - break; - default: - idata = 0U; - break; - } - return (uint16_t)idata; -} - -/*! - \brief get the ADC flag bits - \param[in] flag: the adc flag bits - \arg ADC_FLAG_WDE: analog watchdog event flag - \arg ADC_FLAG_EOC: end of group conversion flag - \arg ADC_FLAG_EOIC: end of inserted group conversion flag - \arg ADC_FLAG_STIC: start flag of inserted channel group - \arg ADC_FLAG_STRC: start flag of regular channel group - \param[out] none - \retval FlagStatus: SET or RESET -*/ -FlagStatus adc_flag_get(uint32_t flag) -{ - FlagStatus reval = RESET; - - if(ADC_STAT & flag){ - reval = SET; - } - return reval; - -} - -/*! - \brief clear the ADC status flag - \param[in] flag: the adc flag bits - \arg ADC_FLAG_WDE: analog watchdog event flag - \arg ADC_FLAG_EOC: end of group conversion flag - \arg ADC_FLAG_EOIC: end of inserted group conversion flag - \arg ADC_FLAG_STIC: start flag of inserted channel group - \arg ADC_FLAG_STRC: start flag of regular channel group - \param[out] none - \retval none -*/ -void adc_flag_clear(uint32_t flag) -{ - ADC_STAT &= ~((uint32_t)flag); -} - -/*! - \brief get the ADC interrupt bits - \param[in] flag: the adc interrupt flag - \arg ADC_INT_FLAG_WDE: analog watchdog interrupt flag - \arg ADC_INT_FLAG_EOC: end of group conversion interrupt flag - \arg ADC_INT_FLAG_EOIC: end of inserted group conversion interrupt flag - \param[out] none - \retval FlagStatus: SET or RESET -*/ -FlagStatus adc_interrupt_flag_get(uint32_t flag) -{ - FlagStatus interrupt_flag = RESET; - uint32_t state; - /* check the interrupt bits */ - switch(flag){ - case ADC_INT_FLAG_WDE: - state = ADC_STAT & ADC_STAT_WDE; - if((ADC_CTL0 & ADC_CTL0_WDEIE) && state){ - interrupt_flag = SET; - } - break; - case ADC_INT_FLAG_EOC: - state = ADC_STAT & ADC_STAT_EOC; - if((ADC_CTL0 & ADC_CTL0_EOCIE) && state){ - interrupt_flag = SET; - } - break; - case ADC_INT_FLAG_EOIC: - state = ADC_STAT & ADC_STAT_EOIC; - if((ADC_CTL0 & ADC_CTL0_EOICIE) && state){ - interrupt_flag = SET; - } - break; - default: - break; - } - - return interrupt_flag; -} - -/*! - \brief clear the ADC interrupt bits - \param[in] adc_interrupt: the adc interrupt bits - \arg ADC_INT_FLAG_WDE: analog watchdog interrupt flag - \arg ADC_INT_FLAG_EOC: end of group conversion interrupt flag - \arg ADC_INT_FLAG_EOIC: end of inserted group conversion interrupt flag - \param[out] none - \retval none -*/ -void adc_interrupt_flag_clear(uint32_t flag) -{ - ADC_STAT &= ~((uint32_t)flag); -} - -/*! - \brief enable ADC interrupt - \param[in] adc_periph: ADCx, x=0,1,2 - only one among these parameters can be selected - \param[in] interrupt: the adc interrupt - one or more parameters can be selected - \arg ADC_INT_WDE: analog watchdog interrupt - \arg ADC_INT_EOC: end of group conversion interrupt - \arg ADC_INT_EOIC: end of inserted group conversion interrupt - \param[out] none - \retval none -*/ -void adc_interrupt_enable(uint32_t interrupt) -{ - if(RESET != (interrupt & ADC_INT_WDE)){ - ADC_CTL0 |= (uint32_t) ADC_CTL0_WDEIE; - } - - if(RESET != (interrupt & ADC_INT_EOC)){ - ADC_CTL0 |= (uint32_t) ADC_CTL0_EOCIE; - } - - if(RESET != (interrupt & ADC_INT_EOIC)){ - ADC_CTL0 |= (uint32_t) ADC_CTL0_EOICIE; - } -} - -/*! - \brief disable ADC interrupt - \param[in] adc_periph: ADCx,x=0,1,2 - only one among these parameters can be selected - \param[in] interrupt: the adc interrupt flag - one or more parameters can be selected - \arg ADC_INT_WDE: analog watchdog interrupt flag - \arg ADC_INT_EOC: end of group conversion interrupt flag - \arg ADC_INT_EOIC: end of inserted group conversion interrupt flag - \param[out] none - \retval none -*/ -void adc_interrupt_disable(uint32_t interrupt) -{ - if(RESET != (interrupt & ADC_INT_WDE)){ - ADC_CTL0 &= ~(uint32_t) ADC_CTL0_WDEIE; - } - - if(RESET != (interrupt & ADC_INT_EOC)){ - ADC_CTL0 &= ~(uint32_t) ADC_CTL0_EOCIE; - } - - if(RESET != (interrupt & ADC_INT_EOIC)){ - ADC_CTL0 &= ~(uint32_t) ADC_CTL0_EOICIE; - } -} - -/*! - \brief ADC analog watchdog single channel config - \param[in] channel: the selected ADC channel - \arg ADC_CHANNEL_x: ADC Channelx(x=0..18) - \param[out] none - \retval none -*/ -void adc_watchdog_single_channel_enable(uint8_t channel) -{ - ADC_CTL0 &= (uint32_t)~(ADC_CTL0_RWDEN | ADC_CTL0_IWDEN | ADC_CTL0_WDSC | ADC_CTL0_WDCHSEL); - - ADC_CTL0 |= (uint32_t)channel; - ADC_CTL0 |= (uint32_t)(ADC_CTL0_RWDEN | ADC_CTL0_IWDEN | ADC_CTL0_WDSC); -} - -/*! - \brief adc analog watchdog group channel config - \param[in] adc_channel_group: the channel group use analog watchdog - \arg ADC_REGULAR_CHANNEL: regular channel group - \arg ADC_INSERTED_CHANNEL: inserted channel group - \arg ADC_REGULAR_INSERTED_CHANNEL: both regular and inserted group - \param[out] none - \retval none -*/ -void adc_watchdog_group_channel_enable(uint8_t channel_group) -{ - ADC_CTL0 &= (uint32_t)~(ADC_CTL0_RWDEN | ADC_CTL0_IWDEN | ADC_CTL0_WDSC); - /* select the group */ - switch(channel_group){ - case ADC_REGULAR_CHANNEL: - ADC_CTL0 |= (uint32_t) ADC_CTL0_RWDEN; - break; - case ADC_INSERTED_CHANNEL: - ADC_CTL0 |= (uint32_t) ADC_CTL0_IWDEN; - break; - case ADC_REGULAR_INSERTED_CHANNEL: - ADC_CTL0 |= (uint32_t)(ADC_CTL0_RWDEN | ADC_CTL0_IWDEN); - break; - default: - break; - } -} - - - -/*! - \brief ADC analog watchdog disable - \param[in] none - \param[out] none - \retval none -*/ -void adc_watchdog_disable(void) -{ - ADC_CTL0 &= (uint32_t)~(ADC_CTL0_RWDEN | ADC_CTL0_IWDEN | ADC_CTL0_WDSC | ADC_CTL0_WDCHSEL); -} - -/*! - \brief ADC analog watchdog threshold config - \param[in] low_threshold: analog watchdog low threshold - \param[in] high_threshold: analog watchdog high threshold - \param[out] none - \retval none -*/ -void adc_watchdog_threshold_config(uint16_t low_threshold,uint16_t high_threshold) -{ - ADC_WDLT = (uint32_t)low_threshold; - ADC_WDHT = (uint32_t)high_threshold; -} - -#ifdef GD32F170_190 -/*! - \brief adc resolution config - \param[in] resolution: ADC resolution - \arg ADC_RESOLUTION_12B: 12-bit ADC resolution - \arg ADC_RESOLUTION_10B: 10-bit ADC resolution - \arg ADC_RESOLUTION_8B: 8-bit ADC resolution - \arg ADC_RESOLUTION_6B: 6-bit ADC resolution - \param[out] none - \retval none -*/ -void adc_resolution_config(uint32_t resolution) -{ - ADC_CTL0 &= ~((uint32_t)ADC_CTL0_DRES); - ADC_CTL0 |= (uint32_t)resolution; -} - -/*! - \brief adc oversample mode config - \param[in] mode: ADC oversampling mode - \arg ADC_OVERSAMPLING_ALL_CONVERT: all oversampled conversions for a channel - are done consecutively after a trigger - \arg ADC_OVERSAMPLING_ONE_CONVERT: each oversampled conversion for a channel - needs a trigger - \param[in] shift: ADC oversampling shift - \arg ADC_OVERSAMPLING_SHIFT_NONE: no oversampling shift - \arg ADC_OVERSAMPLING_SHIFT_1B: 1-bit oversampling shift - \arg ADC_OVERSAMPLING_SHIFT_2B: 2-bit oversampling shift - \arg ADC_OVERSAMPLING_SHIFT_3B: 3-bit oversampling shift - \arg ADC_OVERSAMPLING_SHIFT_4B: 3-bit oversampling shift - \arg ADC_OVERSAMPLING_SHIFT_5B: 5-bit oversampling shift - \arg ADC_OVERSAMPLING_SHIFT_6B: 6-bit oversampling shift - \arg ADC_OVERSAMPLING_SHIFT_7B: 7-bit oversampling shift - \arg ADC_OVERSAMPLING_SHIFT_8B: 8-bit oversampling shift - \param[in] ratio: ADC oversampling ratio - \arg ADC_OVERSAMPLING_RATIO_MUL2: oversampling ratio X2 - \arg ADC_OVERSAMPLING_RATIO_MUL4: oversampling ratio X4 - \arg ADC_OVERSAMPLING_RATIO_MUL8: oversampling ratio X8 - \arg ADC_OVERSAMPLING_RATIO_MUL16: oversampling ratio X16 - \arg ADC_OVERSAMPLING_RATIO_MUL32: oversampling ratio X32 - \arg ADC_OVERSAMPLING_RATIO_MUL64: oversampling ratio X64 - \arg ADC_OVERSAMPLING_RATIO_MUL128: oversampling ratio X128 - \arg ADC_OVERSAMPLING_RATIO_MUL256: oversampling ratio X256 - \param[out] none - \retval none -*/ -void adc_oversample_mode_config(uint8_t mode, uint16_t shift,uint8_t ratio) -{ - if(mode){ - ADC_OVSAMPCTL |= (uint32_t)ADC_OVSAMPCTL_TOVS; - }else{ - ADC_OVSAMPCTL &= ~((uint32_t)ADC_OVSAMPCTL_TOVS); - } - /* config the shift and ratio */ - ADC_OVSAMPCTL &= ~((uint32_t)(ADC_OVSAMPCTL_OVSR | ADC_OVSAMPCTL_OVSS)); - ADC_OVSAMPCTL |= ((uint32_t)shift | (uint32_t)ratio); -} - -/*! - \brief enable ADC oversample mode - \param[in] none - \param[out] none - \retval none -*/ -void adc_oversample_mode_enable(void) -{ - ADC_OVSAMPCTL |= ADC_OVSAMPCTL_OVSEN; -} - -/*! - \brief disable ADC oversample mode - \param[in] none - \param[out] none - \retval none -*/ -void adc_oversample_mode_disable(void) -{ - ADC_OVSAMPCTL &= ~((uint32_t)ADC_OVSAMPCTL_OVSEN); -} -#endif /* GD32F170_190 */ +/*! + \file gd32f1x0_adc.c + \brief ADC driver +*/ + +/* + Copyright (C) 2017 GigaDevice + + 2014-12-26, V1.0.0, platform GD32F1x0(x=3,5) + 2016-01-15, V2.0.0, platform GD32F1x0(x=3,5,7,9) + 2016-04-30, V3.0.0, firmware update for GD32F1x0(x=3,5,7,9) + 2017-06-19, V3.1.0, firmware update for GD32F1x0(x=3,5,7,9) +*/ + +#include "gd32f1x0_adc.h" + +/*! + \brief ADC reset + \param[in] none + \param[out] none + \retval none +*/ +void adc_deinit(void) +{ + rcu_periph_reset_enable(RCU_ADCRST); + rcu_periph_reset_disable(RCU_ADCRST); +} + +/*! + \brief enable ADC interface + \param[in] none + \param[out] none + \retval none +*/ +void adc_enable(void) +{ + if(RESET == (ADC_CTL1 & ADC_CTL1_ADCON)){ + ADC_CTL1 |= (uint32_t)ADC_CTL1_ADCON; + } +} + +/*! + \brief disable ADC interface + \param[in] none + \param[out] none + \retval none +*/ +void adc_disable(void) +{ + ADC_CTL1 &= (uint32_t)~(ADC_CTL1_ADCON); +} + +/*! + \brief ADC calibration and reset calibration + \param[in] none + \param[out] none + \retval none +*/ +void adc_calibration_enable(void) +{ + /* reset the selected ADC1 calibration registers */ + ADC_CTL1 |= (uint32_t) ADC_CTL1_RSTCLB; + /* check the RSTCLB bit state */ + while((ADC_CTL1 & ADC_CTL1_RSTCLB)){ + } + /* enable ADC calibration process */ + ADC_CTL1 |= ADC_CTL1_CLB; + /* check the CLB bit state */ + while((ADC_CTL1 & ADC_CTL1_CLB)){ + } +} + +/*! + \brief enable DMA request + \param[in] none + \param[out] none + \retval none +*/ +void adc_dma_mode_enable(void) +{ + ADC_CTL1 |= (uint32_t)(ADC_CTL1_DMA); +} + +/*! + \brief disable DMA request + \param[in] none + \param[out] none + \retval none +*/ +void adc_dma_mode_disable(void) +{ + ADC_CTL1 &= ~((uint32_t)ADC_CTL1_DMA); +} + +/*! + \brief enable ADC0 temperature sensor and Vrefint channel + \param[in] none + \param[out] none + \retval none +*/ +void adc_tempsensor_vrefint_enable(void) +{ + /* enable the temperature sensor and Vrefint channel */ + ADC_CTL1 |= ADC_CTL1_TSVREN; +} + +/*! + \brief disable ADC0 temperature sensor and Vrefint channel + \param[in] none + \param[out] none + \retval none +*/ +void adc_tempsensor_vrefint_disable(void) +{ + /* disable the temperature sensor and Vrefint channel */ + ADC_CTL1 &= ~ADC_CTL1_TSVREN; +} + +/*! + \brief enable the vbat channel + \param[in] none + \param[out] none + \retval none +*/ +void adc_vbat_enable(void) +{ + /* enable the vbat channel */ + ADC_CTL1 |= ADC_CTL1_VBETEN; +} + +/*! + \brief disable the vbat channel + \param[in] none + \param[out] none + \retval none +*/ +void adc_vbat_disable(void) +{ + /* disable the vbat channel */ + ADC_CTL1 &= ~ADC_CTL1_VBETEN; +} + +/*! + \brief adc discontinuous mode config + \param[in] channel_group: select the channel group + \arg ADC_REGULAR_CHANNEL: regular channel group + \arg ADC_INSERTED_CHANNEL: inserted channel group + \param[in] length: number of conversions in discontinuous mode,the number can be 1..8 + for regular channel ,the number is insignificant for inserted channel + \param[out] none + \retval none +*/ +void adc_discontinuous_mode_config(uint8_t channel_group,uint8_t length) +{ + ADC_CTL0 &= ~((uint32_t)(ADC_CTL0_DISRC | ADC_CTL0_DISIC)); + switch(channel_group){ + case ADC_REGULAR_CHANNEL: + /* config the number of conversions in discontinuous mode */ + ADC_CTL0 &= ~((uint32_t)ADC_CTL0_DISNUM); + ADC_CTL0 |= (uint32_t)(((uint32_t)length - 1U) << 13U); + + ADC_CTL0 |= (uint32_t)ADC_CTL0_DISRC; + break; + case ADC_INSERTED_CHANNEL: + ADC_CTL0 |= (uint32_t)ADC_CTL0_DISIC; + break; + default: + break; + } +} + +/*! + \brief enable or disable ADC special function + \param[in] function: the function to config + one or more parameters can be selected below + \arg ADC_SCAN_MODE: scan mode select + \arg ADC_INSERTED_CHANNEL_AUTO: inserted channel group convert automatically + \arg ADC_CONTINUOUS_MODE: continuous mode select + \param[in] newvalue: ENABLE or DISABLE + \param[out] none + \retval none +*/ +void adc_special_function_config(uint32_t function, ControlStatus newvalue) +{ + if(newvalue){ + if(RESET != (function & ADC_SCAN_MODE)){ + ADC_CTL0 |= ADC_SCAN_MODE; + } + if(RESET != (function & ADC_INSERTED_CHANNEL_AUTO)){ + ADC_CTL0 |= ADC_INSERTED_CHANNEL_AUTO; + } + if(RESET != (function & ADC_CONTINUOUS_MODE)){ + ADC_CTL1 |= ADC_CONTINUOUS_MODE; + } + }else{ + if(RESET != (function & ADC_SCAN_MODE)){ + ADC_CTL0 &= ~ADC_SCAN_MODE; + } + if(RESET != (function & ADC_INSERTED_CHANNEL_AUTO)){ + ADC_CTL0 &= ~ADC_INSERTED_CHANNEL_AUTO; + } + if(RESET != (function & ADC_CONTINUOUS_MODE)){ + ADC_CTL1 &= ~ADC_CONTINUOUS_MODE; + } + } +} + +/*! + \brief adc data alignment config + \param[in] data_alignment: data alignment select + only one parameter can be selected + \arg ADC_DATAALIGN_RIGHT: LSB alignment + \arg ADC_DATAALIGN_LEFT: MSB alignment + \param[out] none + \retval none +*/ +void adc_data_alignment_config(uint32_t data_alignment) +{ + if(data_alignment){ + ADC_CTL1 |= ADC_CTL1_DAL; + }else{ + ADC_CTL1 &= ~((uint32_t)ADC_CTL1_DAL); + } +} + +/*! + \brief config the length of regular channel group or inserted channel group + \param[in] channel_group: select the channel group + only one parameter can be selected + \arg ADC_REGULAR_CHANNEL: regular channel group + \arg ADC_INSERTED_CHANNEL: inserted channel group + \param[in] length: the length of the channel + regular channel 1-17 + inserted channel 1-4 + \param[out] none + \retval none +*/ +void adc_channel_length_config(uint8_t channel_group,uint32_t length) +{ + switch(channel_group){ + case ADC_REGULAR_CHANNEL: + ADC_RSQ0 &= ~(((uint32_t)length - 1U) << 20U); + ADC_RSQ0 |= (((uint32_t)length - 1U) << 20U); + break; + case ADC_INSERTED_CHANNEL: + ADC_ISQ &= ~(((uint32_t)length - 1U) << 20U); + ADC_ISQ |= (((uint32_t)length - 1U) << 20U); + break; + default: + break; + } +} + +/*! + \brief ADC regular channel config + \param[in] rank: the regular group sequencer rank,this parameter must be between 0 to 15 + \param[in] channel: the selected ADC channel + \arg ADC_CHANNEL_x(x=0..18): ADC Channelx + \param[in] sample_time: the sample time value + \arg ADC_SAMPLETIME_1POINT5: 1.5 cycles + \arg ADC_SAMPLETIME_7POINT5: 7.5 cycles + \arg ADC_SAMPLETIME_13POINT5: 13.5 cycles + \arg ADC_SAMPLETIME_28POINT5: 28.5 cycles + \arg ADC_SAMPLETIME_41POINT5: 41.5 cycles + \arg ADC_SAMPLETIME_55POINT5: 55.5 cycles + \arg ADC_SAMPLETIME_71POINT5: 71.5 cycles + \arg ADC_SAMPLETIME_239POINT5: 239.5 cycles + \param[out] none + \retval none +*/ +void adc_regular_channel_config(uint8_t rank, uint8_t channel,uint32_t sample_time) +{ + uint32_t rsq,sampt; + +#ifdef GD32F130_150 + if(ADC_CHANNEL_18 == channel){ + channel = ADC_CHANNEL_0; + } +#endif + + /* configure ADC regular sequence */ + if(rank < 6U){ + rsq = ADC_RSQ2; + rsq &= ~((uint32_t)(ADC_RSQX_RSQN << (5U*rank))); + rsq |= ((uint32_t)channel << (5U*rank)); + ADC_RSQ2 = rsq; + }else if(rank < 12U){ + rsq = ADC_RSQ1; + rsq &= ~((uint32_t)(ADC_RSQX_RSQN << (5U*(rank-6U)))); + rsq |= ((uint32_t)channel << (5U*(rank-6U))); + ADC_RSQ1 = rsq; + }else if(rank < 16U){ + rsq = ADC_RSQ0; + rsq &= ~((uint32_t)(ADC_RSQX_RSQN << (5U*(rank-12U)))); + rsq |= ((uint32_t)channel << (5U*(rank-12U))); + ADC_RSQ0 = rsq; + }else{ + /* illegal parameters */ + } + + /* configure ADC sampling time */ + if(channel < 10U){ + sampt = ADC_SAMPT1; + sampt &= ~((uint32_t)(ADC_SAMPTX_SPTN << (3U*channel))); + sampt |= (uint32_t)(sample_time << (3U*channel)); + ADC_SAMPT1 = sampt; + }else if(channel < 18U){ + sampt = ADC_SAMPT0; + sampt &= ~((uint32_t)(ADC_SAMPTX_SPTN << (3U*(channel-10U)))); + sampt |= (uint32_t)(sample_time << (3U*(channel-10U))); + ADC_SAMPT0 = sampt; + }else{ + /* illegal parameters */ + } +} + +/*! + \brief ADC inserted channel config + \param[in] rank: the inserted group sequencer rank,this parameter must be between 0 to 3 + \param[in] channel: the selected ADC channel + \arg ADC_CHANNEL_x(x=0..18): ADC Channelx + \param[in] sample_time: The sample time value + \arg ADC_SAMPLETIME_1POINT5: 1.5 cycles + \arg ADC_SAMPLETIME_7POINT5: 7.5 cycles + \arg ADC_SAMPLETIME_13POINT5: 13.5 cycles + \arg ADC_SAMPLETIME_28POINT5: 28.5 cycles + \arg ADC_SAMPLETIME_41POINT5: 41.5 cycles + \arg ADC_SAMPLETIME_55POINT5: 55.5 cycles + \arg ADC_SAMPLETIME_71POINT5: 71.5 cycles + \arg ADC_SAMPLETIME_239POINT5: 239.5 cycles + \param[out] none + \retval none +*/ +void adc_inserted_channel_config(uint8_t rank, uint8_t channel, uint32_t sample_time) +{ + uint8_t inserted_length; + uint32_t isq,sampt; + + inserted_length = (uint8_t)GET_BITS(ADC_ISQ, 20, 21); + if(rank < 5U){ + isq = ADC_ISQ; + isq &= ~((uint32_t)(ADC_ISQ_ISQN << (15U - (inserted_length - rank)*5U))); + isq |= ((uint32_t)channel << (15U - (inserted_length - rank)*5U)); + ADC_ISQ = isq; + } + + if(channel < 10U){ + sampt = ADC_SAMPT1; + sampt &= ~((uint32_t)(ADC_SAMPTX_SPTN << (3U*channel))); + sampt |= (uint32_t) sample_time << (3U*channel); + ADC_SAMPT1 = sampt; + }else if(channel < 19U){ + sampt = ADC_SAMPT0; + sampt &= ~((uint32_t)(ADC_SAMPTX_SPTN << (3U*(channel-10U)))); + sampt |= ((uint32_t)sample_time << (3U*(channel-10U))); + ADC_SAMPT0 = sampt; + }else{ + /* illegal parameters */ + } +} + +/*! + \brief adc inserted channel offset config + \param[in] inserted_channel : insert channel select + \arg ADC_INSERTED_CHANNEL_0: inserted channel0 + \arg ADC_INSERTED_CHANNEL_1: inserted channel1 + \arg ADC_INSERTED_CHANNEL_2: inserted channel2 + \arg ADC_INSERTED_CHANNEL_3: inserted channel3 + \param[in] offset : the offset data + \param[out] none + \retval the conversion value +*/ +void adc_inserted_channel_offset_config(uint8_t inserted_channel,uint16_t offset) +{ + uint8_t inserted_length; + uint32_t num = 0U; + + inserted_length = (uint8_t)GET_BITS(ADC_ISQ, 20U, 21U); + num = 3U - (inserted_length - inserted_channel); + + if(num <= 3U){ + /* calculate the offset of the register */ + num = num * 4U; + /* config the offset of the selected channels */ + REG32((ADC_BASE) + 0x14U + num) = IOFFX_IOFF((uint32_t)offset); + } +} + +/*! + \brief adc external trigger enable + \param[in] adc_channel_group: select the channel group + \arg ADC_REGULAR_CHANNEL: regular channel group + \arg ADC_INSERTED_CHANNEL: inserted channel group + \param[in] newvalue: ENABLE or DISABLE + \param[out] none + \retval none +*/ +void adc_external_trigger_config(uint8_t channel_group,ControlStatus newvalue) +{ + if(newvalue){ + if(RESET != (channel_group & ADC_REGULAR_CHANNEL)){ + ADC_CTL1 |= ADC_CTL1_ETERC; + } + if(RESET != (channel_group & ADC_INSERTED_CHANNEL)){ + ADC_CTL1 |= ADC_CTL1_ETEIC; + } + }else{ + if(RESET != (channel_group & ADC_REGULAR_CHANNEL)){ + ADC_CTL1 &= ~ADC_CTL1_ETERC; + } + if(RESET != (channel_group & ADC_INSERTED_CHANNEL)){ + ADC_CTL1 &= ~ADC_CTL1_ETEIC; + } + } +} + +/*! + \brief adc external trigger source config + \param[in] adc_channel_group: select the channel group + \arg ADC_REGULAR_CHANNEL: regular channel group + \arg ADC_INSERTED_CHANNEL: inserted channel group + \param[in] external_trigger_source: regular or inserted group trigger source + for regular channel: + \arg ADC_EXTTRIG_REGULAR_T0_CH0: external trigger timer 0 CH0 event select for regular channel + \arg ADC_EXTTRIG_REGULAR_T0_CH1: external trigger timer 0 CH1 event select for regular channel + \arg ADC_EXTTRIG_REGULAR_T0_CH2: external trigger timer 0 CH2 event select for regular channel + \arg ADC_EXTTRIG_REGULAR_T1_CH1: external trigger timer 1 CH1 event select for regular channel + \arg ADC_EXTTRIG_REGULAR_T2_TRGO: external trigger timer 2 TRGO event select for regular channel + \arg ADC_EXTTRIG_REGULAR_T14_CH0: external trigger timer 14 CH0 event select for regular channel + \arg ADC_EXTTRIG_REGULAR_EXT_IT11: external trigger extiline 11 select for regular channel + \arg ADC_EXTTRIG_REGULAR_SWRCST: software trigger select for regular channel + for inserted channel: + \arg ADC_EXTTRIG_INSERTED_T0_TRGO: external trigger timer0 TRGO event select for inserted channel + \arg ADC_EXTTRIG_INSERTED_T0_CH3: external trigger timer0 CH3 event select for inserted channel + \arg ADC_EXTTRIG_INSERTED_T1_TRGO: external trigger timer1 TRGO event select for inserted channel + \arg ADC_EXTTRIG_INSERTED_T1_CH0: external trigger timer1 CH0 event select for inserted channel + \arg ADC_EXTTRIG_INSERTED_T2_CH3: external trigger timer2 CH3 event select for inserted channel + \arg ADC_EXTTRIG_INSERTED_T14_TRGO: external trigger timer14 TRGO event select for inserted channel + \arg ADC_EXTTRIG_INSERTED_EXT_IT15: external interrupt line 15 select for inserted channel + \arg ADC_EXTTRIG_INSERTED_SWRCST: software trigger select for inserted channel + \param[out] none + \retval none +*/ +void adc_external_trigger_source_config(uint8_t channel_group,uint32_t external_trigger_source) +{ + switch(channel_group){ + case ADC_REGULAR_CHANNEL: + ADC_CTL1 &= ~((uint32_t)ADC_CTL1_ETSRC); + ADC_CTL1 |= (uint32_t)external_trigger_source; + break; + case ADC_INSERTED_CHANNEL: + ADC_CTL1 &= ~((uint32_t)ADC_CTL1_ETSIC); + ADC_CTL1 |= (uint32_t)external_trigger_source; + break; + default: + break; + } +} + +/*! + \brief adc software trigger enable + \param[in] adc_channel_group: select the channel group + \arg ADC_REGULAR_CHANNEL: regular channel group + \arg ADC_INSERTED_CHANNEL: inserted channel group + \param[out] none + \retval none +*/ +void adc_software_trigger_enable(uint8_t channel_group) +{ + if(RESET != (channel_group & ADC_REGULAR_CHANNEL)){ + ADC_CTL1 |= ADC_CTL1_SWRCST; + } + if(RESET != (channel_group & ADC_INSERTED_CHANNEL)){ + ADC_CTL1 |= ADC_CTL1_SWICST; + } +} + +/*! + \brief adc regular group data register read + \param[in] none + \param[out] none + \retval the conversion value +*/ +uint16_t adc_regular_data_read(void) +{ + return (uint16_t)(ADC_RDATA); +} + +/*! + \brief adc inserted group data register read + \param[in] inserted_channel : insert channel select + \arg ADC_INSERTED_CHANNEL_0: inserted channel0 + \arg ADC_INSERTED_CHANNEL_1: inserted channel1 + \arg ADC_INSERTED_CHANNEL_2: inserted channel2 + \arg ADC_INSERTED_CHANNEL_3: inserted channel3 + \param[out] none + \retval the conversion value +*/ +uint16_t adc_inserted_data_read(uint8_t inserted_channel) +{ + uint32_t idata; + /* read the data of the selected channel */ + switch(inserted_channel){ + case ADC_INSERTED_CHANNEL_0: + idata = ADC_IDATA0; + break; + case ADC_INSERTED_CHANNEL_1: + idata = ADC_IDATA1; + break; + case ADC_INSERTED_CHANNEL_2: + idata = ADC_IDATA2; + break; + case ADC_INSERTED_CHANNEL_3: + idata = ADC_IDATA3; + break; + default: + idata = 0U; + break; + } + return (uint16_t)idata; +} + +/*! + \brief get the ADC flag bits + \param[in] flag: the adc flag bits + \arg ADC_FLAG_WDE: analog watchdog event flag + \arg ADC_FLAG_EOC: end of group conversion flag + \arg ADC_FLAG_EOIC: end of inserted group conversion flag + \arg ADC_FLAG_STIC: start flag of inserted channel group + \arg ADC_FLAG_STRC: start flag of regular channel group + \param[out] none + \retval FlagStatus: SET or RESET +*/ +FlagStatus adc_flag_get(uint32_t flag) +{ + FlagStatus reval = RESET; + + if(ADC_STAT & flag){ + reval = SET; + } + return reval; + +} + +/*! + \brief clear the ADC status flag + \param[in] flag: the adc flag bits + \arg ADC_FLAG_WDE: analog watchdog event flag + \arg ADC_FLAG_EOC: end of group conversion flag + \arg ADC_FLAG_EOIC: end of inserted group conversion flag + \arg ADC_FLAG_STIC: start flag of inserted channel group + \arg ADC_FLAG_STRC: start flag of regular channel group + \param[out] none + \retval none +*/ +void adc_flag_clear(uint32_t flag) +{ + ADC_STAT &= ~((uint32_t)flag); +} + +/*! + \brief get the ADC interrupt bits + \param[in] flag: the adc interrupt flag + \arg ADC_INT_FLAG_WDE: analog watchdog interrupt flag + \arg ADC_INT_FLAG_EOC: end of group conversion interrupt flag + \arg ADC_INT_FLAG_EOIC: end of inserted group conversion interrupt flag + \param[out] none + \retval FlagStatus: SET or RESET +*/ +FlagStatus adc_interrupt_flag_get(uint32_t flag) +{ + FlagStatus interrupt_flag = RESET; + uint32_t state; + /* check the interrupt bits */ + switch(flag){ + case ADC_INT_FLAG_WDE: + state = ADC_STAT & ADC_STAT_WDE; + if((ADC_CTL0 & ADC_CTL0_WDEIE) && state){ + interrupt_flag = SET; + } + break; + case ADC_INT_FLAG_EOC: + state = ADC_STAT & ADC_STAT_EOC; + if((ADC_CTL0 & ADC_CTL0_EOCIE) && state){ + interrupt_flag = SET; + } + break; + case ADC_INT_FLAG_EOIC: + state = ADC_STAT & ADC_STAT_EOIC; + if((ADC_CTL0 & ADC_CTL0_EOICIE) && state){ + interrupt_flag = SET; + } + break; + default: + break; + } + + return interrupt_flag; +} + +/*! + \brief clear the ADC interrupt bits + \param[in] adc_interrupt: the adc interrupt bits + \arg ADC_INT_FLAG_WDE: analog watchdog interrupt flag + \arg ADC_INT_FLAG_EOC: end of group conversion interrupt flag + \arg ADC_INT_FLAG_EOIC: end of inserted group conversion interrupt flag + \param[out] none + \retval none +*/ +void adc_interrupt_flag_clear(uint32_t flag) +{ + ADC_STAT &= ~((uint32_t)flag); +} + +/*! + \brief enable ADC interrupt + \param[in] adc_periph: ADCx, x=0,1,2 + only one among these parameters can be selected + \param[in] interrupt: the adc interrupt + one or more parameters can be selected + \arg ADC_INT_WDE: analog watchdog interrupt + \arg ADC_INT_EOC: end of group conversion interrupt + \arg ADC_INT_EOIC: end of inserted group conversion interrupt + \param[out] none + \retval none +*/ +void adc_interrupt_enable(uint32_t interrupt) +{ + if(RESET != (interrupt & ADC_INT_WDE)){ + ADC_CTL0 |= (uint32_t) ADC_CTL0_WDEIE; + } + + if(RESET != (interrupt & ADC_INT_EOC)){ + ADC_CTL0 |= (uint32_t) ADC_CTL0_EOCIE; + } + + if(RESET != (interrupt & ADC_INT_EOIC)){ + ADC_CTL0 |= (uint32_t) ADC_CTL0_EOICIE; + } +} + +/*! + \brief disable ADC interrupt + \param[in] adc_periph: ADCx,x=0,1,2 + only one among these parameters can be selected + \param[in] interrupt: the adc interrupt flag + one or more parameters can be selected + \arg ADC_INT_WDE: analog watchdog interrupt flag + \arg ADC_INT_EOC: end of group conversion interrupt flag + \arg ADC_INT_EOIC: end of inserted group conversion interrupt flag + \param[out] none + \retval none +*/ +void adc_interrupt_disable(uint32_t interrupt) +{ + if(RESET != (interrupt & ADC_INT_WDE)){ + ADC_CTL0 &= ~(uint32_t) ADC_CTL0_WDEIE; + } + + if(RESET != (interrupt & ADC_INT_EOC)){ + ADC_CTL0 &= ~(uint32_t) ADC_CTL0_EOCIE; + } + + if(RESET != (interrupt & ADC_INT_EOIC)){ + ADC_CTL0 &= ~(uint32_t) ADC_CTL0_EOICIE; + } +} + +/*! + \brief ADC analog watchdog single channel config + \param[in] channel: the selected ADC channel + \arg ADC_CHANNEL_x: ADC Channelx(x=0..18) + \param[out] none + \retval none +*/ +void adc_watchdog_single_channel_enable(uint8_t channel) +{ + ADC_CTL0 &= (uint32_t)~(ADC_CTL0_RWDEN | ADC_CTL0_IWDEN | ADC_CTL0_WDSC | ADC_CTL0_WDCHSEL); + + ADC_CTL0 |= (uint32_t)channel; + ADC_CTL0 |= (uint32_t)(ADC_CTL0_RWDEN | ADC_CTL0_IWDEN | ADC_CTL0_WDSC); +} + +/*! + \brief adc analog watchdog group channel config + \param[in] adc_channel_group: the channel group use analog watchdog + \arg ADC_REGULAR_CHANNEL: regular channel group + \arg ADC_INSERTED_CHANNEL: inserted channel group + \arg ADC_REGULAR_INSERTED_CHANNEL: both regular and inserted group + \param[out] none + \retval none +*/ +void adc_watchdog_group_channel_enable(uint8_t channel_group) +{ + ADC_CTL0 &= (uint32_t)~(ADC_CTL0_RWDEN | ADC_CTL0_IWDEN | ADC_CTL0_WDSC); + /* select the group */ + switch(channel_group){ + case ADC_REGULAR_CHANNEL: + ADC_CTL0 |= (uint32_t) ADC_CTL0_RWDEN; + break; + case ADC_INSERTED_CHANNEL: + ADC_CTL0 |= (uint32_t) ADC_CTL0_IWDEN; + break; + case ADC_REGULAR_INSERTED_CHANNEL: + ADC_CTL0 |= (uint32_t)(ADC_CTL0_RWDEN | ADC_CTL0_IWDEN); + break; + default: + break; + } +} + + + +/*! + \brief ADC analog watchdog disable + \param[in] none + \param[out] none + \retval none +*/ +void adc_watchdog_disable(void) +{ + ADC_CTL0 &= (uint32_t)~(ADC_CTL0_RWDEN | ADC_CTL0_IWDEN | ADC_CTL0_WDSC | ADC_CTL0_WDCHSEL); +} + +/*! + \brief ADC analog watchdog threshold config + \param[in] low_threshold: analog watchdog low threshold + \param[in] high_threshold: analog watchdog high threshold + \param[out] none + \retval none +*/ +void adc_watchdog_threshold_config(uint16_t low_threshold,uint16_t high_threshold) +{ + ADC_WDLT = (uint32_t)low_threshold; + ADC_WDHT = (uint32_t)high_threshold; +} + +#ifdef GD32F170_190 +/*! + \brief adc resolution config + \param[in] resolution: ADC resolution + \arg ADC_RESOLUTION_12B: 12-bit ADC resolution + \arg ADC_RESOLUTION_10B: 10-bit ADC resolution + \arg ADC_RESOLUTION_8B: 8-bit ADC resolution + \arg ADC_RESOLUTION_6B: 6-bit ADC resolution + \param[out] none + \retval none +*/ +void adc_resolution_config(uint32_t resolution) +{ + ADC_CTL0 &= ~((uint32_t)ADC_CTL0_DRES); + ADC_CTL0 |= (uint32_t)resolution; +} + +/*! + \brief adc oversample mode config + \param[in] mode: ADC oversampling mode + \arg ADC_OVERSAMPLING_ALL_CONVERT: all oversampled conversions for a channel + are done consecutively after a trigger + \arg ADC_OVERSAMPLING_ONE_CONVERT: each oversampled conversion for a channel + needs a trigger + \param[in] shift: ADC oversampling shift + \arg ADC_OVERSAMPLING_SHIFT_NONE: no oversampling shift + \arg ADC_OVERSAMPLING_SHIFT_1B: 1-bit oversampling shift + \arg ADC_OVERSAMPLING_SHIFT_2B: 2-bit oversampling shift + \arg ADC_OVERSAMPLING_SHIFT_3B: 3-bit oversampling shift + \arg ADC_OVERSAMPLING_SHIFT_4B: 3-bit oversampling shift + \arg ADC_OVERSAMPLING_SHIFT_5B: 5-bit oversampling shift + \arg ADC_OVERSAMPLING_SHIFT_6B: 6-bit oversampling shift + \arg ADC_OVERSAMPLING_SHIFT_7B: 7-bit oversampling shift + \arg ADC_OVERSAMPLING_SHIFT_8B: 8-bit oversampling shift + \param[in] ratio: ADC oversampling ratio + \arg ADC_OVERSAMPLING_RATIO_MUL2: oversampling ratio X2 + \arg ADC_OVERSAMPLING_RATIO_MUL4: oversampling ratio X4 + \arg ADC_OVERSAMPLING_RATIO_MUL8: oversampling ratio X8 + \arg ADC_OVERSAMPLING_RATIO_MUL16: oversampling ratio X16 + \arg ADC_OVERSAMPLING_RATIO_MUL32: oversampling ratio X32 + \arg ADC_OVERSAMPLING_RATIO_MUL64: oversampling ratio X64 + \arg ADC_OVERSAMPLING_RATIO_MUL128: oversampling ratio X128 + \arg ADC_OVERSAMPLING_RATIO_MUL256: oversampling ratio X256 + \param[out] none + \retval none +*/ +void adc_oversample_mode_config(uint8_t mode, uint16_t shift,uint8_t ratio) +{ + if(mode){ + ADC_OVSAMPCTL |= (uint32_t)ADC_OVSAMPCTL_TOVS; + }else{ + ADC_OVSAMPCTL &= ~((uint32_t)ADC_OVSAMPCTL_TOVS); + } + /* config the shift and ratio */ + ADC_OVSAMPCTL &= ~((uint32_t)(ADC_OVSAMPCTL_OVSR | ADC_OVSAMPCTL_OVSS)); + ADC_OVSAMPCTL |= ((uint32_t)shift | (uint32_t)ratio); +} + +/*! + \brief enable ADC oversample mode + \param[in] none + \param[out] none + \retval none +*/ +void adc_oversample_mode_enable(void) +{ + ADC_OVSAMPCTL |= ADC_OVSAMPCTL_OVSEN; +} + +/*! + \brief disable ADC oversample mode + \param[in] none + \param[out] none + \retval none +*/ +void adc_oversample_mode_disable(void) +{ + ADC_OVSAMPCTL &= ~((uint32_t)ADC_OVSAMPCTL_OVSEN); +} +#endif /* GD32F170_190 */ diff --git a/HoverBoardGigaDevice/RTE/Device/GD32F130C8/gd32f1x0_dbg.c b/HUGS/RTE/Device/GD32F130C8/gd32f1x0_dbg.c similarity index 97% rename from HoverBoardGigaDevice/RTE/Device/GD32F130C8/gd32f1x0_dbg.c rename to HUGS/RTE/Device/GD32F130C8/gd32f1x0_dbg.c index 8ecb4522..05e649bb 100644 --- a/HoverBoardGigaDevice/RTE/Device/GD32F130C8/gd32f1x0_dbg.c +++ b/HUGS/RTE/Device/GD32F130C8/gd32f1x0_dbg.c @@ -1,106 +1,106 @@ -/*! - \file gd32f1x0_dbg.c - \brief DBG driver -*/ - -/* - Copyright (C) 2017 GigaDevice - - 2014-12-26, V1.0.0, platform GD32F1x0(x=3,5) - 2016-01-15, V2.0.0, platform GD32F1x0(x=3,5,7,9) - 2016-04-30, V3.0.0, firmware update for GD32F1x0(x=3,5,7,9) - 2017-06-19, V3.1.0, firmware update for GD32F1x0(x=3,5,7,9) -*/ - -#include "gd32f1x0_dbg.h" - -#define DBG_RESET_VAL 0x00000000U - -/*! - \brief deinitialize the DBG - \param[in] none - \param[out] none - \retval none -*/ -void dbg_deinit(void) -{ - DBG_CTL0 = DBG_RESET_VAL; - DBG_CTL1 = DBG_RESET_VAL; -} - -/*! - \brief read DBG_ID code register - \param[in] none - \param[out] none - \retval DBG_ID code -*/ -uint32_t dbg_id_get(void) -{ - return DBG_ID; -} - -/*! - \brief enable low power behavior when the mcu is in debug mode - \param[in] dbg_low_power: - this parameter can be any combination of the following values: - \arg DBG_LOW_POWER_SLEEP: keep debugger connection during sleep mode - \arg DBG_LOW_POWER_DEEPSLEEP: keep debugger connection during deepsleep mode - \arg DBG_LOW_POWER_STANDBY: keep debugger connection during standby mode - \param[out] none - \retval none -*/ -void dbg_low_power_enable(uint32_t dbg_low_power) -{ - DBG_CTL0 |= dbg_low_power; -} - -/*! - \brief disable low power behavior when the mcu is in debug mode - \param[in] dbg_low_power: - this parameter can be any combination of the following values: - \arg DBG_LOW_POWER_SLEEP: donot keep debugger connection during sleep mode - \arg DBG_LOW_POWER_DEEPSLEEP: donot keep debugger connection during deepsleep mode - \arg DBG_LOW_POWER_STANDBY: donot keep debugger connection during standby mode - \param[out] none - \retval none -*/ -void dbg_low_power_disable(uint32_t dbg_low_power) -{ - DBG_CTL0 &= ~dbg_low_power; -} - -/*! - \brief enable peripheral behavior when the mcu is in debug mode - \param[in] dbg_periph: refer to dbg_periph_enum - only one parameter can be selected which is shown as below: - \arg DBG_FWDGT_HOLD : debug FWDGT kept when core is halted - \arg DBG_WWDGT_HOLD : debug WWDGT kept when core is halted - \arg DBG_CANx_HOLD (x=0,1): hold CANx counter when core is halted(170_190 series only) - \arg DBG_I2Cx_HOLD (x=0,1,2): hold I2Cx smbus when core is halted - \arg DBG_TIMERx_HOLD (x=0,1,2,5,13,14,15,16): hold TIMERx counter when core is halted - \arg DBG_RTC_HOLD : hold RTC calendar and wakeup counter when core is halted - \param[out] none - \retval none -*/ -void dbg_periph_enable(dbg_periph_enum dbg_periph) -{ - DBG_REG_VAL(dbg_periph) |= BIT(DBG_BIT_POS(dbg_periph)); -} - -/*! - \brief disable peripheral behavior when the mcu is in debug mode - \param[in] dbg_periph: refer to dbg_periph_enum - only one parameter can be selected which is shown as below: - \arg DBG_FWDGT_HOLD : debug FWDGT kept when core is halted - \arg DBG_WWDGT_HOLD : debug WWDGT kept when core is halted - \arg DBG_CANx_HOLD (x=0,1): hold CANx counter when core is halted(170_190 series only) - \arg DBG_I2Cx_HOLD (x=0,1,2): hold I2Cx smbus when core is halted - \arg DBG_TIMERx_HOLD (x=0,1,2,5,13,14,15,16): hold TIMERx counter when core is halted - \arg DBG_RTC_HOLD : hold RTC calendar and wakeup counter when core is halted - \param[out] none - \retval none -*/ -void dbg_periph_disable(dbg_periph_enum dbg_periph) -{ - DBG_REG_VAL(dbg_periph) &= ~BIT(DBG_BIT_POS(dbg_periph)); -} +/*! + \file gd32f1x0_dbg.c + \brief DBG driver +*/ + +/* + Copyright (C) 2017 GigaDevice + + 2014-12-26, V1.0.0, platform GD32F1x0(x=3,5) + 2016-01-15, V2.0.0, platform GD32F1x0(x=3,5,7,9) + 2016-04-30, V3.0.0, firmware update for GD32F1x0(x=3,5,7,9) + 2017-06-19, V3.1.0, firmware update for GD32F1x0(x=3,5,7,9) +*/ + +#include "gd32f1x0_dbg.h" + +#define DBG_RESET_VAL 0x00000000U + +/*! + \brief deinitialize the DBG + \param[in] none + \param[out] none + \retval none +*/ +void dbg_deinit(void) +{ + DBG_CTL0 = DBG_RESET_VAL; + DBG_CTL1 = DBG_RESET_VAL; +} + +/*! + \brief read DBG_ID code register + \param[in] none + \param[out] none + \retval DBG_ID code +*/ +uint32_t dbg_id_get(void) +{ + return DBG_ID; +} + +/*! + \brief enable low power behavior when the mcu is in debug mode + \param[in] dbg_low_power: + this parameter can be any combination of the following values: + \arg DBG_LOW_POWER_SLEEP: keep debugger connection during sleep mode + \arg DBG_LOW_POWER_DEEPSLEEP: keep debugger connection during deepsleep mode + \arg DBG_LOW_POWER_STANDBY: keep debugger connection during standby mode + \param[out] none + \retval none +*/ +void dbg_low_power_enable(uint32_t dbg_low_power) +{ + DBG_CTL0 |= dbg_low_power; +} + +/*! + \brief disable low power behavior when the mcu is in debug mode + \param[in] dbg_low_power: + this parameter can be any combination of the following values: + \arg DBG_LOW_POWER_SLEEP: donot keep debugger connection during sleep mode + \arg DBG_LOW_POWER_DEEPSLEEP: donot keep debugger connection during deepsleep mode + \arg DBG_LOW_POWER_STANDBY: donot keep debugger connection during standby mode + \param[out] none + \retval none +*/ +void dbg_low_power_disable(uint32_t dbg_low_power) +{ + DBG_CTL0 &= ~dbg_low_power; +} + +/*! + \brief enable peripheral behavior when the mcu is in debug mode + \param[in] dbg_periph: refer to dbg_periph_enum + only one parameter can be selected which is shown as below: + \arg DBG_FWDGT_HOLD : debug FWDGT kept when core is halted + \arg DBG_WWDGT_HOLD : debug WWDGT kept when core is halted + \arg DBG_CANx_HOLD (x=0,1): hold CANx counter when core is halted(170_190 series only) + \arg DBG_I2Cx_HOLD (x=0,1,2): hold I2Cx smbus when core is halted + \arg DBG_TIMERx_HOLD (x=0,1,2,5,13,14,15,16): hold TIMERx counter when core is halted + \arg DBG_RTC_HOLD : hold RTC calendar and wakeup counter when core is halted + \param[out] none + \retval none +*/ +void dbg_periph_enable(dbg_periph_enum dbg_periph) +{ + DBG_REG_VAL(dbg_periph) |= BIT(DBG_BIT_POS(dbg_periph)); +} + +/*! + \brief disable peripheral behavior when the mcu is in debug mode + \param[in] dbg_periph: refer to dbg_periph_enum + only one parameter can be selected which is shown as below: + \arg DBG_FWDGT_HOLD : debug FWDGT kept when core is halted + \arg DBG_WWDGT_HOLD : debug WWDGT kept when core is halted + \arg DBG_CANx_HOLD (x=0,1): hold CANx counter when core is halted(170_190 series only) + \arg DBG_I2Cx_HOLD (x=0,1,2): hold I2Cx smbus when core is halted + \arg DBG_TIMERx_HOLD (x=0,1,2,5,13,14,15,16): hold TIMERx counter when core is halted + \arg DBG_RTC_HOLD : hold RTC calendar and wakeup counter when core is halted + \param[out] none + \retval none +*/ +void dbg_periph_disable(dbg_periph_enum dbg_periph) +{ + DBG_REG_VAL(dbg_periph) &= ~BIT(DBG_BIT_POS(dbg_periph)); +} diff --git a/HoverBoardGigaDevice/RTE/Device/GD32F130C8/gd32f1x0_dma.c b/HUGS/RTE/Device/GD32F130C8/gd32f1x0_dma.c similarity index 97% rename from HoverBoardGigaDevice/RTE/Device/GD32F130C8/gd32f1x0_dma.c rename to HUGS/RTE/Device/GD32F130C8/gd32f1x0_dma.c index 43f7321d..4cec0fc8 100644 --- a/HoverBoardGigaDevice/RTE/Device/GD32F130C8/gd32f1x0_dma.c +++ b/HUGS/RTE/Device/GD32F130C8/gd32f1x0_dma.c @@ -1,492 +1,492 @@ -/*! - \file gd32f1x0_dma.c - \brief DMA driver -*/ - -/* - Copyright (C) 2017 GigaDevice - - 2014-12-26, V1.0.0, platform GD32F1x0(x=3,5) - 2016-01-15, V2.0.0, platform GD32F1x0(x=3,5,7,9) - 2016-04-30, V3.0.0, firmware update for GD32F1x0(x=3,5,7,9) - 2017-06-19, V3.1.0, firmware update for GD32F1x0(x=3,5,7,9) -*/ - -#include "gd32f1x0_dma.h" - -/*! - \brief deinitialize DMA a channel registers - \param[in] channelx: specify which DMA channel is deinitialized - \arg DMA_CHx(x=0..6) - \param[out] none - \retval none -*/ -void dma_deinit(dma_channel_enum channelx) -{ - /* disable DMA a channel */ - DMA_CHCTL(channelx) &= ~DMA_CHXCTL_CHEN; - /* reset DMA channel registers */ - DMA_CHCTL(channelx) = DMA_CHCTL_RESET_VALUE; - DMA_CHCNT(channelx) = DMA_CHCNT_RESET_VALUE; - DMA_CHPADDR(channelx) = DMA_CHPADDR_RESET_VALUE; - DMA_CHMADDR(channelx) = DMA_CHMADDR_RESET_VALUE; - DMA_INTC |= DMA_FLAG_ADD(DMA_CHINTF_RESET_VALUE,channelx); -} - -/*! - \brief initialize DMA channel - \param[in] channelx: specify which DMA channel is initialized - \arg DMA_CHx(x=0..6) - \param[in] init_struct: the data needed to initialize DMA channel - periph_addr: peripheral base address - periph_width: DMA_PERIPHERAL_WIDTH_8BIT, DMA_PERIPHERAL_WIDTH_16BIT, DMA_PERIPHERAL_WIDTH_32BIT - periph_inc: DMA_PERIPH_INCREASE_ENABLE, DMA_PERIPH_INCREASE_DISABLE - memory_addr: memory base address - memory_width: DMA_MEMORY_WIDTH_8BIT, DMA_MEMORY_WIDTH_16BIT, DMA_MEMORY_WIDTH_32BIT - memory_inc: DMA_MEMORY_INCREASE_ENABLE, DMA_MEMORY_INCREASE_DISABLE - direction: DMA_PERIPHERAL_TO_MEMORY, DMA_MEMORY_TO_PERIPHERAL - number: the number of remaining data to be transferred by the DMA - priority: DMA_PRIORITY_LOW, DMA_PRIORITY_MEDIUM, DMA_PRIORITY_HIGH, DMA_PRIORITY_ULTRA_HIGH - \param[out] none - \retval none -*/ -void dma_init(dma_channel_enum channelx, dma_parameter_struct init_struct) -{ - uint32_t ctl; - /* configure peripheral base address */ - DMA_CHPADDR(channelx) = init_struct.periph_addr; - - /* configure memory base address */ - DMA_CHMADDR(channelx) = init_struct.memory_addr; - - /* configure the number of remaining data to be transferred */ - DMA_CHCNT(channelx) = init_struct.number; - - /* configure peripheral transfer width,memory transfer width, */ - ctl = DMA_CHCTL(channelx); - ctl &= ~(DMA_CHXCTL_PWIDTH | DMA_CHXCTL_MWIDTH | DMA_CHXCTL_PRIO); - ctl |= (init_struct.periph_width | init_struct.memory_width | init_struct.priority); - DMA_CHCTL(channelx)=ctl; - - /* configure peripheral increasing mode */ - if(DMA_PERIPH_INCREASE_ENABLE == init_struct.periph_inc){ - DMA_CHCTL(channelx) |= DMA_CHXCTL_PNAGA; - }else{ - DMA_CHCTL(channelx) &= ~DMA_CHXCTL_PNAGA; - } - - /* configure memory increasing mode */ - if(DMA_MEMORY_INCREASE_ENABLE == init_struct.memory_inc){ - DMA_CHCTL(channelx) |= DMA_CHXCTL_MNAGA; - }else{ - DMA_CHCTL(channelx) &= ~DMA_CHXCTL_MNAGA; - } - - /* configure the direction of data transfer */ - if(DMA_PERIPHERAL_TO_MEMORY == init_struct.direction){ - DMA_CHCTL(channelx) &= ~DMA_CHXCTL_DIR; - }else{ - DMA_CHCTL(channelx) |= DMA_CHXCTL_DIR; - } -} - -/*! - \brief enable DMA circulation mode - \param[in] channelx: specify which DMA channel - \arg DMA_CHx(x=0..6) - \param[out] none - \retval none -*/ -void dma_circulation_enable(dma_channel_enum channelx) -{ - DMA_CHCTL(channelx) |= DMA_CHXCTL_CMEN; -} - -/*! - \brief disable DMA circulation mode - \param[in] channelx: specify which DMA channel - \arg DMA_CHx(x=0..6) - \param[out] none - \retval none -*/ -void dma_circulation_disable(dma_channel_enum channelx) -{ - DMA_CHCTL(channelx) &= ~DMA_CHXCTL_CMEN; -} - -/*! - \brief enable memory to memory mode - \param[in] channelx: specify which DMA channel - \arg DMA_CHx(x=0..6) - \param[out] none - \retval none -*/ -void dma_memory_to_memory_enable(dma_channel_enum channelx) -{ - DMA_CHCTL(channelx) |= DMA_CHXCTL_M2M; -} - -/*! - \brief disable memory to memory mode - \param[in] channelx: specify which DMA channel - \arg DMA_CHx(x=0..6) - \param[out] none - \retval none -*/ -void dma_memory_to_memory_disable(dma_channel_enum channelx) -{ - DMA_CHCTL(channelx) &= ~DMA_CHXCTL_M2M; -} - -/*! - \brief enable DMA channel - \param[in] channelx: specify which DMA channel - \arg DMA_CHx(x=0..6) - \param[out] none - \retval none -*/ -void dma_channel_enable(dma_channel_enum channelx) -{ - DMA_CHCTL(channelx) |= DMA_CHXCTL_CHEN; -} - -/*! - \brief disable DMA channel - \param[in] channelx: specify which DMA channel - \arg DMA_CHx(x=0..6) - \param[out] none - \retval none -*/ -void dma_channel_disable(dma_channel_enum channelx) -{ - DMA_CHCTL(channelx) &= ~DMA_CHXCTL_CHEN; -} - -/*! - \brief set DMA peripheral base address - \param[in] channelx: specify which DMA channel to set peripheral base address - \arg DMA_CHx(x=0..6) - \param[in] address: peripheral base address - \param[out] none - \retval none -*/ -void dma_periph_address_config(dma_channel_enum channelx, uint32_t address) -{ - DMA_CHPADDR(channelx) = address; -} - -/*! - \brief set DMA Memory base address - \param[in] channelx: specify which DMA channel to set Memory base address - \arg DMA_CHx(x=0..6) - \param[in] address: Memory base address - \param[out] none - \retval none -*/ -void dma_memory_address_config(dma_channel_enum channelx, uint32_t address) -{ - DMA_CHMADDR(channelx) = address; -} - -/*! - \brief set the number of remaining data to be transferred by the DMA - \param[in] channelx: specify which DMA channel to set number - \arg DMA_CHx(x=0..6) - \param[in] number: the number of remaining data to be transferred by the DMA - \param[out] none - \retval none -*/ -void dma_transfer_number_config(dma_channel_enum channelx, uint32_t number) -{ - DMA_CHCNT(channelx) = number; -} - -/*! - \brief get the number of remaining data to be transferred by the DMA - \param[in] channelx: specify which DMA channel to set number - \arg DMA_CHx(x=0..6) - \param[out] none - \retval uint32_t: the number of remaining data to be transferred by the DMA -*/ -uint32_t dma_transfer_number_get(dma_channel_enum channelx) -{ - return (uint32_t)DMA_CHCNT(channelx); -} - -/*! - \brief configure priority level of DMA channel - \param[in] channelx: specify which DMA channel - \arg DMA_CHx(x=0..6) - \param[in] priority: priority Level of this channel - \arg DMA_PRIORITY_LOW: low priority - \arg DMA_PRIORITY_MEDIUM: medium priority - \arg DMA_PRIORITY_HIGH: high priority - \arg DMA_PRIORITY_ULTRA_HIGH: ultra high priority - \param[out] none - \retval none -*/ -void dma_priority_config(dma_channel_enum channelx, uint32_t priority) -{ - uint32_t ctl; - /* acquire DMA_CHxCTL register */ - ctl = DMA_CHCTL(channelx); - /* assign regiser */ - ctl &= ~DMA_CHXCTL_PRIO; - ctl |= priority; - DMA_CHCTL(channelx) = ctl; -} - -/*! - \brief configure transfer data size of memory - \param[in] channelx: specify which DMA channel - \arg DMA_CHx(x=0..6) - \param[in] msize: transfer data size of memory - \arg DMA_MEMORY_WIDTH_8BIT: transfer data size of memory is 8-bit - \arg DMA_MEMORY_WIDTH_16BIT: transfer data size of memory is 16-bit - \arg DMA_MEMORY_WIDTH_32BIT: transfer data size of memory is 32-bit - \param[out] none - \retval none -*/ -void dma_memory_width_config (dma_channel_enum channelx, uint32_t msize) -{ - uint32_t ctl; - /* acquire DMA_CHxCTL register */ - ctl = DMA_CHCTL(channelx); - /* assign regiser */ - ctl &= ~DMA_CHXCTL_MWIDTH; - ctl |= msize; - DMA_CHCTL(channelx) = ctl; -} - -/*! - \brief configure transfer data size of peripheral - \param[in] channelx: specify which DMA channel - \arg DMA_CHx(x=0..6) - \param[in] msize: transfer data size of peripheral - \arg DMA_PERIPHERAL_WIDTH_8BIT: transfer data size of peripheral is 8-bit - \arg DMA_PERIPHERAL_WIDTH_16BIT: transfer data size of peripheral is 16-bit - \arg DMA_PERIPHERAL_WIDTH_32BIT: transfer data size of peripheral is 32-bit - \param[out] none - \retval none -*/ -void dma_periph_width_config (dma_channel_enum channelx, uint32_t psize) -{ - uint32_t ctl; - /* acquire DMA_CHxCTL register */ - ctl = DMA_CHCTL(channelx); - /* assign regiser */ - ctl &= ~DMA_CHXCTL_PWIDTH; - ctl |= psize; - DMA_CHCTL(channelx) = ctl; -} - -/*! - \brief enable next address increasement algorithm of memory - \param[in] channelx: specify which DMA channel - \arg DMA_CHx(x=0..6) - \param[out] none - \retval none -*/ -void dma_memory_increase_enable(dma_channel_enum channelx) -{ - DMA_CHCTL(channelx) |= DMA_CHXCTL_MNAGA; -} - -/*! - \brief disable next address increasement algorithm of memory - \param[in] channelx: specify which DMA channel - \arg DMA_CHx(x=0..6) - \param[out] none - \retval none -*/ -void dma_memory_increase_disable(dma_channel_enum channelx) -{ - DMA_CHCTL(channelx) &= ~DMA_CHXCTL_MNAGA; -} - -/*! - \brief enable next address increasement algorithm of peripheral - \param[in] channelx: specify which DMA channel - \arg DMA_CHx(x=0..6) - \param[out] none - \retval none -*/ -void dma_periph_increase_enable(dma_channel_enum channelx) -{ - DMA_CHCTL(channelx) |= DMA_CHXCTL_PNAGA; -} - -/*! - \brief disable next address increasement algorithm of peripheral - \param[in] channelx: specify which DMA channel - \arg DMA_CHx(x=0..6) - \param[out] none - \retval none -*/ -void dma_periph_increase_disable(dma_channel_enum channelx) -{ - DMA_CHCTL(channelx) &= ~DMA_CHXCTL_PNAGA; -} - -/*! - \brief configure the direction of data transfer on the channel - \param[in] channelx: specify which DMA channel - \arg DMA_CHx(x=0..6) - \param[in] direction: specify the direction of data transfer - \arg DMA_PERIPHERAL_TO_MEMORY: read from peripheral and write to memory - \arg DMA_MEMORY_TO_PERIPHERAL: read from memory and write to peripheral - \param[out] none - \retval none -*/ -void dma_transfer_direction_config(dma_channel_enum channelx, uint8_t direction) -{ - if(DMA_PERIPHERAL_TO_MEMORY == direction){ - DMA_CHCTL(channelx) &= ~DMA_CHXCTL_DIR; - } else { - DMA_CHCTL(channelx) |= DMA_CHXCTL_DIR; - } -} - -/*! - \brief check DMA flag and interrupt enable bit is set or not - \param[in] channelx: specify which DMA channel to get flag - \arg DMA_CHx(x=0..6) - \param[in] flag: specify get which flag - only one parameter can be selected which is shown as below: - \arg DMA_INT_FLAG_G: global interrupt flag of channel - \arg DMA_INT_FLAG_FTF: full transfer finish interrupt flag of channel - \arg DMA_INT_FLAG_HTF: half transfer finish interrupt flag of channel - \arg DMA_INT_FLAG_ERR: error interrupt flag of channel - \param[out] none - \retval FlagStatus: SET or RESET -*/ -FlagStatus dma_interrupt_flag_get(dma_channel_enum channelx, uint32_t flag) -{ - uint32_t interrupt_enable = 0U, interrupt_flag = 0U; - uint32_t gif_check = 0x0FU, gif_enable = 0x0EU; - - switch(flag){ - case DMA_INT_FLAG_FTF: - interrupt_flag = DMA_INTF & DMA_FLAG_ADD(flag, channelx); - interrupt_flag = interrupt_flag >> ((channelx) * 4U); - interrupt_enable = DMA_CHCTL(channelx) & DMA_CHXCTL_FTFIE; - break; - case DMA_INT_FLAG_HTF: - interrupt_flag = DMA_INTF & DMA_FLAG_ADD(flag, channelx); - interrupt_flag = interrupt_flag >> ((channelx) * 4U); - interrupt_enable = DMA_CHCTL(channelx) & DMA_CHXCTL_HTFIE; - break; - case DMA_INT_FLAG_ERR: - interrupt_flag = DMA_INTF & DMA_FLAG_ADD(flag, channelx); - interrupt_flag = interrupt_flag >> ((channelx) * 4U); - interrupt_enable = DMA_CHCTL( channelx) & DMA_CHXCTL_ERRIE; - break; - case DMA_INT_FLAG_G: - interrupt_flag = DMA_INTF & DMA_FLAG_ADD(gif_check, channelx); - interrupt_flag = interrupt_flag >> ((channelx) * 4U); - interrupt_enable = DMA_CHCTL(channelx) & gif_enable; - break; - default: - break; - } - - if(interrupt_flag & interrupt_enable){ - return SET; - }else{ - return RESET; - } -} - -/*! - \brief clear DMA a channel flag - \param[in] channelx: specify which DMA channel to clear flag - \arg DMA_CHx(x=0..6) - \param[in] flag: specify get which flag - only one parameter can be selected which is shown as below: - \arg DMA_INT_FLAG_G: global interrupt flag of channel - \arg DMA_INT_FLAG_FTF: full transfer finish interrupt flag of channel - \arg DMA_INT_FLAG_HTF: half transfer finish interrupt flag of channel - \arg DMA_INT_FLAG_ERR: error interrupt flag of channel - \param[out] none - \retval none -*/ -void dma_interrupt_flag_clear(dma_channel_enum channelx, uint32_t flag) -{ - DMA_INTC |= DMA_FLAG_ADD(flag, channelx); -} - -/*! - \brief enable DMA interrupt - \param[in] channelx: specify which DMA channel - \arg DMA_CHx(x=0..6) - \param[in] source: specify which interrupt to enbale - \arg DMA_INT_ERR: channel error interrupt - \arg DMA_INT_HTF: channel transfer half complete interrupt - \arg DMA_INT_FTF: channel transfer complete interrupt - \param[out] none - \retval none -*/ -void dma_interrupt_enable(dma_channel_enum channelx, uint32_t source) -{ - DMA_CHCTL(channelx) |= source; -} - -/*! - \brief disable DMA interrupt - \param[in] channelx: specify which DMA channel - \arg DMA_CHx(x=0..6) - \param[in] source: specify which interrupt to disbale - \arg DMA_INT_ERR: channel error interrupt - \arg DMA_INT_HTF: channel transfer half complete interrupt - \arg DMA_INT_FTF: for channel transfer complete interrupt - \param[out] none - \retval none -*/ -void dma_interrupt_disable(dma_channel_enum channelx, uint32_t source) -{ - DMA_CHCTL(channelx) &= ~source; -} - -/*! - \brief check DMA flag is set or not - \param[in] channelx: specify which DMA channel to get flag - \arg DMA_CHx(x=0..6) - \param[in] flag: specify get which flag - only one parameter can be selected which is shown as below: - \arg DMA_FLAG_G: global interrupt flag of channel - \arg DMA_FLAG_FTF: full transfer finish flag of channel - \arg DMA_FLAG_HTF: half transfer finish flag of channel - \arg DMA_FLAG_ERR: error flag of channel - \param[out] none - \retval FlagStatus: SET or RESET -*/ -FlagStatus dma_flag_get(dma_channel_enum channelx, uint32_t flag) -{ - FlagStatus reval; - - if(RESET != (DMA_INTF & DMA_FLAG_ADD(flag, channelx))){ - reval = SET; - }else{ - reval = RESET; - } - - return reval; -} - -/*! - \brief clear DMA a channel flag - \param[in] channelx: specify which DMA channel to clear flag - \arg DMA_CHx(x=0..6) - \param[in] flag: specify get which flag - only one parameter can be selected which is shown as below: - \arg DMA_FLAG_G: global interrupt flag of channel - \arg DMA_FLAG_FTF: full transfer finish flag of channel - \arg DMA_FLAG_HTF: half transfer finish flag of channel - \arg DMA_FLAG_ERR: error flag of channel - \param[out] none - \retval none -*/ -void dma_flag_clear(dma_channel_enum channelx, uint32_t flag) -{ - DMA_INTC |= DMA_FLAG_ADD(flag, channelx); -} +/*! + \file gd32f1x0_dma.c + \brief DMA driver +*/ + +/* + Copyright (C) 2017 GigaDevice + + 2014-12-26, V1.0.0, platform GD32F1x0(x=3,5) + 2016-01-15, V2.0.0, platform GD32F1x0(x=3,5,7,9) + 2016-04-30, V3.0.0, firmware update for GD32F1x0(x=3,5,7,9) + 2017-06-19, V3.1.0, firmware update for GD32F1x0(x=3,5,7,9) +*/ + +#include "gd32f1x0_dma.h" + +/*! + \brief deinitialize DMA a channel registers + \param[in] channelx: specify which DMA channel is deinitialized + \arg DMA_CHx(x=0..6) + \param[out] none + \retval none +*/ +void dma_deinit(dma_channel_enum channelx) +{ + /* disable DMA a channel */ + DMA_CHCTL(channelx) &= ~DMA_CHXCTL_CHEN; + /* reset DMA channel registers */ + DMA_CHCTL(channelx) = DMA_CHCTL_RESET_VALUE; + DMA_CHCNT(channelx) = DMA_CHCNT_RESET_VALUE; + DMA_CHPADDR(channelx) = DMA_CHPADDR_RESET_VALUE; + DMA_CHMADDR(channelx) = DMA_CHMADDR_RESET_VALUE; + DMA_INTC |= DMA_FLAG_ADD(DMA_CHINTF_RESET_VALUE,channelx); +} + +/*! + \brief initialize DMA channel + \param[in] channelx: specify which DMA channel is initialized + \arg DMA_CHx(x=0..6) + \param[in] init_struct: the data needed to initialize DMA channel + periph_addr: peripheral base address + periph_width: DMA_PERIPHERAL_WIDTH_8BIT, DMA_PERIPHERAL_WIDTH_16BIT, DMA_PERIPHERAL_WIDTH_32BIT + periph_inc: DMA_PERIPH_INCREASE_ENABLE, DMA_PERIPH_INCREASE_DISABLE + memory_addr: memory base address + memory_width: DMA_MEMORY_WIDTH_8BIT, DMA_MEMORY_WIDTH_16BIT, DMA_MEMORY_WIDTH_32BIT + memory_inc: DMA_MEMORY_INCREASE_ENABLE, DMA_MEMORY_INCREASE_DISABLE + direction: DMA_PERIPHERAL_TO_MEMORY, DMA_MEMORY_TO_PERIPHERAL + number: the number of remaining data to be transferred by the DMA + priority: DMA_PRIORITY_LOW, DMA_PRIORITY_MEDIUM, DMA_PRIORITY_HIGH, DMA_PRIORITY_ULTRA_HIGH + \param[out] none + \retval none +*/ +void dma_init(dma_channel_enum channelx, dma_parameter_struct init_struct) +{ + uint32_t ctl; + /* configure peripheral base address */ + DMA_CHPADDR(channelx) = init_struct.periph_addr; + + /* configure memory base address */ + DMA_CHMADDR(channelx) = init_struct.memory_addr; + + /* configure the number of remaining data to be transferred */ + DMA_CHCNT(channelx) = init_struct.number; + + /* configure peripheral transfer width,memory transfer width, */ + ctl = DMA_CHCTL(channelx); + ctl &= ~(DMA_CHXCTL_PWIDTH | DMA_CHXCTL_MWIDTH | DMA_CHXCTL_PRIO); + ctl |= (init_struct.periph_width | init_struct.memory_width | init_struct.priority); + DMA_CHCTL(channelx)=ctl; + + /* configure peripheral increasing mode */ + if(DMA_PERIPH_INCREASE_ENABLE == init_struct.periph_inc){ + DMA_CHCTL(channelx) |= DMA_CHXCTL_PNAGA; + }else{ + DMA_CHCTL(channelx) &= ~DMA_CHXCTL_PNAGA; + } + + /* configure memory increasing mode */ + if(DMA_MEMORY_INCREASE_ENABLE == init_struct.memory_inc){ + DMA_CHCTL(channelx) |= DMA_CHXCTL_MNAGA; + }else{ + DMA_CHCTL(channelx) &= ~DMA_CHXCTL_MNAGA; + } + + /* configure the direction of data transfer */ + if(DMA_PERIPHERAL_TO_MEMORY == init_struct.direction){ + DMA_CHCTL(channelx) &= ~DMA_CHXCTL_DIR; + }else{ + DMA_CHCTL(channelx) |= DMA_CHXCTL_DIR; + } +} + +/*! + \brief enable DMA circulation mode + \param[in] channelx: specify which DMA channel + \arg DMA_CHx(x=0..6) + \param[out] none + \retval none +*/ +void dma_circulation_enable(dma_channel_enum channelx) +{ + DMA_CHCTL(channelx) |= DMA_CHXCTL_CMEN; +} + +/*! + \brief disable DMA circulation mode + \param[in] channelx: specify which DMA channel + \arg DMA_CHx(x=0..6) + \param[out] none + \retval none +*/ +void dma_circulation_disable(dma_channel_enum channelx) +{ + DMA_CHCTL(channelx) &= ~DMA_CHXCTL_CMEN; +} + +/*! + \brief enable memory to memory mode + \param[in] channelx: specify which DMA channel + \arg DMA_CHx(x=0..6) + \param[out] none + \retval none +*/ +void dma_memory_to_memory_enable(dma_channel_enum channelx) +{ + DMA_CHCTL(channelx) |= DMA_CHXCTL_M2M; +} + +/*! + \brief disable memory to memory mode + \param[in] channelx: specify which DMA channel + \arg DMA_CHx(x=0..6) + \param[out] none + \retval none +*/ +void dma_memory_to_memory_disable(dma_channel_enum channelx) +{ + DMA_CHCTL(channelx) &= ~DMA_CHXCTL_M2M; +} + +/*! + \brief enable DMA channel + \param[in] channelx: specify which DMA channel + \arg DMA_CHx(x=0..6) + \param[out] none + \retval none +*/ +void dma_channel_enable(dma_channel_enum channelx) +{ + DMA_CHCTL(channelx) |= DMA_CHXCTL_CHEN; +} + +/*! + \brief disable DMA channel + \param[in] channelx: specify which DMA channel + \arg DMA_CHx(x=0..6) + \param[out] none + \retval none +*/ +void dma_channel_disable(dma_channel_enum channelx) +{ + DMA_CHCTL(channelx) &= ~DMA_CHXCTL_CHEN; +} + +/*! + \brief set DMA peripheral base address + \param[in] channelx: specify which DMA channel to set peripheral base address + \arg DMA_CHx(x=0..6) + \param[in] address: peripheral base address + \param[out] none + \retval none +*/ +void dma_periph_address_config(dma_channel_enum channelx, uint32_t address) +{ + DMA_CHPADDR(channelx) = address; +} + +/*! + \brief set DMA Memory base address + \param[in] channelx: specify which DMA channel to set Memory base address + \arg DMA_CHx(x=0..6) + \param[in] address: Memory base address + \param[out] none + \retval none +*/ +void dma_memory_address_config(dma_channel_enum channelx, uint32_t address) +{ + DMA_CHMADDR(channelx) = address; +} + +/*! + \brief set the number of remaining data to be transferred by the DMA + \param[in] channelx: specify which DMA channel to set number + \arg DMA_CHx(x=0..6) + \param[in] number: the number of remaining data to be transferred by the DMA + \param[out] none + \retval none +*/ +void dma_transfer_number_config(dma_channel_enum channelx, uint32_t number) +{ + DMA_CHCNT(channelx) = number; +} + +/*! + \brief get the number of remaining data to be transferred by the DMA + \param[in] channelx: specify which DMA channel to set number + \arg DMA_CHx(x=0..6) + \param[out] none + \retval uint32_t: the number of remaining data to be transferred by the DMA +*/ +uint32_t dma_transfer_number_get(dma_channel_enum channelx) +{ + return (uint32_t)DMA_CHCNT(channelx); +} + +/*! + \brief configure priority level of DMA channel + \param[in] channelx: specify which DMA channel + \arg DMA_CHx(x=0..6) + \param[in] priority: priority Level of this channel + \arg DMA_PRIORITY_LOW: low priority + \arg DMA_PRIORITY_MEDIUM: medium priority + \arg DMA_PRIORITY_HIGH: high priority + \arg DMA_PRIORITY_ULTRA_HIGH: ultra high priority + \param[out] none + \retval none +*/ +void dma_priority_config(dma_channel_enum channelx, uint32_t priority) +{ + uint32_t ctl; + /* acquire DMA_CHxCTL register */ + ctl = DMA_CHCTL(channelx); + /* assign regiser */ + ctl &= ~DMA_CHXCTL_PRIO; + ctl |= priority; + DMA_CHCTL(channelx) = ctl; +} + +/*! + \brief configure transfer data size of memory + \param[in] channelx: specify which DMA channel + \arg DMA_CHx(x=0..6) + \param[in] msize: transfer data size of memory + \arg DMA_MEMORY_WIDTH_8BIT: transfer data size of memory is 8-bit + \arg DMA_MEMORY_WIDTH_16BIT: transfer data size of memory is 16-bit + \arg DMA_MEMORY_WIDTH_32BIT: transfer data size of memory is 32-bit + \param[out] none + \retval none +*/ +void dma_memory_width_config (dma_channel_enum channelx, uint32_t msize) +{ + uint32_t ctl; + /* acquire DMA_CHxCTL register */ + ctl = DMA_CHCTL(channelx); + /* assign regiser */ + ctl &= ~DMA_CHXCTL_MWIDTH; + ctl |= msize; + DMA_CHCTL(channelx) = ctl; +} + +/*! + \brief configure transfer data size of peripheral + \param[in] channelx: specify which DMA channel + \arg DMA_CHx(x=0..6) + \param[in] msize: transfer data size of peripheral + \arg DMA_PERIPHERAL_WIDTH_8BIT: transfer data size of peripheral is 8-bit + \arg DMA_PERIPHERAL_WIDTH_16BIT: transfer data size of peripheral is 16-bit + \arg DMA_PERIPHERAL_WIDTH_32BIT: transfer data size of peripheral is 32-bit + \param[out] none + \retval none +*/ +void dma_periph_width_config (dma_channel_enum channelx, uint32_t psize) +{ + uint32_t ctl; + /* acquire DMA_CHxCTL register */ + ctl = DMA_CHCTL(channelx); + /* assign regiser */ + ctl &= ~DMA_CHXCTL_PWIDTH; + ctl |= psize; + DMA_CHCTL(channelx) = ctl; +} + +/*! + \brief enable next address increasement algorithm of memory + \param[in] channelx: specify which DMA channel + \arg DMA_CHx(x=0..6) + \param[out] none + \retval none +*/ +void dma_memory_increase_enable(dma_channel_enum channelx) +{ + DMA_CHCTL(channelx) |= DMA_CHXCTL_MNAGA; +} + +/*! + \brief disable next address increasement algorithm of memory + \param[in] channelx: specify which DMA channel + \arg DMA_CHx(x=0..6) + \param[out] none + \retval none +*/ +void dma_memory_increase_disable(dma_channel_enum channelx) +{ + DMA_CHCTL(channelx) &= ~DMA_CHXCTL_MNAGA; +} + +/*! + \brief enable next address increasement algorithm of peripheral + \param[in] channelx: specify which DMA channel + \arg DMA_CHx(x=0..6) + \param[out] none + \retval none +*/ +void dma_periph_increase_enable(dma_channel_enum channelx) +{ + DMA_CHCTL(channelx) |= DMA_CHXCTL_PNAGA; +} + +/*! + \brief disable next address increasement algorithm of peripheral + \param[in] channelx: specify which DMA channel + \arg DMA_CHx(x=0..6) + \param[out] none + \retval none +*/ +void dma_periph_increase_disable(dma_channel_enum channelx) +{ + DMA_CHCTL(channelx) &= ~DMA_CHXCTL_PNAGA; +} + +/*! + \brief configure the direction of data transfer on the channel + \param[in] channelx: specify which DMA channel + \arg DMA_CHx(x=0..6) + \param[in] direction: specify the direction of data transfer + \arg DMA_PERIPHERAL_TO_MEMORY: read from peripheral and write to memory + \arg DMA_MEMORY_TO_PERIPHERAL: read from memory and write to peripheral + \param[out] none + \retval none +*/ +void dma_transfer_direction_config(dma_channel_enum channelx, uint8_t direction) +{ + if(DMA_PERIPHERAL_TO_MEMORY == direction){ + DMA_CHCTL(channelx) &= ~DMA_CHXCTL_DIR; + } else { + DMA_CHCTL(channelx) |= DMA_CHXCTL_DIR; + } +} + +/*! + \brief check DMA flag and interrupt enable bit is set or not + \param[in] channelx: specify which DMA channel to get flag + \arg DMA_CHx(x=0..6) + \param[in] flag: specify get which flag + only one parameter can be selected which is shown as below: + \arg DMA_INT_FLAG_G: global interrupt flag of channel + \arg DMA_INT_FLAG_FTF: full transfer finish interrupt flag of channel + \arg DMA_INT_FLAG_HTF: half transfer finish interrupt flag of channel + \arg DMA_INT_FLAG_ERR: error interrupt flag of channel + \param[out] none + \retval FlagStatus: SET or RESET +*/ +FlagStatus dma_interrupt_flag_get(dma_channel_enum channelx, uint32_t flag) +{ + uint32_t interrupt_enable = 0U, interrupt_flag = 0U; + uint32_t gif_check = 0x0FU, gif_enable = 0x0EU; + + switch(flag){ + case DMA_INT_FLAG_FTF: + interrupt_flag = DMA_INTF & DMA_FLAG_ADD(flag, channelx); + interrupt_flag = interrupt_flag >> ((channelx) * 4U); + interrupt_enable = DMA_CHCTL(channelx) & DMA_CHXCTL_FTFIE; + break; + case DMA_INT_FLAG_HTF: + interrupt_flag = DMA_INTF & DMA_FLAG_ADD(flag, channelx); + interrupt_flag = interrupt_flag >> ((channelx) * 4U); + interrupt_enable = DMA_CHCTL(channelx) & DMA_CHXCTL_HTFIE; + break; + case DMA_INT_FLAG_ERR: + interrupt_flag = DMA_INTF & DMA_FLAG_ADD(flag, channelx); + interrupt_flag = interrupt_flag >> ((channelx) * 4U); + interrupt_enable = DMA_CHCTL( channelx) & DMA_CHXCTL_ERRIE; + break; + case DMA_INT_FLAG_G: + interrupt_flag = DMA_INTF & DMA_FLAG_ADD(gif_check, channelx); + interrupt_flag = interrupt_flag >> ((channelx) * 4U); + interrupt_enable = DMA_CHCTL(channelx) & gif_enable; + break; + default: + break; + } + + if(interrupt_flag & interrupt_enable){ + return SET; + }else{ + return RESET; + } +} + +/*! + \brief clear DMA a channel flag + \param[in] channelx: specify which DMA channel to clear flag + \arg DMA_CHx(x=0..6) + \param[in] flag: specify get which flag + only one parameter can be selected which is shown as below: + \arg DMA_INT_FLAG_G: global interrupt flag of channel + \arg DMA_INT_FLAG_FTF: full transfer finish interrupt flag of channel + \arg DMA_INT_FLAG_HTF: half transfer finish interrupt flag of channel + \arg DMA_INT_FLAG_ERR: error interrupt flag of channel + \param[out] none + \retval none +*/ +void dma_interrupt_flag_clear(dma_channel_enum channelx, uint32_t flag) +{ + DMA_INTC |= DMA_FLAG_ADD(flag, channelx); +} + +/*! + \brief enable DMA interrupt + \param[in] channelx: specify which DMA channel + \arg DMA_CHx(x=0..6) + \param[in] source: specify which interrupt to enbale + \arg DMA_INT_ERR: channel error interrupt + \arg DMA_INT_HTF: channel transfer half complete interrupt + \arg DMA_INT_FTF: channel transfer complete interrupt + \param[out] none + \retval none +*/ +void dma_interrupt_enable(dma_channel_enum channelx, uint32_t source) +{ + DMA_CHCTL(channelx) |= source; +} + +/*! + \brief disable DMA interrupt + \param[in] channelx: specify which DMA channel + \arg DMA_CHx(x=0..6) + \param[in] source: specify which interrupt to disbale + \arg DMA_INT_ERR: channel error interrupt + \arg DMA_INT_HTF: channel transfer half complete interrupt + \arg DMA_INT_FTF: for channel transfer complete interrupt + \param[out] none + \retval none +*/ +void dma_interrupt_disable(dma_channel_enum channelx, uint32_t source) +{ + DMA_CHCTL(channelx) &= ~source; +} + +/*! + \brief check DMA flag is set or not + \param[in] channelx: specify which DMA channel to get flag + \arg DMA_CHx(x=0..6) + \param[in] flag: specify get which flag + only one parameter can be selected which is shown as below: + \arg DMA_FLAG_G: global interrupt flag of channel + \arg DMA_FLAG_FTF: full transfer finish flag of channel + \arg DMA_FLAG_HTF: half transfer finish flag of channel + \arg DMA_FLAG_ERR: error flag of channel + \param[out] none + \retval FlagStatus: SET or RESET +*/ +FlagStatus dma_flag_get(dma_channel_enum channelx, uint32_t flag) +{ + FlagStatus reval; + + if(RESET != (DMA_INTF & DMA_FLAG_ADD(flag, channelx))){ + reval = SET; + }else{ + reval = RESET; + } + + return reval; +} + +/*! + \brief clear DMA a channel flag + \param[in] channelx: specify which DMA channel to clear flag + \arg DMA_CHx(x=0..6) + \param[in] flag: specify get which flag + only one parameter can be selected which is shown as below: + \arg DMA_FLAG_G: global interrupt flag of channel + \arg DMA_FLAG_FTF: full transfer finish flag of channel + \arg DMA_FLAG_HTF: half transfer finish flag of channel + \arg DMA_FLAG_ERR: error flag of channel + \param[out] none + \retval none +*/ +void dma_flag_clear(dma_channel_enum channelx, uint32_t flag) +{ + DMA_INTC |= DMA_FLAG_ADD(flag, channelx); +} diff --git a/HoverBoardGigaDevice/RTE/Device/GD32F130C8/gd32f1x0_fwdgt.c b/HUGS/RTE/Device/GD32F130C8/gd32f1x0_fwdgt.c similarity index 96% rename from HoverBoardGigaDevice/RTE/Device/GD32F130C8/gd32f1x0_fwdgt.c rename to HUGS/RTE/Device/GD32F130C8/gd32f1x0_fwdgt.c index 624c0976..0c403faf 100644 --- a/HoverBoardGigaDevice/RTE/Device/GD32F130C8/gd32f1x0_fwdgt.c +++ b/HUGS/RTE/Device/GD32F130C8/gd32f1x0_fwdgt.c @@ -1,146 +1,146 @@ -/*! - \file gd32f1x0_fwdgt.c - \brief FWDGT driver -*/ - -/* - Copyright (C) 2017 GigaDevice - - 2014-12-26, V1.0.0, platform GD32F1x0(x=3,5) - 2016-01-15, V2.0.0, platform GD32F1x0(x=3,5,7,9) - 2016-04-30, V3.0.0, firmware update for GD32F1x0(x=3,5,7,9) - 2017-06-19, V3.1.0, firmware update for GD32F1x0(x=3,5,7,9) -*/ - -#include "gd32f1x0_fwdgt.h" - -/*! - \brief disable write access to FWDGT_PSC,FWDGT_RLD and FWDGT_WND - \param[in] none - \param[out] none - \retval none -*/ -void fwdgt_write_disable(void) -{ - FWDGT_CTL = FWDGT_WRITEACCESS_DISABLE; -} - -/*! - \brief reload the counter of FWDGT - \param[in] none - \param[out] none - \retval none -*/ -void fwdgt_counter_reload(void) -{ - FWDGT_CTL = FWDGT_KEY_RELOAD; -} - -/*! - \brief start the free watchdog timer counter - \param[in] none - \param[out] none - \retval none -*/ -void fwdgt_enable(void) -{ - FWDGT_CTL = FWDGT_KEY_ENABLE; -} - -/*! - \brief configure the free watchdog timer counter window value - \param[in] window_value: specify window value(0x0000 - 0x0FFF) - \param[out] none - \retval ErrStatus: ERROR or SUCCESS -*/ -ErrStatus fwdgt_window_value_config(uint16_t window_value) -{ - uint32_t time_index = FWDGT_WND_TIMEOUT; - uint32_t flag_status = RESET; - - /* enable write access to FWDGT_WND */ - FWDGT_CTL = FWDGT_WRITEACCESS_ENABLE; - - /* wait until the WUD flag to be reset */ - do{ - flag_status = FWDGT_STAT & FWDGT_STAT_WUD; - }while((--time_index > 0U) && ((uint32_t)RESET != flag_status)); - - if ((uint32_t)RESET != flag_status){ - return ERROR; - } - - FWDGT_WND = WND_WND(window_value); - - return SUCCESS; -} - -/*! - \brief configure counter reload value, and prescaler divider value - \param[in] reload_value: specify reload value(0x0000 - 0x0FFF) - \param[in] prescaler_div: FWDGT prescaler value - \arg FWDGT_PSC_DIV4: FWDGT prescaler set to 4 - \arg FWDGT_PSC_DIV8: FWDGT prescaler set to 8 - \arg FWDGT_PSC_DIV16: FWDGT prescaler set to 16 - \arg FWDGT_PSC_DIV32: FWDGT prescaler set to 32 - \arg FWDGT_PSC_DIV64: FWDGT prescaler set to 64 - \arg FWDGT_PSC_DIV128: FWDGT prescaler set to 128 - \arg FWDGT_PSC_DIV256: FWDGT prescaler set to 256 - \param[out] none - \retval ErrStatus: ERROR or SUCCESS -*/ -ErrStatus fwdgt_config(uint16_t reload_value, uint8_t prescaler_div) -{ - uint32_t timeout = FWDGT_PSC_TIMEOUT; - uint32_t flag_status = RESET; - - /* enable write access to FWDGT_PSC,and FWDGT_RLD */ - FWDGT_CTL = FWDGT_WRITEACCESS_ENABLE; - - /* wait until the PUD flag to be reset */ - do{ - flag_status = FWDGT_STAT & FWDGT_STAT_PUD; - }while((--timeout > 0U) && ((uint32_t)RESET != flag_status)); - - if ((uint32_t)RESET != flag_status){ - return ERROR; - } - - /* configure FWDGT */ - FWDGT_PSC = (uint32_t)prescaler_div; - - timeout = FWDGT_RLD_TIMEOUT; - /* wait until the RUD flag to be reset */ - do{ - flag_status = FWDGT_STAT & FWDGT_STAT_RUD; - }while((--timeout > 0U) && ((uint32_t)RESET != flag_status)); - - if ((uint32_t)RESET != flag_status){ - return ERROR; - } - - FWDGT_RLD = RLD_RLD(reload_value); - - /* reload the counter */ - FWDGT_CTL = FWDGT_KEY_RELOAD; - - return SUCCESS; -} - -/*! - \brief get flag state of FWDGT - \param[in] flag: flag to get - \arg FWDGT_FLAG_PUD: a write operation to FWDGT_PSC register is on going - \arg FWDGT_FLAG_RUD: a write operation to FWDGT_RLD register is on going - \arg FWDGT_FLAG_WUD: a write operation to FWDGT_WND register is on going - \param[out] none - \retval FlagStatus: SET or RESET -*/ -FlagStatus fwdgt_flag_get(uint16_t flag) -{ - if(FWDGT_STAT & flag){ - return SET; - } - - return RESET; -} +/*! + \file gd32f1x0_fwdgt.c + \brief FWDGT driver +*/ + +/* + Copyright (C) 2017 GigaDevice + + 2014-12-26, V1.0.0, platform GD32F1x0(x=3,5) + 2016-01-15, V2.0.0, platform GD32F1x0(x=3,5,7,9) + 2016-04-30, V3.0.0, firmware update for GD32F1x0(x=3,5,7,9) + 2017-06-19, V3.1.0, firmware update for GD32F1x0(x=3,5,7,9) +*/ + +#include "gd32f1x0_fwdgt.h" + +/*! + \brief disable write access to FWDGT_PSC,FWDGT_RLD and FWDGT_WND + \param[in] none + \param[out] none + \retval none +*/ +void fwdgt_write_disable(void) +{ + FWDGT_CTL = FWDGT_WRITEACCESS_DISABLE; +} + +/*! + \brief reload the counter of FWDGT + \param[in] none + \param[out] none + \retval none +*/ +void fwdgt_counter_reload(void) +{ + FWDGT_CTL = FWDGT_KEY_RELOAD; +} + +/*! + \brief start the free watchdog timer counter + \param[in] none + \param[out] none + \retval none +*/ +void fwdgt_enable(void) +{ + FWDGT_CTL = FWDGT_KEY_ENABLE; +} + +/*! + \brief configure the free watchdog timer counter window value + \param[in] window_value: specify window value(0x0000 - 0x0FFF) + \param[out] none + \retval ErrStatus: ERROR or SUCCESS +*/ +ErrStatus fwdgt_window_value_config(uint16_t window_value) +{ + uint32_t time_index = FWDGT_WND_TIMEOUT; + uint32_t flag_status = RESET; + + /* enable write access to FWDGT_WND */ + FWDGT_CTL = FWDGT_WRITEACCESS_ENABLE; + + /* wait until the WUD flag to be reset */ + do{ + flag_status = FWDGT_STAT & FWDGT_STAT_WUD; + }while((--time_index > 0U) && ((uint32_t)RESET != flag_status)); + + if ((uint32_t)RESET != flag_status){ + return ERROR; + } + + FWDGT_WND = WND_WND(window_value); + + return SUCCESS; +} + +/*! + \brief configure counter reload value, and prescaler divider value + \param[in] reload_value: specify reload value(0x0000 - 0x0FFF) + \param[in] prescaler_div: FWDGT prescaler value + \arg FWDGT_PSC_DIV4: FWDGT prescaler set to 4 + \arg FWDGT_PSC_DIV8: FWDGT prescaler set to 8 + \arg FWDGT_PSC_DIV16: FWDGT prescaler set to 16 + \arg FWDGT_PSC_DIV32: FWDGT prescaler set to 32 + \arg FWDGT_PSC_DIV64: FWDGT prescaler set to 64 + \arg FWDGT_PSC_DIV128: FWDGT prescaler set to 128 + \arg FWDGT_PSC_DIV256: FWDGT prescaler set to 256 + \param[out] none + \retval ErrStatus: ERROR or SUCCESS +*/ +ErrStatus fwdgt_config(uint16_t reload_value, uint8_t prescaler_div) +{ + uint32_t timeout = FWDGT_PSC_TIMEOUT; + uint32_t flag_status = RESET; + + /* enable write access to FWDGT_PSC,and FWDGT_RLD */ + FWDGT_CTL = FWDGT_WRITEACCESS_ENABLE; + + /* wait until the PUD flag to be reset */ + do{ + flag_status = FWDGT_STAT & FWDGT_STAT_PUD; + }while((--timeout > 0U) && ((uint32_t)RESET != flag_status)); + + if ((uint32_t)RESET != flag_status){ + return ERROR; + } + + /* configure FWDGT */ + FWDGT_PSC = (uint32_t)prescaler_div; + + timeout = FWDGT_RLD_TIMEOUT; + /* wait until the RUD flag to be reset */ + do{ + flag_status = FWDGT_STAT & FWDGT_STAT_RUD; + }while((--timeout > 0U) && ((uint32_t)RESET != flag_status)); + + if ((uint32_t)RESET != flag_status){ + return ERROR; + } + + FWDGT_RLD = RLD_RLD(reload_value); + + /* reload the counter */ + FWDGT_CTL = FWDGT_KEY_RELOAD; + + return SUCCESS; +} + +/*! + \brief get flag state of FWDGT + \param[in] flag: flag to get + \arg FWDGT_FLAG_PUD: a write operation to FWDGT_PSC register is on going + \arg FWDGT_FLAG_RUD: a write operation to FWDGT_RLD register is on going + \arg FWDGT_FLAG_WUD: a write operation to FWDGT_WND register is on going + \param[out] none + \retval FlagStatus: SET or RESET +*/ +FlagStatus fwdgt_flag_get(uint16_t flag) +{ + if(FWDGT_STAT & flag){ + return SET; + } + + return RESET; +} diff --git a/HoverBoardGigaDevice/RTE/Device/GD32F130C8/gd32f1x0_gpio.c b/HUGS/RTE/Device/GD32F130C8/gd32f1x0_gpio.c similarity index 96% rename from HoverBoardGigaDevice/RTE/Device/GD32F130C8/gd32f1x0_gpio.c rename to HUGS/RTE/Device/GD32F130C8/gd32f1x0_gpio.c index 61960872..0cb86839 100644 --- a/HoverBoardGigaDevice/RTE/Device/GD32F130C8/gd32f1x0_gpio.c +++ b/HUGS/RTE/Device/GD32F130C8/gd32f1x0_gpio.c @@ -1,337 +1,337 @@ -/*! - \file gd32f1x0_gpio.c - \brief GPIO driver -*/ - -/* - Copyright (C) 2017 GigaDevice - - 2014-12-26, V1.0.0, platform for GD32F1x0(x=3,5) - 2016-01-15, V2.0.0, platform for GD32F1x0(x=3,5,7,9) - 2016-04-30, V3.0.0, firmware update for GD32F1x0(x=3,5,7,9) - 2017-06-19, V3.1.0, firmware update for GD32F1x0(x=3,5,7,9) -*/ - -#include "gd32f1x0_gpio.h" - -/*! - \brief reset GPIO port - \param[in] gpio_periph: GPIOx(x = A,B,C,D,F) - \param[out] none - \retval none -*/ -void gpio_deinit(uint32_t gpio_periph) -{ - switch(gpio_periph){ - case GPIOA: - /* reset GPIOA */ - rcu_periph_reset_enable(RCU_GPIOARST); - rcu_periph_reset_disable(RCU_GPIOARST); - break; - case GPIOB: - /* reset GPIOB */ - rcu_periph_reset_enable(RCU_GPIOBRST); - rcu_periph_reset_disable(RCU_GPIOBRST); - break; - case GPIOC: - /* reset GPIOC */ - rcu_periph_reset_enable(RCU_GPIOCRST); - rcu_periph_reset_disable(RCU_GPIOCRST); - break; - case GPIOD: - /* reset GPIOD */ - rcu_periph_reset_enable(RCU_GPIODRST); - rcu_periph_reset_disable(RCU_GPIODRST); - break; - case GPIOF: - /* reset GPIOF */ - rcu_periph_reset_enable(RCU_GPIOFRST); - rcu_periph_reset_disable(RCU_GPIOFRST); - break; - default: - break; - } -} - -/*! - \brief set GPIO output mode - \param[in] gpio_periph: GPIOx(x = A,B,C,D,F) - \param[in] mode: gpio pin mode - \arg GPIO_MODE_INPUT: input mode - \arg GPIO_MODE_OUTPUT: output mode - \arg GPIO_MODE_AF: alternate function mode - \arg GPIO_MODE_ANALOG: analog mode - \param[in] pull_up_down: gpio pin with pull-up or pull-down resistor - \arg GPIO_PUPD_NONE: without weak pull-up and pull-down resistors - \arg GPIO_PUPD_PULLUP: with weak pull-up resistor - \arg GPIO_PUPD_PULLDOWN:with weak pull-down resistor - \param[in] pin: GPIO_PIN_x(x=0..15), GPIO_PIN_ALL - \param[out] none - \retval none -*/ -void gpio_mode_set(uint32_t gpio_periph,uint32_t mode,uint32_t pull_up_down,uint32_t pin) -{ - uint16_t i; - uint32_t ctl, pupd; - - ctl = GPIO_CTL(gpio_periph); - pupd = GPIO_PUD(gpio_periph); - - for (i = 0U; i < 16U; i++){ - if((1U << i) & pin){ - /* clear the specified pin mode bits */ - ctl &= ~GPIO_MODE_MASK(i); - /* set the specified pin mode bits */ - ctl |= GPIO_MODE_SET(i, mode); - - /* clear the specified pin pupd bits */ - pupd &= ~GPIO_PUPD_MASK(i); - /* set the specified pin pupd bits */ - pupd |= GPIO_PUPD_SET(i, pull_up_down); - } - } - - GPIO_CTL(gpio_periph) = ctl; - GPIO_PUD(gpio_periph) = pupd; -} - -/*! - \brief set GPIO output type and speed - \param[in] gpio_periph: GPIOx(x = A,B,C,D,F) - \param[in] otype: gpio pin output mode - \arg GPIO_OTYPE_PP: push pull mode - \arg GPIO_OTYPE_OD: open drain mode - \param[in] speed - \arg GPIO_OSPEED_2MHZ: output max speed 2M - \arg GPIO_OSPEED_10MHZ: output max speed 10M - \arg GPIO_OSPEED_50MHZ: output max speed 50M - \param[in] pin: GPIO_PIN_x(x=0..15), GPIO_PIN_ALL - \param[out] none - \retval none -*/ -void gpio_output_options_set(uint32_t gpio_periph,uint8_t otype,uint32_t speed,uint32_t pin) -{ - uint16_t i; - uint32_t ospeedr; - - if(0x1U == otype){ - GPIO_OMODE(gpio_periph) |= (uint32_t)pin; - }else{ - GPIO_OMODE(gpio_periph) &= (uint32_t)(~pin); - } - - /* get the specified pin output speed bits value */ - ospeedr = GPIO_OSPD(gpio_periph); - - for(i = 0U;i < 16U;i++){ - if((1U << i) & pin){ - /* clear the specified pin output speed bits */ - ospeedr &= ~GPIO_OSPEED_MASK(i); - /* set the specified pin output speed bits */ - ospeedr |= GPIO_OSPEED_SET(i,speed); - } - } - GPIO_OSPD(gpio_periph) = ospeedr; -} - -/*! - \brief set GPIO pin - \param[in] gpio_periph: GPIOx(x = A,B,C,D,F) - \param[in] pin: GPIO_PIN_x(x=0..15), GPIO_PIN_ALL - \param[out] none - \retval none -*/ -void gpio_bit_set(uint32_t gpio_periph,uint32_t pin) -{ - GPIO_BOP(gpio_periph) = (uint32_t)pin; -} - -/*! - \brief reset GPIO pin - \param[in] gpio_periph: GPIOx(x = A,B,C,D,F) - \param[in] pin: GPIO_PIN_x(x=0..15), GPIO_PIN_ALL - \param[out] none - \retval none -*/ -void gpio_bit_reset(uint32_t gpio_periph,uint32_t pin) -{ - GPIO_BC(gpio_periph) = (uint32_t)pin; -} - -/*! - \brief write data to the specified GPIO pin - \param[in] gpio_periph: GPIOx(x = A,B,C,D,F) - \param[in] pin: GPIO_PIN_x(x=0..15), GPIO_PIN_ALL - \param[in] bit_value: SET or RESET - \arg RESET: clear the port pin - \arg SET: set the port pin - \param[out] none - \retval none -*/ -void gpio_bit_write(uint32_t gpio_periph,uint32_t pin,bit_status bit_value) -{ - if(RESET != bit_value){ - GPIO_BOP(gpio_periph) = (uint32_t)pin; - }else{ - GPIO_BC(gpio_periph) = (uint32_t)pin; - } -} - -/*! - \brief write data to the specified GPIO port - \param[in] gpio_periph: GPIOx(x = A,B,C,D,F) - \param[in] data: specify the value to be written to the port output control register - \param[out] none - \retval none -*/ -void gpio_port_write(uint32_t gpio_periph,uint16_t data) -{ - GPIO_OCTL(gpio_periph) = (uint32_t)data; -} - -/*! - \brief get GPIO pin input status - \param[in] gpio_periph: GPIOx(x = A,B,C,D,F) - \param[in] pin: GPIO_PIN_x(x=0..15), GPIO_PIN_ALL - \param[out] none - \retval input state of gpio pin: SET or RESET -*/ -FlagStatus gpio_input_bit_get(uint32_t gpio_periph,uint32_t pin) -{ - if((uint32_t)RESET != (GPIO_ISTAT(gpio_periph)&(pin))){ - return SET; - }else{ - return RESET; - } -} - -/*! - \brief get GPIO all pins input status - \param[in] gpio_periph: GPIOx(x = A,B,C,D,F) - \param[out] none - \retval input state of gpio all pins -*/ -uint16_t gpio_input_port_get(uint32_t gpio_periph) -{ - return (uint16_t)(GPIO_ISTAT(gpio_periph)); -} - -/*! - \brief get GPIO pin output status - \param[in] gpio_periph: GPIOx(x = A,B,C,D,F) - \param[in] pin: GPIO_PIN_x(x=0..15), GPIO_PIN_ALL - \param[out] none - \retval output state of gpio pin: SET or RESET -*/ -FlagStatus gpio_output_bit_get(uint32_t gpio_periph,uint32_t pin) -{ - if((uint32_t)RESET !=(GPIO_OCTL(gpio_periph)&(pin))){ - return SET; - }else{ - return RESET; - } -} - -/*! - \brief get GPIO all pins output status - \param[in] gpio_periph: GPIOx(x = A,B,C,D,F) - \param[out] none - \retval output state of gpio all pins -*/ -uint16_t gpio_output_port_get(uint32_t gpio_periph) -{ - return ((uint16_t)GPIO_OCTL(gpio_periph)); -} - -/*! - \brief set GPIO alternate function - \param[in] gpio_periph: GPIOx(x = A,B,C,D,F) - \param[in] alt_func_num: gpio pin af function, please refer to specific device datasheet - \arg GPIO_AF_0: TIMER2, TIMER13, TIMER14, TIMER16, SPI0, I2S0, SPI1, SPI2, I2S2, CK_OUT, - SWDIO, SWCLK, USART0, CEC, IFRP, I2C0, I2C1, TSI, EVENTOUT - \arg GPIO_AF_1: USART0, USART1, IFRP, CEC, TIMER2, TIMER14, I2C0, I2C1, I2C2, EVENTOUT - \arg GPIO_AF_2: TIMER0, TIMER1, TIMER15, TIMER16, EVENTOUT - \arg GPIO_AF_3: TSI, I2C0, TIMER14, EVENTOUT - \arg GPIO_AF_4(port A,B only): TIMER13, I2C0, I2C1, I2C2, USART1 - \arg GPIO_AF_5(port A,B only): TIMER15, TIMER16, SPI2, I2S2, I2C0, I2C1 - \arg GPIO_AF_6(port A,B only): SPI1, EVENTOUT - \arg GPIO_AF_7(port A,B only): CMP0, CMP1 - \arg GPIO_AF_9(port A,B only): CAN0, CAN1 (for GD32F170xx and GD32F190xx devices) - \arg GPIO_AF_11: SLCD (for GD32F170xx and GD32F190xx devices) - \param[in] pin: GPIO_PIN_x(x=0..15), GPIO_PIN_ALL - \param[out] none - \retval none -*/ -void gpio_af_set(uint32_t gpio_periph,uint32_t alt_func_num,uint32_t pin) -{ - uint16_t i; - uint32_t afrl, afrh; - - afrl = GPIO_AFSEL0(gpio_periph); - afrh = GPIO_AFSEL1(gpio_periph); - - for (i = 0U; i < 8U; i++){ - if((1U << i) & pin){ - /* clear the specified pin alternate function bits */ - afrl &= ~GPIO_AFR_MASK(i); - afrl |= GPIO_AFR_SET(i,alt_func_num); - } - } - - for (i = 8U; i < 16U; i++){ - if((1U << i) & pin){ - /* clear the specified pin alternate function bits */ - afrh &= ~GPIO_AFR_MASK(i - 8U); - afrh |= GPIO_AFR_SET(i - 8U,alt_func_num); - } - } - - GPIO_AFSEL0(gpio_periph) = afrl; - GPIO_AFSEL1(gpio_periph) = afrh; -} - -/*! - \brief lock GPIO pin - \param[in] gpio_periph: GPIOx(x = A,B) - \param[in] pin: GPIO_PIN_x(x=0..15), GPIO_PIN_ALL - \param[out] none - \retval none -*/ -void gpio_pin_lock(uint32_t gpio_periph,uint32_t pin) -{ - uint32_t lock = 0x00010000U; - lock |= pin; - - /* lock key writing sequence: write 1->write 0->write 1-> read 0-> read 1 */ - GPIO_LOCK(gpio_periph) = (uint32_t)lock; - GPIO_LOCK(gpio_periph) = (uint32_t)pin; - GPIO_LOCK(gpio_periph) = (uint32_t)lock; - lock = GPIO_LOCK(gpio_periph); - lock = GPIO_LOCK(gpio_periph); -} - -#ifdef GD32F170_190 -/*! - \brief toggle GPIO pin - \param[in] gpio_periph: GPIOx(x = A,B,C,D,F) - \param[in] pin: GPIO_PIN_x(x=0..15), GPIO_PIN_ALL - \param[out] none - \retval none -*/ -void gpio_bit_toggle(uint32_t gpio_periph,uint32_t pin) -{ - GPIO_TG(gpio_periph) = (uint32_t)pin; -} - -/*! - \brief toggle GPIO port - \param[in] gpio_periph: GPIOx(x = A,B,C,D,F) - \param[out] none - \retval none -*/ -void gpio_port_toggle(uint32_t gpio_periph) -{ - GPIO_TG(gpio_periph) = 0x0000FFFFU; -} - -#endif /* GD32F170_190 */ +/*! + \file gd32f1x0_gpio.c + \brief GPIO driver +*/ + +/* + Copyright (C) 2017 GigaDevice + + 2014-12-26, V1.0.0, platform for GD32F1x0(x=3,5) + 2016-01-15, V2.0.0, platform for GD32F1x0(x=3,5,7,9) + 2016-04-30, V3.0.0, firmware update for GD32F1x0(x=3,5,7,9) + 2017-06-19, V3.1.0, firmware update for GD32F1x0(x=3,5,7,9) +*/ + +#include "gd32f1x0_gpio.h" + +/*! + \brief reset GPIO port + \param[in] gpio_periph: GPIOx(x = A,B,C,D,F) + \param[out] none + \retval none +*/ +void gpio_deinit(uint32_t gpio_periph) +{ + switch(gpio_periph){ + case GPIOA: + /* reset GPIOA */ + rcu_periph_reset_enable(RCU_GPIOARST); + rcu_periph_reset_disable(RCU_GPIOARST); + break; + case GPIOB: + /* reset GPIOB */ + rcu_periph_reset_enable(RCU_GPIOBRST); + rcu_periph_reset_disable(RCU_GPIOBRST); + break; + case GPIOC: + /* reset GPIOC */ + rcu_periph_reset_enable(RCU_GPIOCRST); + rcu_periph_reset_disable(RCU_GPIOCRST); + break; + case GPIOD: + /* reset GPIOD */ + rcu_periph_reset_enable(RCU_GPIODRST); + rcu_periph_reset_disable(RCU_GPIODRST); + break; + case GPIOF: + /* reset GPIOF */ + rcu_periph_reset_enable(RCU_GPIOFRST); + rcu_periph_reset_disable(RCU_GPIOFRST); + break; + default: + break; + } +} + +/*! + \brief set GPIO output mode + \param[in] gpio_periph: GPIOx(x = A,B,C,D,F) + \param[in] mode: gpio pin mode + \arg GPIO_MODE_INPUT: input mode + \arg GPIO_MODE_OUTPUT: output mode + \arg GPIO_MODE_AF: alternate function mode + \arg GPIO_MODE_ANALOG: analog mode + \param[in] pull_up_down: gpio pin with pull-up or pull-down resistor + \arg GPIO_PUPD_NONE: without weak pull-up and pull-down resistors + \arg GPIO_PUPD_PULLUP: with weak pull-up resistor + \arg GPIO_PUPD_PULLDOWN:with weak pull-down resistor + \param[in] pin: GPIO_PIN_x(x=0..15), GPIO_PIN_ALL + \param[out] none + \retval none +*/ +void gpio_mode_set(uint32_t gpio_periph,uint32_t mode,uint32_t pull_up_down,uint32_t pin) +{ + uint16_t i; + uint32_t ctl, pupd; + + ctl = GPIO_CTL(gpio_periph); + pupd = GPIO_PUD(gpio_periph); + + for (i = 0U; i < 16U; i++){ + if((1U << i) & pin){ + /* clear the specified pin mode bits */ + ctl &= ~GPIO_MODE_MASK(i); + /* set the specified pin mode bits */ + ctl |= GPIO_MODE_SET(i, mode); + + /* clear the specified pin pupd bits */ + pupd &= ~GPIO_PUPD_MASK(i); + /* set the specified pin pupd bits */ + pupd |= GPIO_PUPD_SET(i, pull_up_down); + } + } + + GPIO_CTL(gpio_periph) = ctl; + GPIO_PUD(gpio_periph) = pupd; +} + +/*! + \brief set GPIO output type and speed + \param[in] gpio_periph: GPIOx(x = A,B,C,D,F) + \param[in] otype: gpio pin output mode + \arg GPIO_OTYPE_PP: push pull mode + \arg GPIO_OTYPE_OD: open drain mode + \param[in] speed + \arg GPIO_OSPEED_2MHZ: output max speed 2M + \arg GPIO_OSPEED_10MHZ: output max speed 10M + \arg GPIO_OSPEED_50MHZ: output max speed 50M + \param[in] pin: GPIO_PIN_x(x=0..15), GPIO_PIN_ALL + \param[out] none + \retval none +*/ +void gpio_output_options_set(uint32_t gpio_periph,uint8_t otype,uint32_t speed,uint32_t pin) +{ + uint16_t i; + uint32_t ospeedr; + + if(0x1U == otype){ + GPIO_OMODE(gpio_periph) |= (uint32_t)pin; + }else{ + GPIO_OMODE(gpio_periph) &= (uint32_t)(~pin); + } + + /* get the specified pin output speed bits value */ + ospeedr = GPIO_OSPD(gpio_periph); + + for(i = 0U;i < 16U;i++){ + if((1U << i) & pin){ + /* clear the specified pin output speed bits */ + ospeedr &= ~GPIO_OSPEED_MASK(i); + /* set the specified pin output speed bits */ + ospeedr |= GPIO_OSPEED_SET(i,speed); + } + } + GPIO_OSPD(gpio_periph) = ospeedr; +} + +/*! + \brief set GPIO pin + \param[in] gpio_periph: GPIOx(x = A,B,C,D,F) + \param[in] pin: GPIO_PIN_x(x=0..15), GPIO_PIN_ALL + \param[out] none + \retval none +*/ +void gpio_bit_set(uint32_t gpio_periph,uint32_t pin) +{ + GPIO_BOP(gpio_periph) = (uint32_t)pin; +} + +/*! + \brief reset GPIO pin + \param[in] gpio_periph: GPIOx(x = A,B,C,D,F) + \param[in] pin: GPIO_PIN_x(x=0..15), GPIO_PIN_ALL + \param[out] none + \retval none +*/ +void gpio_bit_reset(uint32_t gpio_periph,uint32_t pin) +{ + GPIO_BC(gpio_periph) = (uint32_t)pin; +} + +/*! + \brief write data to the specified GPIO pin + \param[in] gpio_periph: GPIOx(x = A,B,C,D,F) + \param[in] pin: GPIO_PIN_x(x=0..15), GPIO_PIN_ALL + \param[in] bit_value: SET or RESET + \arg RESET: clear the port pin + \arg SET: set the port pin + \param[out] none + \retval none +*/ +void gpio_bit_write(uint32_t gpio_periph,uint32_t pin,bit_status bit_value) +{ + if(RESET != bit_value){ + GPIO_BOP(gpio_periph) = (uint32_t)pin; + }else{ + GPIO_BC(gpio_periph) = (uint32_t)pin; + } +} + +/*! + \brief write data to the specified GPIO port + \param[in] gpio_periph: GPIOx(x = A,B,C,D,F) + \param[in] data: specify the value to be written to the port output control register + \param[out] none + \retval none +*/ +void gpio_port_write(uint32_t gpio_periph,uint16_t data) +{ + GPIO_OCTL(gpio_periph) = (uint32_t)data; +} + +/*! + \brief get GPIO pin input status + \param[in] gpio_periph: GPIOx(x = A,B,C,D,F) + \param[in] pin: GPIO_PIN_x(x=0..15), GPIO_PIN_ALL + \param[out] none + \retval input state of gpio pin: SET or RESET +*/ +FlagStatus gpio_input_bit_get(uint32_t gpio_periph,uint32_t pin) +{ + if((uint32_t)RESET != (GPIO_ISTAT(gpio_periph)&(pin))){ + return SET; + }else{ + return RESET; + } +} + +/*! + \brief get GPIO all pins input status + \param[in] gpio_periph: GPIOx(x = A,B,C,D,F) + \param[out] none + \retval input state of gpio all pins +*/ +uint16_t gpio_input_port_get(uint32_t gpio_periph) +{ + return (uint16_t)(GPIO_ISTAT(gpio_periph)); +} + +/*! + \brief get GPIO pin output status + \param[in] gpio_periph: GPIOx(x = A,B,C,D,F) + \param[in] pin: GPIO_PIN_x(x=0..15), GPIO_PIN_ALL + \param[out] none + \retval output state of gpio pin: SET or RESET +*/ +FlagStatus gpio_output_bit_get(uint32_t gpio_periph,uint32_t pin) +{ + if((uint32_t)RESET !=(GPIO_OCTL(gpio_periph)&(pin))){ + return SET; + }else{ + return RESET; + } +} + +/*! + \brief get GPIO all pins output status + \param[in] gpio_periph: GPIOx(x = A,B,C,D,F) + \param[out] none + \retval output state of gpio all pins +*/ +uint16_t gpio_output_port_get(uint32_t gpio_periph) +{ + return ((uint16_t)GPIO_OCTL(gpio_periph)); +} + +/*! + \brief set GPIO alternate function + \param[in] gpio_periph: GPIOx(x = A,B,C,D,F) + \param[in] alt_func_num: gpio pin af function, please refer to specific device datasheet + \arg GPIO_AF_0: TIMER2, TIMER13, TIMER14, TIMER16, SPI0, I2S0, SPI1, SPI2, I2S2, CK_OUT, + SWDIO, SWCLK, USART0, CEC, IFRP, I2C0, I2C1, TSI, EVENTOUT + \arg GPIO_AF_1: USART0, USART1, IFRP, CEC, TIMER2, TIMER14, I2C0, I2C1, I2C2, EVENTOUT + \arg GPIO_AF_2: TIMER0, TIMER1, TIMER15, TIMER16, EVENTOUT + \arg GPIO_AF_3: TSI, I2C0, TIMER14, EVENTOUT + \arg GPIO_AF_4(port A,B only): TIMER13, I2C0, I2C1, I2C2, USART1 + \arg GPIO_AF_5(port A,B only): TIMER15, TIMER16, SPI2, I2S2, I2C0, I2C1 + \arg GPIO_AF_6(port A,B only): SPI1, EVENTOUT + \arg GPIO_AF_7(port A,B only): CMP0, CMP1 + \arg GPIO_AF_9(port A,B only): CAN0, CAN1 (for GD32F170xx and GD32F190xx devices) + \arg GPIO_AF_11: SLCD (for GD32F170xx and GD32F190xx devices) + \param[in] pin: GPIO_PIN_x(x=0..15), GPIO_PIN_ALL + \param[out] none + \retval none +*/ +void gpio_af_set(uint32_t gpio_periph,uint32_t alt_func_num,uint32_t pin) +{ + uint16_t i; + uint32_t afrl, afrh; + + afrl = GPIO_AFSEL0(gpio_periph); + afrh = GPIO_AFSEL1(gpio_periph); + + for (i = 0U; i < 8U; i++){ + if((1U << i) & pin){ + /* clear the specified pin alternate function bits */ + afrl &= ~GPIO_AFR_MASK(i); + afrl |= GPIO_AFR_SET(i,alt_func_num); + } + } + + for (i = 8U; i < 16U; i++){ + if((1U << i) & pin){ + /* clear the specified pin alternate function bits */ + afrh &= ~GPIO_AFR_MASK(i - 8U); + afrh |= GPIO_AFR_SET(i - 8U,alt_func_num); + } + } + + GPIO_AFSEL0(gpio_periph) = afrl; + GPIO_AFSEL1(gpio_periph) = afrh; +} + +/*! + \brief lock GPIO pin + \param[in] gpio_periph: GPIOx(x = A,B) + \param[in] pin: GPIO_PIN_x(x=0..15), GPIO_PIN_ALL + \param[out] none + \retval none +*/ +void gpio_pin_lock(uint32_t gpio_periph,uint32_t pin) +{ + uint32_t lock = 0x00010000U; + lock |= pin; + + /* lock key writing sequence: write 1->write 0->write 1-> read 0-> read 1 */ + GPIO_LOCK(gpio_periph) = (uint32_t)lock; + GPIO_LOCK(gpio_periph) = (uint32_t)pin; + GPIO_LOCK(gpio_periph) = (uint32_t)lock; + lock = GPIO_LOCK(gpio_periph); + lock = GPIO_LOCK(gpio_periph); +} + +#ifdef GD32F170_190 +/*! + \brief toggle GPIO pin + \param[in] gpio_periph: GPIOx(x = A,B,C,D,F) + \param[in] pin: GPIO_PIN_x(x=0..15), GPIO_PIN_ALL + \param[out] none + \retval none +*/ +void gpio_bit_toggle(uint32_t gpio_periph,uint32_t pin) +{ + GPIO_TG(gpio_periph) = (uint32_t)pin; +} + +/*! + \brief toggle GPIO port + \param[in] gpio_periph: GPIOx(x = A,B,C,D,F) + \param[out] none + \retval none +*/ +void gpio_port_toggle(uint32_t gpio_periph) +{ + GPIO_TG(gpio_periph) = 0x0000FFFFU; +} + +#endif /* GD32F170_190 */ diff --git a/HoverBoardGigaDevice/RTE/Device/GD32F130C8/gd32f1x0_i2c.c b/HUGS/RTE/Device/GD32F130C8/gd32f1x0_i2c.c similarity index 96% rename from HoverBoardGigaDevice/RTE/Device/GD32F130C8/gd32f1x0_i2c.c rename to HUGS/RTE/Device/GD32F130C8/gd32f1x0_i2c.c index 54e33eba..8b6c9942 100644 --- a/HoverBoardGigaDevice/RTE/Device/GD32F130C8/gd32f1x0_i2c.c +++ b/HUGS/RTE/Device/GD32F130C8/gd32f1x0_i2c.c @@ -1,795 +1,795 @@ -/*! - \file gd32f1x0_i2c.c - \brief I2C driver -*/ - -/* - Copyright (C) 2017 GigaDevice - - 2014-12-26, V1.0.0, platform GD32F1x0(x=3,5) - 2016-01-15, V2.0.0, platform GD32F1x0(x=3,5,7,9) - 2016-04-30, V3.0.0, firmware update for GD32F1x0(x=3,5,7,9) - 2017-06-19, V3.1.0, firmware update for GD32F1x0(x=3,5,7,9) -*/ - -#include "gd32f1x0_i2c.h" - -#define I2CCLK_MAX 0x3fU /*!< i2cclk max value */ -#define I2C_FLAG_MASK 0x0000FFFFU /*!< i2c flag mask */ - -/*! - \brief reset I2C - \param[in] i2c_periph: I2Cx(x=0,1,2) - \param[out] none - \retval none -*/ -void i2c_deinit(uint32_t i2c_periph) -{ - switch(i2c_periph){ - case I2C0: - /* reset I2C0 */ - rcu_periph_reset_enable(RCU_I2C0RST); - rcu_periph_reset_disable(RCU_I2C0RST); - break; - case I2C1: - /* reset I2C1 */ - rcu_periph_reset_enable(RCU_I2C1RST); - rcu_periph_reset_disable(RCU_I2C1RST); - break; -#ifdef GD32F170_190 - case I2C2: - /* reset I2C2 */ - rcu_periph_reset_enable(RCU_I2C2RST); - rcu_periph_reset_disable(RCU_I2C2RST); - break; -#endif /* GD32F170_190 */ - default: - break; - } -} - -/*! - \brief configure I2C clock - \param[in] i2c_periph: I2Cx(x=0,1,2) - \param[in] clkspeed: I2C clock speed, supports standard mode (up to 100 kHz), fast mode (up to 400 kHz) - and fast mode plus (up to 1MHz) - \param[in] dutycyc: duty cycle in fast mode or fast mode plus - \arg I2C_DTCY_2: T_low/T_high=2 - \arg I2C_DTCY_16_9: T_low/T_high=16/9 - \param[out] none - \retval none -*/ -void i2c_clock_config(uint32_t i2c_periph, uint32_t clkspeed, uint32_t dutycyc) -{ - uint32_t pclk1,clkc,freq,risetime; - uint32_t temp; - - pclk1 = rcu_clock_freq_get(CK_APB1); - /* I2C peripheral clock frequency */ - freq = (uint32_t)(pclk1/1000000U); - if(freq >= I2CCLK_MAX){ - freq = I2CCLK_MAX; - } - temp = I2C_CTL1(i2c_periph); - temp &= ~I2C_CTL1_I2CCLK; - temp |= freq; - - I2C_CTL1(i2c_periph) = temp; - - if(100000U >= clkspeed){ - /* the maximum SCL rise time is 1000ns in standard mode */ - risetime = (uint32_t)((pclk1/1000000U)+1U); - if(risetime >= I2CCLK_MAX){ - I2C_RT(i2c_periph) = I2CCLK_MAX; - }else{ - I2C_RT(i2c_periph) = risetime; - } - clkc = (uint32_t)(pclk1/(clkspeed*2U)); - if(clkc < 0x04U){ - /* the CLKC in standard mode minmum value is 4 */ - clkc = 0x04U; - } - I2C_CKCFG(i2c_periph) |= (I2C_CKCFG_CLKC & clkc); - - }else if(400000U >= clkspeed){ - /* the maximum SCL rise time is 300ns in fast mode */ - I2C_RT(i2c_periph) = (uint32_t)(((freq*(uint32_t)300U)/(uint32_t)1000U)+(uint32_t)1U); - if(I2C_DTCY_2 == dutycyc){ - /* I2C duty cycle is 2 */ - clkc = (uint32_t)(pclk1/(clkspeed*3U)); - I2C_CKCFG(i2c_periph) &= ~I2C_CKCFG_DTCY; - }else{ - /* I2C duty cycle is 16/9 */ - clkc = (uint32_t)(pclk1/(clkspeed*25U)); - I2C_CKCFG(i2c_periph) |= I2C_CKCFG_DTCY; - } - if(0U == (clkc & I2C_CKCFG_CLKC)){ - /* the CLKC in fast mode minmum value is 1 */ - clkc |= 0x0001U; - } - I2C_CKCFG(i2c_periph) |= I2C_CKCFG_FAST; - I2C_CKCFG(i2c_periph) |= clkc; - }else{ - /* illegal parameters */ - } -} - -/*! - \brief configure I2C address - \param[in] i2c_periph: I2Cx(x=0,1,2) - \param[in] mode: - \arg I2C_I2CMODE_ENABLE: I2C mode - \arg I2C_SMBUSMODE_ENABLE: SMBus mode - \param[in] addformat: 7bits or 10bits - \arg I2C_ADDFORMAT_7BITS: 7bits - \arg I2C_ADDFORMAT_10BITS: 10bits - \param[in] addr: I2C address - \param[out] none - \retval none -*/ -void i2c_mode_addr_config(uint32_t i2c_periph, uint32_t mode, uint32_t addformat, uint32_t addr) -{ - /* SMBus/I2C mode selected */ - uint32_t ctl = 0U; - ctl = I2C_CTL0(i2c_periph); - ctl &= ~(I2C_CTL0_SMBEN); - ctl |= mode; - I2C_CTL0(i2c_periph) = ctl; - /* configure address */ - I2C_SADDR0(i2c_periph) = (addformat | addr); -} - -/*! - \brief SMBus type selection - \param[in] i2c_periph: I2Cx(x=0,1,2) - \param[in] ack: - \arg I2C_SMBUS_DEVICE: device - \arg I2C_SMBUS_HOST: host - \param[out] none - \retval none -*/ -void i2c_smbus_type_config(uint32_t i2c_periph, uint32_t type) -{ - if(I2C_SMBUS_HOST == type){ - I2C_CTL0(i2c_periph) |= I2C_CTL0_SMBSEL; - }else{ - I2C_CTL0(i2c_periph) &= ~(I2C_CTL0_SMBSEL); - } -} - -/*! - \brief whether or not to send an ACK - \param[in] i2c_periph: I2Cx(x=0,1,2) - \param[in] ack: - \arg I2C_ACK_ENABLE: ACK will be sent - \arg I2C_ACK_DISABLE: ACK will not be sent - \param[out] none - \retval none -*/ -void i2c_ack_config(uint32_t i2c_periph, uint32_t ack) -{ - if(I2C_ACK_ENABLE == ack){ - I2C_CTL0(i2c_periph) |= I2C_CTL0_ACKEN; - }else{ - I2C_CTL0(i2c_periph) &= ~(I2C_CTL0_ACKEN); - } -} - -/*! - \brief I2C POAP position configure - \param[in] i2c_periph: I2Cx(x=0,1,2) - \param[in] pos: - \arg I2C_ACKPOS_CURRENT: whether to send ACK or not for the current - \arg I2C_ACKPOS_NEXT: whether to send ACK or not for the next byte - \param[out] none - \retval none -*/ -void i2c_ackpos_config(uint32_t i2c_periph, uint32_t pos) -{ - /* configure I2C POAP position */ - if(I2C_ACKPOS_NEXT == pos){ - I2C_CTL0(i2c_periph) |= I2C_CTL0_POAP; - }else{ - I2C_CTL0(i2c_periph) &= ~(I2C_CTL0_POAP); - } -} - -/*! - \brief master send slave address - \param[in] i2c_periph: I2Cx(x=0,1,2) - \param[in] addr: slave address - \param[in] trandirection: transmitter or receiver - \arg I2C_TRANSMITTER: transmitter - \arg I2C_RECEIVER: receiver - \param[out] none - \retval none -*/ -void i2c_master_addressing(uint32_t i2c_periph, uint32_t addr, uint32_t trandirection) -{ - if(I2C_TRANSMITTER == trandirection){ - addr = addr & I2C_TRANSMITTER; - }else{ - addr = addr | I2C_RECEIVER; - } - I2C_DATA(i2c_periph) = addr; -} - -/*! - \brief dual-address mode switch - \param[in] i2c_periph: I2Cx(x=0,1,2) - \param[in] dualaddr: - \arg I2C_DUADEN_DISABLE: disable dual-address mode - \arg I2C_DUADEN_ENABLE: enable dual-address mode - \param[out] none - \retval none -*/ -void i2c_dualaddr_enable(uint32_t i2c_periph, uint32_t dualaddr) -{ - if(I2C_DUADEN_ENABLE == dualaddr){ - I2C_SADDR1(i2c_periph) |= I2C_SADDR1_DUADEN; - }else{ - I2C_SADDR1(i2c_periph) &= ~(I2C_SADDR1_DUADEN); - } -} - -/*! - \brief enable I2C - \param[in] i2c_periph: I2Cx(x=0,1,2) - \param[out] none - \retval none -*/ -void i2c_enable(uint32_t i2c_periph) -{ - I2C_CTL0(i2c_periph) |= I2C_CTL0_I2CEN; -} - -/*! - \brief disable I2C - \param[in] i2c_periph: I2Cx(x=0,1,2) - \param[out] none - \retval none -*/ -void i2c_disable(uint32_t i2c_periph) -{ - I2C_CTL0(i2c_periph) &= ~(I2C_CTL0_I2CEN); -} - -/*! - \brief generate a START condition on I2C bus - \param[in] i2c_periph: I2Cx(x=0,1,2) - \param[out] none - \retval none -*/ -void i2c_start_on_bus(uint32_t i2c_periph) -{ - I2C_CTL0(i2c_periph) |= I2C_CTL0_START; -} - -/*! - \brief generate a STOP condition on I2C bus - \param[in] i2c_periph: I2Cx(x=0,1,2) - \param[out] none - \retval none -*/ -void i2c_stop_on_bus(uint32_t i2c_periph) -{ - I2C_CTL0(i2c_periph) |= I2C_CTL0_STOP; -} - -/*! - \brief I2C transmit data function - \param[in] i2c_periph: I2Cx(x=0,1,2) - \param[in] data: data of transmission - \param[out] none - \retval none -*/ -void i2c_data_transmit(uint32_t i2c_periph, uint8_t data) -{ - I2C_DATA(i2c_periph) = DATA_TRANS(data); -} - -/*! - \brief I2C receive data function - \param[in] i2c_periph: I2Cx(x=0,1,2) - \param[out] none - \retval data of received -*/ -uint8_t i2c_data_receive(uint32_t i2c_periph) -{ - return (uint8_t)DATA_RECV(I2C_DATA(i2c_periph)); -} - -/*! - \brief enable I2C DMA mode - \param[in] i2c_periph: I2Cx(x=0,1,2) - \param[in] dmastate: - \arg I2C_DMA_ON: DMA mode enable - \arg I2C_DMA_OFF: DMA mode disable - \param[out] none - \retval none -*/ -void i2c_dma_enable(uint32_t i2c_periph, uint32_t dmastate) -{ - /* configure I2C DMA function */ - uint32_t ctl = 0U; - ctl = I2C_CTL1(i2c_periph); - ctl &= ~(I2C_CTL1_DMAON); - ctl |= dmastate; - I2C_CTL1(i2c_periph) = ctl; -} - -/*! - \brief flag indicating DMA last transfer - \param[in] i2c_periph: I2Cx(x=0,1,2) - \param[in] dmalast: - \arg I2C_DMALST_ON: next DMA EOT is the last transfer - \arg I2C_DMALST_OFF: next DMA EOT is not the last transfer - \param[out] none - \retval none -*/ -void i2c_dma_last_transfer_enable(uint32_t i2c_periph, uint32_t dmalast) -{ - /* configure DMA last transfer */ - uint32_t ctl = 0U; - ctl = I2C_CTL1(i2c_periph); - ctl &= ~(I2C_CTL1_DMALST); - ctl |= dmalast; - I2C_CTL1(i2c_periph) = ctl; -} - -/*! - \brief whether to stretch SCL low when data is not ready in slave mode - \param[in] i2c_periph: I2Cx(x=0,1,2) - \param[in] stretchpara: - \arg I2C_SCLSTRETCH_ENABLE: SCL stretching is enabled - \arg I2C_SCLSTRETCH_DISABLE: SCL stretching is disabled - \param[out] none - \retval none -*/ -void i2c_stretch_scl_low_config(uint32_t i2c_periph, uint32_t stretchpara) -{ - /* configure I2C SCL strerching enable or disable */ - uint32_t ctl = 0U; - ctl = I2C_CTL0(i2c_periph); - ctl &= ~(I2C_CTL0_DISSTRC); - ctl |= stretchpara; - I2C_CTL0(i2c_periph) = ctl; -} - -/*! - \brief whether or not to response to a general call - \param[in] i2c_periph: I2Cx(x=0,1,2) - \param[in] gcallpara: - \arg I2C_GCEN_ENABLE: slave will response to a general call - \arg I2C_GCEN_DISABLE: slave will not response to a general call - \param[out] none - \retval none -*/ -void i2c_slave_response_to_gcall_config(uint32_t i2c_periph, uint32_t gcallpara) -{ - /* configure slave response to a general call enable or disable */ - uint32_t ctl = 0U; - ctl = I2C_CTL0(i2c_periph); - ctl &= ~(I2C_CTL0_GCEN); - ctl |= gcallpara; - I2C_CTL0(i2c_periph) = ctl; -} - -/*! - \brief software reset I2C - \param[in] i2c_periph: I2Cx(x=0,1,2) - \param[in] sreset: - \arg I2C_SRESET_SET: I2C is under reset - \arg I2C_SRESET_RESET: I2C is not under reset - \param[out] none - \retval none -*/ -void i2c_software_reset_config(uint32_t i2c_periph, uint32_t sreset) -{ - /* modify CTL0 and configure software reset I2C state */ - uint32_t ctl = 0U; - ctl = I2C_CTL0(i2c_periph); - ctl &= ~(I2C_CTL0_SRESET); - ctl |= sreset; - I2C_CTL0(i2c_periph) = ctl; -} - -/*! - \brief check I2C flag is set or not - \param[in] i2c_periph: I2Cx(x=0,1,2) - \param[in] flag: - \arg I2C_FLAG_SBSEND: start condition send out - \arg I2C_FLAG_ADDSEND: address is sent in master mode or received and matches in slave mode - \arg I2C_FLAG_BTC: byte transmission finishes - \arg I2C_FLAG_ADD10SEND: header of 10-bit address is sent in master mode - \arg I2C_FLAG_STPDET: stop condition detected in slave mode - \arg I2C_FLAG_RBNE: I2C_DATA is not Empty during receiving - \arg I2C_FLAG_TBE: I2C_DATA is empty during transmitting - \arg I2C_FLAG_BERR: a bus error occurs indication a unexpected start or stop condition on I2C bus - \arg I2C_FLAG_LOSTARB: arbitration lost in master mode - \arg I2C_FLAG_AERR: acknowledge error - \arg I2C_FLAG_OUERR: overrun or underrun situation occurs in slave mode - \arg I2C_FLAG_PECERR: PEC error when receiving data - \arg I2C_FLAG_SMBTO: timeout signal in SMBus mode - \arg I2C_FLAG_SMBALT: SMBus alert status - \arg I2C_FLAG_MASTER: a flag indicating whether I2C block is in master or slave mode - \arg I2C_FLAG_I2CBSY: busy flag - \arg I2C_FLAG_TRS: whether the I2C is a transmitter or a receiver - \arg I2C_FLAG_RXGC: general call address (00h) received - \arg I2C_FLAG_DEFSMB: default address of SMBus device - \arg I2C_FLAG_HSTSMB: SMBus host header detected in slave mode - \arg I2C_FLAG_DUMODF: dual flag in slave mode indicating which address is matched in dual-address mode - \param[out] none - \retval FlagStatus: SET or RESET -*/ -FlagStatus i2c_flag_get(uint32_t i2c_periph, uint32_t flag) -{ - uint32_t reg = 0U; - FlagStatus reval = RESET; - /* get the flag in which register */ - reg = (BIT(31) & flag); - if((BIT(31) == reg)){ - if((I2C_STAT1(i2c_periph)&(flag & I2C_FLAG_MASK))){ - reval = SET; - }else{ - reval = RESET; - } - }else{ - if((I2C_STAT0(i2c_periph)&(flag & I2C_FLAG_MASK))){ - reval = SET; - }else{ - reval = RESET; - } - } - /* return the flag status */ - return reval; -} - -/*! - \brief clear I2C flag - \param[in] i2c_periph: I2Cx(x=0,1,2) - \param[in] flag: flag type - \arg I2C_FLAG_SMBALT: SMBus Alert status - \arg I2C_FLAG_SMBTO: timeout signal in SMBus mode - \arg I2C_FLAG_PECERR: PEC error when receiving data - \arg I2C_FLAG_OUERR: over-run or under-run situation occurs in slave mode - \arg I2C_FLAG_AERR: acknowledge error - \arg I2C_FLAG_LOSTARB: arbitration lost in master mode - \arg I2C_FLAG_BERR: a bus error - \arg I2C_FLAG_ADDSEND: cleared by reading I2C_STAT0 and reading I2C_STAT1 - \param[out] none - \retval none -*/ -void i2c_flag_clear(uint32_t i2c_periph, uint32_t flag) -{ - if(I2C_FLAG_ADDSEND == flag){ - /* read I2C_STAT0 and then read I2C_STAT1 to clear ADDSEND */ - I2C_STAT0(i2c_periph); - I2C_STAT1(i2c_periph); - }else{ - I2C_STAT0(i2c_periph) &= ~(flag); - } -} - -/*! - \brief enable I2C interrupt - \param[in] i2c_periph: I2Cx(x=0,1,2) - \param[in] inttype: interrupt type - \arg I2C_INT_ERR: error interrupt enable - \arg I2C_INT_EV: event interrupt enable - \arg I2C_INT_BUF: buffer interrupt enable - \param[out] none - \retval none -*/ -void i2c_interrupt_enable(uint32_t i2c_periph, uint32_t inttype) -{ - I2C_CTL1(i2c_periph) |= (inttype); -} - -/*! - \brief disable I2C interrupt - \param[in] i2c_periph: I2Cx(x=0,1,2) - \param[in] inttype: interrupt type - \arg I2C_INT_ERR: error interrupt enable - \arg I2C_INT_EV: event interrupt enable - \arg I2C_INT_BUF: buffer interrupt enable - \param[out] none - \retval none -*/ -void i2c_interrupt_disable(uint32_t i2c_periph, uint32_t inttype) -{ - I2C_CTL1(i2c_periph) &= ~(inttype); -} - -/*! - \brief check I2C interrupt flag - \param[in] i2c_periph: I2Cx(x=0,1,2) - \param[in] int_flag: interrupt flag - \arg I2C_INT_FLAG_SBSEND: start condition sent out in master mode interrupt flag - \arg I2C_INT_FLAG_ADDSEND: address is sent in master mode or received and matches in slave mode interrupt flag - \arg I2C_INT_FLAG_BTC: byte transmission finishes - \arg I2C_INT_FLAG_ADD10SEND: header of 10-bit address is sent in master mode interrupt flag - \arg I2C_INT_FLAG_STPDET: etop condition detected in slave mode interrupt flag - \arg I2C_INT_FLAG_RBNE: I2C_DATA is not Empty during receiving interrupt flag - \arg I2C_INT_FLAG_TBE: I2C_DATA is empty during transmitting interrupt flag - \arg I2C_INT_FLAG_BERR: a bus error occurs indication a unexpected start or stop condition on I2C bus interrupt flag - \arg I2C_INT_FLAG_LOSTARB: arbitration lost in master mode interrupt flag - \arg I2C_INT_FLAG_AERR: acknowledge error interrupt flag - \arg I2C_INT_FLAG_OUERR: over-run or under-run situation occurs in slave mode interrupt flag - \arg I2C_INT_FLAG_PECERR: PEC error when receiving data interrupt flag - \arg I2C_INT_FLAG_SMBTO: timeout signal in SMBus mode interrupt flag - \arg I2C_INT_FLAG_SMBALT: SMBus Alert status interrupt flag - \param[out] none - \retval none -*/ -FlagStatus i2c_interrupt_flag_get(uint32_t i2c_periph, uint32_t intflag) -{ - uint32_t evie, errie, bufie; - - evie = I2C_CTL1(i2c_periph)&I2C_CTL1_EVIE; - errie = I2C_CTL1(i2c_periph)&I2C_CTL1_ERRIE; - /* check I2C event interrupt enable bit */ - if((intflag&0x00ffU) && evie){ - if(intflag&0x001fU){ - /* check I2C event flags except TBE and RBNE */ - if(intflag & I2C_STAT0(i2c_periph)){ - return SET; - }else{ - return RESET; - } - }else{ - /* check I2C event flags TBE and RBNE */ - bufie = I2C_CTL1(i2c_periph)&I2C_CTL1_BUFIE; - if(bufie){ - if(intflag & I2C_STAT0(i2c_periph)){ - return SET; - }else{ - return RESET; - } - }else{ - return RESET; - } - } - /* check I2C error interrupt enable bit */ - }else if((intflag&0xff00U) && errie){ - /* check I2C error flags */ - if(intflag & I2C_STAT0(i2c_periph)){ - return SET; - }else{ - return RESET; - } - }else{ - return RESET; - } -} - -/*! - \brief clear I2C interrupt flag - \param[in] i2c_periph: I2Cx(x=0,1,2) - \param[in] intflag: interrupt flag - \arg I2C_INT_FLAG_ADDSEND: address is sent in master mode or received and matches in slave mode interrupt flag - \arg I2C_INT_FLAG_BERR: a bus error occurs indication a unexpected start or stop condition on I2C bus interrupt flag - \arg I2C_INT_FLAG_LOSTARB: arbitration lost in master mode interrupt flag - \arg I2C_INT_FLAG_AERR: acknowledge error interrupt flag - \arg I2C_INT_FLAG_OUERR: over-run or under-run situation occurs in slave mode interrupt flag - \arg I2C_INT_FLAG_PECERR: PEC error when receiving data interrupt flag - \arg I2C_INT_FLAG_SMBTO: timeout signal in SMBus mode interrupt flag - \arg I2C_INT_FLAG_SMBALT: SMBus Alert status interrupt flag - \param[out] none - \retval none -*/ -void i2c_interrupt_flag_clear(uint32_t i2c_periph, uint32_t intflag) -{ - if(I2C_INT_FLAG_ADDSEND == intflag){ - /* read I2C_STAT0 and then read I2C_STAT1 to clear ADDSEND */ - I2C_STAT0(i2c_periph); - I2C_STAT1(i2c_periph); - }else{ - I2C_STAT0(i2c_periph) &= ~(intflag); - } -} - -/*! - \brief I2C PEC calculation on or off - \param[in] i2c_periph: I2Cx(x=0,1,2) - \param[in] pecpara: - \arg I2C_PEC_ENABLE: PEC calculation on - \arg I2C_PEC_DISABLE: PEC calculation off - \param[out] none - \retval none -*/ -void i2c_pec_enable(uint32_t i2c_periph, uint32_t pecstate) -{ - /* on/off PEC calculation */ - uint32_t ctl = 0U; - ctl = I2C_CTL0(i2c_periph); - ctl &= ~(I2C_CTL0_PECEN); - ctl |= pecstate; - I2C_CTL0(i2c_periph) = ctl; -} - -/*! - \brief I2C whether to transfer PEC value - \param[in] i2c_periph: I2Cx(x=0,1,2) - \param[in] pecpara: - \arg I2C_PECTRANS_ENABLE: transfer PEC - \arg I2C_PECTRANS_DISABLE: not transfer PEC - \param[out] none - \retval none -*/ -void i2c_pec_transfer_enable(uint32_t i2c_periph, uint32_t pecpara) -{ - /* whether to transfer PEC */ - uint32_t ctl = 0U; - ctl = I2C_CTL0(i2c_periph); - ctl &= ~(I2C_CTL0_PECTRANS); - ctl |= pecpara; - I2C_CTL0(i2c_periph) = ctl; -} - -/*! - \brief get packet error checking value - \param[in] i2c_periph: I2Cx(x=0,1,2) - \param[out] none - \retval PEC value -*/ -uint8_t i2c_pec_value_get(uint32_t i2c_periph) -{ - return (uint8_t)((I2C_STAT1(i2c_periph) & I2C_STAT1_ECV)>>8); -} - -/*! - \brief I2C issue alert through SMBA pin - \param[in] i2c_periph: I2Cx(x=0,1,2) - \param[in] smbuspara: - \arg I2C_SALTSEND_ENABLE: issue alert through SMBA pin - \arg I2C_SALTSEND_DISABLE: not issue alert through SMBA pin - \param[out] none - \retval none -*/ -void i2c_smbus_issue_alert(uint32_t i2c_periph, uint32_t smbuspara) -{ - /* issue alert through SMBA pin configure*/ - uint32_t ctl = 0U; - ctl = I2C_CTL0(i2c_periph); - ctl &= ~(I2C_CTL0_SALT); - ctl |= smbuspara; - I2C_CTL0(i2c_periph) = ctl; -} - -/*! - \brief enable or disable I2C ARP protocol in SMBus switch - \param[in] i2c_periph: I2Cx(x=0,1,2) - \param[in] smbuspara: - \arg I2C_ARP_ENABLE: enable ARP - \arg I2C_ARP_DISABLE: disable ARP - \param[out] none - \retval none -*/ -void i2c_smbus_arp_enable(uint32_t i2c_periph, uint32_t arpstate) -{ - /* enable or disable I2C ARP protocol*/ - uint32_t ctl = 0U; - ctl = I2C_CTL0(i2c_periph); - ctl &= ~(I2C_CTL0_ARPEN); - ctl |= arpstate; - I2C_CTL0(i2c_periph) = ctl; -} - -#ifdef GD32F170_190 - -/*! - \brief enable SAM_V interface - \param[in] i2c_periph: I2Cx(x=0,1,2) - \param[out] none - \retval none -*/ -void i2c_sam_enable(uint32_t i2c_periph) -{ - I2C_SAMCS(i2c_periph) |= I2C_SAMCS_SAMEN; -} - -/*! - \brief disable SAM_V interface - \param[in] i2c_periph: I2Cx(x=0,1,2) - \param[out] none - \retval none -*/ -void i2c_sam_disable(uint32_t i2c_periph) -{ - I2C_SAMCS(i2c_periph) &= ~(I2C_SAMCS_SAMEN); -} - -/*! - \brief enable SAM_V interface timeout detect - \param[in] i2c_periph: I2Cx(x=0,1,2) - \param[out] none - \retval none -*/ -void i2c_sam_timeout_enable(uint32_t i2c_periph) -{ - I2C_SAMCS(i2c_periph) |= I2C_SAMCS_STOEN; -} - -/*! - \brief disable SAM_V interface timeout detect - \param[in] i2c_periph: I2Cx(x=0,1,2) - \param[out] none - \retval none -*/ -void i2c_sam_timeout_disable(uint32_t i2c_periph) -{ - I2C_SAMCS(i2c_periph) &= ~(I2C_SAMCS_STOEN); -} - -/*! - \brief enable the specified I2C SAM interrupt - \param[in] i2c_periph: I2Cx(x=0,1,2) - \param[in] inttype: interrupt type - \@arg I2C_SAMCS_TFFIE: txframe fall interrupt - \@arg I2C_SAMCS_TFRIE: txframe rise interrupt - \@arg I2C_SAMCS_RFFIE: rxframe fall interrupt - \@arg I2C_SAMCS_RFRIE: rxframe rise interrupt - \param[out] none - \retval none -*/ -void i2c_sam_interrupt_enable(uint32_t i2c_periph, uint32_t inttype) -{ - I2C_SAMCS(i2c_periph) |= (inttype); -} - -/*! - \brief disable i2c interrupt - \param[in] i2c_periph: I2Cx(x=0,1,2) - \param[in] inttype: interrupt type - \@arg I2C_SAMCS_TFFIE: txframe fall interrupt - \@arg I2C_SAMCS_TFRIE: txframe rise interrupt - \@arg I2C_SAMCS_RFFIE: rxframe fall interrupt - \@arg I2C_SAMCS_RFRIE: rxframe rise interrupt - \param[out] none - \retval none -*/ -void i2c_sam_interrupt_disable(uint32_t i2c_periph, uint32_t inttype) -{ - I2C_SAMCS(i2c_periph) &= ~(inttype); -} - -/*! - \brief check i2c SAM state - \param[in] i2c_periph: I2Cx(x=0,1,2) - \param[in] samstate: state type - \@arg I2C_SAMCS_TXF: level of txframe signal - \@arg I2C_SAMCS_RXF: level of rxframe signal - \@arg I2C_SAMCS_TFF: txframe fall flag - \@arg I2C_SAMCS_TFR: txframe rise flag - \@arg I2C_SAMCS_RFF: rxframe fall flag - \@arg I2C_SAMCS_RFR: rxframe rise flag - \param[out] none - \retval state of i2c SAM -*/ -FlagStatus i2c_sam_flag_get(uint32_t i2c_periph, uint32_t samstate) -{ - if(I2C_SAMCS(i2c_periph) & samstate){ - return SET; - } - - return RESET; -} -/*! - \brief clear i2c SAM state - \param[in] i2c_periph: I2Cx(x=0,1,2) - \param[in] samstate: state type - \@arg I2C_SAMCS_TFF: txframe fall flag - \@arg I2C_SAMCS_TFR: txframe rise flag - \@arg I2C_SAMCS_RFF: rxframe fall flag - \@arg I2C_SAMCS_RFR: rxframe rise flag - \param[out] none - \retval none -*/ -void i2c_sam_flag_clear(uint32_t i2c_periph, uint32_t samstate) -{ - I2C_SAMCS(i2c_periph) &= ~(samstate); - -} - -#endif /* GD32F170_190 */ +/*! + \file gd32f1x0_i2c.c + \brief I2C driver +*/ + +/* + Copyright (C) 2017 GigaDevice + + 2014-12-26, V1.0.0, platform GD32F1x0(x=3,5) + 2016-01-15, V2.0.0, platform GD32F1x0(x=3,5,7,9) + 2016-04-30, V3.0.0, firmware update for GD32F1x0(x=3,5,7,9) + 2017-06-19, V3.1.0, firmware update for GD32F1x0(x=3,5,7,9) +*/ + +#include "gd32f1x0_i2c.h" + +#define I2CCLK_MAX 0x3fU /*!< i2cclk max value */ +#define I2C_FLAG_MASK 0x0000FFFFU /*!< i2c flag mask */ + +/*! + \brief reset I2C + \param[in] i2c_periph: I2Cx(x=0,1,2) + \param[out] none + \retval none +*/ +void i2c_deinit(uint32_t i2c_periph) +{ + switch(i2c_periph){ + case I2C0: + /* reset I2C0 */ + rcu_periph_reset_enable(RCU_I2C0RST); + rcu_periph_reset_disable(RCU_I2C0RST); + break; + case I2C1: + /* reset I2C1 */ + rcu_periph_reset_enable(RCU_I2C1RST); + rcu_periph_reset_disable(RCU_I2C1RST); + break; +#ifdef GD32F170_190 + case I2C2: + /* reset I2C2 */ + rcu_periph_reset_enable(RCU_I2C2RST); + rcu_periph_reset_disable(RCU_I2C2RST); + break; +#endif /* GD32F170_190 */ + default: + break; + } +} + +/*! + \brief configure I2C clock + \param[in] i2c_periph: I2Cx(x=0,1,2) + \param[in] clkspeed: I2C clock speed, supports standard mode (up to 100 kHz), fast mode (up to 400 kHz) + and fast mode plus (up to 1MHz) + \param[in] dutycyc: duty cycle in fast mode or fast mode plus + \arg I2C_DTCY_2: T_low/T_high=2 + \arg I2C_DTCY_16_9: T_low/T_high=16/9 + \param[out] none + \retval none +*/ +void i2c_clock_config(uint32_t i2c_periph, uint32_t clkspeed, uint32_t dutycyc) +{ + uint32_t pclk1,clkc,freq,risetime; + uint32_t temp; + + pclk1 = rcu_clock_freq_get(CK_APB1); + /* I2C peripheral clock frequency */ + freq = (uint32_t)(pclk1/1000000U); + if(freq >= I2CCLK_MAX){ + freq = I2CCLK_MAX; + } + temp = I2C_CTL1(i2c_periph); + temp &= ~I2C_CTL1_I2CCLK; + temp |= freq; + + I2C_CTL1(i2c_periph) = temp; + + if(100000U >= clkspeed){ + /* the maximum SCL rise time is 1000ns in standard mode */ + risetime = (uint32_t)((pclk1/1000000U)+1U); + if(risetime >= I2CCLK_MAX){ + I2C_RT(i2c_periph) = I2CCLK_MAX; + }else{ + I2C_RT(i2c_periph) = risetime; + } + clkc = (uint32_t)(pclk1/(clkspeed*2U)); + if(clkc < 0x04U){ + /* the CLKC in standard mode minmum value is 4 */ + clkc = 0x04U; + } + I2C_CKCFG(i2c_periph) |= (I2C_CKCFG_CLKC & clkc); + + }else if(400000U >= clkspeed){ + /* the maximum SCL rise time is 300ns in fast mode */ + I2C_RT(i2c_periph) = (uint32_t)(((freq*(uint32_t)300U)/(uint32_t)1000U)+(uint32_t)1U); + if(I2C_DTCY_2 == dutycyc){ + /* I2C duty cycle is 2 */ + clkc = (uint32_t)(pclk1/(clkspeed*3U)); + I2C_CKCFG(i2c_periph) &= ~I2C_CKCFG_DTCY; + }else{ + /* I2C duty cycle is 16/9 */ + clkc = (uint32_t)(pclk1/(clkspeed*25U)); + I2C_CKCFG(i2c_periph) |= I2C_CKCFG_DTCY; + } + if(0U == (clkc & I2C_CKCFG_CLKC)){ + /* the CLKC in fast mode minmum value is 1 */ + clkc |= 0x0001U; + } + I2C_CKCFG(i2c_periph) |= I2C_CKCFG_FAST; + I2C_CKCFG(i2c_periph) |= clkc; + }else{ + /* illegal parameters */ + } +} + +/*! + \brief configure I2C address + \param[in] i2c_periph: I2Cx(x=0,1,2) + \param[in] mode: + \arg I2C_I2CMODE_ENABLE: I2C mode + \arg I2C_SMBUSMODE_ENABLE: SMBus mode + \param[in] addformat: 7bits or 10bits + \arg I2C_ADDFORMAT_7BITS: 7bits + \arg I2C_ADDFORMAT_10BITS: 10bits + \param[in] addr: I2C address + \param[out] none + \retval none +*/ +void i2c_mode_addr_config(uint32_t i2c_periph, uint32_t mode, uint32_t addformat, uint32_t addr) +{ + /* SMBus/I2C mode selected */ + uint32_t ctl = 0U; + ctl = I2C_CTL0(i2c_periph); + ctl &= ~(I2C_CTL0_SMBEN); + ctl |= mode; + I2C_CTL0(i2c_periph) = ctl; + /* configure address */ + I2C_SADDR0(i2c_periph) = (addformat | addr); +} + +/*! + \brief SMBus type selection + \param[in] i2c_periph: I2Cx(x=0,1,2) + \param[in] ack: + \arg I2C_SMBUS_DEVICE: device + \arg I2C_SMBUS_HOST: host + \param[out] none + \retval none +*/ +void i2c_smbus_type_config(uint32_t i2c_periph, uint32_t type) +{ + if(I2C_SMBUS_HOST == type){ + I2C_CTL0(i2c_periph) |= I2C_CTL0_SMBSEL; + }else{ + I2C_CTL0(i2c_periph) &= ~(I2C_CTL0_SMBSEL); + } +} + +/*! + \brief whether or not to send an ACK + \param[in] i2c_periph: I2Cx(x=0,1,2) + \param[in] ack: + \arg I2C_ACK_ENABLE: ACK will be sent + \arg I2C_ACK_DISABLE: ACK will not be sent + \param[out] none + \retval none +*/ +void i2c_ack_config(uint32_t i2c_periph, uint32_t ack) +{ + if(I2C_ACK_ENABLE == ack){ + I2C_CTL0(i2c_periph) |= I2C_CTL0_ACKEN; + }else{ + I2C_CTL0(i2c_periph) &= ~(I2C_CTL0_ACKEN); + } +} + +/*! + \brief I2C POAP position configure + \param[in] i2c_periph: I2Cx(x=0,1,2) + \param[in] pos: + \arg I2C_ACKPOS_CURRENT: whether to send ACK or not for the current + \arg I2C_ACKPOS_NEXT: whether to send ACK or not for the next byte + \param[out] none + \retval none +*/ +void i2c_ackpos_config(uint32_t i2c_periph, uint32_t pos) +{ + /* configure I2C POAP position */ + if(I2C_ACKPOS_NEXT == pos){ + I2C_CTL0(i2c_periph) |= I2C_CTL0_POAP; + }else{ + I2C_CTL0(i2c_periph) &= ~(I2C_CTL0_POAP); + } +} + +/*! + \brief master send slave address + \param[in] i2c_periph: I2Cx(x=0,1,2) + \param[in] addr: slave address + \param[in] trandirection: transmitter or receiver + \arg I2C_TRANSMITTER: transmitter + \arg I2C_RECEIVER: receiver + \param[out] none + \retval none +*/ +void i2c_master_addressing(uint32_t i2c_periph, uint32_t addr, uint32_t trandirection) +{ + if(I2C_TRANSMITTER == trandirection){ + addr = addr & I2C_TRANSMITTER; + }else{ + addr = addr | I2C_RECEIVER; + } + I2C_DATA(i2c_periph) = addr; +} + +/*! + \brief dual-address mode switch + \param[in] i2c_periph: I2Cx(x=0,1,2) + \param[in] dualaddr: + \arg I2C_DUADEN_DISABLE: disable dual-address mode + \arg I2C_DUADEN_ENABLE: enable dual-address mode + \param[out] none + \retval none +*/ +void i2c_dualaddr_enable(uint32_t i2c_periph, uint32_t dualaddr) +{ + if(I2C_DUADEN_ENABLE == dualaddr){ + I2C_SADDR1(i2c_periph) |= I2C_SADDR1_DUADEN; + }else{ + I2C_SADDR1(i2c_periph) &= ~(I2C_SADDR1_DUADEN); + } +} + +/*! + \brief enable I2C + \param[in] i2c_periph: I2Cx(x=0,1,2) + \param[out] none + \retval none +*/ +void i2c_enable(uint32_t i2c_periph) +{ + I2C_CTL0(i2c_periph) |= I2C_CTL0_I2CEN; +} + +/*! + \brief disable I2C + \param[in] i2c_periph: I2Cx(x=0,1,2) + \param[out] none + \retval none +*/ +void i2c_disable(uint32_t i2c_periph) +{ + I2C_CTL0(i2c_periph) &= ~(I2C_CTL0_I2CEN); +} + +/*! + \brief generate a START condition on I2C bus + \param[in] i2c_periph: I2Cx(x=0,1,2) + \param[out] none + \retval none +*/ +void i2c_start_on_bus(uint32_t i2c_periph) +{ + I2C_CTL0(i2c_periph) |= I2C_CTL0_START; +} + +/*! + \brief generate a STOP condition on I2C bus + \param[in] i2c_periph: I2Cx(x=0,1,2) + \param[out] none + \retval none +*/ +void i2c_stop_on_bus(uint32_t i2c_periph) +{ + I2C_CTL0(i2c_periph) |= I2C_CTL0_STOP; +} + +/*! + \brief I2C transmit data function + \param[in] i2c_periph: I2Cx(x=0,1,2) + \param[in] data: data of transmission + \param[out] none + \retval none +*/ +void i2c_data_transmit(uint32_t i2c_periph, uint8_t data) +{ + I2C_DATA(i2c_periph) = DATA_TRANS(data); +} + +/*! + \brief I2C receive data function + \param[in] i2c_periph: I2Cx(x=0,1,2) + \param[out] none + \retval data of received +*/ +uint8_t i2c_data_receive(uint32_t i2c_periph) +{ + return (uint8_t)DATA_RECV(I2C_DATA(i2c_periph)); +} + +/*! + \brief enable I2C DMA mode + \param[in] i2c_periph: I2Cx(x=0,1,2) + \param[in] dmastate: + \arg I2C_DMA_ON: DMA mode enable + \arg I2C_DMA_OFF: DMA mode disable + \param[out] none + \retval none +*/ +void i2c_dma_enable(uint32_t i2c_periph, uint32_t dmastate) +{ + /* configure I2C DMA function */ + uint32_t ctl = 0U; + ctl = I2C_CTL1(i2c_periph); + ctl &= ~(I2C_CTL1_DMAON); + ctl |= dmastate; + I2C_CTL1(i2c_periph) = ctl; +} + +/*! + \brief flag indicating DMA last transfer + \param[in] i2c_periph: I2Cx(x=0,1,2) + \param[in] dmalast: + \arg I2C_DMALST_ON: next DMA EOT is the last transfer + \arg I2C_DMALST_OFF: next DMA EOT is not the last transfer + \param[out] none + \retval none +*/ +void i2c_dma_last_transfer_enable(uint32_t i2c_periph, uint32_t dmalast) +{ + /* configure DMA last transfer */ + uint32_t ctl = 0U; + ctl = I2C_CTL1(i2c_periph); + ctl &= ~(I2C_CTL1_DMALST); + ctl |= dmalast; + I2C_CTL1(i2c_periph) = ctl; +} + +/*! + \brief whether to stretch SCL low when data is not ready in slave mode + \param[in] i2c_periph: I2Cx(x=0,1,2) + \param[in] stretchpara: + \arg I2C_SCLSTRETCH_ENABLE: SCL stretching is enabled + \arg I2C_SCLSTRETCH_DISABLE: SCL stretching is disabled + \param[out] none + \retval none +*/ +void i2c_stretch_scl_low_config(uint32_t i2c_periph, uint32_t stretchpara) +{ + /* configure I2C SCL strerching enable or disable */ + uint32_t ctl = 0U; + ctl = I2C_CTL0(i2c_periph); + ctl &= ~(I2C_CTL0_DISSTRC); + ctl |= stretchpara; + I2C_CTL0(i2c_periph) = ctl; +} + +/*! + \brief whether or not to response to a general call + \param[in] i2c_periph: I2Cx(x=0,1,2) + \param[in] gcallpara: + \arg I2C_GCEN_ENABLE: slave will response to a general call + \arg I2C_GCEN_DISABLE: slave will not response to a general call + \param[out] none + \retval none +*/ +void i2c_slave_response_to_gcall_config(uint32_t i2c_periph, uint32_t gcallpara) +{ + /* configure slave response to a general call enable or disable */ + uint32_t ctl = 0U; + ctl = I2C_CTL0(i2c_periph); + ctl &= ~(I2C_CTL0_GCEN); + ctl |= gcallpara; + I2C_CTL0(i2c_periph) = ctl; +} + +/*! + \brief software reset I2C + \param[in] i2c_periph: I2Cx(x=0,1,2) + \param[in] sreset: + \arg I2C_SRESET_SET: I2C is under reset + \arg I2C_SRESET_RESET: I2C is not under reset + \param[out] none + \retval none +*/ +void i2c_software_reset_config(uint32_t i2c_periph, uint32_t sreset) +{ + /* modify CTL0 and configure software reset I2C state */ + uint32_t ctl = 0U; + ctl = I2C_CTL0(i2c_periph); + ctl &= ~(I2C_CTL0_SRESET); + ctl |= sreset; + I2C_CTL0(i2c_periph) = ctl; +} + +/*! + \brief check I2C flag is set or not + \param[in] i2c_periph: I2Cx(x=0,1,2) + \param[in] flag: + \arg I2C_FLAG_SBSEND: start condition send out + \arg I2C_FLAG_ADDSEND: address is sent in master mode or received and matches in slave mode + \arg I2C_FLAG_BTC: byte transmission finishes + \arg I2C_FLAG_ADD10SEND: header of 10-bit address is sent in master mode + \arg I2C_FLAG_STPDET: stop condition detected in slave mode + \arg I2C_FLAG_RBNE: I2C_DATA is not Empty during receiving + \arg I2C_FLAG_TBE: I2C_DATA is empty during transmitting + \arg I2C_FLAG_BERR: a bus error occurs indication a unexpected start or stop condition on I2C bus + \arg I2C_FLAG_LOSTARB: arbitration lost in master mode + \arg I2C_FLAG_AERR: acknowledge error + \arg I2C_FLAG_OUERR: overrun or underrun situation occurs in slave mode + \arg I2C_FLAG_PECERR: PEC error when receiving data + \arg I2C_FLAG_SMBTO: timeout signal in SMBus mode + \arg I2C_FLAG_SMBALT: SMBus alert status + \arg I2C_FLAG_MASTER: a flag indicating whether I2C block is in master or slave mode + \arg I2C_FLAG_I2CBSY: busy flag + \arg I2C_FLAG_TRS: whether the I2C is a transmitter or a receiver + \arg I2C_FLAG_RXGC: general call address (00h) received + \arg I2C_FLAG_DEFSMB: default address of SMBus device + \arg I2C_FLAG_HSTSMB: SMBus host header detected in slave mode + \arg I2C_FLAG_DUMODF: dual flag in slave mode indicating which address is matched in dual-address mode + \param[out] none + \retval FlagStatus: SET or RESET +*/ +FlagStatus i2c_flag_get(uint32_t i2c_periph, uint32_t flag) +{ + uint32_t reg = 0U; + FlagStatus reval = RESET; + /* get the flag in which register */ + reg = (BIT(31) & flag); + if((BIT(31) == reg)){ + if((I2C_STAT1(i2c_periph)&(flag & I2C_FLAG_MASK))){ + reval = SET; + }else{ + reval = RESET; + } + }else{ + if((I2C_STAT0(i2c_periph)&(flag & I2C_FLAG_MASK))){ + reval = SET; + }else{ + reval = RESET; + } + } + /* return the flag status */ + return reval; +} + +/*! + \brief clear I2C flag + \param[in] i2c_periph: I2Cx(x=0,1,2) + \param[in] flag: flag type + \arg I2C_FLAG_SMBALT: SMBus Alert status + \arg I2C_FLAG_SMBTO: timeout signal in SMBus mode + \arg I2C_FLAG_PECERR: PEC error when receiving data + \arg I2C_FLAG_OUERR: over-run or under-run situation occurs in slave mode + \arg I2C_FLAG_AERR: acknowledge error + \arg I2C_FLAG_LOSTARB: arbitration lost in master mode + \arg I2C_FLAG_BERR: a bus error + \arg I2C_FLAG_ADDSEND: cleared by reading I2C_STAT0 and reading I2C_STAT1 + \param[out] none + \retval none +*/ +void i2c_flag_clear(uint32_t i2c_periph, uint32_t flag) +{ + if(I2C_FLAG_ADDSEND == flag){ + /* read I2C_STAT0 and then read I2C_STAT1 to clear ADDSEND */ + I2C_STAT0(i2c_periph); + I2C_STAT1(i2c_periph); + }else{ + I2C_STAT0(i2c_periph) &= ~(flag); + } +} + +/*! + \brief enable I2C interrupt + \param[in] i2c_periph: I2Cx(x=0,1,2) + \param[in] inttype: interrupt type + \arg I2C_INT_ERR: error interrupt enable + \arg I2C_INT_EV: event interrupt enable + \arg I2C_INT_BUF: buffer interrupt enable + \param[out] none + \retval none +*/ +void i2c_interrupt_enable(uint32_t i2c_periph, uint32_t inttype) +{ + I2C_CTL1(i2c_periph) |= (inttype); +} + +/*! + \brief disable I2C interrupt + \param[in] i2c_periph: I2Cx(x=0,1,2) + \param[in] inttype: interrupt type + \arg I2C_INT_ERR: error interrupt enable + \arg I2C_INT_EV: event interrupt enable + \arg I2C_INT_BUF: buffer interrupt enable + \param[out] none + \retval none +*/ +void i2c_interrupt_disable(uint32_t i2c_periph, uint32_t inttype) +{ + I2C_CTL1(i2c_periph) &= ~(inttype); +} + +/*! + \brief check I2C interrupt flag + \param[in] i2c_periph: I2Cx(x=0,1,2) + \param[in] int_flag: interrupt flag + \arg I2C_INT_FLAG_SBSEND: start condition sent out in master mode interrupt flag + \arg I2C_INT_FLAG_ADDSEND: address is sent in master mode or received and matches in slave mode interrupt flag + \arg I2C_INT_FLAG_BTC: byte transmission finishes + \arg I2C_INT_FLAG_ADD10SEND: header of 10-bit address is sent in master mode interrupt flag + \arg I2C_INT_FLAG_STPDET: etop condition detected in slave mode interrupt flag + \arg I2C_INT_FLAG_RBNE: I2C_DATA is not Empty during receiving interrupt flag + \arg I2C_INT_FLAG_TBE: I2C_DATA is empty during transmitting interrupt flag + \arg I2C_INT_FLAG_BERR: a bus error occurs indication a unexpected start or stop condition on I2C bus interrupt flag + \arg I2C_INT_FLAG_LOSTARB: arbitration lost in master mode interrupt flag + \arg I2C_INT_FLAG_AERR: acknowledge error interrupt flag + \arg I2C_INT_FLAG_OUERR: over-run or under-run situation occurs in slave mode interrupt flag + \arg I2C_INT_FLAG_PECERR: PEC error when receiving data interrupt flag + \arg I2C_INT_FLAG_SMBTO: timeout signal in SMBus mode interrupt flag + \arg I2C_INT_FLAG_SMBALT: SMBus Alert status interrupt flag + \param[out] none + \retval none +*/ +FlagStatus i2c_interrupt_flag_get(uint32_t i2c_periph, uint32_t intflag) +{ + uint32_t evie, errie, bufie; + + evie = I2C_CTL1(i2c_periph)&I2C_CTL1_EVIE; + errie = I2C_CTL1(i2c_periph)&I2C_CTL1_ERRIE; + /* check I2C event interrupt enable bit */ + if((intflag&0x00ffU) && evie){ + if(intflag&0x001fU){ + /* check I2C event flags except TBE and RBNE */ + if(intflag & I2C_STAT0(i2c_periph)){ + return SET; + }else{ + return RESET; + } + }else{ + /* check I2C event flags TBE and RBNE */ + bufie = I2C_CTL1(i2c_periph)&I2C_CTL1_BUFIE; + if(bufie){ + if(intflag & I2C_STAT0(i2c_periph)){ + return SET; + }else{ + return RESET; + } + }else{ + return RESET; + } + } + /* check I2C error interrupt enable bit */ + }else if((intflag&0xff00U) && errie){ + /* check I2C error flags */ + if(intflag & I2C_STAT0(i2c_periph)){ + return SET; + }else{ + return RESET; + } + }else{ + return RESET; + } +} + +/*! + \brief clear I2C interrupt flag + \param[in] i2c_periph: I2Cx(x=0,1,2) + \param[in] intflag: interrupt flag + \arg I2C_INT_FLAG_ADDSEND: address is sent in master mode or received and matches in slave mode interrupt flag + \arg I2C_INT_FLAG_BERR: a bus error occurs indication a unexpected start or stop condition on I2C bus interrupt flag + \arg I2C_INT_FLAG_LOSTARB: arbitration lost in master mode interrupt flag + \arg I2C_INT_FLAG_AERR: acknowledge error interrupt flag + \arg I2C_INT_FLAG_OUERR: over-run or under-run situation occurs in slave mode interrupt flag + \arg I2C_INT_FLAG_PECERR: PEC error when receiving data interrupt flag + \arg I2C_INT_FLAG_SMBTO: timeout signal in SMBus mode interrupt flag + \arg I2C_INT_FLAG_SMBALT: SMBus Alert status interrupt flag + \param[out] none + \retval none +*/ +void i2c_interrupt_flag_clear(uint32_t i2c_periph, uint32_t intflag) +{ + if(I2C_INT_FLAG_ADDSEND == intflag){ + /* read I2C_STAT0 and then read I2C_STAT1 to clear ADDSEND */ + I2C_STAT0(i2c_periph); + I2C_STAT1(i2c_periph); + }else{ + I2C_STAT0(i2c_periph) &= ~(intflag); + } +} + +/*! + \brief I2C PEC calculation on or off + \param[in] i2c_periph: I2Cx(x=0,1,2) + \param[in] pecpara: + \arg I2C_PEC_ENABLE: PEC calculation on + \arg I2C_PEC_DISABLE: PEC calculation off + \param[out] none + \retval none +*/ +void i2c_pec_enable(uint32_t i2c_periph, uint32_t pecstate) +{ + /* on/off PEC calculation */ + uint32_t ctl = 0U; + ctl = I2C_CTL0(i2c_periph); + ctl &= ~(I2C_CTL0_PECEN); + ctl |= pecstate; + I2C_CTL0(i2c_periph) = ctl; +} + +/*! + \brief I2C whether to transfer PEC value + \param[in] i2c_periph: I2Cx(x=0,1,2) + \param[in] pecpara: + \arg I2C_PECTRANS_ENABLE: transfer PEC + \arg I2C_PECTRANS_DISABLE: not transfer PEC + \param[out] none + \retval none +*/ +void i2c_pec_transfer_enable(uint32_t i2c_periph, uint32_t pecpara) +{ + /* whether to transfer PEC */ + uint32_t ctl = 0U; + ctl = I2C_CTL0(i2c_periph); + ctl &= ~(I2C_CTL0_PECTRANS); + ctl |= pecpara; + I2C_CTL0(i2c_periph) = ctl; +} + +/*! + \brief get packet error checking value + \param[in] i2c_periph: I2Cx(x=0,1,2) + \param[out] none + \retval PEC value +*/ +uint8_t i2c_pec_value_get(uint32_t i2c_periph) +{ + return (uint8_t)((I2C_STAT1(i2c_periph) & I2C_STAT1_ECV)>>8); +} + +/*! + \brief I2C issue alert through SMBA pin + \param[in] i2c_periph: I2Cx(x=0,1,2) + \param[in] smbuspara: + \arg I2C_SALTSEND_ENABLE: issue alert through SMBA pin + \arg I2C_SALTSEND_DISABLE: not issue alert through SMBA pin + \param[out] none + \retval none +*/ +void i2c_smbus_issue_alert(uint32_t i2c_periph, uint32_t smbuspara) +{ + /* issue alert through SMBA pin configure*/ + uint32_t ctl = 0U; + ctl = I2C_CTL0(i2c_periph); + ctl &= ~(I2C_CTL0_SALT); + ctl |= smbuspara; + I2C_CTL0(i2c_periph) = ctl; +} + +/*! + \brief enable or disable I2C ARP protocol in SMBus switch + \param[in] i2c_periph: I2Cx(x=0,1,2) + \param[in] smbuspara: + \arg I2C_ARP_ENABLE: enable ARP + \arg I2C_ARP_DISABLE: disable ARP + \param[out] none + \retval none +*/ +void i2c_smbus_arp_enable(uint32_t i2c_periph, uint32_t arpstate) +{ + /* enable or disable I2C ARP protocol*/ + uint32_t ctl = 0U; + ctl = I2C_CTL0(i2c_periph); + ctl &= ~(I2C_CTL0_ARPEN); + ctl |= arpstate; + I2C_CTL0(i2c_periph) = ctl; +} + +#ifdef GD32F170_190 + +/*! + \brief enable SAM_V interface + \param[in] i2c_periph: I2Cx(x=0,1,2) + \param[out] none + \retval none +*/ +void i2c_sam_enable(uint32_t i2c_periph) +{ + I2C_SAMCS(i2c_periph) |= I2C_SAMCS_SAMEN; +} + +/*! + \brief disable SAM_V interface + \param[in] i2c_periph: I2Cx(x=0,1,2) + \param[out] none + \retval none +*/ +void i2c_sam_disable(uint32_t i2c_periph) +{ + I2C_SAMCS(i2c_periph) &= ~(I2C_SAMCS_SAMEN); +} + +/*! + \brief enable SAM_V interface timeout detect + \param[in] i2c_periph: I2Cx(x=0,1,2) + \param[out] none + \retval none +*/ +void i2c_sam_timeout_enable(uint32_t i2c_periph) +{ + I2C_SAMCS(i2c_periph) |= I2C_SAMCS_STOEN; +} + +/*! + \brief disable SAM_V interface timeout detect + \param[in] i2c_periph: I2Cx(x=0,1,2) + \param[out] none + \retval none +*/ +void i2c_sam_timeout_disable(uint32_t i2c_periph) +{ + I2C_SAMCS(i2c_periph) &= ~(I2C_SAMCS_STOEN); +} + +/*! + \brief enable the specified I2C SAM interrupt + \param[in] i2c_periph: I2Cx(x=0,1,2) + \param[in] inttype: interrupt type + \@arg I2C_SAMCS_TFFIE: txframe fall interrupt + \@arg I2C_SAMCS_TFRIE: txframe rise interrupt + \@arg I2C_SAMCS_RFFIE: rxframe fall interrupt + \@arg I2C_SAMCS_RFRIE: rxframe rise interrupt + \param[out] none + \retval none +*/ +void i2c_sam_interrupt_enable(uint32_t i2c_periph, uint32_t inttype) +{ + I2C_SAMCS(i2c_periph) |= (inttype); +} + +/*! + \brief disable i2c interrupt + \param[in] i2c_periph: I2Cx(x=0,1,2) + \param[in] inttype: interrupt type + \@arg I2C_SAMCS_TFFIE: txframe fall interrupt + \@arg I2C_SAMCS_TFRIE: txframe rise interrupt + \@arg I2C_SAMCS_RFFIE: rxframe fall interrupt + \@arg I2C_SAMCS_RFRIE: rxframe rise interrupt + \param[out] none + \retval none +*/ +void i2c_sam_interrupt_disable(uint32_t i2c_periph, uint32_t inttype) +{ + I2C_SAMCS(i2c_periph) &= ~(inttype); +} + +/*! + \brief check i2c SAM state + \param[in] i2c_periph: I2Cx(x=0,1,2) + \param[in] samstate: state type + \@arg I2C_SAMCS_TXF: level of txframe signal + \@arg I2C_SAMCS_RXF: level of rxframe signal + \@arg I2C_SAMCS_TFF: txframe fall flag + \@arg I2C_SAMCS_TFR: txframe rise flag + \@arg I2C_SAMCS_RFF: rxframe fall flag + \@arg I2C_SAMCS_RFR: rxframe rise flag + \param[out] none + \retval state of i2c SAM +*/ +FlagStatus i2c_sam_flag_get(uint32_t i2c_periph, uint32_t samstate) +{ + if(I2C_SAMCS(i2c_periph) & samstate){ + return SET; + } + + return RESET; +} +/*! + \brief clear i2c SAM state + \param[in] i2c_periph: I2Cx(x=0,1,2) + \param[in] samstate: state type + \@arg I2C_SAMCS_TFF: txframe fall flag + \@arg I2C_SAMCS_TFR: txframe rise flag + \@arg I2C_SAMCS_RFF: rxframe fall flag + \@arg I2C_SAMCS_RFR: rxframe rise flag + \param[out] none + \retval none +*/ +void i2c_sam_flag_clear(uint32_t i2c_periph, uint32_t samstate) +{ + I2C_SAMCS(i2c_periph) &= ~(samstate); + +} + +#endif /* GD32F170_190 */ diff --git a/HoverBoardGigaDevice/RTE/Device/GD32F130C8/gd32f1x0_misc.c b/HUGS/RTE/Device/GD32F130C8/gd32f1x0_misc.c similarity index 97% rename from HoverBoardGigaDevice/RTE/Device/GD32F130C8/gd32f1x0_misc.c rename to HUGS/RTE/Device/GD32F130C8/gd32f1x0_misc.c index 3e82b5e4..31af322a 100644 --- a/HoverBoardGigaDevice/RTE/Device/GD32F130C8/gd32f1x0_misc.c +++ b/HUGS/RTE/Device/GD32F130C8/gd32f1x0_misc.c @@ -1,149 +1,149 @@ -/*! - \file gd32f1x0_misc.c - \brief MISC driver -*/ - -/* - Copyright (C) 2017 GigaDevice - - 2014-12-26, V1.0.0, platform GD32F1x0(x=3,5) - 2016-01-15, V2.0.0, platform GD32F1x0(x=3,5,7,9) - 2016-04-30, V3.0.0, firmware update for GD32F1x0(x=3,5,7,9) - 2017-06-19, V3.1.0, firmware update for GD32F1x0(x=3,5,7,9) -*/ - -#include "gd32f1x0_misc.h" - -/*! - \brief set the priority group - \param[in] nvic_prigroup: the NVIC priority group - \arg NVIC_PRIGROUP_PRE0_SUB4:0 bits for pre-emption priority 4 bits for subpriority - \arg NVIC_PRIGROUP_PRE1_SUB3:1 bits for pre-emption priority 3 bits for subpriority - \arg NVIC_PRIGROUP_PRE2_SUB2:2 bits for pre-emption priority 2 bits for subpriority - \arg NVIC_PRIGROUP_PRE3_SUB1:3 bits for pre-emption priority 1 bits for subpriority - \arg NVIC_PRIGROUP_PRE4_SUB0:4 bits for pre-emption priority 0 bits for subpriority - \param[out] none - \retval none -*/ -void nvic_priority_group_set(uint32_t nvic_prigroup) -{ - /* set the priority group value */ - SCB->AIRCR = NVIC_AIRCR_VECTKEY_MASK | nvic_prigroup; -} - -/*! - \brief enable NVIC request - \param[in] nvic_irq: the NVIC interrupt request, detailed in IRQn_Type - \param[in] nvic_irq_pre_priority: the pre-emption priority needed to set - \param[in] nvic_irq_sub_priority: the subpriority needed to set - \param[out] none - \retval none -*/ -void nvic_irq_enable(uint8_t nvic_irq, uint8_t nvic_irq_pre_priority, - uint8_t nvic_irq_sub_priority) -{ - uint32_t temp_priority = 0x00U, temp_pre = 0x00U, temp_sub = 0x00U; - /* use the priority group value to get the temp_pre and the temp_sub */ - if(((SCB->AIRCR) & (uint32_t)0x700)==NVIC_PRIGROUP_PRE0_SUB4){ - temp_pre = 0U; - temp_sub = 0x4U; - }else if(((SCB->AIRCR) & (uint32_t)0x700)==NVIC_PRIGROUP_PRE1_SUB3){ - temp_pre = 1U; - temp_sub = 0x3U; - }else if(((SCB->AIRCR) & (uint32_t)0x700)==NVIC_PRIGROUP_PRE2_SUB2){ - temp_pre = 2U; - temp_sub = 0x2U; - }else if(((SCB->AIRCR) & (uint32_t)0x700)==NVIC_PRIGROUP_PRE3_SUB1){ - temp_pre = 3U; - temp_sub = 0x1U; - }else if(((SCB->AIRCR) & (uint32_t)0x700)==NVIC_PRIGROUP_PRE4_SUB0){ - temp_pre = 4U; - temp_sub = 0x0U; - }else{ - } - /* get the temp_priority to fill the NVIC->IP register */ - temp_priority = (uint32_t)nvic_irq_pre_priority << (0x4U - temp_pre); - temp_priority |= nvic_irq_sub_priority &(0x0FU >> (0x4U - temp_sub)); - temp_priority = temp_priority << 0x04U; - NVIC->IP[nvic_irq] = (uint8_t)temp_priority; - /* enable the selected IRQ */ - NVIC->ISER[nvic_irq >> 0x05] = (uint32_t)0x01 << (nvic_irq & (uint8_t)0x1F); -} - -/*! - \brief disable NVIC request - \param[in] nvic_irq: the NVIC interrupt request, detailed in IRQn_Type - \param[out] none - \retval none -*/ -void nvic_irq_disable(uint8_t nvic_irq) -{ - /* disable the selected IRQ.*/ - NVIC->ICER[nvic_irq >> 0x05] = (uint32_t)0x01 << (nvic_irq & (uint8_t)0x1F); -} - -/*! - \brief set the NVIC vector table base address - \param[in] nvic_vict_tab: the RAM or FLASH base address - \arg NVIC_VECTTAB_RAM: RAM base address - \are NVIC_VECTTAB_FLASH: Flash base address - \param[in] offset: Vector Table offset - \param[out] none - \retval none -*/ -void nvic_vector_table_set(uint32_t nvic_vict_tab, uint32_t offset) -{ - SCB->VTOR = nvic_vict_tab | (offset & NVIC_VECTTAB_OFFSET_MASK); -} - -/*! - \brief set the state of the low power mode - \param[in] lowpower_mode: the low power mode state - \arg SCB_LPM_SLEEP_EXIT_ISR: if chose this para, the system always enter low power - mode by exiting from ISR - \arg SCB_LPM_DEEPSLEEP: if chose this para, the system will enter the DEEPSLEEP mode - \arg SCB_LPM_WAKE_BY_ALL_INT: if chose this para, the lowpower mode can be woke up - by all the enable and disable interrupts - \param[out] none - \retval none -*/ -void system_lowpower_set(uint8_t lowpower_mode) -{ - SCB->SCR |= (uint32_t)lowpower_mode; -} - -/*! - \brief reset the state of the low power mode - \param[in] lowpower_mode: the low power mode state - \arg SCB_LPM_SLEEP_EXIT_ISR: if chose this para, the system will exit low power - mode by exiting from ISR - \arg SCB_LPM_DEEPSLEEP: if chose this para, the system will enter the SLEEP mode - \arg SCB_LPM_WAKE_BY_ALL_INT: if chose this para, the lowpower mode only can be - woke up by the enable interrupts - \param[out] none - \retval none -*/ -void system_lowpower_reset(uint8_t lowpower_mode) -{ - SCB->SCR &= (~(uint32_t)lowpower_mode); -} - -/*! - \brief set the systick clock source - \param[in] systick_clksource: the systick clock source needed to choose - \arg SYSTICK_CLKSOURCE_HCLK: systick clock source is from HCLK - \arg SYSTICK_CLKSOURCE_HCLK_DIV8: systick clock source is from HCLK/8 - \param[out] none - \retval none -*/ - -void systick_clksource_set(uint32_t systick_clksource) -{ - if(SYSTICK_CLKSOURCE_HCLK == systick_clksource ){ - /* set the systick clock source from HCLK */ - SysTick->CTRL |= SYSTICK_CLKSOURCE_HCLK; - }else{ - /* set the systick clock source from HCLK/8 */ - SysTick->CTRL &= SYSTICK_CLKSOURCE_HCLK_DIV8; - } -} +/*! + \file gd32f1x0_misc.c + \brief MISC driver +*/ + +/* + Copyright (C) 2017 GigaDevice + + 2014-12-26, V1.0.0, platform GD32F1x0(x=3,5) + 2016-01-15, V2.0.0, platform GD32F1x0(x=3,5,7,9) + 2016-04-30, V3.0.0, firmware update for GD32F1x0(x=3,5,7,9) + 2017-06-19, V3.1.0, firmware update for GD32F1x0(x=3,5,7,9) +*/ + +#include "gd32f1x0_misc.h" + +/*! + \brief set the priority group + \param[in] nvic_prigroup: the NVIC priority group + \arg NVIC_PRIGROUP_PRE0_SUB4:0 bits for pre-emption priority 4 bits for subpriority + \arg NVIC_PRIGROUP_PRE1_SUB3:1 bits for pre-emption priority 3 bits for subpriority + \arg NVIC_PRIGROUP_PRE2_SUB2:2 bits for pre-emption priority 2 bits for subpriority + \arg NVIC_PRIGROUP_PRE3_SUB1:3 bits for pre-emption priority 1 bits for subpriority + \arg NVIC_PRIGROUP_PRE4_SUB0:4 bits for pre-emption priority 0 bits for subpriority + \param[out] none + \retval none +*/ +void nvic_priority_group_set(uint32_t nvic_prigroup) +{ + /* set the priority group value */ + SCB->AIRCR = NVIC_AIRCR_VECTKEY_MASK | nvic_prigroup; +} + +/*! + \brief enable NVIC request + \param[in] nvic_irq: the NVIC interrupt request, detailed in IRQn_Type + \param[in] nvic_irq_pre_priority: the pre-emption priority needed to set + \param[in] nvic_irq_sub_priority: the subpriority needed to set + \param[out] none + \retval none +*/ +void nvic_irq_enable(uint8_t nvic_irq, uint8_t nvic_irq_pre_priority, + uint8_t nvic_irq_sub_priority) +{ + uint32_t temp_priority = 0x00U, temp_pre = 0x00U, temp_sub = 0x00U; + /* use the priority group value to get the temp_pre and the temp_sub */ + if(((SCB->AIRCR) & (uint32_t)0x700)==NVIC_PRIGROUP_PRE0_SUB4){ + temp_pre = 0U; + temp_sub = 0x4U; + }else if(((SCB->AIRCR) & (uint32_t)0x700)==NVIC_PRIGROUP_PRE1_SUB3){ + temp_pre = 1U; + temp_sub = 0x3U; + }else if(((SCB->AIRCR) & (uint32_t)0x700)==NVIC_PRIGROUP_PRE2_SUB2){ + temp_pre = 2U; + temp_sub = 0x2U; + }else if(((SCB->AIRCR) & (uint32_t)0x700)==NVIC_PRIGROUP_PRE3_SUB1){ + temp_pre = 3U; + temp_sub = 0x1U; + }else if(((SCB->AIRCR) & (uint32_t)0x700)==NVIC_PRIGROUP_PRE4_SUB0){ + temp_pre = 4U; + temp_sub = 0x0U; + }else{ + } + /* get the temp_priority to fill the NVIC->IP register */ + temp_priority = (uint32_t)nvic_irq_pre_priority << (0x4U - temp_pre); + temp_priority |= nvic_irq_sub_priority &(0x0FU >> (0x4U - temp_sub)); + temp_priority = temp_priority << 0x04U; + NVIC->IP[nvic_irq] = (uint8_t)temp_priority; + /* enable the selected IRQ */ + NVIC->ISER[nvic_irq >> 0x05] = (uint32_t)0x01 << (nvic_irq & (uint8_t)0x1F); +} + +/*! + \brief disable NVIC request + \param[in] nvic_irq: the NVIC interrupt request, detailed in IRQn_Type + \param[out] none + \retval none +*/ +void nvic_irq_disable(uint8_t nvic_irq) +{ + /* disable the selected IRQ.*/ + NVIC->ICER[nvic_irq >> 0x05] = (uint32_t)0x01 << (nvic_irq & (uint8_t)0x1F); +} + +/*! + \brief set the NVIC vector table base address + \param[in] nvic_vict_tab: the RAM or FLASH base address + \arg NVIC_VECTTAB_RAM: RAM base address + \are NVIC_VECTTAB_FLASH: Flash base address + \param[in] offset: Vector Table offset + \param[out] none + \retval none +*/ +void nvic_vector_table_set(uint32_t nvic_vict_tab, uint32_t offset) +{ + SCB->VTOR = nvic_vict_tab | (offset & NVIC_VECTTAB_OFFSET_MASK); +} + +/*! + \brief set the state of the low power mode + \param[in] lowpower_mode: the low power mode state + \arg SCB_LPM_SLEEP_EXIT_ISR: if chose this para, the system always enter low power + mode by exiting from ISR + \arg SCB_LPM_DEEPSLEEP: if chose this para, the system will enter the DEEPSLEEP mode + \arg SCB_LPM_WAKE_BY_ALL_INT: if chose this para, the lowpower mode can be woke up + by all the enable and disable interrupts + \param[out] none + \retval none +*/ +void system_lowpower_set(uint8_t lowpower_mode) +{ + SCB->SCR |= (uint32_t)lowpower_mode; +} + +/*! + \brief reset the state of the low power mode + \param[in] lowpower_mode: the low power mode state + \arg SCB_LPM_SLEEP_EXIT_ISR: if chose this para, the system will exit low power + mode by exiting from ISR + \arg SCB_LPM_DEEPSLEEP: if chose this para, the system will enter the SLEEP mode + \arg SCB_LPM_WAKE_BY_ALL_INT: if chose this para, the lowpower mode only can be + woke up by the enable interrupts + \param[out] none + \retval none +*/ +void system_lowpower_reset(uint8_t lowpower_mode) +{ + SCB->SCR &= (~(uint32_t)lowpower_mode); +} + +/*! + \brief set the systick clock source + \param[in] systick_clksource: the systick clock source needed to choose + \arg SYSTICK_CLKSOURCE_HCLK: systick clock source is from HCLK + \arg SYSTICK_CLKSOURCE_HCLK_DIV8: systick clock source is from HCLK/8 + \param[out] none + \retval none +*/ + +void systick_clksource_set(uint32_t systick_clksource) +{ + if(SYSTICK_CLKSOURCE_HCLK == systick_clksource ){ + /* set the systick clock source from HCLK */ + SysTick->CTRL |= SYSTICK_CLKSOURCE_HCLK; + }else{ + /* set the systick clock source from HCLK/8 */ + SysTick->CTRL &= SYSTICK_CLKSOURCE_HCLK_DIV8; + } +} diff --git a/HoverBoardGigaDevice/RTE/Device/GD32F130C8/gd32f1x0_opa.c b/HUGS/RTE/Device/GD32F130C8/gd32f1x0_opa.c similarity index 96% rename from HoverBoardGigaDevice/RTE/Device/GD32F130C8/gd32f1x0_opa.c rename to HUGS/RTE/Device/GD32F130C8/gd32f1x0_opa.c index 37da5c00..9800c262 100644 --- a/HoverBoardGigaDevice/RTE/Device/GD32F130C8/gd32f1x0_opa.c +++ b/HUGS/RTE/Device/GD32F130C8/gd32f1x0_opa.c @@ -1,341 +1,341 @@ -/*! - \file gd32f1x0_opa.c - \brief OPA driver -*/ - -/* - Copyright (C) 2017 GigaDevice - - 2014-12-26, V1.0.0, platform GD32F1x0(x=3,5) - 2016-01-15, V2.0.0, platform GD32F1x0(x=3,5,7,9) - 2016-04-30, V3.0.0, firmware update for GD32F1x0(x=3,5,7,9) - 2017-06-19, V3.1.0, firmware update for GD32F1x0(x=3,5,7,9) -*/ - -#ifdef GD32F170_190 - -#include "gd32f1x0_opa.h" - -/*! - \brief deinit the OPA register to its default reset value - \param[in] none - \param[out] none - \retval none -*/ -void opa_deinit(void) -{ - rcu_periph_reset_enable(RCU_OPAIVREFRST); - rcu_periph_reset_disable(RCU_OPAIVREFRST); -} - -/*! - \brief enable OPA switch - \param[in] opax_swy - \arg OPA_T3OPA0: T3 switch enable for OPA0 - \arg OPA_S1OPA0: S1 switch enable for OPA0 - \arg OPA_S2OPA0: S2 switch enable for OPA0 - \arg OPA_S3OPA0: S3 switch enable for OPA0 - \arg OPA_T3OPA1: T3 switch enable for OPA1 - \arg OPA_S1OPA1: S1 switch enable for OPA1 - \arg OPA_S2OPA1: S2 switch enable for OPA1 - \arg OPA_S3OPA1: S3 switch enable for OPA1 - \arg OPA_S4OPA1: S4 switch enable for OPA1 - \arg OPA_T3OPA2: T3 switch enable for OPA2 - \arg OPA_S1OPA2: S3 switch enable for OPA2 - \arg OPA_S2OPA2: S3 switch enable for OPA2 - \arg OPA_S3OPA2: S3 switch enable for OPA2 - \param[out] none - \retval none -*/ -void opa_switch_enable(uint32_t opax_swy) -{ - OPA_CTL |= (uint32_t)(opax_swy); -} - -/*! - \brief enable OPA - \param[in] opa_periph - \arg OPAx(x =0,1,2) - \param[out] none - \retval none -*/ -void opa_enable(uint32_t opa_periph) -{ - if(OPA0 == opa_periph){ - OPA_CTL &= ~OPA_CTL_OPA0PD; - }else if(OPA1 == opa_periph){ - OPA_CTL &= ~OPA_CTL_OPA1PD; - }else{ - OPA_CTL &= ~OPA_CTL_OPA2PD; - } -} - -/*! - \brief disable OPA - \param[in] opa_periph - \arg OPAx(x =0,1,2) - \param[out] none - \retval none -*/ -void opa_disable(uint32_t opa_periph) -{ - if(OPA0 == opa_periph){ - OPA_CTL |= OPA_CTL_OPA0PD; - }else if(OPA1 == opa_periph){ - OPA_CTL |= OPA_CTL_OPA1PD; - }else{ - OPA_CTL |= OPA_CTL_OPA2PD; - } -} - -/*! - \brief disable OPA switch - \param[in] opax_swy - \arg OPA_T3OPA0: T3 switch enable for OPA0 - \arg OPA_S1OPA0: S1 switch enable for OPA0 - \arg OPA_S2OPA0: S2 switch enable for OPA0 - \arg OPA_S3OPA0: S3 switch enable for OPA0 - \arg OPA_T3OPA1: T3 switch enable for OPA1 - \arg OPA_S1OPA1: S1 switch enable for OPA1 - \arg OPA_S2OPA1: S2 switch enable for OPA1 - \arg OPA_S3OPA1: S3 switch enable for OPA1 - \arg OPA_S4OPA1: S4 switch enable for OPA1 - \arg OPA_T3OPA2: T3 switch enable for OPA2 - \arg OPA_S1OPA2: S3 switch enable for OPA2 - \arg OPA_S2OPA2: S3 switch enable for OPA2 - \arg OPA_S3OPA2: S3 switch enable for OPA2 - \param[out] none - \retval none -*/ -void opa_switch_disable(uint32_t opax_swy) -{ - OPA_CTL &= ~opax_swy; -} - -/*! - \brief enable OPA in low power mode - \param[in] opa_periph - \arg OPAx(x =0,1,2) - \param[out] none - \retval none -*/ -void opa_low_power_enable(uint32_t opa_periph) -{ - if(OPA0 == opa_periph){ - OPA_CTL &= ~OPA_CTL_OPA0LPM; - }else if(OPA1 == opa_periph){ - OPA_CTL &= ~OPA_CTL_OPA1LPM; - }else{ - OPA_CTL &= ~OPA_CTL_OPA2LPM; - } -} - -/*! - \brief disable OPA in low power mode - \param[in] opa_periph - \arg OPAx(x =0,1,2) - \param[out] none - \retval none -*/ -void opa_low_power_disable(uint32_t opa_periph) -{ - if(OPA0 == opa_periph){ - OPA_CTL |= OPA_CTL_OPA0LPM; - }else if(OPA1 == opa_periph){ - OPA_CTL |= OPA_CTL_OPA1LPM; - }else{ - OPA_CTL |= OPA_CTL_OPA2LPM; - } -} - -/*! - \brief set OPA power range - \param[in] powerrange - \arg OPA_POWRANGE_LOW: Low power range is selected (VDDA is lower than 3.3V) - \arg OPA_POWRANGE_HIGH: High power range is selected (VDDA is higher than 3.3V) - \param[out] none - \retval none -*/ -void opa_power_range_config(uint32_t powerrange) -{ - OPA_CTL &= ~OPA_CTL_OPA_RANGE; - OPA_CTL |= powerrange; -} - -/*! - \brief set OPA bias trimming mode - \param[in] opa_trimmode - \arg OPA_BT_TRIM_FACTORY: factory trimming values are used for offset calibration - \arg OPA_BT_TRIM_USER: user trimming values are used for offset calibration - \param[out] none - \retval none -*/ -void opa_trim_mode_set(uint32_t opa_trimmode) -{ - OPA_BT &= ~OPA_BT_OT_USER; - OPA_BT |= opa_trimmode; -} - -/*! - \brief set OPA bias trimming value - \param[in] opa_periph - \arg OPAx(x =0,1,2) - \param[in] opa_input - \arg OPA_INPUT_P: PMOS input is selected to configure the trimming value - \arg OPA_INPUT_N: NMOS input is selected to configure the trimming value - \param[in] opa_trimmode - \arg this parameter can be any value lower or equal to 0x0000001F. - \param[out] none - \retval none -*/ -void opa_trim_value_config(uint32_t opa_periph,uint32_t opa_input,uint32_t opa_trimvalue) -{ - uint32_t bt = 0U, ctl = 0U; - ctl = OPA_CTL; - bt = OPA_BT; - - if(OPA0 == opa_periph){ - /* clear the specified opa calibration for N diff and P diff */ - ctl &= (uint32_t)~(OPA_CTL_OPA0CAL_L | OPA_CTL_OPA0CAL_H); - /* set the specified opa calibration for N diff or P diff */ - ctl |= opa_input; - if(OPA_INPUT_P == opa_input){ - /* clear the specified PMOS pairs normal mode 5-bit offset trim value */ - bt &= (~OPA_BT_OA0_TRIM_LOW); - bt |= (opa_trimvalue); - }else{ - /* clear the specified NMOS pairs normal mode 5-bit offset trim value */ - bt &= (~OPA_BT_OA0_TRIM_HIGH); - bt |= (opa_trimvalue << 5U); - } - - }else if(OPA1 == opa_periph){ - ctl &= (uint32_t)~(OPA_CTL_OPA1CAL_L | OPA_CTL_OPA1CAL_H); - ctl |= (uint32_t)(opa_input << 8U); - if(OPA_INPUT_P == opa_input){ - /* clear the specified PMOS pairs normal mode 5-bit offset trim value */ - bt &= (~OPA_BT_OA1_TRIM_LOW); - bt |= (opa_trimvalue << 10U); - }else{ - /* clear the specified NMOS pairs normal mode 5-bit offset trim value */ - bt &= (~OPA_BT_OA1_TRIM_HIGH); - bt |= (opa_trimvalue << 15U); - } - }else{ - ctl &= (uint32_t)~(OPA_CTL_OPA2CAL_L | OPA_CTL_OPA2CAL_H); - ctl |= (uint32_t)(opa_input << 16U); - if(OPA_INPUT_P == opa_input){ - /* clear the specified PMOS pairs normal mode 5-bit offset trim value */ - bt &= (~OPA_BT_OA2_TRIM_LOW); - bt |= (opa_trimvalue << 20U); - }else{ - /* clear the specified NMOS pairs normal mode 5-bit offset trim value */ - bt &= (~OPA_BT_OA2_TRIM_HIGH); - bt |= (opa_trimvalue << 25U); - } - } - - OPA_CTL = ctl; - OPA_BT = bt; -} - -/*! - \brief set OPA bias trimming value low power - \param[in] opa_periph - \arg OPAx(x =0,1,2) - \param[in] opa_input - \arg OPA_INPUT_P: PMOS input is selected to configure the trimming value - \arg OPA_INPUT_N: NMOS input is selected to configure the trimming value - \param[in] opa_trimmode - \arg this parameter can be any value lower or equal to 0x0000001F. - \param[out] none - \retval none -*/ -void opa_trim_value_lp_config(uint32_t opa_periph,uint32_t opa_input,uint32_t opa_trimvalue) -{ - uint32_t lpbt = 0U, ctl = 0U; - ctl = OPA_CTL; - lpbt = OPA_LPBT; - - if(OPA0 == opa_periph){ - ctl &= (uint32_t)~(OPA_CTL_OPA0CAL_L | OPA_CTL_OPA0CAL_H); - ctl |= opa_input; - if(OPA_INPUT_P == opa_input){ - /* clear the specified PMOS pairs low power mode 5-bit offset trim value */ - lpbt &= (~OPA_LPBT_OA0_TRIM_LOW); - lpbt |= (opa_trimvalue); - }else{ - /* clear the specified NMOS pairs low power mode 5-bit offset trim value */ - lpbt &= (~OPA_LPBT_OA0_TRIM_HIGH); - lpbt |= (opa_trimvalue << 5U); - } - }else if (OPA1 == opa_periph){ - ctl &= (uint32_t)~(OPA_CTL_OPA0CAL_L | OPA_CTL_OPA0CAL_H); - ctl |= (uint32_t)(opa_input << 8U); - if(OPA_INPUT_P == opa_input){ - /* clear the specified PMOS pairs low power mode 5-bit offset trim value */ - lpbt &= (~OPA_LPBT_OA1_TRIM_LOW); - lpbt |= (opa_trimvalue << 10U); - }else{ - /* clear the specified NMOS pairs low power mode 5-bit offset trim value */ - lpbt &= (~OPA_LPBT_OA1_TRIM_HIGH); - lpbt |= (opa_trimvalue << 15U); - } - - }else{ - ctl &= (uint32_t)~(OPA_CTL_OPA2CAL_L | OPA_CTL_OPA2CAL_H); - ctl |= (uint32_t)(opa_input << 16U); - if(OPA_INPUT_P == opa_input){ - /* clear the specified PMOS pairs low power mode 5-bit offset trim value */ - lpbt &= (~OPA_LPBT_OA2_TRIM_LOW); - lpbt |= (opa_trimvalue << 20U); - }else{ - /* clear the specified NMOS pairs low power mode 5-bit offset trim value */ - lpbt &= (~OPA_LPBT_OA2_TRIM_HIGH); - lpbt |= (opa_trimvalue << 25U); - } - } - - OPA_CTL = ctl; - OPA_LPBT = lpbt; -} - -/*! - \brief get OPA calibration flag - \param[in] opa_periph - \arg OPAx(x =0,1,2) - \param[out] none - \retval The state of the OPA calibration flag (SET or RESET) -*/ -FlagStatus opa_cal_out_get(uint32_t opa_periph) -{ - uint32_t data = 0U; - FlagStatus bitstatus = RESET; - data = OPA_CTL; - - if(OPA0 == opa_periph){ - /* get opa0 calibration output bit status */ - if ((uint32_t)RESET != (data & OPA_CTL_OPA1CALOUT)){ - bitstatus = SET; - }else{ - bitstatus = RESET; - } - }else if(OPA1 == opa_periph){ - /* get opa1 calibration output bit status */ - if ((uint32_t)RESET != (data & OPA_CTL_OPA1CALOUT)){ - bitstatus = SET; - }else{ - bitstatus = RESET; - } - }else{ - /* get opa2 calibration output bit status */ - if((uint32_t)RESET != (data & OPA_CTL_OPA1CALOUT)){ - bitstatus = SET; - }else{ - bitstatus = RESET; - } - } - return bitstatus; -} - -#endif /* GD32F170_190 */ +/*! + \file gd32f1x0_opa.c + \brief OPA driver +*/ + +/* + Copyright (C) 2017 GigaDevice + + 2014-12-26, V1.0.0, platform GD32F1x0(x=3,5) + 2016-01-15, V2.0.0, platform GD32F1x0(x=3,5,7,9) + 2016-04-30, V3.0.0, firmware update for GD32F1x0(x=3,5,7,9) + 2017-06-19, V3.1.0, firmware update for GD32F1x0(x=3,5,7,9) +*/ + +#ifdef GD32F170_190 + +#include "gd32f1x0_opa.h" + +/*! + \brief deinit the OPA register to its default reset value + \param[in] none + \param[out] none + \retval none +*/ +void opa_deinit(void) +{ + rcu_periph_reset_enable(RCU_OPAIVREFRST); + rcu_periph_reset_disable(RCU_OPAIVREFRST); +} + +/*! + \brief enable OPA switch + \param[in] opax_swy + \arg OPA_T3OPA0: T3 switch enable for OPA0 + \arg OPA_S1OPA0: S1 switch enable for OPA0 + \arg OPA_S2OPA0: S2 switch enable for OPA0 + \arg OPA_S3OPA0: S3 switch enable for OPA0 + \arg OPA_T3OPA1: T3 switch enable for OPA1 + \arg OPA_S1OPA1: S1 switch enable for OPA1 + \arg OPA_S2OPA1: S2 switch enable for OPA1 + \arg OPA_S3OPA1: S3 switch enable for OPA1 + \arg OPA_S4OPA1: S4 switch enable for OPA1 + \arg OPA_T3OPA2: T3 switch enable for OPA2 + \arg OPA_S1OPA2: S3 switch enable for OPA2 + \arg OPA_S2OPA2: S3 switch enable for OPA2 + \arg OPA_S3OPA2: S3 switch enable for OPA2 + \param[out] none + \retval none +*/ +void opa_switch_enable(uint32_t opax_swy) +{ + OPA_CTL |= (uint32_t)(opax_swy); +} + +/*! + \brief enable OPA + \param[in] opa_periph + \arg OPAx(x =0,1,2) + \param[out] none + \retval none +*/ +void opa_enable(uint32_t opa_periph) +{ + if(OPA0 == opa_periph){ + OPA_CTL &= ~OPA_CTL_OPA0PD; + }else if(OPA1 == opa_periph){ + OPA_CTL &= ~OPA_CTL_OPA1PD; + }else{ + OPA_CTL &= ~OPA_CTL_OPA2PD; + } +} + +/*! + \brief disable OPA + \param[in] opa_periph + \arg OPAx(x =0,1,2) + \param[out] none + \retval none +*/ +void opa_disable(uint32_t opa_periph) +{ + if(OPA0 == opa_periph){ + OPA_CTL |= OPA_CTL_OPA0PD; + }else if(OPA1 == opa_periph){ + OPA_CTL |= OPA_CTL_OPA1PD; + }else{ + OPA_CTL |= OPA_CTL_OPA2PD; + } +} + +/*! + \brief disable OPA switch + \param[in] opax_swy + \arg OPA_T3OPA0: T3 switch enable for OPA0 + \arg OPA_S1OPA0: S1 switch enable for OPA0 + \arg OPA_S2OPA0: S2 switch enable for OPA0 + \arg OPA_S3OPA0: S3 switch enable for OPA0 + \arg OPA_T3OPA1: T3 switch enable for OPA1 + \arg OPA_S1OPA1: S1 switch enable for OPA1 + \arg OPA_S2OPA1: S2 switch enable for OPA1 + \arg OPA_S3OPA1: S3 switch enable for OPA1 + \arg OPA_S4OPA1: S4 switch enable for OPA1 + \arg OPA_T3OPA2: T3 switch enable for OPA2 + \arg OPA_S1OPA2: S3 switch enable for OPA2 + \arg OPA_S2OPA2: S3 switch enable for OPA2 + \arg OPA_S3OPA2: S3 switch enable for OPA2 + \param[out] none + \retval none +*/ +void opa_switch_disable(uint32_t opax_swy) +{ + OPA_CTL &= ~opax_swy; +} + +/*! + \brief enable OPA in low power mode + \param[in] opa_periph + \arg OPAx(x =0,1,2) + \param[out] none + \retval none +*/ +void opa_low_power_enable(uint32_t opa_periph) +{ + if(OPA0 == opa_periph){ + OPA_CTL &= ~OPA_CTL_OPA0LPM; + }else if(OPA1 == opa_periph){ + OPA_CTL &= ~OPA_CTL_OPA1LPM; + }else{ + OPA_CTL &= ~OPA_CTL_OPA2LPM; + } +} + +/*! + \brief disable OPA in low power mode + \param[in] opa_periph + \arg OPAx(x =0,1,2) + \param[out] none + \retval none +*/ +void opa_low_power_disable(uint32_t opa_periph) +{ + if(OPA0 == opa_periph){ + OPA_CTL |= OPA_CTL_OPA0LPM; + }else if(OPA1 == opa_periph){ + OPA_CTL |= OPA_CTL_OPA1LPM; + }else{ + OPA_CTL |= OPA_CTL_OPA2LPM; + } +} + +/*! + \brief set OPA power range + \param[in] powerrange + \arg OPA_POWRANGE_LOW: Low power range is selected (VDDA is lower than 3.3V) + \arg OPA_POWRANGE_HIGH: High power range is selected (VDDA is higher than 3.3V) + \param[out] none + \retval none +*/ +void opa_power_range_config(uint32_t powerrange) +{ + OPA_CTL &= ~OPA_CTL_OPA_RANGE; + OPA_CTL |= powerrange; +} + +/*! + \brief set OPA bias trimming mode + \param[in] opa_trimmode + \arg OPA_BT_TRIM_FACTORY: factory trimming values are used for offset calibration + \arg OPA_BT_TRIM_USER: user trimming values are used for offset calibration + \param[out] none + \retval none +*/ +void opa_trim_mode_set(uint32_t opa_trimmode) +{ + OPA_BT &= ~OPA_BT_OT_USER; + OPA_BT |= opa_trimmode; +} + +/*! + \brief set OPA bias trimming value + \param[in] opa_periph + \arg OPAx(x =0,1,2) + \param[in] opa_input + \arg OPA_INPUT_P: PMOS input is selected to configure the trimming value + \arg OPA_INPUT_N: NMOS input is selected to configure the trimming value + \param[in] opa_trimmode + \arg this parameter can be any value lower or equal to 0x0000001F. + \param[out] none + \retval none +*/ +void opa_trim_value_config(uint32_t opa_periph,uint32_t opa_input,uint32_t opa_trimvalue) +{ + uint32_t bt = 0U, ctl = 0U; + ctl = OPA_CTL; + bt = OPA_BT; + + if(OPA0 == opa_periph){ + /* clear the specified opa calibration for N diff and P diff */ + ctl &= (uint32_t)~(OPA_CTL_OPA0CAL_L | OPA_CTL_OPA0CAL_H); + /* set the specified opa calibration for N diff or P diff */ + ctl |= opa_input; + if(OPA_INPUT_P == opa_input){ + /* clear the specified PMOS pairs normal mode 5-bit offset trim value */ + bt &= (~OPA_BT_OA0_TRIM_LOW); + bt |= (opa_trimvalue); + }else{ + /* clear the specified NMOS pairs normal mode 5-bit offset trim value */ + bt &= (~OPA_BT_OA0_TRIM_HIGH); + bt |= (opa_trimvalue << 5U); + } + + }else if(OPA1 == opa_periph){ + ctl &= (uint32_t)~(OPA_CTL_OPA1CAL_L | OPA_CTL_OPA1CAL_H); + ctl |= (uint32_t)(opa_input << 8U); + if(OPA_INPUT_P == opa_input){ + /* clear the specified PMOS pairs normal mode 5-bit offset trim value */ + bt &= (~OPA_BT_OA1_TRIM_LOW); + bt |= (opa_trimvalue << 10U); + }else{ + /* clear the specified NMOS pairs normal mode 5-bit offset trim value */ + bt &= (~OPA_BT_OA1_TRIM_HIGH); + bt |= (opa_trimvalue << 15U); + } + }else{ + ctl &= (uint32_t)~(OPA_CTL_OPA2CAL_L | OPA_CTL_OPA2CAL_H); + ctl |= (uint32_t)(opa_input << 16U); + if(OPA_INPUT_P == opa_input){ + /* clear the specified PMOS pairs normal mode 5-bit offset trim value */ + bt &= (~OPA_BT_OA2_TRIM_LOW); + bt |= (opa_trimvalue << 20U); + }else{ + /* clear the specified NMOS pairs normal mode 5-bit offset trim value */ + bt &= (~OPA_BT_OA2_TRIM_HIGH); + bt |= (opa_trimvalue << 25U); + } + } + + OPA_CTL = ctl; + OPA_BT = bt; +} + +/*! + \brief set OPA bias trimming value low power + \param[in] opa_periph + \arg OPAx(x =0,1,2) + \param[in] opa_input + \arg OPA_INPUT_P: PMOS input is selected to configure the trimming value + \arg OPA_INPUT_N: NMOS input is selected to configure the trimming value + \param[in] opa_trimmode + \arg this parameter can be any value lower or equal to 0x0000001F. + \param[out] none + \retval none +*/ +void opa_trim_value_lp_config(uint32_t opa_periph,uint32_t opa_input,uint32_t opa_trimvalue) +{ + uint32_t lpbt = 0U, ctl = 0U; + ctl = OPA_CTL; + lpbt = OPA_LPBT; + + if(OPA0 == opa_periph){ + ctl &= (uint32_t)~(OPA_CTL_OPA0CAL_L | OPA_CTL_OPA0CAL_H); + ctl |= opa_input; + if(OPA_INPUT_P == opa_input){ + /* clear the specified PMOS pairs low power mode 5-bit offset trim value */ + lpbt &= (~OPA_LPBT_OA0_TRIM_LOW); + lpbt |= (opa_trimvalue); + }else{ + /* clear the specified NMOS pairs low power mode 5-bit offset trim value */ + lpbt &= (~OPA_LPBT_OA0_TRIM_HIGH); + lpbt |= (opa_trimvalue << 5U); + } + }else if (OPA1 == opa_periph){ + ctl &= (uint32_t)~(OPA_CTL_OPA0CAL_L | OPA_CTL_OPA0CAL_H); + ctl |= (uint32_t)(opa_input << 8U); + if(OPA_INPUT_P == opa_input){ + /* clear the specified PMOS pairs low power mode 5-bit offset trim value */ + lpbt &= (~OPA_LPBT_OA1_TRIM_LOW); + lpbt |= (opa_trimvalue << 10U); + }else{ + /* clear the specified NMOS pairs low power mode 5-bit offset trim value */ + lpbt &= (~OPA_LPBT_OA1_TRIM_HIGH); + lpbt |= (opa_trimvalue << 15U); + } + + }else{ + ctl &= (uint32_t)~(OPA_CTL_OPA2CAL_L | OPA_CTL_OPA2CAL_H); + ctl |= (uint32_t)(opa_input << 16U); + if(OPA_INPUT_P == opa_input){ + /* clear the specified PMOS pairs low power mode 5-bit offset trim value */ + lpbt &= (~OPA_LPBT_OA2_TRIM_LOW); + lpbt |= (opa_trimvalue << 20U); + }else{ + /* clear the specified NMOS pairs low power mode 5-bit offset trim value */ + lpbt &= (~OPA_LPBT_OA2_TRIM_HIGH); + lpbt |= (opa_trimvalue << 25U); + } + } + + OPA_CTL = ctl; + OPA_LPBT = lpbt; +} + +/*! + \brief get OPA calibration flag + \param[in] opa_periph + \arg OPAx(x =0,1,2) + \param[out] none + \retval The state of the OPA calibration flag (SET or RESET) +*/ +FlagStatus opa_cal_out_get(uint32_t opa_periph) +{ + uint32_t data = 0U; + FlagStatus bitstatus = RESET; + data = OPA_CTL; + + if(OPA0 == opa_periph){ + /* get opa0 calibration output bit status */ + if ((uint32_t)RESET != (data & OPA_CTL_OPA1CALOUT)){ + bitstatus = SET; + }else{ + bitstatus = RESET; + } + }else if(OPA1 == opa_periph){ + /* get opa1 calibration output bit status */ + if ((uint32_t)RESET != (data & OPA_CTL_OPA1CALOUT)){ + bitstatus = SET; + }else{ + bitstatus = RESET; + } + }else{ + /* get opa2 calibration output bit status */ + if((uint32_t)RESET != (data & OPA_CTL_OPA1CALOUT)){ + bitstatus = SET; + }else{ + bitstatus = RESET; + } + } + return bitstatus; +} + +#endif /* GD32F170_190 */ diff --git a/HoverBoardGigaDevice/RTE/Device/GD32F130C8/gd32f1x0_pmu.c b/HUGS/RTE/Device/GD32F130C8/gd32f1x0_pmu.c similarity index 96% rename from HoverBoardGigaDevice/RTE/Device/GD32F130C8/gd32f1x0_pmu.c rename to HUGS/RTE/Device/GD32F130C8/gd32f1x0_pmu.c index cfd142ae..ee594e64 100644 --- a/HoverBoardGigaDevice/RTE/Device/GD32F130C8/gd32f1x0_pmu.c +++ b/HUGS/RTE/Device/GD32F130C8/gd32f1x0_pmu.c @@ -1,257 +1,257 @@ -/*! - \file gd32f1x0_pmu.c - \brief PMU driver -*/ - -/* - Copyright (C) 2017 GigaDevice - - 2014-12-26, V1.0.0, platform GD32F1x0(x=3,5) - 2016-01-15, V2.0.0, platform GD32F1x0(x=3,5,7,9) - 2016-04-30, V3.0.0, firmware update for GD32F1x0(x=3,5,7,9) - 2017-06-19, V3.1.0, firmware update for GD32F1x0(x=3,5,7,9) -*/ - -#include "gd32f1x0_pmu.h" - -/*! - \brief reset PMU register - \param[in] none - \param[out] none - \retval none -*/ -void pmu_deinit(void) -{ - /* reset PMU */ - rcu_periph_reset_enable(RCU_PMURST); - rcu_periph_reset_disable(RCU_PMURST); -} - -/*! - \brief select low voltage detector threshold - \param[in] lvdt_n: - \arg PMU_LVDT_0: voltage threshold is 2.2V (GD32F130_150) or 2.4V (GD32F170_190) - \arg PMU_LVDT_1: voltage threshold is 2.3V (GD32F130_150) or 2.7V (GD32F170_190) - \arg PMU_LVDT_2: voltage threshold is 2.4V (GD32F130_150) or 3.0V (GD32F170_190) - \arg PMU_LVDT_3: voltage threshold is 2.5V (GD32F130_150) or 3.3V (GD32F170_190) - \arg PMU_LVDT_4: voltage threshold is 2.6V (GD32F130_150) or 3.6V (GD32F170_190) - \arg PMU_LVDT_5: voltage threshold is 2.7V (GD32F130_150) or 3.9V (GD32F170_190) - \arg PMU_LVDT_6: voltage threshold is 2.8V (GD32F130_150) or 4.2V (GD32F170_190) - \arg PMU_LVDT_7: voltage threshold is 2.9V (GD32F130_150) or 4.5V (GD32F170_190) - \param[out] none - \retval none -*/ -void pmu_lvd_select(uint32_t lvdt_n) -{ - /* disable LVD */ - PMU_CTL &= ~PMU_CTL_LVDEN; - /* clear LVDT bits */ - PMU_CTL &= ~PMU_CTL_LVDT; - /* set LVDT bits according to lvdt_n */ - PMU_CTL |= lvdt_n; - /* enable LVD */ - PMU_CTL |= PMU_CTL_LVDEN; - -} - -/*! - \brief PMU lvd disable - \param[in] none - \param[out] none - \retval none -*/ -void pmu_lvd_disable(void) -{ - /* disable LVD */ - PMU_CTL &= ~PMU_CTL_LVDEN; -} - -/*! - \brief PMU work at sleep mode - \param[in] sleepmodecmd: - \arg WFI_CMD: use WFI command - \arg WFE_CMD: use WFE command - \param[out] none - \retval none -*/ -void pmu_to_sleepmode(uint8_t sleepmodecmd) -{ - /* clear sleepdeep bit of Cortex-M3 system control register */ - SCB->SCR &= ~((uint32_t)SCB_SCR_SLEEPDEEP_Msk); - - /* select WFI or WFE command to enter sleep mode */ - if(WFI_CMD == sleepmodecmd){ - __WFI(); - }else{ - __WFE(); - } -} - -/*! - \brief PMU work at deepsleep mode - \param[in] ldo - \arg PMU_LDO_NORMAL: LDO normal work when pmu enter deepsleep mode - \arg PMU_LDO_LOWPOWER: LDO work at low power mode when pmu enter deepsleep mode - \param[in] deepsleepmodecmd: - \arg WFI_CMD: use WFI command - \arg WFE_CMD: use WFE command - \param[out] none - \retval none -*/ -void pmu_to_deepsleepmode(uint32_t ldo,uint8_t deepsleepmodecmd) -{ - static uint32_t reg_snap[ 4 ]; - /* clear stbmod and ldolp bits */ - PMU_CTL &= ~((uint32_t)(PMU_CTL_STBMOD | PMU_CTL_LDOLP)); - - /* set ldolp bit according to pmu_ldo */ - PMU_CTL |= ldo; - - /* set sleepdeep bit of Cortex-M3 system control register */ - SCB->SCR |= SCB_SCR_SLEEPDEEP_Msk; - - reg_snap[ 0 ] = REG32( 0xE000E010 ); - reg_snap[ 1 ] = REG32( 0xE000E100 ); - reg_snap[ 2 ] = REG32( 0xE000E104 ); - reg_snap[ 3 ] = REG32( 0xE000E108 ); - - REG32( 0xE000E010 ) &= 0x00010004; - REG32( 0xE000E180 ) = 0XB7FFEF19; - REG32( 0xE000E184 ) = 0XFFFFFBFF; - REG32( 0xE000E188 ) = 0xFFFFFFFF; - - /* select WFI or WFE command to enter deepsleep mode */ - if(WFI_CMD == deepsleepmodecmd){ - __WFI(); - }else{ - __SEV(); - __WFE(); - __WFE(); - } - - REG32( 0xE000E010 ) = reg_snap[ 0 ] ; - REG32( 0xE000E100 ) = reg_snap[ 1 ] ; - REG32( 0xE000E104 ) = reg_snap[ 2 ] ; - REG32( 0xE000E108 ) = reg_snap[ 3 ] ; - - /* reset sleepdeep bit of Cortex-M3 system control register */ - SCB->SCR &= ~((uint32_t)SCB_SCR_SLEEPDEEP_Msk); -} - -/*! - \brief pmu work at standby mode - \param[in] standbymodecmd: - \arg WFI_CMD: use WFI command - \arg WFE_CMD: use WFE command - \param[out] none - \retval none -*/ -void pmu_to_standbymode(uint8_t standbymodecmd) -{ - /* set sleepdeep bit of Cortex-M3 system control register */ - SCB->SCR |= SCB_SCR_SLEEPDEEP_Msk; - - /* set stbmod bit */ - PMU_CTL |= PMU_CTL_STBMOD; - - /* reset wakeup flag */ - PMU_CTL |= PMU_CTL_WURST; - - /* select WFI or WFE command to enter standby mode */ - if(WFI_CMD == standbymodecmd){ - __WFI(); - }else{ - __WFE(); - } -} - -/*! - \brief clear flag bit - \param[in] flag_reset: - \arg PMU_FLAG_RESET_WAKEUP: reset wakeup flag - \arg PMU_FLAG_RESET_STANDBY: reset standby flag - \param[out] none - \retval none -*/ -void pmu_flag_clear(uint32_t flag_reset) -{ - switch(flag_reset){ - case PMU_FLAG_RESET_WAKEUP: - /* reset wakeup flag */ - PMU_CTL |= PMU_CTL_WURST; - break; - case PMU_FLAG_RESET_STANDBY: - /* reset standby flag */ - PMU_CTL |= PMU_CTL_STBRST; - break; - default : - break; - } -} - -/*! - \brief get flag state - \param[in] flag: - \arg PMU_FLAG_WAKEUP: wakeup flag - \arg PMU_FLAG_STANDBY: standby flag - \arg PMU_FLAG_LVD: lvd flag - \param[out] none - \retval FlagStatus SET or RESET -*/ -FlagStatus pmu_flag_get(uint32_t flag ) -{ - if(PMU_CS & flag){ - return SET; - }else{ - return RESET; - } -} - -/*! - \brief backup domain write enable - \param[in] none - \param[out] none - \retval none -*/ -void pmu_backup_write_enable(void) -{ - PMU_CTL |= PMU_CTL_BKPWEN; -} - -/*! - \brief backup domain write disable - \param[in] none - \param[out] none - \retval none -*/ -void pmu_backup_write_disable(void) -{ - PMU_CTL &= ~PMU_CTL_BKPWEN; -} - -/*! - \brief wakeup pin enable - \param[in] wakeup_pin: - \arg PMU_WAKEUP_PIN0: wakeup pin 0 - \arg PMU_WAKEUP_PIN1: wakeup pin 1 - \param[out] none - \retval none -*/ -void pmu_wakeup_pin_enable(uint32_t wakeup_pin ) -{ - PMU_CS |= wakeup_pin; -} - -/*! - \brief wakeup pin disable - \param[in] wakeup_pin: - \arg PMU_WAKEUP_PIN0: wakeup pin 0 - \arg PMU_WAKEUP_PIN1: wakeup pin 1 - \param[out] none - \retval none -*/ -void pmu_wakeup_pin_disable(uint32_t wakeup_pin ) -{ - PMU_CS &= ~wakeup_pin; - -} +/*! + \file gd32f1x0_pmu.c + \brief PMU driver +*/ + +/* + Copyright (C) 2017 GigaDevice + + 2014-12-26, V1.0.0, platform GD32F1x0(x=3,5) + 2016-01-15, V2.0.0, platform GD32F1x0(x=3,5,7,9) + 2016-04-30, V3.0.0, firmware update for GD32F1x0(x=3,5,7,9) + 2017-06-19, V3.1.0, firmware update for GD32F1x0(x=3,5,7,9) +*/ + +#include "gd32f1x0_pmu.h" + +/*! + \brief reset PMU register + \param[in] none + \param[out] none + \retval none +*/ +void pmu_deinit(void) +{ + /* reset PMU */ + rcu_periph_reset_enable(RCU_PMURST); + rcu_periph_reset_disable(RCU_PMURST); +} + +/*! + \brief select low voltage detector threshold + \param[in] lvdt_n: + \arg PMU_LVDT_0: voltage threshold is 2.2V (GD32F130_150) or 2.4V (GD32F170_190) + \arg PMU_LVDT_1: voltage threshold is 2.3V (GD32F130_150) or 2.7V (GD32F170_190) + \arg PMU_LVDT_2: voltage threshold is 2.4V (GD32F130_150) or 3.0V (GD32F170_190) + \arg PMU_LVDT_3: voltage threshold is 2.5V (GD32F130_150) or 3.3V (GD32F170_190) + \arg PMU_LVDT_4: voltage threshold is 2.6V (GD32F130_150) or 3.6V (GD32F170_190) + \arg PMU_LVDT_5: voltage threshold is 2.7V (GD32F130_150) or 3.9V (GD32F170_190) + \arg PMU_LVDT_6: voltage threshold is 2.8V (GD32F130_150) or 4.2V (GD32F170_190) + \arg PMU_LVDT_7: voltage threshold is 2.9V (GD32F130_150) or 4.5V (GD32F170_190) + \param[out] none + \retval none +*/ +void pmu_lvd_select(uint32_t lvdt_n) +{ + /* disable LVD */ + PMU_CTL &= ~PMU_CTL_LVDEN; + /* clear LVDT bits */ + PMU_CTL &= ~PMU_CTL_LVDT; + /* set LVDT bits according to lvdt_n */ + PMU_CTL |= lvdt_n; + /* enable LVD */ + PMU_CTL |= PMU_CTL_LVDEN; + +} + +/*! + \brief PMU lvd disable + \param[in] none + \param[out] none + \retval none +*/ +void pmu_lvd_disable(void) +{ + /* disable LVD */ + PMU_CTL &= ~PMU_CTL_LVDEN; +} + +/*! + \brief PMU work at sleep mode + \param[in] sleepmodecmd: + \arg WFI_CMD: use WFI command + \arg WFE_CMD: use WFE command + \param[out] none + \retval none +*/ +void pmu_to_sleepmode(uint8_t sleepmodecmd) +{ + /* clear sleepdeep bit of Cortex-M3 system control register */ + SCB->SCR &= ~((uint32_t)SCB_SCR_SLEEPDEEP_Msk); + + /* select WFI or WFE command to enter sleep mode */ + if(WFI_CMD == sleepmodecmd){ + __WFI(); + }else{ + __WFE(); + } +} + +/*! + \brief PMU work at deepsleep mode + \param[in] ldo + \arg PMU_LDO_NORMAL: LDO normal work when pmu enter deepsleep mode + \arg PMU_LDO_LOWPOWER: LDO work at low power mode when pmu enter deepsleep mode + \param[in] deepsleepmodecmd: + \arg WFI_CMD: use WFI command + \arg WFE_CMD: use WFE command + \param[out] none + \retval none +*/ +void pmu_to_deepsleepmode(uint32_t ldo,uint8_t deepsleepmodecmd) +{ + static uint32_t reg_snap[ 4 ]; + /* clear stbmod and ldolp bits */ + PMU_CTL &= ~((uint32_t)(PMU_CTL_STBMOD | PMU_CTL_LDOLP)); + + /* set ldolp bit according to pmu_ldo */ + PMU_CTL |= ldo; + + /* set sleepdeep bit of Cortex-M3 system control register */ + SCB->SCR |= SCB_SCR_SLEEPDEEP_Msk; + + reg_snap[ 0 ] = REG32( 0xE000E010 ); + reg_snap[ 1 ] = REG32( 0xE000E100 ); + reg_snap[ 2 ] = REG32( 0xE000E104 ); + reg_snap[ 3 ] = REG32( 0xE000E108 ); + + REG32( 0xE000E010 ) &= 0x00010004; + REG32( 0xE000E180 ) = 0XB7FFEF19; + REG32( 0xE000E184 ) = 0XFFFFFBFF; + REG32( 0xE000E188 ) = 0xFFFFFFFF; + + /* select WFI or WFE command to enter deepsleep mode */ + if(WFI_CMD == deepsleepmodecmd){ + __WFI(); + }else{ + __SEV(); + __WFE(); + __WFE(); + } + + REG32( 0xE000E010 ) = reg_snap[ 0 ] ; + REG32( 0xE000E100 ) = reg_snap[ 1 ] ; + REG32( 0xE000E104 ) = reg_snap[ 2 ] ; + REG32( 0xE000E108 ) = reg_snap[ 3 ] ; + + /* reset sleepdeep bit of Cortex-M3 system control register */ + SCB->SCR &= ~((uint32_t)SCB_SCR_SLEEPDEEP_Msk); +} + +/*! + \brief pmu work at standby mode + \param[in] standbymodecmd: + \arg WFI_CMD: use WFI command + \arg WFE_CMD: use WFE command + \param[out] none + \retval none +*/ +void pmu_to_standbymode(uint8_t standbymodecmd) +{ + /* set sleepdeep bit of Cortex-M3 system control register */ + SCB->SCR |= SCB_SCR_SLEEPDEEP_Msk; + + /* set stbmod bit */ + PMU_CTL |= PMU_CTL_STBMOD; + + /* reset wakeup flag */ + PMU_CTL |= PMU_CTL_WURST; + + /* select WFI or WFE command to enter standby mode */ + if(WFI_CMD == standbymodecmd){ + __WFI(); + }else{ + __WFE(); + } +} + +/*! + \brief clear flag bit + \param[in] flag_reset: + \arg PMU_FLAG_RESET_WAKEUP: reset wakeup flag + \arg PMU_FLAG_RESET_STANDBY: reset standby flag + \param[out] none + \retval none +*/ +void pmu_flag_clear(uint32_t flag_reset) +{ + switch(flag_reset){ + case PMU_FLAG_RESET_WAKEUP: + /* reset wakeup flag */ + PMU_CTL |= PMU_CTL_WURST; + break; + case PMU_FLAG_RESET_STANDBY: + /* reset standby flag */ + PMU_CTL |= PMU_CTL_STBRST; + break; + default : + break; + } +} + +/*! + \brief get flag state + \param[in] flag: + \arg PMU_FLAG_WAKEUP: wakeup flag + \arg PMU_FLAG_STANDBY: standby flag + \arg PMU_FLAG_LVD: lvd flag + \param[out] none + \retval FlagStatus SET or RESET +*/ +FlagStatus pmu_flag_get(uint32_t flag ) +{ + if(PMU_CS & flag){ + return SET; + }else{ + return RESET; + } +} + +/*! + \brief backup domain write enable + \param[in] none + \param[out] none + \retval none +*/ +void pmu_backup_write_enable(void) +{ + PMU_CTL |= PMU_CTL_BKPWEN; +} + +/*! + \brief backup domain write disable + \param[in] none + \param[out] none + \retval none +*/ +void pmu_backup_write_disable(void) +{ + PMU_CTL &= ~PMU_CTL_BKPWEN; +} + +/*! + \brief wakeup pin enable + \param[in] wakeup_pin: + \arg PMU_WAKEUP_PIN0: wakeup pin 0 + \arg PMU_WAKEUP_PIN1: wakeup pin 1 + \param[out] none + \retval none +*/ +void pmu_wakeup_pin_enable(uint32_t wakeup_pin ) +{ + PMU_CS |= wakeup_pin; +} + +/*! + \brief wakeup pin disable + \param[in] wakeup_pin: + \arg PMU_WAKEUP_PIN0: wakeup pin 0 + \arg PMU_WAKEUP_PIN1: wakeup pin 1 + \param[out] none + \retval none +*/ +void pmu_wakeup_pin_disable(uint32_t wakeup_pin ) +{ + PMU_CS &= ~wakeup_pin; + +} diff --git a/HoverBoardGigaDevice/RTE/Device/GD32F130C8/gd32f1x0_rcu.c b/HUGS/RTE/Device/GD32F130C8/gd32f1x0_rcu.c similarity index 97% rename from HoverBoardGigaDevice/RTE/Device/GD32F130C8/gd32f1x0_rcu.c rename to HUGS/RTE/Device/GD32F130C8/gd32f1x0_rcu.c index 11fddb47..02f13de9 100644 --- a/HoverBoardGigaDevice/RTE/Device/GD32F130C8/gd32f1x0_rcu.c +++ b/HUGS/RTE/Device/GD32F130C8/gd32f1x0_rcu.c @@ -1,1214 +1,1214 @@ -/*! - \file gd32f1x0_rcu.c - \brief RCU driver -*/ - -/* - Copyright (C) 2017 GigaDevice - - 2014-12-26, V1.0.0, platform GD32F1x0(x=3,5) - 2016-01-15, V2.0.0, platform GD32F1x0(x=3,5,7,9) - 2016-04-30, V3.0.0, firmware update for GD32F1x0(x=3,5,7,9) - 2017-06-19, V3.1.0, firmware update for GD32F1x0(x=3,5,7,9) -*/ - -#include "gd32f1x0_rcu.h" - -#define SEL_IRC8M 0x00U -#define SEL_HXTAL 0x01U -#define SEL_PLL 0x02U - -/* define startup timeout count */ -#define OSC_STARTUP_TIMEOUT ((uint32_t)0xFFFFFU) -#define LXTAL_STARTUP_TIMEOUT ((uint32_t)0x3FFFFFFU) - -/*! - \brief deinitialize the RCU - \param[in] none - \param[out] none - \retval none -*/ -void rcu_deinit(void) -{ - /* enable IRC8M */ - RCU_CTL0 |= RCU_CTL0_IRC8MEN; - while(0U == (RCU_CTL0 & RCU_CTL0_IRC8MSTB)){ - } - /* reset RCU */ -#ifdef GD32F130_150 - RCU_CFG0 &= ~(RCU_CFG0_SCS | RCU_CFG0_AHBPSC | RCU_CFG0_APB1PSC | RCU_CFG0_APB2PSC |\ - RCU_CFG0_ADCPSC | RCU_CFG0_CKOUTSEL | RCU_CFG0_CKOUTDIV | RCU_CFG0_PLLDV); -#elif defined (GD32F170_190) - RCU_CFG0 &= ~(RCU_CFG0_SCS | RCU_CFG0_AHBPSC | RCU_CFG0_APB1PSC | RCU_CFG0_APB2PSC |\ - RCU_CFG0_ADCPSC | RCU_CFG0_CKOUT0SEL | RCU_CFG0_CKOUT0DIV | RCU_CFG0_PLLDV); -#endif /* GD32F130_150 */ - RCU_CFG0 &= ~(RCU_CFG0_PLLSEL | RCU_CFG0_PLLMF | RCU_CFG0_PLLDV); -#ifdef GD32F130_150 - RCU_CFG0 &= ~(RCU_CFG0_USBDPSC); -#endif /* GD32F130_150 */ - RCU_CTL0 &= ~(RCU_CTL0_HXTALEN | RCU_CTL0_CKMEN | RCU_CTL0_PLLEN | RCU_CTL0_HXTALBPS); - RCU_CFG1 &= ~RCU_CFG1_HXTALPREDV; - RCU_CFG2 &= ~(RCU_CFG2_USART0SEL | RCU_CFG2_CECSEL | RCU_CFG2_ADCSEL); -#ifdef GD32F130_150 - RCU_CTL1 &= ~RCU_CTL1_IRC14MEN; -#elif defined (GD32F170_190) - RCU_CFG2 &= ~RCU_CFG2_IRC28MDIV; - RCU_CTL1 &= ~RCU_CTL1_IRC28MEN; - RCU_CFG3 &= ~RCU_CFG3_CKOUT1SRC; - RCU_CFG3 &= ~RCU_CFG3_CKOUT1DIV; -#endif /* GD32F130_150 */ - RCU_INT = 0x00000000U; -} - -/*! - \brief enable the peripherals clock - \param[in] periph: RCU peripherals, refer to rcu_periph_enum - \arg RCU_GPIOx (x=A,B,C,D,F): GPIO ports clock - \arg RCU_DMA: DMA clock - \arg RCU_CRC: CRC clock - \arg RCU_TSI: TSI clock - \arg RCU_CFGCMP: CFGCMP clock - \arg RCU_ADC: ADC clock - \arg RCU_TIMERx (x=0,1,2,5,13,14,15,16): TIMER clock - \arg RCU_SPIx (x=0,1,2): SPI clock - \arg RCU_USARTx (x=0,1): USART clock - \arg RCU_SLCD: SLCD clock, only in GD32F170_190 - \arg RCU_WWDGT: WWDGT clock - \arg RCU_I2Cx (x=0,1,2): I2C clock - \arg RCU_USBD: USBD clock, only in GD32F130_150 - \arg RCU_CANx (x=0,1): CAN clock, only in GD32F170_190 - \arg RCU_PMU: PMU clock - \arg RCU_DAC: DAC clock - \arg RCU_CEC: CEC clock - \arg RCU_OPAIVREF: OPAIVREF clock, only in GD32F170_190 - \arg RCU_RTC: RTC clock - \param[out] none - \retval none -*/ -void rcu_periph_clock_enable(rcu_periph_enum periph) -{ - RCU_REG_VAL(periph) |= BIT(RCU_BIT_POS(periph)); -} - -/*! - \brief disable the peripherals clock - \param[in] periph: RCU peripherals, refer to rcu_periph_enum - \arg RCU_GPIOx (x=A,B,C,D,F): GPIO ports clock - \arg RCU_DMA: DMA clock - \arg RCU_CRC: CRC clock - \arg RCU_TSI: TSI clock - \arg RCU_CFGCMP: CFGCMP clock - \arg RCU_ADC: ADC clock - \arg RCU_TIMERx (x=0,1,2,5,13,14,15,16): TIMER clock - \arg RCU_SPIx (x=0,1,2): SPI clock - \arg RCU_USARTx (x=0,1): USART clock - \arg RCU_SLCD: SLCD clock, only in GD32F170_190 - \arg RCU_WWDGT: WWDGT clock - \arg RCU_I2Cx (x=0,1,2): I2C clock - \arg RCU_USBD: USBD clock only in GD32F130_150 - \arg RCU_CANx (x=0,1): CAN clock, only in GD32F170_190 - \arg RCU_PMU: PMU clock - \arg RCU_DAC: DAC clock - \arg RCU_CEC: CEC clock - \arg RCU_OPAIVREF: OPAIVREF clock, only in GD32F170_190 - \arg RCU_RTC: RTC clock - \param[out] none - \retval none -*/ -void rcu_periph_clock_disable(rcu_periph_enum periph) -{ - RCU_REG_VAL(periph) &= ~BIT(RCU_BIT_POS(periph)); -} - -/*! - \brief enable the peripherals clock when sleep mode - \param[in] periph: RCU peripherals, refer to rcu_periph_sleep_enum - only one parameter can be selected which is shown as below: - \arg RCU_FMC_SLP: FMC clock - \arg RCU_SRAM_SLP: SRAM clock - \param[out] none - \retval none -*/ -void rcu_periph_clock_sleep_enable(rcu_periph_sleep_enum periph) -{ - RCU_REG_VAL(periph) |= BIT(RCU_BIT_POS(periph)); -} - -/*! - \brief disable the peripherals clock when sleep mode - \param[in] periph: RCU peripherals, refer to rcu_periph_sleep_enum - only one parameter can be selected which is shown as below: - \arg RCU_FMC_SLP: FMC clock - \arg RCU_SRAM_SLP: SRAM clock - \param[out] none - \retval none -*/ -void rcu_periph_clock_sleep_disable(rcu_periph_sleep_enum periph) -{ - RCU_REG_VAL(periph) &= ~BIT(RCU_BIT_POS(periph)); -} - -/*! - \brief reset the peripherals - \param[in] periph_reset: RCU peripherals reset, refer to rcu_periph_reset_enum - \arg RCU_GPIOxRST (x=A,B,C,D,F): reset GPIO ports - \arg RCU_TSIRST: reset TSI - \arg RCU_CFGCMPRST: reset CFGCMP - \arg RCU_ADCRST: reset ADC - \arg RCU_TIMERxRST (x=0,1,2,5,13,14,15,16): reset TIMER - \arg RCU_SPIxRST (x=0,1,2): reset SPI - \arg RCU_USARTxRST (x=0,1): reset USART - \arg RCU_SLCDRST: reset SLCD, only in GD32F170_190 - \arg RCU_WWDGTRST: reset WWDGT - \arg RCU_I2CxRST (x=0,1,2): reset I2C - \arg RCU_USBDRST: reset USBD, only in GD32F130_150 - \arg RCU_CANxRST (x=0,1): reset CAN, only in GD32F170_190 - \arg RCU_PMURST: reset PMU - \arg RCU_DACRST: reset DAC - \arg RCU_CECRST: reset CEC - \arg RCU_OPAIVREFRST: reset OPAIVREF, only in GD32F170_190 - \param[out] none - \retval none -*/ -void rcu_periph_reset_enable(rcu_periph_reset_enum periph_reset) -{ - RCU_REG_VAL(periph_reset) |= BIT(RCU_BIT_POS(periph_reset)); -} - -/*! - \brief disable reset the peripheral - \param[in] periph_reset: RCU peripherals reset, refer to rcu_periph_reset_enum - \arg RCU_GPIOxRST (x=A,B,C,D,F): reset GPIO ports - \arg RCU_TSIRST: reset TSI - \arg RCU_CFGCMPRST: reset CFGCMP - \arg RCU_ADCRST: reset ADC - \arg RCU_TIMERxRST (x=0,1,2,5,13,14,15,16): reset TIMER - \arg RCU_SPIxRST (x=0,1,2): reset SPI - \arg RCU_USARTxRST (x=0,1): reset USART - \arg RCU_SLCDRST: reset SLCD, only in GD32F170_190 - \arg RCU_WWDGTRST: reset WWDGT - \arg RCU_I2CxRST (x=0,1,2): reset I2C - \arg RCU_USBDRST: reset USBD, only in GD32F130_150 - \arg RCU_CANxRST (x=0,1): reset CAN, only in GD32F170_190 - \arg RCU_PMURST: reset PMU - \arg RCU_DACRST: reset DAC - \arg RCU_CECRST: reset CEC - \arg RCU_OPAIVREFRST: reset OPAIVREF, only in GD32F170_190 - \param[out] none - \retval none -*/ -void rcu_periph_reset_disable(rcu_periph_reset_enum periph_reset) -{ - RCU_REG_VAL(periph_reset) &= ~BIT(RCU_BIT_POS(periph_reset)); -} - -/*! - \brief reset the BKP domain - \param[in] none - \param[out] none - \retval none -*/ -void rcu_bkp_reset_enable(void) -{ - RCU_BDCTL |= RCU_BDCTL_BKPRST; -} - -/*! - \brief disable the BKP domain reset - \param[in] none - \param[out] none - \retval none -*/ -void rcu_bkp_reset_disable(void) -{ - RCU_BDCTL &= ~RCU_BDCTL_BKPRST; -} - -/*! - \brief configure the system clock source - \param[in] ck_sys: system clock source select - \arg RCU_CKSYSSRC_IRC8M: select CK_IRC8M as the CK_SYS source - \arg RCU_CKSYSSRC_HXTAL: select CK_HXTAL as the CK_SYS source - \arg RCU_CKSYSSRC_PLL: select CK_PLL as the CK_SYS source - \param[out] none - \retval none -*/ -void rcu_system_clock_source_config(uint32_t ck_sys) -{ - uint32_t cksys_source = 0U; - cksys_source = RCU_CFG0; - /* reset the SCS bits and set according to ck_sys */ - cksys_source &= ~RCU_CFG0_SCS; - RCU_CFG0 = (ck_sys | cksys_source); -} - -/*! - \brief get the system clock source - \param[in] none - \param[out] none - \retval which clock is selected as CK_SYS source - \arg RCU_SCSS_IRC8M: select CK_IRC8M as the CK_SYS source - \arg RCU_SCSS_HXTAL: select CK_HXTAL as the CK_SYS source - \arg RCU_SCSS_PLL: select CK_PLL as the CK_SYS source -*/ -uint32_t rcu_system_clock_source_get(void) -{ - return (RCU_CFG0 & 0x0000000CU); -} - -/*! - \brief configure the AHB clock prescaler selection - \param[in] ck_ahb: AHB clock prescaler selection - \arg RCU_AHB_CKSYS_DIVx, x=1, 2, 4, 8, 16, 64, 128, 256, 512 - \param[out] none - \retval none -*/ -void rcu_ahb_clock_config(uint32_t ck_ahb) -{ - uint32_t ahbpsc = 0U; - ahbpsc = RCU_CFG0; - /* reset the AHBPSC bits and set according to ck_ahb */ - ahbpsc &= ~RCU_CFG0_AHBPSC; - RCU_CFG0 = (ck_ahb | ahbpsc); -} - -/*! - \brief configure the APB1 clock prescaler selection - \param[in] ck_apb1: APB1 clock prescaler selection - \arg RCU_APB1_CKAHB_DIV1: select CK_AHB as CK_APB1 - \arg RCU_APB1_CKAHB_DIV2: select CK_AHB/2 as CK_APB1 - \arg RCU_APB1_CKAHB_DIV4: select CK_AHB/4 as CK_APB1 - \arg RCU_APB1_CKAHB_DIV8: select CK_AHB/8 as CK_APB1 - \arg RCU_APB1_CKAHB_DIV16: select CK_AHB/16 as CK_APB1 - \param[out] none - \retval none -*/ -void rcu_apb1_clock_config(uint32_t ck_apb1) -{ - uint32_t apb1psc = 0U; - apb1psc = RCU_CFG0; - /* reset the APB1PSC and set according to ck_apb1 */ - apb1psc &= ~RCU_CFG0_APB1PSC; - RCU_CFG0 = (ck_apb1 | apb1psc); -} - -/*! - \brief configure the APB2 clock prescaler selection - \param[in] ck_apb2: APB2 clock prescaler selection - \arg RCU_APB2_CKAHB_DIV1: select CK_AHB as CK_APB2 - \arg RCU_APB2_CKAHB_DIV2: select CK_AHB/2 as CK_APB2 - \arg RCU_APB2_CKAHB_DIV4: select CK_AHB/4 as CK_APB2 - \arg RCU_APB2_CKAHB_DIV8: select CK_AHB/8 as CK_APB2 - \arg RCU_APB2_CKAHB_DIV16: select CK_AHB/16 as CK_APB2 - \param[out] none - \retval none -*/ -void rcu_apb2_clock_config(uint32_t ck_apb2) -{ - uint32_t apb2psc = 0U; - apb2psc = RCU_CFG0; - /* reset the APB2PSC and set according to ck_apb2 */ - apb2psc &= ~RCU_CFG0_APB2PSC; - RCU_CFG0 = (ck_apb2 | apb2psc); -} - -/*! - \brief configure the ADC clock prescaler selection - \param[in] ck_adc: ADC clock prescaler selection, refer to rcu_adc_clock_enum - \arg RCU_ADCCK_IRC14M: select CK_IRC14M as CK_ADC, only in GD32F130_150 - \arg RCU_ADCCK_IRC28M_DIV2: select CK_IRC28M/2 as CK_ADC, only in GD32F170_190 - \arg RCU_ADCCK_IRC28M: select CK_IRC28M as CK_ADC, only in GD32F170_190 - \arg RCU_ADCCK_APB2_DIV2: select CK_APB2/2 as CK_ADC - \arg RCU_ADCCK_APB2_DIV4: select CK_APB2/4 as CK_ADC - \arg RCU_ADCCK_APB2_DIV6: select CK_APB2/6 as CK_ADC - \arg RCU_ADCCK_APB2_DIV8: select CK_APB2/8 as CK_ADC - \param[out] none - \retval none -*/ -void rcu_adc_clock_config(rcu_adc_clock_enum ck_adc) -{ - /* reset the ADCPSC, ADCSEL, IRC28MDIV bits */ - RCU_CFG0 &= ~RCU_CFG0_ADCPSC; -#ifdef GD32F130_150 - RCU_CFG2 &= ~RCU_CFG2_ADCSEL; -#elif defined (GD32F170_190) - RCU_CFG2 &= ~(RCU_CFG2_ADCSEL | RCU_CFG2_IRC28MDIV); -#endif /* GD32F130_150 */ - /* set the ADC clock according to ck_adc */ - switch(ck_adc){ -#ifdef GD32F130_150 - case RCU_ADCCK_IRC14M: - RCU_CFG2 &= ~RCU_CFG2_ADCSEL; - break; -#elif defined (GD32F170_190) - case RCU_ADCCK_IRC28M_DIV2: - RCU_CFG2 &= ~RCU_CFG2_IRC28MDIV; - RCU_CFG2 &= ~RCU_CFG2_ADCSEL; - break; - case RCU_ADCCK_IRC28M: - RCU_CFG2 |= RCU_CFG2_IRC28MDIV; - RCU_CFG2 &= ~RCU_CFG2_ADCSEL; - break; -#endif /* GD32F130_150 */ - case RCU_ADCCK_APB2_DIV2: - RCU_CFG0 |= RCU_ADC_CKAPB2_DIV2; - RCU_CFG2 |= RCU_CFG2_ADCSEL; - break; - case RCU_ADCCK_APB2_DIV4: - RCU_CFG0 |= RCU_ADC_CKAPB2_DIV4; - RCU_CFG2 |= RCU_CFG2_ADCSEL; - break; - case RCU_ADCCK_APB2_DIV6: - RCU_CFG0 |= RCU_ADC_CKAPB2_DIV6; - RCU_CFG2 |= RCU_CFG2_ADCSEL; - break; - case RCU_ADCCK_APB2_DIV8: - RCU_CFG0 |= RCU_ADC_CKAPB2_DIV8; - RCU_CFG2 |= RCU_CFG2_ADCSEL; - break; - default: - break; - } -} - -#ifdef GD32F130_150 -/*! - \brief configure the USBD clock prescaler selection - \param[in] ck_usbd: USBD clock prescaler selection - \arg RCU_USBD_CKPLL_DIV1_5: select CK_PLL/1.5 as CK_USBD - \arg RCU_USBD_CKPLL_DIV1: select CK_PLL as CK_USBD - \arg RCU_USBD_CKPLL_DIV2_5: select CK_PLL/2.5 as CK_USBD - \arg RCU_USBD_CKPLL_DIV2: select CK_PLL/2 as CK_USBD - \param[out] none - \retval none -*/ -void rcu_usbd_clock_config(uint32_t ck_usbd) -{ - /* reset the USBDPSC bits and set according to ck_usbd */ - RCU_CFG0 &= ~RCU_CFG0_USBDPSC; - RCU_CFG0 |= ck_usbd; -} - -/*! - \brief configure the CK_OUT clock source and divider - \param[in] ckout_src: CK_OUT clock source selection - \arg RCU_CKOUTSRC_NONE: no clock selected - \arg RCU_CKOUTSRC_IRC14M: IRC14M selected - \arg RCU_CKOUTSRC_IRC40K: IRC40K selected - \arg RCU_CKOUTSRC_LXTAL: LXTAL selected - \arg RCU_CKOUTSRC_CKSYS: CKSYS selected - \arg RCU_CKOUTSRC_IRC8M: IRC8M selected - \arg RCU_CKOUTSRC_HXTAL: HXTAL selected - \arg RCU_CKOUTSRC_CKPLL_DIV1: CK_PLL selected - \arg RCU_CKOUTSRC_CKPLL_DIV2: CK_PLL/2 selected - \param[in] ckout_div: CK_OUT divider - \arg RCU_CKOUT_DIVx(x=1,2,4,8,16,32,64,128): CK_OUT is divided by x - \param[out] none - \retval none -*/ -void rcu_ckout_config(uint32_t ckout_src, uint32_t ckout_div) -{ - uint32_t ckout = 0U; - ckout = RCU_CFG0; - /* reset the CKOUTSEL, CKOUTDIV and PLLDV bits and set according to ckout_src and ckout_div */ - ckout &= ~(RCU_CFG0_CKOUTSEL | RCU_CFG0_CKOUTDIV | RCU_CFG0_PLLDV); - RCU_CFG0 = (ckout | ckout_src | ckout_div); -} -#elif defined (GD32F170_190) -/*! - \brief configure the CK_OUT0 clock source and divider - \param[in] ckout0_src: CK_OUT0 clock source selection - \arg RCU_CKOUT0SRC_NONE: no clock selected - \arg RCU_CKOUT0SRC_IRC28M: IRC28M selected - \arg RCU_CKOUT0SRC_IRC40K: IRC40K selected - \arg RCU_CKOUT0SRC_LXTAL: LXTAL selected - \arg RCU_CKOUT0SRC_CKSYS: CKSYS selected - \arg RCU_CKOUT0SRC_IRC8M: IRC8M selected - \arg RCU_CKOUT0SRC_HXTAL: HXTAL selected - \arg RCU_CKOUT0SRC_CKPLL_DIV1: CK_PLL selected - \arg RCU_CKOUT0SRC_CKPLL_DIV2: CK_PLL/2 selected - \param[in] ckout0_div: CK_OUT0 divider - \arg RCU_CKOUT0_DIVx(x=1,2,4,8,16,32,64,128): CK_OUT0 is divided by x - \param[out] none - \retval none -*/ -void rcu_ckout0_config(uint32_t ckout0_src, uint32_t ckout0_div) -{ - uint32_t ckout0 = 0U; - ckout0 = RCU_CFG0; - /* reset the CKOUT0SEL, CKOUT0DIV and PLLDV bits and set according to ckout0_src and ckout0_div */ - ckout0 &= ~(RCU_CFG0_CKOUT0SEL | RCU_CFG0_CKOUT0DIV | RCU_CFG0_PLLDV); - RCU_CFG0 = (ckout0 | ckout0_src | ckout0_div); -} - -/*! - \brief configure the CK_OUT1 clock source and divider - \param[in] ckout1_src: CK_OUT1 clock source selection - \arg RCU_CKOUT1SRC_NONE: no clock selected - \arg RCU_CKOUT1SRC_IRC28M: IRC28M selected - \arg RCU_CKOUT1SRC_IRC40K: IRC40K selected - \arg RCU_CKOUT1SRC_LXTAL: LXTAL selected - \arg RCU_CKOUT1SRC_CKSYS: CKSYS selected - \arg RCU_CKOUT1SRC_IRC8M: IRC8M selected - \arg RCU_CKOUT1SRC_HXTAL: HXTAL selected - \arg RCU_CKOUT1SRC_CKPLL_DIV1: CK_PLL selected - \arg RCU_CKOUT1SRC_CKPLL_DIV2: CK_PLL/2 selected - \param[in] ckout1_div: CK_OUT1 divider - \arg RCU_CKOUT1_DIVx(x=1..64): CK_OUT1 is divided by x - \param[out] none - \retval none -*/ -void rcu_ckout1_config(uint32_t ckout1_src, uint32_t ckout1_div) -{ - uint32_t ckout1 = 0U; - ckout1 = RCU_CFG3; - /* reset the CKOUT1SRC, CKOUT1DIV bits and set according to ckout1_src and ckout1_div */ - ckout1 &= ~(RCU_CFG3_CKOUT1SRC | RCU_CFG3_CKOUT1DIV); - if(RCU_CKOUT1SRC_CKPLL_DIV1 == ckout1_src){ - RCU_CFG0 |= RCU_CFG0_PLLDV; - ckout1_src = CFG3_CKOUT1SRC(7); - }else if(RCU_CKOUT1SRC_CKPLL_DIV2 == ckout1_src){ - RCU_CFG0 &= ~RCU_CFG0_PLLDV; - ckout1_src = CFG3_CKOUT1SRC(7); - }else{ - } - RCU_CFG3 = (ckout1 | ckout1_src | ckout1_div); -} -#endif /* GD32F130_150 */ - -/*! - \brief configure the PLL clock source selection and PLL multiply factor - \param[in] pll_src: PLL clock source selection - \arg RCU_PLLSRC_IRC8M_DIV2: select CK_IRC8M/2 as PLL source clock - \arg RCU_PLLSRC_HXTAL: select HXTAL as PLL source clock - \param[in] pll_mul: PLL multiply factor - \arg RCU_PLL_MULx(x=2..32): PLL source clock * x - \param[out] none - \retval none -*/ -void rcu_pll_config(uint32_t pll_src, uint32_t pll_mul) -{ - RCU_CFG0 &= ~(RCU_CFG0_PLLSEL | RCU_CFG0_PLLMF); - RCU_CFG0 |= (pll_src | pll_mul); -} - -/*! - \brief configure the USART clock source selection - \param[in] ck_usart: USART clock source selection - \arg RCU_USART0SRC_CKAPB2: CK_USART0 select CK_APB2 - \arg RCU_USART0SRC_CKSYS: CK_USART0 select CK_SYS - \arg RCU_USART0SRC_LXTAL: CK_USART0 select CK_LXTAL - \arg RCU_USART0SRC_IRC8M: CK_USART0 select CK_IRC8M - \param[out] none - \retval none -*/ -void rcu_usart_clock_config(uint32_t ck_usart) -{ - /* reset the USART0SEL bits and set according to ck_usart */ - RCU_CFG2 &= ~RCU_CFG2_USART0SEL; - RCU_CFG2 |= ck_usart; -} - -/*! - \brief configure the CEC clock source selection - \param[in] ck_cec: CEC clock source selection - \arg RCU_CECSRC_IRC8M_DIV244: CK_CEC select CK_IRC8M/244 - \arg RCU_CECSRC_LXTAL: CK_CEC select CK_LXTAL - \param[out] none - \retval none -*/ -void rcu_cec_clock_config(uint32_t ck_cec) -{ - /* reset the CECSEL bit and set according to ck_cec */ - RCU_CFG2 &= ~RCU_CFG2_CECSEL; - RCU_CFG2 |= ck_cec; -} - -/*! - \brief configure the RTC clock source selection - \param[in] rtc_clock_source: RTC clock source selection - \arg RCU_RTCSRC_NONE: no clock selected - \arg RCU_RTCSRC_LXTAL: CK_LXTAL selected as RTC source clock - \arg RCU_RTCSRC_IRC40K: CK_IRC40K selected as RTC source clock - \arg RCU_RTCSRC_HXTAL_DIV32: CK_HXTAL/32 selected as RTC source clock - \param[out] none - \retval none -*/ -void rcu_rtc_clock_config(uint32_t rtc_clock_source) -{ - /* reset the RTCSRC bits and set according to rtc_clock_source */ - RCU_BDCTL &= ~RCU_BDCTL_RTCSRC; - RCU_BDCTL |= rtc_clock_source; -} - -#ifdef GD32F170_190 -/*! - \brief configure the SLCD clock source selection - \param[in] slcd_clock_source: SLCD clock source selection - \arg RCU_SLCDSRC_NONE: no clock selected - \arg RCU_SLCDSRC_LXTAL: CK_LXTAL selected as SLCD source clock - \arg RCU_SLCDSRC_IRC40K: CK_IRC40K selected as SLCD source clock - \arg RCU_SLCDSRC_HXTAL_DIV32: CK_HXTAL/32 selected as SLCD source clock - \param[out] none - \retval none -*/ -void rcu_slcd_clock_config(uint32_t slcd_clock_source) -{ - /* reset the bits and set according to rtc_clock_source */ - RCU_BDCTL &= ~RCU_BDCTL_RTCSRC; - RCU_BDCTL |= slcd_clock_source; -} -#endif /* GD32F170_190 */ - -/*! - \brief configure the HXTAL divider used as input of PLL - \param[in] hxtal_prediv: HXTAL divider used as input of PLL - \arg RCU_PLL_HXTAL_DIVx(x=1..16): HXTAL divided x used as input of PLL - \param[out] none - \retval none -*/ -void rcu_hxtal_prediv_config(uint32_t hxtal_prediv) -{ - uint32_t prediv = 0U; - prediv = RCU_CFG1; - /* reset the HXTALPREDV bits and set according to hxtal_prediv */ - prediv &= ~RCU_CFG1_HXTALPREDV; - RCU_CFG1 = (prediv | hxtal_prediv); -} - -/*! - \brief configure the LXTAL drive capability - \param[in] lxtal_dricap: drive capability of LXTAL - \arg RCU_LXTAL_LOWDRI: lower driving capability - \arg RCU_LXTAL_MED_LOWDRI: medium low driving capability - \arg RCU_LXTAL_MED_HIGHDRI: medium high driving capability - \arg RCU_LXTAL_HIGHDRI: higher driving capability - \param[out] none - \retval none -*/ -void rcu_lxtal_drive_capability_config(uint32_t lxtal_dricap) -{ - /* reset the LXTALDRI bits and set according to lxtal_dricap */ - RCU_BDCTL &= ~RCU_BDCTL_LXTALDRI; - RCU_BDCTL |= lxtal_dricap; -} - -/*! - \brief get the clock stabilization and periphral reset flags - \param[in] flag: the clock stabilization and periphral reset flags, refer to rcu_flag_enum - \arg RCU_FLAG_IRC40KSTB: IRC40K stabilization flag - \arg RCU_FLAG_LXTALSTB: LXTAL stabilization flag - \arg RCU_FLAG_IRC8MSTB: IRC8M stabilization flag - \arg RCU_FLAG_HXTALSTB: HXTAL stabilization flag - \arg RCU_FLAG_PLLSTB: PLL stabilization flag - \arg RCU_FLAG_IRC14MSTB: IRC14M stabilization flag, only in GD32F130_150 - \arg RCU_FLAG_IRC28MSTB: IRC28M stabilization flag, only in GD32F170_190 - \arg RCU_FLAG_V12RST: V12 domain Power reset flag - \arg RCU_FLAG_OBLRST: Option byte loader reset flag - \arg RCU_FLAG_EPRST: External PIN reset flag - \arg RCU_FLAG_PORRST: Power reset flag - \arg RCU_FLAG_SWRST: Software reset flag - \arg RCU_FLAG_FWDGTRST: Free watchdog timer reset flag - \arg RCU_FLAG_WWDGTRST: Window watchdog timer reset flag - \arg RCU_FLAG_LPRST: Low-power reset flag - \param[out] none - \retval FlagStatus: SET or RESET -*/ -FlagStatus rcu_flag_get(rcu_flag_enum flag) -{ - if(RESET != (RCU_REG_VAL(flag) & BIT(RCU_BIT_POS(flag)))){ - return SET; - }else{ - return RESET; - } -} - -/*! - \brief clear the reset flag - \param[in] none - \param[out] none - \retval none -*/ -void rcu_all_reset_flag_clear(void) -{ - RCU_RSTSCK |= RCU_RSTSCK_RSTFC; -} - -/*! - \brief get the clock stabilization interrupt and ckm flags - \param[in] int_flag: interrupt and ckm flags, refer to rcu_int_flag_enum - \arg RCU_INT_FLAG_IRC40KSTB: IRC40K stabilization interrupt flag - \arg RCU_INT_FLAG_LXTALSTB: LXTAL stabilization interrupt flag - \arg RCU_INT_FLAG_IRC8MSTB: IRC8M stabilization interrupt flag - \arg RCU_INT_FLAG_HXTALSTB: HXTAL stabilization interrupt flag - \arg RCU_INT_FLAG_PLLSTB: PLL stabilization interrupt flag - \arg RCU_INT_FLAG_IRC14MSTB: IRC14M stabilization interrupt flag, only in GD32F130_150 - \arg RCU_INT_FLAG_IRC28MSTB: IRC28M stabilization interrupt flag, only in GD32F170_190 - \arg RCU_INT_FLAG_CKM: HXTAL clock stuck interrupt flag - \param[out] none - \retval FlagStatus: SET or RESET -*/ -FlagStatus rcu_interrupt_flag_get(rcu_int_flag_enum int_flag) -{ - if(RESET != (RCU_INT & int_flag)){ - return SET; - }else{ - return RESET; - } -} - -/*! - \brief clear the interrupt flags - \param[in] int_flag_clear: clock stabilization and stuck interrupt flags clear, refer to rcu_int_flag_clear_enum - \arg RCU_INT_FLAG_IRC40KSTB_CLR: IRC40K stabilization interrupt flag clear - \arg RCU_INT_FLAG_LXTALSTB_CLR: LXTAL stabilization interrupt flag clear - \arg RCU_INT_FLAG_IRC8MSTB_CLR: IRC8M stabilization interrupt flag clear - \arg RCU_INT_FLAG_HXTALSTB_CLR: HXTAL stabilization interrupt flag clear - \arg RCU_INT_FLAG_PLLSTB_CLR: PLL stabilization interrupt flag clear - \arg RCU_INT_FLAG_IRC14MSTB_CLR: IRC14M stabilization interrupt flag clear, only in GD32F130_150 - \arg RCU_INT_FLAG_IRC28MSTB_CLR: IRC28M stabilization interrupt flag clear, only in GD32F170_190 - \arg RCU_INT_FLAG_CKM_CLR: clock stuck interrupt flag clear - \param[out] none - \retval none -*/ -void rcu_interrupt_flag_clear(rcu_int_flag_clear_enum int_flag_clear) -{ - RCU_INT |= (uint32_t)int_flag_clear; -} - -/*! - \brief enable the stabilization interrupt - \param[in] stab_int: clock stabilization interrupt, refer to rcu_int_enum - \arg RCU_INT_IRC40KSTB: IRC40K stabilization interrupt enable - \arg RCU_INT_LXTALSTB: LXTAL stabilization interrupt enable - \arg RCU_INT_IRC8MSTB: IRC8M stabilization interrupt enable - \arg RCU_INT_HXTALSTB: HXTAL stabilization interrupt enable - \arg RCU_INT_PLLSTB: PLL stabilization interrupt enable - \arg RCU_INT_IRC14MSTB: IRC14M stabilization interrupt enable, only in GD32F130_150 - \arg RCU_INT_IRC28MSTB: IRC28M stabilization interrupt enable, only in GD32F170_190 - \param[out] none - \retval none -*/ -void rcu_interrupt_enable(rcu_int_enum stab_int) -{ - RCU_INT |= (uint32_t)stab_int; -} - - -/*! - \brief disable the stabilization interrupt - \param[in] stab_int: clock stabilization interrupt, refer to rcu_int_enum - \arg RCU_INT_IRC40KSTB: IRC40K stabilization interrupt disable - \arg RCU_INT_LXTALSTB: LXTAL stabilization interrupt disable - \arg RCU_INT_IRC8MSTB: IRC8M stabilization interrupt disable - \arg RCU_INT_HXTALSTB: HXTAL stabilization interrupt disable - \arg RCU_INT_PLLSTB: PLL stabilization interrupt disable - \arg RCU_INT_IRC14MSTB: IRC14M stabilization interrupt disable, only in GD32F130_150 - \arg RCU_INT_IRC28MSTB: IRC28M stabilization interrupt disable, only in GD32F170_190 - \param[out] none - \retval none -*/ -void rcu_interrupt_disable(rcu_int_enum stab_int) -{ - RCU_INT &= ~(uint32_t)stab_int; -} - -/*! - \brief wait until oscillator stabilization flags is SET or oscillator startup is timeout - \param[in] osci: oscillator types, refer to rcu_osci_type_enum - \arg RCU_HXTAL: HXTAL - \arg RCU_LXTAL: LXTAL - \arg RCU_IRC8M: IRC8M - \arg RCU_IRC14M: IRC14M, only in GD32F130_150 - \arg RCU_IRC28M: IRC28M, only in GD32F170_190 - \arg RCU_IRC40K: IRC40K - \arg RCU_PLL_CK: PLL - \param[out] none - \retval ErrStatus: SUCCESS or ERROR -*/ -ErrStatus rcu_osci_stab_wait(rcu_osci_type_enum osci) -{ - uint32_t stb_cnt = 0U; - ErrStatus reval = ERROR; - FlagStatus osci_stat = RESET; - - switch(osci){ - /* wait HXTAL stable */ - case RCU_HXTAL: - while((RESET == osci_stat) && (HXTAL_STARTUP_TIMEOUT != stb_cnt)){ - osci_stat = rcu_flag_get(RCU_FLAG_HXTALSTB); - stb_cnt++; - } - - /* check whether flag is set or not */ - if(RESET != rcu_flag_get(RCU_FLAG_HXTALSTB)){ - reval = SUCCESS; - } - break; - /* wait LXTAL stable */ - case RCU_LXTAL: - while((RESET == osci_stat) && (LXTAL_STARTUP_TIMEOUT != stb_cnt)){ - osci_stat = rcu_flag_get(RCU_FLAG_LXTALSTB); - stb_cnt++; - } - - /* check whether flag is set or not */ - if(RESET != rcu_flag_get(RCU_FLAG_LXTALSTB)){ - reval = SUCCESS; - } - break; - /* wait IRC8M stable */ - case RCU_IRC8M: - while((RESET == osci_stat) && (IRC8M_STARTUP_TIMEOUT != stb_cnt)){ - osci_stat = rcu_flag_get(RCU_FLAG_IRC8MSTB); - stb_cnt++; - } - - /* check whether flag is set or not */ - if(RESET != rcu_flag_get(RCU_FLAG_IRC8MSTB)){ - reval = SUCCESS; - } - break; -#ifdef GD32F130_150 - /* wait IRC14M stable */ - case RCU_IRC14M: - while((RESET == osci_stat) && (OSC_STARTUP_TIMEOUT != stb_cnt)){ - osci_stat = rcu_flag_get(RCU_FLAG_IRC14MSTB); - stb_cnt++; - } - - /* check whether flag is set or not */ - if(RESET != rcu_flag_get(RCU_FLAG_IRC14MSTB)){ - reval = SUCCESS; - } - break; -#elif defined (GD32F170_190) - /* wait IRC28M stable */ - case RCU_IRC28M: - while((RESET == osci_stat) && (OSC_STARTUP_TIMEOUT != stb_cnt)){ - osci_stat = rcu_flag_get(RCU_FLAG_IRC28MSTB); - stb_cnt++; - } - - /* check whether flag is set or not */ - if(RESET != rcu_flag_get(RCU_FLAG_IRC28MSTB)){ - reval = SUCCESS; - } - break; -#endif /* GD32F130_150 */ - /* wait IRC40K stable */ - case RCU_IRC40K: - while((RESET == osci_stat) && (OSC_STARTUP_TIMEOUT != stb_cnt)){ - osci_stat = rcu_flag_get(RCU_FLAG_IRC40KSTB); - stb_cnt++; - } - - /* check whether flag is set or not */ - if(RESET != rcu_flag_get(RCU_FLAG_IRC40KSTB)){ - reval = SUCCESS; - } - break; - /* wait PLL stable */ - case RCU_PLL_CK: - while((RESET == osci_stat) && (OSC_STARTUP_TIMEOUT != stb_cnt)){ - osci_stat = rcu_flag_get(RCU_FLAG_PLLSTB); - stb_cnt++; - } - - /* check whether flag is set or not */ - if(RESET != rcu_flag_get(RCU_FLAG_PLLSTB)){ - reval = SUCCESS; - } - break; - default: - break; - } - - /* return value */ - return reval; -} - -/*! - \brief turn on the oscillator - \param[in] osci: oscillator types, refer to rcu_osci_type_enum - \arg RCU_HXTAL: HXTAL - \arg RCU_LXTAL: LXTAL - \arg RCU_IRC8M: IRC8M - \arg RCU_IRC14M: IRC14M, only in GD32F130_150 - \arg RCU_IRC28M: IRC28M, only in GD32F170_190 - \arg RCU_IRC40K: IRC40K - \arg RCU_PLL_CK: PLL - \param[out] none - \retval none -*/ -void rcu_osci_on(rcu_osci_type_enum osci) -{ - RCU_REG_VAL(osci) |= BIT(RCU_BIT_POS(osci)); -} - -/*! - \brief turn off the oscillator - \param[in] osci: oscillator types, refer to rcu_osci_type_enum - \arg RCU_HXTAL: HXTAL - \arg RCU_LXTAL: LXTAL - \arg RCU_IRC8M: IRC8M - \arg RCU_IRC14M: IRC14M, only in GD32F130_150 - \arg RCU_IRC28M: IRC28M, only in GD32F170_190 - \arg RCU_IRC40K: IRC40K - \arg RCU_PLL_CK: PLL - \param[out] none - \retval none -*/ -void rcu_osci_off(rcu_osci_type_enum osci) -{ - RCU_REG_VAL(osci) &= ~BIT(RCU_BIT_POS(osci)); -} - -/*! - \brief enable the oscillator bypass mode, HXTALEN or LXTALEN must be reset before it - \param[in] osci: oscillator types, refer to rcu_osci_type_enum - \arg RCU_HXTAL: HXTAL - \arg RCU_LXTAL: LXTAL - \param[out] none - \retval none -*/ -void rcu_osci_bypass_mode_enable(rcu_osci_type_enum osci) -{ - uint32_t reg; - switch(osci){ - case RCU_HXTAL: - /* HXTALEN must be reset before enable the oscillator bypass mode */ - reg = RCU_CTL0; - RCU_CTL0 &= ~RCU_CTL0_HXTALEN; - RCU_CTL0 = (reg | RCU_CTL0_HXTALBPS); - break; - case RCU_LXTAL: - /* LXTALEN must be reset before enable the oscillator bypass mode */ - reg = RCU_BDCTL; - RCU_BDCTL &= ~RCU_BDCTL_LXTALEN; - RCU_BDCTL = (reg | RCU_BDCTL_LXTALBPS); - break; - case RCU_IRC8M: -#ifdef GD32F130_150 - case RCU_IRC14M: -#elif defined (GD32F170_190) - case RCU_IRC28M: -#endif /* GD32F130_150 */ - case RCU_IRC40K: - case RCU_PLL_CK: - break; - default: - break; - } -} - -/*! - \brief disable the oscillator bypass mode, HXTALEN or LXTALEN must be reset before it - \param[in] osci: oscillator types, refer to rcu_osci_type_enum - \arg RCU_HXTAL: HXTAL - \arg RCU_LXTAL: LXTAL - \param[out] none - \retval none -*/ -void rcu_osci_bypass_mode_disable(rcu_osci_type_enum osci) -{ - uint32_t reg; - switch(osci){ - case RCU_HXTAL: - /* HXTALEN must be reset before disable the oscillator bypass mode */ - reg = RCU_CTL0; - RCU_CTL0 &= ~RCU_CTL0_HXTALEN; - RCU_CTL0 = (reg & (~RCU_CTL0_HXTALBPS)); - break; - case RCU_LXTAL: - /* LXTALEN must be reset before disable the oscillator bypass mode */ - reg = RCU_BDCTL; - RCU_BDCTL &= ~RCU_BDCTL_LXTALEN; - RCU_BDCTL =(reg & (~RCU_BDCTL_LXTALBPS)); - break; - case RCU_IRC8M: -#ifdef GD32F130_150 - case RCU_IRC14M: -#elif defined (GD32F170_190) - case RCU_IRC28M: -#endif /* GD32F130_150 */ - case RCU_IRC40K: - case RCU_PLL_CK: - break; - default: - break; - } -} - -/*! - \brief enable the HXTAL clock monitor - \param[in] none - \param[out] none - \retval none -*/ - -void rcu_hxtal_clock_monitor_enable(void) -{ - RCU_CTL0 |= RCU_CTL0_CKMEN; -} - -/*! - \brief disable the HXTAL clock monitor - \param[in] none - \param[out] none - \retval none -*/ -void rcu_hxtal_clock_monitor_disable(void) -{ - RCU_CTL0 &= ~RCU_CTL0_CKMEN; -} - -/*! - \brief set the IRC8M adjust value - \param[in] irc8m_adjval: IRC8M adjust value, must be between 0 and 0x1F - \param[out] none - \retval none -*/ -void rcu_irc8m_adjust_value_set(uint8_t irc8m_adjval) -{ - uint32_t adjust = 0U; - adjust = RCU_CTL0; - /* reset the IRC8MADJ bits and set according to irc8m_adjval */ - adjust &= ~RCU_CTL0_IRC8MADJ; - RCU_CTL0 = (adjust | ((uint32_t)(irc8m_adjval)<<3)); -} - -#ifdef GD32F130_150 -/*! - \brief set the IRC14M adjust value - \param[in] irc14m_adjval: IRC14M adjust value, must be between 0 and 0x1F - \param[out] none - \retval none -*/ -void rcu_irc14m_adjust_value_set(uint8_t irc14m_adjval) -{ - uint32_t adjust = 0U; - adjust = RCU_CTL1; - /* reset the IRC14MADJ bits and set according to irc14m_adjval */ - adjust &= ~RCU_CTL1_IRC14MADJ; - RCU_CTL1 = (adjust | ((uint32_t)(irc14m_adjval)<<3)); -} -#elif defined (GD32F170_190) -/*! - \brief set the IRC28M adjust value - \param[in] irc28m_adjval: IRC28M adjust value, must be between 0 and 0x1F - \param[out] none - \retval none -*/ -void rcu_irc28m_adjust_value_set(uint8_t irc28m_adjval) -{ - uint32_t adjust = 0U; - adjust = RCU_CTL1; - /* reset the IRC28MADJ bits and set according to irc28m_adjval */ - adjust &= ~RCU_CTL1_IRC28MADJ; - RCU_CTL1 = (adjust | ((uint32_t)(irc28m_adjval)<<3)); -} -#endif /* GD32F130_150 */ - -/*! - \brief unlock the voltage key - \param[in] none - \param[out] none - \retval none -*/ -void rcu_voltage_key_unlock(void) -{ - /* reset the KEY bits and set 0x1A2B3C4D */ - RCU_VKEY &= ~RCU_VKEY_KEY; - RCU_VKEY |= RCU_VKEY_UNLOCK; -} - -/*! - \brief set voltage in deep sleep mode - \param[in] dsvol: deep sleep mode voltage - \arg RCU_DEEPSLEEP_V_1_2: the core voltage is 1.2V, only in GD32F130_150 - \arg RCU_DEEPSLEEP_V_1_1: the core voltage is 1.1V, only in GD32F130_150 - \arg RCU_DEEPSLEEP_V_1_0: the core voltage is 1.0V, only in GD32F130_150 - \arg RCU_DEEPSLEEP_V_0_9: the core voltage is 0.9V, only in GD32F130_150 - - \arg RCU_DEEPSLEEP_V_1_8: the core voltage is 1.8V, only in GD32F170_190 - \arg RCU_DEEPSLEEP_V_1_6: the core voltage is 1.6V, only in GD32F170_190 - \arg RCU_DEEPSLEEP_V_1_4: the core voltage is 1.4V, only in GD32F170_190 - \arg RCU_DEEPSLEEP_V_1_2: the core voltage is 1.2V, only in GD32F170_190 - \param[out] none - \retval none -*/ -void rcu_deepsleep_voltage_set(uint32_t dsvol) -{ - /* reset the DSLPVS bits and set according to dsvol */ - RCU_DSV &= ~RCU_DSV_DSLPVS; - RCU_DSV |= dsvol; -} - -#ifdef GD32F130_150 -/*! - \brief set the power down voltage - \param[in] pdvol: power down voltage select - \arg RCU_PDR_V_2_6: power down voltage is 2.6V - \arg RCU_PDR_V_1_8: power down voltage is 1.8V - \param[out] none - \retval none -*/ -void rcu_power_down_voltage_set(uint32_t pdvol) -{ - /* reset the PDRVS bits and set according to pdvol */ - RCU_PDVSEL &= ~RCU_PDVSEL_PDRVS; - RCU_PDVSEL |= pdvol; -} -#endif /* GD32F130_150 */ - -/*! - \brief get the system clock, bus and peripheral clock frequency - \param[in] clock: the clock frequency which to get - \arg CK_SYS: system clock frequency - \arg CK_AHB: AHB clock frequency - \arg CK_APB1: APB1 clock frequency - \arg CK_APB2: APB2 clock frequency - \arg CK_ADC: ADC clock frequency - \arg CK_CEC: CEC clock frequency - \arg CK_USART: USART clock frequency - \param[out] none - \retval clock frequency of system, AHB, APB1, APB2, ADC, CEC or USRAT -*/ -uint32_t rcu_clock_freq_get(rcu_clock_freq_enum clock) -{ - uint32_t sws = 0U, adcps = 0U, ck_freq = 0U; - uint32_t cksys_freq = 0U, ahb_freq = 0U, apb1_freq = 0U, apb2_freq = 0U; - uint32_t adc_freq = 0U, cec_freq = 0U, usart_freq = 0U; - uint32_t pllmf = 0U, pllmf4 = 0U, pllsel = 0U, prediv = 0U, idx = 0U, clk_exp = 0U; - /* exponent of AHB, APB1 and APB2 clock divider */ - const uint8_t ahb_exp[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9}; - const uint8_t apb1_exp[8] = {0, 0, 0, 0, 1, 2, 3, 4}; - const uint8_t apb2_exp[8] = {0, 0, 0, 0, 1, 2, 3, 4}; - - sws = GET_BITS(RCU_CFG0, 2, 3); - switch(sws){ - /* IRC8M is selected as CK_SYS */ - case SEL_IRC8M: - cksys_freq = IRC8M_VALUE; - break; - /* HXTAL is selected as CK_SYS */ - case SEL_HXTAL: - cksys_freq = HXTAL_VALUE; - break; - /* PLL is selected as CK_SYS */ - case SEL_PLL: - /* get the value of PLLMF[3:0] */ - pllmf = GET_BITS(RCU_CFG0, 18, 21); - pllmf4 = GET_BITS(RCU_CFG0, 27, 27); - /* high 16 bits */ - if(1U == pllmf4){ - pllmf += 17U; - }else{ - pllmf += 2U; - } - /* PLL clock source selection, HXTAL or IRC8M/2 */ - pllsel = GET_BITS(RCU_CFG0, 16, 16); - if(0U != pllsel){ - prediv = (GET_BITS(RCU_CFG1,0, 3) + 1U); - cksys_freq = (HXTAL_VALUE / prediv) * pllmf; - }else{ - cksys_freq = (IRC8M_VALUE >> 1) * pllmf; - } - break; - /* IRC8M is selected as CK_SYS */ - default: - cksys_freq = IRC8M_VALUE; - break; - } - /* calculate AHB clock frequency */ - idx = GET_BITS(RCU_CFG0, 4, 7); - clk_exp = ahb_exp[idx]; - ahb_freq = cksys_freq >> clk_exp; - - /* calculate APB1 clock frequency */ - idx = GET_BITS(RCU_CFG0, 8, 10); - clk_exp = apb1_exp[idx]; - apb1_freq = ahb_freq >> clk_exp; - - /* calculate APB2 clock frequency */ - idx = GET_BITS(RCU_CFG0, 11, 13); - clk_exp = apb2_exp[idx]; - apb2_freq = ahb_freq >> clk_exp; - - /* return the clocks frequency */ - switch(clock){ - case CK_SYS: - ck_freq = cksys_freq; - break; - case CK_AHB: - ck_freq = ahb_freq; - break; - case CK_APB1: - ck_freq = apb1_freq; - break; - case CK_APB2: - ck_freq = apb2_freq; - break; - case CK_ADC: - /* calculate ADC clock frequency */ - if(RCU_ADCSRC_APB2DIV != (RCU_CFG2 & RCU_CFG2_ADCSEL)){ -#ifdef GD32F130_150 - adc_freq = IRC14M_VALUE; -#elif defined (GD32F170_190) - if(RCU_ADC_IRC28M_DIV1 != (RCU_CFG2 & RCU_CFG2_IRC28MDIV)){ - adc_freq = IRC28M_VALUE >> 1; - }else{ - adc_freq = IRC28M_VALUE; - } -#endif /* GD32F130_150 */ - }else{ - /* ADC clock select CK_APB2 divided by 2/4/6/8 */ - adcps = GET_BITS(RCU_CFG0, 14, 15); - switch(adcps){ - case 0: - adc_freq = apb2_freq / 2U; - break; - case 1: - adc_freq = apb2_freq / 4U; - break; - case 2: - adc_freq = apb2_freq / 6U; - break; - case 3: - adc_freq = apb2_freq / 8U; - break; - default: - break; - } - } - ck_freq = adc_freq; - break; - case CK_CEC: - /* calculate CEC clock frequency */ - if(RCU_CECSRC_LXTAL != (RCU_CFG2 & RCU_CFG2_CECSEL)){ - cec_freq = IRC8M_VALUE / 244U; - }else{ - cec_freq = LXTAL_VALUE; - } - ck_freq = cec_freq; - break; - case CK_USART: - /* calculate USART clock frequency */ - if(RCU_USART0SRC_CKAPB2 == (RCU_CFG2 & RCU_CFG2_USART0SEL)){ - usart_freq = apb2_freq; - }else if(RCU_USART0SRC_CKSYS == (RCU_CFG2 & RCU_CFG2_USART0SEL)){ - usart_freq = cksys_freq; - }else if(RCU_USART0SRC_LXTAL == (RCU_CFG2 & RCU_CFG2_USART0SEL)){ - usart_freq = LXTAL_VALUE; - }else if(RCU_USART0SRC_IRC8M == (RCU_CFG2 & RCU_CFG2_USART0SEL)){ - usart_freq = IRC8M_VALUE; - }else{ - } - ck_freq = usart_freq; - break; - default: - break; - } - return ck_freq; -} +/*! + \file gd32f1x0_rcu.c + \brief RCU driver +*/ + +/* + Copyright (C) 2017 GigaDevice + + 2014-12-26, V1.0.0, platform GD32F1x0(x=3,5) + 2016-01-15, V2.0.0, platform GD32F1x0(x=3,5,7,9) + 2016-04-30, V3.0.0, firmware update for GD32F1x0(x=3,5,7,9) + 2017-06-19, V3.1.0, firmware update for GD32F1x0(x=3,5,7,9) +*/ + +#include "gd32f1x0_rcu.h" + +#define SEL_IRC8M 0x00U +#define SEL_HXTAL 0x01U +#define SEL_PLL 0x02U + +/* define startup timeout count */ +#define OSC_STARTUP_TIMEOUT ((uint32_t)0xFFFFFU) +#define LXTAL_STARTUP_TIMEOUT ((uint32_t)0x3FFFFFFU) + +/*! + \brief deinitialize the RCU + \param[in] none + \param[out] none + \retval none +*/ +void rcu_deinit(void) +{ + /* enable IRC8M */ + RCU_CTL0 |= RCU_CTL0_IRC8MEN; + while(0U == (RCU_CTL0 & RCU_CTL0_IRC8MSTB)){ + } + /* reset RCU */ +#ifdef GD32F130_150 + RCU_CFG0 &= ~(RCU_CFG0_SCS | RCU_CFG0_AHBPSC | RCU_CFG0_APB1PSC | RCU_CFG0_APB2PSC |\ + RCU_CFG0_ADCPSC | RCU_CFG0_CKOUTSEL | RCU_CFG0_CKOUTDIV | RCU_CFG0_PLLDV); +#elif defined (GD32F170_190) + RCU_CFG0 &= ~(RCU_CFG0_SCS | RCU_CFG0_AHBPSC | RCU_CFG0_APB1PSC | RCU_CFG0_APB2PSC |\ + RCU_CFG0_ADCPSC | RCU_CFG0_CKOUT0SEL | RCU_CFG0_CKOUT0DIV | RCU_CFG0_PLLDV); +#endif /* GD32F130_150 */ + RCU_CFG0 &= ~(RCU_CFG0_PLLSEL | RCU_CFG0_PLLMF | RCU_CFG0_PLLDV); +#ifdef GD32F130_150 + RCU_CFG0 &= ~(RCU_CFG0_USBDPSC); +#endif /* GD32F130_150 */ + RCU_CTL0 &= ~(RCU_CTL0_HXTALEN | RCU_CTL0_CKMEN | RCU_CTL0_PLLEN | RCU_CTL0_HXTALBPS); + RCU_CFG1 &= ~RCU_CFG1_HXTALPREDV; + RCU_CFG2 &= ~(RCU_CFG2_USART0SEL | RCU_CFG2_CECSEL | RCU_CFG2_ADCSEL); +#ifdef GD32F130_150 + RCU_CTL1 &= ~RCU_CTL1_IRC14MEN; +#elif defined (GD32F170_190) + RCU_CFG2 &= ~RCU_CFG2_IRC28MDIV; + RCU_CTL1 &= ~RCU_CTL1_IRC28MEN; + RCU_CFG3 &= ~RCU_CFG3_CKOUT1SRC; + RCU_CFG3 &= ~RCU_CFG3_CKOUT1DIV; +#endif /* GD32F130_150 */ + RCU_INT = 0x00000000U; +} + +/*! + \brief enable the peripherals clock + \param[in] periph: RCU peripherals, refer to rcu_periph_enum + \arg RCU_GPIOx (x=A,B,C,D,F): GPIO ports clock + \arg RCU_DMA: DMA clock + \arg RCU_CRC: CRC clock + \arg RCU_TSI: TSI clock + \arg RCU_CFGCMP: CFGCMP clock + \arg RCU_ADC: ADC clock + \arg RCU_TIMERx (x=0,1,2,5,13,14,15,16): TIMER clock + \arg RCU_SPIx (x=0,1,2): SPI clock + \arg RCU_USARTx (x=0,1): USART clock + \arg RCU_SLCD: SLCD clock, only in GD32F170_190 + \arg RCU_WWDGT: WWDGT clock + \arg RCU_I2Cx (x=0,1,2): I2C clock + \arg RCU_USBD: USBD clock, only in GD32F130_150 + \arg RCU_CANx (x=0,1): CAN clock, only in GD32F170_190 + \arg RCU_PMU: PMU clock + \arg RCU_DAC: DAC clock + \arg RCU_CEC: CEC clock + \arg RCU_OPAIVREF: OPAIVREF clock, only in GD32F170_190 + \arg RCU_RTC: RTC clock + \param[out] none + \retval none +*/ +void rcu_periph_clock_enable(rcu_periph_enum periph) +{ + RCU_REG_VAL(periph) |= BIT(RCU_BIT_POS(periph)); +} + +/*! + \brief disable the peripherals clock + \param[in] periph: RCU peripherals, refer to rcu_periph_enum + \arg RCU_GPIOx (x=A,B,C,D,F): GPIO ports clock + \arg RCU_DMA: DMA clock + \arg RCU_CRC: CRC clock + \arg RCU_TSI: TSI clock + \arg RCU_CFGCMP: CFGCMP clock + \arg RCU_ADC: ADC clock + \arg RCU_TIMERx (x=0,1,2,5,13,14,15,16): TIMER clock + \arg RCU_SPIx (x=0,1,2): SPI clock + \arg RCU_USARTx (x=0,1): USART clock + \arg RCU_SLCD: SLCD clock, only in GD32F170_190 + \arg RCU_WWDGT: WWDGT clock + \arg RCU_I2Cx (x=0,1,2): I2C clock + \arg RCU_USBD: USBD clock only in GD32F130_150 + \arg RCU_CANx (x=0,1): CAN clock, only in GD32F170_190 + \arg RCU_PMU: PMU clock + \arg RCU_DAC: DAC clock + \arg RCU_CEC: CEC clock + \arg RCU_OPAIVREF: OPAIVREF clock, only in GD32F170_190 + \arg RCU_RTC: RTC clock + \param[out] none + \retval none +*/ +void rcu_periph_clock_disable(rcu_periph_enum periph) +{ + RCU_REG_VAL(periph) &= ~BIT(RCU_BIT_POS(periph)); +} + +/*! + \brief enable the peripherals clock when sleep mode + \param[in] periph: RCU peripherals, refer to rcu_periph_sleep_enum + only one parameter can be selected which is shown as below: + \arg RCU_FMC_SLP: FMC clock + \arg RCU_SRAM_SLP: SRAM clock + \param[out] none + \retval none +*/ +void rcu_periph_clock_sleep_enable(rcu_periph_sleep_enum periph) +{ + RCU_REG_VAL(periph) |= BIT(RCU_BIT_POS(periph)); +} + +/*! + \brief disable the peripherals clock when sleep mode + \param[in] periph: RCU peripherals, refer to rcu_periph_sleep_enum + only one parameter can be selected which is shown as below: + \arg RCU_FMC_SLP: FMC clock + \arg RCU_SRAM_SLP: SRAM clock + \param[out] none + \retval none +*/ +void rcu_periph_clock_sleep_disable(rcu_periph_sleep_enum periph) +{ + RCU_REG_VAL(periph) &= ~BIT(RCU_BIT_POS(periph)); +} + +/*! + \brief reset the peripherals + \param[in] periph_reset: RCU peripherals reset, refer to rcu_periph_reset_enum + \arg RCU_GPIOxRST (x=A,B,C,D,F): reset GPIO ports + \arg RCU_TSIRST: reset TSI + \arg RCU_CFGCMPRST: reset CFGCMP + \arg RCU_ADCRST: reset ADC + \arg RCU_TIMERxRST (x=0,1,2,5,13,14,15,16): reset TIMER + \arg RCU_SPIxRST (x=0,1,2): reset SPI + \arg RCU_USARTxRST (x=0,1): reset USART + \arg RCU_SLCDRST: reset SLCD, only in GD32F170_190 + \arg RCU_WWDGTRST: reset WWDGT + \arg RCU_I2CxRST (x=0,1,2): reset I2C + \arg RCU_USBDRST: reset USBD, only in GD32F130_150 + \arg RCU_CANxRST (x=0,1): reset CAN, only in GD32F170_190 + \arg RCU_PMURST: reset PMU + \arg RCU_DACRST: reset DAC + \arg RCU_CECRST: reset CEC + \arg RCU_OPAIVREFRST: reset OPAIVREF, only in GD32F170_190 + \param[out] none + \retval none +*/ +void rcu_periph_reset_enable(rcu_periph_reset_enum periph_reset) +{ + RCU_REG_VAL(periph_reset) |= BIT(RCU_BIT_POS(periph_reset)); +} + +/*! + \brief disable reset the peripheral + \param[in] periph_reset: RCU peripherals reset, refer to rcu_periph_reset_enum + \arg RCU_GPIOxRST (x=A,B,C,D,F): reset GPIO ports + \arg RCU_TSIRST: reset TSI + \arg RCU_CFGCMPRST: reset CFGCMP + \arg RCU_ADCRST: reset ADC + \arg RCU_TIMERxRST (x=0,1,2,5,13,14,15,16): reset TIMER + \arg RCU_SPIxRST (x=0,1,2): reset SPI + \arg RCU_USARTxRST (x=0,1): reset USART + \arg RCU_SLCDRST: reset SLCD, only in GD32F170_190 + \arg RCU_WWDGTRST: reset WWDGT + \arg RCU_I2CxRST (x=0,1,2): reset I2C + \arg RCU_USBDRST: reset USBD, only in GD32F130_150 + \arg RCU_CANxRST (x=0,1): reset CAN, only in GD32F170_190 + \arg RCU_PMURST: reset PMU + \arg RCU_DACRST: reset DAC + \arg RCU_CECRST: reset CEC + \arg RCU_OPAIVREFRST: reset OPAIVREF, only in GD32F170_190 + \param[out] none + \retval none +*/ +void rcu_periph_reset_disable(rcu_periph_reset_enum periph_reset) +{ + RCU_REG_VAL(periph_reset) &= ~BIT(RCU_BIT_POS(periph_reset)); +} + +/*! + \brief reset the BKP domain + \param[in] none + \param[out] none + \retval none +*/ +void rcu_bkp_reset_enable(void) +{ + RCU_BDCTL |= RCU_BDCTL_BKPRST; +} + +/*! + \brief disable the BKP domain reset + \param[in] none + \param[out] none + \retval none +*/ +void rcu_bkp_reset_disable(void) +{ + RCU_BDCTL &= ~RCU_BDCTL_BKPRST; +} + +/*! + \brief configure the system clock source + \param[in] ck_sys: system clock source select + \arg RCU_CKSYSSRC_IRC8M: select CK_IRC8M as the CK_SYS source + \arg RCU_CKSYSSRC_HXTAL: select CK_HXTAL as the CK_SYS source + \arg RCU_CKSYSSRC_PLL: select CK_PLL as the CK_SYS source + \param[out] none + \retval none +*/ +void rcu_system_clock_source_config(uint32_t ck_sys) +{ + uint32_t cksys_source = 0U; + cksys_source = RCU_CFG0; + /* reset the SCS bits and set according to ck_sys */ + cksys_source &= ~RCU_CFG0_SCS; + RCU_CFG0 = (ck_sys | cksys_source); +} + +/*! + \brief get the system clock source + \param[in] none + \param[out] none + \retval which clock is selected as CK_SYS source + \arg RCU_SCSS_IRC8M: select CK_IRC8M as the CK_SYS source + \arg RCU_SCSS_HXTAL: select CK_HXTAL as the CK_SYS source + \arg RCU_SCSS_PLL: select CK_PLL as the CK_SYS source +*/ +uint32_t rcu_system_clock_source_get(void) +{ + return (RCU_CFG0 & 0x0000000CU); +} + +/*! + \brief configure the AHB clock prescaler selection + \param[in] ck_ahb: AHB clock prescaler selection + \arg RCU_AHB_CKSYS_DIVx, x=1, 2, 4, 8, 16, 64, 128, 256, 512 + \param[out] none + \retval none +*/ +void rcu_ahb_clock_config(uint32_t ck_ahb) +{ + uint32_t ahbpsc = 0U; + ahbpsc = RCU_CFG0; + /* reset the AHBPSC bits and set according to ck_ahb */ + ahbpsc &= ~RCU_CFG0_AHBPSC; + RCU_CFG0 = (ck_ahb | ahbpsc); +} + +/*! + \brief configure the APB1 clock prescaler selection + \param[in] ck_apb1: APB1 clock prescaler selection + \arg RCU_APB1_CKAHB_DIV1: select CK_AHB as CK_APB1 + \arg RCU_APB1_CKAHB_DIV2: select CK_AHB/2 as CK_APB1 + \arg RCU_APB1_CKAHB_DIV4: select CK_AHB/4 as CK_APB1 + \arg RCU_APB1_CKAHB_DIV8: select CK_AHB/8 as CK_APB1 + \arg RCU_APB1_CKAHB_DIV16: select CK_AHB/16 as CK_APB1 + \param[out] none + \retval none +*/ +void rcu_apb1_clock_config(uint32_t ck_apb1) +{ + uint32_t apb1psc = 0U; + apb1psc = RCU_CFG0; + /* reset the APB1PSC and set according to ck_apb1 */ + apb1psc &= ~RCU_CFG0_APB1PSC; + RCU_CFG0 = (ck_apb1 | apb1psc); +} + +/*! + \brief configure the APB2 clock prescaler selection + \param[in] ck_apb2: APB2 clock prescaler selection + \arg RCU_APB2_CKAHB_DIV1: select CK_AHB as CK_APB2 + \arg RCU_APB2_CKAHB_DIV2: select CK_AHB/2 as CK_APB2 + \arg RCU_APB2_CKAHB_DIV4: select CK_AHB/4 as CK_APB2 + \arg RCU_APB2_CKAHB_DIV8: select CK_AHB/8 as CK_APB2 + \arg RCU_APB2_CKAHB_DIV16: select CK_AHB/16 as CK_APB2 + \param[out] none + \retval none +*/ +void rcu_apb2_clock_config(uint32_t ck_apb2) +{ + uint32_t apb2psc = 0U; + apb2psc = RCU_CFG0; + /* reset the APB2PSC and set according to ck_apb2 */ + apb2psc &= ~RCU_CFG0_APB2PSC; + RCU_CFG0 = (ck_apb2 | apb2psc); +} + +/*! + \brief configure the ADC clock prescaler selection + \param[in] ck_adc: ADC clock prescaler selection, refer to rcu_adc_clock_enum + \arg RCU_ADCCK_IRC14M: select CK_IRC14M as CK_ADC, only in GD32F130_150 + \arg RCU_ADCCK_IRC28M_DIV2: select CK_IRC28M/2 as CK_ADC, only in GD32F170_190 + \arg RCU_ADCCK_IRC28M: select CK_IRC28M as CK_ADC, only in GD32F170_190 + \arg RCU_ADCCK_APB2_DIV2: select CK_APB2/2 as CK_ADC + \arg RCU_ADCCK_APB2_DIV4: select CK_APB2/4 as CK_ADC + \arg RCU_ADCCK_APB2_DIV6: select CK_APB2/6 as CK_ADC + \arg RCU_ADCCK_APB2_DIV8: select CK_APB2/8 as CK_ADC + \param[out] none + \retval none +*/ +void rcu_adc_clock_config(rcu_adc_clock_enum ck_adc) +{ + /* reset the ADCPSC, ADCSEL, IRC28MDIV bits */ + RCU_CFG0 &= ~RCU_CFG0_ADCPSC; +#ifdef GD32F130_150 + RCU_CFG2 &= ~RCU_CFG2_ADCSEL; +#elif defined (GD32F170_190) + RCU_CFG2 &= ~(RCU_CFG2_ADCSEL | RCU_CFG2_IRC28MDIV); +#endif /* GD32F130_150 */ + /* set the ADC clock according to ck_adc */ + switch(ck_adc){ +#ifdef GD32F130_150 + case RCU_ADCCK_IRC14M: + RCU_CFG2 &= ~RCU_CFG2_ADCSEL; + break; +#elif defined (GD32F170_190) + case RCU_ADCCK_IRC28M_DIV2: + RCU_CFG2 &= ~RCU_CFG2_IRC28MDIV; + RCU_CFG2 &= ~RCU_CFG2_ADCSEL; + break; + case RCU_ADCCK_IRC28M: + RCU_CFG2 |= RCU_CFG2_IRC28MDIV; + RCU_CFG2 &= ~RCU_CFG2_ADCSEL; + break; +#endif /* GD32F130_150 */ + case RCU_ADCCK_APB2_DIV2: + RCU_CFG0 |= RCU_ADC_CKAPB2_DIV2; + RCU_CFG2 |= RCU_CFG2_ADCSEL; + break; + case RCU_ADCCK_APB2_DIV4: + RCU_CFG0 |= RCU_ADC_CKAPB2_DIV4; + RCU_CFG2 |= RCU_CFG2_ADCSEL; + break; + case RCU_ADCCK_APB2_DIV6: + RCU_CFG0 |= RCU_ADC_CKAPB2_DIV6; + RCU_CFG2 |= RCU_CFG2_ADCSEL; + break; + case RCU_ADCCK_APB2_DIV8: + RCU_CFG0 |= RCU_ADC_CKAPB2_DIV8; + RCU_CFG2 |= RCU_CFG2_ADCSEL; + break; + default: + break; + } +} + +#ifdef GD32F130_150 +/*! + \brief configure the USBD clock prescaler selection + \param[in] ck_usbd: USBD clock prescaler selection + \arg RCU_USBD_CKPLL_DIV1_5: select CK_PLL/1.5 as CK_USBD + \arg RCU_USBD_CKPLL_DIV1: select CK_PLL as CK_USBD + \arg RCU_USBD_CKPLL_DIV2_5: select CK_PLL/2.5 as CK_USBD + \arg RCU_USBD_CKPLL_DIV2: select CK_PLL/2 as CK_USBD + \param[out] none + \retval none +*/ +void rcu_usbd_clock_config(uint32_t ck_usbd) +{ + /* reset the USBDPSC bits and set according to ck_usbd */ + RCU_CFG0 &= ~RCU_CFG0_USBDPSC; + RCU_CFG0 |= ck_usbd; +} + +/*! + \brief configure the CK_OUT clock source and divider + \param[in] ckout_src: CK_OUT clock source selection + \arg RCU_CKOUTSRC_NONE: no clock selected + \arg RCU_CKOUTSRC_IRC14M: IRC14M selected + \arg RCU_CKOUTSRC_IRC40K: IRC40K selected + \arg RCU_CKOUTSRC_LXTAL: LXTAL selected + \arg RCU_CKOUTSRC_CKSYS: CKSYS selected + \arg RCU_CKOUTSRC_IRC8M: IRC8M selected + \arg RCU_CKOUTSRC_HXTAL: HXTAL selected + \arg RCU_CKOUTSRC_CKPLL_DIV1: CK_PLL selected + \arg RCU_CKOUTSRC_CKPLL_DIV2: CK_PLL/2 selected + \param[in] ckout_div: CK_OUT divider + \arg RCU_CKOUT_DIVx(x=1,2,4,8,16,32,64,128): CK_OUT is divided by x + \param[out] none + \retval none +*/ +void rcu_ckout_config(uint32_t ckout_src, uint32_t ckout_div) +{ + uint32_t ckout = 0U; + ckout = RCU_CFG0; + /* reset the CKOUTSEL, CKOUTDIV and PLLDV bits and set according to ckout_src and ckout_div */ + ckout &= ~(RCU_CFG0_CKOUTSEL | RCU_CFG0_CKOUTDIV | RCU_CFG0_PLLDV); + RCU_CFG0 = (ckout | ckout_src | ckout_div); +} +#elif defined (GD32F170_190) +/*! + \brief configure the CK_OUT0 clock source and divider + \param[in] ckout0_src: CK_OUT0 clock source selection + \arg RCU_CKOUT0SRC_NONE: no clock selected + \arg RCU_CKOUT0SRC_IRC28M: IRC28M selected + \arg RCU_CKOUT0SRC_IRC40K: IRC40K selected + \arg RCU_CKOUT0SRC_LXTAL: LXTAL selected + \arg RCU_CKOUT0SRC_CKSYS: CKSYS selected + \arg RCU_CKOUT0SRC_IRC8M: IRC8M selected + \arg RCU_CKOUT0SRC_HXTAL: HXTAL selected + \arg RCU_CKOUT0SRC_CKPLL_DIV1: CK_PLL selected + \arg RCU_CKOUT0SRC_CKPLL_DIV2: CK_PLL/2 selected + \param[in] ckout0_div: CK_OUT0 divider + \arg RCU_CKOUT0_DIVx(x=1,2,4,8,16,32,64,128): CK_OUT0 is divided by x + \param[out] none + \retval none +*/ +void rcu_ckout0_config(uint32_t ckout0_src, uint32_t ckout0_div) +{ + uint32_t ckout0 = 0U; + ckout0 = RCU_CFG0; + /* reset the CKOUT0SEL, CKOUT0DIV and PLLDV bits and set according to ckout0_src and ckout0_div */ + ckout0 &= ~(RCU_CFG0_CKOUT0SEL | RCU_CFG0_CKOUT0DIV | RCU_CFG0_PLLDV); + RCU_CFG0 = (ckout0 | ckout0_src | ckout0_div); +} + +/*! + \brief configure the CK_OUT1 clock source and divider + \param[in] ckout1_src: CK_OUT1 clock source selection + \arg RCU_CKOUT1SRC_NONE: no clock selected + \arg RCU_CKOUT1SRC_IRC28M: IRC28M selected + \arg RCU_CKOUT1SRC_IRC40K: IRC40K selected + \arg RCU_CKOUT1SRC_LXTAL: LXTAL selected + \arg RCU_CKOUT1SRC_CKSYS: CKSYS selected + \arg RCU_CKOUT1SRC_IRC8M: IRC8M selected + \arg RCU_CKOUT1SRC_HXTAL: HXTAL selected + \arg RCU_CKOUT1SRC_CKPLL_DIV1: CK_PLL selected + \arg RCU_CKOUT1SRC_CKPLL_DIV2: CK_PLL/2 selected + \param[in] ckout1_div: CK_OUT1 divider + \arg RCU_CKOUT1_DIVx(x=1..64): CK_OUT1 is divided by x + \param[out] none + \retval none +*/ +void rcu_ckout1_config(uint32_t ckout1_src, uint32_t ckout1_div) +{ + uint32_t ckout1 = 0U; + ckout1 = RCU_CFG3; + /* reset the CKOUT1SRC, CKOUT1DIV bits and set according to ckout1_src and ckout1_div */ + ckout1 &= ~(RCU_CFG3_CKOUT1SRC | RCU_CFG3_CKOUT1DIV); + if(RCU_CKOUT1SRC_CKPLL_DIV1 == ckout1_src){ + RCU_CFG0 |= RCU_CFG0_PLLDV; + ckout1_src = CFG3_CKOUT1SRC(7); + }else if(RCU_CKOUT1SRC_CKPLL_DIV2 == ckout1_src){ + RCU_CFG0 &= ~RCU_CFG0_PLLDV; + ckout1_src = CFG3_CKOUT1SRC(7); + }else{ + } + RCU_CFG3 = (ckout1 | ckout1_src | ckout1_div); +} +#endif /* GD32F130_150 */ + +/*! + \brief configure the PLL clock source selection and PLL multiply factor + \param[in] pll_src: PLL clock source selection + \arg RCU_PLLSRC_IRC8M_DIV2: select CK_IRC8M/2 as PLL source clock + \arg RCU_PLLSRC_HXTAL: select HXTAL as PLL source clock + \param[in] pll_mul: PLL multiply factor + \arg RCU_PLL_MULx(x=2..32): PLL source clock * x + \param[out] none + \retval none +*/ +void rcu_pll_config(uint32_t pll_src, uint32_t pll_mul) +{ + RCU_CFG0 &= ~(RCU_CFG0_PLLSEL | RCU_CFG0_PLLMF); + RCU_CFG0 |= (pll_src | pll_mul); +} + +/*! + \brief configure the USART clock source selection + \param[in] ck_usart: USART clock source selection + \arg RCU_USART0SRC_CKAPB2: CK_USART0 select CK_APB2 + \arg RCU_USART0SRC_CKSYS: CK_USART0 select CK_SYS + \arg RCU_USART0SRC_LXTAL: CK_USART0 select CK_LXTAL + \arg RCU_USART0SRC_IRC8M: CK_USART0 select CK_IRC8M + \param[out] none + \retval none +*/ +void rcu_usart_clock_config(uint32_t ck_usart) +{ + /* reset the USART0SEL bits and set according to ck_usart */ + RCU_CFG2 &= ~RCU_CFG2_USART0SEL; + RCU_CFG2 |= ck_usart; +} + +/*! + \brief configure the CEC clock source selection + \param[in] ck_cec: CEC clock source selection + \arg RCU_CECSRC_IRC8M_DIV244: CK_CEC select CK_IRC8M/244 + \arg RCU_CECSRC_LXTAL: CK_CEC select CK_LXTAL + \param[out] none + \retval none +*/ +void rcu_cec_clock_config(uint32_t ck_cec) +{ + /* reset the CECSEL bit and set according to ck_cec */ + RCU_CFG2 &= ~RCU_CFG2_CECSEL; + RCU_CFG2 |= ck_cec; +} + +/*! + \brief configure the RTC clock source selection + \param[in] rtc_clock_source: RTC clock source selection + \arg RCU_RTCSRC_NONE: no clock selected + \arg RCU_RTCSRC_LXTAL: CK_LXTAL selected as RTC source clock + \arg RCU_RTCSRC_IRC40K: CK_IRC40K selected as RTC source clock + \arg RCU_RTCSRC_HXTAL_DIV32: CK_HXTAL/32 selected as RTC source clock + \param[out] none + \retval none +*/ +void rcu_rtc_clock_config(uint32_t rtc_clock_source) +{ + /* reset the RTCSRC bits and set according to rtc_clock_source */ + RCU_BDCTL &= ~RCU_BDCTL_RTCSRC; + RCU_BDCTL |= rtc_clock_source; +} + +#ifdef GD32F170_190 +/*! + \brief configure the SLCD clock source selection + \param[in] slcd_clock_source: SLCD clock source selection + \arg RCU_SLCDSRC_NONE: no clock selected + \arg RCU_SLCDSRC_LXTAL: CK_LXTAL selected as SLCD source clock + \arg RCU_SLCDSRC_IRC40K: CK_IRC40K selected as SLCD source clock + \arg RCU_SLCDSRC_HXTAL_DIV32: CK_HXTAL/32 selected as SLCD source clock + \param[out] none + \retval none +*/ +void rcu_slcd_clock_config(uint32_t slcd_clock_source) +{ + /* reset the bits and set according to rtc_clock_source */ + RCU_BDCTL &= ~RCU_BDCTL_RTCSRC; + RCU_BDCTL |= slcd_clock_source; +} +#endif /* GD32F170_190 */ + +/*! + \brief configure the HXTAL divider used as input of PLL + \param[in] hxtal_prediv: HXTAL divider used as input of PLL + \arg RCU_PLL_HXTAL_DIVx(x=1..16): HXTAL divided x used as input of PLL + \param[out] none + \retval none +*/ +void rcu_hxtal_prediv_config(uint32_t hxtal_prediv) +{ + uint32_t prediv = 0U; + prediv = RCU_CFG1; + /* reset the HXTALPREDV bits and set according to hxtal_prediv */ + prediv &= ~RCU_CFG1_HXTALPREDV; + RCU_CFG1 = (prediv | hxtal_prediv); +} + +/*! + \brief configure the LXTAL drive capability + \param[in] lxtal_dricap: drive capability of LXTAL + \arg RCU_LXTAL_LOWDRI: lower driving capability + \arg RCU_LXTAL_MED_LOWDRI: medium low driving capability + \arg RCU_LXTAL_MED_HIGHDRI: medium high driving capability + \arg RCU_LXTAL_HIGHDRI: higher driving capability + \param[out] none + \retval none +*/ +void rcu_lxtal_drive_capability_config(uint32_t lxtal_dricap) +{ + /* reset the LXTALDRI bits and set according to lxtal_dricap */ + RCU_BDCTL &= ~RCU_BDCTL_LXTALDRI; + RCU_BDCTL |= lxtal_dricap; +} + +/*! + \brief get the clock stabilization and periphral reset flags + \param[in] flag: the clock stabilization and periphral reset flags, refer to rcu_flag_enum + \arg RCU_FLAG_IRC40KSTB: IRC40K stabilization flag + \arg RCU_FLAG_LXTALSTB: LXTAL stabilization flag + \arg RCU_FLAG_IRC8MSTB: IRC8M stabilization flag + \arg RCU_FLAG_HXTALSTB: HXTAL stabilization flag + \arg RCU_FLAG_PLLSTB: PLL stabilization flag + \arg RCU_FLAG_IRC14MSTB: IRC14M stabilization flag, only in GD32F130_150 + \arg RCU_FLAG_IRC28MSTB: IRC28M stabilization flag, only in GD32F170_190 + \arg RCU_FLAG_V12RST: V12 domain Power reset flag + \arg RCU_FLAG_OBLRST: Option byte loader reset flag + \arg RCU_FLAG_EPRST: External PIN reset flag + \arg RCU_FLAG_PORRST: Power reset flag + \arg RCU_FLAG_SWRST: Software reset flag + \arg RCU_FLAG_FWDGTRST: Free watchdog timer reset flag + \arg RCU_FLAG_WWDGTRST: Window watchdog timer reset flag + \arg RCU_FLAG_LPRST: Low-power reset flag + \param[out] none + \retval FlagStatus: SET or RESET +*/ +FlagStatus rcu_flag_get(rcu_flag_enum flag) +{ + if(RESET != (RCU_REG_VAL(flag) & BIT(RCU_BIT_POS(flag)))){ + return SET; + }else{ + return RESET; + } +} + +/*! + \brief clear the reset flag + \param[in] none + \param[out] none + \retval none +*/ +void rcu_all_reset_flag_clear(void) +{ + RCU_RSTSCK |= RCU_RSTSCK_RSTFC; +} + +/*! + \brief get the clock stabilization interrupt and ckm flags + \param[in] int_flag: interrupt and ckm flags, refer to rcu_int_flag_enum + \arg RCU_INT_FLAG_IRC40KSTB: IRC40K stabilization interrupt flag + \arg RCU_INT_FLAG_LXTALSTB: LXTAL stabilization interrupt flag + \arg RCU_INT_FLAG_IRC8MSTB: IRC8M stabilization interrupt flag + \arg RCU_INT_FLAG_HXTALSTB: HXTAL stabilization interrupt flag + \arg RCU_INT_FLAG_PLLSTB: PLL stabilization interrupt flag + \arg RCU_INT_FLAG_IRC14MSTB: IRC14M stabilization interrupt flag, only in GD32F130_150 + \arg RCU_INT_FLAG_IRC28MSTB: IRC28M stabilization interrupt flag, only in GD32F170_190 + \arg RCU_INT_FLAG_CKM: HXTAL clock stuck interrupt flag + \param[out] none + \retval FlagStatus: SET or RESET +*/ +FlagStatus rcu_interrupt_flag_get(rcu_int_flag_enum int_flag) +{ + if(RESET != (RCU_INT & int_flag)){ + return SET; + }else{ + return RESET; + } +} + +/*! + \brief clear the interrupt flags + \param[in] int_flag_clear: clock stabilization and stuck interrupt flags clear, refer to rcu_int_flag_clear_enum + \arg RCU_INT_FLAG_IRC40KSTB_CLR: IRC40K stabilization interrupt flag clear + \arg RCU_INT_FLAG_LXTALSTB_CLR: LXTAL stabilization interrupt flag clear + \arg RCU_INT_FLAG_IRC8MSTB_CLR: IRC8M stabilization interrupt flag clear + \arg RCU_INT_FLAG_HXTALSTB_CLR: HXTAL stabilization interrupt flag clear + \arg RCU_INT_FLAG_PLLSTB_CLR: PLL stabilization interrupt flag clear + \arg RCU_INT_FLAG_IRC14MSTB_CLR: IRC14M stabilization interrupt flag clear, only in GD32F130_150 + \arg RCU_INT_FLAG_IRC28MSTB_CLR: IRC28M stabilization interrupt flag clear, only in GD32F170_190 + \arg RCU_INT_FLAG_CKM_CLR: clock stuck interrupt flag clear + \param[out] none + \retval none +*/ +void rcu_interrupt_flag_clear(rcu_int_flag_clear_enum int_flag_clear) +{ + RCU_INT |= (uint32_t)int_flag_clear; +} + +/*! + \brief enable the stabilization interrupt + \param[in] stab_int: clock stabilization interrupt, refer to rcu_int_enum + \arg RCU_INT_IRC40KSTB: IRC40K stabilization interrupt enable + \arg RCU_INT_LXTALSTB: LXTAL stabilization interrupt enable + \arg RCU_INT_IRC8MSTB: IRC8M stabilization interrupt enable + \arg RCU_INT_HXTALSTB: HXTAL stabilization interrupt enable + \arg RCU_INT_PLLSTB: PLL stabilization interrupt enable + \arg RCU_INT_IRC14MSTB: IRC14M stabilization interrupt enable, only in GD32F130_150 + \arg RCU_INT_IRC28MSTB: IRC28M stabilization interrupt enable, only in GD32F170_190 + \param[out] none + \retval none +*/ +void rcu_interrupt_enable(rcu_int_enum stab_int) +{ + RCU_INT |= (uint32_t)stab_int; +} + + +/*! + \brief disable the stabilization interrupt + \param[in] stab_int: clock stabilization interrupt, refer to rcu_int_enum + \arg RCU_INT_IRC40KSTB: IRC40K stabilization interrupt disable + \arg RCU_INT_LXTALSTB: LXTAL stabilization interrupt disable + \arg RCU_INT_IRC8MSTB: IRC8M stabilization interrupt disable + \arg RCU_INT_HXTALSTB: HXTAL stabilization interrupt disable + \arg RCU_INT_PLLSTB: PLL stabilization interrupt disable + \arg RCU_INT_IRC14MSTB: IRC14M stabilization interrupt disable, only in GD32F130_150 + \arg RCU_INT_IRC28MSTB: IRC28M stabilization interrupt disable, only in GD32F170_190 + \param[out] none + \retval none +*/ +void rcu_interrupt_disable(rcu_int_enum stab_int) +{ + RCU_INT &= ~(uint32_t)stab_int; +} + +/*! + \brief wait until oscillator stabilization flags is SET or oscillator startup is timeout + \param[in] osci: oscillator types, refer to rcu_osci_type_enum + \arg RCU_HXTAL: HXTAL + \arg RCU_LXTAL: LXTAL + \arg RCU_IRC8M: IRC8M + \arg RCU_IRC14M: IRC14M, only in GD32F130_150 + \arg RCU_IRC28M: IRC28M, only in GD32F170_190 + \arg RCU_IRC40K: IRC40K + \arg RCU_PLL_CK: PLL + \param[out] none + \retval ErrStatus: SUCCESS or ERROR +*/ +ErrStatus rcu_osci_stab_wait(rcu_osci_type_enum osci) +{ + uint32_t stb_cnt = 0U; + ErrStatus reval = ERROR; + FlagStatus osci_stat = RESET; + + switch(osci){ + /* wait HXTAL stable */ + case RCU_HXTAL: + while((RESET == osci_stat) && (HXTAL_STARTUP_TIMEOUT != stb_cnt)){ + osci_stat = rcu_flag_get(RCU_FLAG_HXTALSTB); + stb_cnt++; + } + + /* check whether flag is set or not */ + if(RESET != rcu_flag_get(RCU_FLAG_HXTALSTB)){ + reval = SUCCESS; + } + break; + /* wait LXTAL stable */ + case RCU_LXTAL: + while((RESET == osci_stat) && (LXTAL_STARTUP_TIMEOUT != stb_cnt)){ + osci_stat = rcu_flag_get(RCU_FLAG_LXTALSTB); + stb_cnt++; + } + + /* check whether flag is set or not */ + if(RESET != rcu_flag_get(RCU_FLAG_LXTALSTB)){ + reval = SUCCESS; + } + break; + /* wait IRC8M stable */ + case RCU_IRC8M: + while((RESET == osci_stat) && (IRC8M_STARTUP_TIMEOUT != stb_cnt)){ + osci_stat = rcu_flag_get(RCU_FLAG_IRC8MSTB); + stb_cnt++; + } + + /* check whether flag is set or not */ + if(RESET != rcu_flag_get(RCU_FLAG_IRC8MSTB)){ + reval = SUCCESS; + } + break; +#ifdef GD32F130_150 + /* wait IRC14M stable */ + case RCU_IRC14M: + while((RESET == osci_stat) && (OSC_STARTUP_TIMEOUT != stb_cnt)){ + osci_stat = rcu_flag_get(RCU_FLAG_IRC14MSTB); + stb_cnt++; + } + + /* check whether flag is set or not */ + if(RESET != rcu_flag_get(RCU_FLAG_IRC14MSTB)){ + reval = SUCCESS; + } + break; +#elif defined (GD32F170_190) + /* wait IRC28M stable */ + case RCU_IRC28M: + while((RESET == osci_stat) && (OSC_STARTUP_TIMEOUT != stb_cnt)){ + osci_stat = rcu_flag_get(RCU_FLAG_IRC28MSTB); + stb_cnt++; + } + + /* check whether flag is set or not */ + if(RESET != rcu_flag_get(RCU_FLAG_IRC28MSTB)){ + reval = SUCCESS; + } + break; +#endif /* GD32F130_150 */ + /* wait IRC40K stable */ + case RCU_IRC40K: + while((RESET == osci_stat) && (OSC_STARTUP_TIMEOUT != stb_cnt)){ + osci_stat = rcu_flag_get(RCU_FLAG_IRC40KSTB); + stb_cnt++; + } + + /* check whether flag is set or not */ + if(RESET != rcu_flag_get(RCU_FLAG_IRC40KSTB)){ + reval = SUCCESS; + } + break; + /* wait PLL stable */ + case RCU_PLL_CK: + while((RESET == osci_stat) && (OSC_STARTUP_TIMEOUT != stb_cnt)){ + osci_stat = rcu_flag_get(RCU_FLAG_PLLSTB); + stb_cnt++; + } + + /* check whether flag is set or not */ + if(RESET != rcu_flag_get(RCU_FLAG_PLLSTB)){ + reval = SUCCESS; + } + break; + default: + break; + } + + /* return value */ + return reval; +} + +/*! + \brief turn on the oscillator + \param[in] osci: oscillator types, refer to rcu_osci_type_enum + \arg RCU_HXTAL: HXTAL + \arg RCU_LXTAL: LXTAL + \arg RCU_IRC8M: IRC8M + \arg RCU_IRC14M: IRC14M, only in GD32F130_150 + \arg RCU_IRC28M: IRC28M, only in GD32F170_190 + \arg RCU_IRC40K: IRC40K + \arg RCU_PLL_CK: PLL + \param[out] none + \retval none +*/ +void rcu_osci_on(rcu_osci_type_enum osci) +{ + RCU_REG_VAL(osci) |= BIT(RCU_BIT_POS(osci)); +} + +/*! + \brief turn off the oscillator + \param[in] osci: oscillator types, refer to rcu_osci_type_enum + \arg RCU_HXTAL: HXTAL + \arg RCU_LXTAL: LXTAL + \arg RCU_IRC8M: IRC8M + \arg RCU_IRC14M: IRC14M, only in GD32F130_150 + \arg RCU_IRC28M: IRC28M, only in GD32F170_190 + \arg RCU_IRC40K: IRC40K + \arg RCU_PLL_CK: PLL + \param[out] none + \retval none +*/ +void rcu_osci_off(rcu_osci_type_enum osci) +{ + RCU_REG_VAL(osci) &= ~BIT(RCU_BIT_POS(osci)); +} + +/*! + \brief enable the oscillator bypass mode, HXTALEN or LXTALEN must be reset before it + \param[in] osci: oscillator types, refer to rcu_osci_type_enum + \arg RCU_HXTAL: HXTAL + \arg RCU_LXTAL: LXTAL + \param[out] none + \retval none +*/ +void rcu_osci_bypass_mode_enable(rcu_osci_type_enum osci) +{ + uint32_t reg; + switch(osci){ + case RCU_HXTAL: + /* HXTALEN must be reset before enable the oscillator bypass mode */ + reg = RCU_CTL0; + RCU_CTL0 &= ~RCU_CTL0_HXTALEN; + RCU_CTL0 = (reg | RCU_CTL0_HXTALBPS); + break; + case RCU_LXTAL: + /* LXTALEN must be reset before enable the oscillator bypass mode */ + reg = RCU_BDCTL; + RCU_BDCTL &= ~RCU_BDCTL_LXTALEN; + RCU_BDCTL = (reg | RCU_BDCTL_LXTALBPS); + break; + case RCU_IRC8M: +#ifdef GD32F130_150 + case RCU_IRC14M: +#elif defined (GD32F170_190) + case RCU_IRC28M: +#endif /* GD32F130_150 */ + case RCU_IRC40K: + case RCU_PLL_CK: + break; + default: + break; + } +} + +/*! + \brief disable the oscillator bypass mode, HXTALEN or LXTALEN must be reset before it + \param[in] osci: oscillator types, refer to rcu_osci_type_enum + \arg RCU_HXTAL: HXTAL + \arg RCU_LXTAL: LXTAL + \param[out] none + \retval none +*/ +void rcu_osci_bypass_mode_disable(rcu_osci_type_enum osci) +{ + uint32_t reg; + switch(osci){ + case RCU_HXTAL: + /* HXTALEN must be reset before disable the oscillator bypass mode */ + reg = RCU_CTL0; + RCU_CTL0 &= ~RCU_CTL0_HXTALEN; + RCU_CTL0 = (reg & (~RCU_CTL0_HXTALBPS)); + break; + case RCU_LXTAL: + /* LXTALEN must be reset before disable the oscillator bypass mode */ + reg = RCU_BDCTL; + RCU_BDCTL &= ~RCU_BDCTL_LXTALEN; + RCU_BDCTL =(reg & (~RCU_BDCTL_LXTALBPS)); + break; + case RCU_IRC8M: +#ifdef GD32F130_150 + case RCU_IRC14M: +#elif defined (GD32F170_190) + case RCU_IRC28M: +#endif /* GD32F130_150 */ + case RCU_IRC40K: + case RCU_PLL_CK: + break; + default: + break; + } +} + +/*! + \brief enable the HXTAL clock monitor + \param[in] none + \param[out] none + \retval none +*/ + +void rcu_hxtal_clock_monitor_enable(void) +{ + RCU_CTL0 |= RCU_CTL0_CKMEN; +} + +/*! + \brief disable the HXTAL clock monitor + \param[in] none + \param[out] none + \retval none +*/ +void rcu_hxtal_clock_monitor_disable(void) +{ + RCU_CTL0 &= ~RCU_CTL0_CKMEN; +} + +/*! + \brief set the IRC8M adjust value + \param[in] irc8m_adjval: IRC8M adjust value, must be between 0 and 0x1F + \param[out] none + \retval none +*/ +void rcu_irc8m_adjust_value_set(uint8_t irc8m_adjval) +{ + uint32_t adjust = 0U; + adjust = RCU_CTL0; + /* reset the IRC8MADJ bits and set according to irc8m_adjval */ + adjust &= ~RCU_CTL0_IRC8MADJ; + RCU_CTL0 = (adjust | ((uint32_t)(irc8m_adjval)<<3)); +} + +#ifdef GD32F130_150 +/*! + \brief set the IRC14M adjust value + \param[in] irc14m_adjval: IRC14M adjust value, must be between 0 and 0x1F + \param[out] none + \retval none +*/ +void rcu_irc14m_adjust_value_set(uint8_t irc14m_adjval) +{ + uint32_t adjust = 0U; + adjust = RCU_CTL1; + /* reset the IRC14MADJ bits and set according to irc14m_adjval */ + adjust &= ~RCU_CTL1_IRC14MADJ; + RCU_CTL1 = (adjust | ((uint32_t)(irc14m_adjval)<<3)); +} +#elif defined (GD32F170_190) +/*! + \brief set the IRC28M adjust value + \param[in] irc28m_adjval: IRC28M adjust value, must be between 0 and 0x1F + \param[out] none + \retval none +*/ +void rcu_irc28m_adjust_value_set(uint8_t irc28m_adjval) +{ + uint32_t adjust = 0U; + adjust = RCU_CTL1; + /* reset the IRC28MADJ bits and set according to irc28m_adjval */ + adjust &= ~RCU_CTL1_IRC28MADJ; + RCU_CTL1 = (adjust | ((uint32_t)(irc28m_adjval)<<3)); +} +#endif /* GD32F130_150 */ + +/*! + \brief unlock the voltage key + \param[in] none + \param[out] none + \retval none +*/ +void rcu_voltage_key_unlock(void) +{ + /* reset the KEY bits and set 0x1A2B3C4D */ + RCU_VKEY &= ~RCU_VKEY_KEY; + RCU_VKEY |= RCU_VKEY_UNLOCK; +} + +/*! + \brief set voltage in deep sleep mode + \param[in] dsvol: deep sleep mode voltage + \arg RCU_DEEPSLEEP_V_1_2: the core voltage is 1.2V, only in GD32F130_150 + \arg RCU_DEEPSLEEP_V_1_1: the core voltage is 1.1V, only in GD32F130_150 + \arg RCU_DEEPSLEEP_V_1_0: the core voltage is 1.0V, only in GD32F130_150 + \arg RCU_DEEPSLEEP_V_0_9: the core voltage is 0.9V, only in GD32F130_150 + + \arg RCU_DEEPSLEEP_V_1_8: the core voltage is 1.8V, only in GD32F170_190 + \arg RCU_DEEPSLEEP_V_1_6: the core voltage is 1.6V, only in GD32F170_190 + \arg RCU_DEEPSLEEP_V_1_4: the core voltage is 1.4V, only in GD32F170_190 + \arg RCU_DEEPSLEEP_V_1_2: the core voltage is 1.2V, only in GD32F170_190 + \param[out] none + \retval none +*/ +void rcu_deepsleep_voltage_set(uint32_t dsvol) +{ + /* reset the DSLPVS bits and set according to dsvol */ + RCU_DSV &= ~RCU_DSV_DSLPVS; + RCU_DSV |= dsvol; +} + +#ifdef GD32F130_150 +/*! + \brief set the power down voltage + \param[in] pdvol: power down voltage select + \arg RCU_PDR_V_2_6: power down voltage is 2.6V + \arg RCU_PDR_V_1_8: power down voltage is 1.8V + \param[out] none + \retval none +*/ +void rcu_power_down_voltage_set(uint32_t pdvol) +{ + /* reset the PDRVS bits and set according to pdvol */ + RCU_PDVSEL &= ~RCU_PDVSEL_PDRVS; + RCU_PDVSEL |= pdvol; +} +#endif /* GD32F130_150 */ + +/*! + \brief get the system clock, bus and peripheral clock frequency + \param[in] clock: the clock frequency which to get + \arg CK_SYS: system clock frequency + \arg CK_AHB: AHB clock frequency + \arg CK_APB1: APB1 clock frequency + \arg CK_APB2: APB2 clock frequency + \arg CK_ADC: ADC clock frequency + \arg CK_CEC: CEC clock frequency + \arg CK_USART: USART clock frequency + \param[out] none + \retval clock frequency of system, AHB, APB1, APB2, ADC, CEC or USRAT +*/ +uint32_t rcu_clock_freq_get(rcu_clock_freq_enum clock) +{ + uint32_t sws = 0U, adcps = 0U, ck_freq = 0U; + uint32_t cksys_freq = 0U, ahb_freq = 0U, apb1_freq = 0U, apb2_freq = 0U; + uint32_t adc_freq = 0U, cec_freq = 0U, usart_freq = 0U; + uint32_t pllmf = 0U, pllmf4 = 0U, pllsel = 0U, prediv = 0U, idx = 0U, clk_exp = 0U; + /* exponent of AHB, APB1 and APB2 clock divider */ + const uint8_t ahb_exp[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9}; + const uint8_t apb1_exp[8] = {0, 0, 0, 0, 1, 2, 3, 4}; + const uint8_t apb2_exp[8] = {0, 0, 0, 0, 1, 2, 3, 4}; + + sws = GET_BITS(RCU_CFG0, 2, 3); + switch(sws){ + /* IRC8M is selected as CK_SYS */ + case SEL_IRC8M: + cksys_freq = IRC8M_VALUE; + break; + /* HXTAL is selected as CK_SYS */ + case SEL_HXTAL: + cksys_freq = HXTAL_VALUE; + break; + /* PLL is selected as CK_SYS */ + case SEL_PLL: + /* get the value of PLLMF[3:0] */ + pllmf = GET_BITS(RCU_CFG0, 18, 21); + pllmf4 = GET_BITS(RCU_CFG0, 27, 27); + /* high 16 bits */ + if(1U == pllmf4){ + pllmf += 17U; + }else{ + pllmf += 2U; + } + /* PLL clock source selection, HXTAL or IRC8M/2 */ + pllsel = GET_BITS(RCU_CFG0, 16, 16); + if(0U != pllsel){ + prediv = (GET_BITS(RCU_CFG1,0, 3) + 1U); + cksys_freq = (HXTAL_VALUE / prediv) * pllmf; + }else{ + cksys_freq = (IRC8M_VALUE >> 1) * pllmf; + } + break; + /* IRC8M is selected as CK_SYS */ + default: + cksys_freq = IRC8M_VALUE; + break; + } + /* calculate AHB clock frequency */ + idx = GET_BITS(RCU_CFG0, 4, 7); + clk_exp = ahb_exp[idx]; + ahb_freq = cksys_freq >> clk_exp; + + /* calculate APB1 clock frequency */ + idx = GET_BITS(RCU_CFG0, 8, 10); + clk_exp = apb1_exp[idx]; + apb1_freq = ahb_freq >> clk_exp; + + /* calculate APB2 clock frequency */ + idx = GET_BITS(RCU_CFG0, 11, 13); + clk_exp = apb2_exp[idx]; + apb2_freq = ahb_freq >> clk_exp; + + /* return the clocks frequency */ + switch(clock){ + case CK_SYS: + ck_freq = cksys_freq; + break; + case CK_AHB: + ck_freq = ahb_freq; + break; + case CK_APB1: + ck_freq = apb1_freq; + break; + case CK_APB2: + ck_freq = apb2_freq; + break; + case CK_ADC: + /* calculate ADC clock frequency */ + if(RCU_ADCSRC_APB2DIV != (RCU_CFG2 & RCU_CFG2_ADCSEL)){ +#ifdef GD32F130_150 + adc_freq = IRC14M_VALUE; +#elif defined (GD32F170_190) + if(RCU_ADC_IRC28M_DIV1 != (RCU_CFG2 & RCU_CFG2_IRC28MDIV)){ + adc_freq = IRC28M_VALUE >> 1; + }else{ + adc_freq = IRC28M_VALUE; + } +#endif /* GD32F130_150 */ + }else{ + /* ADC clock select CK_APB2 divided by 2/4/6/8 */ + adcps = GET_BITS(RCU_CFG0, 14, 15); + switch(adcps){ + case 0: + adc_freq = apb2_freq / 2U; + break; + case 1: + adc_freq = apb2_freq / 4U; + break; + case 2: + adc_freq = apb2_freq / 6U; + break; + case 3: + adc_freq = apb2_freq / 8U; + break; + default: + break; + } + } + ck_freq = adc_freq; + break; + case CK_CEC: + /* calculate CEC clock frequency */ + if(RCU_CECSRC_LXTAL != (RCU_CFG2 & RCU_CFG2_CECSEL)){ + cec_freq = IRC8M_VALUE / 244U; + }else{ + cec_freq = LXTAL_VALUE; + } + ck_freq = cec_freq; + break; + case CK_USART: + /* calculate USART clock frequency */ + if(RCU_USART0SRC_CKAPB2 == (RCU_CFG2 & RCU_CFG2_USART0SEL)){ + usart_freq = apb2_freq; + }else if(RCU_USART0SRC_CKSYS == (RCU_CFG2 & RCU_CFG2_USART0SEL)){ + usart_freq = cksys_freq; + }else if(RCU_USART0SRC_LXTAL == (RCU_CFG2 & RCU_CFG2_USART0SEL)){ + usart_freq = LXTAL_VALUE; + }else if(RCU_USART0SRC_IRC8M == (RCU_CFG2 & RCU_CFG2_USART0SEL)){ + usart_freq = IRC8M_VALUE; + }else{ + } + ck_freq = usart_freq; + break; + default: + break; + } + return ck_freq; +} diff --git a/HoverBoardGigaDevice/RTE/Device/GD32F130C8/gd32f1x0_syscfg.c b/HUGS/RTE/Device/GD32F130C8/gd32f1x0_syscfg.c similarity index 97% rename from HoverBoardGigaDevice/RTE/Device/GD32F130C8/gd32f1x0_syscfg.c rename to HUGS/RTE/Device/GD32F130C8/gd32f1x0_syscfg.c index ad7a625b..70be0e7c 100644 --- a/HoverBoardGigaDevice/RTE/Device/GD32F130C8/gd32f1x0_syscfg.c +++ b/HUGS/RTE/Device/GD32F130C8/gd32f1x0_syscfg.c @@ -1,214 +1,214 @@ -/*! - \file gd32f1x0_syscfg.c - \brief SYSCFG driver -*/ - -/* - Copyright (C) 2017 GigaDevice - - 2014-12-26, V1.0.0, platform GD32F1x0(x=3,5) - 2016-01-15, V2.0.0, platform GD32F1x0(x=3,5,7,9) - 2016-04-30, V3.0.0, firmware update for GD32F1x0(x=3,5,7,9) - 2017-06-19, V3.1.0, firmware update for GD32F1x0(x=3,5,7,9) -*/ - -#include "gd32f1x0_syscfg.h" - -/*! - \brief reset the SYSCFG registers - \param[in] none - \param[out] none - \retval none -*/ -void syscfg_deinit(void) -{ - rcu_periph_reset_enable(RCU_CFGCMPRST); - rcu_periph_reset_disable(RCU_CFGCMPRST); -} - -/*! - \brief enable the DMA channels remapping - \param[in] syscfg_dma_remap: specify the DMA channels to remap - \arg SYSCFG_DMA_REMAP_TIMER16: remap TIMER16 channel0 and UP DMA requests to channel1(defaut channel0) - \arg SYSCFG_DMA_REMAP_TIMER15: remap TIMER15 channel2 and UP DMA requests to channel3(defaut channel2) - \arg SYSCFG_DMA_REMAP_USART0RX: remap USART0 Rx DMA request to channel4(default channel2) - \arg SYSCFG_DMA_REMAP_USART0TX: remap USART0 Tx DMA request to channel3(default channel1) - \arg SYSCFG_DMA_REMAP_ADC: remap ADC DMA requests from channel0 to channel1 - \param[out] none - \retval none -*/ -void syscfg_dma_remap_enable(uint32_t syscfg_dma_remap) -{ - SYSCFG_CFG0 |= syscfg_dma_remap; -} - -/*! - \brief disable the DMA channels remapping - \param[in] syscfg_dma_remap: specify the DMA channels to remap - \arg SYSCFG_DMA_REMAP_TIMER16: remap TIMER16 channel0 and UP DMA requests to channel1(defaut channel0) - \arg SYSCFG_DMA_REMAP_TIMER15: remap TIMER15 channel2 and UP DMA requests to channel3(defaut channel2) - \arg SYSCFG_DMA_REMAP_USART0RX: remap USART0 Rx DMA request to channel4(default channel2) - \arg SYSCFG_DMA_REMAP_USART0TX: remap USART0 Tx DMA request to channel3(default channel1) - \arg SYSCFG_DMA_REMAP_ADC: remap ADC DMA requests from channel0 to channel1 - \param[out] none - \retval none -*/ -void syscfg_dma_remap_disable(uint32_t syscfg_dma_remap) -{ - SYSCFG_CFG0 &= ~syscfg_dma_remap; -} - -/*! - \brief enable PB9 high current capability - \param[in] none - \param[out] none - \retval none -*/ -void syscfg_high_current_enable(void) -{ - SYSCFG_CFG0 |= SYSCFG_HIGH_CURRENT_ENABLE; -} - -/*! - \brief disable PB9 high current capability - \param[in] none - \param[out] none - \retval none -*/ -void syscfg_high_current_disable(void) -{ - SYSCFG_CFG0 &= SYSCFG_HIGH_CURRENT_DISABLE; -} - -#ifdef GD32F170_190 -/*! - \brief configure the VLCD intermediate voltage rail - \param[in] vlcd_bias: specify VLCD bias - \arg VLCD_BIAS1_2_RAIL1: VLCD bias is 1/2, using rail1 - \arg VLCD_BIAS1_2_RAIL2: VLCD bias is 1/2, using rail2 - \arg VLCD_BIAS1_2_RAIL3: VLCD bias is 1/2, using rail3 - \arg VLCD_BIAS1_3_RAIL1_2: VLCD bias is 1/3, using rail1 and rail2 - \arg VLCD_BIAS1_3_RAIL1_3: VLCD bias is 1/3, using rail1 and rail3 - \arg VLCD_BIAS1_4_RAILALL: VLCD bias is 1/4, using all rails - \param[out] none - \retval none -*/ -void syscfg_vlcd_rail_config(uint8_t vlcd_bias) -{ - uint32_t cfg1 = SYSCFG_CFG1; - - /* Clear system configuration register 1 */ - SYSCFG_CFG1 = 0U; - - switch(vlcd_bias){ - /* according to VLCD bias, configure rails combination */ - case VLCD_BIAS1_2_RAIL1: - SYSCFG_CFG1 |= SYSCFG_VLCD_RAIL1; - break; - case VLCD_BIAS1_2_RAIL2: - SYSCFG_CFG1 |= SYSCFG_VLCD_RAIL2; - break; - case VLCD_BIAS1_2_RAIL3: - SYSCFG_CFG1 |= SYSCFG_VLCD_RAIL3; - break; - case VLCD_BIAS1_3_RAIL1_2: - SYSCFG_CFG1 |= SYSCFG_VLCD_RAIL2 | SYSCFG_VLCD_RAIL1; - break; - case VLCD_BIAS1_3_RAIL1_3: - SYSCFG_CFG1 |= SYSCFG_VLCD_RAIL3 | SYSCFG_VLCD_RAIL1; - break; - case VLCD_BIAS1_4_RAILALL: - SYSCFG_CFG1 |= SYSCFG_VLCD_RAIL3 | SYSCFG_VLCD_RAIL2 | SYSCFG_VLCD_RAIL1; - break; - default: - SYSCFG_CFG1 = cfg1; - break; - } -} -#endif /* GD32F170_190 */ - -/*! - \brief configure the GPIO pin as EXTI Line - \param[in] exti_port: specify the GPIO port used in EXTI - \arg EXTI_SOURCE_GPIOx(x = A,B,C,D,F): EXTI GPIO port - \param[in] exti_pin: specify the EXTI line - \arg EXTI_SOURCE_PINx(x = 0..15): EXTI GPIO pin - \param[out] none - \retval none -*/ -void syscfg_exti_line_config(uint8_t exti_port, uint8_t exti_pin) -{ - uint32_t clear_exti_mask = ~((uint32_t)EXTI_SS_MASK << (EXTI_SS_MSTEP(exti_pin))); - uint32_t config_exti_mask = ((uint32_t)exti_port) << (EXTI_SS_MSTEP(exti_pin)); - - switch(exti_pin / EXTI_SS_JSTEP){ - case EXTISS0: - /* clear EXTI source line(0..3) */ - SYSCFG_EXTISS0 &= clear_exti_mask; - /* configure EXTI soure line(0..3) */ - SYSCFG_EXTISS0 |= config_exti_mask; - break; - case EXTISS1: - /* clear EXTI soure line(4..7) */ - SYSCFG_EXTISS1 &= clear_exti_mask; - /* configure EXTI soure line(4..7) */ - SYSCFG_EXTISS1 |= config_exti_mask; - break; - case EXTISS2: - /* clear EXTI soure line(8..11) */ - SYSCFG_EXTISS2 &= clear_exti_mask; - /* configure EXTI soure line(8..11) */ - SYSCFG_EXTISS2 |= config_exti_mask; - break; - case EXTISS3: - /* clear EXTI soure line(12..15) */ - SYSCFG_EXTISS3 &= clear_exti_mask; - /* configure EXTI soure line(12..15) */ - SYSCFG_EXTISS3 |= config_exti_mask; - break; - default: - break; - } -} - -/*! - \brief connect TIMER0/14/15/16 break input to the selected parameter - \param[in] syscfg_lock: Specify the parameter to be connected - \arg SYSCFG_LOCK_LOCKUP: Cortex-M3 lockup output connected to the break input - \arg SYSCFG_LOCK_SRAM_PARITY_ERROR: SRAM_PARITY check error connected to the break input - \arg SYSCFG_LOCK_LVD: LVD interrupt connected to the break input - \param[out] none - \retval none -*/ -void syscfg_lock_config(uint32_t syscfg_lock) -{ - SYSCFG_CFG2 |= syscfg_lock; -} - -/*! - \brief check if the specified flag in SYSCFG_CFG2 is set or not. - \param[in] syscfg_flag: specify the flag in SYSCFG_CFG2 to check. - \arg SYSCFG_SRAM_PCEF: SRAM parity check error flag. - \param[out] none - \retval the syscfg_flag state returned (SET or RESET). - */ -FlagStatus syscfg_flag_get(uint32_t syscfg_flag) -{ - if((SYSCFG_CFG2 & syscfg_flag) != (uint32_t)RESET){ - return SET; - }else{ - return RESET; - } -} - -/*! - \brief clear the flag in SYSCFG_CFG2 by writing 1. - \param[in] syscfg_flag: Specify the flag in SYSCFG_CFG2 to clear. - \arg SYSCFG_SRAM_PCEF: SRAM parity check error flag. - \param[out] none - \retval none -*/ -void syscfg_flag_clear(uint32_t syscfg_flag) -{ - SYSCFG_CFG2 |= (uint32_t) syscfg_flag; -} +/*! + \file gd32f1x0_syscfg.c + \brief SYSCFG driver +*/ + +/* + Copyright (C) 2017 GigaDevice + + 2014-12-26, V1.0.0, platform GD32F1x0(x=3,5) + 2016-01-15, V2.0.0, platform GD32F1x0(x=3,5,7,9) + 2016-04-30, V3.0.0, firmware update for GD32F1x0(x=3,5,7,9) + 2017-06-19, V3.1.0, firmware update for GD32F1x0(x=3,5,7,9) +*/ + +#include "gd32f1x0_syscfg.h" + +/*! + \brief reset the SYSCFG registers + \param[in] none + \param[out] none + \retval none +*/ +void syscfg_deinit(void) +{ + rcu_periph_reset_enable(RCU_CFGCMPRST); + rcu_periph_reset_disable(RCU_CFGCMPRST); +} + +/*! + \brief enable the DMA channels remapping + \param[in] syscfg_dma_remap: specify the DMA channels to remap + \arg SYSCFG_DMA_REMAP_TIMER16: remap TIMER16 channel0 and UP DMA requests to channel1(defaut channel0) + \arg SYSCFG_DMA_REMAP_TIMER15: remap TIMER15 channel2 and UP DMA requests to channel3(defaut channel2) + \arg SYSCFG_DMA_REMAP_USART0RX: remap USART0 Rx DMA request to channel4(default channel2) + \arg SYSCFG_DMA_REMAP_USART0TX: remap USART0 Tx DMA request to channel3(default channel1) + \arg SYSCFG_DMA_REMAP_ADC: remap ADC DMA requests from channel0 to channel1 + \param[out] none + \retval none +*/ +void syscfg_dma_remap_enable(uint32_t syscfg_dma_remap) +{ + SYSCFG_CFG0 |= syscfg_dma_remap; +} + +/*! + \brief disable the DMA channels remapping + \param[in] syscfg_dma_remap: specify the DMA channels to remap + \arg SYSCFG_DMA_REMAP_TIMER16: remap TIMER16 channel0 and UP DMA requests to channel1(defaut channel0) + \arg SYSCFG_DMA_REMAP_TIMER15: remap TIMER15 channel2 and UP DMA requests to channel3(defaut channel2) + \arg SYSCFG_DMA_REMAP_USART0RX: remap USART0 Rx DMA request to channel4(default channel2) + \arg SYSCFG_DMA_REMAP_USART0TX: remap USART0 Tx DMA request to channel3(default channel1) + \arg SYSCFG_DMA_REMAP_ADC: remap ADC DMA requests from channel0 to channel1 + \param[out] none + \retval none +*/ +void syscfg_dma_remap_disable(uint32_t syscfg_dma_remap) +{ + SYSCFG_CFG0 &= ~syscfg_dma_remap; +} + +/*! + \brief enable PB9 high current capability + \param[in] none + \param[out] none + \retval none +*/ +void syscfg_high_current_enable(void) +{ + SYSCFG_CFG0 |= SYSCFG_HIGH_CURRENT_ENABLE; +} + +/*! + \brief disable PB9 high current capability + \param[in] none + \param[out] none + \retval none +*/ +void syscfg_high_current_disable(void) +{ + SYSCFG_CFG0 &= SYSCFG_HIGH_CURRENT_DISABLE; +} + +#ifdef GD32F170_190 +/*! + \brief configure the VLCD intermediate voltage rail + \param[in] vlcd_bias: specify VLCD bias + \arg VLCD_BIAS1_2_RAIL1: VLCD bias is 1/2, using rail1 + \arg VLCD_BIAS1_2_RAIL2: VLCD bias is 1/2, using rail2 + \arg VLCD_BIAS1_2_RAIL3: VLCD bias is 1/2, using rail3 + \arg VLCD_BIAS1_3_RAIL1_2: VLCD bias is 1/3, using rail1 and rail2 + \arg VLCD_BIAS1_3_RAIL1_3: VLCD bias is 1/3, using rail1 and rail3 + \arg VLCD_BIAS1_4_RAILALL: VLCD bias is 1/4, using all rails + \param[out] none + \retval none +*/ +void syscfg_vlcd_rail_config(uint8_t vlcd_bias) +{ + uint32_t cfg1 = SYSCFG_CFG1; + + /* Clear system configuration register 1 */ + SYSCFG_CFG1 = 0U; + + switch(vlcd_bias){ + /* according to VLCD bias, configure rails combination */ + case VLCD_BIAS1_2_RAIL1: + SYSCFG_CFG1 |= SYSCFG_VLCD_RAIL1; + break; + case VLCD_BIAS1_2_RAIL2: + SYSCFG_CFG1 |= SYSCFG_VLCD_RAIL2; + break; + case VLCD_BIAS1_2_RAIL3: + SYSCFG_CFG1 |= SYSCFG_VLCD_RAIL3; + break; + case VLCD_BIAS1_3_RAIL1_2: + SYSCFG_CFG1 |= SYSCFG_VLCD_RAIL2 | SYSCFG_VLCD_RAIL1; + break; + case VLCD_BIAS1_3_RAIL1_3: + SYSCFG_CFG1 |= SYSCFG_VLCD_RAIL3 | SYSCFG_VLCD_RAIL1; + break; + case VLCD_BIAS1_4_RAILALL: + SYSCFG_CFG1 |= SYSCFG_VLCD_RAIL3 | SYSCFG_VLCD_RAIL2 | SYSCFG_VLCD_RAIL1; + break; + default: + SYSCFG_CFG1 = cfg1; + break; + } +} +#endif /* GD32F170_190 */ + +/*! + \brief configure the GPIO pin as EXTI Line + \param[in] exti_port: specify the GPIO port used in EXTI + \arg EXTI_SOURCE_GPIOx(x = A,B,C,D,F): EXTI GPIO port + \param[in] exti_pin: specify the EXTI line + \arg EXTI_SOURCE_PINx(x = 0..15): EXTI GPIO pin + \param[out] none + \retval none +*/ +void syscfg_exti_line_config(uint8_t exti_port, uint8_t exti_pin) +{ + uint32_t clear_exti_mask = ~((uint32_t)EXTI_SS_MASK << (EXTI_SS_MSTEP(exti_pin))); + uint32_t config_exti_mask = ((uint32_t)exti_port) << (EXTI_SS_MSTEP(exti_pin)); + + switch(exti_pin / EXTI_SS_JSTEP){ + case EXTISS0: + /* clear EXTI source line(0..3) */ + SYSCFG_EXTISS0 &= clear_exti_mask; + /* configure EXTI soure line(0..3) */ + SYSCFG_EXTISS0 |= config_exti_mask; + break; + case EXTISS1: + /* clear EXTI soure line(4..7) */ + SYSCFG_EXTISS1 &= clear_exti_mask; + /* configure EXTI soure line(4..7) */ + SYSCFG_EXTISS1 |= config_exti_mask; + break; + case EXTISS2: + /* clear EXTI soure line(8..11) */ + SYSCFG_EXTISS2 &= clear_exti_mask; + /* configure EXTI soure line(8..11) */ + SYSCFG_EXTISS2 |= config_exti_mask; + break; + case EXTISS3: + /* clear EXTI soure line(12..15) */ + SYSCFG_EXTISS3 &= clear_exti_mask; + /* configure EXTI soure line(12..15) */ + SYSCFG_EXTISS3 |= config_exti_mask; + break; + default: + break; + } +} + +/*! + \brief connect TIMER0/14/15/16 break input to the selected parameter + \param[in] syscfg_lock: Specify the parameter to be connected + \arg SYSCFG_LOCK_LOCKUP: Cortex-M3 lockup output connected to the break input + \arg SYSCFG_LOCK_SRAM_PARITY_ERROR: SRAM_PARITY check error connected to the break input + \arg SYSCFG_LOCK_LVD: LVD interrupt connected to the break input + \param[out] none + \retval none +*/ +void syscfg_lock_config(uint32_t syscfg_lock) +{ + SYSCFG_CFG2 |= syscfg_lock; +} + +/*! + \brief check if the specified flag in SYSCFG_CFG2 is set or not. + \param[in] syscfg_flag: specify the flag in SYSCFG_CFG2 to check. + \arg SYSCFG_SRAM_PCEF: SRAM parity check error flag. + \param[out] none + \retval the syscfg_flag state returned (SET or RESET). + */ +FlagStatus syscfg_flag_get(uint32_t syscfg_flag) +{ + if((SYSCFG_CFG2 & syscfg_flag) != (uint32_t)RESET){ + return SET; + }else{ + return RESET; + } +} + +/*! + \brief clear the flag in SYSCFG_CFG2 by writing 1. + \param[in] syscfg_flag: Specify the flag in SYSCFG_CFG2 to clear. + \arg SYSCFG_SRAM_PCEF: SRAM parity check error flag. + \param[out] none + \retval none +*/ +void syscfg_flag_clear(uint32_t syscfg_flag) +{ + SYSCFG_CFG2 |= (uint32_t) syscfg_flag; +} diff --git a/HoverBoardGigaDevice/RTE/Device/GD32F130C8/gd32f1x0_timer.c b/HUGS/RTE/Device/GD32F130C8/gd32f1x0_timer.c similarity index 97% rename from HoverBoardGigaDevice/RTE/Device/GD32F130C8/gd32f1x0_timer.c rename to HUGS/RTE/Device/GD32F130C8/gd32f1x0_timer.c index 21337ef1..4dad6363 100644 --- a/HoverBoardGigaDevice/RTE/Device/GD32F130C8/gd32f1x0_timer.c +++ b/HUGS/RTE/Device/GD32F130C8/gd32f1x0_timer.c @@ -1,1887 +1,1887 @@ -/*! - \file gd32f1x0_timer.c - \brief TIMER driver -*/ - -/* - Copyright (C) 2017 GigaDevice - - 2014-12-26, V1.0.0, platform GD32F1x0(x=3,5) - 2016-01-15, V2.0.0, platform GD32F1x0(x=3,5,7,9) - 2016-04-30, V3.0.0, firmware update for GD32F1x0(x=3,5,7,9) - 2017-06-19, V3.1.0, firmware update for GD32F1x0(x=3,5,7,9) -*/ - -#include "gd32f1x0_timer.h" - -/*! - \brief deinit a timer - \param[in] timer_periph: TIMERx(x=0,1,2,5,13,14,15,16) - \param[out] none - \retval none -*/ -void timer_deinit(uint32_t timer_periph) -{ - switch(timer_periph){ - case TIMER0: - /* reset TIMER0 */ - rcu_periph_reset_enable(RCU_TIMER0RST); - rcu_periph_reset_disable(RCU_TIMER0RST); - break; - case TIMER1: - /* reset TIMER1 */ - rcu_periph_reset_enable(RCU_TIMER1RST); - rcu_periph_reset_disable(RCU_TIMER1RST); - break; - case TIMER2: - /* reset TIMER2 */ - rcu_periph_reset_enable(RCU_TIMER2RST); - rcu_periph_reset_disable(RCU_TIMER2RST); - break; - case TIMER5: - /* reset TIMER5 */ - rcu_periph_reset_enable(RCU_TIMER5RST); - rcu_periph_reset_disable(RCU_TIMER5RST); - break; - case TIMER13: - /* reset TIMER13 */ - rcu_periph_reset_enable(RCU_TIMER13RST); - rcu_periph_reset_disable(RCU_TIMER13RST); - break; - case TIMER14: - /* reset TIMER14 */ - rcu_periph_reset_enable(RCU_TIMER14RST); - rcu_periph_reset_disable(RCU_TIMER14RST); - break; - case TIMER15: - /* reset TIMER15 */ - rcu_periph_reset_enable(RCU_TIMER15RST); - rcu_periph_reset_disable(RCU_TIMER15RST); - break; - case TIMER16: - /* reset TIMER16 */ - rcu_periph_reset_enable(RCU_TIMER16RST); - rcu_periph_reset_disable(RCU_TIMER16RST); - break; - default: - break; - } -} - -/*! - \brief initialize TIMER counter - \param[in] timer_periph: TIMERx(x=0,1,2,5,13,14,15,16) - \param[in] initpara: init parameter struct - prescaler: prescaler value of the counter clock,0~65535 - alignedmode: TIMER_COUNTER_EDGE,TIMER_COUNTER_CENTER_DOWN,TIMER_COUNTER_CENTER_UP,TIMER_COUNTER_CENTER_BOTH - counterdirection: TIMER_COUNTER_UP,TIMER_COUNTER_DOWN - period: counter auto reload value - clockdivision: TIMER_CKDIV_DIV1,TIMER_CKDIV_DIV2,TIMER_CKDIV_DIV4 - repetitioncounter: counter repetition value,0~255 - \param[out] none - \retval none -*/ -void timer_init(uint32_t timer_periph, timer_parameter_struct* initpara) -{ - /* configure the counter prescaler value */ - TIMER_PSC(timer_periph) = (uint16_t)initpara->prescaler; - - /* configure the counter direction and aligned mode */ - if((TIMER0 == timer_periph) || (TIMER1 == timer_periph) || (TIMER2 == timer_periph)){ - TIMER_CTL0(timer_periph) &= (uint32_t)(~ TIMER_CTL0_DIR|TIMER_CTL0_CAM); - TIMER_CTL0(timer_periph) |= (uint32_t)initpara->alignedmode; - TIMER_CTL0(timer_periph) |= (uint32_t)initpara->counterdirection; - }else{ - TIMER_CTL0(timer_periph) &= (uint32_t)(~ TIMER_CTL0_DIR); - TIMER_CTL0(timer_periph) |= (uint32_t)initpara->counterdirection; - } - - /* configure the autoreload value */ - TIMER_CAR(timer_periph) = (uint32_t)initpara->period; - - if((TIMER5 != timer_periph)){ - /* reset the CKDIV bit */ - TIMER_CTL0(timer_periph) &= (uint32_t)(~ TIMER_CTL0_CKDIV); - TIMER_CTL0(timer_periph) |= (uint32_t)initpara->clockdivision; - } - - if((TIMER0 == timer_periph) || (TIMER14 == timer_periph) || (TIMER15 == timer_periph)|| (TIMER16 == timer_periph)){ - /* configure the repetition counter value */ - TIMER_CREP(timer_periph) = (uint32_t)initpara->repetitioncounter; - } - - /* generate an update event */ - TIMER_SWEVG(timer_periph) |= (uint32_t)TIMER_PSC_RELOAD_NOW; -} - -/*! - \brief enable a timer - \param[in] timer_periph: TIMERx(x=0,1,2,5,13,14,15,16) - \param[out] none - \retval none -*/ -void timer_enable(uint32_t timer_periph) -{ - TIMER_CTL0(timer_periph) |= (uint32_t)TIMER_COUNTER_ENABLE; -} - -/*! - \brief disable a timer - \param[in] timer_periph: TIMERx(x=0,1,2,5,13,14,15,16) - \param[out] none - \retval none -*/ -void timer_disable(uint32_t timer_periph) -{ - TIMER_CTL0(timer_periph) &= (uint32_t)TIMER_COUNTER_DISABLE; -} - -/*! - \brief enable the auto reload shadow function - \param[in] timer_periph: TIMERx(x=0,1,2,5,13,14,15,16) - \param[out] none - \retval none -*/ -void timer_auto_reload_shadow_enable(uint32_t timer_periph) -{ - TIMER_CTL0(timer_periph) |= (uint32_t) TIMER_ARSE_ENABLE; -} - -/*! - \brief disable the auto reload shadow function - \param[in] timer_periph: TIMERx(x=0,1,2,5,13,14,15,16) - \param[out] none - \retval none -*/ -void timer_auto_reload_shadow_disable(uint32_t timer_periph) -{ - TIMER_CTL0(timer_periph) &= (uint32_t) TIMER_ARSE_DISABLE; -} - -/*! - \brief enable the update event - \param[in] timer_periph: TIMERx(x=0,1,2,5,13,14,15,16) - \param[out] none - \retval none -*/ -void timer_update_event_enable(uint32_t timer_periph) -{ - TIMER_CTL0(timer_periph) |= (uint32_t) TIMER_UPDIS_ENABLE; -} - -/*! - \brief disable the update event - \param[in] timer_periph: TIMERx(x=0,1,2,5,13,14,15,16) - \param[out] none - \retval none -*/ -void timer_update_event_disable(uint32_t timer_periph) -{ - TIMER_CTL0(timer_periph) &= (uint32_t) TIMER_UPDIS_DISABLE; -} - -/*! - \brief set TIMER counter alignment mode - \param[in] timer_periph: TIMERx(x=0,1,2) - \param[in] aligned: - \arg TIMER_COUNTER_EDGE: edge-aligned mode - \arg TIMER_COUNTER_CENTER_DOWN: center-aligned and counting down assert mode - \arg TIMER_COUNTER_CENTER_UP: center-aligned and counting up assert mode - \arg TIMER_COUNTER_CENTER_BOTH: center-aligned and counting up/down assert mode - \param[out] none - \retval none -*/ -void timer_counter_alignment(uint32_t timer_periph, uint16_t aligned) -{ - TIMER_CTL0(timer_periph) &= (uint32_t)(~ TIMER_CTL0_CAM); - TIMER_CTL0(timer_periph) |= (uint32_t)aligned; -} - -/*! - \brief set TIMER counter up direction - \param[in] timer_periph: TIMERx(x=0,1,2,5,13,14,15,16) - \param[out] none - \retval none -*/ -void timer_counter_up_direction(uint32_t timer_periph) -{ - TIMER_CTL0(timer_periph) &= (uint32_t)(~ TIMER_CTL0_DIR); - TIMER_CTL0(timer_periph) |= (uint32_t)TIMER_COUNTER_UP; -} - -/*! - \brief set TIMER counter down direction - \param[in] timer_periph: TIMERx(x=0,1,2) - \param[out] none - \retval none -*/ -void timer_counter_down_direction(uint32_t timer_periph) -{ - TIMER_CTL0(timer_periph) &= (uint32_t)(~ TIMER_CTL0_DIR); - TIMER_CTL0(timer_periph) |= (uint32_t)TIMER_COUNTER_DOWN; -} - -/*! - \brief configure TIMER prescaler - \param[in] timer_periph: TIMERx(x=0,1,2,5,13,14,15,16) - \param[in] prescaler: prescaler value - \param[in] pscreload: prescaler reload mode - \arg TIMER_PSC_RELOAD_NOW: the prescaler is loaded right now - \arg TIMER_PSC_RELOAD_UPDATE: the prescaler is loaded at the next update event - \param[out] none - \retval none -*/ -void timer_prescaler_config(uint32_t timer_periph, uint16_t prescaler, uint8_t pscreload) -{ - TIMER_PSC(timer_periph) = (uint32_t)prescaler; - - if(TIMER_PSC_RELOAD_NOW == pscreload){ - TIMER_SWEVG(timer_periph) |= (uint32_t)TIMER_SWEVG_UPG; - } -} - -/*! - \brief configure TIMER repetition register value - \param[in] timer_periph: TIMERx(x=0,14,15,16) - \param[in] repetition: the counter repetition value - \param[out] none - \retval none -*/ -void timer_repetition_value_config(uint32_t timer_periph, uint16_t repetition) -{ - TIMER_CREP(timer_periph) = (uint32_t)repetition; -} - -/*! - \brief configure TIMER autoreload register value - \param[in] timer_periph: TIMERx(x=0,1,2,5,13,14,15,16) - \param[in] autoreload: the counter auto-reload value - \param[out] none - \retval none -*/ -void timer_autoreload_value_config(uint32_t timer_periph, uint16_t autoreload) -{ - TIMER_CAR(timer_periph) = (uint32_t)autoreload; -} - -/*! - \brief configure TIMER counter register value - \param[in] timer_periph: TIMERx(x=0,1,2,5,13,14,15,16) - \param[in] counter: the counter value - \param[out] none - \retval none -*/ -void timer_counter_value_config(uint32_t timer_periph, uint16_t counter) -{ - TIMER_CNT(timer_periph) = (uint32_t)counter; -} - -/*! - \brief read TIMER counter value - \param[in] timer_periph: TIMERx(x=0,1,2,5,13,14,15,16) - \param[out] none - \retval counter value -*/ -uint32_t timer_counter_read(uint32_t timer_periph) -{ - uint32_t count_value = 0U; - count_value = TIMER_CNT(timer_periph); - return (count_value); -} - -/*! - \brief read TIMER prescaler value - \param[in] timer_periph: TIMERx(x=0,1,2,5,13,14,15,16) - \param[out] none - \retval prescaler register value -*/ -uint16_t timer_prescaler_read(uint32_t timer_periph) -{ - uint16_t prescaler_value = 0U; - prescaler_value = (uint16_t)(TIMER_PSC(timer_periph)); - return (prescaler_value); -} - -/*! - \brief configure TIMER single pulse mode - \param[in] timer_periph: TIMERx(x=0,1,2,5,13,14,15,16) - \param[in] spmode: - \arg TIMER_SP_MODE_SINGLE: single pulse mode - \arg TIMER_SP_MODE_REPETITIVE: repetitive pulse mode - \param[out] none - \retval none -*/ -void timer_single_pulse_mode_config(uint32_t timer_periph, uint8_t spmode) -{ - if(TIMER_SP_MODE_SINGLE == spmode){ - TIMER_CTL0(timer_periph) |= (uint32_t)TIMER_CTL0_SPM; - }else if(TIMER_SP_MODE_REPETITIVE == spmode){ - TIMER_CTL0(timer_periph) &= ~((uint32_t)TIMER_CTL0_SPM); - }else{ - } -} - -/*! - \brief configure TIMER update source - \param[in] timer_periph: TIMERx(x=0,1,2,5,13,14,15,16) - \param[in] update: - \arg TIMER_UPDATE_SRC_GLOBAL: update generate by setting of UPG bit or the counter overflow/underflow,or the slave mode controller trigger - \arg TIMER_UPDATE_SRC_REGULAR: update generate only by counter overflow/underflow - \param[out] none - \retval none -*/ -void timer_update_source_config(uint32_t timer_periph, uint8_t update) -{ - if(TIMER_UPDATE_SRC_REGULAR == update){ - TIMER_CTL0(timer_periph) |= (uint32_t)TIMER_CTL0_UPS; - }else if(update == TIMER_UPDATE_SRC_GLOBAL){ - TIMER_CTL0(timer_periph) &= ~(uint32_t)TIMER_CTL0_UPS; - }else{ - } -} - -/*! - \brief enable the TIMER interrupt - \param[in] timer_periph: TIMERx(x=0,1,2,5,13,14,15,16) - \param[in] interrupt: timer interrupt enable source - \arg TIMER_INT_UP: update interrupt enable - \arg TIMER_INT_CH0: channel 0 interrupt enable - \arg TIMER_INT_CH1: channel 1 interrupt enable - \arg TIMER_INT_CH2: channel 2 interrupt enable - \arg TIMER_INT_CH3: channel 3 interrupt enable - \arg TIMER_INT_CMT: commutation interrupt enable - \arg TIMER_INT_TRG: trigger interrupt enable - \arg TIMER_INT_BRK: break interrupt enable - \param[out] none - \retval none -*/ -void timer_interrupt_enable(uint32_t timer_periph, uint32_t interrupt) -{ - TIMER_DMAINTEN(timer_periph) |= (uint32_t) interrupt; -} - -/*! - \brief disable the TIMER interrupt - \param[in] timer_periph: TIMERx(x=0,1,2,5,13,14,15,16) - \param[in] interrupt: timer interrupt source enable - \arg TIMER_INT_UP: update interrupt enable - \arg TIMER_INT_CH0: channel 0 interrupt enable - \arg TIMER_INT_CH1: channel 1 interrupt enable - \arg TIMER_INT_CH2: channel 2 interrupt enable - \arg TIMER_INT_CH3: channel 3 interrupt enable - \arg TIMER_INT_CMT: commutation interrupt enable - \arg TIMER_INT_TRG: trigger interrupt enable - \arg TIMER_INT_BRK: break interrupt enable - \param[out] none - \retval none -*/ -void timer_interrupt_disable(uint32_t timer_periph, uint32_t interrupt) -{ - TIMER_DMAINTEN(timer_periph) &= (uint32_t)(~ interrupt); -} - -/*! - \brief get timer interrupt flag - \param[in] timer_periph: TIMERx(x=0,1,2,5,13,14,15,16) - \param[in] interrupt: the timer interrupt bits - \arg TIMER_INT_FLAG_UP: update interrupt flag - \arg TIMER_INT_FLAG_CH0: channel 0 interrupt flag - \arg TIMER_INT_FLAG_CH1: channel 1 interrupt flag - \arg TIMER_INT_FLAG_CH2: channel 2 interrupt flag - \arg TIMER_INT_FLAG_CH3: channel 3 interrupt flag - \arg TIMER_INT_FLAG_CMT: channel commutation interrupt flag - \arg TIMER_INT_FLAG_TRG: trigger interrupt flag - \arg TIMER_INT_FLAG_BRK: break interrupt flag - \param[out] none - \retval FlagStatus: SET or RESET -*/ -FlagStatus timer_interrupt_flag_get(uint32_t timer_periph, uint32_t interrupt) -{ - uint16_t intval = 0U, intenable = 0U; - - intval = (uint16_t)(TIMER_INTF(timer_periph) & interrupt); - intenable = (uint16_t)(TIMER_DMAINTEN(timer_periph) & interrupt); - - if(((uint16_t)RESET != intval ) && (((uint16_t)RESET) != intenable)){ - return SET; - }else{ - return RESET; - } -} - -/*! - \brief clear TIMER interrupt flag - \param[in] timer_periph: TIMERx(x=0,1,2,5,13,14,15,16) - \param[in] interrupt: the timer interrupt bits - \arg TIMER_INT_FLAG_UP: update interrupt flag - \arg TIMER_INT_FLAG_CH0: channel 0 interrupt flag - \arg TIMER_INT_FLAG_CH1: channel 1 interrupt flag - \arg TIMER_INT_FLAG_CH2: channel 2 interrupt flag - \arg TIMER_INT_FLAG_CH3: channel 3 interrupt flag - \arg TIMER_INT_FLAG_CMT: channel commutation interrupt flag - \arg TIMER_INT_FLAG_TRG: trigger interrupt flag - \arg TIMER_INT_FLAG_BRK: break interrupt flag - \param[out] none - \retval none -*/ -void timer_interrupt_flag_clear(uint32_t timer_periph, uint32_t interrupt) -{ - TIMER_INTF(timer_periph) &= (uint32_t)(~(uint32_t)interrupt); -} - -/*! - \brief get TIMER flags - \param[in] timer_periph: TIMERx(x=0,1,2,5,13,14,15,16) - \param[in] flag: the timer interrupt flags - \arg TIMER_FLAG_UP: update flag - \arg TIMER_FLAG_CH0: channel 0 flag - \arg TIMER_FLAG_CH1: channel 1 flag - \arg TIMER_FLAG_CH2: channel 2 flag - \arg TIMER_FLAG_CH3: channel 3 flag - \arg TIMER_FLAG_CMT: channel commutation flag - \arg TIMER_FLAG_TRG: trigger flag - \arg TIMER_FLAG_BRK: break flag - \arg TIMER_FLAG_CH0O: channel 0 overcapture flag - \arg TIMER_FLAG_CH1O: channel 1 overcapture flag - \arg TIMER_FLAG_CH2O: channel 2 overcapture flag - \arg TIMER_FLAG_CH3O: channel 3 overcapture flag - \param[out] none - \retval FlagStatus: SET or RESET -*/ -FlagStatus timer_flag_get(uint32_t timer_periph, uint32_t flag) -{ - if(((uint16_t)RESET) != ((uint16_t)(TIMER_INTF(timer_periph) & flag))){ - return SET; - }else{ - return RESET; - } -} - -/*! - \brief clear TIMER flags - \param[in] timer_periph: TIMERx(x=0,1,2,5,13,14,15,16) - \param[in] flag: the timer interrupt flags - \arg TIMER_FLAG_UP: update flag - \arg TIMER_FLAG_CH0: channel 0 flag - \arg TIMER_FLAG_CH1: channel 1 flag - \arg TIMER_FLAG_CH2: channel 2 flag - \arg TIMER_FLAG_CH3: channel 3 flag - \arg TIMER_FLAG_CMT: channel commutation flag - \arg TIMER_FLAG_TRG: trigger flag - \arg TIMER_FLAG_BRK: break flag - \arg TIMER_FLAG_CH0O: channel 0 overcapture flag - \arg TIMER_FLAG_CH1O: channel 1 overcapture flag - \arg TIMER_FLAG_CH2O: channel 2 overcapture flag - \arg TIMER_FLAG_CH3O: channel 3 overcapture flag - \param[out] none - \retval none -*/ -void timer_flag_clear(uint32_t timer_periph, uint32_t flag) -{ - TIMER_INTF(timer_periph) &= (uint32_t)(~(uint32_t)flag); -} - -/*! - \brief enable the TIMER DMA - \param[in] timer_periph: TIMERx(x=0,1,2,5,14,15,16) - \param[in] dma: timer DMA source enable - \arg TIMER_DMA_UPD: update DMA enable - \arg TIMER_DMA_CH0D: channel 0 DMA enable - \arg TIMER_DMA_CH1D: channel 1 DMA enable - \arg TIMER_DMA_CH2D: channel 2 DMA enable - \arg TIMER_DMA_CH3D: channel 3 DMA enable - \arg TIMER_DMA_CMTD: channel commutation DMA request enable - \arg TIMER_DMA_TRGD: trigger DMA enable - \param[out] none - \retval none -*/ -void timer_dma_enable(uint32_t timer_periph, uint16_t dma) -{ - TIMER_DMAINTEN(timer_periph) |= (uint32_t) dma; -} - -/*! - \brief disable the TIMER DMA - \param[in] timer_periph: TIMERx(x=0,1,2,5,14,15,16) - \param[in] dma: timer DMA source enable - \arg TIMER_DMA_UPD: update DMA enable - \arg TIMER_DMA_CH0D: channel 0 DMA enable - \arg TIMER_DMA_CH1D: channel 1 DMA enable - \arg TIMER_DMA_CH2D: channel 2 DMA enable - \arg TIMER_DMA_CH3D: channel 3 DMA enable - \arg TIMER_DMA_CMTD: channel commutation DMA request enable - \arg TIMER_DMA_TRGD: trigger DMA enable - \param[out] none - \retval none -*/ -void timer_dma_disable(uint32_t timer_periph, uint16_t dma) -{ - TIMER_DMAINTEN(timer_periph) &= ~(uint32_t)dma; -} - -/*! - \brief channel DMA request source selection - \param[in] timer_periph: TIMERx(x=0,1,2,5,14,15,16) - \param[in] dma_request: channel DMA request source selection - \arg TIMER_DMAREQUEST_CHANNELEVENT: DMA request of channel y is sent when channel y event occurs - \arg TIMER_DMAREQUEST_UPDATEEVENT: DMA request of channel y is sent when update event occurs - \param[out] none - \retval none -*/ -void timer_channel_dma_request_source_select(uint32_t timer_periph, uint8_t dma_request) -{ - if(TIMER_DMAREQUEST_UPDATEEVENT == dma_request){ - TIMER_CTL1(timer_periph) |= (uint32_t)TIMER_CTL1_DMAS; - }else if(TIMER_DMAREQUEST_CHANNELEVENT == dma_request){ - TIMER_CTL1(timer_periph) &= ~(uint32_t)TIMER_CTL1_DMAS; - }else{ - } -} - -/*! - \brief configure the TIMER DMA transfer - \param[in] timer_periph: TIMERx(x=0,1,2,5,14,15,16) - \param[in] dma_baseaddr: - \arg TIMER_DMACFG_DMATA_CTL0: DMA transfer address is TIMER_CTL0 - \arg TIMER_DMACFG_DMATA_CTL1: DMA transfer address is TIMER_CTL1 - \arg TIMER_DMACFG_DMATA_SMCFG: DMA transfer address is TIMER_SMCFG - \arg TIMER_DMACFG_DMATA_DMAINTEN: DMA transfer address is TIMER_DMAINTEN - \arg TIMER_DMACFG_DMATA_INTF: DMA transfer address is TIMER_INTF - \arg TIMER_DMACFG_DMATA_SWEVG: DMA transfer address is TIMER_SWEVG - \arg TIMER_DMACFG_DMATA_CHCTL0: DMA transfer address is TIMER_CHCTL0 - \arg TIMER_DMACFG_DMATA_CHCTL1: DMA transfer address is TIMER_CHCTL1 - \arg TIMER_DMACFG_DMATA_CHCTL2: DMA transfer address is TIMER_CHCTL2 - \arg TIMER_DMACFG_DMATA_CNT: DMA transfer address is TIMER_CNT - \arg TIMER_DMACFG_DMATA_PSC: DMA transfer address is TIMER_PSC - \arg TIMER_DMACFG_DMATA_CAR: DMA transfer address is TIMER_CAR - \arg TIMER_DMACFG_DMATA_CREP: DMA transfer address is TIMER_CREP - \arg TIMER_DMACFG_DMATA_CH0CV: DMA transfer address is TIMER_CH0CV - \arg TIMER_DMACFG_DMATA_CH1CV: DMA transfer address is TIMER_CH1CV - \arg TIMER_DMACFG_DMATA_CH2CV: DMA transfer address is TIMER_CH2CV - \arg TIMER_DMACFG_DMATA_CH3CV: DMA transfer address is TIMER_CH3CV - \arg TIMER_DMACFG_DMATA_CCHP: DMA transfer address is TIMER_CCHP - \arg TIMER_DMACFG_DMATA_DMACFG: DMA transfer address is TIMER_DMACFG - \arg TIMER_DMACFG_DMATA_DMATB: DMA transfer address is TIMER_DMATB - \param[in] dma_lenth: - \arg TIMER_DMACFG_DMATC_xTRANSFER(x=1..18): DMA transfer x time - \param[out] none - \retval none -*/ -void timer_dma_transfer_config(uint32_t timer_periph, uint32_t dma_baseaddr, uint32_t dma_lenth) -{ - TIMER_DMACFG(timer_periph) &= (uint32_t)(~(TIMER_DMACFG_DMATA | TIMER_DMACFG_DMATC)); - TIMER_DMACFG(timer_periph) |= (uint32_t)(dma_baseaddr | dma_lenth); -} - -/*! - \brief software generate events - \param[in] timer_periph: TIMERx(x=0,1,2,5,13,14,15,16) - \param[in] event: the timer software event generation sources - \arg TIMER_EVENT_SRC_UPG: update event generation - \arg TIMER_EVENT_SRC_CH0G: channel 0 capture or compare event generation - \arg TIMER_EVENT_SRC_CH1G: channel 1 capture or compare event generation - \arg TIMER_EVENT_SRC_CH2G: channel 2 capture or compare event generation - \arg TIMER_EVENT_SRC_CH3G: channel 3 capture or compare event generation - \arg TIMER_EVENT_SRC_CMTG: channel commutation event generation - \arg TIMER_EVENT_SRC_TRGG: trigger event generation - \arg TIMER_EVENT_SRC_BRKG: break event generation - \param[out] none - \retval none -*/ -void timer_event_software_generate(uint32_t timer_periph, uint16_t event) -{ - TIMER_SWEVG(timer_periph) |= (uint32_t)event; -} - -/*! - \brief configure TIMER break function - \param[in] timer_periph: TIMERx(x=0,14,15,16) - \param[in] breakpara: TIMER break parameter struct - runoffstate: TIMER_ROS_STATE_ENABLE,TIMER_ROS_STATE_DISABLE - ideloffstate: TIMER_IOS_STATE_ENABLE,TIMER_IOS_STATE_DISABLE - deadtime: 0~255 - breakpolarity: TIMER_BREAK_POLARITY_LOW,TIMER_BREAK_POLARITY_HIGH - outputautostate: TIMER_OUTAUTO_ENABLE,TIMER_OUTAUTO_DISABLE - protectmode: TIMER_CCHP_PROT_OFF,TIMER_CCHP_PROT_0,TIMER_CCHP_PROT_1,TIMER_CCHP_PROT_2 - breakstate: TIMER_BREAK_ENABLE,TIMER_BREAK_DISABLE - \param[out] none - \retval none -*/ -void timer_break_config(uint32_t timer_periph, timer_break_parameter_struct* breakpara) -{ - TIMER_CCHP(timer_periph) = (uint32_t)(((uint32_t)breakpara->runoffstate) | - ((uint32_t)breakpara->ideloffstate) | - ((uint32_t)breakpara->deadtime) | - ((uint32_t)breakpara->breakpolarity) | - ((uint32_t)breakpara->outputautostate) | - ((uint32_t)breakpara->protectmode) | - ((uint32_t)breakpara->breakstate)); -} - -/*! - \brief enable TIMER break function - \param[in] timer_periph: TIMERx(x=0,14,15,16) - \param[out] none - \retval none -*/ -void timer_break_enable(uint32_t timer_periph) -{ - TIMER_CCHP(timer_periph) |= (uint32_t)TIMER_BREAK_ENABLE; -} - -/*! - \brief disable TIMER break function - \param[in] timer_periph: TIMERx(x=0,14,15,16) - \param[out] none - \retval none -*/ -void timer_break_disable(uint32_t timer_periph) -{ - TIMER_CCHP(timer_periph) &= (uint32_t)TIMER_BREAK_DISABLE; -} - -/*! - \brief enable TIMER output automatic function - \param[in] timer_periph: TIMERx(x=0,14,15,16) - \param[out] none - \retval none -*/ -void timer_automatic_output_enable(uint32_t timer_periph) -{ - TIMER_CCHP(timer_periph) |= (uint32_t)TIMER_OUTAUTO_ENABLE; -} - -/*! - \brief disable TIMER output automatic function - \param[in] timer_periph: TIMERx(x=0,14,15,16) - \param[out] none - \retval none -*/ -void timer_automatic_output_disable(uint32_t timer_periph) -{ - TIMER_CCHP(timer_periph) &= (uint32_t)TIMER_OUTAUTO_DISABLE; -} - -/*! - \brief configure TIMER primary output function - \param[in] timer_periph: TIMERx(x=0,14,15,16) - \param[in] newvalue: ENABLE or DISABLE - \param[out] none - \retval none -*/ -void timer_primary_output_config(uint32_t timer_periph,ControlStatus newvalue) -{ - if(newvalue){ - TIMER_CCHP(timer_periph) |= (uint32_t)TIMER_CCHP_POEN; - }else{ - TIMER_CCHP(timer_periph) &= (uint32_t)(~ TIMER_CCHP_POEN); - } -} - -/*! - \brief channel capture/compare control shadow register enable - \param[in] timer_periph: TIMERx(x=0,14,15,16) - \param[in] newvalue: ENABLE or DISABLE - \param[out] none - \retval none -*/ -void timer_channel_control_shadow_config(uint32_t timer_periph, ControlStatus newvalue) -{ - if(newvalue){ - TIMER_CTL1(timer_periph) |= (uint32_t)TIMER_CTL1_CCSE; - }else{ - TIMER_CTL1(timer_periph) &= (uint32_t)(~TIMER_CTL1_CCSE); - } -} - -/*! - \brief configure TIMER channel control shadow register update control - \param[in] timer_periph: TIMERx(x=0,1,2) - \param[in] ccuctl: channel control shadow register update control - \arg TIMER_UPDATECTL_CCU: the shadow registers update by when CMTG bit is set - \arg TIMER_UPDATECTL_CCUTRI: the shadow registers update by when CMTG bit is set or an rising edge of TRGI occurs - \param[out] none - \retval none -*/ -void timer_channel_control_shadow_update_config(uint32_t timer_periph, uint8_t ccuctl) -{ - if(TIMER_UPDATECTL_CCU == ccuctl){ - TIMER_CTL1(timer_periph) &= (~(uint32_t)TIMER_CTL1_CCUC); - }else if(TIMER_UPDATECTL_CCUTRI == ccuctl){ - TIMER_CTL1(timer_periph) |= (uint32_t)TIMER_CTL1_CCUC; - }else{ - } -} - -/*! - \brief configure TIMER channel output function - \param[in] timer_periph: TIMERx(x=0,1,2,13,14,15,16) - \param[in] channel: - \arg TIMER_CH_0: TIMER channel0(TIMERx(x=0,1,2,13,14,15,16)) - \arg TIMER_CH_1: TIMER channel1(TIMERx(x=0,1,2,14)) - \arg TIMER_CH_2: TIMER channel2(TIMERx(x=0,1,2)) - \arg TIMER_CH_3: TIMER channel3(TIMERx(x=0,1,2)) - \param[in] ocpara: TIMER channeln output parameter struct - outputstate: TIMER_CCX_ENABLE,TIMER_CCX_DISABLE - outputnstate: TIMER_CCXN_ENABLE,TIMER_CCXN_DISABLE - ocpolarity: TIMER_OC_POLARITY_HIGH,TIMER_OC_POLARITY_LOW - ocnpolarity: TIMER_OCN_POLARITY_HIGH,TIMER_OCN_POLARITY_LOW - ocidlestate: TIMER_OC_IDLE_STATE_LOW,TIMER_OC_IDLE_STATE_HIGH - ocnidlestate: TIMER_OCN_IDLE_STATE_LOW,TIMER_OCN_IDLE_STATE_HIGH - \param[out] none - \retval none -*/ -void timer_channel_output_config(uint32_t timer_periph, uint16_t channel, timer_oc_parameter_struct* ocpara) -{ - switch(channel){ - /* configure TIMER_CH_0 */ - case TIMER_CH_0: - /* reset the CH0EN bit */ - TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH0EN); - /* set the CH0EN bit */ - TIMER_CHCTL2(timer_periph) |= (uint32_t)ocpara->outputstate; - /* reset the CH0P bit */ - TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH0P); - /* set the CH0P bit */ - TIMER_CHCTL2(timer_periph) |= (uint32_t)ocpara->ocpolarity; - - if((TIMER0 == timer_periph) || (TIMER14 == timer_periph) || (TIMER15 == timer_periph) || (TIMER16 == timer_periph)){ - /* reset the CH0NEN bit */ - TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH0NEN); - /* set the CH0NEN bit */ - TIMER_CHCTL2(timer_periph) |= (uint32_t)ocpara->outputnstate; - /* reset the CH0NP bit */ - TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH0NP); - /* set the CH0NP bit */ - TIMER_CHCTL2(timer_periph) |= (uint32_t)ocpara->ocnpolarity; - /* reset the ISO0 bit */ - TIMER_CTL1(timer_periph) &=(uint32_t)(~TIMER_CTL1_ISO0); - /* set the ISO0 bit */ - TIMER_CTL1(timer_periph) |= (uint32_t)ocpara->ocidlestate; - /* reset the ISO0N bit */ - TIMER_CTL1(timer_periph) &=(uint32_t)(~TIMER_CTL1_ISO0N); - /* set the ISO0N bit */ - TIMER_CTL1(timer_periph) |= (uint32_t)ocpara->ocnidlestate; - } - break; - /* configure TIMER_CH_1 */ - case TIMER_CH_1: - /* reset the CH1EN bit */ - TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH1EN); - /* set the CH1EN bit */ - TIMER_CHCTL2(timer_periph) |= (uint32_t)((uint32_t)ocpara->outputstate << 4); - /* reset the CH1P bit */ - TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH1P); - /* set the CH1P bit */ - TIMER_CHCTL2(timer_periph) |= (uint32_t)((uint32_t)ocpara->ocpolarity << 4); - - if((TIMER0 == timer_periph)){ - /* reset the CH1NEN bit */ - TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH1NEN); - /* set the CH1NEN bit */ - TIMER_CHCTL2(timer_periph) |= (uint32_t)((uint32_t)ocpara->outputnstate << 4); - /* reset the CH1NP bit */ - TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH1NP); - /* set the CH1NP bit */ - TIMER_CHCTL2(timer_periph) |= (uint32_t)((uint32_t)ocpara->ocnpolarity << 4); - /* reset the ISO1 bit */ - TIMER_CTL1(timer_periph) &=(uint32_t)(~TIMER_CTL1_ISO1); - /* set the ISO1 bit */ - TIMER_CTL1(timer_periph) |= (uint32_t)((uint32_t)ocpara->ocidlestate << 2); - /* reset the ISO1N bit */ - TIMER_CTL1(timer_periph) &=(uint32_t)(~TIMER_CTL1_ISO1N); - /* set the ISO1N bit */ - TIMER_CTL1(timer_periph) |= (uint32_t)((uint32_t)ocpara->ocnidlestate << 2); - } - break; - /* configure TIMER_CH_2 */ - case TIMER_CH_2: - /* reset the CH2EN bit */ - TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH2EN); - /* set the CH2EN bit */ - TIMER_CHCTL2(timer_periph) |= (uint32_t)((uint32_t)ocpara->outputstate << 8); - /* reset the CH2P bit */ - TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH2P); - /* set the CH2P bit */ - TIMER_CHCTL2(timer_periph) |= (uint32_t)((uint32_t)ocpara->ocpolarity << 8); - - if((TIMER0 == timer_periph)){ - /* reset the CH2NEN bit */ - TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH2NEN); - /* set the CH2NEN bit */ - TIMER_CHCTL2(timer_periph) |= (uint32_t)((uint32_t)ocpara->outputnstate << 8); - /* reset the CH2NP bit */ - TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH2NP); - /* set the CH2NP bit */ - TIMER_CHCTL2(timer_periph) |= (uint32_t)((uint32_t)ocpara->ocnpolarity << 8); - /* reset the ISO2 bit */ - TIMER_CTL1(timer_periph) &=(uint32_t)(~TIMER_CTL1_ISO2); - /* set the ISO2 bit */ - TIMER_CTL1(timer_periph) |= (uint32_t)((uint32_t)ocpara->ocidlestate << 4); - /* reset the ISO2N bit */ - TIMER_CTL1(timer_periph) &=(uint32_t)(~TIMER_CTL1_ISO2N); - /* set the ISO2N bit */ - TIMER_CTL1(timer_periph) |= (uint32_t)((uint32_t)ocpara->ocnidlestate << 4); - } - break; - /* configure TIMER_CH_3 */ - case TIMER_CH_3: - /* reset the CH3EN bit */ - TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH3EN); - /* set the CH3EN bit */ - TIMER_CHCTL2(timer_periph) |= (uint32_t)((uint32_t)ocpara->outputstate << 12); - /* reset the CH3P bit */ - TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH3P); - /* set the CH3P bit */ - TIMER_CHCTL2(timer_periph) |= (uint32_t)((uint32_t)ocpara->ocpolarity << 12); - - if((TIMER0 == timer_periph)){ - /* reset the ISO3 bit */ - TIMER_CTL1(timer_periph) &=(uint32_t)(~TIMER_CTL1_ISO3); - /* set the ISO3 bit */ - TIMER_CTL1(timer_periph) |= (uint32_t)((uint32_t)ocpara->ocidlestate << 6); - } - break; - default: - break; - } -} - -/*! - \brief configure TIMER channel output compare mode - \param[in] timer_periph: TIMERx(x=0,1,2,13,14,15,16) - \param[in] channel: - \arg TIMER_CH_0: TIMER channel0(TIMERx(x=0,1,2,13,14,15,16)) - \arg TIMER_CH_1: TIMER channel1(TIMERx(x=0,1,2,14)) - \arg TIMER_CH_2: TIMER channel2(TIMERx(x=0,1,2)) - \arg TIMER_CH_3: TIMER channel3(TIMERx(x=0,1,2)) - \param[in] ocmode: channel output compare mode - \arg TIMER_OC_MODE_TIMING: timing mode - \arg TIMER_OC_MODE_ACTIVE: active mode - \arg TIMER_OC_MODE_INACTIVE: inactive mode - \arg TIMER_OC_MODE_TOGGLE: toggle mode - \arg TIMER_OC_MODE_LOW: force low mode - \arg TIMER_OC_MODE_HIGH: force high mode - \arg TIMER_OC_MODE_PWM0: PWM0 mode - \arg TIMER_OC_MODE_PWM1: PWM1 mode - \param[out] none - \retval none -*/ -void timer_channel_output_mode_config(uint32_t timer_periph, uint16_t channel, uint16_t ocmode) -{ - switch(channel){ - /* configure TIMER_CH_0 */ - case TIMER_CH_0: - TIMER_CHCTL0(timer_periph) &=(uint32_t)(~TIMER_CHCTL0_CH0COMCTL); - TIMER_CHCTL0(timer_periph) |= (uint32_t)ocmode; - break; - /* configure TIMER_CH_1 */ - case TIMER_CH_1: - TIMER_CHCTL0(timer_periph) &=(uint32_t)(~TIMER_CHCTL0_CH1COMCTL); - TIMER_CHCTL0(timer_periph) |= (uint32_t)((uint32_t)ocmode << 8); - break; - /* configure TIMER_CH_2 */ - case TIMER_CH_2: - TIMER_CHCTL1(timer_periph) &=(uint32_t)(~TIMER_CHCTL1_CH2COMCTL); - TIMER_CHCTL1(timer_periph) |= (uint32_t)ocmode; - break; - /* configure TIMER_CH_3 */ - case TIMER_CH_3: - TIMER_CHCTL1(timer_periph) &=(uint32_t)(~TIMER_CHCTL1_CH3COMCTL); - TIMER_CHCTL1(timer_periph) |= (uint32_t)((uint32_t)ocmode << 8); - break; - default: - break; - } -} - -/*! - \brief configure TIMER channel output pulse value - \param[in] timer_periph: TIMERx(x=0,1,2,13,14,15,16) - \param[in] channel: - \arg TIMER_CH_0: TIMER channel0(TIMERx(x=0,1,2,13,14,15,16)) - \arg TIMER_CH_1: TIMER channel1(TIMERx(x=0,1,2,14)) - \arg TIMER_CH_2: TIMER channel2(TIMERx(x=0,1,2)) - \arg TIMER_CH_3: TIMER channel3(TIMERx(x=0,1,2)) - \param[in] pulse: channel output pulse value - \param[out] none - \retval none -*/ -void timer_channel_output_pulse_value_config(uint32_t timer_periph, uint16_t channel, uint32_t pulse) -{ - switch(channel){ - /* configure TIMER_CH_0 */ - case TIMER_CH_0: - TIMER_CH0CV(timer_periph) = (uint32_t)pulse; - break; - /* configure TIMER_CH_1 */ - case TIMER_CH_1: - TIMER_CH1CV(timer_periph) = (uint32_t)pulse; - break; - /* configure TIMER_CH_2 */ - case TIMER_CH_2: - TIMER_CH2CV(timer_periph) = (uint32_t)pulse; - break; - /* configure TIMER_CH_3 */ - case TIMER_CH_3: - TIMER_CH3CV(timer_periph) = (uint32_t)pulse; - break; - default: - break; - } -} - -/*! - \brief configure TIMER channel output shadow function - \param[in] timer_periph: TIMERx(x=0,1,2,13,14,15,16) - \param[in] channel: - \arg TIMER_CH_0: TIMER channel0(TIMERx(x=0,1,2,13,14,15,16)) - \arg TIMER_CH_1: TIMER channel1(TIMERx(x=0,1,2,14)) - \arg TIMER_CH_2: TIMER channel2(TIMERx(x=0,1,2)) - \arg TIMER_CH_3: TIMER channel3(TIMERx(x=0,1,2)) - \param[in] ocshadow: channel output shadow state - \arg TIMER_OC_SHADOW_ENABLE: channel output shadow state enable - \arg TIMER_OC_SHADOW_DISABLE: channel output shadow state disable - \param[out] none - \retval none -*/ -void timer_channel_output_shadow_config(uint32_t timer_periph, uint16_t channel, uint16_t ocshadow) -{ - switch(channel){ - /* configure TIMER_CH_0 */ - case TIMER_CH_0: - TIMER_CHCTL0(timer_periph) &=(uint32_t)(~TIMER_CHCTL0_CH0COMSEN); - TIMER_CHCTL0(timer_periph) |= (uint32_t)ocshadow; - break; - /* configure TIMER_CH_1 */ - case TIMER_CH_1: - TIMER_CHCTL0(timer_periph) &=(uint32_t)(~TIMER_CHCTL0_CH1COMSEN); - TIMER_CHCTL0(timer_periph) |= (uint32_t)((uint32_t)ocshadow << 8); - break; - /* configure TIMER_CH_2 */ - case TIMER_CH_2: - TIMER_CHCTL1(timer_periph) &=(uint32_t)(~TIMER_CHCTL1_CH2COMSEN); - TIMER_CHCTL1(timer_periph) |= (uint32_t)ocshadow; - break; - /* configure TIMER_CH_3 */ - case TIMER_CH_3: - TIMER_CHCTL1(timer_periph) &=(uint32_t)(~TIMER_CHCTL1_CH3COMSEN); - TIMER_CHCTL1(timer_periph) |= (uint32_t)((uint32_t)ocshadow << 8); - break; - default: - break; - } -} - -/*! - \brief configure TIMER channel output fast function - \param[in] timer_periph: TIMERx(x=0,1,2,13,14,15,16) - \param[in] channel: - \arg TIMER_CH_0: TIMER channel0(TIMERx(x=0,1,2,13,14,15,16)) - \arg TIMER_CH_1: TIMER channel1(TIMERx(x=0,1,2,14)) - \arg TIMER_CH_2: TIMER channel2(TIMERx(x=0,1,2)) - \arg TIMER_CH_3: TIMER channel3(TIMERx(x=0,1,2)) - \param[in] ocfast: channel output fast function - \arg TIMER_OC_FAST_ENABLE: channel output fast function enable - \arg TIMER_OC_FAST_DISABLE: channel output fast function disable - \param[out] none - \retval none -*/ -void timer_channel_output_fast_config(uint32_t timer_periph, uint16_t channel, uint16_t ocfast) -{ - switch(channel){ - /* configure TIMER_CH_0 */ - case TIMER_CH_0: - TIMER_CHCTL0(timer_periph) &=(uint32_t)(~TIMER_CHCTL0_CH0COMFEN); - TIMER_CHCTL0(timer_periph) |= (uint32_t)ocfast; - break; - /* configure TIMER_CH_1 */ - case TIMER_CH_1: - TIMER_CHCTL0(timer_periph) &=(uint32_t)(~TIMER_CHCTL0_CH1COMFEN); - TIMER_CHCTL0(timer_periph) |= (uint32_t)((uint32_t)ocfast << 8); - break; - /* configure TIMER_CH_2 */ - case TIMER_CH_2: - TIMER_CHCTL1(timer_periph) &=(uint32_t)(~TIMER_CHCTL1_CH2COMFEN); - TIMER_CHCTL1(timer_periph) |= (uint32_t)ocfast; - break; - /* configure TIMER_CH_3 */ - case TIMER_CH_3: - TIMER_CHCTL1(timer_periph) &=(uint32_t)(~TIMER_CHCTL1_CH3COMFEN); - TIMER_CHCTL1(timer_periph) |= (uint32_t)((uint32_t)ocfast << 8); - break; - default: - break; - } -} - -/*! - \brief configure TIMER channel output clear function - \param[in] timer_periph: TIMERx(x=0,1,2,13,14,15,16) - \param[in] channel: - \arg TIMER_CH_0: TIMER channel0(TIMERx(x=0,1,2,13,14,15,16)) - \arg TIMER_CH_1: TIMER channel1(TIMERx(x=0,1,2,14)) - \arg TIMER_CH_2: TIMER channel2(TIMERx(x=0,1,2)) - \arg TIMER_CH_3: TIMER channel3(TIMERx(x=0,1,2)) - \param[in] occlear: channel output clear function - \arg TIMER_OC_CLEAR_ENABLE: channel output clear function enable - \arg TIMER_OC_CLEAR_DISABLE: channel output clear function disable - \param[out] none - \retval none -*/ -void timer_channel_output_clear_config(uint32_t timer_periph, uint16_t channel, uint16_t occlear) -{ - switch(channel){ - /* configure TIMER_CH_0 */ - case TIMER_CH_0: - TIMER_CHCTL0(timer_periph) &=(uint32_t)(~TIMER_CHCTL0_CH0COMCEN); - TIMER_CHCTL0(timer_periph) |= (uint32_t)occlear; - break; - /* configure TIMER_CH_1 */ - case TIMER_CH_1: - TIMER_CHCTL0(timer_periph) &=(uint32_t)(~TIMER_CHCTL0_CH1COMCEN); - TIMER_CHCTL0(timer_periph) |= (uint32_t)((uint32_t)occlear << 8); - break; - /* configure TIMER_CH_2 */ - case TIMER_CH_2: - TIMER_CHCTL1(timer_periph) &=(uint32_t)(~TIMER_CHCTL1_CH2COMCEN); - TIMER_CHCTL1(timer_periph) |= (uint32_t)occlear; - break; - /* configure TIMER_CH_3 */ - case TIMER_CH_3: - TIMER_CHCTL1(timer_periph) &=(uint32_t)(~TIMER_CHCTL1_CH3COMCEN); - TIMER_CHCTL1(timer_periph) |= (uint32_t)((uint32_t)occlear << 8); - break; - default: - break; - } -} - -/*! - \brief configure TIMER channel output polarity - \param[in] timer_periph: TIMERx(x=0,1,2,13,14,15,16) - \param[in] channel: - \arg TIMER_CH_0: TIMER channel0(TIMERx(x=0,1,2,13,14,15,16)) - \arg TIMER_CH_1: TIMER channel1(TIMERx(x=0,1,2,14)) - \arg TIMER_CH_2: TIMER channel2(TIMERx(x=0,1,2)) - \arg TIMER_CH_3: TIMER channel3(TIMERx(x=0,1,2)) - \param[in] ocpolarity: channel output polarity - \arg TIMER_OC_POLARITY_HIGH: channel output polarity is high - \arg TIMER_OC_POLARITY_LOW: channel output polarity is low - \param[out] none - \retval none -*/ -void timer_channel_output_polarity_config(uint32_t timer_periph, uint16_t channel, uint16_t ocpolarity) -{ - switch(channel){ - /* configure TIMER_CH_0 */ - case TIMER_CH_0: - TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH0P); - TIMER_CHCTL2(timer_periph) |= (uint32_t)ocpolarity; - break; - /* configure TIMER_CH_1 */ - case TIMER_CH_1: - TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH1P); - TIMER_CHCTL2(timer_periph) |= (uint32_t)((uint32_t)ocpolarity << 4); - break; - /* configure TIMER_CH_2 */ - case TIMER_CH_2: - TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH2P); - TIMER_CHCTL2(timer_periph) |= (uint32_t)((uint32_t)ocpolarity << 8); - break; - /* configure TIMER_CH_3 */ - case TIMER_CH_3: - TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH3P); - TIMER_CHCTL2(timer_periph) |= (uint32_t)((uint32_t)ocpolarity << 12); - break; - default: - break; - } -} - -/*! - \brief configure TIMER channel complementary output polarity - \param[in] timer_periph: TIMERx(x=0,1,2,13,14,15,16) - \param[in] channel: - \arg TIMER_CH_0: TIMER channel0(TIMERx(x=0,1,2,13,14,15,16)) - \arg TIMER_CH_1: TIMER channel1(TIMERx(x=0,1,2,14)) - \arg TIMER_CH_2: TIMER channel2(TIMERx(x=0,1,2)) - \param[in] ocnpolarity: channel complementary output polarity - \arg TIMER_OCN_POLARITY_HIGH: channel complementary output polarity is high - \arg TIMER_OCN_POLARITY_LOW: channel complementary output polarity is low - \param[out] none - \retval none -*/ -void timer_channel_complementary_output_polarity_config(uint32_t timer_periph, uint16_t channel, uint16_t ocnpolarity) -{ - switch(channel){ - /* configure TIMER_CH_0 */ - case TIMER_CH_0: - TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH0NP); - TIMER_CHCTL2(timer_periph) |= (uint32_t)ocnpolarity; - break; - /* configure TIMER_CH_1 */ - case TIMER_CH_1: - TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH1NP); - TIMER_CHCTL2(timer_periph) |= (uint32_t)((uint32_t)ocnpolarity << 4); - break; - /* configure TIMER_CH_2 */ - case TIMER_CH_2: - TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH2NP); - TIMER_CHCTL2(timer_periph) |= (uint32_t)((uint32_t)ocnpolarity << 8); - break; - default: - break; - } -} - -/*! - \brief configure TIMER OCPRE clear source selection - \param[in] timer_periph: TIMERx(x=0,1,2) - \param[in] clear: OCPRE clear source - \arg TIMER_OCPRE_CLEAR_SOURCE_ETIF: OCPRE_CLR_INT is connected to ETIF - \arg TIMER_OCPRE_CLEAR_SOURCE_CLR: OCPRE_CLR_INT is connected to the OCPRE_CLR input - \param[out] none - \retval none -*/ -void timer_ocpre_clear_source_config(uint32_t timer_periph, uint8_t ocpreclear) -{ - if(TIMER_OCPRE_CLEAR_SOURCE_ETIF == ocpreclear){ - TIMER_SMCFG(timer_periph) |= (uint32_t)TIMER_SMCFG_OCRC; - }else if(TIMER_OCPRE_CLEAR_SOURCE_CLR == ocpreclear){ - TIMER_SMCFG(timer_periph) &= ~(uint32_t)TIMER_SMCFG_OCRC; - }else{ - } -} - -/*! - \brief configure TIMER channel enable state - \param[in] timer_periph: TIMERx(x=0,1,2,13,14,15,16) - \param[in] channel: - \arg TIMER_CH_0: TIMER channel0(TIMERx(x=0,1,2,13,14,15,16)) - \arg TIMER_CH_1: TIMER channel1(TIMERx(x=0,1,2,14)) - \arg TIMER_CH_2: TIMER channel2(TIMERx(x=0,1,2)) - \arg TIMER_CH_3: TIMER channel3(TIMERx(x=0,1,2)) - \param[in] state: TIMER channel enable state - \arg TIMER_CCX_ENABLE: channel enable - \arg TIMER_CCX_DISABLE: channel disable - \param[out] none - \retval none -*/ -void timer_channel_output_state_config(uint32_t timer_periph, uint16_t channel, uint16_t state) -{ - switch(channel){ - /* configure TIMER_CH_0 */ - case TIMER_CH_0: - TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH0EN); - TIMER_CHCTL2(timer_periph) |= (uint32_t)state; - break; - /* configure TIMER_CH_1 */ - case TIMER_CH_1: - TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH1EN); - TIMER_CHCTL2(timer_periph) |= (uint32_t)((uint32_t)state << 4); - break; - /* configure TIMER_CH_2 */ - case TIMER_CH_2: - TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH2EN); - TIMER_CHCTL2(timer_periph) |= (uint32_t)((uint32_t)state << 8); - break; - /* configure TIMER_CH_3 */ - case TIMER_CH_3: - TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH3EN); - TIMER_CHCTL2(timer_periph) |= (uint32_t)((uint32_t)state << 12); - break; - default: - break; - } -} - -/*! - \brief configure TIMER channel complementary output enable state - \param[in] timer_periph: TIMERx(x=0,1,2,13,14,15,16) - \param[in] channel: - \arg TIMER_CH_0: TIMER channel0(TIMERx(x=0,1,2,13,14,15,16)) - \arg TIMER_CH_1: TIMER channel1(TIMERx(x=0,1,2,14)) - \arg TIMER_CH_2: TIMER channel2(TIMERx(x=0,1,2)) - \param[in] ocnstate: TIMER channel complementary output enable state - \arg TIMER_CCXN_ENABLE: channel complementary enable - \arg TIMER_CCXN_DISABLE: channel complementary disable - \param[out] none - \retval none -*/ -void timer_channel_complementary_output_state_config(uint32_t timer_periph, uint16_t channel, uint16_t ocnstate) -{ - switch(channel){ - /* configure TIMER_CH_0 */ - case TIMER_CH_0: - TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH0NEN); - TIMER_CHCTL2(timer_periph) |= (uint32_t)ocnstate; - break; - /* configure TIMER_CH_1 */ - case TIMER_CH_1: - TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH1NEN); - TIMER_CHCTL2(timer_periph) |= (uint32_t)((uint32_t)ocnstate << 4); - break; - /* configure TIMER_CH_2 */ - case TIMER_CH_2: - TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH2NEN); - TIMER_CHCTL2(timer_periph) |= (uint32_t)((uint32_t)ocnstate << 8); - break; - default: - break; - } -} - -/*! - \brief configure TIMER input capture parameter - \param[in] timer_periph: TIMERx(x=0,1,2,5,13,14,15,16) - \param[in] channel: - \arg TIMER_CH_0: TIMER channel0(TIMERx(x=0,1,2,13,14,15,16)) - \arg TIMER_CH_1: TIMER channel1(TIMERx(x=0,1,2,14)) - \arg TIMER_CH_2: TIMER channel2(TIMERx(x=0,1,2)) - \arg TIMER_CH_3: TIMER channel3(TIMERx(x=0,1,2)) - \param[in] icpara: TIMER channel intput parameter struct - icpolarity: TIMER_IC_POLARITY_RISING,TIMER_IC_POLARITY_FALLING,TIMER_IC_POLARITY_BOTH_EDGE - icselection: TIMER_IC_SELECTION_DIRECTTI,TIMER_IC_SELECTION_INDIRECTTI,TIMER_IC_SELECTION_ITS - icprescaler: TIMER_IC_PSC_DIV1,TIMER_IC_PSC_DIV2,TIMER_IC_PSC_DIV4,TIMER_IC_PSC_DIV8 - icfilter: 0~15 - \param[out] none - \retval none -*/ -void timer_input_capture_config(uint32_t timer_periph,uint16_t channel,timer_ic_parameter_struct* icpara) -{ - switch(channel){ - /* configure TIMER_CH_0 */ - case TIMER_CH_0: - /* reset the CH0EN bit */ - TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH0EN); - - /* reset the CH0P and CH0NP bits */ - TIMER_CHCTL2(timer_periph) &=(uint32_t)(~(TIMER_CHCTL2_CH0P|TIMER_CHCTL2_CH0NP)); - TIMER_CHCTL2(timer_periph) |= (uint32_t)(icpara->icpolarity); - /* reset the CH0MS bit */ - TIMER_CHCTL0(timer_periph) &=(uint32_t)(~TIMER_CHCTL0_CH0MS); - TIMER_CHCTL0(timer_periph) |= (uint32_t)(icpara->icselection); - /* reset the CH0CAPFLT bit */ - TIMER_CHCTL0(timer_periph) &=(uint32_t)(~TIMER_CHCTL0_CH0CAPFLT); - TIMER_CHCTL0(timer_periph) |= (uint32_t)(((uint32_t)icpara->icfilter << 4)); - - /* set the CH0EN bit */ - TIMER_CHCTL2(timer_periph) |= (uint32_t)TIMER_CHCTL2_CH0EN; - break; - /* configure TIMER_CH_1 */ - case TIMER_CH_1: - /* reset the CH1EN bit */ - TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH1EN); - - /* reset the CH1P and CH1NP bits */ - TIMER_CHCTL2(timer_periph) &=(uint32_t)(~(TIMER_CHCTL2_CH1P|TIMER_CHCTL2_CH1NP)); - TIMER_CHCTL2(timer_periph) |= (uint32_t)((uint32_t)icpara->icpolarity << 4); - /* reset the CH1MS bit */ - TIMER_CHCTL0(timer_periph) &=(uint32_t)(~TIMER_CHCTL0_CH1MS); - TIMER_CHCTL0(timer_periph) |= (uint32_t)((uint32_t)icpara->icselection << 8); - /* reset the CH1CAPFLT bit */ - TIMER_CHCTL0(timer_periph) &=(uint32_t)(~TIMER_CHCTL0_CH1CAPFLT); - TIMER_CHCTL0(timer_periph) |= (uint32_t)((uint32_t)icpara->icfilter << 12); - - /* set the CH1EN bit */ - TIMER_CHCTL2(timer_periph) |= (uint32_t)TIMER_CHCTL2_CH1EN; - break; - /* configure TIMER_CH_2 */ - case TIMER_CH_2: - /* reset the CH2EN bit */ - TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH2EN); - - /* reset the CH2P and CH2NP bits */ - TIMER_CHCTL2(timer_periph) &=(uint32_t)(~(TIMER_CHCTL2_CH2P|TIMER_CHCTL2_CH2NP)); - TIMER_CHCTL2(timer_periph) |= (uint32_t)((uint32_t)icpara->icpolarity << 8); - /* reset the CH2MS bit */ - TIMER_CHCTL1(timer_periph) &=(uint32_t)(~TIMER_CHCTL1_CH2MS); - TIMER_CHCTL1(timer_periph) |= (uint32_t)(icpara->icselection); - /* reset the CH2CAPFLT bit */ - TIMER_CHCTL1(timer_periph) &=(uint32_t)(~TIMER_CHCTL1_CH2CAPFLT); - TIMER_CHCTL1(timer_periph) |= (uint32_t)((uint32_t)icpara->icfilter<< 4); - - /* set the CH2EN bit */ - TIMER_CHCTL2(timer_periph) |= (uint32_t)TIMER_CHCTL2_CH2EN; - break; - /* configure TIMER_CH_3 */ - case TIMER_CH_3: - /* reset the CH3EN bit */ - TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH3EN); - - /* reset the CH3P bits */ - TIMER_CHCTL2(timer_periph) &=(uint32_t)(~(TIMER_CHCTL2_CH3P)); - TIMER_CHCTL2(timer_periph) |= (uint32_t)((uint32_t)icpara->icpolarity << 12); - /* reset the CH3MS bit */ - TIMER_CHCTL1(timer_periph) &=(uint32_t)(~TIMER_CHCTL1_CH3MS); - TIMER_CHCTL1(timer_periph) |= (uint32_t)((uint32_t)icpara->icselection << 8); - /* reset the CH3CAPFLT bit */ - TIMER_CHCTL1(timer_periph) &=(uint32_t)(~TIMER_CHCTL1_CH3CAPFLT); - TIMER_CHCTL1(timer_periph) |= (uint32_t)((uint32_t)icpara->icfilter << 12); - - /* set the CH3EN bit */ - TIMER_CHCTL2(timer_periph) |= (uint32_t)TIMER_CHCTL2_CH3EN; - break; - default: - break; - } - /* configure TIMER channel input capture prescaler value */ - timer_channel_input_capture_prescaler_config(timer_periph, channel,(uint32_t)icpara->icprescaler); -} - -/*! - \brief configure TIMER channel input capture prescaler value - \param[in] timer_periph: TIMERx(x=0,1,2,13,14,15,16) - \param[in] channel: - \arg TIMER_CH_0: TIMER channel0(TIMERx(x=0,1,2,13,14,15,16)) - \arg TIMER_CH_1: TIMER channel1(TIMERx(x=0,1,2,14)) - \arg TIMER_CH_2: TIMER channel2(TIMERx(x=0,1,2)) - \arg TIMER_CH_3: TIMER channel3(TIMERx(x=0,1,2)) - \param[in] prescaler: channel input capture prescaler value - \arg TIMER_IC_PSC_DIV1: no prescaler - \arg TIMER_IC_PSC_DIV2: divided by 2 - \arg TIMER_IC_PSC_DIV4: divided by 4 - \arg TIMER_IC_PSC_DIV8: divided by 8 - \param[out] none - \retval none -*/ -void timer_channel_input_capture_prescaler_config(uint32_t timer_periph, uint16_t channel, uint32_t prescaler) -{ - switch(channel){ - /* configure TIMER_CH_0 */ - case TIMER_CH_0: - TIMER_CHCTL0(timer_periph) &= (uint32_t)(~ TIMER_CHCTL0_CH0CAPPSC); - TIMER_CHCTL0(timer_periph) |= (uint32_t)prescaler; - break; - /* configure TIMER_CH_1 */ - case TIMER_CH_1: - TIMER_CHCTL0(timer_periph) &= (uint32_t)(~TIMER_CHCTL0_CH1CAPPSC); - TIMER_CHCTL0(timer_periph) |= (uint32_t)(prescaler << 8); - break; - /* configure TIMER_CH_2 */ - case TIMER_CH_2: - TIMER_CHCTL1(timer_periph) &= (uint32_t)(~TIMER_CHCTL1_CH2CAPPSC); - TIMER_CHCTL1(timer_periph) |= (uint32_t)prescaler; - break; - /* configure TIMER_CH_3 */ - case TIMER_CH_3: - TIMER_CHCTL1(timer_periph) &= (uint32_t)(~TIMER_CHCTL1_CH3CAPPSC); - TIMER_CHCTL1(timer_periph) |= (uint32_t)(prescaler << 8); - break; - default: - break; - } -} - -/*! - \brief read TIMER channel capture compare register value - \param[in] timer_periph: TIMERx(x=0,1,2,13,14,15,16) - \param[in] channel: - \arg TIMER_CH_0: TIMER channel0(TIMERx(x=0,1,2,13,14,15,16)) - \arg TIMER_CH_1: TIMER channel1(TIMERx(x=0,1,2,14)) - \arg TIMER_CH_2: TIMER channel2(TIMERx(x=0,1,2)) - \arg TIMER_CH_3: TIMER channel3(TIMERx(x=0,1,2)) - \param[out] none - \retval channel capture compare register value -*/ -uint32_t timer_channel_capture_value_register_read(uint32_t timer_periph, uint16_t channel) -{ - uint32_t count_value=0U; - - switch(channel){ - case TIMER_CH_0: - count_value = TIMER_CH0CV(timer_periph); - break; - case TIMER_CH_1: - count_value = TIMER_CH1CV(timer_periph); - break; - case TIMER_CH_2: - count_value = TIMER_CH2CV(timer_periph); - break; - case TIMER_CH_3: - count_value = TIMER_CH3CV(timer_periph); - break; - default: - break; - } - return (count_value); -} - -/*! - \brief configure TIMER input pwm capture function - \param[in] timer_periph: TIMERx(x=0,1,2,14) - \param[in] channel: - \arg TIMER_CH_0: TIMER channel0(TIMERx(x=0,1,2,14)) - \arg TIMER_CH_1: TIMER channel1(TIMERx(x=0,1,2,14)) - \param[in] icpwm:TIMER channel intput pwm parameter struct - icpolarity: TIMER_IC_POLARITY_RISING,TIMER_IC_POLARITY_FALLING - icselection: TIMER_IC_SELECTION_DIRECTTI,TIMER_IC_SELECTION_INDIRECTTI - icprescaler: TIMER_IC_PSC_DIV1,TIMER_IC_PSC_DIV2,TIMER_IC_PSC_DIV4,TIMER_IC_PSC_DIV8 - icfilter: 0~15 - \param[out] none - \retval none -*/ -void timer_input_pwm_capture_config(uint32_t timer_periph, uint16_t channel, timer_ic_parameter_struct* icpwm) -{ - uint16_t icpolarity = 0x0U; - uint16_t icselection = 0x0U; - - if(TIMER_IC_POLARITY_RISING == icpwm->icpolarity){ - icpolarity = TIMER_IC_POLARITY_FALLING; - }else{ - icpolarity = TIMER_IC_POLARITY_RISING; - } - - if(TIMER_IC_SELECTION_DIRECTTI == icpwm->icselection){ - icselection = TIMER_IC_SELECTION_INDIRECTTI; - }else{ - icselection = TIMER_IC_SELECTION_DIRECTTI; - } - - if(TIMER_CH_0 == channel){ - /* reset the CH0EN bit */ - TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH0EN); - /* reset the CH0P and CH0NP bits */ - TIMER_CHCTL2(timer_periph) &=(uint32_t)(~(TIMER_CHCTL2_CH0P|TIMER_CHCTL2_CH0NP)); - /* set the CH0P and CH0NP bits */ - TIMER_CHCTL2(timer_periph) |= (uint32_t)(icpwm->icpolarity); - /* reset the CH0MS bit */ - TIMER_CHCTL0(timer_periph) &=(uint32_t)(~TIMER_CHCTL0_CH0MS); - /* set the CH0MS bit */ - TIMER_CHCTL0(timer_periph) |= (uint32_t)(icpwm->icselection); - /* reset the CH0CAPFLT bit */ - TIMER_CHCTL0(timer_periph) &=(uint32_t)(~TIMER_CHCTL0_CH0CAPFLT); - /* set the CH0CAPFLT bit */ - TIMER_CHCTL0(timer_periph) |= (uint32_t)(icpwm->icfilter); - /* set the CH0EN bit */ - TIMER_CHCTL2(timer_periph) |= (uint32_t)TIMER_CHCTL2_CH0EN; - /* configure TIMER channel input capture prescaler value */ - timer_channel_input_capture_prescaler_config(timer_periph,TIMER_CH_0,(uint32_t)icpwm->icprescaler); - - /* reset the CH1EN bit */ - TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH1EN); - /* reset the CH1P and CH1NP bits */ - TIMER_CHCTL2(timer_periph) &=(uint32_t)(~(TIMER_CHCTL2_CH1P|TIMER_CHCTL2_CH1NP)); - /* set the CH1P and CH1NP bits */ - TIMER_CHCTL2(timer_periph) |= (uint32_t)((uint32_t)icpolarity << 4); - /* reset the CH1MS bit */ - TIMER_CHCTL0(timer_periph) &=(uint32_t)(~TIMER_CHCTL0_CH1MS); - /* set the CH1MS bit */ - TIMER_CHCTL0(timer_periph) |= (uint32_t)((uint32_t)icselection << 8); - /* reset the CH1CAPFLT bit */ - TIMER_CHCTL0(timer_periph) &=(uint32_t)(~TIMER_CHCTL0_CH1CAPFLT); - /* set the CH1CAPFLT bit */ - TIMER_CHCTL0(timer_periph) |= (uint32_t)((uint32_t)icpwm->icfilter << 8); - /* set the CH1EN bit */ - TIMER_CHCTL2(timer_periph) |= (uint32_t)TIMER_CHCTL2_CH1EN; - /* configure TIMER channel input capture prescaler value */ - timer_channel_input_capture_prescaler_config(timer_periph,TIMER_CH_1,(uint32_t)icpwm->icprescaler); - }else{ - /* reset the CH1EN bit */ - TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH1EN); - /* reset the CH1P and CH1NP bits */ - TIMER_CHCTL2(timer_periph) &=(uint32_t)(~(TIMER_CHCTL2_CH1P|TIMER_CHCTL2_CH1NP)); - /* set the CH1P and CH1NP bits */ - TIMER_CHCTL2(timer_periph) |= (uint32_t)((uint32_t)icpwm->icpolarity << 4); - /* reset the CH1MS bit */ - TIMER_CHCTL0(timer_periph) &=(uint32_t)(~TIMER_CHCTL0_CH1MS); - /* set the CH1MS bit */ - TIMER_CHCTL0(timer_periph) |= (uint32_t)((uint32_t)icpwm->icselection << 8); - /* reset the CH1CAPFLT bit */ - TIMER_CHCTL0(timer_periph) &=(uint32_t)(~TIMER_CHCTL0_CH1CAPFLT); - /* set the CH1CAPFLT bit */ - TIMER_CHCTL0(timer_periph) |= (uint32_t)((uint32_t)icpwm->icfilter << 8); - /* set the CH1EN bit */ - TIMER_CHCTL2(timer_periph) |= (uint32_t)TIMER_CHCTL2_CH1EN; - /* configure TIMER channel input capture prescaler value */ - timer_channel_input_capture_prescaler_config(timer_periph,TIMER_CH_1,(uint32_t)icpwm->icprescaler); - - /* reset the CH0EN bit */ - TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH0EN); - /* reset the CH0P and CH0NP bits */ - TIMER_CHCTL2(timer_periph) &=(uint32_t)(~(TIMER_CHCTL2_CH0P|TIMER_CHCTL2_CH0NP)); - /* set the CH0P and CH0NP bits */ - TIMER_CHCTL2(timer_periph) |= (uint32_t)icpolarity; - /* reset the CH0MS bit */ - TIMER_CHCTL0(timer_periph) &=(uint32_t)(~TIMER_CHCTL0_CH0MS); - /* set the CH0MS bit */ - TIMER_CHCTL0(timer_periph) |= (uint32_t)icselection; - /* reset the CH0CAPFLT bit */ - TIMER_CHCTL0(timer_periph) &=(uint32_t)(~TIMER_CHCTL0_CH0CAPFLT); - /* set the CH0CAPFLT bit */ - TIMER_CHCTL0(timer_periph) |= (uint32_t)icpwm->icfilter; - /* set the CH0EN bit */ - TIMER_CHCTL2(timer_periph) |= (uint32_t)TIMER_CHCTL2_CH0EN; - /* configure TIMER channel input capture prescaler value */ - timer_channel_input_capture_prescaler_config(timer_periph,TIMER_CH_0,(uint32_t)icpwm->icprescaler); - } -} - -/*! - \brief configure TIMER hall sensor mode - \param[in] timer_periph: TIMERx(x=0,1,2,14) - \param[in] hallmode: - \arg TIMER_HALLINTERFACE_ENABLE: TIMER hall sensor mode enable - \arg TIMER_HALLINTERFACE_DISABLE: TIMER hall sensor mode disable - \param[out] none - \retval none -*/ -void timer_hall_mode_config(uint32_t timer_periph, uint8_t hallmode) -{ - if(TIMER_HALLINTERFACE_ENABLE == hallmode){ - TIMER_CTL1(timer_periph) |= (uint32_t)TIMER_CTL1_TI0S; - }else if(TIMER_HALLINTERFACE_DISABLE == hallmode){ - TIMER_CTL1(timer_periph) &= ~(uint32_t)TIMER_CTL1_TI0S; - }else{ - } -} - -/*! - \brief select TIMER input trigger source - \param[in] timer_periph: TIMERx(x=0,1,2,14) - \param[in] intrigger: - \arg TIMER_SMCFG_TRGSEL_ITI0: internal trigger 0 - \arg TIMER_SMCFG_TRGSEL_ITI1: internal trigger 1 - \arg TIMER_SMCFG_TRGSEL_ITI2: internal trigger 2 - \arg TIMER_SMCFG_TRGSEL_ITI3: internal trigger 3 - \arg TIMER_SMCFG_TRGSEL_CI0F_ED: TI0 edge detector - \arg TIMER_SMCFG_TRGSEL_CI0FE0: filtered TIMER input 0 - \arg TIMER_SMCFG_TRGSEL_CI1FE1: filtered TIMER input 1 - \arg TIMER_SMCFG_TRGSEL_ETIFP: external trigger - \param[out] none - \retval none -*/ -void timer_input_trigger_source_select(uint32_t timer_periph,uint32_t intrigger) -{ - TIMER_SMCFG(timer_periph) &=(uint32_t)(~TIMER_SMCFG_TRGS); - TIMER_SMCFG(timer_periph) |= (uint32_t)intrigger; -} - -/*! - \brief select TIMER master mode output trigger source - \param[in] timer_periph: TIMERx(x=0,1,2,14) - \param[in] outrigger: - \arg TIMER_TRI_OUT_SRC_RESET: the UPG bit as trigger output - \arg TIMER_TRI_OUT_SRC_ENABLE: the counter enable signal TIMER_CTL0_CEN as trigger output - \arg TIMER_TRI_OUT_SRC_UPDATE: update event as trigger output - \arg TIMER_TRI_OUT_SRC_CH0: a capture or a compare match occurred in channal0 as trigger output TRGO - \arg TIMER_TRI_OUT_SRC_O0CPRE: O0CPRE as trigger output - \arg TIMER_TRI_OUT_SRC_O1CPRE: O1CPRE as trigger output - \arg TIMER_TRI_OUT_SRC_O2CPRE: O2CPRE as trigger output - \arg TIMER_TRI_OUT_SRC_O3CPRE: O3CPRE as trigger output - \param[out] none - \retval none -*/ -void timer_master_output_trigger_source_select(uint32_t timer_periph, uint32_t outrigger) -{ - TIMER_CTL1(timer_periph) &=(uint32_t)(~TIMER_CTL1_MMC); - TIMER_CTL1(timer_periph) |= (uint32_t)outrigger; -} - -/*! - \brief select TIMER slave mode - \param[in] timer_periph: TIMERx(x=0,1,2,14) - \param[in] slavemode: - \arg TIMER_SLAVE_MODE_DISABLE: slave mode disable - \arg TIMER_ENCODER_MODE0: encoder mode 0 - \arg TIMER_ENCODER_MODE1: encoder mode 1 - \arg TIMER_ENCODER_MODE2: encoder mode 2 - \arg TIMER_SLAVE_MODE_RESTART: restart mode - \arg TIMER_SLAVE_MODE_PAUSE: pause mode - \arg TIMER_SLAVE_MODE_EVENT: event mode - \arg TIMER_SLAVE_MODE_EXTERNAL0: external clock mode 0. - \param[out] none - \retval none -*/ - -void timer_slave_mode_select(uint32_t timer_periph,uint32_t slavemode) -{ - TIMER_SMCFG(timer_periph) &=(uint32_t)(~TIMER_SMCFG_SMC); - - TIMER_SMCFG(timer_periph) |= (uint32_t)slavemode; -} - -/*! - \brief configure TIMER master slave mode - \param[in] timer_periph: TIMERx(x=0,1,2,14) - \param[in] masterslave: - \arg TIMER_MASTER_SLAVE_MODE_ENABLE: master slave mode enable - \arg TIMER_MASTER_SLAVE_MODE_DISABLE: master slave mode disable - \param[out] none - \retval none -*/ -void timer_master_slave_mode_config(uint32_t timer_periph, uint8_t masterslave) -{ - if(TIMER_MASTER_SLAVE_MODE_ENABLE == masterslave){ - TIMER_SMCFG(timer_periph) |= (uint32_t)TIMER_SMCFG_MSM; - }else if(TIMER_MASTER_SLAVE_MODE_DISABLE == masterslave){ - TIMER_SMCFG(timer_periph) &= ~(uint32_t)TIMER_SMCFG_MSM; - }else{ - } -} - -/*! - \brief configure TIMER external trigger input - \param[in] timer_periph: TIMERx(x=0,1,2,14) - \param[in] extprescaler: - \arg TIMER_EXT_TRI_PSC_OFF: no divided - \arg TIMER_EXT_TRI_PSC_DIV2: divided by 2 - \arg TIMER_EXT_TRI_PSC_DIV4: divided by 4 - \arg TIMER_EXT_TRI_PSC_DIV8: divided by 8 - \param[in] expolarity: - \arg TIMER_ETP_FALLING: active low or falling edge active - \arg TIMER_ETP_RISING: active high or rising edge active - \param[in] extfilter: a value between 0x00 and 0x0F - \param[out] none - \retval none -*/ -void timer_external_trigger_config(uint32_t timer_periph, uint32_t extprescaler, uint32_t expolarity, uint32_t extfilter) -{ - TIMER_SMCFG(timer_periph) &=(uint32_t)(~(TIMER_SMCFG_ETP|TIMER_SMCFG_ETPSC|TIMER_SMCFG_ETFC)); - TIMER_SMCFG(timer_periph) |= (uint32_t)(extprescaler|expolarity); - TIMER_SMCFG(timer_periph) |= (uint32_t)(extfilter << (uint16_t)8); -} - -/*! - \brief configure TIMER quadrature decoder mode - \param[in] timer_periph: TIMERx(x=0,1,2,14) - \param[in] decomode: - \arg TIMER_ENCODER_MODE0: counter counts on CI0FE0 edge depending on CI1FE1 level - \arg TIMER_ENCODER_MODE1: counter counts on CI1FE1 edge depending on CI0FE0 level - \arg TIMER_ENCODER_MODE2: counter counts on both CI0FE0 and CI1FE1 edges depending on the level of the other input - \param[in] ic0polarity: - \arg TIMER_IC_POLARITY_RISING: capture rising edge - \arg TIMER_IC_POLARITY_FALLING: capture falling edge - \param[in] ic1polarity: - \arg TIMER_IC_POLARITY_RISING: capture rising edge - \arg TIMER_IC_POLARITY_FALLING: capture falling edge - \param[out] none - \retval none -*/ -void timer_quadrature_decoder_mode_config(uint32_t timer_periph, uint32_t decomode, uint16_t ic0polarity, uint16_t ic1polarity) -{ - TIMER_SMCFG(timer_periph) &=(uint32_t)(~TIMER_SMCFG_SMC); - TIMER_SMCFG(timer_periph) |= (uint32_t)decomode; - - TIMER_CHCTL0(timer_periph) &= (uint32_t)(((uint32_t)(~TIMER_CHCTL0_CH0MS))&((uint32_t)(~TIMER_CHCTL0_CH1MS))); - TIMER_CHCTL0(timer_periph) |= (uint32_t)(TIMER_IC_SELECTION_DIRECTTI|((uint32_t)TIMER_IC_SELECTION_DIRECTTI << 8)); - - TIMER_CHCTL2(timer_periph) &=(uint32_t)(~(TIMER_CHCTL2_CH0P|TIMER_CHCTL2_CH0NP)); - TIMER_CHCTL2(timer_periph) &=(uint32_t)(~(TIMER_CHCTL2_CH1P|TIMER_CHCTL2_CH1NP)); - TIMER_CHCTL2(timer_periph) |= (uint32_t)(ic0polarity|((uint32_t)ic1polarity << 4U)); -} - -/*! - \brief configure TIMER internal clock mode - \param[in] timer_periph: TIMERx(x=0,1,2,14) - \param[out] none - \retval none -*/ -void timer_internal_clock_config(uint32_t timer_periph) -{ - TIMER_SMCFG(timer_periph) &= (uint32_t)TIMER_SLAVE_MODE_DISABLE; -} - -/*! - \brief configure TIMER the internal trigger as external clock input - \param[in] timer_periph: TIMERx(x=0,1,2,14) - \param[in] intrigger: - \arg TIMER_SMCFG_TRGSEL_ITI0: internal trigger 0 - \arg TIMER_SMCFG_TRGSEL_ITI1: internal trigger 1 - \arg TIMER_SMCFG_TRGSEL_ITI2: internal trigger 2 - \arg TIMER_SMCFG_TRGSEL_ITI3: internal trigger 3 - \param[out] none - \retval none -*/ -void timer_internal_trigger_as_external_clock_config(uint32_t timer_periph, uint32_t intrigger) -{ - timer_input_trigger_source_select(timer_periph, intrigger); - TIMER_SMCFG(timer_periph) &= ~(uint32_t)TIMER_SMCFG_SMC; - TIMER_SMCFG(timer_periph) |= (uint32_t)TIMER_SLAVE_MODE_EXTERNAL0; -} - -/*! - \brief configure TIMER the external trigger as external clock input - \param[in] timer_periph: TIMERx(x=0,1,2,14) - \param[in] extrigger: - \arg TIMER_SMCFG_TRGSEL_CI0F_ED: TI0 edge detector - \arg TIMER_SMCFG_TRGSEL_CI0FE0: filtered TIMER input 0 - \arg TIMER_SMCFG_TRGSEL_CI1FE1: filtered TIMER input 1 - \param[in] expolarity: - \arg TIMER_IC_POLARITY_RISING: active low or falling edge active - \arg TIMER_IC_POLARITY_FALLING: active high or rising edge active - \param[in] extfilter: a value between 0 and 15 - \param[out] none - \retval none -*/ -void timer_external_trigger_as_external_clock_config(uint32_t timer_periph, uint32_t extrigger, uint16_t expolarity, uint32_t extfilter) -{ - if(TIMER_SMCFG_TRGSEL_CI1FE1 == extrigger){ - /* reset the CH1EN bit */ - TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH1EN); - /* reset the CH1NP bit */ - TIMER_CHCTL2(timer_periph) &=(uint32_t)(~(TIMER_CHCTL2_CH1P|TIMER_CHCTL2_CH1NP)); - /* set the CH1NP bit */ - TIMER_CHCTL2(timer_periph) |= (uint32_t)((uint32_t)expolarity << 4U); - /* reset the CH1MS bit */ - TIMER_CHCTL0(timer_periph) &=(uint32_t)(~TIMER_CHCTL0_CH1MS); - /* set the CH1MS bit */ - TIMER_CHCTL0(timer_periph) |= (uint32_t)((uint32_t)TIMER_IC_SELECTION_DIRECTTI << 8U); - /* reset the CH1CAPFLT bit */ - TIMER_CHCTL0(timer_periph) &=(uint32_t)(~TIMER_CHCTL0_CH1CAPFLT); - /* set the CH1CAPFLT bit */ - TIMER_CHCTL0(timer_periph) |= (uint32_t)(extfilter << 8U); - /* set the CH1EN bit */ - TIMER_CHCTL2(timer_periph) |= (uint32_t)TIMER_CHCTL2_CH1EN; - }else{ - /* reset the CH0EN bit */ - TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH0EN); - /* reset the CH0P and CH0NP bits */ - TIMER_CHCTL2(timer_periph) &=(uint32_t)(~(TIMER_CHCTL2_CH0P|TIMER_CHCTL2_CH0NP)); - /* set the CH0P and CH0NP bits */ - TIMER_CHCTL2(timer_periph) |= (uint32_t)expolarity; - /* reset the CH0MS bit */ - TIMER_CHCTL0(timer_periph) &=(uint32_t)(~TIMER_CHCTL0_CH0MS); - /* set the CH0MS bit */ - TIMER_CHCTL0(timer_periph) |= (uint32_t)TIMER_IC_SELECTION_DIRECTTI; - /* reset the CH0CAPFLT bit */ - TIMER_CHCTL0(timer_periph) &=(uint32_t)(~TIMER_CHCTL0_CH0CAPFLT); - /* reset the CH0CAPFLT bit */ - TIMER_CHCTL0(timer_periph) |= (uint32_t)extfilter; - /* set the CH0EN bit */ - TIMER_CHCTL2(timer_periph) |= (uint32_t)TIMER_CHCTL2_CH0EN; - } - /* select TIMER input trigger source */ - timer_input_trigger_source_select(timer_periph, extrigger); - /* reset the SMC bit */ - TIMER_SMCFG(timer_periph) &=(uint32_t)(~TIMER_SMCFG_SMC); - /* set the SMC bit */ - TIMER_SMCFG(timer_periph) |= (uint32_t)TIMER_SLAVE_MODE_EXTERNAL0; -} - -/*! - \brief configure TIMER the external clock mode0 - \param[in] timer_periph: TIMERx(x=0,1,2) - \param[in] extprescaler: - \arg TIMER_EXT_TRI_PSC_OFF: no divided - \arg TIMER_EXT_TRI_PSC_DIV2: divided by 2 - \arg TIMER_EXT_TRI_PSC_DIV4: divided by 4 - \arg TIMER_EXT_TRI_PSC_DIV8: divided by 8 - \param[in] expolarity: - \arg TIMER_ETP_FALLING: active low or falling edge active - \arg TIMER_ETP_RISING: active high or rising edge active - \param[in] extfilter: a value between 0 and 15 - \param[out] none - \retval none -*/ -void timer_external_clock_mode0_config(uint32_t timer_periph, uint32_t extprescaler, uint32_t expolarity, uint32_t extfilter) -{ - /* configure TIMER external trigger input */ - timer_external_trigger_config(timer_periph, extprescaler, expolarity, extfilter); - - /* reset the SMC bit */ - TIMER_SMCFG(timer_periph) &=(uint32_t)(~TIMER_SMCFG_SMC); - /* set the SMC bit */ - TIMER_SMCFG(timer_periph) |= (uint32_t)TIMER_SLAVE_MODE_EXTERNAL0; - - /* reset the TRGS bit */ - TIMER_SMCFG(timer_periph) &=(uint32_t)(~TIMER_SMCFG_TRGS); - /* set the TRGS bit */ - TIMER_SMCFG(timer_periph) |= (uint32_t)TIMER_SMCFG_TRGSEL_ETIFP; -} - -/*! - \brief configure TIMER the external clock mode1 - \param[in] timer_periph: TIMERx(x=0,1,2) - \param[in] extprescaler: - \arg TIMER_EXT_TRI_PSC_OFF: no divided - \arg TIMER_EXT_TRI_PSC_DIV2: divided by 2 - \arg TIMER_EXT_TRI_PSC_DIV4: divided by 4 - \arg TIMER_EXT_TRI_PSC_DIV8: divided by 8 - \param[in] expolarity: - \arg TIMER_ETP_FALLING: active low or falling edge active - \arg TIMER_ETP_RISING: active high or rising edge active - \param[in] extfilter: a value between 0 and 15 - \param[out] none - \retval none -*/ -void timer_external_clock_mode1_config(uint32_t timer_periph, uint32_t extprescaler, - uint32_t expolarity, uint32_t extfilter) -{ - /* configure TIMER external trigger input */ - timer_external_trigger_config(timer_periph, extprescaler, expolarity, extfilter); - - TIMER_SMCFG(timer_periph) |= (uint32_t)TIMER_SMCFG_SMC1; -} - -/*! - \brief disable TIMER the external clock mode1 - \param[in] timer_periph: TIMERx(x=0..4,7) - \param[out] none - \retval none -*/ -void timer_external_clock_mode1_disable(uint32_t timer_periph) -{ - TIMER_SMCFG(timer_periph) &= ~(uint32_t)TIMER_SMCFG_SMC1; -} - -/*! - \brief configure TIMER13 channel0 remap function - \param[in] timer_periph: TIMERx(x=13) - \param[in] channel: - \arg TIMER_CH_0: TIMER channel0(TIMERx(x=13)) - \param[in] remap: - \arg TIMER_IRMP_CI0_RMP_GPIO: channel 0 input is connected to GPIO - \arg TIMER_IRMP_CI0_RTCCLK: channel 0 input is connected to the RTCCLK - \arg TIMER_IRMP_CI0_HXTALDIV32: channel 0 input is connected to HXTAL/32 clock - \arg TIMER_IRMP_CI0_CKOUTSEL: channel 0 input is connected to CKOUTSEL - \param[out] none - \retval none -*/ -void timer_channel_remap_config(uint32_t timer_periph, uint16_t channel, uint32_t remap) -{ - if(TIMER_CH_0 == channel){ - TIMER_IRMP(timer_periph) = (uint32_t)remap; - } -} - -#ifdef GD32F170_190 - -/*! - \brief configure TIMER cc register selection - \param[in] timer_periph: TIMERx(x=0,1,2,13,14,15,16) - \param[in] ccsel: - \arg TIMER_CHVSEL_DISABLE: write CHxVAL register selection disable - \arg TIMER_CHVSEL_ENABLE: write CHxVAL register selection enable - \param[out] none - \retval none -*/ -void timer_write_cc_register_config(uint32_t timer_periph, uint32_t ccsel) -{ - if(ccsel){ - TIMER_CFG(timer_periph) |= (uint32_t)ccsel; - }else{ - TIMER_CFG(timer_periph) &= (uint32_t)ccsel; - } -} - -/*! - \brief configure TIMER output value selection - \param[in] timer_periph: TIMERx(x=0,1,2,13,14,15,16) - \param[in] outsel: - \arg TIMER_OUTSEL_DISABLE: output value selection disable - \arg TIMER_OUTSEL_ENABLE: output value selection enable - \param[out] none - \retval none -*/ -void timer_output_value_selection_config(uint32_t timer_periph, uint32_t outsel) -{ - if(outsel){ - TIMER_CFG(timer_periph) |= (uint32_t)outsel; - }else{ - TIMER_CFG(timer_periph) &= (uint32_t)outsel; - } -} - -#endif /* GD32F170_190 */ +/*! + \file gd32f1x0_timer.c + \brief TIMER driver +*/ + +/* + Copyright (C) 2017 GigaDevice + + 2014-12-26, V1.0.0, platform GD32F1x0(x=3,5) + 2016-01-15, V2.0.0, platform GD32F1x0(x=3,5,7,9) + 2016-04-30, V3.0.0, firmware update for GD32F1x0(x=3,5,7,9) + 2017-06-19, V3.1.0, firmware update for GD32F1x0(x=3,5,7,9) +*/ + +#include "gd32f1x0_timer.h" + +/*! + \brief deinit a timer + \param[in] timer_periph: TIMERx(x=0,1,2,5,13,14,15,16) + \param[out] none + \retval none +*/ +void timer_deinit(uint32_t timer_periph) +{ + switch(timer_periph){ + case TIMER0: + /* reset TIMER0 */ + rcu_periph_reset_enable(RCU_TIMER0RST); + rcu_periph_reset_disable(RCU_TIMER0RST); + break; + case TIMER1: + /* reset TIMER1 */ + rcu_periph_reset_enable(RCU_TIMER1RST); + rcu_periph_reset_disable(RCU_TIMER1RST); + break; + case TIMER2: + /* reset TIMER2 */ + rcu_periph_reset_enable(RCU_TIMER2RST); + rcu_periph_reset_disable(RCU_TIMER2RST); + break; + case TIMER5: + /* reset TIMER5 */ + rcu_periph_reset_enable(RCU_TIMER5RST); + rcu_periph_reset_disable(RCU_TIMER5RST); + break; + case TIMER13: + /* reset TIMER13 */ + rcu_periph_reset_enable(RCU_TIMER13RST); + rcu_periph_reset_disable(RCU_TIMER13RST); + break; + case TIMER14: + /* reset TIMER14 */ + rcu_periph_reset_enable(RCU_TIMER14RST); + rcu_periph_reset_disable(RCU_TIMER14RST); + break; + case TIMER15: + /* reset TIMER15 */ + rcu_periph_reset_enable(RCU_TIMER15RST); + rcu_periph_reset_disable(RCU_TIMER15RST); + break; + case TIMER16: + /* reset TIMER16 */ + rcu_periph_reset_enable(RCU_TIMER16RST); + rcu_periph_reset_disable(RCU_TIMER16RST); + break; + default: + break; + } +} + +/*! + \brief initialize TIMER counter + \param[in] timer_periph: TIMERx(x=0,1,2,5,13,14,15,16) + \param[in] initpara: init parameter struct + prescaler: prescaler value of the counter clock,0~65535 + alignedmode: TIMER_COUNTER_EDGE,TIMER_COUNTER_CENTER_DOWN,TIMER_COUNTER_CENTER_UP,TIMER_COUNTER_CENTER_BOTH + counterdirection: TIMER_COUNTER_UP,TIMER_COUNTER_DOWN + period: counter auto reload value + clockdivision: TIMER_CKDIV_DIV1,TIMER_CKDIV_DIV2,TIMER_CKDIV_DIV4 + repetitioncounter: counter repetition value,0~255 + \param[out] none + \retval none +*/ +void timer_init(uint32_t timer_periph, timer_parameter_struct* initpara) +{ + /* configure the counter prescaler value */ + TIMER_PSC(timer_periph) = (uint16_t)initpara->prescaler; + + /* configure the counter direction and aligned mode */ + if((TIMER0 == timer_periph) || (TIMER1 == timer_periph) || (TIMER2 == timer_periph)){ + TIMER_CTL0(timer_periph) &= (uint32_t)(~ TIMER_CTL0_DIR|TIMER_CTL0_CAM); + TIMER_CTL0(timer_periph) |= (uint32_t)initpara->alignedmode; + TIMER_CTL0(timer_periph) |= (uint32_t)initpara->counterdirection; + }else{ + TIMER_CTL0(timer_periph) &= (uint32_t)(~ TIMER_CTL0_DIR); + TIMER_CTL0(timer_periph) |= (uint32_t)initpara->counterdirection; + } + + /* configure the autoreload value */ + TIMER_CAR(timer_periph) = (uint32_t)initpara->period; + + if((TIMER5 != timer_periph)){ + /* reset the CKDIV bit */ + TIMER_CTL0(timer_periph) &= (uint32_t)(~ TIMER_CTL0_CKDIV); + TIMER_CTL0(timer_periph) |= (uint32_t)initpara->clockdivision; + } + + if((TIMER0 == timer_periph) || (TIMER14 == timer_periph) || (TIMER15 == timer_periph)|| (TIMER16 == timer_periph)){ + /* configure the repetition counter value */ + TIMER_CREP(timer_periph) = (uint32_t)initpara->repetitioncounter; + } + + /* generate an update event */ + TIMER_SWEVG(timer_periph) |= (uint32_t)TIMER_PSC_RELOAD_NOW; +} + +/*! + \brief enable a timer + \param[in] timer_periph: TIMERx(x=0,1,2,5,13,14,15,16) + \param[out] none + \retval none +*/ +void timer_enable(uint32_t timer_periph) +{ + TIMER_CTL0(timer_periph) |= (uint32_t)TIMER_COUNTER_ENABLE; +} + +/*! + \brief disable a timer + \param[in] timer_periph: TIMERx(x=0,1,2,5,13,14,15,16) + \param[out] none + \retval none +*/ +void timer_disable(uint32_t timer_periph) +{ + TIMER_CTL0(timer_periph) &= (uint32_t)TIMER_COUNTER_DISABLE; +} + +/*! + \brief enable the auto reload shadow function + \param[in] timer_periph: TIMERx(x=0,1,2,5,13,14,15,16) + \param[out] none + \retval none +*/ +void timer_auto_reload_shadow_enable(uint32_t timer_periph) +{ + TIMER_CTL0(timer_periph) |= (uint32_t) TIMER_ARSE_ENABLE; +} + +/*! + \brief disable the auto reload shadow function + \param[in] timer_periph: TIMERx(x=0,1,2,5,13,14,15,16) + \param[out] none + \retval none +*/ +void timer_auto_reload_shadow_disable(uint32_t timer_periph) +{ + TIMER_CTL0(timer_periph) &= (uint32_t) TIMER_ARSE_DISABLE; +} + +/*! + \brief enable the update event + \param[in] timer_periph: TIMERx(x=0,1,2,5,13,14,15,16) + \param[out] none + \retval none +*/ +void timer_update_event_enable(uint32_t timer_periph) +{ + TIMER_CTL0(timer_periph) |= (uint32_t) TIMER_UPDIS_ENABLE; +} + +/*! + \brief disable the update event + \param[in] timer_periph: TIMERx(x=0,1,2,5,13,14,15,16) + \param[out] none + \retval none +*/ +void timer_update_event_disable(uint32_t timer_periph) +{ + TIMER_CTL0(timer_periph) &= (uint32_t) TIMER_UPDIS_DISABLE; +} + +/*! + \brief set TIMER counter alignment mode + \param[in] timer_periph: TIMERx(x=0,1,2) + \param[in] aligned: + \arg TIMER_COUNTER_EDGE: edge-aligned mode + \arg TIMER_COUNTER_CENTER_DOWN: center-aligned and counting down assert mode + \arg TIMER_COUNTER_CENTER_UP: center-aligned and counting up assert mode + \arg TIMER_COUNTER_CENTER_BOTH: center-aligned and counting up/down assert mode + \param[out] none + \retval none +*/ +void timer_counter_alignment(uint32_t timer_periph, uint16_t aligned) +{ + TIMER_CTL0(timer_periph) &= (uint32_t)(~ TIMER_CTL0_CAM); + TIMER_CTL0(timer_periph) |= (uint32_t)aligned; +} + +/*! + \brief set TIMER counter up direction + \param[in] timer_periph: TIMERx(x=0,1,2,5,13,14,15,16) + \param[out] none + \retval none +*/ +void timer_counter_up_direction(uint32_t timer_periph) +{ + TIMER_CTL0(timer_periph) &= (uint32_t)(~ TIMER_CTL0_DIR); + TIMER_CTL0(timer_periph) |= (uint32_t)TIMER_COUNTER_UP; +} + +/*! + \brief set TIMER counter down direction + \param[in] timer_periph: TIMERx(x=0,1,2) + \param[out] none + \retval none +*/ +void timer_counter_down_direction(uint32_t timer_periph) +{ + TIMER_CTL0(timer_periph) &= (uint32_t)(~ TIMER_CTL0_DIR); + TIMER_CTL0(timer_periph) |= (uint32_t)TIMER_COUNTER_DOWN; +} + +/*! + \brief configure TIMER prescaler + \param[in] timer_periph: TIMERx(x=0,1,2,5,13,14,15,16) + \param[in] prescaler: prescaler value + \param[in] pscreload: prescaler reload mode + \arg TIMER_PSC_RELOAD_NOW: the prescaler is loaded right now + \arg TIMER_PSC_RELOAD_UPDATE: the prescaler is loaded at the next update event + \param[out] none + \retval none +*/ +void timer_prescaler_config(uint32_t timer_periph, uint16_t prescaler, uint8_t pscreload) +{ + TIMER_PSC(timer_periph) = (uint32_t)prescaler; + + if(TIMER_PSC_RELOAD_NOW == pscreload){ + TIMER_SWEVG(timer_periph) |= (uint32_t)TIMER_SWEVG_UPG; + } +} + +/*! + \brief configure TIMER repetition register value + \param[in] timer_periph: TIMERx(x=0,14,15,16) + \param[in] repetition: the counter repetition value + \param[out] none + \retval none +*/ +void timer_repetition_value_config(uint32_t timer_periph, uint16_t repetition) +{ + TIMER_CREP(timer_periph) = (uint32_t)repetition; +} + +/*! + \brief configure TIMER autoreload register value + \param[in] timer_periph: TIMERx(x=0,1,2,5,13,14,15,16) + \param[in] autoreload: the counter auto-reload value + \param[out] none + \retval none +*/ +void timer_autoreload_value_config(uint32_t timer_periph, uint16_t autoreload) +{ + TIMER_CAR(timer_periph) = (uint32_t)autoreload; +} + +/*! + \brief configure TIMER counter register value + \param[in] timer_periph: TIMERx(x=0,1,2,5,13,14,15,16) + \param[in] counter: the counter value + \param[out] none + \retval none +*/ +void timer_counter_value_config(uint32_t timer_periph, uint16_t counter) +{ + TIMER_CNT(timer_periph) = (uint32_t)counter; +} + +/*! + \brief read TIMER counter value + \param[in] timer_periph: TIMERx(x=0,1,2,5,13,14,15,16) + \param[out] none + \retval counter value +*/ +uint32_t timer_counter_read(uint32_t timer_periph) +{ + uint32_t count_value = 0U; + count_value = TIMER_CNT(timer_periph); + return (count_value); +} + +/*! + \brief read TIMER prescaler value + \param[in] timer_periph: TIMERx(x=0,1,2,5,13,14,15,16) + \param[out] none + \retval prescaler register value +*/ +uint16_t timer_prescaler_read(uint32_t timer_periph) +{ + uint16_t prescaler_value = 0U; + prescaler_value = (uint16_t)(TIMER_PSC(timer_periph)); + return (prescaler_value); +} + +/*! + \brief configure TIMER single pulse mode + \param[in] timer_periph: TIMERx(x=0,1,2,5,13,14,15,16) + \param[in] spmode: + \arg TIMER_SP_MODE_SINGLE: single pulse mode + \arg TIMER_SP_MODE_REPETITIVE: repetitive pulse mode + \param[out] none + \retval none +*/ +void timer_single_pulse_mode_config(uint32_t timer_periph, uint8_t spmode) +{ + if(TIMER_SP_MODE_SINGLE == spmode){ + TIMER_CTL0(timer_periph) |= (uint32_t)TIMER_CTL0_SPM; + }else if(TIMER_SP_MODE_REPETITIVE == spmode){ + TIMER_CTL0(timer_periph) &= ~((uint32_t)TIMER_CTL0_SPM); + }else{ + } +} + +/*! + \brief configure TIMER update source + \param[in] timer_periph: TIMERx(x=0,1,2,5,13,14,15,16) + \param[in] update: + \arg TIMER_UPDATE_SRC_GLOBAL: update generate by setting of UPG bit or the counter overflow/underflow,or the slave mode controller trigger + \arg TIMER_UPDATE_SRC_REGULAR: update generate only by counter overflow/underflow + \param[out] none + \retval none +*/ +void timer_update_source_config(uint32_t timer_periph, uint8_t update) +{ + if(TIMER_UPDATE_SRC_REGULAR == update){ + TIMER_CTL0(timer_periph) |= (uint32_t)TIMER_CTL0_UPS; + }else if(update == TIMER_UPDATE_SRC_GLOBAL){ + TIMER_CTL0(timer_periph) &= ~(uint32_t)TIMER_CTL0_UPS; + }else{ + } +} + +/*! + \brief enable the TIMER interrupt + \param[in] timer_periph: TIMERx(x=0,1,2,5,13,14,15,16) + \param[in] interrupt: timer interrupt enable source + \arg TIMER_INT_UP: update interrupt enable + \arg TIMER_INT_CH0: channel 0 interrupt enable + \arg TIMER_INT_CH1: channel 1 interrupt enable + \arg TIMER_INT_CH2: channel 2 interrupt enable + \arg TIMER_INT_CH3: channel 3 interrupt enable + \arg TIMER_INT_CMT: commutation interrupt enable + \arg TIMER_INT_TRG: trigger interrupt enable + \arg TIMER_INT_BRK: break interrupt enable + \param[out] none + \retval none +*/ +void timer_interrupt_enable(uint32_t timer_periph, uint32_t interrupt) +{ + TIMER_DMAINTEN(timer_periph) |= (uint32_t) interrupt; +} + +/*! + \brief disable the TIMER interrupt + \param[in] timer_periph: TIMERx(x=0,1,2,5,13,14,15,16) + \param[in] interrupt: timer interrupt source enable + \arg TIMER_INT_UP: update interrupt enable + \arg TIMER_INT_CH0: channel 0 interrupt enable + \arg TIMER_INT_CH1: channel 1 interrupt enable + \arg TIMER_INT_CH2: channel 2 interrupt enable + \arg TIMER_INT_CH3: channel 3 interrupt enable + \arg TIMER_INT_CMT: commutation interrupt enable + \arg TIMER_INT_TRG: trigger interrupt enable + \arg TIMER_INT_BRK: break interrupt enable + \param[out] none + \retval none +*/ +void timer_interrupt_disable(uint32_t timer_periph, uint32_t interrupt) +{ + TIMER_DMAINTEN(timer_periph) &= (uint32_t)(~ interrupt); +} + +/*! + \brief get timer interrupt flag + \param[in] timer_periph: TIMERx(x=0,1,2,5,13,14,15,16) + \param[in] interrupt: the timer interrupt bits + \arg TIMER_INT_FLAG_UP: update interrupt flag + \arg TIMER_INT_FLAG_CH0: channel 0 interrupt flag + \arg TIMER_INT_FLAG_CH1: channel 1 interrupt flag + \arg TIMER_INT_FLAG_CH2: channel 2 interrupt flag + \arg TIMER_INT_FLAG_CH3: channel 3 interrupt flag + \arg TIMER_INT_FLAG_CMT: channel commutation interrupt flag + \arg TIMER_INT_FLAG_TRG: trigger interrupt flag + \arg TIMER_INT_FLAG_BRK: break interrupt flag + \param[out] none + \retval FlagStatus: SET or RESET +*/ +FlagStatus timer_interrupt_flag_get(uint32_t timer_periph, uint32_t interrupt) +{ + uint16_t intval = 0U, intenable = 0U; + + intval = (uint16_t)(TIMER_INTF(timer_periph) & interrupt); + intenable = (uint16_t)(TIMER_DMAINTEN(timer_periph) & interrupt); + + if(((uint16_t)RESET != intval ) && (((uint16_t)RESET) != intenable)){ + return SET; + }else{ + return RESET; + } +} + +/*! + \brief clear TIMER interrupt flag + \param[in] timer_periph: TIMERx(x=0,1,2,5,13,14,15,16) + \param[in] interrupt: the timer interrupt bits + \arg TIMER_INT_FLAG_UP: update interrupt flag + \arg TIMER_INT_FLAG_CH0: channel 0 interrupt flag + \arg TIMER_INT_FLAG_CH1: channel 1 interrupt flag + \arg TIMER_INT_FLAG_CH2: channel 2 interrupt flag + \arg TIMER_INT_FLAG_CH3: channel 3 interrupt flag + \arg TIMER_INT_FLAG_CMT: channel commutation interrupt flag + \arg TIMER_INT_FLAG_TRG: trigger interrupt flag + \arg TIMER_INT_FLAG_BRK: break interrupt flag + \param[out] none + \retval none +*/ +void timer_interrupt_flag_clear(uint32_t timer_periph, uint32_t interrupt) +{ + TIMER_INTF(timer_periph) &= (uint32_t)(~(uint32_t)interrupt); +} + +/*! + \brief get TIMER flags + \param[in] timer_periph: TIMERx(x=0,1,2,5,13,14,15,16) + \param[in] flag: the timer interrupt flags + \arg TIMER_FLAG_UP: update flag + \arg TIMER_FLAG_CH0: channel 0 flag + \arg TIMER_FLAG_CH1: channel 1 flag + \arg TIMER_FLAG_CH2: channel 2 flag + \arg TIMER_FLAG_CH3: channel 3 flag + \arg TIMER_FLAG_CMT: channel commutation flag + \arg TIMER_FLAG_TRG: trigger flag + \arg TIMER_FLAG_BRK: break flag + \arg TIMER_FLAG_CH0O: channel 0 overcapture flag + \arg TIMER_FLAG_CH1O: channel 1 overcapture flag + \arg TIMER_FLAG_CH2O: channel 2 overcapture flag + \arg TIMER_FLAG_CH3O: channel 3 overcapture flag + \param[out] none + \retval FlagStatus: SET or RESET +*/ +FlagStatus timer_flag_get(uint32_t timer_periph, uint32_t flag) +{ + if(((uint16_t)RESET) != ((uint16_t)(TIMER_INTF(timer_periph) & flag))){ + return SET; + }else{ + return RESET; + } +} + +/*! + \brief clear TIMER flags + \param[in] timer_periph: TIMERx(x=0,1,2,5,13,14,15,16) + \param[in] flag: the timer interrupt flags + \arg TIMER_FLAG_UP: update flag + \arg TIMER_FLAG_CH0: channel 0 flag + \arg TIMER_FLAG_CH1: channel 1 flag + \arg TIMER_FLAG_CH2: channel 2 flag + \arg TIMER_FLAG_CH3: channel 3 flag + \arg TIMER_FLAG_CMT: channel commutation flag + \arg TIMER_FLAG_TRG: trigger flag + \arg TIMER_FLAG_BRK: break flag + \arg TIMER_FLAG_CH0O: channel 0 overcapture flag + \arg TIMER_FLAG_CH1O: channel 1 overcapture flag + \arg TIMER_FLAG_CH2O: channel 2 overcapture flag + \arg TIMER_FLAG_CH3O: channel 3 overcapture flag + \param[out] none + \retval none +*/ +void timer_flag_clear(uint32_t timer_periph, uint32_t flag) +{ + TIMER_INTF(timer_periph) &= (uint32_t)(~(uint32_t)flag); +} + +/*! + \brief enable the TIMER DMA + \param[in] timer_periph: TIMERx(x=0,1,2,5,14,15,16) + \param[in] dma: timer DMA source enable + \arg TIMER_DMA_UPD: update DMA enable + \arg TIMER_DMA_CH0D: channel 0 DMA enable + \arg TIMER_DMA_CH1D: channel 1 DMA enable + \arg TIMER_DMA_CH2D: channel 2 DMA enable + \arg TIMER_DMA_CH3D: channel 3 DMA enable + \arg TIMER_DMA_CMTD: channel commutation DMA request enable + \arg TIMER_DMA_TRGD: trigger DMA enable + \param[out] none + \retval none +*/ +void timer_dma_enable(uint32_t timer_periph, uint16_t dma) +{ + TIMER_DMAINTEN(timer_periph) |= (uint32_t) dma; +} + +/*! + \brief disable the TIMER DMA + \param[in] timer_periph: TIMERx(x=0,1,2,5,14,15,16) + \param[in] dma: timer DMA source enable + \arg TIMER_DMA_UPD: update DMA enable + \arg TIMER_DMA_CH0D: channel 0 DMA enable + \arg TIMER_DMA_CH1D: channel 1 DMA enable + \arg TIMER_DMA_CH2D: channel 2 DMA enable + \arg TIMER_DMA_CH3D: channel 3 DMA enable + \arg TIMER_DMA_CMTD: channel commutation DMA request enable + \arg TIMER_DMA_TRGD: trigger DMA enable + \param[out] none + \retval none +*/ +void timer_dma_disable(uint32_t timer_periph, uint16_t dma) +{ + TIMER_DMAINTEN(timer_periph) &= ~(uint32_t)dma; +} + +/*! + \brief channel DMA request source selection + \param[in] timer_periph: TIMERx(x=0,1,2,5,14,15,16) + \param[in] dma_request: channel DMA request source selection + \arg TIMER_DMAREQUEST_CHANNELEVENT: DMA request of channel y is sent when channel y event occurs + \arg TIMER_DMAREQUEST_UPDATEEVENT: DMA request of channel y is sent when update event occurs + \param[out] none + \retval none +*/ +void timer_channel_dma_request_source_select(uint32_t timer_periph, uint8_t dma_request) +{ + if(TIMER_DMAREQUEST_UPDATEEVENT == dma_request){ + TIMER_CTL1(timer_periph) |= (uint32_t)TIMER_CTL1_DMAS; + }else if(TIMER_DMAREQUEST_CHANNELEVENT == dma_request){ + TIMER_CTL1(timer_periph) &= ~(uint32_t)TIMER_CTL1_DMAS; + }else{ + } +} + +/*! + \brief configure the TIMER DMA transfer + \param[in] timer_periph: TIMERx(x=0,1,2,5,14,15,16) + \param[in] dma_baseaddr: + \arg TIMER_DMACFG_DMATA_CTL0: DMA transfer address is TIMER_CTL0 + \arg TIMER_DMACFG_DMATA_CTL1: DMA transfer address is TIMER_CTL1 + \arg TIMER_DMACFG_DMATA_SMCFG: DMA transfer address is TIMER_SMCFG + \arg TIMER_DMACFG_DMATA_DMAINTEN: DMA transfer address is TIMER_DMAINTEN + \arg TIMER_DMACFG_DMATA_INTF: DMA transfer address is TIMER_INTF + \arg TIMER_DMACFG_DMATA_SWEVG: DMA transfer address is TIMER_SWEVG + \arg TIMER_DMACFG_DMATA_CHCTL0: DMA transfer address is TIMER_CHCTL0 + \arg TIMER_DMACFG_DMATA_CHCTL1: DMA transfer address is TIMER_CHCTL1 + \arg TIMER_DMACFG_DMATA_CHCTL2: DMA transfer address is TIMER_CHCTL2 + \arg TIMER_DMACFG_DMATA_CNT: DMA transfer address is TIMER_CNT + \arg TIMER_DMACFG_DMATA_PSC: DMA transfer address is TIMER_PSC + \arg TIMER_DMACFG_DMATA_CAR: DMA transfer address is TIMER_CAR + \arg TIMER_DMACFG_DMATA_CREP: DMA transfer address is TIMER_CREP + \arg TIMER_DMACFG_DMATA_CH0CV: DMA transfer address is TIMER_CH0CV + \arg TIMER_DMACFG_DMATA_CH1CV: DMA transfer address is TIMER_CH1CV + \arg TIMER_DMACFG_DMATA_CH2CV: DMA transfer address is TIMER_CH2CV + \arg TIMER_DMACFG_DMATA_CH3CV: DMA transfer address is TIMER_CH3CV + \arg TIMER_DMACFG_DMATA_CCHP: DMA transfer address is TIMER_CCHP + \arg TIMER_DMACFG_DMATA_DMACFG: DMA transfer address is TIMER_DMACFG + \arg TIMER_DMACFG_DMATA_DMATB: DMA transfer address is TIMER_DMATB + \param[in] dma_lenth: + \arg TIMER_DMACFG_DMATC_xTRANSFER(x=1..18): DMA transfer x time + \param[out] none + \retval none +*/ +void timer_dma_transfer_config(uint32_t timer_periph, uint32_t dma_baseaddr, uint32_t dma_lenth) +{ + TIMER_DMACFG(timer_periph) &= (uint32_t)(~(TIMER_DMACFG_DMATA | TIMER_DMACFG_DMATC)); + TIMER_DMACFG(timer_periph) |= (uint32_t)(dma_baseaddr | dma_lenth); +} + +/*! + \brief software generate events + \param[in] timer_periph: TIMERx(x=0,1,2,5,13,14,15,16) + \param[in] event: the timer software event generation sources + \arg TIMER_EVENT_SRC_UPG: update event generation + \arg TIMER_EVENT_SRC_CH0G: channel 0 capture or compare event generation + \arg TIMER_EVENT_SRC_CH1G: channel 1 capture or compare event generation + \arg TIMER_EVENT_SRC_CH2G: channel 2 capture or compare event generation + \arg TIMER_EVENT_SRC_CH3G: channel 3 capture or compare event generation + \arg TIMER_EVENT_SRC_CMTG: channel commutation event generation + \arg TIMER_EVENT_SRC_TRGG: trigger event generation + \arg TIMER_EVENT_SRC_BRKG: break event generation + \param[out] none + \retval none +*/ +void timer_event_software_generate(uint32_t timer_periph, uint16_t event) +{ + TIMER_SWEVG(timer_periph) |= (uint32_t)event; +} + +/*! + \brief configure TIMER break function + \param[in] timer_periph: TIMERx(x=0,14,15,16) + \param[in] breakpara: TIMER break parameter struct + runoffstate: TIMER_ROS_STATE_ENABLE,TIMER_ROS_STATE_DISABLE + ideloffstate: TIMER_IOS_STATE_ENABLE,TIMER_IOS_STATE_DISABLE + deadtime: 0~255 + breakpolarity: TIMER_BREAK_POLARITY_LOW,TIMER_BREAK_POLARITY_HIGH + outputautostate: TIMER_OUTAUTO_ENABLE,TIMER_OUTAUTO_DISABLE + protectmode: TIMER_CCHP_PROT_OFF,TIMER_CCHP_PROT_0,TIMER_CCHP_PROT_1,TIMER_CCHP_PROT_2 + breakstate: TIMER_BREAK_ENABLE,TIMER_BREAK_DISABLE + \param[out] none + \retval none +*/ +void timer_break_config(uint32_t timer_periph, timer_break_parameter_struct* breakpara) +{ + TIMER_CCHP(timer_periph) = (uint32_t)(((uint32_t)breakpara->runoffstate) | + ((uint32_t)breakpara->ideloffstate) | + ((uint32_t)breakpara->deadtime) | + ((uint32_t)breakpara->breakpolarity) | + ((uint32_t)breakpara->outputautostate) | + ((uint32_t)breakpara->protectmode) | + ((uint32_t)breakpara->breakstate)); +} + +/*! + \brief enable TIMER break function + \param[in] timer_periph: TIMERx(x=0,14,15,16) + \param[out] none + \retval none +*/ +void timer_break_enable(uint32_t timer_periph) +{ + TIMER_CCHP(timer_periph) |= (uint32_t)TIMER_BREAK_ENABLE; +} + +/*! + \brief disable TIMER break function + \param[in] timer_periph: TIMERx(x=0,14,15,16) + \param[out] none + \retval none +*/ +void timer_break_disable(uint32_t timer_periph) +{ + TIMER_CCHP(timer_periph) &= (uint32_t)TIMER_BREAK_DISABLE; +} + +/*! + \brief enable TIMER output automatic function + \param[in] timer_periph: TIMERx(x=0,14,15,16) + \param[out] none + \retval none +*/ +void timer_automatic_output_enable(uint32_t timer_periph) +{ + TIMER_CCHP(timer_periph) |= (uint32_t)TIMER_OUTAUTO_ENABLE; +} + +/*! + \brief disable TIMER output automatic function + \param[in] timer_periph: TIMERx(x=0,14,15,16) + \param[out] none + \retval none +*/ +void timer_automatic_output_disable(uint32_t timer_periph) +{ + TIMER_CCHP(timer_periph) &= (uint32_t)TIMER_OUTAUTO_DISABLE; +} + +/*! + \brief configure TIMER primary output function + \param[in] timer_periph: TIMERx(x=0,14,15,16) + \param[in] newvalue: ENABLE or DISABLE + \param[out] none + \retval none +*/ +void timer_primary_output_config(uint32_t timer_periph,ControlStatus newvalue) +{ + if(newvalue){ + TIMER_CCHP(timer_periph) |= (uint32_t)TIMER_CCHP_POEN; + }else{ + TIMER_CCHP(timer_periph) &= (uint32_t)(~ TIMER_CCHP_POEN); + } +} + +/*! + \brief channel capture/compare control shadow register enable + \param[in] timer_periph: TIMERx(x=0,14,15,16) + \param[in] newvalue: ENABLE or DISABLE + \param[out] none + \retval none +*/ +void timer_channel_control_shadow_config(uint32_t timer_periph, ControlStatus newvalue) +{ + if(newvalue){ + TIMER_CTL1(timer_periph) |= (uint32_t)TIMER_CTL1_CCSE; + }else{ + TIMER_CTL1(timer_periph) &= (uint32_t)(~TIMER_CTL1_CCSE); + } +} + +/*! + \brief configure TIMER channel control shadow register update control + \param[in] timer_periph: TIMERx(x=0,1,2) + \param[in] ccuctl: channel control shadow register update control + \arg TIMER_UPDATECTL_CCU: the shadow registers update by when CMTG bit is set + \arg TIMER_UPDATECTL_CCUTRI: the shadow registers update by when CMTG bit is set or an rising edge of TRGI occurs + \param[out] none + \retval none +*/ +void timer_channel_control_shadow_update_config(uint32_t timer_periph, uint8_t ccuctl) +{ + if(TIMER_UPDATECTL_CCU == ccuctl){ + TIMER_CTL1(timer_periph) &= (~(uint32_t)TIMER_CTL1_CCUC); + }else if(TIMER_UPDATECTL_CCUTRI == ccuctl){ + TIMER_CTL1(timer_periph) |= (uint32_t)TIMER_CTL1_CCUC; + }else{ + } +} + +/*! + \brief configure TIMER channel output function + \param[in] timer_periph: TIMERx(x=0,1,2,13,14,15,16) + \param[in] channel: + \arg TIMER_CH_0: TIMER channel0(TIMERx(x=0,1,2,13,14,15,16)) + \arg TIMER_CH_1: TIMER channel1(TIMERx(x=0,1,2,14)) + \arg TIMER_CH_2: TIMER channel2(TIMERx(x=0,1,2)) + \arg TIMER_CH_3: TIMER channel3(TIMERx(x=0,1,2)) + \param[in] ocpara: TIMER channeln output parameter struct + outputstate: TIMER_CCX_ENABLE,TIMER_CCX_DISABLE + outputnstate: TIMER_CCXN_ENABLE,TIMER_CCXN_DISABLE + ocpolarity: TIMER_OC_POLARITY_HIGH,TIMER_OC_POLARITY_LOW + ocnpolarity: TIMER_OCN_POLARITY_HIGH,TIMER_OCN_POLARITY_LOW + ocidlestate: TIMER_OC_IDLE_STATE_LOW,TIMER_OC_IDLE_STATE_HIGH + ocnidlestate: TIMER_OCN_IDLE_STATE_LOW,TIMER_OCN_IDLE_STATE_HIGH + \param[out] none + \retval none +*/ +void timer_channel_output_config(uint32_t timer_periph, uint16_t channel, timer_oc_parameter_struct* ocpara) +{ + switch(channel){ + /* configure TIMER_CH_0 */ + case TIMER_CH_0: + /* reset the CH0EN bit */ + TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH0EN); + /* set the CH0EN bit */ + TIMER_CHCTL2(timer_periph) |= (uint32_t)ocpara->outputstate; + /* reset the CH0P bit */ + TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH0P); + /* set the CH0P bit */ + TIMER_CHCTL2(timer_periph) |= (uint32_t)ocpara->ocpolarity; + + if((TIMER0 == timer_periph) || (TIMER14 == timer_periph) || (TIMER15 == timer_periph) || (TIMER16 == timer_periph)){ + /* reset the CH0NEN bit */ + TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH0NEN); + /* set the CH0NEN bit */ + TIMER_CHCTL2(timer_periph) |= (uint32_t)ocpara->outputnstate; + /* reset the CH0NP bit */ + TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH0NP); + /* set the CH0NP bit */ + TIMER_CHCTL2(timer_periph) |= (uint32_t)ocpara->ocnpolarity; + /* reset the ISO0 bit */ + TIMER_CTL1(timer_periph) &=(uint32_t)(~TIMER_CTL1_ISO0); + /* set the ISO0 bit */ + TIMER_CTL1(timer_periph) |= (uint32_t)ocpara->ocidlestate; + /* reset the ISO0N bit */ + TIMER_CTL1(timer_periph) &=(uint32_t)(~TIMER_CTL1_ISO0N); + /* set the ISO0N bit */ + TIMER_CTL1(timer_periph) |= (uint32_t)ocpara->ocnidlestate; + } + break; + /* configure TIMER_CH_1 */ + case TIMER_CH_1: + /* reset the CH1EN bit */ + TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH1EN); + /* set the CH1EN bit */ + TIMER_CHCTL2(timer_periph) |= (uint32_t)((uint32_t)ocpara->outputstate << 4); + /* reset the CH1P bit */ + TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH1P); + /* set the CH1P bit */ + TIMER_CHCTL2(timer_periph) |= (uint32_t)((uint32_t)ocpara->ocpolarity << 4); + + if((TIMER0 == timer_periph)){ + /* reset the CH1NEN bit */ + TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH1NEN); + /* set the CH1NEN bit */ + TIMER_CHCTL2(timer_periph) |= (uint32_t)((uint32_t)ocpara->outputnstate << 4); + /* reset the CH1NP bit */ + TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH1NP); + /* set the CH1NP bit */ + TIMER_CHCTL2(timer_periph) |= (uint32_t)((uint32_t)ocpara->ocnpolarity << 4); + /* reset the ISO1 bit */ + TIMER_CTL1(timer_periph) &=(uint32_t)(~TIMER_CTL1_ISO1); + /* set the ISO1 bit */ + TIMER_CTL1(timer_periph) |= (uint32_t)((uint32_t)ocpara->ocidlestate << 2); + /* reset the ISO1N bit */ + TIMER_CTL1(timer_periph) &=(uint32_t)(~TIMER_CTL1_ISO1N); + /* set the ISO1N bit */ + TIMER_CTL1(timer_periph) |= (uint32_t)((uint32_t)ocpara->ocnidlestate << 2); + } + break; + /* configure TIMER_CH_2 */ + case TIMER_CH_2: + /* reset the CH2EN bit */ + TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH2EN); + /* set the CH2EN bit */ + TIMER_CHCTL2(timer_periph) |= (uint32_t)((uint32_t)ocpara->outputstate << 8); + /* reset the CH2P bit */ + TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH2P); + /* set the CH2P bit */ + TIMER_CHCTL2(timer_periph) |= (uint32_t)((uint32_t)ocpara->ocpolarity << 8); + + if((TIMER0 == timer_periph)){ + /* reset the CH2NEN bit */ + TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH2NEN); + /* set the CH2NEN bit */ + TIMER_CHCTL2(timer_periph) |= (uint32_t)((uint32_t)ocpara->outputnstate << 8); + /* reset the CH2NP bit */ + TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH2NP); + /* set the CH2NP bit */ + TIMER_CHCTL2(timer_periph) |= (uint32_t)((uint32_t)ocpara->ocnpolarity << 8); + /* reset the ISO2 bit */ + TIMER_CTL1(timer_periph) &=(uint32_t)(~TIMER_CTL1_ISO2); + /* set the ISO2 bit */ + TIMER_CTL1(timer_periph) |= (uint32_t)((uint32_t)ocpara->ocidlestate << 4); + /* reset the ISO2N bit */ + TIMER_CTL1(timer_periph) &=(uint32_t)(~TIMER_CTL1_ISO2N); + /* set the ISO2N bit */ + TIMER_CTL1(timer_periph) |= (uint32_t)((uint32_t)ocpara->ocnidlestate << 4); + } + break; + /* configure TIMER_CH_3 */ + case TIMER_CH_3: + /* reset the CH3EN bit */ + TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH3EN); + /* set the CH3EN bit */ + TIMER_CHCTL2(timer_periph) |= (uint32_t)((uint32_t)ocpara->outputstate << 12); + /* reset the CH3P bit */ + TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH3P); + /* set the CH3P bit */ + TIMER_CHCTL2(timer_periph) |= (uint32_t)((uint32_t)ocpara->ocpolarity << 12); + + if((TIMER0 == timer_periph)){ + /* reset the ISO3 bit */ + TIMER_CTL1(timer_periph) &=(uint32_t)(~TIMER_CTL1_ISO3); + /* set the ISO3 bit */ + TIMER_CTL1(timer_periph) |= (uint32_t)((uint32_t)ocpara->ocidlestate << 6); + } + break; + default: + break; + } +} + +/*! + \brief configure TIMER channel output compare mode + \param[in] timer_periph: TIMERx(x=0,1,2,13,14,15,16) + \param[in] channel: + \arg TIMER_CH_0: TIMER channel0(TIMERx(x=0,1,2,13,14,15,16)) + \arg TIMER_CH_1: TIMER channel1(TIMERx(x=0,1,2,14)) + \arg TIMER_CH_2: TIMER channel2(TIMERx(x=0,1,2)) + \arg TIMER_CH_3: TIMER channel3(TIMERx(x=0,1,2)) + \param[in] ocmode: channel output compare mode + \arg TIMER_OC_MODE_TIMING: timing mode + \arg TIMER_OC_MODE_ACTIVE: active mode + \arg TIMER_OC_MODE_INACTIVE: inactive mode + \arg TIMER_OC_MODE_TOGGLE: toggle mode + \arg TIMER_OC_MODE_LOW: force low mode + \arg TIMER_OC_MODE_HIGH: force high mode + \arg TIMER_OC_MODE_PWM0: PWM0 mode + \arg TIMER_OC_MODE_PWM1: PWM1 mode + \param[out] none + \retval none +*/ +void timer_channel_output_mode_config(uint32_t timer_periph, uint16_t channel, uint16_t ocmode) +{ + switch(channel){ + /* configure TIMER_CH_0 */ + case TIMER_CH_0: + TIMER_CHCTL0(timer_periph) &=(uint32_t)(~TIMER_CHCTL0_CH0COMCTL); + TIMER_CHCTL0(timer_periph) |= (uint32_t)ocmode; + break; + /* configure TIMER_CH_1 */ + case TIMER_CH_1: + TIMER_CHCTL0(timer_periph) &=(uint32_t)(~TIMER_CHCTL0_CH1COMCTL); + TIMER_CHCTL0(timer_periph) |= (uint32_t)((uint32_t)ocmode << 8); + break; + /* configure TIMER_CH_2 */ + case TIMER_CH_2: + TIMER_CHCTL1(timer_periph) &=(uint32_t)(~TIMER_CHCTL1_CH2COMCTL); + TIMER_CHCTL1(timer_periph) |= (uint32_t)ocmode; + break; + /* configure TIMER_CH_3 */ + case TIMER_CH_3: + TIMER_CHCTL1(timer_periph) &=(uint32_t)(~TIMER_CHCTL1_CH3COMCTL); + TIMER_CHCTL1(timer_periph) |= (uint32_t)((uint32_t)ocmode << 8); + break; + default: + break; + } +} + +/*! + \brief configure TIMER channel output pulse value + \param[in] timer_periph: TIMERx(x=0,1,2,13,14,15,16) + \param[in] channel: + \arg TIMER_CH_0: TIMER channel0(TIMERx(x=0,1,2,13,14,15,16)) + \arg TIMER_CH_1: TIMER channel1(TIMERx(x=0,1,2,14)) + \arg TIMER_CH_2: TIMER channel2(TIMERx(x=0,1,2)) + \arg TIMER_CH_3: TIMER channel3(TIMERx(x=0,1,2)) + \param[in] pulse: channel output pulse value + \param[out] none + \retval none +*/ +void timer_channel_output_pulse_value_config(uint32_t timer_periph, uint16_t channel, uint32_t pulse) +{ + switch(channel){ + /* configure TIMER_CH_0 */ + case TIMER_CH_0: + TIMER_CH0CV(timer_periph) = (uint32_t)pulse; + break; + /* configure TIMER_CH_1 */ + case TIMER_CH_1: + TIMER_CH1CV(timer_periph) = (uint32_t)pulse; + break; + /* configure TIMER_CH_2 */ + case TIMER_CH_2: + TIMER_CH2CV(timer_periph) = (uint32_t)pulse; + break; + /* configure TIMER_CH_3 */ + case TIMER_CH_3: + TIMER_CH3CV(timer_periph) = (uint32_t)pulse; + break; + default: + break; + } +} + +/*! + \brief configure TIMER channel output shadow function + \param[in] timer_periph: TIMERx(x=0,1,2,13,14,15,16) + \param[in] channel: + \arg TIMER_CH_0: TIMER channel0(TIMERx(x=0,1,2,13,14,15,16)) + \arg TIMER_CH_1: TIMER channel1(TIMERx(x=0,1,2,14)) + \arg TIMER_CH_2: TIMER channel2(TIMERx(x=0,1,2)) + \arg TIMER_CH_3: TIMER channel3(TIMERx(x=0,1,2)) + \param[in] ocshadow: channel output shadow state + \arg TIMER_OC_SHADOW_ENABLE: channel output shadow state enable + \arg TIMER_OC_SHADOW_DISABLE: channel output shadow state disable + \param[out] none + \retval none +*/ +void timer_channel_output_shadow_config(uint32_t timer_periph, uint16_t channel, uint16_t ocshadow) +{ + switch(channel){ + /* configure TIMER_CH_0 */ + case TIMER_CH_0: + TIMER_CHCTL0(timer_periph) &=(uint32_t)(~TIMER_CHCTL0_CH0COMSEN); + TIMER_CHCTL0(timer_periph) |= (uint32_t)ocshadow; + break; + /* configure TIMER_CH_1 */ + case TIMER_CH_1: + TIMER_CHCTL0(timer_periph) &=(uint32_t)(~TIMER_CHCTL0_CH1COMSEN); + TIMER_CHCTL0(timer_periph) |= (uint32_t)((uint32_t)ocshadow << 8); + break; + /* configure TIMER_CH_2 */ + case TIMER_CH_2: + TIMER_CHCTL1(timer_periph) &=(uint32_t)(~TIMER_CHCTL1_CH2COMSEN); + TIMER_CHCTL1(timer_periph) |= (uint32_t)ocshadow; + break; + /* configure TIMER_CH_3 */ + case TIMER_CH_3: + TIMER_CHCTL1(timer_periph) &=(uint32_t)(~TIMER_CHCTL1_CH3COMSEN); + TIMER_CHCTL1(timer_periph) |= (uint32_t)((uint32_t)ocshadow << 8); + break; + default: + break; + } +} + +/*! + \brief configure TIMER channel output fast function + \param[in] timer_periph: TIMERx(x=0,1,2,13,14,15,16) + \param[in] channel: + \arg TIMER_CH_0: TIMER channel0(TIMERx(x=0,1,2,13,14,15,16)) + \arg TIMER_CH_1: TIMER channel1(TIMERx(x=0,1,2,14)) + \arg TIMER_CH_2: TIMER channel2(TIMERx(x=0,1,2)) + \arg TIMER_CH_3: TIMER channel3(TIMERx(x=0,1,2)) + \param[in] ocfast: channel output fast function + \arg TIMER_OC_FAST_ENABLE: channel output fast function enable + \arg TIMER_OC_FAST_DISABLE: channel output fast function disable + \param[out] none + \retval none +*/ +void timer_channel_output_fast_config(uint32_t timer_periph, uint16_t channel, uint16_t ocfast) +{ + switch(channel){ + /* configure TIMER_CH_0 */ + case TIMER_CH_0: + TIMER_CHCTL0(timer_periph) &=(uint32_t)(~TIMER_CHCTL0_CH0COMFEN); + TIMER_CHCTL0(timer_periph) |= (uint32_t)ocfast; + break; + /* configure TIMER_CH_1 */ + case TIMER_CH_1: + TIMER_CHCTL0(timer_periph) &=(uint32_t)(~TIMER_CHCTL0_CH1COMFEN); + TIMER_CHCTL0(timer_periph) |= (uint32_t)((uint32_t)ocfast << 8); + break; + /* configure TIMER_CH_2 */ + case TIMER_CH_2: + TIMER_CHCTL1(timer_periph) &=(uint32_t)(~TIMER_CHCTL1_CH2COMFEN); + TIMER_CHCTL1(timer_periph) |= (uint32_t)ocfast; + break; + /* configure TIMER_CH_3 */ + case TIMER_CH_3: + TIMER_CHCTL1(timer_periph) &=(uint32_t)(~TIMER_CHCTL1_CH3COMFEN); + TIMER_CHCTL1(timer_periph) |= (uint32_t)((uint32_t)ocfast << 8); + break; + default: + break; + } +} + +/*! + \brief configure TIMER channel output clear function + \param[in] timer_periph: TIMERx(x=0,1,2,13,14,15,16) + \param[in] channel: + \arg TIMER_CH_0: TIMER channel0(TIMERx(x=0,1,2,13,14,15,16)) + \arg TIMER_CH_1: TIMER channel1(TIMERx(x=0,1,2,14)) + \arg TIMER_CH_2: TIMER channel2(TIMERx(x=0,1,2)) + \arg TIMER_CH_3: TIMER channel3(TIMERx(x=0,1,2)) + \param[in] occlear: channel output clear function + \arg TIMER_OC_CLEAR_ENABLE: channel output clear function enable + \arg TIMER_OC_CLEAR_DISABLE: channel output clear function disable + \param[out] none + \retval none +*/ +void timer_channel_output_clear_config(uint32_t timer_periph, uint16_t channel, uint16_t occlear) +{ + switch(channel){ + /* configure TIMER_CH_0 */ + case TIMER_CH_0: + TIMER_CHCTL0(timer_periph) &=(uint32_t)(~TIMER_CHCTL0_CH0COMCEN); + TIMER_CHCTL0(timer_periph) |= (uint32_t)occlear; + break; + /* configure TIMER_CH_1 */ + case TIMER_CH_1: + TIMER_CHCTL0(timer_periph) &=(uint32_t)(~TIMER_CHCTL0_CH1COMCEN); + TIMER_CHCTL0(timer_periph) |= (uint32_t)((uint32_t)occlear << 8); + break; + /* configure TIMER_CH_2 */ + case TIMER_CH_2: + TIMER_CHCTL1(timer_periph) &=(uint32_t)(~TIMER_CHCTL1_CH2COMCEN); + TIMER_CHCTL1(timer_periph) |= (uint32_t)occlear; + break; + /* configure TIMER_CH_3 */ + case TIMER_CH_3: + TIMER_CHCTL1(timer_periph) &=(uint32_t)(~TIMER_CHCTL1_CH3COMCEN); + TIMER_CHCTL1(timer_periph) |= (uint32_t)((uint32_t)occlear << 8); + break; + default: + break; + } +} + +/*! + \brief configure TIMER channel output polarity + \param[in] timer_periph: TIMERx(x=0,1,2,13,14,15,16) + \param[in] channel: + \arg TIMER_CH_0: TIMER channel0(TIMERx(x=0,1,2,13,14,15,16)) + \arg TIMER_CH_1: TIMER channel1(TIMERx(x=0,1,2,14)) + \arg TIMER_CH_2: TIMER channel2(TIMERx(x=0,1,2)) + \arg TIMER_CH_3: TIMER channel3(TIMERx(x=0,1,2)) + \param[in] ocpolarity: channel output polarity + \arg TIMER_OC_POLARITY_HIGH: channel output polarity is high + \arg TIMER_OC_POLARITY_LOW: channel output polarity is low + \param[out] none + \retval none +*/ +void timer_channel_output_polarity_config(uint32_t timer_periph, uint16_t channel, uint16_t ocpolarity) +{ + switch(channel){ + /* configure TIMER_CH_0 */ + case TIMER_CH_0: + TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH0P); + TIMER_CHCTL2(timer_periph) |= (uint32_t)ocpolarity; + break; + /* configure TIMER_CH_1 */ + case TIMER_CH_1: + TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH1P); + TIMER_CHCTL2(timer_periph) |= (uint32_t)((uint32_t)ocpolarity << 4); + break; + /* configure TIMER_CH_2 */ + case TIMER_CH_2: + TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH2P); + TIMER_CHCTL2(timer_periph) |= (uint32_t)((uint32_t)ocpolarity << 8); + break; + /* configure TIMER_CH_3 */ + case TIMER_CH_3: + TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH3P); + TIMER_CHCTL2(timer_periph) |= (uint32_t)((uint32_t)ocpolarity << 12); + break; + default: + break; + } +} + +/*! + \brief configure TIMER channel complementary output polarity + \param[in] timer_periph: TIMERx(x=0,1,2,13,14,15,16) + \param[in] channel: + \arg TIMER_CH_0: TIMER channel0(TIMERx(x=0,1,2,13,14,15,16)) + \arg TIMER_CH_1: TIMER channel1(TIMERx(x=0,1,2,14)) + \arg TIMER_CH_2: TIMER channel2(TIMERx(x=0,1,2)) + \param[in] ocnpolarity: channel complementary output polarity + \arg TIMER_OCN_POLARITY_HIGH: channel complementary output polarity is high + \arg TIMER_OCN_POLARITY_LOW: channel complementary output polarity is low + \param[out] none + \retval none +*/ +void timer_channel_complementary_output_polarity_config(uint32_t timer_periph, uint16_t channel, uint16_t ocnpolarity) +{ + switch(channel){ + /* configure TIMER_CH_0 */ + case TIMER_CH_0: + TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH0NP); + TIMER_CHCTL2(timer_periph) |= (uint32_t)ocnpolarity; + break; + /* configure TIMER_CH_1 */ + case TIMER_CH_1: + TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH1NP); + TIMER_CHCTL2(timer_periph) |= (uint32_t)((uint32_t)ocnpolarity << 4); + break; + /* configure TIMER_CH_2 */ + case TIMER_CH_2: + TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH2NP); + TIMER_CHCTL2(timer_periph) |= (uint32_t)((uint32_t)ocnpolarity << 8); + break; + default: + break; + } +} + +/*! + \brief configure TIMER OCPRE clear source selection + \param[in] timer_periph: TIMERx(x=0,1,2) + \param[in] clear: OCPRE clear source + \arg TIMER_OCPRE_CLEAR_SOURCE_ETIF: OCPRE_CLR_INT is connected to ETIF + \arg TIMER_OCPRE_CLEAR_SOURCE_CLR: OCPRE_CLR_INT is connected to the OCPRE_CLR input + \param[out] none + \retval none +*/ +void timer_ocpre_clear_source_config(uint32_t timer_periph, uint8_t ocpreclear) +{ + if(TIMER_OCPRE_CLEAR_SOURCE_ETIF == ocpreclear){ + TIMER_SMCFG(timer_periph) |= (uint32_t)TIMER_SMCFG_OCRC; + }else if(TIMER_OCPRE_CLEAR_SOURCE_CLR == ocpreclear){ + TIMER_SMCFG(timer_periph) &= ~(uint32_t)TIMER_SMCFG_OCRC; + }else{ + } +} + +/*! + \brief configure TIMER channel enable state + \param[in] timer_periph: TIMERx(x=0,1,2,13,14,15,16) + \param[in] channel: + \arg TIMER_CH_0: TIMER channel0(TIMERx(x=0,1,2,13,14,15,16)) + \arg TIMER_CH_1: TIMER channel1(TIMERx(x=0,1,2,14)) + \arg TIMER_CH_2: TIMER channel2(TIMERx(x=0,1,2)) + \arg TIMER_CH_3: TIMER channel3(TIMERx(x=0,1,2)) + \param[in] state: TIMER channel enable state + \arg TIMER_CCX_ENABLE: channel enable + \arg TIMER_CCX_DISABLE: channel disable + \param[out] none + \retval none +*/ +void timer_channel_output_state_config(uint32_t timer_periph, uint16_t channel, uint16_t state) +{ + switch(channel){ + /* configure TIMER_CH_0 */ + case TIMER_CH_0: + TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH0EN); + TIMER_CHCTL2(timer_periph) |= (uint32_t)state; + break; + /* configure TIMER_CH_1 */ + case TIMER_CH_1: + TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH1EN); + TIMER_CHCTL2(timer_periph) |= (uint32_t)((uint32_t)state << 4); + break; + /* configure TIMER_CH_2 */ + case TIMER_CH_2: + TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH2EN); + TIMER_CHCTL2(timer_periph) |= (uint32_t)((uint32_t)state << 8); + break; + /* configure TIMER_CH_3 */ + case TIMER_CH_3: + TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH3EN); + TIMER_CHCTL2(timer_periph) |= (uint32_t)((uint32_t)state << 12); + break; + default: + break; + } +} + +/*! + \brief configure TIMER channel complementary output enable state + \param[in] timer_periph: TIMERx(x=0,1,2,13,14,15,16) + \param[in] channel: + \arg TIMER_CH_0: TIMER channel0(TIMERx(x=0,1,2,13,14,15,16)) + \arg TIMER_CH_1: TIMER channel1(TIMERx(x=0,1,2,14)) + \arg TIMER_CH_2: TIMER channel2(TIMERx(x=0,1,2)) + \param[in] ocnstate: TIMER channel complementary output enable state + \arg TIMER_CCXN_ENABLE: channel complementary enable + \arg TIMER_CCXN_DISABLE: channel complementary disable + \param[out] none + \retval none +*/ +void timer_channel_complementary_output_state_config(uint32_t timer_periph, uint16_t channel, uint16_t ocnstate) +{ + switch(channel){ + /* configure TIMER_CH_0 */ + case TIMER_CH_0: + TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH0NEN); + TIMER_CHCTL2(timer_periph) |= (uint32_t)ocnstate; + break; + /* configure TIMER_CH_1 */ + case TIMER_CH_1: + TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH1NEN); + TIMER_CHCTL2(timer_periph) |= (uint32_t)((uint32_t)ocnstate << 4); + break; + /* configure TIMER_CH_2 */ + case TIMER_CH_2: + TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH2NEN); + TIMER_CHCTL2(timer_periph) |= (uint32_t)((uint32_t)ocnstate << 8); + break; + default: + break; + } +} + +/*! + \brief configure TIMER input capture parameter + \param[in] timer_periph: TIMERx(x=0,1,2,5,13,14,15,16) + \param[in] channel: + \arg TIMER_CH_0: TIMER channel0(TIMERx(x=0,1,2,13,14,15,16)) + \arg TIMER_CH_1: TIMER channel1(TIMERx(x=0,1,2,14)) + \arg TIMER_CH_2: TIMER channel2(TIMERx(x=0,1,2)) + \arg TIMER_CH_3: TIMER channel3(TIMERx(x=0,1,2)) + \param[in] icpara: TIMER channel intput parameter struct + icpolarity: TIMER_IC_POLARITY_RISING,TIMER_IC_POLARITY_FALLING,TIMER_IC_POLARITY_BOTH_EDGE + icselection: TIMER_IC_SELECTION_DIRECTTI,TIMER_IC_SELECTION_INDIRECTTI,TIMER_IC_SELECTION_ITS + icprescaler: TIMER_IC_PSC_DIV1,TIMER_IC_PSC_DIV2,TIMER_IC_PSC_DIV4,TIMER_IC_PSC_DIV8 + icfilter: 0~15 + \param[out] none + \retval none +*/ +void timer_input_capture_config(uint32_t timer_periph,uint16_t channel,timer_ic_parameter_struct* icpara) +{ + switch(channel){ + /* configure TIMER_CH_0 */ + case TIMER_CH_0: + /* reset the CH0EN bit */ + TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH0EN); + + /* reset the CH0P and CH0NP bits */ + TIMER_CHCTL2(timer_periph) &=(uint32_t)(~(TIMER_CHCTL2_CH0P|TIMER_CHCTL2_CH0NP)); + TIMER_CHCTL2(timer_periph) |= (uint32_t)(icpara->icpolarity); + /* reset the CH0MS bit */ + TIMER_CHCTL0(timer_periph) &=(uint32_t)(~TIMER_CHCTL0_CH0MS); + TIMER_CHCTL0(timer_periph) |= (uint32_t)(icpara->icselection); + /* reset the CH0CAPFLT bit */ + TIMER_CHCTL0(timer_periph) &=(uint32_t)(~TIMER_CHCTL0_CH0CAPFLT); + TIMER_CHCTL0(timer_periph) |= (uint32_t)(((uint32_t)icpara->icfilter << 4)); + + /* set the CH0EN bit */ + TIMER_CHCTL2(timer_periph) |= (uint32_t)TIMER_CHCTL2_CH0EN; + break; + /* configure TIMER_CH_1 */ + case TIMER_CH_1: + /* reset the CH1EN bit */ + TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH1EN); + + /* reset the CH1P and CH1NP bits */ + TIMER_CHCTL2(timer_periph) &=(uint32_t)(~(TIMER_CHCTL2_CH1P|TIMER_CHCTL2_CH1NP)); + TIMER_CHCTL2(timer_periph) |= (uint32_t)((uint32_t)icpara->icpolarity << 4); + /* reset the CH1MS bit */ + TIMER_CHCTL0(timer_periph) &=(uint32_t)(~TIMER_CHCTL0_CH1MS); + TIMER_CHCTL0(timer_periph) |= (uint32_t)((uint32_t)icpara->icselection << 8); + /* reset the CH1CAPFLT bit */ + TIMER_CHCTL0(timer_periph) &=(uint32_t)(~TIMER_CHCTL0_CH1CAPFLT); + TIMER_CHCTL0(timer_periph) |= (uint32_t)((uint32_t)icpara->icfilter << 12); + + /* set the CH1EN bit */ + TIMER_CHCTL2(timer_periph) |= (uint32_t)TIMER_CHCTL2_CH1EN; + break; + /* configure TIMER_CH_2 */ + case TIMER_CH_2: + /* reset the CH2EN bit */ + TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH2EN); + + /* reset the CH2P and CH2NP bits */ + TIMER_CHCTL2(timer_periph) &=(uint32_t)(~(TIMER_CHCTL2_CH2P|TIMER_CHCTL2_CH2NP)); + TIMER_CHCTL2(timer_periph) |= (uint32_t)((uint32_t)icpara->icpolarity << 8); + /* reset the CH2MS bit */ + TIMER_CHCTL1(timer_periph) &=(uint32_t)(~TIMER_CHCTL1_CH2MS); + TIMER_CHCTL1(timer_periph) |= (uint32_t)(icpara->icselection); + /* reset the CH2CAPFLT bit */ + TIMER_CHCTL1(timer_periph) &=(uint32_t)(~TIMER_CHCTL1_CH2CAPFLT); + TIMER_CHCTL1(timer_periph) |= (uint32_t)((uint32_t)icpara->icfilter<< 4); + + /* set the CH2EN bit */ + TIMER_CHCTL2(timer_periph) |= (uint32_t)TIMER_CHCTL2_CH2EN; + break; + /* configure TIMER_CH_3 */ + case TIMER_CH_3: + /* reset the CH3EN bit */ + TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH3EN); + + /* reset the CH3P bits */ + TIMER_CHCTL2(timer_periph) &=(uint32_t)(~(TIMER_CHCTL2_CH3P)); + TIMER_CHCTL2(timer_periph) |= (uint32_t)((uint32_t)icpara->icpolarity << 12); + /* reset the CH3MS bit */ + TIMER_CHCTL1(timer_periph) &=(uint32_t)(~TIMER_CHCTL1_CH3MS); + TIMER_CHCTL1(timer_periph) |= (uint32_t)((uint32_t)icpara->icselection << 8); + /* reset the CH3CAPFLT bit */ + TIMER_CHCTL1(timer_periph) &=(uint32_t)(~TIMER_CHCTL1_CH3CAPFLT); + TIMER_CHCTL1(timer_periph) |= (uint32_t)((uint32_t)icpara->icfilter << 12); + + /* set the CH3EN bit */ + TIMER_CHCTL2(timer_periph) |= (uint32_t)TIMER_CHCTL2_CH3EN; + break; + default: + break; + } + /* configure TIMER channel input capture prescaler value */ + timer_channel_input_capture_prescaler_config(timer_periph, channel,(uint32_t)icpara->icprescaler); +} + +/*! + \brief configure TIMER channel input capture prescaler value + \param[in] timer_periph: TIMERx(x=0,1,2,13,14,15,16) + \param[in] channel: + \arg TIMER_CH_0: TIMER channel0(TIMERx(x=0,1,2,13,14,15,16)) + \arg TIMER_CH_1: TIMER channel1(TIMERx(x=0,1,2,14)) + \arg TIMER_CH_2: TIMER channel2(TIMERx(x=0,1,2)) + \arg TIMER_CH_3: TIMER channel3(TIMERx(x=0,1,2)) + \param[in] prescaler: channel input capture prescaler value + \arg TIMER_IC_PSC_DIV1: no prescaler + \arg TIMER_IC_PSC_DIV2: divided by 2 + \arg TIMER_IC_PSC_DIV4: divided by 4 + \arg TIMER_IC_PSC_DIV8: divided by 8 + \param[out] none + \retval none +*/ +void timer_channel_input_capture_prescaler_config(uint32_t timer_periph, uint16_t channel, uint32_t prescaler) +{ + switch(channel){ + /* configure TIMER_CH_0 */ + case TIMER_CH_0: + TIMER_CHCTL0(timer_periph) &= (uint32_t)(~ TIMER_CHCTL0_CH0CAPPSC); + TIMER_CHCTL0(timer_periph) |= (uint32_t)prescaler; + break; + /* configure TIMER_CH_1 */ + case TIMER_CH_1: + TIMER_CHCTL0(timer_periph) &= (uint32_t)(~TIMER_CHCTL0_CH1CAPPSC); + TIMER_CHCTL0(timer_periph) |= (uint32_t)(prescaler << 8); + break; + /* configure TIMER_CH_2 */ + case TIMER_CH_2: + TIMER_CHCTL1(timer_periph) &= (uint32_t)(~TIMER_CHCTL1_CH2CAPPSC); + TIMER_CHCTL1(timer_periph) |= (uint32_t)prescaler; + break; + /* configure TIMER_CH_3 */ + case TIMER_CH_3: + TIMER_CHCTL1(timer_periph) &= (uint32_t)(~TIMER_CHCTL1_CH3CAPPSC); + TIMER_CHCTL1(timer_periph) |= (uint32_t)(prescaler << 8); + break; + default: + break; + } +} + +/*! + \brief read TIMER channel capture compare register value + \param[in] timer_periph: TIMERx(x=0,1,2,13,14,15,16) + \param[in] channel: + \arg TIMER_CH_0: TIMER channel0(TIMERx(x=0,1,2,13,14,15,16)) + \arg TIMER_CH_1: TIMER channel1(TIMERx(x=0,1,2,14)) + \arg TIMER_CH_2: TIMER channel2(TIMERx(x=0,1,2)) + \arg TIMER_CH_3: TIMER channel3(TIMERx(x=0,1,2)) + \param[out] none + \retval channel capture compare register value +*/ +uint32_t timer_channel_capture_value_register_read(uint32_t timer_periph, uint16_t channel) +{ + uint32_t count_value=0U; + + switch(channel){ + case TIMER_CH_0: + count_value = TIMER_CH0CV(timer_periph); + break; + case TIMER_CH_1: + count_value = TIMER_CH1CV(timer_periph); + break; + case TIMER_CH_2: + count_value = TIMER_CH2CV(timer_periph); + break; + case TIMER_CH_3: + count_value = TIMER_CH3CV(timer_periph); + break; + default: + break; + } + return (count_value); +} + +/*! + \brief configure TIMER input pwm capture function + \param[in] timer_periph: TIMERx(x=0,1,2,14) + \param[in] channel: + \arg TIMER_CH_0: TIMER channel0(TIMERx(x=0,1,2,14)) + \arg TIMER_CH_1: TIMER channel1(TIMERx(x=0,1,2,14)) + \param[in] icpwm:TIMER channel intput pwm parameter struct + icpolarity: TIMER_IC_POLARITY_RISING,TIMER_IC_POLARITY_FALLING + icselection: TIMER_IC_SELECTION_DIRECTTI,TIMER_IC_SELECTION_INDIRECTTI + icprescaler: TIMER_IC_PSC_DIV1,TIMER_IC_PSC_DIV2,TIMER_IC_PSC_DIV4,TIMER_IC_PSC_DIV8 + icfilter: 0~15 + \param[out] none + \retval none +*/ +void timer_input_pwm_capture_config(uint32_t timer_periph, uint16_t channel, timer_ic_parameter_struct* icpwm) +{ + uint16_t icpolarity = 0x0U; + uint16_t icselection = 0x0U; + + if(TIMER_IC_POLARITY_RISING == icpwm->icpolarity){ + icpolarity = TIMER_IC_POLARITY_FALLING; + }else{ + icpolarity = TIMER_IC_POLARITY_RISING; + } + + if(TIMER_IC_SELECTION_DIRECTTI == icpwm->icselection){ + icselection = TIMER_IC_SELECTION_INDIRECTTI; + }else{ + icselection = TIMER_IC_SELECTION_DIRECTTI; + } + + if(TIMER_CH_0 == channel){ + /* reset the CH0EN bit */ + TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH0EN); + /* reset the CH0P and CH0NP bits */ + TIMER_CHCTL2(timer_periph) &=(uint32_t)(~(TIMER_CHCTL2_CH0P|TIMER_CHCTL2_CH0NP)); + /* set the CH0P and CH0NP bits */ + TIMER_CHCTL2(timer_periph) |= (uint32_t)(icpwm->icpolarity); + /* reset the CH0MS bit */ + TIMER_CHCTL0(timer_periph) &=(uint32_t)(~TIMER_CHCTL0_CH0MS); + /* set the CH0MS bit */ + TIMER_CHCTL0(timer_periph) |= (uint32_t)(icpwm->icselection); + /* reset the CH0CAPFLT bit */ + TIMER_CHCTL0(timer_periph) &=(uint32_t)(~TIMER_CHCTL0_CH0CAPFLT); + /* set the CH0CAPFLT bit */ + TIMER_CHCTL0(timer_periph) |= (uint32_t)(icpwm->icfilter); + /* set the CH0EN bit */ + TIMER_CHCTL2(timer_periph) |= (uint32_t)TIMER_CHCTL2_CH0EN; + /* configure TIMER channel input capture prescaler value */ + timer_channel_input_capture_prescaler_config(timer_periph,TIMER_CH_0,(uint32_t)icpwm->icprescaler); + + /* reset the CH1EN bit */ + TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH1EN); + /* reset the CH1P and CH1NP bits */ + TIMER_CHCTL2(timer_periph) &=(uint32_t)(~(TIMER_CHCTL2_CH1P|TIMER_CHCTL2_CH1NP)); + /* set the CH1P and CH1NP bits */ + TIMER_CHCTL2(timer_periph) |= (uint32_t)((uint32_t)icpolarity << 4); + /* reset the CH1MS bit */ + TIMER_CHCTL0(timer_periph) &=(uint32_t)(~TIMER_CHCTL0_CH1MS); + /* set the CH1MS bit */ + TIMER_CHCTL0(timer_periph) |= (uint32_t)((uint32_t)icselection << 8); + /* reset the CH1CAPFLT bit */ + TIMER_CHCTL0(timer_periph) &=(uint32_t)(~TIMER_CHCTL0_CH1CAPFLT); + /* set the CH1CAPFLT bit */ + TIMER_CHCTL0(timer_periph) |= (uint32_t)((uint32_t)icpwm->icfilter << 8); + /* set the CH1EN bit */ + TIMER_CHCTL2(timer_periph) |= (uint32_t)TIMER_CHCTL2_CH1EN; + /* configure TIMER channel input capture prescaler value */ + timer_channel_input_capture_prescaler_config(timer_periph,TIMER_CH_1,(uint32_t)icpwm->icprescaler); + }else{ + /* reset the CH1EN bit */ + TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH1EN); + /* reset the CH1P and CH1NP bits */ + TIMER_CHCTL2(timer_periph) &=(uint32_t)(~(TIMER_CHCTL2_CH1P|TIMER_CHCTL2_CH1NP)); + /* set the CH1P and CH1NP bits */ + TIMER_CHCTL2(timer_periph) |= (uint32_t)((uint32_t)icpwm->icpolarity << 4); + /* reset the CH1MS bit */ + TIMER_CHCTL0(timer_periph) &=(uint32_t)(~TIMER_CHCTL0_CH1MS); + /* set the CH1MS bit */ + TIMER_CHCTL0(timer_periph) |= (uint32_t)((uint32_t)icpwm->icselection << 8); + /* reset the CH1CAPFLT bit */ + TIMER_CHCTL0(timer_periph) &=(uint32_t)(~TIMER_CHCTL0_CH1CAPFLT); + /* set the CH1CAPFLT bit */ + TIMER_CHCTL0(timer_periph) |= (uint32_t)((uint32_t)icpwm->icfilter << 8); + /* set the CH1EN bit */ + TIMER_CHCTL2(timer_periph) |= (uint32_t)TIMER_CHCTL2_CH1EN; + /* configure TIMER channel input capture prescaler value */ + timer_channel_input_capture_prescaler_config(timer_periph,TIMER_CH_1,(uint32_t)icpwm->icprescaler); + + /* reset the CH0EN bit */ + TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH0EN); + /* reset the CH0P and CH0NP bits */ + TIMER_CHCTL2(timer_periph) &=(uint32_t)(~(TIMER_CHCTL2_CH0P|TIMER_CHCTL2_CH0NP)); + /* set the CH0P and CH0NP bits */ + TIMER_CHCTL2(timer_periph) |= (uint32_t)icpolarity; + /* reset the CH0MS bit */ + TIMER_CHCTL0(timer_periph) &=(uint32_t)(~TIMER_CHCTL0_CH0MS); + /* set the CH0MS bit */ + TIMER_CHCTL0(timer_periph) |= (uint32_t)icselection; + /* reset the CH0CAPFLT bit */ + TIMER_CHCTL0(timer_periph) &=(uint32_t)(~TIMER_CHCTL0_CH0CAPFLT); + /* set the CH0CAPFLT bit */ + TIMER_CHCTL0(timer_periph) |= (uint32_t)icpwm->icfilter; + /* set the CH0EN bit */ + TIMER_CHCTL2(timer_periph) |= (uint32_t)TIMER_CHCTL2_CH0EN; + /* configure TIMER channel input capture prescaler value */ + timer_channel_input_capture_prescaler_config(timer_periph,TIMER_CH_0,(uint32_t)icpwm->icprescaler); + } +} + +/*! + \brief configure TIMER hall sensor mode + \param[in] timer_periph: TIMERx(x=0,1,2,14) + \param[in] hallmode: + \arg TIMER_HALLINTERFACE_ENABLE: TIMER hall sensor mode enable + \arg TIMER_HALLINTERFACE_DISABLE: TIMER hall sensor mode disable + \param[out] none + \retval none +*/ +void timer_hall_mode_config(uint32_t timer_periph, uint8_t hallmode) +{ + if(TIMER_HALLINTERFACE_ENABLE == hallmode){ + TIMER_CTL1(timer_periph) |= (uint32_t)TIMER_CTL1_TI0S; + }else if(TIMER_HALLINTERFACE_DISABLE == hallmode){ + TIMER_CTL1(timer_periph) &= ~(uint32_t)TIMER_CTL1_TI0S; + }else{ + } +} + +/*! + \brief select TIMER input trigger source + \param[in] timer_periph: TIMERx(x=0,1,2,14) + \param[in] intrigger: + \arg TIMER_SMCFG_TRGSEL_ITI0: internal trigger 0 + \arg TIMER_SMCFG_TRGSEL_ITI1: internal trigger 1 + \arg TIMER_SMCFG_TRGSEL_ITI2: internal trigger 2 + \arg TIMER_SMCFG_TRGSEL_ITI3: internal trigger 3 + \arg TIMER_SMCFG_TRGSEL_CI0F_ED: TI0 edge detector + \arg TIMER_SMCFG_TRGSEL_CI0FE0: filtered TIMER input 0 + \arg TIMER_SMCFG_TRGSEL_CI1FE1: filtered TIMER input 1 + \arg TIMER_SMCFG_TRGSEL_ETIFP: external trigger + \param[out] none + \retval none +*/ +void timer_input_trigger_source_select(uint32_t timer_periph,uint32_t intrigger) +{ + TIMER_SMCFG(timer_periph) &=(uint32_t)(~TIMER_SMCFG_TRGS); + TIMER_SMCFG(timer_periph) |= (uint32_t)intrigger; +} + +/*! + \brief select TIMER master mode output trigger source + \param[in] timer_periph: TIMERx(x=0,1,2,14) + \param[in] outrigger: + \arg TIMER_TRI_OUT_SRC_RESET: the UPG bit as trigger output + \arg TIMER_TRI_OUT_SRC_ENABLE: the counter enable signal TIMER_CTL0_CEN as trigger output + \arg TIMER_TRI_OUT_SRC_UPDATE: update event as trigger output + \arg TIMER_TRI_OUT_SRC_CH0: a capture or a compare match occurred in channal0 as trigger output TRGO + \arg TIMER_TRI_OUT_SRC_O0CPRE: O0CPRE as trigger output + \arg TIMER_TRI_OUT_SRC_O1CPRE: O1CPRE as trigger output + \arg TIMER_TRI_OUT_SRC_O2CPRE: O2CPRE as trigger output + \arg TIMER_TRI_OUT_SRC_O3CPRE: O3CPRE as trigger output + \param[out] none + \retval none +*/ +void timer_master_output_trigger_source_select(uint32_t timer_periph, uint32_t outrigger) +{ + TIMER_CTL1(timer_periph) &=(uint32_t)(~TIMER_CTL1_MMC); + TIMER_CTL1(timer_periph) |= (uint32_t)outrigger; +} + +/*! + \brief select TIMER slave mode + \param[in] timer_periph: TIMERx(x=0,1,2,14) + \param[in] slavemode: + \arg TIMER_SLAVE_MODE_DISABLE: slave mode disable + \arg TIMER_ENCODER_MODE0: encoder mode 0 + \arg TIMER_ENCODER_MODE1: encoder mode 1 + \arg TIMER_ENCODER_MODE2: encoder mode 2 + \arg TIMER_SLAVE_MODE_RESTART: restart mode + \arg TIMER_SLAVE_MODE_PAUSE: pause mode + \arg TIMER_SLAVE_MODE_EVENT: event mode + \arg TIMER_SLAVE_MODE_EXTERNAL0: external clock mode 0. + \param[out] none + \retval none +*/ + +void timer_slave_mode_select(uint32_t timer_periph,uint32_t slavemode) +{ + TIMER_SMCFG(timer_periph) &=(uint32_t)(~TIMER_SMCFG_SMC); + + TIMER_SMCFG(timer_periph) |= (uint32_t)slavemode; +} + +/*! + \brief configure TIMER master slave mode + \param[in] timer_periph: TIMERx(x=0,1,2,14) + \param[in] masterslave: + \arg TIMER_MASTER_SLAVE_MODE_ENABLE: master slave mode enable + \arg TIMER_MASTER_SLAVE_MODE_DISABLE: master slave mode disable + \param[out] none + \retval none +*/ +void timer_master_slave_mode_config(uint32_t timer_periph, uint8_t masterslave) +{ + if(TIMER_MASTER_SLAVE_MODE_ENABLE == masterslave){ + TIMER_SMCFG(timer_periph) |= (uint32_t)TIMER_SMCFG_MSM; + }else if(TIMER_MASTER_SLAVE_MODE_DISABLE == masterslave){ + TIMER_SMCFG(timer_periph) &= ~(uint32_t)TIMER_SMCFG_MSM; + }else{ + } +} + +/*! + \brief configure TIMER external trigger input + \param[in] timer_periph: TIMERx(x=0,1,2,14) + \param[in] extprescaler: + \arg TIMER_EXT_TRI_PSC_OFF: no divided + \arg TIMER_EXT_TRI_PSC_DIV2: divided by 2 + \arg TIMER_EXT_TRI_PSC_DIV4: divided by 4 + \arg TIMER_EXT_TRI_PSC_DIV8: divided by 8 + \param[in] expolarity: + \arg TIMER_ETP_FALLING: active low or falling edge active + \arg TIMER_ETP_RISING: active high or rising edge active + \param[in] extfilter: a value between 0x00 and 0x0F + \param[out] none + \retval none +*/ +void timer_external_trigger_config(uint32_t timer_periph, uint32_t extprescaler, uint32_t expolarity, uint32_t extfilter) +{ + TIMER_SMCFG(timer_periph) &=(uint32_t)(~(TIMER_SMCFG_ETP|TIMER_SMCFG_ETPSC|TIMER_SMCFG_ETFC)); + TIMER_SMCFG(timer_periph) |= (uint32_t)(extprescaler|expolarity); + TIMER_SMCFG(timer_periph) |= (uint32_t)(extfilter << (uint16_t)8); +} + +/*! + \brief configure TIMER quadrature decoder mode + \param[in] timer_periph: TIMERx(x=0,1,2,14) + \param[in] decomode: + \arg TIMER_ENCODER_MODE0: counter counts on CI0FE0 edge depending on CI1FE1 level + \arg TIMER_ENCODER_MODE1: counter counts on CI1FE1 edge depending on CI0FE0 level + \arg TIMER_ENCODER_MODE2: counter counts on both CI0FE0 and CI1FE1 edges depending on the level of the other input + \param[in] ic0polarity: + \arg TIMER_IC_POLARITY_RISING: capture rising edge + \arg TIMER_IC_POLARITY_FALLING: capture falling edge + \param[in] ic1polarity: + \arg TIMER_IC_POLARITY_RISING: capture rising edge + \arg TIMER_IC_POLARITY_FALLING: capture falling edge + \param[out] none + \retval none +*/ +void timer_quadrature_decoder_mode_config(uint32_t timer_periph, uint32_t decomode, uint16_t ic0polarity, uint16_t ic1polarity) +{ + TIMER_SMCFG(timer_periph) &=(uint32_t)(~TIMER_SMCFG_SMC); + TIMER_SMCFG(timer_periph) |= (uint32_t)decomode; + + TIMER_CHCTL0(timer_periph) &= (uint32_t)(((uint32_t)(~TIMER_CHCTL0_CH0MS))&((uint32_t)(~TIMER_CHCTL0_CH1MS))); + TIMER_CHCTL0(timer_periph) |= (uint32_t)(TIMER_IC_SELECTION_DIRECTTI|((uint32_t)TIMER_IC_SELECTION_DIRECTTI << 8)); + + TIMER_CHCTL2(timer_periph) &=(uint32_t)(~(TIMER_CHCTL2_CH0P|TIMER_CHCTL2_CH0NP)); + TIMER_CHCTL2(timer_periph) &=(uint32_t)(~(TIMER_CHCTL2_CH1P|TIMER_CHCTL2_CH1NP)); + TIMER_CHCTL2(timer_periph) |= (uint32_t)(ic0polarity|((uint32_t)ic1polarity << 4U)); +} + +/*! + \brief configure TIMER internal clock mode + \param[in] timer_periph: TIMERx(x=0,1,2,14) + \param[out] none + \retval none +*/ +void timer_internal_clock_config(uint32_t timer_periph) +{ + TIMER_SMCFG(timer_periph) &= (uint32_t)TIMER_SLAVE_MODE_DISABLE; +} + +/*! + \brief configure TIMER the internal trigger as external clock input + \param[in] timer_periph: TIMERx(x=0,1,2,14) + \param[in] intrigger: + \arg TIMER_SMCFG_TRGSEL_ITI0: internal trigger 0 + \arg TIMER_SMCFG_TRGSEL_ITI1: internal trigger 1 + \arg TIMER_SMCFG_TRGSEL_ITI2: internal trigger 2 + \arg TIMER_SMCFG_TRGSEL_ITI3: internal trigger 3 + \param[out] none + \retval none +*/ +void timer_internal_trigger_as_external_clock_config(uint32_t timer_periph, uint32_t intrigger) +{ + timer_input_trigger_source_select(timer_periph, intrigger); + TIMER_SMCFG(timer_periph) &= ~(uint32_t)TIMER_SMCFG_SMC; + TIMER_SMCFG(timer_periph) |= (uint32_t)TIMER_SLAVE_MODE_EXTERNAL0; +} + +/*! + \brief configure TIMER the external trigger as external clock input + \param[in] timer_periph: TIMERx(x=0,1,2,14) + \param[in] extrigger: + \arg TIMER_SMCFG_TRGSEL_CI0F_ED: TI0 edge detector + \arg TIMER_SMCFG_TRGSEL_CI0FE0: filtered TIMER input 0 + \arg TIMER_SMCFG_TRGSEL_CI1FE1: filtered TIMER input 1 + \param[in] expolarity: + \arg TIMER_IC_POLARITY_RISING: active low or falling edge active + \arg TIMER_IC_POLARITY_FALLING: active high or rising edge active + \param[in] extfilter: a value between 0 and 15 + \param[out] none + \retval none +*/ +void timer_external_trigger_as_external_clock_config(uint32_t timer_periph, uint32_t extrigger, uint16_t expolarity, uint32_t extfilter) +{ + if(TIMER_SMCFG_TRGSEL_CI1FE1 == extrigger){ + /* reset the CH1EN bit */ + TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH1EN); + /* reset the CH1NP bit */ + TIMER_CHCTL2(timer_periph) &=(uint32_t)(~(TIMER_CHCTL2_CH1P|TIMER_CHCTL2_CH1NP)); + /* set the CH1NP bit */ + TIMER_CHCTL2(timer_periph) |= (uint32_t)((uint32_t)expolarity << 4U); + /* reset the CH1MS bit */ + TIMER_CHCTL0(timer_periph) &=(uint32_t)(~TIMER_CHCTL0_CH1MS); + /* set the CH1MS bit */ + TIMER_CHCTL0(timer_periph) |= (uint32_t)((uint32_t)TIMER_IC_SELECTION_DIRECTTI << 8U); + /* reset the CH1CAPFLT bit */ + TIMER_CHCTL0(timer_periph) &=(uint32_t)(~TIMER_CHCTL0_CH1CAPFLT); + /* set the CH1CAPFLT bit */ + TIMER_CHCTL0(timer_periph) |= (uint32_t)(extfilter << 8U); + /* set the CH1EN bit */ + TIMER_CHCTL2(timer_periph) |= (uint32_t)TIMER_CHCTL2_CH1EN; + }else{ + /* reset the CH0EN bit */ + TIMER_CHCTL2(timer_periph) &=(uint32_t)(~TIMER_CHCTL2_CH0EN); + /* reset the CH0P and CH0NP bits */ + TIMER_CHCTL2(timer_periph) &=(uint32_t)(~(TIMER_CHCTL2_CH0P|TIMER_CHCTL2_CH0NP)); + /* set the CH0P and CH0NP bits */ + TIMER_CHCTL2(timer_periph) |= (uint32_t)expolarity; + /* reset the CH0MS bit */ + TIMER_CHCTL0(timer_periph) &=(uint32_t)(~TIMER_CHCTL0_CH0MS); + /* set the CH0MS bit */ + TIMER_CHCTL0(timer_periph) |= (uint32_t)TIMER_IC_SELECTION_DIRECTTI; + /* reset the CH0CAPFLT bit */ + TIMER_CHCTL0(timer_periph) &=(uint32_t)(~TIMER_CHCTL0_CH0CAPFLT); + /* reset the CH0CAPFLT bit */ + TIMER_CHCTL0(timer_periph) |= (uint32_t)extfilter; + /* set the CH0EN bit */ + TIMER_CHCTL2(timer_periph) |= (uint32_t)TIMER_CHCTL2_CH0EN; + } + /* select TIMER input trigger source */ + timer_input_trigger_source_select(timer_periph, extrigger); + /* reset the SMC bit */ + TIMER_SMCFG(timer_periph) &=(uint32_t)(~TIMER_SMCFG_SMC); + /* set the SMC bit */ + TIMER_SMCFG(timer_periph) |= (uint32_t)TIMER_SLAVE_MODE_EXTERNAL0; +} + +/*! + \brief configure TIMER the external clock mode0 + \param[in] timer_periph: TIMERx(x=0,1,2) + \param[in] extprescaler: + \arg TIMER_EXT_TRI_PSC_OFF: no divided + \arg TIMER_EXT_TRI_PSC_DIV2: divided by 2 + \arg TIMER_EXT_TRI_PSC_DIV4: divided by 4 + \arg TIMER_EXT_TRI_PSC_DIV8: divided by 8 + \param[in] expolarity: + \arg TIMER_ETP_FALLING: active low or falling edge active + \arg TIMER_ETP_RISING: active high or rising edge active + \param[in] extfilter: a value between 0 and 15 + \param[out] none + \retval none +*/ +void timer_external_clock_mode0_config(uint32_t timer_periph, uint32_t extprescaler, uint32_t expolarity, uint32_t extfilter) +{ + /* configure TIMER external trigger input */ + timer_external_trigger_config(timer_periph, extprescaler, expolarity, extfilter); + + /* reset the SMC bit */ + TIMER_SMCFG(timer_periph) &=(uint32_t)(~TIMER_SMCFG_SMC); + /* set the SMC bit */ + TIMER_SMCFG(timer_periph) |= (uint32_t)TIMER_SLAVE_MODE_EXTERNAL0; + + /* reset the TRGS bit */ + TIMER_SMCFG(timer_periph) &=(uint32_t)(~TIMER_SMCFG_TRGS); + /* set the TRGS bit */ + TIMER_SMCFG(timer_periph) |= (uint32_t)TIMER_SMCFG_TRGSEL_ETIFP; +} + +/*! + \brief configure TIMER the external clock mode1 + \param[in] timer_periph: TIMERx(x=0,1,2) + \param[in] extprescaler: + \arg TIMER_EXT_TRI_PSC_OFF: no divided + \arg TIMER_EXT_TRI_PSC_DIV2: divided by 2 + \arg TIMER_EXT_TRI_PSC_DIV4: divided by 4 + \arg TIMER_EXT_TRI_PSC_DIV8: divided by 8 + \param[in] expolarity: + \arg TIMER_ETP_FALLING: active low or falling edge active + \arg TIMER_ETP_RISING: active high or rising edge active + \param[in] extfilter: a value between 0 and 15 + \param[out] none + \retval none +*/ +void timer_external_clock_mode1_config(uint32_t timer_periph, uint32_t extprescaler, + uint32_t expolarity, uint32_t extfilter) +{ + /* configure TIMER external trigger input */ + timer_external_trigger_config(timer_periph, extprescaler, expolarity, extfilter); + + TIMER_SMCFG(timer_periph) |= (uint32_t)TIMER_SMCFG_SMC1; +} + +/*! + \brief disable TIMER the external clock mode1 + \param[in] timer_periph: TIMERx(x=0..4,7) + \param[out] none + \retval none +*/ +void timer_external_clock_mode1_disable(uint32_t timer_periph) +{ + TIMER_SMCFG(timer_periph) &= ~(uint32_t)TIMER_SMCFG_SMC1; +} + +/*! + \brief configure TIMER13 channel0 remap function + \param[in] timer_periph: TIMERx(x=13) + \param[in] channel: + \arg TIMER_CH_0: TIMER channel0(TIMERx(x=13)) + \param[in] remap: + \arg TIMER_IRMP_CI0_RMP_GPIO: channel 0 input is connected to GPIO + \arg TIMER_IRMP_CI0_RTCCLK: channel 0 input is connected to the RTCCLK + \arg TIMER_IRMP_CI0_HXTALDIV32: channel 0 input is connected to HXTAL/32 clock + \arg TIMER_IRMP_CI0_CKOUTSEL: channel 0 input is connected to CKOUTSEL + \param[out] none + \retval none +*/ +void timer_channel_remap_config(uint32_t timer_periph, uint16_t channel, uint32_t remap) +{ + if(TIMER_CH_0 == channel){ + TIMER_IRMP(timer_periph) = (uint32_t)remap; + } +} + +#ifdef GD32F170_190 + +/*! + \brief configure TIMER cc register selection + \param[in] timer_periph: TIMERx(x=0,1,2,13,14,15,16) + \param[in] ccsel: + \arg TIMER_CHVSEL_DISABLE: write CHxVAL register selection disable + \arg TIMER_CHVSEL_ENABLE: write CHxVAL register selection enable + \param[out] none + \retval none +*/ +void timer_write_cc_register_config(uint32_t timer_periph, uint32_t ccsel) +{ + if(ccsel){ + TIMER_CFG(timer_periph) |= (uint32_t)ccsel; + }else{ + TIMER_CFG(timer_periph) &= (uint32_t)ccsel; + } +} + +/*! + \brief configure TIMER output value selection + \param[in] timer_periph: TIMERx(x=0,1,2,13,14,15,16) + \param[in] outsel: + \arg TIMER_OUTSEL_DISABLE: output value selection disable + \arg TIMER_OUTSEL_ENABLE: output value selection enable + \param[out] none + \retval none +*/ +void timer_output_value_selection_config(uint32_t timer_periph, uint32_t outsel) +{ + if(outsel){ + TIMER_CFG(timer_periph) |= (uint32_t)outsel; + }else{ + TIMER_CFG(timer_periph) &= (uint32_t)outsel; + } +} + +#endif /* GD32F170_190 */ diff --git a/HoverBoardGigaDevice/RTE/Device/GD32F130C8/gd32f1x0_usart.c b/HUGS/RTE/Device/GD32F130C8/gd32f1x0_usart.c similarity index 96% rename from HoverBoardGigaDevice/RTE/Device/GD32F130C8/gd32f1x0_usart.c rename to HUGS/RTE/Device/GD32F130C8/gd32f1x0_usart.c index f4e1ef59..08410fde 100644 --- a/HoverBoardGigaDevice/RTE/Device/GD32F130C8/gd32f1x0_usart.c +++ b/HUGS/RTE/Device/GD32F130C8/gd32f1x0_usart.c @@ -1,1162 +1,1162 @@ -/*! - \file gd32f1x0_usart.c - \brief USART driver -*/ - -/* - Copyright (C) 2017 GigaDevice - - 2014-12-26, V1.0.0, platform GD32F1x0(x=3,5) - 2016-01-15, V2.0.0, platform GD32F1x0(x=3,5,7,9) - 2016-04-30, V3.0.0, firmware update for GD32F1x0(x=3,5,7,9) - 2017-06-19, V3.1.1, firmware update for GD32F1x0(x=3,5,7,9) -*/ - -#include "gd32f1x0_usart.h" -#include "gd32f1x0_rcu.h" - -/*! - \brief reset USART - \param[in] usart_periph: USARTx(x=0,1) - \param[out] none - \retval none -*/ -void usart_deinit(uint32_t usart_periph) -{ - switch(usart_periph){ - case USART0: - rcu_periph_reset_enable(RCU_USART0RST); - rcu_periph_reset_disable(RCU_USART0RST); - break; - case USART1: - rcu_periph_reset_enable(RCU_USART1RST); - rcu_periph_reset_disable(RCU_USART1RST); - break; - default: - break; - } -} - -/*! - \brief configure USART baud rate value - \param[in] usart_periph: USARTx(x=0,1) - \param[in] baudval: baud rate value - \param[out] none - \retval none -*/ -void usart_baudrate_set(uint32_t usart_periph, uint32_t baudval) -{ - uint32_t uclk = 0U, intdiv = 0U, fradiv = 0U, udiv = 0U; - switch(usart_periph){ - case USART0: - uclk = rcu_clock_freq_get(CK_USART); - break; - case USART1: - uclk = rcu_clock_freq_get(CK_APB1); - break; - default: - break; - } - if(USART_CTL0(usart_periph) & USART_CTL0_OVSMOD){ - /* when oversampling by 8,configure the value of USART_BAUD */ - udiv = ((2U*uclk)+baudval/2U)/baudval; - intdiv = udiv & 0xfff0U; - fradiv = (udiv>>1U) & 0x7U; - USART_BAUD(usart_periph) = ((USART_BAUD_FRADIV | USART_BAUD_INTDIV) & (intdiv | fradiv)); - }else{ - /* when oversampling by 16,configure the value of USART_BAUD */ - udiv = (uclk+baudval/2U)/baudval; - intdiv = udiv & 0xfff0U; - fradiv = udiv & 0xfU; - USART_BAUD(usart_periph) = ((USART_BAUD_FRADIV | USART_BAUD_INTDIV) & (intdiv | fradiv)); - } -} - -/*! - \brief configure USART parity - \param[in] usart_periph: USARTx(x=0,1) - \param[in] paritycfg: USART parity configure - \arg USART_PM_NONE: no parity - \arg USART_PM_ODD: odd parity - \arg USART_PM_EVEN: even parity - \param[out] none - \retval none -*/ -void usart_parity_config(uint32_t usart_periph, uint32_t paritycfg) -{ - /* disable USART */ - USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); - /* clear USART_CTL0 PM,PCEN bits */ - USART_CTL0(usart_periph) &= ~(USART_CTL0_PM | USART_CTL0_PCEN); - /* configure USART parity mode */ - USART_CTL0(usart_periph) |= paritycfg; -} - -/*! - \brief configure USART word length - \param[in] usart_periph: USARTx(x=0,1) - \param[in] wlen: USART word length configure - \arg USART_WL_8BIT: 8 bits - \arg USART_WL_9BIT: 9 bits - \param[out] none - \retval none -*/ -void usart_word_length_set(uint32_t usart_periph, uint32_t wlen) -{ - /* disable USART */ - USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); - /* clear USART_CTL0 WL bit */ - USART_CTL0(usart_periph) &= ~USART_CTL0_WL; - /* configure USART word length */ - USART_CTL0(usart_periph) |= wlen; -} - -/*! - \brief configure USART stop bit length - \param[in] usart_periph: USARTx(x=0,1) - \param[in] stblen: USART stop bit configure - \arg USART_STB_1BIT: 1 bit - \arg USART_STB_2BIT: 2 bits - \arg USART_STB_1_5BIT: 1.5bit - \param[out] none - \retval none -*/ -void usart_stop_bit_set(uint32_t usart_periph, uint32_t stblen) -{ - /* disable USART */ - USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); - /* clear USART_CTL1 STB bits */ - USART_CTL1(usart_periph) &= ~USART_CTL1_STB; - USART_CTL1(usart_periph) |= stblen; -} - -/*! - \brief enable USART - \param[in] usart_periph: USARTx(x=0,1) - \param[out] none - \retval none -*/ -void usart_enable(uint32_t usart_periph) -{ - USART_CTL0(usart_periph) |= USART_CTL0_UEN; -} - -/*! - \brief disable USART - \param[in] usart_periph: USARTx(x=0,1) - \param[out] none - \retval none -*/ -void usart_disable(uint32_t usart_periph) -{ - USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); -} - -/*! - \brief configure USART transmitter - \param[in] usart_periph: USARTx(x=0,1) - \param[in] txconfig: enable or disable USART transmitter - \arg USART_TRANSMIT_ENABLE: enable USART transmission - \arg USART_TRANSMIT_DISABLE: enable USART transmission - \param[out] none - \retval none -*/ -void usart_transmit_config(uint32_t usart_periph, uint32_t txconfig) -{ - USART_CTL0(usart_periph) &= ~USART_CTL0_TEN; - /* configure transfer mode */ - USART_CTL0(usart_periph) |= txconfig; -} - -/*! - \brief configure USART receiver - \param[in] usart_periph: USARTx(x=0,1) - \param[in] rxconfig: enable or disable USART receiver - \arg USART_RECEIVE_ENABLE: enable USART reception - \arg USART_RECEIVE_DISABLE: disable USART reception - \param[out] none - \retval none -*/ -void usart_receive_config(uint32_t usart_periph, uint32_t rxconfig) -{ - USART_CTL0(usart_periph) &= ~USART_CTL0_REN; - /* configure receiver mode */ - USART_CTL0(usart_periph) |= rxconfig; -} - -/*! - \brief USART transmit data function - \param[in] usart_periph: USARTx(x=0,1) - \param[in] data: data of transmission - \param[out] none - \retval none -*/ -void usart_data_transmit(uint32_t usart_periph, uint32_t data) -{ - USART_TDATA(usart_periph) = (USART_TDATA_TDATA & data); -} - -/*! - \brief USART receive data function - \param[in] usart_periph: USARTx(x=0,1) - \param[out] none - \retval data of received -*/ -uint16_t usart_data_receive(uint32_t usart_periph) -{ - return (uint16_t)(GET_BITS(USART_RDATA(usart_periph), 0U, 8U)); -} - -/*! - \brief data is transmitted/received with the LSB/MSB first - \param[in] usart_periph: USARTx(x=0,1) - \param[in] msbf: LSB/MSB - \arg USART_MSBF_LSB: LSB first - \arg USART_MSBF_MSB: MSB first - \param[out] none - \retval none -*/ -void usart_data_first_config(uint32_t usart_periph, uint32_t msbf) -{ - USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); - /* configure LSB or MSB first */ - USART_CTL1(usart_periph) &= ~(USART_CTL1_MSBF); - USART_CTL1(usart_periph) |= (USART_CTL1_MSBF & msbf) ; -} - -/*! - \brief USART inverted configure - \param[in] usart_periph: USARTx(x=0,1) - \param[in] invertpara: refer to usart_invert_enum - \param[out] none - \retval none -*/ -void usart_invert_config(uint32_t usart_periph, usart_invert_enum invertpara) -{ - USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); - /* inverted or not the specified signal */ - switch(invertpara){ - case USART_DINV_ENABLE: - USART_CTL1(usart_periph) |= USART_CTL1_DINV; - break; - case USART_DINV_DISABLE: - USART_CTL1(usart_periph) &= ~(USART_CTL1_DINV); - break; - case USART_TXPIN_DISABLE: - USART_CTL1(usart_periph) &= ~(USART_CTL1_TINV); - break; - case USART_RXPIN_DISABLE: - USART_CTL1(usart_periph) &= ~(USART_CTL1_RINV); - break; - case USART_SWAP_DISABLE: - USART_CTL1(usart_periph) &= ~(USART_CTL1_STRP); - break; - case USART_TXPIN_ENABLE: - USART_CTL1(usart_periph) |= USART_CTL1_TINV; - break; - case USART_RXPIN_ENABLE: - USART_CTL1(usart_periph) |= USART_CTL1_RINV; - break; - case USART_SWAP_ENABLE: - USART_CTL1(usart_periph) |= USART_CTL1_STRP; - break; - default: - break; - } -} - -/*! - \brief overrun function is enabled - \param[in] usart_periph: USARTx(x=0,1) - \param[out] none - \retval none -*/ -void usart_overrun_enable(uint32_t usart_periph) -{ - USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); - USART_CTL2(usart_periph) &= ~(USART_CTL2_OVRD); -} - -/*! - \brief overrun function is disabled - \param[in] usart_periph: USARTx(x=0,1) - \param[out] none - \retval none -*/ -void usart_overrun_disable(uint32_t usart_periph) -{ - USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); - USART_CTL2(usart_periph) |= USART_CTL2_OVRD; -} - -/*! - \brief configure the USART oversample mode - \param[in] usart_periph: USARTx(x=0,1) - \param[in] oversamp: oversample value - \arg USART_OVSMOD_8: oversampling by 8 - \arg USART_OVSMOD_16: oversampling by 16 - \param[out] none - \retval none -*/ -void usart_oversample_config(uint32_t usart_periph, uint32_t oversamp) -{ - /* disable USART */ - USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); - /* clear OVSMOD bit */ - USART_CTL0(usart_periph) &= ~(USART_CTL0_OVSMOD); - USART_CTL0(usart_periph) |= oversamp; -} - -/*! - \brief sample bit method configure - \param[in] usart_periph: USARTx(x=0,1) - \param[in] osb: sample bit - \arg USART_OSB_1BIT: 1 bit - \arg USART_OSB_3BIT: 3 bits - \param[out] none - \retval none -*/ -void usart_sample_bit_config(uint32_t usart_periph, uint32_t osb) -{ - /* disable USART */ - USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); - USART_CTL2(usart_periph) &= ~(USART_CTL2_OSB); - USART_CTL2(usart_periph) |= (osb); -} - -/*! - \brief auto baud rate detection enable - \param[in] usart_periph: USARTx(x=0) - \param[out] none - \retval none -*/ -void usart_autobaud_detection_enable(uint32_t usart_periph) -{ - USART_CTL1(usart_periph) |= USART_CTL1_ABDEN; -} - -/*! - \brief auto baud rate detection disable - \param[in] usart_periph: USARTx(x=0) - \param[out] none - \retval none -*/ -void usart_autobaud_detection_disable(uint32_t usart_periph) -{ - USART_CTL1(usart_periph) &= ~(USART_CTL1_ABDEN); -} - -/*! - \brief auto baud rate detection mode configure - \param[in] usart_periph: USARTx(x=0) - \param[in] abdmod: auto baud rate detection mode - \arg USART_ABDM_FTOR: falling edge to rising edge measurement - \arg USART_ABDM_FTOF: falling edge to falling edge measurement - \param[out] none - \retval none -*/ -void usart_autobaud_detection_mode_config(uint32_t usart_periph, uint32_t abdmod) -{ - /* reset ABDM bits */ - USART_CTL1(usart_periph) &= ~(USART_CTL1_ABDM); - USART_CTL1(usart_periph) |= (abdmod); -} - -/*! - \brief mute mode enable - \param[in] usart_periph: USARTx(x=0,1) - \param[out] none - \retval none -*/ -void usart_mute_mode_enable(uint32_t usart_periph) -{ - USART_CTL0(usart_periph) |= USART_CTL0_MEN; -} - -/*! - \brief mute mode disable - \param[in] usart_periph: USARTx(x=0,1) - \param[out] none - \retval none -*/ -void usart_mute_mode_disable(uint32_t usart_periph) -{ - USART_CTL0(usart_periph) &= ~(USART_CTL0_MEN); -} - -/*! - \brief wakeup method in mute mode configure - \param[in] usart_periph: USARTx(x=0,1) - \param[in] wmethod: two methods be used to enter or exit the mute mode - \arg USART_WM_IDLE: idle line - \arg USART_WM_ADDR: address mark - \param[out] none - \retval none -*/ -void usart_mute_mode_wakeup_config(uint32_t usart_periph, uint32_t wmethod) -{ - /* disable USART */ - USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); - USART_CTL0(usart_periph) &= ~(USART_CTL0_WM); - USART_CTL0(usart_periph) |= wmethod; -} - -/*! - \brief address detection mode configure - \param[in] usart_periph: USARTx(x=0,1) - \param[in] addmod: address detection mode - \arg USART_ADDM_4BIT: 4 bits - \arg USART_ADDM_FULLBIT: full bits - \param[out] none - \retval none -*/ -void usart_address_detection_mode_config(uint32_t usart_periph, uint32_t addmod) -{ - /* disable USART */ - USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); - USART_CTL1(usart_periph) &= ~(USART_CTL1_ADDM); - USART_CTL1(usart_periph) |= (USART_CTL1_ADDM & (addmod)); -} - -/*! - \brief address of the USART terminal - \param[in] usart_periph: USARTx(x=0,1) - \param[in] addr: 0x00-0xFF, address of USART terminal - \param[out] none - \retval none -*/ -void usart_address_config(uint32_t usart_periph, uint8_t addr) -{ - /* disable USART */ - USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); - USART_CTL1(usart_periph) &= ~(USART_CTL1_ADDR); - USART_CTL1(usart_periph) |= (USART_CTL1_ADDR & (((uint32_t)addr) << 24)); -} - -/*! - \brief receiver timeout enable - \param[in] usart_periph: USARTx(x=0) - \param[out] none - \retval none -*/ -void usart_receiver_timeout_enable(uint32_t usart_periph) -{ - USART_CTL1(usart_periph) |= USART_CTL1_RTEN; -} - -/*! - \brief receiver timeout disable - \param[in] usart_periph: USARTx(x=0) - \param[out] none - \retval none -*/ -void usart_receiver_timeout_disable(uint32_t usart_periph) -{ - USART_CTL1(usart_periph) &= ~(USART_CTL1_RTEN); -} - -/*! - \brief receiver timeout threshold configure - \param[in] usart_periph: USARTx(x=0) - \param[in] rtimeout: 0x000000-0xFFFFFF, receiver timeout value in terms of number of baud clocks - \param[out] none - \retval none -*/ -void usart_receiver_timeout_config(uint32_t usart_periph, uint32_t rtimeout) -{ - USART_RT(usart_periph) &= ~(USART_RT_RT); - USART_RT(usart_periph) |= (rtimeout); -} - -/*! - \brief LIN mode enable - \param[in] usart_periph: USARTx(x=0) - \param[out] none - \retval none -*/ -void usart_lin_mode_enable(uint32_t usart_periph) -{ - /* disable USART */ - USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); - - USART_CTL1(usart_periph) |= USART_CTL1_LMEN; -} - -/*! - \brief LIN mode disable - \param[in] usart_periph: USARTx(x=0) - \param[out] none - \retval none -*/ -void usart_lin_mode_disable(uint32_t usart_periph) -{ - /* disable USART */ - USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); - - USART_CTL1(usart_periph) &= ~(USART_CTL1_LMEN); -} - -/*! - \brief LIN break detection length - \param[in] usart_periph: USARTx(x=0) - \param[in] lblen: LIN break detection length - \arg USART_LBLEN_10B: 10 bits break detection - \arg USART_LBLEN_11B: 11 bits break detection - \param[out] none - \retval none -*/ -void usart_lin_break_dection_length_config(uint32_t usart_periph, uint32_t lblen) -{ - /* disable USART */ - USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); - - USART_CTL1(usart_periph) |= (USART_CTL1_LBLEN & (lblen)); -} - -/*! - \brief half-duplex enable - \param[in] usart_periph: USARTx(x=0,1) - \param[out] none - \retval none -*/ -void usart_halfduplex_enable(uint32_t usart_periph) -{ - /* disable USART */ - USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); - - USART_CTL2(usart_periph) |= USART_CTL2_HDEN; -} - -/*! - \brief half-duplex disable - \param[in] usart_periph: USARTx(x=0,1) - \param[out] none - \retval none -*/ -void usart_halfduplex_disable(uint32_t usart_periph) -{ - /* disable USART */ - USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); - - USART_CTL2(usart_periph) &= ~(USART_CTL2_HDEN); -} - -/*! - \brief clock enable - \param[in] usart_periph: USARTx(x=0) - \param[out] none - \retval none -*/ -void usart_clock_enable(uint32_t usart_periph) -{ - /* disable USART */ - USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); - - USART_CTL1(usart_periph) |= USART_CTL1_CKEN; -} - -/*! - \brief clock disable - \param[in] usart_periph: USARTx(x=0) - \param[out] none - \retval none -*/ -void usart_clock_disable(uint32_t usart_periph) -{ - /* disable USART */ - USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); - - USART_CTL1(usart_periph) &= ~(USART_CTL1_CKEN); -} - -/*! - \brief configure USART synchronous mode parameters - \param[in] usart_periph: USARTx(x=0,1) - \param[in] clen: last bit clock pulse - \arg USART_CLEN_NONE: clock pulse of the last data bit (MSB) is not output to the CK pin - \arg USART_CLEN_EN: clock pulse of the last data bit (MSB) is output to the CK pin - \param[in] cph: clock phase - \arg USART_CPH_1CK: first clock transition is the first data capture edge - \arg USART_CPH_2CK: second clock transition is the first data capture edge - \param[in] cpl: clock polarity - \arg USART_CPL_LOW: steady low value on CK pin - \arg USART_CPL_HIGH: steady high value on CK pin - \param[out] none - \retval none -*/ -void usart_synchronous_clock_config(uint32_t usart_periph, uint32_t clen, uint32_t cph, uint32_t cpl) -{ - /* disable USART */ - USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); - /* reset USART_CTL1 CLEN,CPH,CPL bits */ - USART_CTL1(usart_periph) &= ~(USART_CTL1_CLEN | USART_CTL1_CPH | USART_CTL1_CPL); - - USART_CTL1(usart_periph) |= (USART_CTL1_CLEN & clen); - USART_CTL1(usart_periph) |= (USART_CTL1_CPH & cph); - USART_CTL1(usart_periph) |= (USART_CTL1_CPL & cpl); -} - -/*! - \brief smartcard mode enable - \param[in] usart_periph: USARTx(x=0) - \param[out] none - \retval none -*/ -void usart_smartcard_mode_enable(uint32_t usart_periph) -{ - /* disable USART */ - USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); - - USART_CTL2(usart_periph) |= USART_CTL2_SCEN; -} - -/*! - \brief smartcard mode disable - \param[in] usart_periph: USARTx(x=0) - \param[out] none - \retval none -*/ -void usart_smartcard_mode_disable(uint32_t usart_periph) -{ - /* disable USART */ - USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); - - USART_CTL2(usart_periph) &= ~(USART_CTL2_SCEN); -} - -/*! - \brief NACK enable in smartcard mode - \param[in] usart_periph: USARTx(x=0) - \param[out] none - \retval none -*/ -void usart_smartcard_mode_nack_enable(uint32_t usart_periph) -{ - /* disable USART */ - USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); - - USART_CTL2(usart_periph) |= USART_CTL2_NKEN; -} - -/*! - \brief NACK disable in smartcard mode - \param[in] usart_periph: USARTx(x=0) - \param[out] none - \retval none -*/ -void usart_smartcard_mode_nack_disable(uint32_t usart_periph) -{ - /* disable USART */ - USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); - - USART_CTL2(usart_periph) &= ~(USART_CTL2_NKEN); -} - -/*! - \brief guard time value configure in smartcard mode - \param[in] usart_periph: USARTx(x=0) - \param[in] guat: 0x00-0xFF - \param[out] none - \retval none -*/ -void usart_guard_time_config(uint32_t usart_periph, uint32_t guat) -{ - /* disable USART */ - USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); - - USART_GP(usart_periph) &= ~(USART_GP_GUAT); - USART_GP(usart_periph) |= (USART_GP_GUAT & ((guat) << 8)); -} - -/*! - \brief block length configure - \param[in] usart_periph: USARTx(x=0) - \param[in] bl: 0x00-0xFF - \param[out] none - \retval none -*/ -void usart_block_length_config(uint32_t usart_periph, uint32_t bl) -{ - USART_RT(usart_periph) &= ~(USART_RT_BL); - USART_RT(usart_periph) |= (USART_RT_BL & ((bl) << 24)); -} - -/*! - \brief smartcard auto-retry number configure - \param[in] usart_periph: USARTx(x=0) - \param[in] scrtnum: 0x0-0x7, smartcard auto-retry number - \param[out] none - \retval none -*/ -void usart_smartcard_autoretry_config(uint32_t usart_periph, uint32_t scrtnum) -{ - /* disable USART */ - USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); - - USART_CTL2(usart_periph) &= ~(USART_CTL2_SCRTNUM); - USART_CTL2(usart_periph) |= (USART_CTL2_SCRTNUM & ((scrtnum) << 17)); -} - -/*! - \brief IrDA mode enable - \param[in] usart_periph: USARTx(x=0) - \param[out] none - \retval none -*/ -void usart_irda_mode_enable(uint32_t usart_periph) -{ - /* disable USART */ - USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); - - USART_CTL2(usart_periph) |= USART_CTL2_IREN; -} - -/*! - \brief IrDA mode disable - \param[in] usart_periph: USARTx(x=0) - \param[out] none - \retval none -*/ -void usart_irda_mode_disable(uint32_t usart_periph) -{ - /* disable USART */ - USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); - - USART_CTL2(usart_periph) &= ~(USART_CTL2_IREN); -} - -/*! - \brief IrDA low-power configure - \param[in] usart_periph: USARTx(x=0) - \param[in] irlp: IrDA low-power or normal - \arg USART_IRLP_LOW: low-power - \arg USART_IRLP_NORMAL: normal - \param[out] none - \retval none -*/ -void usart_irda_lowpower_config(uint32_t usart_periph, uint32_t irlp) -{ - /* disable USART */ - USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); - - USART_CTL2(usart_periph) |= (USART_CTL2_IRLP & irlp); -} - -/*! - \brief configure the peripheral clock prescaler in USART IrDA low-power mode or in USART SmartCard mode - \param[in] usart_periph: USARTx(x=0) - \param[in] psc: 0x00-0xFF - \param[out] none - \retval none -*/ -void usart_prescaler_config(uint32_t usart_periph, uint32_t psc) -{ - /* disable USART */ - USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); - - USART_GP(usart_periph) &= ~(USART_GP_PSC); - USART_GP(usart_periph) |= psc; -} - -/*! - \brief configure hardware flow control RTS - \param[in] usart_periph: USARTx(x=0,1) - \param[in] rtsconfig: enable or disable RTS - \arg USART_RTS_ENABLE: enable RTS - \arg USART_RTS_DISABLE: disable RTS - \param[out] none - \retval none -*/ -void usart_hardware_flow_rts_config(uint32_t usart_periph, uint32_t rtsconfig) -{ - /* disable USART */ - USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); - - USART_CTL2(usart_periph) &= ~(USART_CTL2_RTSEN); - USART_CTL2(usart_periph) |= rtsconfig; -} - -/*! - \brief configure hardware flow control CTS - \param[in] usart_periph: USARTx(x=0,1) - \param[in] ctsconfig: enable or disable CTS - \arg USART_CTS_ENABLE: enable CTS - \arg USART_CTS_DISABLE: disable CTS - \param[out] none - \retval none -*/ -void usart_hardware_flow_cts_config(uint32_t usart_periph, uint32_t ctsconfig) -{ - /* disable USART */ - USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); - - USART_CTL2(usart_periph) &= ~USART_CTL2_CTSEN; - USART_CTL2(usart_periph) |= ctsconfig; -} - -/*! - \brief RS485 driver enable - \param[in] usart_periph: USARTx(x=0,1) - \param[out] none - \retval none -*/ -void usart_rs485_driver_enable(uint32_t usart_periph) -{ - /* disable USART */ - USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); - - USART_CTL2(usart_periph) |= USART_CTL2_DEM; -} - -/*! - \brief RS485 driver disable - \param[in] usart_periph: USARTx(x=0,1) - \param[out] none - \retval none -*/ -void usart_rs485_driver_disable(uint32_t usart_periph) -{ - /* disable USART */ - USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); - - USART_CTL2(usart_periph) &= ~(USART_CTL2_DEM); -} - -/*! - \brief driver enable assertion time configure - \param[in] usart_periph: USARTx(x=0,1) - \param[in] deatime: 0x00-0x1F - \param[out] none - \retval none -*/ -void usart_driver_assertime_config(uint32_t usart_periph, uint32_t deatime) -{ - /* disable USART */ - USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); - - USART_CTL0(usart_periph) &= ~(USART_CTL0_DEA); - USART_CTL0(usart_periph) |= (USART_CTL0_DEA & ((deatime) << 21)); -} - -/*! - \brief driver enable de-assertion time configure - \param[in] usart_periph: USARTx(x=0,1) - \param[in] dedtime: 0x00-0x1F - \param[out] none - \retval none -*/ -void usart_driver_deassertime_config(uint32_t usart_periph, uint32_t dedtime) -{ - /* disable USART */ - USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); - - USART_CTL0(usart_periph) &= ~(USART_CTL0_DED); - USART_CTL0(usart_periph) |= (USART_CTL0_DED & ((dedtime) << 16)); -} - -/*! - \brief configure driver enable polarity mode - \param[in] usart_periph: USARTx(x=0,1) - \param[in] dep: DE signal - \arg USART_DEP_HIGH: DE signal is active high - \arg USART_DEP_LOW: DE signal is active low - \param[out] none - \retval none -*/ -void usart_depolarity_config(uint32_t usart_periph, uint32_t dep) -{ - /* disable USART */ - USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); - /* reset DEP bit */ - USART_CTL2(usart_periph) &= ~(USART_CTL2_DEP); - USART_CTL2(usart_periph) |= (USART_CTL2_DEP & dep); -} - -/*! - \brief configure USART DMA reception - \param[in] usart_periph: USARTx(x=0,1) - \param[in] dmacmd: enable or disable DMA for reception - \arg USART_DENR_ENABLE: DMA enable for reception - \arg USART_DENR_DISABLE: DMA disable for reception - \param[out] none - \retval none -*/ -void usart_dma_receive_config(uint32_t usart_periph, uint32_t dmacmd) -{ - USART_CTL2(usart_periph) &= ~USART_CTL2_DENR; - /* configure DMA reception */ - USART_CTL2(usart_periph) |= dmacmd; -} - -/*! - \brief configure USART DMA transmission - \param[in] usart_periph: USARTx(x=0,1) - \param[in] dmacmd: enable or disable DMA for transmission - \arg USART_DENT_ENABLE: DMA enable for transmission - \arg USART_DENT_DISABLE: DMA disable for transmission - \param[out] none - \retval none -*/ -void usart_dma_transmit_config(uint32_t usart_periph, uint32_t dmacmd) -{ - USART_CTL2(usart_periph) &= ~USART_CTL2_DENT; - /* configure DMA transmission */ - USART_CTL2(usart_periph) |= dmacmd; -} - -/*! - \brief disable DMA on reception error - \param[in] usart_periph: USARTx(x=0,1) - \param[out] none - \retval none -*/ -void usart_reception_error_dma_disable(uint32_t usart_periph) -{ - /* disable USART */ - USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); - USART_CTL2(usart_periph) |= USART_CTL2_DDRE; -} - -/*! - \brief enable DMA on reception error - \param[in] usart_periph: USARTx(x=0,1) - \param[out] none - \retval none -*/ -void usart_reception_error_dma_enable(uint32_t usart_periph) -{ - /* disable USART */ - USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); - USART_CTL2(usart_periph) &= ~(USART_CTL2_DDRE); -} - -/*! - \brief USART be able to wake up the MCU from deep-sleep mode - \param[in] usart_periph: USARTx(x=0) - \param[out] none - \retval none -*/ -void usart_wakeup_enable(uint32_t usart_periph) -{ - USART_CTL0(usart_periph) |= USART_CTL0_UESM; -} - -/*! - \brief USART be not able to wake up the MCU from deep-sleep mode - \param[in] usart_periph: USARTx(x=0) - \param[out] none - \retval none -*/ -void usart_wakeup_disable(uint32_t usart_periph) -{ - USART_CTL0(usart_periph) &= ~(USART_CTL0_UESM); -} - -/*! - \brief wakeup mode from deep-sleep mode - \param[in] usart_periph: USARTx(x=0) - \param[in] wum: wakeup mode - \arg USART_WUM_ADDR: WUF active on address match - \arg USART_WUM_STARTB: WUF active on start bit - \arg USART_WUM_RBNE: WUF active on RBNE - \param[out] none - \retval none -*/ -void usart_wakeup_mode_config(uint32_t usart_periph, uint32_t wum) -{ - /* disable USART */ - USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); - /* reset WUM bit */ - USART_CTL2(usart_periph) &= ~(USART_CTL2_WUM); - USART_CTL2(usart_periph) |= (USART_CTL2_WUM & (wum)); -} - -/*! - \brief get flag in STAT register - \param[in] usart_periph: USARTx(x=0,1) - \param[in] flag: flag type - \arg USART_FLAG_PERR: parity error flag - \arg USART_FLAG_FERR: frame error flag - \arg USART_FLAG_NERR: noise error flag - \arg USART_FLAG_ORERR: overrun error - \arg USART_FLAG_IDLE: idle line detected flag - \arg USART_FLAG_RBNE: read data buffer not empty - \arg USART_FLAG_TC: transmission completed - \arg USART_FLAG_TBE: transmit data register empty - \arg USART_FLAG_LBD: LIN break detected flag - \arg USART_FLAG_CTSF: CTS change flag - \arg USART_FLAG_CTS: CTS level - \arg USART_FLAG_RT: receiver timeout flag - \arg USART_FLAG_EB: end of block flag - \arg USART_FLAG_ABDE: auto baudrate detection error - \arg USART_FLAG_ABD: auto baudrate detection flag - \arg USART_FLAG_BSY: busy flag - \arg USART_FLAG_AM: address match flag - \arg USART_FLAG_SB: send break flag - \arg USART_FLAG_RWU: receiver wakeup from mute mode. - \arg USART_FLAG_WU: wakeup from deep-sleep mode flag - \arg USART_FLAG_TEA: transmit enable acknowledge flag - \arg USART_FLAG_REA: receive enable acknowledge flag - \param[out] none - \retval FlagStatus: SET or RESET -*/ -FlagStatus usart_flag_get(uint32_t usart_periph, usart_flag_enum flag) -{ - if(RESET != (USART_REG_VAL(usart_periph, flag) & BIT(USART_BIT_POS(flag)))){ - return SET; - }else{ - return RESET; - } -} - -/*! - \brief clear USART status - \param[in] usart_periph: USARTx(x=0,1) - \param[in] flag: flag type - \arg USART_FLAG_PERR: parity error flag - \arg USART_FLAG_FERR: frame error flag - \arg USART_FLAG_NERR: noise detected flag - \arg USART_FLAG_ORERR:overrun error flag - \arg USART_FLAG_IDLE: idle line detected flag - \arg USART_FLAG_TC: transmission complete flag - \arg USART_FLAG_LBD: LIN break detected flag - \arg USART_FLAG_CTSF: CTS change flag - \arg USART_FLAG_RT: receiver timeout flag - \arg USART_FLAG_EB: end of block flag - \arg USART_FLAG_AM: address match flag - \arg USART_FLAG_WU: wakeup from deep-sleep mode flag - \param[out] none - \retval none -*/ -void usart_flag_clear(uint32_t usart_periph, usart_flag_enum flag) -{ - USART_INTC(usart_periph) |= BIT(USART_BIT_POS(flag)); -} - -/*! - \brief enable USART interrupt - \param[in] usart_periph: USARTx(x=0,1) - \param[in] inttype: interrupt type - \arg USART_INT_IDLE: idle interrupt - \arg USART_INT_RBNE: read data buffer not empty interrupt and - overrun error interrupt enable interrupt - \arg USART_INT_TC: transmission complete interrupt - \arg USART_INT_TBE: transmit data register empty interrupt - \arg USART_INT_PERR: parity error interrupt - \arg USART_INT_AM: address match interrupt - \arg USART_INT_RT: receiver timeout interrupt - \arg USART_INT_EB: end of block interrupt - \arg USART_INT_LBD: LIN break detection interrupt - \arg USART_INT_ERR: error interrupt enable in multibuffer communication - \arg USART_INT_CTS: CTS interrupt - \arg USART_INT_WU: wakeup from deep-sleep mode interrupt - \param[out] none - \retval none -*/ -void usart_interrupt_enable(uint32_t usart_periph, uint32_t inttype) -{ - USART_REG_VAL(usart_periph, inttype) |= BIT(USART_BIT_POS(inttype)); -} - -/*! - \brief disable USART interrupt - \param[in] usart_periph: USARTx(x=0,1) - \param[in] inttype: interrupt type - \arg USART_INT_IDLE: idle interrupt - \arg USART_INT_RBNE: read data buffer not empty interrupt and - overrun error interrupt - \arg USART_INT_TC: transmission complete interrupt - \arg USART_INT_TBE: transmit data register empty interrupt - \arg USART_INT_PERR: parity error interrupt - \arg USART_INT_AM: address match interrupt - \arg USART_INT_RT: receiver timeout interrupt - \arg USART_INT_EB: end of block interrupt - \arg USART_INT_LBD: LIN break detection interrupt - \arg USART_INT_ERR: error interrupt enable in multibuffer communication - \arg USART_INT_CTS: CTS interrupt - \arg USART_INT_WU: wakeup from deep-sleep mode interrupt - \param[out] none - \retval none -*/ -void usart_interrupt_disable(uint32_t usart_periph, uint32_t inttype) -{ - USART_REG_VAL(usart_periph, inttype) &= ~BIT(USART_BIT_POS(inttype)); -} - -/*! - \brief enable USART command - \param[in] usart_periph: USARTx(x=0,1) - \param[in] cmdtype: command type - \arg USART_CMD_ABDCMD: auto baudrate detection command - \arg USART_CMD_SBKCMD: send break command - \arg USART_CMD_MMCMD: mute mode command - \arg USART_CMD_RXFCMD: receive data flush command - \arg USART_CMD_TXFCMD: transmit data flush request - \param[out] none - \retval none -*/ -void usart_command_enable(uint32_t usart_periph, uint32_t cmdtype) -{ - USART_CMD(usart_periph) |= (cmdtype); -} - -/*! - \brief get USART interrupt and flag status - \param[in] usart_periph: USARTx(x=0,1) - \param[in] int_flag: interrupt and flag type, refer to usart_interrupt_flag_enum - \arg USART_INT_FLAG_EB: end of block interrupt and flag - \arg USART_INT_FLAG_RT: receiver timeout interrupt and flag - \arg USART_INT_FLAG_AM: address match interrupt and flag - \arg USART_INT_FLAG_PERR: parity error interrupt and flag - \arg USART_INT_FLAG_TBE: transmitter buffer empty interrupt and flag - \arg USART_INT_FLAG_TC: transmission complete interrupt and flag - \arg USART_INT_FLAG_RBNE: read data buffer not empty interrupt and flag - \arg USART_INT_FLAG_RBNE_ORERR: read data buffer not empty interrupt and overrun error flag - \arg USART_INT_FLAG_IDLE: IDLE line detected interrupt and flag - \arg USART_INT_FLAG_LBD: LIN break detected interrupt and flag - \arg USART_INT_FLAG_WU: wakeup from deep-sleep mode interrupt and flag - \arg USART_INT_FLAG_CTS: CTS interrupt and flag - \arg USART_INT_FLAG_ERR_NERR: error interrupt and noise error flag - \arg USART_INT_FLAG_ERR_ORERR: error interrupt and overrun error - \arg USART_INT_FLAG_ERR_FERR: error interrupt and frame error flag - \param[out] none - \retval FlagStatus: SET or RESET -*/ -FlagStatus usart_interrupt_flag_get(uint32_t usart_periph, uint32_t int_flag) -{ - uint32_t intenable = 0U, flagstatus = 0U; - /* get the interrupt enable bit status */ - intenable = (USART_REG_VAL(usart_periph, int_flag) & BIT(USART_BIT_POS(int_flag))); - /* get the corresponding flag bit status */ - flagstatus = (USART_REG_VAL2(usart_periph, int_flag) & BIT(USART_BIT_POS2(int_flag))); - - if(flagstatus && intenable){ - return SET; - }else{ - return RESET; - } -} - -/*! - \brief clear USART interrupt flag in STAT register - \param[in] usart_periph: USARTx(x=0,1) - \param[in] flag: USART interrupt flag - \arg USART_INT_FLAG_PERR: parity error flag - \arg USART_INT_FLAG_FERR: frame error flag - \arg USART_INT_FLAG_NERR: noise detected flag - \arg USART_INT_FLAG_ORERR:overrun error flag - \arg USART_INT_FLAG_IDLE: idle line detected flag - \arg USART_INT_FLAG_TC: transmission complete flag - \arg USART_INT_FLAG_LBD: LIN break detected flag - \arg USART_INT_FLAG_CTS: CTS change flag - \arg USART_INT_FLAG_RT: receiver timeout flag - \arg USART_INT_FLAG_EB: end of block flag - \arg USART_INT_FLAG_AM: address match flag - \arg USART_INT_FLAG_WU: wakeup from deep-sleep mode flag - \param[out] none - \retval none -*/ -void usart_interrupt_flag_clear(uint32_t usart_periph, uint32_t flag) -{ - USART_INTC(usart_periph) |= BIT(USART_BIT_POS2(flag)); -} +/*! + \file gd32f1x0_usart.c + \brief USART driver +*/ + +/* + Copyright (C) 2017 GigaDevice + + 2014-12-26, V1.0.0, platform GD32F1x0(x=3,5) + 2016-01-15, V2.0.0, platform GD32F1x0(x=3,5,7,9) + 2016-04-30, V3.0.0, firmware update for GD32F1x0(x=3,5,7,9) + 2017-06-19, V3.1.1, firmware update for GD32F1x0(x=3,5,7,9) +*/ + +#include "gd32f1x0_usart.h" +#include "gd32f1x0_rcu.h" + +/*! + \brief reset USART + \param[in] usart_periph: USARTx(x=0,1) + \param[out] none + \retval none +*/ +void usart_deinit(uint32_t usart_periph) +{ + switch(usart_periph){ + case USART0: + rcu_periph_reset_enable(RCU_USART0RST); + rcu_periph_reset_disable(RCU_USART0RST); + break; + case USART1: + rcu_periph_reset_enable(RCU_USART1RST); + rcu_periph_reset_disable(RCU_USART1RST); + break; + default: + break; + } +} + +/*! + \brief configure USART baud rate value + \param[in] usart_periph: USARTx(x=0,1) + \param[in] baudval: baud rate value + \param[out] none + \retval none +*/ +void usart_baudrate_set(uint32_t usart_periph, uint32_t baudval) +{ + uint32_t uclk = 0U, intdiv = 0U, fradiv = 0U, udiv = 0U; + switch(usart_periph){ + case USART0: + uclk = rcu_clock_freq_get(CK_USART); + break; + case USART1: + uclk = rcu_clock_freq_get(CK_APB1); + break; + default: + break; + } + if(USART_CTL0(usart_periph) & USART_CTL0_OVSMOD){ + /* when oversampling by 8,configure the value of USART_BAUD */ + udiv = ((2U*uclk)+baudval/2U)/baudval; + intdiv = udiv & 0xfff0U; + fradiv = (udiv>>1U) & 0x7U; + USART_BAUD(usart_periph) = ((USART_BAUD_FRADIV | USART_BAUD_INTDIV) & (intdiv | fradiv)); + }else{ + /* when oversampling by 16,configure the value of USART_BAUD */ + udiv = (uclk+baudval/2U)/baudval; + intdiv = udiv & 0xfff0U; + fradiv = udiv & 0xfU; + USART_BAUD(usart_periph) = ((USART_BAUD_FRADIV | USART_BAUD_INTDIV) & (intdiv | fradiv)); + } +} + +/*! + \brief configure USART parity + \param[in] usart_periph: USARTx(x=0,1) + \param[in] paritycfg: USART parity configure + \arg USART_PM_NONE: no parity + \arg USART_PM_ODD: odd parity + \arg USART_PM_EVEN: even parity + \param[out] none + \retval none +*/ +void usart_parity_config(uint32_t usart_periph, uint32_t paritycfg) +{ + /* disable USART */ + USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); + /* clear USART_CTL0 PM,PCEN bits */ + USART_CTL0(usart_periph) &= ~(USART_CTL0_PM | USART_CTL0_PCEN); + /* configure USART parity mode */ + USART_CTL0(usart_periph) |= paritycfg; +} + +/*! + \brief configure USART word length + \param[in] usart_periph: USARTx(x=0,1) + \param[in] wlen: USART word length configure + \arg USART_WL_8BIT: 8 bits + \arg USART_WL_9BIT: 9 bits + \param[out] none + \retval none +*/ +void usart_word_length_set(uint32_t usart_periph, uint32_t wlen) +{ + /* disable USART */ + USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); + /* clear USART_CTL0 WL bit */ + USART_CTL0(usart_periph) &= ~USART_CTL0_WL; + /* configure USART word length */ + USART_CTL0(usart_periph) |= wlen; +} + +/*! + \brief configure USART stop bit length + \param[in] usart_periph: USARTx(x=0,1) + \param[in] stblen: USART stop bit configure + \arg USART_STB_1BIT: 1 bit + \arg USART_STB_2BIT: 2 bits + \arg USART_STB_1_5BIT: 1.5bit + \param[out] none + \retval none +*/ +void usart_stop_bit_set(uint32_t usart_periph, uint32_t stblen) +{ + /* disable USART */ + USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); + /* clear USART_CTL1 STB bits */ + USART_CTL1(usart_periph) &= ~USART_CTL1_STB; + USART_CTL1(usart_periph) |= stblen; +} + +/*! + \brief enable USART + \param[in] usart_periph: USARTx(x=0,1) + \param[out] none + \retval none +*/ +void usart_enable(uint32_t usart_periph) +{ + USART_CTL0(usart_periph) |= USART_CTL0_UEN; +} + +/*! + \brief disable USART + \param[in] usart_periph: USARTx(x=0,1) + \param[out] none + \retval none +*/ +void usart_disable(uint32_t usart_periph) +{ + USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); +} + +/*! + \brief configure USART transmitter + \param[in] usart_periph: USARTx(x=0,1) + \param[in] txconfig: enable or disable USART transmitter + \arg USART_TRANSMIT_ENABLE: enable USART transmission + \arg USART_TRANSMIT_DISABLE: enable USART transmission + \param[out] none + \retval none +*/ +void usart_transmit_config(uint32_t usart_periph, uint32_t txconfig) +{ + USART_CTL0(usart_periph) &= ~USART_CTL0_TEN; + /* configure transfer mode */ + USART_CTL0(usart_periph) |= txconfig; +} + +/*! + \brief configure USART receiver + \param[in] usart_periph: USARTx(x=0,1) + \param[in] rxconfig: enable or disable USART receiver + \arg USART_RECEIVE_ENABLE: enable USART reception + \arg USART_RECEIVE_DISABLE: disable USART reception + \param[out] none + \retval none +*/ +void usart_receive_config(uint32_t usart_periph, uint32_t rxconfig) +{ + USART_CTL0(usart_periph) &= ~USART_CTL0_REN; + /* configure receiver mode */ + USART_CTL0(usart_periph) |= rxconfig; +} + +/*! + \brief USART transmit data function + \param[in] usart_periph: USARTx(x=0,1) + \param[in] data: data of transmission + \param[out] none + \retval none +*/ +void usart_data_transmit(uint32_t usart_periph, uint32_t data) +{ + USART_TDATA(usart_periph) = (USART_TDATA_TDATA & data); +} + +/*! + \brief USART receive data function + \param[in] usart_periph: USARTx(x=0,1) + \param[out] none + \retval data of received +*/ +uint16_t usart_data_receive(uint32_t usart_periph) +{ + return (uint16_t)(GET_BITS(USART_RDATA(usart_periph), 0U, 8U)); +} + +/*! + \brief data is transmitted/received with the LSB/MSB first + \param[in] usart_periph: USARTx(x=0,1) + \param[in] msbf: LSB/MSB + \arg USART_MSBF_LSB: LSB first + \arg USART_MSBF_MSB: MSB first + \param[out] none + \retval none +*/ +void usart_data_first_config(uint32_t usart_periph, uint32_t msbf) +{ + USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); + /* configure LSB or MSB first */ + USART_CTL1(usart_periph) &= ~(USART_CTL1_MSBF); + USART_CTL1(usart_periph) |= (USART_CTL1_MSBF & msbf) ; +} + +/*! + \brief USART inverted configure + \param[in] usart_periph: USARTx(x=0,1) + \param[in] invertpara: refer to usart_invert_enum + \param[out] none + \retval none +*/ +void usart_invert_config(uint32_t usart_periph, usart_invert_enum invertpara) +{ + USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); + /* inverted or not the specified signal */ + switch(invertpara){ + case USART_DINV_ENABLE: + USART_CTL1(usart_periph) |= USART_CTL1_DINV; + break; + case USART_DINV_DISABLE: + USART_CTL1(usart_periph) &= ~(USART_CTL1_DINV); + break; + case USART_TXPIN_DISABLE: + USART_CTL1(usart_periph) &= ~(USART_CTL1_TINV); + break; + case USART_RXPIN_DISABLE: + USART_CTL1(usart_periph) &= ~(USART_CTL1_RINV); + break; + case USART_SWAP_DISABLE: + USART_CTL1(usart_periph) &= ~(USART_CTL1_STRP); + break; + case USART_TXPIN_ENABLE: + USART_CTL1(usart_periph) |= USART_CTL1_TINV; + break; + case USART_RXPIN_ENABLE: + USART_CTL1(usart_periph) |= USART_CTL1_RINV; + break; + case USART_SWAP_ENABLE: + USART_CTL1(usart_periph) |= USART_CTL1_STRP; + break; + default: + break; + } +} + +/*! + \brief overrun function is enabled + \param[in] usart_periph: USARTx(x=0,1) + \param[out] none + \retval none +*/ +void usart_overrun_enable(uint32_t usart_periph) +{ + USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); + USART_CTL2(usart_periph) &= ~(USART_CTL2_OVRD); +} + +/*! + \brief overrun function is disabled + \param[in] usart_periph: USARTx(x=0,1) + \param[out] none + \retval none +*/ +void usart_overrun_disable(uint32_t usart_periph) +{ + USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); + USART_CTL2(usart_periph) |= USART_CTL2_OVRD; +} + +/*! + \brief configure the USART oversample mode + \param[in] usart_periph: USARTx(x=0,1) + \param[in] oversamp: oversample value + \arg USART_OVSMOD_8: oversampling by 8 + \arg USART_OVSMOD_16: oversampling by 16 + \param[out] none + \retval none +*/ +void usart_oversample_config(uint32_t usart_periph, uint32_t oversamp) +{ + /* disable USART */ + USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); + /* clear OVSMOD bit */ + USART_CTL0(usart_periph) &= ~(USART_CTL0_OVSMOD); + USART_CTL0(usart_periph) |= oversamp; +} + +/*! + \brief sample bit method configure + \param[in] usart_periph: USARTx(x=0,1) + \param[in] osb: sample bit + \arg USART_OSB_1BIT: 1 bit + \arg USART_OSB_3BIT: 3 bits + \param[out] none + \retval none +*/ +void usart_sample_bit_config(uint32_t usart_periph, uint32_t osb) +{ + /* disable USART */ + USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); + USART_CTL2(usart_periph) &= ~(USART_CTL2_OSB); + USART_CTL2(usart_periph) |= (osb); +} + +/*! + \brief auto baud rate detection enable + \param[in] usart_periph: USARTx(x=0) + \param[out] none + \retval none +*/ +void usart_autobaud_detection_enable(uint32_t usart_periph) +{ + USART_CTL1(usart_periph) |= USART_CTL1_ABDEN; +} + +/*! + \brief auto baud rate detection disable + \param[in] usart_periph: USARTx(x=0) + \param[out] none + \retval none +*/ +void usart_autobaud_detection_disable(uint32_t usart_periph) +{ + USART_CTL1(usart_periph) &= ~(USART_CTL1_ABDEN); +} + +/*! + \brief auto baud rate detection mode configure + \param[in] usart_periph: USARTx(x=0) + \param[in] abdmod: auto baud rate detection mode + \arg USART_ABDM_FTOR: falling edge to rising edge measurement + \arg USART_ABDM_FTOF: falling edge to falling edge measurement + \param[out] none + \retval none +*/ +void usart_autobaud_detection_mode_config(uint32_t usart_periph, uint32_t abdmod) +{ + /* reset ABDM bits */ + USART_CTL1(usart_periph) &= ~(USART_CTL1_ABDM); + USART_CTL1(usart_periph) |= (abdmod); +} + +/*! + \brief mute mode enable + \param[in] usart_periph: USARTx(x=0,1) + \param[out] none + \retval none +*/ +void usart_mute_mode_enable(uint32_t usart_periph) +{ + USART_CTL0(usart_periph) |= USART_CTL0_MEN; +} + +/*! + \brief mute mode disable + \param[in] usart_periph: USARTx(x=0,1) + \param[out] none + \retval none +*/ +void usart_mute_mode_disable(uint32_t usart_periph) +{ + USART_CTL0(usart_periph) &= ~(USART_CTL0_MEN); +} + +/*! + \brief wakeup method in mute mode configure + \param[in] usart_periph: USARTx(x=0,1) + \param[in] wmethod: two methods be used to enter or exit the mute mode + \arg USART_WM_IDLE: idle line + \arg USART_WM_ADDR: address mark + \param[out] none + \retval none +*/ +void usart_mute_mode_wakeup_config(uint32_t usart_periph, uint32_t wmethod) +{ + /* disable USART */ + USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); + USART_CTL0(usart_periph) &= ~(USART_CTL0_WM); + USART_CTL0(usart_periph) |= wmethod; +} + +/*! + \brief address detection mode configure + \param[in] usart_periph: USARTx(x=0,1) + \param[in] addmod: address detection mode + \arg USART_ADDM_4BIT: 4 bits + \arg USART_ADDM_FULLBIT: full bits + \param[out] none + \retval none +*/ +void usart_address_detection_mode_config(uint32_t usart_periph, uint32_t addmod) +{ + /* disable USART */ + USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); + USART_CTL1(usart_periph) &= ~(USART_CTL1_ADDM); + USART_CTL1(usart_periph) |= (USART_CTL1_ADDM & (addmod)); +} + +/*! + \brief address of the USART terminal + \param[in] usart_periph: USARTx(x=0,1) + \param[in] addr: 0x00-0xFF, address of USART terminal + \param[out] none + \retval none +*/ +void usart_address_config(uint32_t usart_periph, uint8_t addr) +{ + /* disable USART */ + USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); + USART_CTL1(usart_periph) &= ~(USART_CTL1_ADDR); + USART_CTL1(usart_periph) |= (USART_CTL1_ADDR & (((uint32_t)addr) << 24)); +} + +/*! + \brief receiver timeout enable + \param[in] usart_periph: USARTx(x=0) + \param[out] none + \retval none +*/ +void usart_receiver_timeout_enable(uint32_t usart_periph) +{ + USART_CTL1(usart_periph) |= USART_CTL1_RTEN; +} + +/*! + \brief receiver timeout disable + \param[in] usart_periph: USARTx(x=0) + \param[out] none + \retval none +*/ +void usart_receiver_timeout_disable(uint32_t usart_periph) +{ + USART_CTL1(usart_periph) &= ~(USART_CTL1_RTEN); +} + +/*! + \brief receiver timeout threshold configure + \param[in] usart_periph: USARTx(x=0) + \param[in] rtimeout: 0x000000-0xFFFFFF, receiver timeout value in terms of number of baud clocks + \param[out] none + \retval none +*/ +void usart_receiver_timeout_config(uint32_t usart_periph, uint32_t rtimeout) +{ + USART_RT(usart_periph) &= ~(USART_RT_RT); + USART_RT(usart_periph) |= (rtimeout); +} + +/*! + \brief LIN mode enable + \param[in] usart_periph: USARTx(x=0) + \param[out] none + \retval none +*/ +void usart_lin_mode_enable(uint32_t usart_periph) +{ + /* disable USART */ + USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); + + USART_CTL1(usart_periph) |= USART_CTL1_LMEN; +} + +/*! + \brief LIN mode disable + \param[in] usart_periph: USARTx(x=0) + \param[out] none + \retval none +*/ +void usart_lin_mode_disable(uint32_t usart_periph) +{ + /* disable USART */ + USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); + + USART_CTL1(usart_periph) &= ~(USART_CTL1_LMEN); +} + +/*! + \brief LIN break detection length + \param[in] usart_periph: USARTx(x=0) + \param[in] lblen: LIN break detection length + \arg USART_LBLEN_10B: 10 bits break detection + \arg USART_LBLEN_11B: 11 bits break detection + \param[out] none + \retval none +*/ +void usart_lin_break_dection_length_config(uint32_t usart_periph, uint32_t lblen) +{ + /* disable USART */ + USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); + + USART_CTL1(usart_periph) |= (USART_CTL1_LBLEN & (lblen)); +} + +/*! + \brief half-duplex enable + \param[in] usart_periph: USARTx(x=0,1) + \param[out] none + \retval none +*/ +void usart_halfduplex_enable(uint32_t usart_periph) +{ + /* disable USART */ + USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); + + USART_CTL2(usart_periph) |= USART_CTL2_HDEN; +} + +/*! + \brief half-duplex disable + \param[in] usart_periph: USARTx(x=0,1) + \param[out] none + \retval none +*/ +void usart_halfduplex_disable(uint32_t usart_periph) +{ + /* disable USART */ + USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); + + USART_CTL2(usart_periph) &= ~(USART_CTL2_HDEN); +} + +/*! + \brief clock enable + \param[in] usart_periph: USARTx(x=0) + \param[out] none + \retval none +*/ +void usart_clock_enable(uint32_t usart_periph) +{ + /* disable USART */ + USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); + + USART_CTL1(usart_periph) |= USART_CTL1_CKEN; +} + +/*! + \brief clock disable + \param[in] usart_periph: USARTx(x=0) + \param[out] none + \retval none +*/ +void usart_clock_disable(uint32_t usart_periph) +{ + /* disable USART */ + USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); + + USART_CTL1(usart_periph) &= ~(USART_CTL1_CKEN); +} + +/*! + \brief configure USART synchronous mode parameters + \param[in] usart_periph: USARTx(x=0,1) + \param[in] clen: last bit clock pulse + \arg USART_CLEN_NONE: clock pulse of the last data bit (MSB) is not output to the CK pin + \arg USART_CLEN_EN: clock pulse of the last data bit (MSB) is output to the CK pin + \param[in] cph: clock phase + \arg USART_CPH_1CK: first clock transition is the first data capture edge + \arg USART_CPH_2CK: second clock transition is the first data capture edge + \param[in] cpl: clock polarity + \arg USART_CPL_LOW: steady low value on CK pin + \arg USART_CPL_HIGH: steady high value on CK pin + \param[out] none + \retval none +*/ +void usart_synchronous_clock_config(uint32_t usart_periph, uint32_t clen, uint32_t cph, uint32_t cpl) +{ + /* disable USART */ + USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); + /* reset USART_CTL1 CLEN,CPH,CPL bits */ + USART_CTL1(usart_periph) &= ~(USART_CTL1_CLEN | USART_CTL1_CPH | USART_CTL1_CPL); + + USART_CTL1(usart_periph) |= (USART_CTL1_CLEN & clen); + USART_CTL1(usart_periph) |= (USART_CTL1_CPH & cph); + USART_CTL1(usart_periph) |= (USART_CTL1_CPL & cpl); +} + +/*! + \brief smartcard mode enable + \param[in] usart_periph: USARTx(x=0) + \param[out] none + \retval none +*/ +void usart_smartcard_mode_enable(uint32_t usart_periph) +{ + /* disable USART */ + USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); + + USART_CTL2(usart_periph) |= USART_CTL2_SCEN; +} + +/*! + \brief smartcard mode disable + \param[in] usart_periph: USARTx(x=0) + \param[out] none + \retval none +*/ +void usart_smartcard_mode_disable(uint32_t usart_periph) +{ + /* disable USART */ + USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); + + USART_CTL2(usart_periph) &= ~(USART_CTL2_SCEN); +} + +/*! + \brief NACK enable in smartcard mode + \param[in] usart_periph: USARTx(x=0) + \param[out] none + \retval none +*/ +void usart_smartcard_mode_nack_enable(uint32_t usart_periph) +{ + /* disable USART */ + USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); + + USART_CTL2(usart_periph) |= USART_CTL2_NKEN; +} + +/*! + \brief NACK disable in smartcard mode + \param[in] usart_periph: USARTx(x=0) + \param[out] none + \retval none +*/ +void usart_smartcard_mode_nack_disable(uint32_t usart_periph) +{ + /* disable USART */ + USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); + + USART_CTL2(usart_periph) &= ~(USART_CTL2_NKEN); +} + +/*! + \brief guard time value configure in smartcard mode + \param[in] usart_periph: USARTx(x=0) + \param[in] guat: 0x00-0xFF + \param[out] none + \retval none +*/ +void usart_guard_time_config(uint32_t usart_periph, uint32_t guat) +{ + /* disable USART */ + USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); + + USART_GP(usart_periph) &= ~(USART_GP_GUAT); + USART_GP(usart_periph) |= (USART_GP_GUAT & ((guat) << 8)); +} + +/*! + \brief block length configure + \param[in] usart_periph: USARTx(x=0) + \param[in] bl: 0x00-0xFF + \param[out] none + \retval none +*/ +void usart_block_length_config(uint32_t usart_periph, uint32_t bl) +{ + USART_RT(usart_periph) &= ~(USART_RT_BL); + USART_RT(usart_periph) |= (USART_RT_BL & ((bl) << 24)); +} + +/*! + \brief smartcard auto-retry number configure + \param[in] usart_periph: USARTx(x=0) + \param[in] scrtnum: 0x0-0x7, smartcard auto-retry number + \param[out] none + \retval none +*/ +void usart_smartcard_autoretry_config(uint32_t usart_periph, uint32_t scrtnum) +{ + /* disable USART */ + USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); + + USART_CTL2(usart_periph) &= ~(USART_CTL2_SCRTNUM); + USART_CTL2(usart_periph) |= (USART_CTL2_SCRTNUM & ((scrtnum) << 17)); +} + +/*! + \brief IrDA mode enable + \param[in] usart_periph: USARTx(x=0) + \param[out] none + \retval none +*/ +void usart_irda_mode_enable(uint32_t usart_periph) +{ + /* disable USART */ + USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); + + USART_CTL2(usart_periph) |= USART_CTL2_IREN; +} + +/*! + \brief IrDA mode disable + \param[in] usart_periph: USARTx(x=0) + \param[out] none + \retval none +*/ +void usart_irda_mode_disable(uint32_t usart_periph) +{ + /* disable USART */ + USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); + + USART_CTL2(usart_periph) &= ~(USART_CTL2_IREN); +} + +/*! + \brief IrDA low-power configure + \param[in] usart_periph: USARTx(x=0) + \param[in] irlp: IrDA low-power or normal + \arg USART_IRLP_LOW: low-power + \arg USART_IRLP_NORMAL: normal + \param[out] none + \retval none +*/ +void usart_irda_lowpower_config(uint32_t usart_periph, uint32_t irlp) +{ + /* disable USART */ + USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); + + USART_CTL2(usart_periph) |= (USART_CTL2_IRLP & irlp); +} + +/*! + \brief configure the peripheral clock prescaler in USART IrDA low-power mode or in USART SmartCard mode + \param[in] usart_periph: USARTx(x=0) + \param[in] psc: 0x00-0xFF + \param[out] none + \retval none +*/ +void usart_prescaler_config(uint32_t usart_periph, uint32_t psc) +{ + /* disable USART */ + USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); + + USART_GP(usart_periph) &= ~(USART_GP_PSC); + USART_GP(usart_periph) |= psc; +} + +/*! + \brief configure hardware flow control RTS + \param[in] usart_periph: USARTx(x=0,1) + \param[in] rtsconfig: enable or disable RTS + \arg USART_RTS_ENABLE: enable RTS + \arg USART_RTS_DISABLE: disable RTS + \param[out] none + \retval none +*/ +void usart_hardware_flow_rts_config(uint32_t usart_periph, uint32_t rtsconfig) +{ + /* disable USART */ + USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); + + USART_CTL2(usart_periph) &= ~(USART_CTL2_RTSEN); + USART_CTL2(usart_periph) |= rtsconfig; +} + +/*! + \brief configure hardware flow control CTS + \param[in] usart_periph: USARTx(x=0,1) + \param[in] ctsconfig: enable or disable CTS + \arg USART_CTS_ENABLE: enable CTS + \arg USART_CTS_DISABLE: disable CTS + \param[out] none + \retval none +*/ +void usart_hardware_flow_cts_config(uint32_t usart_periph, uint32_t ctsconfig) +{ + /* disable USART */ + USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); + + USART_CTL2(usart_periph) &= ~USART_CTL2_CTSEN; + USART_CTL2(usart_periph) |= ctsconfig; +} + +/*! + \brief RS485 driver enable + \param[in] usart_periph: USARTx(x=0,1) + \param[out] none + \retval none +*/ +void usart_rs485_driver_enable(uint32_t usart_periph) +{ + /* disable USART */ + USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); + + USART_CTL2(usart_periph) |= USART_CTL2_DEM; +} + +/*! + \brief RS485 driver disable + \param[in] usart_periph: USARTx(x=0,1) + \param[out] none + \retval none +*/ +void usart_rs485_driver_disable(uint32_t usart_periph) +{ + /* disable USART */ + USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); + + USART_CTL2(usart_periph) &= ~(USART_CTL2_DEM); +} + +/*! + \brief driver enable assertion time configure + \param[in] usart_periph: USARTx(x=0,1) + \param[in] deatime: 0x00-0x1F + \param[out] none + \retval none +*/ +void usart_driver_assertime_config(uint32_t usart_periph, uint32_t deatime) +{ + /* disable USART */ + USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); + + USART_CTL0(usart_periph) &= ~(USART_CTL0_DEA); + USART_CTL0(usart_periph) |= (USART_CTL0_DEA & ((deatime) << 21)); +} + +/*! + \brief driver enable de-assertion time configure + \param[in] usart_periph: USARTx(x=0,1) + \param[in] dedtime: 0x00-0x1F + \param[out] none + \retval none +*/ +void usart_driver_deassertime_config(uint32_t usart_periph, uint32_t dedtime) +{ + /* disable USART */ + USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); + + USART_CTL0(usart_periph) &= ~(USART_CTL0_DED); + USART_CTL0(usart_periph) |= (USART_CTL0_DED & ((dedtime) << 16)); +} + +/*! + \brief configure driver enable polarity mode + \param[in] usart_periph: USARTx(x=0,1) + \param[in] dep: DE signal + \arg USART_DEP_HIGH: DE signal is active high + \arg USART_DEP_LOW: DE signal is active low + \param[out] none + \retval none +*/ +void usart_depolarity_config(uint32_t usart_periph, uint32_t dep) +{ + /* disable USART */ + USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); + /* reset DEP bit */ + USART_CTL2(usart_periph) &= ~(USART_CTL2_DEP); + USART_CTL2(usart_periph) |= (USART_CTL2_DEP & dep); +} + +/*! + \brief configure USART DMA reception + \param[in] usart_periph: USARTx(x=0,1) + \param[in] dmacmd: enable or disable DMA for reception + \arg USART_DENR_ENABLE: DMA enable for reception + \arg USART_DENR_DISABLE: DMA disable for reception + \param[out] none + \retval none +*/ +void usart_dma_receive_config(uint32_t usart_periph, uint32_t dmacmd) +{ + USART_CTL2(usart_periph) &= ~USART_CTL2_DENR; + /* configure DMA reception */ + USART_CTL2(usart_periph) |= dmacmd; +} + +/*! + \brief configure USART DMA transmission + \param[in] usart_periph: USARTx(x=0,1) + \param[in] dmacmd: enable or disable DMA for transmission + \arg USART_DENT_ENABLE: DMA enable for transmission + \arg USART_DENT_DISABLE: DMA disable for transmission + \param[out] none + \retval none +*/ +void usart_dma_transmit_config(uint32_t usart_periph, uint32_t dmacmd) +{ + USART_CTL2(usart_periph) &= ~USART_CTL2_DENT; + /* configure DMA transmission */ + USART_CTL2(usart_periph) |= dmacmd; +} + +/*! + \brief disable DMA on reception error + \param[in] usart_periph: USARTx(x=0,1) + \param[out] none + \retval none +*/ +void usart_reception_error_dma_disable(uint32_t usart_periph) +{ + /* disable USART */ + USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); + USART_CTL2(usart_periph) |= USART_CTL2_DDRE; +} + +/*! + \brief enable DMA on reception error + \param[in] usart_periph: USARTx(x=0,1) + \param[out] none + \retval none +*/ +void usart_reception_error_dma_enable(uint32_t usart_periph) +{ + /* disable USART */ + USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); + USART_CTL2(usart_periph) &= ~(USART_CTL2_DDRE); +} + +/*! + \brief USART be able to wake up the MCU from deep-sleep mode + \param[in] usart_periph: USARTx(x=0) + \param[out] none + \retval none +*/ +void usart_wakeup_enable(uint32_t usart_periph) +{ + USART_CTL0(usart_periph) |= USART_CTL0_UESM; +} + +/*! + \brief USART be not able to wake up the MCU from deep-sleep mode + \param[in] usart_periph: USARTx(x=0) + \param[out] none + \retval none +*/ +void usart_wakeup_disable(uint32_t usart_periph) +{ + USART_CTL0(usart_periph) &= ~(USART_CTL0_UESM); +} + +/*! + \brief wakeup mode from deep-sleep mode + \param[in] usart_periph: USARTx(x=0) + \param[in] wum: wakeup mode + \arg USART_WUM_ADDR: WUF active on address match + \arg USART_WUM_STARTB: WUF active on start bit + \arg USART_WUM_RBNE: WUF active on RBNE + \param[out] none + \retval none +*/ +void usart_wakeup_mode_config(uint32_t usart_periph, uint32_t wum) +{ + /* disable USART */ + USART_CTL0(usart_periph) &= ~(USART_CTL0_UEN); + /* reset WUM bit */ + USART_CTL2(usart_periph) &= ~(USART_CTL2_WUM); + USART_CTL2(usart_periph) |= (USART_CTL2_WUM & (wum)); +} + +/*! + \brief get flag in STAT register + \param[in] usart_periph: USARTx(x=0,1) + \param[in] flag: flag type + \arg USART_FLAG_PERR: parity error flag + \arg USART_FLAG_FERR: frame error flag + \arg USART_FLAG_NERR: noise error flag + \arg USART_FLAG_ORERR: overrun error + \arg USART_FLAG_IDLE: idle line detected flag + \arg USART_FLAG_RBNE: read data buffer not empty + \arg USART_FLAG_TC: transmission completed + \arg USART_FLAG_TBE: transmit data register empty + \arg USART_FLAG_LBD: LIN break detected flag + \arg USART_FLAG_CTSF: CTS change flag + \arg USART_FLAG_CTS: CTS level + \arg USART_FLAG_RT: receiver timeout flag + \arg USART_FLAG_EB: end of block flag + \arg USART_FLAG_ABDE: auto baudrate detection error + \arg USART_FLAG_ABD: auto baudrate detection flag + \arg USART_FLAG_BSY: busy flag + \arg USART_FLAG_AM: address match flag + \arg USART_FLAG_SB: send break flag + \arg USART_FLAG_RWU: receiver wakeup from mute mode. + \arg USART_FLAG_WU: wakeup from deep-sleep mode flag + \arg USART_FLAG_TEA: transmit enable acknowledge flag + \arg USART_FLAG_REA: receive enable acknowledge flag + \param[out] none + \retval FlagStatus: SET or RESET +*/ +FlagStatus usart_flag_get(uint32_t usart_periph, usart_flag_enum flag) +{ + if(RESET != (USART_REG_VAL(usart_periph, flag) & BIT(USART_BIT_POS(flag)))){ + return SET; + }else{ + return RESET; + } +} + +/*! + \brief clear USART status + \param[in] usart_periph: USARTx(x=0,1) + \param[in] flag: flag type + \arg USART_FLAG_PERR: parity error flag + \arg USART_FLAG_FERR: frame error flag + \arg USART_FLAG_NERR: noise detected flag + \arg USART_FLAG_ORERR:overrun error flag + \arg USART_FLAG_IDLE: idle line detected flag + \arg USART_FLAG_TC: transmission complete flag + \arg USART_FLAG_LBD: LIN break detected flag + \arg USART_FLAG_CTSF: CTS change flag + \arg USART_FLAG_RT: receiver timeout flag + \arg USART_FLAG_EB: end of block flag + \arg USART_FLAG_AM: address match flag + \arg USART_FLAG_WU: wakeup from deep-sleep mode flag + \param[out] none + \retval none +*/ +void usart_flag_clear(uint32_t usart_periph, usart_flag_enum flag) +{ + USART_INTC(usart_periph) |= BIT(USART_BIT_POS(flag)); +} + +/*! + \brief enable USART interrupt + \param[in] usart_periph: USARTx(x=0,1) + \param[in] inttype: interrupt type + \arg USART_INT_IDLE: idle interrupt + \arg USART_INT_RBNE: read data buffer not empty interrupt and + overrun error interrupt enable interrupt + \arg USART_INT_TC: transmission complete interrupt + \arg USART_INT_TBE: transmit data register empty interrupt + \arg USART_INT_PERR: parity error interrupt + \arg USART_INT_AM: address match interrupt + \arg USART_INT_RT: receiver timeout interrupt + \arg USART_INT_EB: end of block interrupt + \arg USART_INT_LBD: LIN break detection interrupt + \arg USART_INT_ERR: error interrupt enable in multibuffer communication + \arg USART_INT_CTS: CTS interrupt + \arg USART_INT_WU: wakeup from deep-sleep mode interrupt + \param[out] none + \retval none +*/ +void usart_interrupt_enable(uint32_t usart_periph, uint32_t inttype) +{ + USART_REG_VAL(usart_periph, inttype) |= BIT(USART_BIT_POS(inttype)); +} + +/*! + \brief disable USART interrupt + \param[in] usart_periph: USARTx(x=0,1) + \param[in] inttype: interrupt type + \arg USART_INT_IDLE: idle interrupt + \arg USART_INT_RBNE: read data buffer not empty interrupt and + overrun error interrupt + \arg USART_INT_TC: transmission complete interrupt + \arg USART_INT_TBE: transmit data register empty interrupt + \arg USART_INT_PERR: parity error interrupt + \arg USART_INT_AM: address match interrupt + \arg USART_INT_RT: receiver timeout interrupt + \arg USART_INT_EB: end of block interrupt + \arg USART_INT_LBD: LIN break detection interrupt + \arg USART_INT_ERR: error interrupt enable in multibuffer communication + \arg USART_INT_CTS: CTS interrupt + \arg USART_INT_WU: wakeup from deep-sleep mode interrupt + \param[out] none + \retval none +*/ +void usart_interrupt_disable(uint32_t usart_periph, uint32_t inttype) +{ + USART_REG_VAL(usart_periph, inttype) &= ~BIT(USART_BIT_POS(inttype)); +} + +/*! + \brief enable USART command + \param[in] usart_periph: USARTx(x=0,1) + \param[in] cmdtype: command type + \arg USART_CMD_ABDCMD: auto baudrate detection command + \arg USART_CMD_SBKCMD: send break command + \arg USART_CMD_MMCMD: mute mode command + \arg USART_CMD_RXFCMD: receive data flush command + \arg USART_CMD_TXFCMD: transmit data flush request + \param[out] none + \retval none +*/ +void usart_command_enable(uint32_t usart_periph, uint32_t cmdtype) +{ + USART_CMD(usart_periph) |= (cmdtype); +} + +/*! + \brief get USART interrupt and flag status + \param[in] usart_periph: USARTx(x=0,1) + \param[in] int_flag: interrupt and flag type, refer to usart_interrupt_flag_enum + \arg USART_INT_FLAG_EB: end of block interrupt and flag + \arg USART_INT_FLAG_RT: receiver timeout interrupt and flag + \arg USART_INT_FLAG_AM: address match interrupt and flag + \arg USART_INT_FLAG_PERR: parity error interrupt and flag + \arg USART_INT_FLAG_TBE: transmitter buffer empty interrupt and flag + \arg USART_INT_FLAG_TC: transmission complete interrupt and flag + \arg USART_INT_FLAG_RBNE: read data buffer not empty interrupt and flag + \arg USART_INT_FLAG_RBNE_ORERR: read data buffer not empty interrupt and overrun error flag + \arg USART_INT_FLAG_IDLE: IDLE line detected interrupt and flag + \arg USART_INT_FLAG_LBD: LIN break detected interrupt and flag + \arg USART_INT_FLAG_WU: wakeup from deep-sleep mode interrupt and flag + \arg USART_INT_FLAG_CTS: CTS interrupt and flag + \arg USART_INT_FLAG_ERR_NERR: error interrupt and noise error flag + \arg USART_INT_FLAG_ERR_ORERR: error interrupt and overrun error + \arg USART_INT_FLAG_ERR_FERR: error interrupt and frame error flag + \param[out] none + \retval FlagStatus: SET or RESET +*/ +FlagStatus usart_interrupt_flag_get(uint32_t usart_periph, uint32_t int_flag) +{ + uint32_t intenable = 0U, flagstatus = 0U; + /* get the interrupt enable bit status */ + intenable = (USART_REG_VAL(usart_periph, int_flag) & BIT(USART_BIT_POS(int_flag))); + /* get the corresponding flag bit status */ + flagstatus = (USART_REG_VAL2(usart_periph, int_flag) & BIT(USART_BIT_POS2(int_flag))); + + if(flagstatus && intenable){ + return SET; + }else{ + return RESET; + } +} + +/*! + \brief clear USART interrupt flag in STAT register + \param[in] usart_periph: USARTx(x=0,1) + \param[in] flag: USART interrupt flag + \arg USART_INT_FLAG_PERR: parity error flag + \arg USART_INT_FLAG_FERR: frame error flag + \arg USART_INT_FLAG_NERR: noise detected flag + \arg USART_INT_FLAG_ORERR:overrun error flag + \arg USART_INT_FLAG_IDLE: idle line detected flag + \arg USART_INT_FLAG_TC: transmission complete flag + \arg USART_INT_FLAG_LBD: LIN break detected flag + \arg USART_INT_FLAG_CTS: CTS change flag + \arg USART_INT_FLAG_RT: receiver timeout flag + \arg USART_INT_FLAG_EB: end of block flag + \arg USART_INT_FLAG_AM: address match flag + \arg USART_INT_FLAG_WU: wakeup from deep-sleep mode flag + \param[out] none + \retval none +*/ +void usart_interrupt_flag_clear(uint32_t usart_periph, uint32_t flag) +{ + USART_INTC(usart_periph) |= BIT(USART_BIT_POS2(flag)); +} diff --git a/HoverBoardGigaDevice/RTE/Device/GD32F130C8/gd32f1x0_wwdgt.c b/HUGS/RTE/Device/GD32F130C8/gd32f1x0_wwdgt.c similarity index 96% rename from HoverBoardGigaDevice/RTE/Device/GD32F130C8/gd32f1x0_wwdgt.c rename to HUGS/RTE/Device/GD32F130C8/gd32f1x0_wwdgt.c index 2d45da1a..7a762cc2 100644 --- a/HoverBoardGigaDevice/RTE/Device/GD32F130C8/gd32f1x0_wwdgt.c +++ b/HUGS/RTE/Device/GD32F130C8/gd32f1x0_wwdgt.c @@ -1,121 +1,121 @@ -/*! - \file gd32f1x0_wwdgt.c - \brief WWDGT driver -*/ - -/* - Copyright (C) 2017 GigaDevice - - 2014-12-26, V1.0.0, platform GD32F1x0(x=3,5) - 2016-01-15, V2.0.0, platform GD32F1x0(x=3,5,7,9) - 2016-04-30, V3.0.0, firmware update for GD32F1x0(x=3,5,7,9) - 2017-06-19, V3.1.0, firmware update for GD32F1x0(x=3,5,7,9) -*/ - -#include "gd32f1x0_wwdgt.h" -#include "gd32f1x0_rcu.h" - -/*! - \brief reset the window watchdog timer configuration - \param[in] none - \param[out] none - \retval none -*/ -void wwdgt_deinit(void) -{ - rcu_periph_reset_enable(RCU_WWDGTRST); - rcu_periph_reset_disable(RCU_WWDGTRST); -} - -/*! - \brief configure the window watchdog timer counter value - \param[in] counter_value: 0x00 - 0x7F - \param[out] none - \retval none -*/ -void wwdgt_counter_update(uint16_t counter_value) -{ - uint32_t reg = 0U; - - reg = WWDGT_CTL & (~WWDGT_CTL_CNT); - reg |= (uint32_t)(CTL_CNT((uint32_t)counter_value)); - - WWDGT_CTL = (uint32_t)reg; -} - -/*! - \brief start the window watchdog timer counter - \param[in] none - \param[out] none - \retval none -*/ -void wwdgt_enable(void) -{ - WWDGT_CTL |= WWDGT_CTL_WDGTEN; -} - -/*! - \brief configure counter value, window value, and prescaler divider value - \param[in] counter: 0x00 - 0x7F - \param[in] window: 0x00 - 0x7F - \param[in] prescaler: wwdgt prescaler value - \arg WWDGT_CFG_PSC_DIV1: the time base of window watchdog counter = (PCLK1/4096)/1 - \arg WWDGT_CFG_PSC_DIV2: the time base of window watchdog counter = (PCLK1/4096)/2 - \arg WWDGT_CFG_PSC_DIV4: the time base of window watchdog counter = (PCLK1/4096)/4 - \arg WWDGT_CFG_PSC_DIV8: the time base of window watchdog counter = (PCLK1/4096)/8 - \param[out] none - \retval none -*/ -void wwdgt_config(uint16_t counter, uint16_t window, uint32_t prescaler) -{ - uint32_t reg_cfg = 0U, reg_ctl = 0U; - - /* clear WIN and PSC bits, clear CNT bit */ - reg_cfg = WWDGT_CFG &(~(WWDGT_CFG_WIN | WWDGT_CFG_PSC)); - reg_ctl = WWDGT_CTL &(~(uint32_t)WWDGT_CTL_CNT); - - /* configure WIN and PSC bits, configure CNT bit */ - reg_cfg |= (uint32_t)(CFG_WIN(window)); - reg_cfg |= (uint32_t)(prescaler); - reg_ctl |= (uint32_t)(CTL_CNT(counter)); - - WWDGT_CFG = (uint32_t)reg_cfg; - WWDGT_CTL = (uint32_t)reg_ctl; -} - -/*! - \brief enable early wakeup interrupt of WWDGT - \param[in] none - \param[out] none - \retval none -*/ -void wwdgt_interrupt_enable(void) -{ - WWDGT_CFG |= WWDGT_CFG_EWIE; -} - -/*! - \brief check early wakeup interrupt state of WWDGT - \param[in] none - \param[out] none - \retval FlagStatus: SET or RESET -*/ -FlagStatus wwdgt_flag_get(void) -{ - if(WWDGT_STAT & WWDGT_STAT_EWIF){ - return SET; - } - - return RESET; -} - -/*! - \brief clear early wakeup interrupt state of WWDGT - \param[in] none - \param[out] none - \retval none -*/ -void wwdgt_flag_clear(void) -{ - WWDGT_STAT &= (uint32_t)(~(uint32_t)WWDGT_STAT_EWIF); -} +/*! + \file gd32f1x0_wwdgt.c + \brief WWDGT driver +*/ + +/* + Copyright (C) 2017 GigaDevice + + 2014-12-26, V1.0.0, platform GD32F1x0(x=3,5) + 2016-01-15, V2.0.0, platform GD32F1x0(x=3,5,7,9) + 2016-04-30, V3.0.0, firmware update for GD32F1x0(x=3,5,7,9) + 2017-06-19, V3.1.0, firmware update for GD32F1x0(x=3,5,7,9) +*/ + +#include "gd32f1x0_wwdgt.h" +#include "gd32f1x0_rcu.h" + +/*! + \brief reset the window watchdog timer configuration + \param[in] none + \param[out] none + \retval none +*/ +void wwdgt_deinit(void) +{ + rcu_periph_reset_enable(RCU_WWDGTRST); + rcu_periph_reset_disable(RCU_WWDGTRST); +} + +/*! + \brief configure the window watchdog timer counter value + \param[in] counter_value: 0x00 - 0x7F + \param[out] none + \retval none +*/ +void wwdgt_counter_update(uint16_t counter_value) +{ + uint32_t reg = 0U; + + reg = WWDGT_CTL & (~WWDGT_CTL_CNT); + reg |= (uint32_t)(CTL_CNT((uint32_t)counter_value)); + + WWDGT_CTL = (uint32_t)reg; +} + +/*! + \brief start the window watchdog timer counter + \param[in] none + \param[out] none + \retval none +*/ +void wwdgt_enable(void) +{ + WWDGT_CTL |= WWDGT_CTL_WDGTEN; +} + +/*! + \brief configure counter value, window value, and prescaler divider value + \param[in] counter: 0x00 - 0x7F + \param[in] window: 0x00 - 0x7F + \param[in] prescaler: wwdgt prescaler value + \arg WWDGT_CFG_PSC_DIV1: the time base of window watchdog counter = (PCLK1/4096)/1 + \arg WWDGT_CFG_PSC_DIV2: the time base of window watchdog counter = (PCLK1/4096)/2 + \arg WWDGT_CFG_PSC_DIV4: the time base of window watchdog counter = (PCLK1/4096)/4 + \arg WWDGT_CFG_PSC_DIV8: the time base of window watchdog counter = (PCLK1/4096)/8 + \param[out] none + \retval none +*/ +void wwdgt_config(uint16_t counter, uint16_t window, uint32_t prescaler) +{ + uint32_t reg_cfg = 0U, reg_ctl = 0U; + + /* clear WIN and PSC bits, clear CNT bit */ + reg_cfg = WWDGT_CFG &(~(WWDGT_CFG_WIN | WWDGT_CFG_PSC)); + reg_ctl = WWDGT_CTL &(~(uint32_t)WWDGT_CTL_CNT); + + /* configure WIN and PSC bits, configure CNT bit */ + reg_cfg |= (uint32_t)(CFG_WIN(window)); + reg_cfg |= (uint32_t)(prescaler); + reg_ctl |= (uint32_t)(CTL_CNT(counter)); + + WWDGT_CFG = (uint32_t)reg_cfg; + WWDGT_CTL = (uint32_t)reg_ctl; +} + +/*! + \brief enable early wakeup interrupt of WWDGT + \param[in] none + \param[out] none + \retval none +*/ +void wwdgt_interrupt_enable(void) +{ + WWDGT_CFG |= WWDGT_CFG_EWIE; +} + +/*! + \brief check early wakeup interrupt state of WWDGT + \param[in] none + \param[out] none + \retval FlagStatus: SET or RESET +*/ +FlagStatus wwdgt_flag_get(void) +{ + if(WWDGT_STAT & WWDGT_STAT_EWIF){ + return SET; + } + + return RESET; +} + +/*! + \brief clear early wakeup interrupt state of WWDGT + \param[in] none + \param[out] none + \retval none +*/ +void wwdgt_flag_clear(void) +{ + WWDGT_STAT &= (uint32_t)(~(uint32_t)WWDGT_STAT_EWIF); +} diff --git a/HoverBoardGigaDevice/RTE/Device/GD32F130C8/startup_gd32f1x0.s b/HUGS/RTE/Device/GD32F130C8/startup_gd32f1x0.s similarity index 97% rename from HoverBoardGigaDevice/RTE/Device/GD32F130C8/startup_gd32f1x0.s rename to HUGS/RTE/Device/GD32F130C8/startup_gd32f1x0.s index 3118ed3e..21422d0d 100644 --- a/HoverBoardGigaDevice/RTE/Device/GD32F130C8/startup_gd32f1x0.s +++ b/HUGS/RTE/Device/GD32F130C8/startup_gd32f1x0.s @@ -1,328 +1,328 @@ -;/*! -; \file startup_gd32f1x0.s -; \brief start up file -;*/ - -;/* -; Copyright (C) 2017 GigaDevice - -; 2014-12-26, V1.0.0, firmware for GD32F1x0(x=3,5) -; 2016-01-15, V2.0.0, firmware for GD32F1x0(x=3,5,7,9) -; 2016-04-30, V3.0.0, firmware update for GD32F1x0(x=3,5,7,9) -; 2017-06-19, V3.1.0, firmware update for GD32F1x0(x=3,5,7,9) -;*/ - -; Stack Configuration -; Stack Size (in Bytes) <0x0-0xFFFFFFFF:8> -; - -Stack_Size EQU 0x00000400 - - AREA STACK, NOINIT, READWRITE, ALIGN=3 -Stack_Mem SPACE Stack_Size -__initial_sp - - -; Heap Configuration -; Heap Size (in Bytes) <0x0-0xFFFFFFFF:8> -; - -Heap_Size EQU 0x00000400 - - AREA HEAP, NOINIT, READWRITE, ALIGN=3 -__heap_base -Heap_Mem SPACE Heap_Size -__heap_limit - - PRESERVE8 - THUMB - -; /* reset Vector Mapped to at Address 0 */ - AREA RESET, DATA, READONLY - EXPORT __Vectors - EXPORT __Vectors_End - EXPORT __Vectors_Size - -__Vectors DCD __initial_sp ; Top of Stack - DCD Reset_Handler ; Reset Handler - DCD NMI_Handler ; NMI Handler - DCD HardFault_Handler ; Hard Fault Handler - DCD MemManage_Handler ; MPU Fault Handler - DCD BusFault_Handler ; Bus Fault Handler - DCD UsageFault_Handler ; Usage Fault Handler - DCD 0 ; Reserved - DCD 0 ; Reserved - DCD 0 ; Reserved - DCD 0 ; Reserved - DCD SVC_Handler ; SVCall Handler - DCD DebugMon_Handler ; Debug Monitor Handler - DCD 0 ; Reserved - DCD PendSV_Handler ; PendSV Handler - DCD SysTick_Handler ; SysTick Handler - -; /* external interrupts handler */ - DCD WWDGT_IRQHandler ; 16:Window Watchdog Timer - DCD LVD_IRQHandler ; 17:LVD through EXTI Line detect - DCD RTC_IRQHandler ; 18:RTC through EXTI Line - DCD FMC_IRQHandler ; 19:FMC - DCD RCU_IRQHandler ; 20:RCU - DCD EXTI0_1_IRQHandler ; 21:EXTI Line 0 and EXTI Line 1 - DCD EXTI2_3_IRQHandler ; 22:EXTI Line 2 and EXTI Line 3 - DCD EXTI4_15_IRQHandler ; 23:EXTI Line 4 to EXTI Line 15 - DCD TSI_IRQHandler ; 24:TSI - DCD DMA_Channel0_IRQHandler ; 25:DMA Channel 0 - DCD DMA_Channel1_2_IRQHandler ; 26:DMA Channel 1 and DMA Channel 2 - DCD DMA_Channel3_4_IRQHandler ; 27:DMA Channel 3 and DMA Channel 4 - DCD ADC_CMP_IRQHandler ; 28:ADC and Comparator 0-1 - DCD TIMER0_BRK_UP_TRG_COM_IRQHandler ; 29:TIMER0 Break,Update,Trigger and Commutation - DCD TIMER0_Channel_IRQHandler ; 30:TIMER0 Channel - DCD TIMER1_IRQHandler ; 31:TIMER1 - DCD TIMER2_IRQHandler ; 32:TIMER2 - DCD TIMER5_DAC_IRQHandler ; 33:TIMER5 and DAC - DCD 0 ; Reserved - DCD TIMER13_IRQHandler ; 35:TIMER13 - DCD TIMER14_IRQHandler ; 36:TIMER14 - DCD TIMER15_IRQHandler ; 37:TIMER15 - DCD TIMER16_IRQHandler ; 38:TIMER16 - DCD I2C0_EV_IRQHandler ; 39:I2C0 Event - DCD I2C1_EV_IRQHandler ; 40:I2C1 Event - DCD SPI0_IRQHandler ; 41:SPI0 - DCD SPI1_IRQHandler ; 42:SPI1 - DCD USART0_IRQHandler ; 43:USART0 - DCD USART1_IRQHandler ; 44:USART1 - DCD 0 ; Reserved - DCD CEC_IRQHandler ; 46:CEC - DCD 0 ; Reserved - DCD I2C0_ER_IRQHandler ; 48:I2C0 Error - DCD 0 ; Reserved - DCD I2C1_ER_IRQHandler ; 50:I2C1 Error - DCD I2C2_EV_IRQHandler ; 51:I2C2 Event - DCD I2C2_ER_IRQHandler ; 52:I2C2 Error - DCD USBD_LP_IRQHandler ; 53:USBD LP - DCD USBD_HP_IRQHandler ; 54:USBD HP - DCD 0 ; Reserved - DCD 0 ; Reserved - DCD 0 ; Reserved - DCD USBDWakeUp_IRQHandler ; 58:USBD Wakeup - DCD CAN0_TX_IRQHandler ; 59:CAN0 TX - DCD CAN0_RX0_IRQHandler ; 60:CAN0 RX0 - DCD CAN0_RX1_IRQHandler ; 61:CAN0 RX1 - DCD CAN0_SCE_IRQHandler ; 62:CAN0 SCE - DCD SLCD_IRQHandler ; 63:SLCD - DCD DMA_Channel5_6_IRQHandler ; 64:DMA Channel5 and Channel6 - DCD 0 ; Reserved - DCD 0 ; Reserved - DCD SPI2_IRQHandler ; 67:SPI2 - DCD 0 ; Reserved - DCD 0 ; Reserved - DCD 0 ; Reserved - DCD 0 ; Reserved - DCD 0 ; Reserved - DCD 0 ; Reserved - DCD 0 ; Reserved - DCD 0 ; Reserved - DCD 0 ; Reserved - DCD 0 ; Reserved - DCD 0 ; Reserved - DCD 0 ; Reserved - DCD 0 ; Reserved - DCD 0 ; Reserved - DCD 0 ; Reserved - DCD 0 ; Reserved - DCD 0 ; Reserved - DCD 0 ; Reserved - DCD CAN1_TX_IRQHandler ; 86:CAN1 TX - DCD CAN1_RX0_IRQHandler ; 87:CAN1 RX0 - DCD CAN1_RX1_IRQHandler ; 88:CAN1 RX1 - DCD CAN1_SCE_IRQHandler ; 89:CAN1 SCE -__Vectors_End - -__Vectors_Size EQU __Vectors_End - __Vectors - - AREA |.text|, CODE, READONLY - -;/* reset Handler */ -Reset_Handler PROC - EXPORT Reset_Handler [WEAK] - IMPORT SystemInit - IMPORT __main - LDR R0, =SystemInit - BLX R0 - LDR R0, =__main - BX R0 - ENDP - -;/* dummy Exception Handlers */ -NMI_Handler PROC - EXPORT NMI_Handler [WEAK] - B . - ENDP -HardFault_Handler\ - PROC - EXPORT HardFault_Handler [WEAK] - B . - ENDP -MemManage_Handler\ - PROC - EXPORT MemManage_Handler [WEAK] - B . - ENDP -BusFault_Handler\ - PROC - EXPORT BusFault_Handler [WEAK] - B . - ENDP -UsageFault_Handler\ - PROC - EXPORT UsageFault_Handler [WEAK] - B . - ENDP -SVC_Handler PROC - EXPORT SVC_Handler [WEAK] - B . - ENDP -DebugMon_Handler\ - PROC - EXPORT DebugMon_Handler [WEAK] - B . - ENDP -PendSV_Handler\ - PROC - EXPORT PendSV_Handler [WEAK] - B . - ENDP -SysTick_Handler\ - PROC - EXPORT SysTick_Handler [WEAK] - B . - ENDP - -Default_Handler PROC -; /* external interrupts handler */ - EXPORT WWDGT_IRQHandler [WEAK] - EXPORT LVD_IRQHandler [WEAK] - EXPORT RTC_IRQHandler [WEAK] - EXPORT FMC_IRQHandler [WEAK] - EXPORT RCU_IRQHandler [WEAK] - EXPORT EXTI0_1_IRQHandler [WEAK] - EXPORT EXTI2_3_IRQHandler [WEAK] - EXPORT EXTI4_15_IRQHandler [WEAK] - EXPORT TSI_IRQHandler [WEAK] - EXPORT DMA_Channel0_IRQHandler [WEAK] - EXPORT DMA_Channel1_2_IRQHandler [WEAK] - EXPORT DMA_Channel3_4_IRQHandler [WEAK] - EXPORT ADC_CMP_IRQHandler [WEAK] - EXPORT TIMER0_BRK_UP_TRG_COM_IRQHandler [WEAK] - EXPORT TIMER0_Channel_IRQHandler [WEAK] - EXPORT TIMER1_IRQHandler [WEAK] - EXPORT TIMER2_IRQHandler [WEAK] - EXPORT TIMER5_DAC_IRQHandler [WEAK] - EXPORT TIMER13_IRQHandler [WEAK] - EXPORT TIMER14_IRQHandler [WEAK] - EXPORT TIMER15_IRQHandler [WEAK] - EXPORT TIMER16_IRQHandler [WEAK] - EXPORT I2C0_EV_IRQHandler [WEAK] - EXPORT I2C1_EV_IRQHandler [WEAK] - EXPORT SPI0_IRQHandler [WEAK] - EXPORT SPI1_IRQHandler [WEAK] - EXPORT USART0_IRQHandler [WEAK] - EXPORT USART1_IRQHandler [WEAK] - EXPORT CEC_IRQHandler [WEAK] - EXPORT I2C0_ER_IRQHandler [WEAK] - EXPORT I2C1_ER_IRQHandler [WEAK] - EXPORT I2C2_EV_IRQHandler [WEAK] - EXPORT I2C2_ER_IRQHandler [WEAK] - EXPORT USBD_LP_IRQHandler [WEAK] - EXPORT USBD_HP_IRQHandler [WEAK] - EXPORT USBDWakeUp_IRQHandler [WEAK] - EXPORT CAN0_TX_IRQHandler [WEAK] - EXPORT CAN0_RX0_IRQHandler [WEAK] - EXPORT CAN0_RX1_IRQHandler [WEAK] - EXPORT CAN0_SCE_IRQHandler [WEAK] - EXPORT SLCD_IRQHandler [WEAK] - EXPORT DMA_Channel5_6_IRQHandler [WEAK] - EXPORT SPI2_IRQHandler [WEAK] - EXPORT CAN1_TX_IRQHandler [WEAK] - EXPORT CAN1_RX0_IRQHandler [WEAK] - EXPORT CAN1_RX1_IRQHandler [WEAK] - EXPORT CAN1_SCE_IRQHandler [WEAK] - -;/* external interrupts handler */ -WWDGT_IRQHandler -LVD_IRQHandler -RTC_IRQHandler -FMC_IRQHandler -RCU_IRQHandler -EXTI0_1_IRQHandler -EXTI2_3_IRQHandler -EXTI4_15_IRQHandler -TSI_IRQHandler -DMA_Channel0_IRQHandler -DMA_Channel1_2_IRQHandler -DMA_Channel3_4_IRQHandler -ADC_CMP_IRQHandler -TIMER0_BRK_UP_TRG_COM_IRQHandler -TIMER0_Channel_IRQHandler -TIMER1_IRQHandler -TIMER2_IRQHandler -TIMER5_DAC_IRQHandler -TIMER13_IRQHandler -TIMER14_IRQHandler -TIMER15_IRQHandler -TIMER16_IRQHandler -I2C0_EV_IRQHandler -I2C1_EV_IRQHandler -SPI0_IRQHandler -SPI1_IRQHandler -USART0_IRQHandler -USART1_IRQHandler -CEC_IRQHandler -I2C0_ER_IRQHandler -I2C1_ER_IRQHandler -I2C2_EV_IRQHandler -I2C2_ER_IRQHandler -USBD_LP_IRQHandler -USBD_HP_IRQHandler -USBDWakeUp_IRQHandler -CAN0_TX_IRQHandler -CAN0_RX0_IRQHandler -CAN0_RX1_IRQHandler -CAN0_SCE_IRQHandler -SLCD_IRQHandler -DMA_Channel5_6_IRQHandler -SPI2_IRQHandler -CAN1_TX_IRQHandler -CAN1_RX0_IRQHandler -CAN1_RX1_IRQHandler -CAN1_SCE_IRQHandler - B . - ENDP - - ALIGN - -; user Initial Stack & Heap - - IF :DEF:__MICROLIB - - EXPORT __initial_sp - EXPORT __heap_base - EXPORT __heap_limit - - ELSE - - IMPORT __use_two_region_memory - EXPORT __user_initial_stackheap - -__user_initial_stackheap PROC - LDR R0, = Heap_Mem - LDR R1, =(Stack_Mem + Stack_Size) - LDR R2, = (Heap_Mem + Heap_Size) - LDR R3, = Stack_Mem - BX LR - ENDP - - ALIGN - - ENDIF - - END +;/*! +; \file startup_gd32f1x0.s +; \brief start up file +;*/ + +;/* +; Copyright (C) 2017 GigaDevice + +; 2014-12-26, V1.0.0, firmware for GD32F1x0(x=3,5) +; 2016-01-15, V2.0.0, firmware for GD32F1x0(x=3,5,7,9) +; 2016-04-30, V3.0.0, firmware update for GD32F1x0(x=3,5,7,9) +; 2017-06-19, V3.1.0, firmware update for GD32F1x0(x=3,5,7,9) +;*/ + +; Stack Configuration +; Stack Size (in Bytes) <0x0-0xFFFFFFFF:8> +; + +Stack_Size EQU 0x00000400 + + AREA STACK, NOINIT, READWRITE, ALIGN=3 +Stack_Mem SPACE Stack_Size +__initial_sp + + +; Heap Configuration +; Heap Size (in Bytes) <0x0-0xFFFFFFFF:8> +; + +Heap_Size EQU 0x00000400 + + AREA HEAP, NOINIT, READWRITE, ALIGN=3 +__heap_base +Heap_Mem SPACE Heap_Size +__heap_limit + + PRESERVE8 + THUMB + +; /* reset Vector Mapped to at Address 0 */ + AREA RESET, DATA, READONLY + EXPORT __Vectors + EXPORT __Vectors_End + EXPORT __Vectors_Size + +__Vectors DCD __initial_sp ; Top of Stack + DCD Reset_Handler ; Reset Handler + DCD NMI_Handler ; NMI Handler + DCD HardFault_Handler ; Hard Fault Handler + DCD MemManage_Handler ; MPU Fault Handler + DCD BusFault_Handler ; Bus Fault Handler + DCD UsageFault_Handler ; Usage Fault Handler + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD SVC_Handler ; SVCall Handler + DCD DebugMon_Handler ; Debug Monitor Handler + DCD 0 ; Reserved + DCD PendSV_Handler ; PendSV Handler + DCD SysTick_Handler ; SysTick Handler + +; /* external interrupts handler */ + DCD WWDGT_IRQHandler ; 16:Window Watchdog Timer + DCD LVD_IRQHandler ; 17:LVD through EXTI Line detect + DCD RTC_IRQHandler ; 18:RTC through EXTI Line + DCD FMC_IRQHandler ; 19:FMC + DCD RCU_IRQHandler ; 20:RCU + DCD EXTI0_1_IRQHandler ; 21:EXTI Line 0 and EXTI Line 1 + DCD EXTI2_3_IRQHandler ; 22:EXTI Line 2 and EXTI Line 3 + DCD EXTI4_15_IRQHandler ; 23:EXTI Line 4 to EXTI Line 15 + DCD TSI_IRQHandler ; 24:TSI + DCD DMA_Channel0_IRQHandler ; 25:DMA Channel 0 + DCD DMA_Channel1_2_IRQHandler ; 26:DMA Channel 1 and DMA Channel 2 + DCD DMA_Channel3_4_IRQHandler ; 27:DMA Channel 3 and DMA Channel 4 + DCD ADC_CMP_IRQHandler ; 28:ADC and Comparator 0-1 + DCD TIMER0_BRK_UP_TRG_COM_IRQHandler ; 29:TIMER0 Break,Update,Trigger and Commutation + DCD TIMER0_Channel_IRQHandler ; 30:TIMER0 Channel + DCD TIMER1_IRQHandler ; 31:TIMER1 + DCD TIMER2_IRQHandler ; 32:TIMER2 + DCD TIMER5_DAC_IRQHandler ; 33:TIMER5 and DAC + DCD 0 ; Reserved + DCD TIMER13_IRQHandler ; 35:TIMER13 + DCD TIMER14_IRQHandler ; 36:TIMER14 + DCD TIMER15_IRQHandler ; 37:TIMER15 + DCD TIMER16_IRQHandler ; 38:TIMER16 + DCD I2C0_EV_IRQHandler ; 39:I2C0 Event + DCD I2C1_EV_IRQHandler ; 40:I2C1 Event + DCD SPI0_IRQHandler ; 41:SPI0 + DCD SPI1_IRQHandler ; 42:SPI1 + DCD USART0_IRQHandler ; 43:USART0 + DCD USART1_IRQHandler ; 44:USART1 + DCD 0 ; Reserved + DCD CEC_IRQHandler ; 46:CEC + DCD 0 ; Reserved + DCD I2C0_ER_IRQHandler ; 48:I2C0 Error + DCD 0 ; Reserved + DCD I2C1_ER_IRQHandler ; 50:I2C1 Error + DCD I2C2_EV_IRQHandler ; 51:I2C2 Event + DCD I2C2_ER_IRQHandler ; 52:I2C2 Error + DCD USBD_LP_IRQHandler ; 53:USBD LP + DCD USBD_HP_IRQHandler ; 54:USBD HP + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD USBDWakeUp_IRQHandler ; 58:USBD Wakeup + DCD CAN0_TX_IRQHandler ; 59:CAN0 TX + DCD CAN0_RX0_IRQHandler ; 60:CAN0 RX0 + DCD CAN0_RX1_IRQHandler ; 61:CAN0 RX1 + DCD CAN0_SCE_IRQHandler ; 62:CAN0 SCE + DCD SLCD_IRQHandler ; 63:SLCD + DCD DMA_Channel5_6_IRQHandler ; 64:DMA Channel5 and Channel6 + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD SPI2_IRQHandler ; 67:SPI2 + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD CAN1_TX_IRQHandler ; 86:CAN1 TX + DCD CAN1_RX0_IRQHandler ; 87:CAN1 RX0 + DCD CAN1_RX1_IRQHandler ; 88:CAN1 RX1 + DCD CAN1_SCE_IRQHandler ; 89:CAN1 SCE +__Vectors_End + +__Vectors_Size EQU __Vectors_End - __Vectors + + AREA |.text|, CODE, READONLY + +;/* reset Handler */ +Reset_Handler PROC + EXPORT Reset_Handler [WEAK] + IMPORT SystemInit + IMPORT __main + LDR R0, =SystemInit + BLX R0 + LDR R0, =__main + BX R0 + ENDP + +;/* dummy Exception Handlers */ +NMI_Handler PROC + EXPORT NMI_Handler [WEAK] + B . + ENDP +HardFault_Handler\ + PROC + EXPORT HardFault_Handler [WEAK] + B . + ENDP +MemManage_Handler\ + PROC + EXPORT MemManage_Handler [WEAK] + B . + ENDP +BusFault_Handler\ + PROC + EXPORT BusFault_Handler [WEAK] + B . + ENDP +UsageFault_Handler\ + PROC + EXPORT UsageFault_Handler [WEAK] + B . + ENDP +SVC_Handler PROC + EXPORT SVC_Handler [WEAK] + B . + ENDP +DebugMon_Handler\ + PROC + EXPORT DebugMon_Handler [WEAK] + B . + ENDP +PendSV_Handler\ + PROC + EXPORT PendSV_Handler [WEAK] + B . + ENDP +SysTick_Handler\ + PROC + EXPORT SysTick_Handler [WEAK] + B . + ENDP + +Default_Handler PROC +; /* external interrupts handler */ + EXPORT WWDGT_IRQHandler [WEAK] + EXPORT LVD_IRQHandler [WEAK] + EXPORT RTC_IRQHandler [WEAK] + EXPORT FMC_IRQHandler [WEAK] + EXPORT RCU_IRQHandler [WEAK] + EXPORT EXTI0_1_IRQHandler [WEAK] + EXPORT EXTI2_3_IRQHandler [WEAK] + EXPORT EXTI4_15_IRQHandler [WEAK] + EXPORT TSI_IRQHandler [WEAK] + EXPORT DMA_Channel0_IRQHandler [WEAK] + EXPORT DMA_Channel1_2_IRQHandler [WEAK] + EXPORT DMA_Channel3_4_IRQHandler [WEAK] + EXPORT ADC_CMP_IRQHandler [WEAK] + EXPORT TIMER0_BRK_UP_TRG_COM_IRQHandler [WEAK] + EXPORT TIMER0_Channel_IRQHandler [WEAK] + EXPORT TIMER1_IRQHandler [WEAK] + EXPORT TIMER2_IRQHandler [WEAK] + EXPORT TIMER5_DAC_IRQHandler [WEAK] + EXPORT TIMER13_IRQHandler [WEAK] + EXPORT TIMER14_IRQHandler [WEAK] + EXPORT TIMER15_IRQHandler [WEAK] + EXPORT TIMER16_IRQHandler [WEAK] + EXPORT I2C0_EV_IRQHandler [WEAK] + EXPORT I2C1_EV_IRQHandler [WEAK] + EXPORT SPI0_IRQHandler [WEAK] + EXPORT SPI1_IRQHandler [WEAK] + EXPORT USART0_IRQHandler [WEAK] + EXPORT USART1_IRQHandler [WEAK] + EXPORT CEC_IRQHandler [WEAK] + EXPORT I2C0_ER_IRQHandler [WEAK] + EXPORT I2C1_ER_IRQHandler [WEAK] + EXPORT I2C2_EV_IRQHandler [WEAK] + EXPORT I2C2_ER_IRQHandler [WEAK] + EXPORT USBD_LP_IRQHandler [WEAK] + EXPORT USBD_HP_IRQHandler [WEAK] + EXPORT USBDWakeUp_IRQHandler [WEAK] + EXPORT CAN0_TX_IRQHandler [WEAK] + EXPORT CAN0_RX0_IRQHandler [WEAK] + EXPORT CAN0_RX1_IRQHandler [WEAK] + EXPORT CAN0_SCE_IRQHandler [WEAK] + EXPORT SLCD_IRQHandler [WEAK] + EXPORT DMA_Channel5_6_IRQHandler [WEAK] + EXPORT SPI2_IRQHandler [WEAK] + EXPORT CAN1_TX_IRQHandler [WEAK] + EXPORT CAN1_RX0_IRQHandler [WEAK] + EXPORT CAN1_RX1_IRQHandler [WEAK] + EXPORT CAN1_SCE_IRQHandler [WEAK] + +;/* external interrupts handler */ +WWDGT_IRQHandler +LVD_IRQHandler +RTC_IRQHandler +FMC_IRQHandler +RCU_IRQHandler +EXTI0_1_IRQHandler +EXTI2_3_IRQHandler +EXTI4_15_IRQHandler +TSI_IRQHandler +DMA_Channel0_IRQHandler +DMA_Channel1_2_IRQHandler +DMA_Channel3_4_IRQHandler +ADC_CMP_IRQHandler +TIMER0_BRK_UP_TRG_COM_IRQHandler +TIMER0_Channel_IRQHandler +TIMER1_IRQHandler +TIMER2_IRQHandler +TIMER5_DAC_IRQHandler +TIMER13_IRQHandler +TIMER14_IRQHandler +TIMER15_IRQHandler +TIMER16_IRQHandler +I2C0_EV_IRQHandler +I2C1_EV_IRQHandler +SPI0_IRQHandler +SPI1_IRQHandler +USART0_IRQHandler +USART1_IRQHandler +CEC_IRQHandler +I2C0_ER_IRQHandler +I2C1_ER_IRQHandler +I2C2_EV_IRQHandler +I2C2_ER_IRQHandler +USBD_LP_IRQHandler +USBD_HP_IRQHandler +USBDWakeUp_IRQHandler +CAN0_TX_IRQHandler +CAN0_RX0_IRQHandler +CAN0_RX1_IRQHandler +CAN0_SCE_IRQHandler +SLCD_IRQHandler +DMA_Channel5_6_IRQHandler +SPI2_IRQHandler +CAN1_TX_IRQHandler +CAN1_RX0_IRQHandler +CAN1_RX1_IRQHandler +CAN1_SCE_IRQHandler + B . + ENDP + + ALIGN + +; user Initial Stack & Heap + + IF :DEF:__MICROLIB + + EXPORT __initial_sp + EXPORT __heap_base + EXPORT __heap_limit + + ELSE + + IMPORT __use_two_region_memory + EXPORT __user_initial_stackheap + +__user_initial_stackheap PROC + LDR R0, = Heap_Mem + LDR R1, =(Stack_Mem + Stack_Size) + LDR R2, = (Heap_Mem + Heap_Size) + LDR R3, = Stack_Mem + BX LR + ENDP + + ALIGN + + ENDIF + + END diff --git a/HoverBoardGigaDevice/RTE/Device/GD32F130C8/system_gd32f1x0.c b/HUGS/RTE/Device/GD32F130C8/system_gd32f1x0.c similarity index 95% rename from HoverBoardGigaDevice/RTE/Device/GD32F130C8/system_gd32f1x0.c rename to HUGS/RTE/Device/GD32F130C8/system_gd32f1x0.c index 784a75da..586c9118 100644 --- a/HoverBoardGigaDevice/RTE/Device/GD32F130C8/system_gd32f1x0.c +++ b/HUGS/RTE/Device/GD32F130C8/system_gd32f1x0.c @@ -1,333 +1,333 @@ -/*! - \file system_gd32f1x0.c - \brief CMSIS Cortex-M3 Device Peripheral Access Layer Source File for - GD32F1x0 Device Series -*/ - -/* Copyright (c) 2012 ARM LIMITED - - All rights reserved. - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - Neither the name of ARM nor the names of its contributors may be used - to endorse or promote products derived from this software without - specific prior written permission. - * - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE - LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. - ---------------------------------------------------------------------------*/ - -/* This file refers the CMSIS standard, some adjustments are made according to GigaDevice chips */ - -#include "gd32f1x0.h" - -/* system frequency define */ -#define __IRC8M (IRC8M_VALUE) /* internal 8 MHz RC oscillator frequency */ -#define __HXTAL (HXTAL_VALUE) /* high speed crystal oscillator frequency */ -#define __SYS_OSC_CLK (__IRC8M) /* main oscillator frequency */ - -/* select a system clock by uncommenting the following line */ -//#define __SYSTEM_CLOCK_8M_HXTAL (__HXTAL) -//#define __SYSTEM_CLOCK_8M_IRC8M (__IRC8M) -//#define __SYSTEM_CLOCK_72M_PLL_HXTAL (uint32_t)(72000000) -#define __SYSTEM_CLOCK_72M_PLL_IRC8M_DIV2 (uint32_t)(72000000) - -#define SEL_IRC8M 0x00 -#define SEL_HXTAL 0x01 -#define SEL_PLL 0x02 - -/* set the system clock frequency and declare the system clock configuration function */ -#ifdef __SYSTEM_CLOCK_8M_HXTAL -uint32_t SystemCoreClock = __SYSTEM_CLOCK_8M_HXTAL; -static void system_clock_8m_hxtal(void); -#elif defined (__SYSTEM_CLOCK_72M_PLL_HXTAL) -uint32_t SystemCoreClock = __SYSTEM_CLOCK_72M_PLL_HXTAL; -static void system_clock_72m_hxtal(void); -#elif defined (__SYSTEM_CLOCK_72M_PLL_IRC8M_DIV2) -uint32_t SystemCoreClock = __SYSTEM_CLOCK_72M_PLL_IRC8M_DIV2; -static void system_clock_72m_irc8m(void); -#else -uint32_t SystemCoreClock = __SYSTEM_CLOCK_8M_IRC8M; -static void system_clock_8m_irc8m(void); -#endif /* __SYSTEM_CLOCK_8M_HXTAL */ - -/* configure the system clock */ -static void system_clock_config(void); - -/*! - \brief setup the microcontroller system, initialize the system - \param[in] none - \param[out] none - \retval none -*/ -void SystemInit (void) -{ - /* enable IRC8M */ - RCU_CTL0 |= RCU_CTL0_IRC8MEN; - while(0U == (RCU_CTL0 & RCU_CTL0_IRC8MSTB)){ - } - /* reset RCU */ -#ifdef GD32F130_150 - RCU_CFG0 &= ~(RCU_CFG0_SCS | RCU_CFG0_AHBPSC | RCU_CFG0_APB1PSC | RCU_CFG0_APB2PSC |\ - RCU_CFG0_ADCPSC | RCU_CFG0_CKOUTSEL | RCU_CFG0_CKOUTDIV | RCU_CFG0_PLLDV); -#elif defined (GD32F170_190) - RCU_CFG0 &= ~(RCU_CFG0_SCS | RCU_CFG0_AHBPSC | RCU_CFG0_APB1PSC | RCU_CFG0_APB2PSC |\ - RCU_CFG0_ADCPSC | RCU_CFG0_CKOUT0SEL | RCU_CFG0_CKOUT0DIV | RCU_CFG0_PLLDV); -#endif /* GD32F130_150 */ - RCU_CFG0 &= ~(RCU_CFG0_PLLSEL | RCU_CFG0_PLLMF | RCU_CFG0_PLLDV); -#ifdef GD32F130_150 - RCU_CFG0 &= ~(RCU_CFG0_USBDPSC); -#endif /* GD32F130_150 */ - RCU_CTL0 &= ~(RCU_CTL0_HXTALEN | RCU_CTL0_CKMEN | RCU_CTL0_PLLEN | RCU_CTL0_HXTALBPS); - RCU_CFG1 &= ~RCU_CFG1_HXTALPREDV; - RCU_CFG2 &= ~(RCU_CFG2_USART0SEL | RCU_CFG2_CECSEL | RCU_CFG2_ADCSEL); -#ifdef GD32F130_150 - RCU_CTL1 &= ~RCU_CTL1_IRC14MEN; -#elif defined (GD32F170_190) - RCU_CFG2 &= ~RCU_CFG2_IRC28MDIV; - RCU_CTL1 &= ~RCU_CTL1_IRC28MEN; - RCU_CFG3 &= ~RCU_CFG3_CKOUT1SRC; - RCU_CFG3 &= ~RCU_CFG3_CKOUT1DIV; -#endif /* GD32F130_150 */ - RCU_INT = 0x00000000U; - - /* configure system clock */ - system_clock_config(); -} - -/*! - \brief configure the system clock - \param[in] none - \param[out] none - \retval none -*/ -static void system_clock_config(void) -{ -#ifdef __SYSTEM_CLOCK_8M_HXTAL - system_clock_8m_hxtal(); -#elif defined (__SYSTEM_CLOCK_72M_PLL_HXTAL) - system_clock_72m_hxtal(); -#elif defined (__SYSTEM_CLOCK_72M_PLL_IRC8M_DIV2) - system_clock_72m_irc8m(); -#else - system_clock_8m_irc8m(); -#endif /* __SYSTEM_CLOCK_8M_HXTAL */ -} - -#ifdef __SYSTEM_CLOCK_8M_HXTAL -/*! - \brief configure the system clock to 8M by HXTAL - \param[in] none - \param[out] none - \retval none -*/ -static void system_clock_8m_hxtal(void) -{ - uint32_t timeout = 0; - - /* enable HXTAL */ - RCU_CTL0 |= RCU_CTL0_HXTALEN; - - /* wait until HXTAL is stable or the startup time is longer than HXTAL_STARTUP_TIMEOUT */ - while((0 == (RCU_CTL0 & RCU_CTL0_HXTALSTB)) && (HXTAL_STARTUP_TIMEOUT != timeout++)); - - /* if fail */ - if(0 == (RCU_CTL0 & RCU_CTL0_HXTALSTB)) - return; - - /* HXTAL is stable */ - /* AHB = SYSCLK */ - RCU_CFG0 |= RCU_AHB_CKSYS_DIV1; - /* APB2 = AHB */ - RCU_CFG0 |= RCU_APB2_CKAHB_DIV1; - /* APB1 = AHB */ - RCU_CFG0 |= RCU_APB1_CKAHB_DIV1; - - /* select HXTAL as system clock */ - RCU_CFG0 &= ~RCU_CFG0_SCS; - RCU_CFG0 |= RCU_CKSYSSRC_HXTAL; - - /* wait until HXTAL is selected as system clock */ - while(0 == (RCU_CFG0 & RCU_SCSS_HXTAL)); -} - -#elif defined (__SYSTEM_CLOCK_72M_PLL_HXTAL) -/*! - \brief configure the system clock to 72M by PLL which selects HXTAL as its clock source - \param[in] none - \param[out] none - \retval none -*/ -static void system_clock_72m_hxtal(void) -{ - uint32_t timeout = 0U; - uint32_t stab_flag = 0U; - - /* enable HXTAL */ - RCU_CTL0 |= RCU_CTL0_HXTALEN; - - /* wait until HXTAL is stable or the startup time is longer than HXTAL_STARTUP_TIMEOUT */ - do{ - timeout++; - stab_flag = (RCU_CTL0 & RCU_CTL0_HXTALSTB); - } - while((0U == stab_flag) && (HXTAL_STARTUP_TIMEOUT != timeout)); - - /* if fail */ - if(0U == (RCU_CTL0 & RCU_CTL0_HXTALSTB)){ - return; - } - - /* HXTAL is stable */ - /* AHB = SYSCLK */ - RCU_CFG0 |= RCU_AHB_CKSYS_DIV1; - /* APB2 = AHB */ - RCU_CFG0 |= RCU_APB2_CKAHB_DIV1; - /* APB1 = AHB */ - RCU_CFG0 |= RCU_APB1_CKAHB_DIV1; - - /* PLL = HXTAL * 9 = 72 MHz */ - RCU_CFG0 &= ~(RCU_CFG0_PLLSEL | RCU_CFG0_PLLMF | RCU_CFG0_PLLDV); - RCU_CFG0 |= (RCU_PLLSRC_HXTAL | RCU_PLL_MUL9); - - /* enable PLL */ - RCU_CTL0 |= RCU_CTL0_PLLEN; - - /* wait until PLL is stable */ - while(0U == (RCU_CTL0 & RCU_CTL0_PLLSTB)){ - } - - /* select PLL as system clock */ - RCU_CFG0 &= ~RCU_CFG0_SCS; - RCU_CFG0 |= RCU_CKSYSSRC_PLL; - - /* wait until PLL is selected as system clock */ - while(0U == (RCU_CFG0 & RCU_SCSS_PLL)){ - } -} - -#elif defined (__SYSTEM_CLOCK_72M_PLL_IRC8M_DIV2) -/*! - \brief configure the system clock to 72M by PLL which selects IRC8M/2 as its clock source - \param[in] none - \param[out] none - \retval none -*/ -static void system_clock_72m_irc8m(void) -{ - /* AHB = SYSCLK */ - RCU_CFG0 |= RCU_AHB_CKSYS_DIV1; - /* APB2 = AHB */ - RCU_CFG0 |= RCU_APB2_CKAHB_DIV1; - /* APB1 = AHB */ - RCU_CFG0 |= RCU_APB1_CKAHB_DIV1; - /* PLL = (IRC8M/2) * 18 = 72 MHz */ - RCU_CFG0 &= ~(RCU_CFG0_PLLSEL | RCU_CFG0_PLLMF); - RCU_CFG0 |= (RCU_PLLSRC_IRC8M_DIV2 | RCU_PLL_MUL18); - - /* enable PLL */ - RCU_CTL0 |= RCU_CTL0_PLLEN; - - /* wait until PLL is stable */ - while(0 == (RCU_CTL0 & RCU_CTL0_PLLSTB)); - - /* select PLL as system clock */ - RCU_CFG0 &= ~RCU_CFG0_SCS; - RCU_CFG0 |= RCU_CKSYSSRC_PLL; - - /* wait until PLL is selected as system clock */ - while(0 == (RCU_CFG0 & RCU_SCSS_PLL)); -} - -#else -/*! - \brief configure the system clock to 8M by IRC8M - \param[in] none - \param[out] none - \retval none -*/ -static void system_clock_8m_irc8m(void) -{ - /* AHB = SYSCLK */ - RCU_CFG0 |= RCU_AHB_CKSYS_DIV1; - /* APB2 = AHB */ - RCU_CFG0 |= RCU_APB2_CKAHB_DIV1; - /* APB1 = AHB */ - RCU_CFG0 |= RCU_APB1_CKAHB_DIV1; - - /* select IRC8M as system clock */ - RCU_CFG0 &= ~RCU_CFG0_SCS; - RCU_CFG0 |= RCU_CKSYSSRC_IRC8M; - - /* wait until IRC8M is selected as system clock */ - while(0 != (RCU_CFG0 & RCU_SCSS_IRC8M)); -} -#endif /* __SYSTEM_CLOCK_8M_HXTAL */ - -/*! - \brief update the SystemCoreClock with current core clock retrieved from cpu registers - \param[in] none - \param[out] none - \retval none -*/ -void SystemCoreClockUpdate (void) -{ - uint32_t sws = 0U; - uint32_t pllmf = 0U, pllmf4 = 0U, pllsel = 0U, prediv = 0U, idx = 0U, clk_exp = 0U; - /* exponent of AHB clock divider */ - const uint8_t ahb_exp[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9}; - - sws = GET_BITS(RCU_CFG0, 2, 3); - switch(sws){ - /* IRC8M is selected as CK_SYS */ - case SEL_IRC8M: - SystemCoreClock = IRC8M_VALUE; - break; - /* HXTAL is selected as CK_SYS */ - case SEL_HXTAL: - SystemCoreClock = HXTAL_VALUE; - break; - /* PLL is selected as CK_SYS */ - case SEL_PLL: - /* get the value of PLLMF[3:0] */ - pllmf = GET_BITS(RCU_CFG0, 18, 21); - pllmf4 = GET_BITS(RCU_CFG0, 27, 27); - /* high 16 bits */ - if(1U == pllmf4){ - pllmf += 17U; - }else{ - pllmf += 2U; - } - /* PLL clock source selection, HXTAL or IRC8M/2 */ - pllsel = GET_BITS(RCU_CFG0, 16, 16); - if(0U != pllsel){ - prediv = (GET_BITS(RCU_CFG1, 0, 3) + 1U); - SystemCoreClock = (HXTAL_VALUE / prediv) * pllmf; - }else{ - SystemCoreClock = (IRC8M_VALUE >> 1) * pllmf; - } - break; - /* IRC8M is selected as CK_SYS */ - default: - SystemCoreClock = IRC8M_VALUE; - break; - } - /* calculate AHB clock frequency */ - idx = GET_BITS(RCU_CFG0, 4, 7); - clk_exp = ahb_exp[idx]; - SystemCoreClock >>= clk_exp; -} +/*! + \file system_gd32f1x0.c + \brief CMSIS Cortex-M3 Device Peripheral Access Layer Source File for + GD32F1x0 Device Series +*/ + +/* Copyright (c) 2012 ARM LIMITED + + All rights reserved. + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + - Neither the name of ARM nor the names of its contributors may be used + to endorse or promote products derived from this software without + specific prior written permission. + * + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + ---------------------------------------------------------------------------*/ + +/* This file refers the CMSIS standard, some adjustments are made according to GigaDevice chips */ + +#include "gd32f1x0.h" + +/* system frequency define */ +#define __IRC8M (IRC8M_VALUE) /* internal 8 MHz RC oscillator frequency */ +#define __HXTAL (HXTAL_VALUE) /* high speed crystal oscillator frequency */ +#define __SYS_OSC_CLK (__IRC8M) /* main oscillator frequency */ + +/* select a system clock by uncommenting the following line */ +//#define __SYSTEM_CLOCK_8M_HXTAL (__HXTAL) +//#define __SYSTEM_CLOCK_8M_IRC8M (__IRC8M) +#define __SYSTEM_CLOCK_72M_PLL_HXTAL (uint32_t)(72000000) +//#define __SYSTEM_CLOCK_72M_PLL_IRC8M_DIV2 (uint32_t)(72000000) + +#define SEL_IRC8M 0x00 +#define SEL_HXTAL 0x01 +#define SEL_PLL 0x02 + +/* set the system clock frequency and declare the system clock configuration function */ +#ifdef __SYSTEM_CLOCK_8M_HXTAL +uint32_t SystemCoreClock = __SYSTEM_CLOCK_8M_HXTAL; +static void system_clock_8m_hxtal(void); +#elif defined (__SYSTEM_CLOCK_72M_PLL_HXTAL) +uint32_t SystemCoreClock = __SYSTEM_CLOCK_72M_PLL_HXTAL; +static void system_clock_72m_hxtal(void); +#elif defined (__SYSTEM_CLOCK_72M_PLL_IRC8M_DIV2) +uint32_t SystemCoreClock = __SYSTEM_CLOCK_72M_PLL_IRC8M_DIV2; +static void system_clock_72m_irc8m(void); +#else +uint32_t SystemCoreClock = __SYSTEM_CLOCK_8M_IRC8M; +static void system_clock_8m_irc8m(void); +#endif /* __SYSTEM_CLOCK_8M_HXTAL */ + +/* configure the system clock */ +static void system_clock_config(void); + +/*! + \brief setup the microcontroller system, initialize the system + \param[in] none + \param[out] none + \retval none +*/ +void SystemInit (void) +{ + /* enable IRC8M */ + RCU_CTL0 |= RCU_CTL0_IRC8MEN; + while(0U == (RCU_CTL0 & RCU_CTL0_IRC8MSTB)){ + } + /* reset RCU */ +#ifdef GD32F130_150 + RCU_CFG0 &= ~(RCU_CFG0_SCS | RCU_CFG0_AHBPSC | RCU_CFG0_APB1PSC | RCU_CFG0_APB2PSC |\ + RCU_CFG0_ADCPSC | RCU_CFG0_CKOUTSEL | RCU_CFG0_CKOUTDIV | RCU_CFG0_PLLDV); +#elif defined (GD32F170_190) + RCU_CFG0 &= ~(RCU_CFG0_SCS | RCU_CFG0_AHBPSC | RCU_CFG0_APB1PSC | RCU_CFG0_APB2PSC |\ + RCU_CFG0_ADCPSC | RCU_CFG0_CKOUT0SEL | RCU_CFG0_CKOUT0DIV | RCU_CFG0_PLLDV); +#endif /* GD32F130_150 */ + RCU_CFG0 &= ~(RCU_CFG0_PLLSEL | RCU_CFG0_PLLMF | RCU_CFG0_PLLDV); +#ifdef GD32F130_150 + RCU_CFG0 &= ~(RCU_CFG0_USBDPSC); +#endif /* GD32F130_150 */ + RCU_CTL0 &= ~(RCU_CTL0_HXTALEN | RCU_CTL0_CKMEN | RCU_CTL0_PLLEN | RCU_CTL0_HXTALBPS); + RCU_CFG1 &= ~RCU_CFG1_HXTALPREDV; + RCU_CFG2 &= ~(RCU_CFG2_USART0SEL | RCU_CFG2_CECSEL | RCU_CFG2_ADCSEL); +#ifdef GD32F130_150 + RCU_CTL1 &= ~RCU_CTL1_IRC14MEN; +#elif defined (GD32F170_190) + RCU_CFG2 &= ~RCU_CFG2_IRC28MDIV; + RCU_CTL1 &= ~RCU_CTL1_IRC28MEN; + RCU_CFG3 &= ~RCU_CFG3_CKOUT1SRC; + RCU_CFG3 &= ~RCU_CFG3_CKOUT1DIV; +#endif /* GD32F130_150 */ + RCU_INT = 0x00000000U; + + /* configure system clock */ + system_clock_config(); +} + +/*! + \brief configure the system clock + \param[in] none + \param[out] none + \retval none +*/ +static void system_clock_config(void) +{ +#ifdef __SYSTEM_CLOCK_8M_HXTAL + system_clock_8m_hxtal(); +#elif defined (__SYSTEM_CLOCK_72M_PLL_HXTAL) + system_clock_72m_hxtal(); +#elif defined (__SYSTEM_CLOCK_72M_PLL_IRC8M_DIV2) + system_clock_72m_irc8m(); +#else + system_clock_8m_irc8m(); +#endif /* __SYSTEM_CLOCK_8M_HXTAL */ +} + +#ifdef __SYSTEM_CLOCK_8M_HXTAL +/*! + \brief configure the system clock to 8M by HXTAL + \param[in] none + \param[out] none + \retval none +*/ +static void system_clock_8m_hxtal(void) +{ + uint32_t timeout = 0; + + /* enable HXTAL */ + RCU_CTL0 |= RCU_CTL0_HXTALEN; + + /* wait until HXTAL is stable or the startup time is longer than HXTAL_STARTUP_TIMEOUT */ + while((0 == (RCU_CTL0 & RCU_CTL0_HXTALSTB)) && (HXTAL_STARTUP_TIMEOUT != timeout++)); + + /* if fail */ + if(0 == (RCU_CTL0 & RCU_CTL0_HXTALSTB)) + return; + + /* HXTAL is stable */ + /* AHB = SYSCLK */ + RCU_CFG0 |= RCU_AHB_CKSYS_DIV1; + /* APB2 = AHB */ + RCU_CFG0 |= RCU_APB2_CKAHB_DIV1; + /* APB1 = AHB */ + RCU_CFG0 |= RCU_APB1_CKAHB_DIV1; + + /* select HXTAL as system clock */ + RCU_CFG0 &= ~RCU_CFG0_SCS; + RCU_CFG0 |= RCU_CKSYSSRC_HXTAL; + + /* wait until HXTAL is selected as system clock */ + while(0 == (RCU_CFG0 & RCU_SCSS_HXTAL)); +} + +#elif defined (__SYSTEM_CLOCK_72M_PLL_HXTAL) +/*! + \brief configure the system clock to 72M by PLL which selects HXTAL as its clock source + \param[in] none + \param[out] none + \retval none +*/ +static void system_clock_72m_hxtal(void) +{ + uint32_t timeout = 0U; + uint32_t stab_flag = 0U; + + /* enable HXTAL */ + RCU_CTL0 |= RCU_CTL0_HXTALEN; + + /* wait until HXTAL is stable or the startup time is longer than HXTAL_STARTUP_TIMEOUT */ + do{ + timeout++; + stab_flag = (RCU_CTL0 & RCU_CTL0_HXTALSTB); + } + while((0U == stab_flag) && (HXTAL_STARTUP_TIMEOUT != timeout)); + + /* if fail */ + if(0U == (RCU_CTL0 & RCU_CTL0_HXTALSTB)){ + return; + } + + /* HXTAL is stable */ + /* AHB = SYSCLK */ + RCU_CFG0 |= RCU_AHB_CKSYS_DIV1; + /* APB2 = AHB */ + RCU_CFG0 |= RCU_APB2_CKAHB_DIV1; + /* APB1 = AHB */ + RCU_CFG0 |= RCU_APB1_CKAHB_DIV1; + + /* PLL = HXTAL * 9 = 72 MHz */ + RCU_CFG0 &= ~(RCU_CFG0_PLLSEL | RCU_CFG0_PLLMF | RCU_CFG0_PLLDV); + RCU_CFG0 |= (RCU_PLLSRC_HXTAL | RCU_PLL_MUL9); + + /* enable PLL */ + RCU_CTL0 |= RCU_CTL0_PLLEN; + + /* wait until PLL is stable */ + while(0U == (RCU_CTL0 & RCU_CTL0_PLLSTB)){ + } + + /* select PLL as system clock */ + RCU_CFG0 &= ~RCU_CFG0_SCS; + RCU_CFG0 |= RCU_CKSYSSRC_PLL; + + /* wait until PLL is selected as system clock */ + while(0U == (RCU_CFG0 & RCU_SCSS_PLL)){ + } +} + +#elif defined (__SYSTEM_CLOCK_72M_PLL_IRC8M_DIV2) +/*! + \brief configure the system clock to 72M by PLL which selects IRC8M/2 as its clock source + \param[in] none + \param[out] none + \retval none +*/ +static void system_clock_72m_irc8m(void) +{ + /* AHB = SYSCLK */ + RCU_CFG0 |= RCU_AHB_CKSYS_DIV1; + /* APB2 = AHB */ + RCU_CFG0 |= RCU_APB2_CKAHB_DIV1; + /* APB1 = AHB */ + RCU_CFG0 |= RCU_APB1_CKAHB_DIV1; + /* PLL = (IRC8M/2) * 18 = 72 MHz */ + RCU_CFG0 &= ~(RCU_CFG0_PLLSEL | RCU_CFG0_PLLMF); + RCU_CFG0 |= (RCU_PLLSRC_IRC8M_DIV2 | RCU_PLL_MUL18); + + /* enable PLL */ + RCU_CTL0 |= RCU_CTL0_PLLEN; + + /* wait until PLL is stable */ + while(0 == (RCU_CTL0 & RCU_CTL0_PLLSTB)); + + /* select PLL as system clock */ + RCU_CFG0 &= ~RCU_CFG0_SCS; + RCU_CFG0 |= RCU_CKSYSSRC_PLL; + + /* wait until PLL is selected as system clock */ + while(0 == (RCU_CFG0 & RCU_SCSS_PLL)); +} + +#else +/*! + \brief configure the system clock to 8M by IRC8M + \param[in] none + \param[out] none + \retval none +*/ +static void system_clock_8m_irc8m(void) +{ + /* AHB = SYSCLK */ + RCU_CFG0 |= RCU_AHB_CKSYS_DIV1; + /* APB2 = AHB */ + RCU_CFG0 |= RCU_APB2_CKAHB_DIV1; + /* APB1 = AHB */ + RCU_CFG0 |= RCU_APB1_CKAHB_DIV1; + + /* select IRC8M as system clock */ + RCU_CFG0 &= ~RCU_CFG0_SCS; + RCU_CFG0 |= RCU_CKSYSSRC_IRC8M; + + /* wait until IRC8M is selected as system clock */ + while(0 != (RCU_CFG0 & RCU_SCSS_IRC8M)); +} +#endif /* __SYSTEM_CLOCK_8M_HXTAL */ + +/*! + \brief update the SystemCoreClock with current core clock retrieved from cpu registers + \param[in] none + \param[out] none + \retval none +*/ +void SystemCoreClockUpdate (void) +{ + uint32_t sws = 0U; + uint32_t pllmf = 0U, pllmf4 = 0U, pllsel = 0U, prediv = 0U, idx = 0U, clk_exp = 0U; + /* exponent of AHB clock divider */ + const uint8_t ahb_exp[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9}; + + sws = GET_BITS(RCU_CFG0, 2, 3); + switch(sws){ + /* IRC8M is selected as CK_SYS */ + case SEL_IRC8M: + SystemCoreClock = IRC8M_VALUE; + break; + /* HXTAL is selected as CK_SYS */ + case SEL_HXTAL: + SystemCoreClock = HXTAL_VALUE; + break; + /* PLL is selected as CK_SYS */ + case SEL_PLL: + /* get the value of PLLMF[3:0] */ + pllmf = GET_BITS(RCU_CFG0, 18, 21); + pllmf4 = GET_BITS(RCU_CFG0, 27, 27); + /* high 16 bits */ + if(1U == pllmf4){ + pllmf += 17U; + }else{ + pllmf += 2U; + } + /* PLL clock source selection, HXTAL or IRC8M/2 */ + pllsel = GET_BITS(RCU_CFG0, 16, 16); + if(0U != pllsel){ + prediv = (GET_BITS(RCU_CFG1, 0, 3) + 1U); + SystemCoreClock = (HXTAL_VALUE / prediv) * pllmf; + }else{ + SystemCoreClock = (IRC8M_VALUE >> 1) * pllmf; + } + break; + /* IRC8M is selected as CK_SYS */ + default: + SystemCoreClock = IRC8M_VALUE; + break; + } + /* calculate AHB clock frequency */ + idx = GET_BITS(RCU_CFG0, 4, 7); + clk_exp = ahb_exp[idx]; + SystemCoreClock >>= clk_exp; +} diff --git a/HUGS/RTE/_Target_1/RTE_Components.h b/HUGS/RTE/_Target_1/RTE_Components.h new file mode 100644 index 00000000..48da42f2 --- /dev/null +++ b/HUGS/RTE/_Target_1/RTE_Components.h @@ -0,0 +1,49 @@ + +/* + * Auto generated Run-Time-Environment Configuration File + * *** Do not modify ! *** + * + * Project: 'HUGS' + * Target: 'Target 1' + */ + +#ifndef RTE_COMPONENTS_H +#define RTE_COMPONENTS_H + + +/* + * Define the Device Header File: + */ +#define CMSIS_device_header "gd32f1x0.h" + +/* GigaDevice::Device:GD32F1x0_StdPeripherals:ADC:3.1.0 */ +#define RTE_DEVICE_STDPERIPHERALS_ADC +/* GigaDevice::Device:GD32F1x0_StdPeripherals:DMA:3.1.0 */ +#define RTE_DEVICE_STDPERIPHERALS_DMA +/* GigaDevice::Device:GD32F1x0_StdPeripherals:FWDGT:3.1.0 */ +#define RTE_DEVICE_STDPERIPHERALS_FWDGT +/* GigaDevice::Device:GD32F1x0_StdPeripherals:GPIO:3.1.0 */ +#define RTE_DEVICE_STDPERIPHERALS_GPIO +/* GigaDevice::Device:GD32F1x0_StdPeripherals:I2C:3.1.0 */ +#define RTE_DEVICE_STDPERIPHERALS_I2C +/* GigaDevice::Device:GD32F1x0_StdPeripherals:MCUDBG:3.1.0 */ +#define RTE_DEVICE_STDPERIPHERALS_DBG +/* GigaDevice::Device:GD32F1x0_StdPeripherals:MISC:3.1.0 */ +#define RTE_DEVICE_STDPERIPHERALS_MISC +/* GigaDevice::Device:GD32F1x0_StdPeripherals:OPA:3.1.0 */ +#define RTE_DEVICE_STDPERIPHERALS_OPA +/* GigaDevice::Device:GD32F1x0_StdPeripherals:PMU:3.1.0 */ +#define RTE_DEVICE_STDPERIPHERALS_PMU +/* GigaDevice::Device:GD32F1x0_StdPeripherals:RCU:3.1.0 */ +#define RTE_DEVICE_STDPERIPHERALS_RCU +/* GigaDevice::Device:GD32F1x0_StdPeripherals:SYSCFG:3.1.0 */ +#define RTE_DEVICE_STDPERIPHERALS_SYSCFG +/* GigaDevice::Device:GD32F1x0_StdPeripherals:TIMER:3.1.0 */ +#define RTE_DEVICE_STDPERIPHERALS_TIMER +/* GigaDevice::Device:GD32F1x0_StdPeripherals:USART:3.1.0 */ +#define RTE_DEVICE_STDPERIPHERALS_USART +/* GigaDevice::Device:GD32F1x0_StdPeripherals:WWDGT:3.1.0 */ +#define RTE_DEVICE_STDPERIPHERALS_WWDGT + + +#endif /* RTE_COMPONENTS_H */ diff --git a/HUGS/Src/bldc.c b/HUGS/Src/bldc.c new file mode 100644 index 00000000..7fb4a980 --- /dev/null +++ b/HUGS/Src/bldc.c @@ -0,0 +1,530 @@ +/* +* This file is part of the Hoverboard Utility Gateway System (HUGS) project. +* +* The HUGS project goal is to enable Hoverboards, or Hoverboard drive components +* to be re-purposed to provide low-cost mobility to other systems, such +* as assistive devices for the disabled, general purpose robots or other +* labor saving devices. +* +* Copyright (C) 2020 Phil Malone +* Copyright (C) 2018 Florian Staeblein +* Copyright (C) 2018 Jakob Broemauer +* Copyright (C) 2018 Kai Liebich +* Copyright (C) 2018 Christoph Lehnert +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +*/ + +#include "gd32f1x0.h" +#include "../Inc/setup.h" +#include "../Inc/defines.h" +#include "../Inc/config.h" + +#include "../Inc/bldc.h" + +#define FULL_PHASE 360 +#define PHASE_Y_OFFSET (0) +#define PHASE_B_OFFSET (FULL_PHASE / 3) +#define PHASE_G_OFFSET (FULL_PHASE * 2 / 3) +#define TRANSITION_ANGLE 233 + +// Internal constants +const int16_t pwm_res = 72000000 / 2 / PWM_FREQ; // = 2000 +const int32_t WHEEL_PERIMETER = 530 ; // mm +const int32_t SPEED_TICKS_FACTOR = 188444 ; // Divide factor by speed to get ticks per cycle, or visa versa. +const int32_t SINE_TICKS_FACTOR = 3010 ; // Divide factor by speed to get ticks per degree. +const int32_t MIN_SPEED = 5 ; // min usable speed in mm/S +const int32_t MAX_PHASE_PERIOD = SPEED_TICKS_FACTOR / MIN_SPEED ; // one phase count @ MIN_SPEED +const float MM_PER_CYCLE_FLOAT = 5.888; // (530 / 90) + +//---------------------------------------------------------------------------- +// Sinusoidal Power Commutation table (one degree increments. * 1000) +//---------------------------------------------------------------------------- +const int16_t sineTable[FULL_PHASE] = {0, 31, 63, 94, 117, 148, 180, 211, 242, 266, 297, 328, 359, 391, 414, 445, 477, 500, 531, 563, 586, 617, 648, 672, 703, 727, 758, 781, 813, 836, 859, 867, 875, 883, 891, 898, 906, 914, 922, 930, 938, 938, 945, 953, 953, 961, 969, 969, 977, 977, 977, 984, 984, 984, 992, 992, 992, 992, 992, 992, 992, 992, 992, 992, 992, 992, 992, 984, 984, 984, 977, 977, 977, 969, 969, 961, 953, 953, 945, 938, 938, 930, 922, 914, 906, 898, 891, 883, 875, 867, 859, 867, 875, 883, 891, 898, 906, 914, 922, 930, 938, 938, 945, 953, 953, 961, 969, 969, 977, 977, 977, 984, 984, 984, 992, 992, 992, 992, 992, 992, 992, 992, 992, 992, 992, 992, 992, 984, 984, 984, 977, 977, 977, 969, 969, 961, 953, 953, 945, 938, 938, 930, 922, 914, 906, 898, 891, 883, 875, 867, 859, 836, 813, 781, 758, 727, 703, 672, 648, 617, 586, 563, 531, 500, 477, 445, 414, 391, 359, 328, 297, 266, 242, 211, 180, 148, 117, 94, 63, 31, 0, -31, -63, -94, -117, -148, -180, -211, -242, -266, -297, -328, -359, -391, -414, -445, -477, -500, -531, -563, -586, -617, -648, -672, -703, -727, -758, -781, -813, -836, -859, -867, -875, -883, -891, -898, -906, -914, -922, -930, -938, -938, -945, -953, -953, -961, -969, -969, -977, -977, -977, -984, -984, -984, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -984, -984, -984, -977, -977, -977, -969, -969, -961, -953, -953, -945, -938, -938, -930, -922, -914, -906, -898, -891, -883, -875, -867, -859, -867, -875, -883, -891, -898, -906, -914, -922, -930, -938, -938, -945, -953, -953, -961, -969, -969, -977, -977, -977, -984, -984, -984, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -992, -984, -984, -984, -977, -977, -977, -969, -969, -961, -953, -953, -945, -938, -938, -930, -922, -914, -906, -898, -891, -883, -875, -867, -859, -836, -813, -781, -758, -727, -703, -672, -648, -617, -586, -563, -531, -500, -477, -445, -414, -391, -359, -328, -297, -266, -242, -211, -180, -148, -117, -94, -63, -31}; + +//---------------------------------------------------------------------------- +// Commutation table Phase increments +//---------------------------------------------------------------------------- +const uint8_t hall_to_pos[8] = +{ + // Note: Changed Comutation numbers 1-based to 0 based. + // annotation: for example SA=0 means hall sensor pulls SA down to Ground + 6, // hall position [0] - No function (access from 0-5) + 2, // hall position [1] (SA=1, SB=0, SC=0) -> PWM-position 2 + 4, // hall position [2] (SA=0, SB=1, SC=0) -> PWM-position 4 + 3, // hall position [3] (SA=1, SB=1, SC=0) -> PWM-position 3 + 0, // hall position [4] (SA=0, SB=0, SC=1) -> PWM-position 0 + 1, // hall position [5] (SA=1, SB=0, SC=1) -> PWM-position 1 + 5, // hall position [6] (SA=0, SB=1, SC=1) -> PWM-position 5 + 6, // hall position [7] - No function (access from 0-5) +}; + +uint16_t batteryVoltagemV = 40000; +uint16_t currentDCmA = 0; +int32_t cycles = 0; +int32_t speedCounter = 0; +int32_t phasePeriod = 0; +int8_t stepDir = 0; // determined rotation direction +int8_t speedDir = 0; // commanded rotation direction +int8_t controlMode = 0; // 1,2 or 3 +uint8_t speedMode = DEFAULT_SPEED_MODE; // Desired Closed Loop Speed Mode. 0 = PF, 1 = STEP, 2 = Dual +uint8_t maxStepSpeed = DEFAULT_MAX_STEP_SPEED; // + +int16_t outF = 0; +int16_t outP = 0; +int16_t outI = 0; + +int32_t speedError = 0; +int32_t errorIntegral = 0; // PID components scaled up by 15 bits + +bool stepperMode = FALSE; +bool phaseRestart = FALSE; +int32_t stepperPeriod = 0; +int32_t stepperTicks = 0; + +int16_t step_y = PHASE_Y_OFFSET; +int16_t step_b = PHASE_B_OFFSET; +int16_t step_g = PHASE_G_OFFSET; + +int y = 0; // yellow = phase A +int b = 0; // blue = phase B +int g = 0; // green = phase C + +// Timeoutvariable set by timeout timer +extern FlagStatus timedOut; + +// Variables to be set from the main routine +int16_t bldcInputPwm = 0; +FlagStatus bldcEnable = RESET; +int32_t speedSetpoint = 0; +int32_t lastSpeedSetpoint = 0; +bool closedLoopSpeed = FALSE; + +// ADC buffer to be filled by DMA +adc_buf_t adc_buffer; + +// Internal calculation variables +uint8_t pos; +uint8_t lastPos; + +FlagStatus buzzerToggle = RESET; +uint8_t buzzerFreq = 0; +uint8_t buzzerPattern = 0; +uint16_t buzzerTimer = 0; +int16_t offsetcount = 0; +int16_t offsetdc = 2000; + +// Low Pass Filter Regs +int32_t realSpeedFilterReg = 0; +int16_t realSpeedmmPS = 0; + +int32_t PWMFilterReg = 0; +int16_t bldcFilteredPwm = 0; + + +//---------------------------------------------------------------------------- +// Block PWM calculation based on position +//---------------------------------------------------------------------------- +__INLINE void blockPWM(int pwm, int pwmPos, int *y, int *b, int *g) +{ + // Note: These now cycle from 0 to 5 with positive applied PWM + switch(pwmPos) + { + case 0: + *y = 0; + *b = -pwm; + *g = pwm; + break; + case 1: + *y = pwm; + *b = -pwm; + *g = 0; + break; + case 2: + *y = pwm; + *b = 0; + *g = -pwm; + break; + case 3: + *y = 0; + *b = pwm; + *g = -pwm; + break; + case 4: + *y = -pwm; + *b = pwm; + *g = 0; + break; + case 5: + *y = -pwm; + *b = 0; + *g = pwm; + break; + default: + *y = 0; + *b = 0; + *g = 0; + } +} + +//---------------------------------------------------------------------------- +// Set motor enable +//---------------------------------------------------------------------------- +void SetEnable(FlagStatus setEnable) +{ + if (!bldcEnable || !setEnable) { + closedLoopSpeed = FALSE; + } + bldcEnable = setEnable; +} + +//---------------------------------------------------------------------------- +// Set speed -5000 to 5000 +//---------------------------------------------------------------------------- +void SetSpeed(int16_t speed) +{ + // Keep driver alive + if (abs16(speed) >= 10) { + resetInactivityTimer(); + } + + closedLoopSpeed = TRUE; + speedSetpoint = CLAMP(speed, -5000, 5000); + + if (speed > 0) + speedDir = 1; + else if (speed < 0) + speedDir = -1; + else { + speedDir = 0; + controlMode = 0; + } + + // Do we need stepper mode? + if ( (speedMode == SPEED_MODE_PF) || + ((speedMode == SPEED_MODE_DUAL) && (abs16(speedSetpoint) > maxStepSpeed)) + ) { + stepperMode = FALSE; + phaseRestart = FALSE; + } else { + + // do we need to defer switching to stepper to get synched? + // we do this is we are currently in closed loop and are slowing down. + // If we don't do this, the wheel jumps forward or back + if (controlMode == 3) { + phaseRestart = TRUE; + } else { + stepperMode = TRUE; // Turn on stepper now + } + + stepperPeriod = SINE_TICKS_FACTOR / abs16(speedSetpoint) ; + } +} + +//---------------------------------------------------------------------------- +// Set power -1000 to 1000 +//---------------------------------------------------------------------------- +void SetPower(int16_t power) +{ + // Keep driver alive + if (abs16(power) > 5) { + resetInactivityTimer(); + } + closedLoopSpeed = FALSE; + stepperMode = FALSE; + speedSetpoint = 0; + + if (power == 0) + controlMode = 0; + + // stepperTicks = 0; + SetPWM(power); +} + +//---------------------------------------------------------------------------- +// Set pwm -1000 to 1000 +//---------------------------------------------------------------------------- +void SetPWM(int16_t setPwm) +{ + bldcInputPwm = CLAMP(setPwm, -1000, 1000); +} + +//---------------------------------------------------------------------------- +// Get pwm -1000 to 1000 +//---------------------------------------------------------------------------- +int16_t GetPWM() +{ + return bldcFilteredPwm ; +} + +//---------------------------------------------------------------------------- +// Get speed in mm/Sec +//---------------------------------------------------------------------------- +int16_t GetSpeed() +{ + return realSpeedmmPS ; +} + +//---------------------------------------------------------------------------- +// Get speed in mm/Sec +//---------------------------------------------------------------------------- +void CalculateSpeed() +{ + int16_t speed; + + if (phasePeriod == MAX_PHASE_PERIOD ) { + speed = 0 ; + } + else{ + speed = (SPEED_TICKS_FACTOR / phasePeriod) * stepDir ; + } + + // Calculate low-pass filter for phase Period + realSpeedFilterReg = realSpeedFilterReg - (realSpeedFilterReg >> SPEED_FILTER_SHIFT) + speed; + realSpeedmmPS = realSpeedFilterReg >> SPEED_FILTER_SHIFT; +} + +//---------------------------------------------------------------------------- +// Get position in mm +//---------------------------------------------------------------------------- +int32_t GetPosition(void) { + return (int32_t)((float)cycles * MM_PER_CYCLE_FLOAT) ; +} + +//---------------------------------------------------------------------------- +// Calculation-Routine for BLDC => calculates with 32kHz (was 16 kHz) +// Written so there are no function calls requiring stack protection. +//---------------------------------------------------------------------------- +void CalculateBLDC(void) +{ + int8_t stepDif; + + // Create square wave for buzzer + buzzerTimer++; + if (buzzerFreq != 0 && (buzzerTimer / 5000) % (buzzerPattern + 1) == 0){ + if (buzzerTimer % buzzerFreq == 0){ + buzzerToggle = buzzerToggle == RESET ? SET : RESET; // toggle variable + gpio_bit_write(BUZZER_PORT, BUZZER_PIN, buzzerToggle); + } + } else { + gpio_bit_write(BUZZER_PORT, BUZZER_PIN, RESET); + } + + // Calibrate ADC offsets for the first 1000 cycles + if (offsetcount < 1000) { + offsetcount++; + offsetdc = (adc_buffer.current_dc + offsetdc) / 2; + return; + } + + // Calculate battery voltage & current every 100 cycles + if (buzzerTimer % 100 == 0) { + uint16_t tempV = (uint16_t)(((uint32_t)adc_buffer.v_batt * ADC_BATTERY_MICRO_VOLT) / 1000); + uint16_t tempI = (uint16_t)((ABS((adc_buffer.current_dc - offsetdc) * MOTOR_AMP_CONV_DC_MICRO_AMP)) / 1000); + + batteryVoltagemV += ((tempV - batteryVoltagemV) / 100); + currentDCmA += ((tempI - currentDCmA) / 100); + } + + // Disable PWM when current limit is reached (current chopping), enable is not set or timeout is reached + if (currentDCmA > DC_CUR_LIMIT_MA || bldcEnable == RESET || timedOut == SET) { + timer_automatic_output_disable(TIMER_BLDC); + } else { + timer_automatic_output_enable(TIMER_BLDC); + } + + // Get current commutation position + pos = hallToPos(); + + // Are we switching phase steps? If so, time to calculate phase period + if (pos != lastPos) { + phasePeriod = speedCounter; + speedCounter = 0; + + // Check direction of rotation + stepDif = pos - lastPos; + if ((stepDif == 1) || (stepDif == -5)) + stepDir = 1; + else if ((stepDif == -1) || (stepDif == 5)) + stepDir = -1; + + // Integrate steps to measure distance + cycles += stepDir; + + // if we are waiting for a phase restart, load new angle. + if (phaseRestart) { + phaseRestart = FALSE; + stepperMode = TRUE; + + setPhaseAngle(getTransitionAngle()); + } + } + + // Accumulate counters for speed and phase duration + // Increments with 31.25 us + if(speedCounter < MAX_PHASE_PERIOD) { // No speed less than MIN_SPEED + speedCounter += 1; + } else { + phasePeriod = MAX_PHASE_PERIOD; // MIN_SPEED phase duration + realSpeedmmPS = 0; + } + + // ====================================================================================== + // Determine desired phase commutation and PWM based on operational mode + // Three conditions are: + // 1) Open loop power + // 2) Closed Loop Stepping (Slow Speed) + // 3) Closed Loop Running (PIDF), (Fast Speed) + // ====================================================================================== + + if (closedLoopSpeed) { + + if (speedSetpoint == 0){ + SetPWM(0) ; + } else { + + // determine speed error and set power level + SetPWM(runPID()); + + } + + // Calculate low-pass filter for pwm value (we don't always need it. but best to keep running.) + PWMFilterReg = PWMFilterReg - (PWMFilterReg >> PWM_FILTER_SHIFT) + bldcInputPwm; + bldcFilteredPwm = PWMFilterReg >> PWM_FILTER_SHIFT; + + if (stepperMode) { + // 2) Closed Loop Stepping (Slow Speed) + controlMode = 2; + stepperTicks++; + + // Are we moving to the next angle? + if (stepperTicks >= stepperPeriod) { + setPhaseAngle(step_y + speedDir); + stepperTicks = 0; + } + + // Get three PWM values from sine table + y = sineTable[step_y] >> 3; + b = sineTable[step_g] >> 3; + g = sineTable[step_b] >> 3; + + } else { + // 3) Closed Loop Running (PIDF), (Fast Speed) + controlMode = 3; + + // Update PWM channels based on position y(ellow), b(lue), g(reen) + blockPWM(bldcFilteredPwm, pos, &y, &b, &g); + } + } else { + // 1) Open loop power, so just apply filtered PWM to correct phases + controlMode = 1; + + // Calculate low-pass filter for pwm value + PWMFilterReg = PWMFilterReg - (PWMFilterReg >> PWM_FILTER_SHIFT) + bldcInputPwm; + bldcFilteredPwm = PWMFilterReg >> PWM_FILTER_SHIFT; + + // Update PWM channels based on position y(ellow), b(lue), g(reen) + blockPWM(bldcFilteredPwm, pos, &y, &b, &g); + } + + // Set PWM output (pwm_res/2 is the mean value, setvalue has to be between 10 and pwm_res-10) + timer_channel_output_pulse_value_config(TIMER_BLDC, TIMER_BLDC_CHANNEL_G, CLAMP(g + pwm_res / 2, 10, pwm_res-10)); + timer_channel_output_pulse_value_config(TIMER_BLDC, TIMER_BLDC_CHANNEL_B, CLAMP(b + pwm_res / 2, 10, pwm_res-10)); + timer_channel_output_pulse_value_config(TIMER_BLDC, TIMER_BLDC_CHANNEL_Y, CLAMP(y + pwm_res / 2, 10, pwm_res-10)); + + // Safe last position + lastPos = pos; +} + + +// PIDF coefficients are all scaled up by 15 bits (32768) +const int32_t KF = (int32_t)(32768.0 * 0.16) ; +const int32_t KFO = (int32_t)(32768.0 * 28.0) ; +const int32_t KP = (int32_t)(32768.0 * 0.2) ; +const int32_t KI = (int32_t)(32768.0 * 0.00005) ; +const int32_t ILIMIT = (int32_t)(32768.0 * 150) ; + + +int16_t runPID() { + speedError = (speedSetpoint - realSpeedmmPS) ; + + // Determine Feed Forward and Proportional terms + outF = ((speedSetpoint * KF) + (speedDir * KFO)) >> 15 ; + outP = (speedError * KP) >> 15; + + // reset integral term if speed request near zero, or has changed signs. + // otherwise intergrate error + if ((abs32(speedSetpoint) < MIN_SPEED) || + ((speedSetpoint * lastSpeedSetpoint) < 0)) { + errorIntegral = 0; + } else { + errorIntegral += (speedError * KI) ; + errorIntegral = CLAMP(errorIntegral, (-ILIMIT), ILIMIT); // do not let integral wind up too much + } + outI = errorIntegral >> 15; + + lastSpeedSetpoint = speedSetpoint; + + // Combine terms to form output + return (outF + outP + outI) ; +} + +uint8_t hallToPos() { + + // Read hall sensors + uint8_t hall_a = gpio_input_bit_get(HALL_A_PORT, HALL_A_PIN); + uint8_t hall_b = gpio_input_bit_get(HALL_B_PORT, HALL_B_PIN); + uint8_t hall_c = gpio_input_bit_get(HALL_C_PORT, HALL_C_PIN); + + // Determine current position based on hall sensors + uint8_t hall = (hall_a * 1) + (hall_b * 2) + (hall_c * 4); + + return hall_to_pos[hall]; +} + +int16_t getTransitionAngle() { + int16_t Yangle ; + + if (speedDir > 0) + Yangle = (pos * 60) + TRANSITION_ANGLE; + else + Yangle = (pos * 60) + 180 - TRANSITION_ANGLE; + + return (Yangle); +} + + +void setPhaseAngle(int16_t Yangle) { + + step_y = Yangle + PHASE_Y_OFFSET; + step_b = Yangle + PHASE_B_OFFSET; + step_g = Yangle + PHASE_G_OFFSET; + + // wrap into 0 359 range + step_y = (step_y + FULL_PHASE) % FULL_PHASE; + step_b = (step_b + FULL_PHASE) % FULL_PHASE; + step_g = (step_g + FULL_PHASE) % FULL_PHASE; +} + + +int16_t abs16 (int16_t value) { + if (value < 0) + value = -value; + + return value; +} + +int32_t abs32 (int32_t value) { + if (value < 0) + value = -value; + + return value; +} diff --git a/HoverBoardGigaDevice/Src/comms.c b/HUGS/Src/comms.c similarity index 69% rename from HoverBoardGigaDevice/Src/comms.c rename to HUGS/Src/comms.c index 5f912971..a25ce255 100644 --- a/HoverBoardGigaDevice/Src/comms.c +++ b/HUGS/Src/comms.c @@ -1,72 +1,67 @@ -/* -* This file is part of the hoverboard-firmware-hack-V2 project. The -* firmware is used to hack the generation 2 board of the hoverboard. -* These new hoverboards have no mainboard anymore. They consist of -* two Sensorboards which have their own BLDC-Bridge per Motor and an -* ARM Cortex-M3 processor GD32F130C8. -* -* Copyright (C) 2018 Florian Staeblein -* Copyright (C) 2018 Jakob Broemauer -* Copyright (C) 2018 Kai Liebich -* Copyright (C) 2018 Christoph Lehnert -* -* The program is based on the hoverboard project by Niklas Fauth. The -* structure was tried to be as similar as possible, so that everyone -* could find a better way through the code. -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -*/ - -#include "gd32f1x0.h" - -//---------------------------------------------------------------------------- -// Send buffer via USART -//---------------------------------------------------------------------------- -void SendBuffer(uint32_t usart_periph, uint8_t buffer[], uint8_t length) -{ - uint8_t index = 0; - - for(; index < length; index++) - { - usart_data_transmit(usart_periph, buffer[index]); - while (usart_flag_get(usart_periph, USART_FLAG_TC) == RESET) {} - } -} - -//---------------------------------------------------------------------------- -// Calculate CRC -//---------------------------------------------------------------------------- -uint16_t CalcCRC(uint8_t *ptr, int count) -{ - uint16_t crc; - uint8_t i; - crc = 0; - while (--count >= 0) - { - crc = crc ^ (uint16_t) *ptr++ << 8; - i = 8; - do - { - if (crc & 0x8000) - { - crc = crc << 1 ^ 0x1021; - } - else - { - crc = crc << 1; - } - } while(--i); - } - return (crc); -} +/* +* This file is part of the Hoverboard Utility Gateway System (HUGS) project. +* +* The HUGS project goal is to enable Hoverboards, or Hoverboard drive components +* to be re-purposed to provide low-cost mobility to other systems, such +* as assistive devices for the disabled, general purpose robots or other +* labor saving devices. +* +* Copyright (C) 2020 Phil Malone +* Copyright (C) 2018 Florian Staeblein +* Copyright (C) 2018 Jakob Broemauer +* Copyright (C) 2018 Kai Liebich +* Copyright (C) 2018 Christoph Lehnert +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +*/ + +#include "gd32f1x0.h" + +//---------------------------------------------------------------------------- +// Send buffer via USART +//---------------------------------------------------------------------------- +void SendBuffer(uint32_t usart_periph, uint8_t buffer[], uint8_t length) +{ + uint8_t index = 0; + + for(; index < length; index++) + { + usart_data_transmit(usart_periph, buffer[index]); + while (usart_flag_get(usart_periph, USART_FLAG_TC) == RESET) {} + } +} + +//---------------------------------------------------------------------------- +// Calculate CRC +//---------------------------------------------------------------------------- +uint16_t CalcCRC(uint8_t *ptr, int count) +{ + uint16_t crc; + uint8_t i; + crc = 0; + while (--count >= 0) + { + crc = crc ^ (uint16_t) *ptr++ << 8; + i = 8; + do + { + if (crc & 0x8000) + { + crc = crc << 1 ^ 0x1021; + } + else + { + crc = crc << 1; + } + } while(--i); + } + return (crc); +} diff --git a/HUGS/Src/commsHUGS.c b/HUGS/Src/commsHUGS.c new file mode 100644 index 00000000..6117b369 --- /dev/null +++ b/HUGS/Src/commsHUGS.c @@ -0,0 +1,395 @@ +/* +* This file is part of the Hoverboard Utility Gateway System (HUGS) project. +* +* The HUGS project goal is to enable Hoverboards, or Hoverboard drive components +* to be re-purposed to provide low-cost mobility to other systems, such +* as assistive devices for the disabled, general purpose robots or other +* labor saving devices. +* +* Copyright (C) 2020 Phil Malone +* Copyright (C) 2018 Florian Staeblein +* Copyright (C) 2018 Jakob Broemauer +* Copyright (C) 2018 Kai Liebich +* Copyright (C) 2018 Christoph Lehnert +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +*/ + +#include "gd32f1x0.h" +#include "../Inc/it.h" +#include "../Inc/comms.h" +#include "../Inc/commsHUGS.h" +#include "../Inc/setup.h" +#include "../Inc/config.h" +#include "../Inc/defines.h" +#include "../Inc/bldc.h" +#include "stdio.h" +#include "string.h" + +#define HUGS_MAX_DATA 9 // Max variable Data Length' +#define HUGS_EOM_OFFSET 7 // Location of EOM char based on variable data length +#define USART_HUGS_TX_BYTES (HUGS_MAX_DATA + 8) // Max buffeer size including +#define USART_HUGS_RX_BYTES (HUGS_MAX_DATA + 8) // start '/' and stop character '\n' + +static bool sHUGSRecord = FALSE; + +extern uint8_t usartHUGS_rx_buf[USART_HUGS_RX_BUFFERSIZE]; +static uint8_t sUSARTHUGSRecordBuffer[USART_HUGS_RX_BYTES]; +static uint8_t sUSARTHUGSRecordBufferCounter = 0; + +extern uint16_t batteryVoltagemV; +extern uint16_t currentDCmA ; +extern int16_t realSpeedmmPS ; +extern int32_t phasePeriod ; +extern int32_t cycles ; +extern int8_t controlMode ; +extern uint8_t speedMode ; +extern uint8_t maxStepSpeed ; +extern int16_t outF ; +extern int16_t outP ; +extern int16_t outI ; +extern int32_t phasePeriod ; + + +bool CheckUSARTHUGSInput(uint8_t USARTBuffer[]); +void SendHUGSReply(void); +uint16_t CalcCRC(uint8_t *ptr, int count); +void ShutOff(void); + +// Variables updated by HUGS Message +bool HUGS_ESTOP = FALSE; +uint16_t HUGS_WatchDog = 1000 ; // TIMEOUT_MS; +uint8_t HUGS_Destination = 0; +uint8_t HUGS_Sequence = 0; +CMD_ID HUGS_CommandID = NOP; +RSP_ID HUGS_ResponseID = NOR; + + +void SetESTOP(void) { + HUGS_ESTOP = TRUE; +} + +//---------------------------------------------------------------------------- +// Update USART HUGS input +//---------------------------------------------------------------------------- +void UpdateUSARTHUGSInput(void) +{ + uint8_t character = usartHUGS_rx_buf[0]; + uint8_t length; + + // Start character is captured, start record + if (!sHUGSRecord && (character == '/')) + { + sUSARTHUGSRecordBufferCounter = 0; + sHUGSRecord = TRUE; + } + + // Process the new charcter + if (sHUGSRecord) + { + sUSARTHUGSRecordBuffer[sUSARTHUGSRecordBufferCounter] = character; + sUSARTHUGSRecordBufferCounter++; + + // Check to see if we know the length yet + if (sUSARTHUGSRecordBufferCounter > 1) { + + // Check for an invalid length, or a completed message + if ((length = sUSARTHUGSRecordBuffer[1]) > HUGS_MAX_DATA){ + // Bad data length + sUSARTHUGSRecordBufferCounter = 0; + sHUGSRecord = FALSE; + } + else if (sUSARTHUGSRecordBufferCounter > (length + HUGS_EOM_OFFSET)) + { + // Check input + if (CheckUSARTHUGSInput (sUSARTHUGSRecordBuffer)) { + // A complete message was found. Reset buffer and status + sUSARTHUGSRecordBufferCounter = 0; + sHUGSRecord = FALSE; + } else { + // Message was invalid. it could have been a bad SOM + // check to see if the buffer holds another SOM (/) + int slider = 0; + int ch; + + for (ch = 1; ch < sUSARTHUGSRecordBufferCounter; ch++) { + if (sUSARTHUGSRecordBuffer[ch] == '/') { + slider = ch; + break; + } + } + + if (slider > 0) { + // push the buffer back + sUSARTHUGSRecordBufferCounter -= slider; + memcpy(sUSARTHUGSRecordBuffer, sUSARTHUGSRecordBuffer + slider, sUSARTHUGSRecordBufferCounter); + } else { + sUSARTHUGSRecordBufferCounter = 0; + sHUGSRecord = FALSE; + } + } + } + } + } +} + +//---------------------------------------------------------------------------- +// Check USART HUGS input +//---------------------------------------------------------------------------- +bool CheckUSARTHUGSInput(uint8_t USARTBuffer[]) +{ + // Auxiliary variables + uint16_t crc; + uint8_t length = USARTBuffer[1]; + + // Check start and stop character + if ( USARTBuffer[0] != '/' || + USARTBuffer[length + HUGS_EOM_OFFSET ] != '\n') + { + return FALSE; + } + + // Calculate CRC (first bytes up to, not including crc) + crc = CalcCRC(USARTBuffer, length + 5 ); + + // Check CRC + if ( USARTBuffer[length + 5] != (crc & 0xFF) || + USARTBuffer[length + 6] != ((crc >> 8) & 0xFF) ) + { + return FALSE; + } + + // command is valid. Process it now + HUGS_Destination = USARTBuffer[2] & 0x0F; + HUGS_Sequence = (USARTBuffer[2] >> 4) & 0x0F; + HUGS_CommandID = (CMD_ID)USARTBuffer[3] ; + HUGS_ResponseID = (RSP_ID)USARTBuffer[4] ; + + switch(HUGS_CommandID) { + case ENA: + SetEnable(SET); + break; + + case DIS: + SetEnable(RESET); + break; + + case POW: + SetEnable(SET); + SetPower((int16_t)((uint16_t)USARTBuffer[6] << 8) + (uint16_t)USARTBuffer[5]); + break; + + case DOG: + // save the new watchdog count (in ms) + HUGS_WatchDog = ((uint16_t)USARTBuffer[6] << 8) + (uint16_t)USARTBuffer[5]; + break; + + case MOD: + // save the new speed Mode + speedMode = USARTBuffer[5]; + maxStepSpeed = USARTBuffer[6]; + break; + + case RES: + // reset the current wheel position + cycles = 0; + break; + + case SPE: + // Set the constant Speed (in mm/s) + SetEnable(SET); + SetSpeed((int16_t)((uint16_t)USARTBuffer[6] << 8) + (uint16_t)USARTBuffer[5]); + break; + + case XXX: + // powerdown + SetPower(0); + SetESTOP(); + HUGS_ResponseID = STOP; + break; + + default: + break; + } + + // Send answer + if (HUGS_ResponseID != NOR) { + SendHUGSReply(); + } + + // Reset the pwm timout to avoid stopping motors + ResetTimeout(); + + return TRUE; +} + + +//---------------------------------------------------------------------------- +// Send reply frame via USART +//---------------------------------------------------------------------------- +void SendHUGSReply() +{ + uint8_t length = 1; + uint16_t crc = 0; + uint8_t buffer[USART_HUGS_TX_BYTES]; + int32_t positionMm; + uint8_t bitStatus = HUGS_ESTOP ? 0x01 : 0x00; + int16_t tempInt = 0; + int32_t tempLong = 0; + + bitStatus |= (controlMode << 1); + + buffer[0] = '/'; + buffer[1] = 1; + buffer[2] = HUGS_Sequence << 4; + buffer[3] = RSP; + buffer[4] = HUGS_ResponseID; + buffer[5] = bitStatus; + + switch(HUGS_ResponseID) { + case SSPE: + length = 3; + buffer[6] = realSpeedmmPS & 0xFF ; + buffer[7] = realSpeedmmPS >> 8; + break; + + case SPOS: + length = 5; + positionMm = GetPosition() ; + buffer[6] = (positionMm) & 0xFF; + buffer[7] = (positionMm >> 8) & 0xFF; + buffer[8] = (positionMm >> 16) & 0xFF; + buffer[9] = (positionMm >> 24) & 0xFF; + break; + + case SVOL: + length = 3; + buffer[6] = batteryVoltagemV & 0xFF ; + buffer[7] = batteryVoltagemV >> 8; + break; + + case SAMP: + length = 3; + buffer[6] = currentDCmA & 0xFF ; + buffer[7] = currentDCmA >> 8; + break; + + case SPOW: + length = 3; + tempInt = GetPWM(); + buffer[6] = tempInt & 0xFF ; + buffer[7] = tempInt >> 8; + + break; + + case SDOG: + length = 3; + buffer[6] = HUGS_WatchDog & 0xFF ; + buffer[7] = HUGS_WatchDog >> 8; + break; + + case SMOD: + length = 3; + buffer[6] = speedMode ; + buffer[7] = maxStepSpeed ; + + break; + + case SFPI: + length = 7; + buffer[6] = outF & 0xFF ; + buffer[7] = outF >> 8; + buffer[8] = outP & 0xFF ; + buffer[9] = outP >> 8; + buffer[10] = outI & 0xFF ; + buffer[11] = outI >> 8; + + break; + + case SMOT: + length = 9; + tempInt = GetPWM(); + positionMm = GetPosition() ; + + buffer[6] = realSpeedmmPS & 0xFF ; + buffer[7] = realSpeedmmPS >> 8; + + tempLong = positionMm; + buffer[8] = (tempLong) & 0xFF; + buffer[9] = (tempLong >> 8) & 0xFF; + buffer[10] = (tempLong >> 16) & 0xFF; + buffer[11] = (tempLong >> 24) & 0xFF; + + buffer[12] = tempInt & 0xFF ; + buffer[13] = tempInt >> 8; + break; + + case STOP: + length = 1; + break; + + default: + break; + } + + buffer[1] = length; + + // Calculate CRC + crc = CalcCRC(buffer, length + 5); + buffer[length + 5] = crc & 0xFF; + buffer[length + 6] = (crc >> 8) & 0xFF; + buffer[length + 7] = '\n'; + + SendBuffer(USART_HUGS, buffer, length + 8); +} + +//---------------------------------------------------------------------------- +// Send command via USART (Presumably to SLAVE) +//---------------------------------------------------------------------------- +void SendHUGSCmd(CMD_ID SlaveCmd, int16_t value) +{ + int8_t length = -1; + uint16_t crc = 0; + uint8_t buffer[USART_HUGS_TX_BYTES]; + + switch(SlaveCmd) { + case SPE: + length = 2; + buffer[5] = value & 0xFF ; + buffer[6] = value >> 8; + break; + + case XXX: + length = 0; + break; + + default: + break; + } + + // Only send a cmd if we have recognized the command and set a valid length + if (length >= 0) { + buffer[0] = '/'; + buffer[1] = length; + buffer[2] = 0; + buffer[3] = SlaveCmd; + buffer[4] = NOR; + + // Calculate CRC + crc = CalcCRC(buffer, length + 5); + buffer[length + 5] = crc & 0xFF; + buffer[length + 6] = (crc >> 8) & 0xFF; + buffer[length + 7] = '\n'; + + SendBuffer(USART_HUGS, buffer, length + 8); + } +} + diff --git a/HUGS/Src/commsSteering.c b/HUGS/Src/commsSteering.c new file mode 100644 index 00000000..29a4eee4 --- /dev/null +++ b/HUGS/Src/commsSteering.c @@ -0,0 +1,211 @@ +/* +* This file is part of the Hoverboard Utility Gateway System (HUGS) project. +* +* The HUGS project goal is to enable Hoverboards, or Hoverboard drive components +* to be re-purposed to provide low-cost mobility to other systems, such +* as assistive devices for the disabled, general purpose robots or other +* labor saving devices. +* +* Copyright (C) 2020 Phil Malone +* Copyright (C) 2018 Florian Staeblein +* Copyright (C) 2018 Jakob Broemauer +* Copyright (C) 2018 Kai Liebich +* Copyright (C) 2018 Christoph Lehnert +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +*/ + +#include "gd32f1x0.h" +#include "../Inc/it.h" +#include "../Inc/comms.h" +#include "../Inc/commsHUGS.h" +#include "../Inc/commsSteering.h" +#include "../Inc/setup.h" +#include "../Inc/config.h" +#include "../Inc/defines.h" +#include "../Inc/bldc.h" +#include "stdio.h" +#include "string.h" + +#define STEER_MAX_DATA 4 // Max variable Data Length' +#define STEER_EOM_OFFSET 7 // Location of EOM char based on variable data length +#define USART_STEER_RX_BYTES (STEER_MAX_DATA + 8) // start '/' and stop character '\n' +#define USART_STEER_TX_BYTES 2 // Max buffeer size including + +extern uint8_t usartSteer_COM_rx_buf[USART_STEER_COM_RX_BUFFERSIZE]; + +static bool sSteerRecord = FALSE; +static uint8_t sUSARTSteerRecordBuffer[USART_STEER_RX_BYTES]; +static uint8_t sUSARTSteerRecordBufferCounter = 0; +static uint8_t steerReply[USART_STEER_TX_BYTES] = {'/', '\n'}; + +CMD_ID Steer_CommandID = NOP; +RSP_ID Steer_ResponseID = NOR; + +bool CheckUSARTSteerInput(uint8_t u8USARTBuffer[]); + + +//---------------------------------------------------------------------------- +// Update USART steer input +//---------------------------------------------------------------------------- +void UpdateUSARTSteerInput(void) +{ + uint8_t character = usartSteer_COM_rx_buf[0]; + uint8_t length; + + + // Start character is captured, start record + if (!sSteerRecord && (character == '/')) + { + sUSARTSteerRecordBufferCounter = 0; + sSteerRecord = TRUE; + } + + // Process the new charcter + if (sSteerRecord) + { + sUSARTSteerRecordBuffer[sUSARTSteerRecordBufferCounter] = character; + sUSARTSteerRecordBufferCounter++; + + // Check to see if we know the length yet + if (sUSARTSteerRecordBufferCounter > 1) { + + // Check for an invalid length, or a completed message + if ((length = sUSARTSteerRecordBuffer[1]) > STEER_MAX_DATA){ + // Bad data length + sUSARTSteerRecordBufferCounter = 0; + sSteerRecord = FALSE; + } + else if (sUSARTSteerRecordBufferCounter > (length + STEER_EOM_OFFSET)) + { + + // Check input using HUGS message processing + if (CheckUSARTSteerInput (sUSARTSteerRecordBuffer)) { + + // FOR TEST PURPOSES + // SendBuffer(USART_STEER_COM, sUSARTSteerRecordBuffer, sUSARTSteerRecordBufferCounter); + + // A complete message was found. Reset buffer and status + sUSARTSteerRecordBufferCounter = 0; + sSteerRecord = FALSE; + } else { + // Message was invalid. it could have been a bad SOM + // check to see if the buffer holds another SOM (/) + int slider = 0; + int ch; + + for (ch = 1; ch < sUSARTSteerRecordBufferCounter; ch++) { + if (sUSARTSteerRecordBuffer[ch] == '/') { + slider = ch; + break; + } + } + + if (slider > 0) { + // push the buffer back + sUSARTSteerRecordBufferCounter -= slider; + memcpy(sUSARTSteerRecordBuffer, sUSARTSteerRecordBuffer + slider, sUSARTSteerRecordBufferCounter); + } else { + sUSARTSteerRecordBufferCounter = 0; + sSteerRecord = FALSE; + } + } + } + } + } + +} + +//---------------------------------------------------------------------------- +// Check USART steer input +//---------------------------------------------------------------------------- +bool CheckUSARTSteerInput(uint8_t USARTBuffer[]) +{ + // Auxiliary variables + uint16_t crc; + uint8_t length = USARTBuffer[1]; + int16_t turn_mmPS; + int16_t left_mmPS; + int16_t right_mmPS; + int16_t smax; + + + // Check start and stop character + if ( USARTBuffer[0] != '/' || + USARTBuffer[length + STEER_EOM_OFFSET ] != '\n') + { + return FALSE; + } + + // Calculate CRC (first bytes up to, not including crc) + crc = CalcCRC(USARTBuffer, length + 5 ); + + // Check CRC + if ( USARTBuffer[length + 5] != (crc & 0xFF) || + USARTBuffer[length + 6] != ((crc >> 8) & 0xFF) ) + { + return FALSE; + } + + // command is valid. Process it now + Steer_CommandID = (CMD_ID)USARTBuffer[3] ; + Steer_ResponseID = (RSP_ID)USARTBuffer[4] ; + + switch(Steer_CommandID) { + case DSPE: + + // Set the constant Speed (in mm/s) + SetEnable(SET); + + left_mmPS = (int16_t)((uint16_t)USARTBuffer[6] << 8) + (uint16_t)USARTBuffer[5]; + right_mmPS = left_mmPS; + + turn_mmPS = (int16_t)((float)((int16_t)((uint16_t)USARTBuffer[8] << 8) + (uint16_t)USARTBuffer[7]) * MM_PER_DEGREE); + + left_mmPS += turn_mmPS; + right_mmPS -= turn_mmPS; + + // normalize so no speed is > +/-TOP_SPEED + smax = max(abs16(left_mmPS), abs16(right_mmPS)); + + if (smax > MAX_SPEED) { + left_mmPS = (left_mmPS * MAX_SPEED) / smax; + right_mmPS = (right_mmPS * MAX_SPEED) / smax; + } + + SendHUGSCmd(SPE, -left_mmPS) ; + SetSpeed(right_mmPS); + break; + + case XXX: + // powerdown + SendHUGSCmd(SPE, 0) ; + SendHUGSCmd(XXX, 0) ; + SetPower(0); + SetESTOP(); + break; + + default: + break; + } + + // Send keep-alive reply + SendBuffer(USART_STEER_COM, steerReply, sizeof(steerReply)); + + // Reset the pwm timout to avoid stopping motors + ResetTimeout(); + + return TRUE; +} + +int16_t max(int16_t a, int16_t b){ + return (a >= b)? a : b; +} diff --git a/HoverBoardGigaDevice/Src/it.c b/HUGS/Src/it.c similarity index 75% rename from HoverBoardGigaDevice/Src/it.c rename to HUGS/Src/it.c index 5a60db36..48c0142a 100644 --- a/HoverBoardGigaDevice/Src/it.c +++ b/HUGS/Src/it.c @@ -1,274 +1,244 @@ -/* -* This file is part of the hoverboard-firmware-hack-V2 project. The -* firmware is used to hack the generation 2 board of the hoverboard. -* These new hoverboards have no mainboard anymore. They consist of -* two Sensorboards which have their own BLDC-Bridge per Motor and an -* ARM Cortex-M3 processor GD32F130C8. -* -* Copyright (C) 2018 Florian Staeblein -* Copyright (C) 2018 Jakob Broemauer -* Copyright (C) 2018 Kai Liebich -* Copyright (C) 2018 Christoph Lehnert -* -* The program is based on the hoverboard project by Niklas Fauth. The -* structure was tried to be as similar as possible, so that everyone -* could find a better way through the code. -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -*/ - -#include "gd32f1x0.h" -#include "../Inc/it.h" -#include "../Inc/defines.h" -#include "../Inc/config.h" -#include "../Inc/bldc.h" -#include "../Inc/led.h" -#include "../Inc/commsMasterSlave.h" -#include "../Inc/commsSteering.h" -#include "../Inc/commsBluetooth.h" - -uint32_t msTicks; -uint32_t timeoutCounter_ms = 0; -FlagStatus timedOut = SET; - -#ifdef SLAVE -uint32_t hornCounter_ms = 0; -#endif - -extern int32_t steer; -extern int32_t speed; -extern FlagStatus activateWeakening; -extern FlagStatus beepsBackwards; - -//---------------------------------------------------------------------------- -// SysTick_Handler -//---------------------------------------------------------------------------- -void SysTick_Handler(void) -{ - msTicks++; -} - -//---------------------------------------------------------------------------- -// Resets the timeout to zero -//---------------------------------------------------------------------------- -void ResetTimeout(void) -{ - timeoutCounter_ms = 0; -} - -//---------------------------------------------------------------------------- -// Timer13_Update_Handler -// Is called when upcouting of timer13 is finished and the UPDATE-flag is set -// -> period of timer13 running with 1kHz -> interrupt every 1ms -//---------------------------------------------------------------------------- -void TIMER13_IRQHandler(void) -{ - if (timeoutCounter_ms > TIMEOUT_MS) - { - // First timeout reset all process values - if (timedOut == RESET) - { -#ifdef MASTER - steer = 0; - speed = 0; - beepsBackwards = RESET; -#endif -#ifdef SLAVE - SetPWM(0); -#endif - } - - timedOut = SET; - } - else - { - timedOut = RESET; - timeoutCounter_ms++; - } - -#ifdef SLAVE - if (hornCounter_ms >= 2000) - { - // Avoid horn to be activated longer than 2 seconds - SetUpperLEDMaster(RESET); - } - else if (hornCounter_ms < 2000) - { - hornCounter_ms++; - } - - // Update LED program - CalculateLEDProgram(); -#endif - - // Clear timer update interrupt flag - timer_interrupt_flag_clear(TIMER13, TIMER_INT_UP); -} - -//---------------------------------------------------------------------------- -// Timer0_Update_Handler -// Is called when upcouting of timer0 is finished and the UPDATE-flag is set -// AND when downcouting of timer0 is finished and the UPDATE-flag is set -// -> pwm of timer0 running with 16kHz -> interrupt every 31,25us -//---------------------------------------------------------------------------- -void TIMER0_BRK_UP_TRG_COM_IRQHandler(void) -{ - // Start ADC conversion - adc_software_trigger_enable(ADC_REGULAR_CHANNEL); - - // Clear timer update interrupt flag - timer_interrupt_flag_clear(TIMER_BLDC, TIMER_INT_UP); -} - -//---------------------------------------------------------------------------- -// This function handles DMA_Channel0_IRQHandler interrupt -// Is called, when the ADC scan sequence is finished -// -> ADC is triggered from timer0-update-interrupt -> every 31,25us -//---------------------------------------------------------------------------- -void DMA_Channel0_IRQHandler(void) -{ - // Calculate motor PWMs - CalculateBLDC(); - - #ifdef SLAVE - // Calculates RGB LED - CalculateLEDPWM(); - #endif - - if (dma_interrupt_flag_get(DMA_CH0, DMA_INT_FLAG_FTF)) - { - dma_interrupt_flag_clear(DMA_CH0, DMA_INT_FLAG_FTF); - } -} - - -//---------------------------------------------------------------------------- -// This function handles DMA_Channel1_2_IRQHandler interrupt -// Is asynchronously called when USART0 RX finished -//---------------------------------------------------------------------------- -void DMA_Channel1_2_IRQHandler(void) -{ - // USART steer/bluetooth RX - if (dma_interrupt_flag_get(DMA_CH2, DMA_INT_FLAG_FTF)) - { -#ifdef MASTER - // Update USART steer input mechanism - UpdateUSARTSteerInput(); -#endif -#ifdef SLAVE - // Update USART bluetooth input mechanism - UpdateUSARTBluetoothInput(); -#endif - dma_interrupt_flag_clear(DMA_CH2, DMA_INT_FLAG_FTF); - } -} - - -//---------------------------------------------------------------------------- -// This function handles DMA_Channel3_4_IRQHandler interrupt -// Is asynchronously called when USART_SLAVE RX finished -//---------------------------------------------------------------------------- -void DMA_Channel3_4_IRQHandler(void) -{ - // USART master slave RX - if (dma_interrupt_flag_get(DMA_CH4, DMA_INT_FLAG_FTF)) - { - // Update USART master slave input mechanism - UpdateUSARTMasterSlaveInput(); - - dma_interrupt_flag_clear(DMA_CH4, DMA_INT_FLAG_FTF); - } -} - -//---------------------------------------------------------------------------- -// Returns number of milliseconds since system start -//---------------------------------------------------------------------------- -uint32_t millis() -{ - return msTicks; -} - -//---------------------------------------------------------------------------- -// Delays number of tick Systicks (happens every 10 ms) -//---------------------------------------------------------------------------- -void Delay (uint32_t dlyTicks) -{ - uint32_t curTicks; - - curTicks = msTicks; - while ((msTicks - curTicks) < dlyTicks) - { - __NOP(); - } -} - -//---------------------------------------------------------------------------- -// This function handles Non maskable interrupt. -//---------------------------------------------------------------------------- -void NMI_Handler(void) -{ -} - -//---------------------------------------------------------------------------- -// This function handles Hard fault interrupt. -//---------------------------------------------------------------------------- -void HardFault_Handler(void) -{ - while(1) {} -} - -//---------------------------------------------------------------------------- -// This function handles Memory management fault. -//---------------------------------------------------------------------------- -void MemManage_Handler(void) -{ - while(1) {} -} - -//---------------------------------------------------------------------------- -// This function handles Prefetch fault, memory access fault. -//---------------------------------------------------------------------------- -void BusFault_Handler(void) -{ - while(1) {} -} - -//---------------------------------------------------------------------------- -// This function handles Undefined instruction or illegal state. -//---------------------------------------------------------------------------- -void UsageFault_Handler(void) -{ - while(1) {} -} - -//---------------------------------------------------------------------------- -// This function handles System service call via SWI instruction. -//---------------------------------------------------------------------------- -void SVC_Handler(void) -{ -} - -//---------------------------------------------------------------------------- -// This function handles Debug monitor. -//---------------------------------------------------------------------------- -void DebugMon_Handler(void) -{ -} - -//---------------------------------------------------------------------------- -// This function handles Pendable request for system service. -//---------------------------------------------------------------------------- -void PendSV_Handler(void) -{ -} +/* +* This file is part of the Hoverboard Utility Gateway System (HUGS) project. +* +* The HUGS project goal is to enable Hoverboards, or Hoverboard drive components +* to be re-purposed to provide low-cost mobility to other systems, such +* as assistive devices for the disabled, general purpose robots or other +* labor saving devices. +* +* Copyright (C) 2020 Phil Malone +* Copyright (C) 2018 Florian Staeblein +* Copyright (C) 2018 Jakob Broemauer +* Copyright (C) 2018 Kai Liebich +* Copyright (C) 2018 Christoph Lehnert +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +*/ + +#include "gd32f1x0.h" +#include "../Inc/it.h" +#include "../Inc/defines.h" +#include "../Inc/config.h" +#include "../Inc/bldc.h" +#include "../Inc/led.h" +#include "../Inc/commsHUGS.h" +#include "../Inc/commsSteering.h" + +uint32_t msTicks = 0; +uint32_t sysTicks = 0; +uint32_t driveSafeMs = 0; +FlagStatus timedOut = SET; +bool msToggle = FALSE; + +extern FlagStatus activateWeakening; +extern int16_t HUGS_WatchDog; + +//---------------------------------------------------------------------------- +// SysTick_Handler (Fires every 10 mS) +//---------------------------------------------------------------------------- +void SysTick_Handler(void) +{ + sysTicks++; +} + +//---------------------------------------------------------------------------- +// Resets the drive timeout to zero +//---------------------------------------------------------------------------- +void ResetTimeout(void) +{ + driveSafeMs = 0; +} + +//---------------------------------------------------------------------------- +// Timer13_Update_Handler +// Is called when upcouting of timer13 is finished and the UPDATE-flag is set +// -> period of timer13 running with 2kHz -> interrupt every 500 uS +//---------------------------------------------------------------------------- +void TIMER13_IRQHandler(void) +{ + msToggle = msToggle ? FALSE : TRUE; + + if (msToggle) { + msTicks++; + + // Update speed value + CalculateSpeed(); + + if (driveSafeMs > HUGS_WatchDog) + { + // First timeout reset all process values + if (timedOut == RESET) + { + SetPower(0); + } + + timedOut = SET; + } + else + { + timedOut = RESET; + driveSafeMs++; + } + } + + // Clear timer update interrupt flag + timer_interrupt_flag_clear(TIMER13, TIMER_INT_UP); +} + +//---------------------------------------------------------------------------- +// Timer0_Update_Handler +// Is called when upcouting of timer0 is finished and the UPDATE-flag is set +// AND when downcouting of timer0 is finished and the UPDATE-flag is set +// -> pwm of timer0 running with 16kHz -> interrupt every 31,25us +//---------------------------------------------------------------------------- +void TIMER0_BRK_UP_TRG_COM_IRQHandler(void) +{ + // Start ADC conversion + adc_software_trigger_enable(ADC_REGULAR_CHANNEL); + + // Clear timer update interrupt flag + timer_interrupt_flag_clear(TIMER_BLDC, TIMER_INT_UP); +} + +//---------------------------------------------------------------------------- +// This function handles DMA_Channel0_IRQHandler interrupt +// Is called, when the ADC scan sequence is finished +// -> ADC is triggered from timer0-update-interrupt -> every 31,25us +//---------------------------------------------------------------------------- +void DMA_Channel0_IRQHandler(void) +{ + // Calculate motor PWMs + CalculateBLDC(); + + #ifdef SLAVE + // Calculates RGB LED + CalculateLEDPWM(); + #endif + + if (dma_interrupt_flag_get(DMA_CH0, DMA_INT_FLAG_FTF)) + { + dma_interrupt_flag_clear(DMA_CH0, DMA_INT_FLAG_FTF); + } +} + + +//---------------------------------------------------------------------------- +// This function handles DMA_Channel1_2_IRQHandler interrupt +// Is asynchronously called when USART0 RX finished +//---------------------------------------------------------------------------- +void DMA_Channel1_2_IRQHandler(void) +{ + // USART steer/bluetooth RX + if (dma_interrupt_flag_get(DMA_CH2, DMA_INT_FLAG_FTF)) + { + // Update USART steer input mechanism + UpdateUSARTSteerInput(); + dma_interrupt_flag_clear(DMA_CH2, DMA_INT_FLAG_FTF); + } +} + + +//---------------------------------------------------------------------------- +// This function handles DMA_Channel3_4_IRQHandler interrupt +// Is asynchronously called when USART_SLAVE RX finished +//---------------------------------------------------------------------------- +void DMA_Channel3_4_IRQHandler(void) +{ + // USART master slave RX + if (dma_interrupt_flag_get(DMA_CH4, DMA_INT_FLAG_FTF)) + { + // Update USART master slave input mechanism + UpdateUSARTHUGSInput(); + dma_interrupt_flag_clear(DMA_CH4, DMA_INT_FLAG_FTF); + } +} + +//---------------------------------------------------------------------------- +// Returns number of milliseconds since system start +//---------------------------------------------------------------------------- +uint32_t millis() +{ + return msTicks; +} + +//---------------------------------------------------------------------------- +// Delays number of mSec +//---------------------------------------------------------------------------- +void Delay (uint32_t dlyTicks) +{ + uint32_t curTicks; + + curTicks = msTicks; + while ((msTicks - curTicks) < dlyTicks) + { + __NOP(); + } +} + +//---------------------------------------------------------------------------- +// This function handles Non maskable interrupt. +//---------------------------------------------------------------------------- +void NMI_Handler(void) +{ +} + +//---------------------------------------------------------------------------- +// This function handles Hard fault interrupt. +//---------------------------------------------------------------------------- +void HardFault_Handler(void) +{ + while(1) {} +} + +//---------------------------------------------------------------------------- +// This function handles Memory management fault. +//---------------------------------------------------------------------------- +void MemManage_Handler(void) +{ + while(1) {} +} + +//---------------------------------------------------------------------------- +// This function handles Prefetch fault, memory access fault. +//---------------------------------------------------------------------------- +void BusFault_Handler(void) +{ + while(1) {} +} + +//---------------------------------------------------------------------------- +// This function handles Undefined instruction or illegal state. +//---------------------------------------------------------------------------- +void UsageFault_Handler(void) +{ + while(1) {} +} + +//---------------------------------------------------------------------------- +// This function handles System service call via SWI instruction. +//---------------------------------------------------------------------------- +void SVC_Handler(void) +{ +} + +//---------------------------------------------------------------------------- +// This function handles Debug monitor. +//---------------------------------------------------------------------------- +void DebugMon_Handler(void) +{ +} + +//---------------------------------------------------------------------------- +// This function handles Pendable request for system service. +//---------------------------------------------------------------------------- +void PendSV_Handler(void) +{ +} diff --git a/HoverBoardGigaDevice/Src/led.c b/HUGS/Src/led.c similarity index 90% rename from HoverBoardGigaDevice/Src/led.c rename to HUGS/Src/led.c index 1270ed57..4ecbf9b4 100644 --- a/HoverBoardGigaDevice/Src/led.c +++ b/HUGS/Src/led.c @@ -1,393 +1,388 @@ -/* -* This file is part of the hoverboard-firmware-hack-V2 project. The -* firmware is used to hack the generation 2 board of the hoverboard. -* These new hoverboards have no mainboard anymore. They consist of -* two Sensorboards which have their own BLDC-Bridge per Motor and an -* ARM Cortex-M3 processor GD32F130C8. -* -* Copyright (C) 2018 Florian Staeblein -* Copyright (C) 2018 Jakob Broemauer -* Copyright (C) 2018 Kai Liebich -* Copyright (C) 2018 Christoph Lehnert -* -* The program is based on the hoverboard project by Niklas Fauth. The -* structure was tried to be as similar as possible, so that everyone -* could find a better way through the code. -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -*/ - -#include "gd32f1x0.h" -#include "../Inc/led.h" -#include "../Inc/defines.h" - -// Only slave has LED mechanism -#ifdef SLAVE - -// Lookuptable for brightness -static unsigned char su8BrightnessTable[64] = - {0,0,1,1,1,2,2,2,2,2,2,3,3,3,3,4,4,4,5,5,6, - 6,7,8,8,9,10,11,12,13,14,15,17,18,20,22,24, - 26,28,31,34,37,40,44,48,52,57,62,68,74,81,89, - 97,106,116,126,138,150,164,179,196,214,234,255}; - -// Variables for RGB output -uint8_t counter_Red = 0; -uint8_t counter_Green = 0; -uint8_t counter_Blue = 0; -uint8_t setValue_Red = 0; -uint8_t setValue_Green = 0; -uint8_t setValue_Blue = 0; - -// Variables for HSB calculation -static uint16_t hueValue = 0; -static uint8_t saturationValue = 128; -static uint8_t brightnessValue = 63; - -// Variable for LED-program -static LED_PROGRAM sLEDProgram = LED_OFF; - -// Variables for effects -static uint16_t speedFading = 150; // Fading-Delay -static uint16_t speedBlink = 1274; // Blink-Delay -static uint16_t speedStrobe = 40; // Strobe-Delay - -// Counter for effects -static uint16_t fadingCounter = 0; -static uint16_t blinkCounter = 0; -static uint16_t strobeCounter = 0; -static FlagStatus strobeToggle = RESET; - -// Prototypes -uint8_t HSBtoRed(uint16_t hue, uint8_t sat); -uint8_t HSBtoGreen(uint16_t hue, uint8_t sat); -uint8_t HSBtoBlue(uint16_t hue, uint8_t sat); - -//---------------------------------------------------------------------------- -// Update RGB LED output with 16kHz -//---------------------------------------------------------------------------- -void CalculateLEDPWM(void) -{ - // Upcounting with overflow - counter_Red++; - counter_Green++; - counter_Blue++; - - // Set LEDs - gpio_bit_write(UPPER_LED_PORT, UPPER_LED_PIN, counter_Red >= setValue_Red ? RESET : SET); - gpio_bit_write(LOWER_LED_PORT, LOWER_LED_PIN, counter_Green >= setValue_Green ? RESET : SET); - gpio_bit_write(MOSFET_OUT_PORT, MOSFET_OUT_PIN, counter_Blue >= setValue_Blue ? RESET : SET); -} - -//---------------------------------------------------------------------------- -// Update RGB LED program every 1ms -//---------------------------------------------------------------------------- -void CalculateLEDProgram(void) -{ - if (GetRGBProgram() == LED_HSB_FADE) - { - fadingCounter++; - if(fadingCounter >= GetSpeedFading()) - { - fadingCounter = 0; - SetHSBHue(GetHSBHue()+1); - } - } - if (GetRGBProgram() == LED_HSB_BLINK) - { - blinkCounter++; - if(blinkCounter >= GetSpeedBlink()) - { - blinkCounter = 0; - SetHSBHue(GetHSBHue()+50); - } - } - if(GetRGBProgram() == LED_HSB_STROBE) - { - strobeCounter++; - if(strobeCounter >= GetSpeedStrobe()) - { - strobeCounter = 0; - if(strobeToggle == RESET) - { - strobeToggle = SET; - SetHSBBrightness(0); - } - else - { - strobeToggle = RESET; - SetHSBBrightness(63); - } - } - } -} - -//---------------------------------------------------------------------------- -// Sets LED program -//---------------------------------------------------------------------------- -void SetRGBProgram(LED_PROGRAM Program) -{ - // Check program count - if(!(Program < COUNT_PROGRAMS)) - { - Program = LED_OFF; - } - - // Save program for later - sLEDProgram = Program; - - switch(Program) - { - case LED_HSB: - case LED_HSB_BLINK: - case LED_HSB_FADE: - case LED_HSB_STROBE: - SetHSBHue(hueValue); - SetHSBSaturation(saturationValue); - SetHSBBrightness(brightnessValue); - break; - case LED_OFF: - default: - setValue_Red = 0; - setValue_Green = 0; - setValue_Blue = 0; - break; - } -} - -//---------------------------------------------------------------------------- -// Gets LED program -//---------------------------------------------------------------------------- -LED_PROGRAM GetRGBProgram(void) -{ - return sLEDProgram; -} - -//---------------------------------------------------------------------------- -// Sets hue from 0-764 -//---------------------------------------------------------------------------- -void SetHSBHue(uint16_t hue) -{ - uint8_t brightness = 0; - - // Save hue for later - if (hue > 764) - { - hueValue = 0; - } - else - { - hueValue = hue; - } - - // Calculate brightness with the lookuptable - brightness = su8BrightnessTable[brightnessValue]; //input: 0..63 output: 0..255 - - // Calculate RGB values - setValue_Red = ((brightness + 1) * HSBtoRed(hueValue, saturationValue)) >> 8; - setValue_Green = ((brightness + 1) * HSBtoGreen(hueValue, saturationValue)) >> 8; - setValue_Blue = ((brightness + 1) * HSBtoBlue(hueValue, saturationValue)) >> 8; -} - -//---------------------------------------------------------------------------- -// Gets hue from 0-764 -//---------------------------------------------------------------------------- -uint16_t GetHSBHue(void) -{ - return hueValue; -} - -//---------------------------------------------------------------------------- -// Sets saturation from 0-128 -//---------------------------------------------------------------------------- -void SetHSBSaturation(uint8_t saturation) -{ - uint8_t brightness = 0; - - // Save Saturation for later - saturationValue = MAX(saturation, 128); - - // Calculate brightness with the lookuptable - brightness = su8BrightnessTable[brightnessValue]; //input: 0..63 output: 0..255 - - // Calculate RGB values - setValue_Red = ((brightness + 1) * HSBtoRed(hueValue, saturationValue)) >> 8; - setValue_Green = ((brightness + 1) * HSBtoGreen(hueValue, saturationValue)) >> 8; - setValue_Blue = ((brightness + 1) * HSBtoBlue(hueValue, saturationValue)) >> 8; -} - -//---------------------------------------------------------------------------- -// Gets saturation from 0-128 -//---------------------------------------------------------------------------- -uint8_t GetHSBSaturation(void) -{ - return saturationValue; -} - -//---------------------------------------------------------------------------- -// Sets brightness from 0-63 -//---------------------------------------------------------------------------- -void SetHSBBrightness(uint8_t brightnessVal) -{ - uint8_t brightness = 0; - - // Save brightness for later - brightnessValue = MAX(brightnessVal, 63); - - // Calculate brightness with the lookuptable - brightness = su8BrightnessTable[brightnessValue]; //input: 0..63 output: 0..255 - - // Calculate RGB values - setValue_Red = ((brightness + 1) * HSBtoRed(hueValue, saturationValue)) >> 8; - setValue_Green = ((brightness + 1) * HSBtoGreen(hueValue, saturationValue)) >> 8; - setValue_Blue = ((brightness + 1) * HSBtoBlue(hueValue, saturationValue)) >> 8; -} - -//---------------------------------------------------------------------------- -// Gets brightness from 0-63 -//---------------------------------------------------------------------------- -uint8_t GetHSBBrightness(void) -{ - return brightnessValue; -} - -//---------------------------------------------------------------------------- -// Sets fading speed from 200-1000 -//---------------------------------------------------------------------------- -void SetSpeedFading(uint16_t speed) -{ - speedFading = CLAMP(speed, 200, 1000); -} - -//---------------------------------------------------------------------------- -// Gets fading speed from 200-1000 -//---------------------------------------------------------------------------- -uint16_t GetSpeedFading(void) -{ - return speedFading; -} - -//---------------------------------------------------------------------------- -// Sets blink speed from 700-2400 -//---------------------------------------------------------------------------- -void SetSpeedBlink(uint16_t speed) -{ - speedBlink = CLAMP(speed, 700, 2400); -} - -//---------------------------------------------------------------------------- -// Gets blink speed from 700-2400 -//---------------------------------------------------------------------------- -uint16_t GetSpeedBlink(void) -{ - return speedBlink; -} - -//---------------------------------------------------------------------------- -// Sets strobe speed from 0-1000 -//---------------------------------------------------------------------------- -void SetSpeedStrobe(uint16_t speed) -{ - speedStrobe = CLAMP(speed, 40, 400); -} - -//---------------------------------------------------------------------------- -// Gets strobe speed from 0-1000 -//---------------------------------------------------------------------------- -uint16_t GetSpeedStrobe(void) -{ - return speedStrobe; -} - -//---------------------------------------------------------------------------- -// Hue to red -//---------------------------------------------------------------------------- -uint8_t HSBtoRed(uint16_t hue, uint8_t sat) -{ - unsigned char red_val = 0; - - if (hue > 764) - { - hue = 0; - } - if (hue < 255) - { - red_val = (10880 - sat * (hue - 170)) >> 7; - } - else if (hue < 510) - { - red_val = (10880 - sat * 85) >> 7; - } - else - { - red_val = (10880 - sat * (595 - hue)) >> 7; - } - - return red_val; -} - -//---------------------------------------------------------------------------- -// Hue to green -//---------------------------------------------------------------------------- -uint8_t HSBtoGreen(uint16_t hue, uint8_t sat) -{ - uint8_t green_val = 0; - - if (hue > 764) - { - hue = 0; - } - if (hue < 255) - { - green_val = (10880 - sat * (85 - hue)) >> 7; - } - else if (hue < 510) - { - green_val = (10880 - sat * (hue - 425)) >> 7; - } - else - { - green_val = (10880 - sat * 85) >> 7; - } - - return green_val; -} - -//---------------------------------------------------------------------------- -// Hue to blue -//---------------------------------------------------------------------------- -uint8_t HSBtoBlue(uint16_t hue, uint8_t sat) -{ - uint8_t blue_val = 0; - - if (hue > 764) - { - hue = 0; - } - if (hue < 255) - { - blue_val = (10880 - sat * 85) >> 7; - } - else if (hue < 510) - { - blue_val = (10880 - sat * (340 - hue)) >> 7; - } - else - { - blue_val = (10880 - sat * (hue - 680)) >> 7; - } - - return blue_val; -} -#endif +/* +* This file is part of the Hoverboard Utility Gateway System (HUGS) project. +* +* The HUGS project goal is to enable Hoverboards, or Hoverboard drive components +* to be re-purposed to provide low-cost mobility to other systems, such +* as assistive devices for the disabled, general purpose robots or other +* labor saving devices. +* +* Copyright (C) 2020 Phil Malone +* Copyright (C) 2018 Florian Staeblein +* Copyright (C) 2018 Jakob Broemauer +* Copyright (C) 2018 Kai Liebich +* Copyright (C) 2018 Christoph Lehnert +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +*/ + +#include "gd32f1x0.h" +#include "../Inc/led.h" +#include "../Inc/defines.h" + +// Only slave has LED mechanism +#ifdef SLAVE + +// Lookuptable for brightness +static unsigned char su8BrightnessTable[64] = + {0,0,1,1,1,2,2,2,2,2,2,3,3,3,3,4,4,4,5,5,6, + 6,7,8,8,9,10,11,12,13,14,15,17,18,20,22,24, + 26,28,31,34,37,40,44,48,52,57,62,68,74,81,89, + 97,106,116,126,138,150,164,179,196,214,234,255}; + +// Variables for RGB output +uint8_t counter_Red = 0; +uint8_t counter_Green = 0; +uint8_t counter_Blue = 0; +uint8_t setValue_Red = 0; +uint8_t setValue_Green = 0; +uint8_t setValue_Blue = 0; + +// Variables for HSB calculation +static uint16_t hueValue = 0; +static uint8_t saturationValue = 128; +static uint8_t brightnessValue = 63; + +// Variable for LED-program +static LED_PROGRAM sLEDProgram = LED_OFF; + +// Variables for effects +static uint16_t speedFading = 150; // Fading-Delay +static uint16_t speedBlink = 1274; // Blink-Delay +static uint16_t speedStrobe = 40; // Strobe-Delay + +// Counter for effects +static uint16_t fadingCounter = 0; +static uint16_t blinkCounter = 0; +static uint16_t strobeCounter = 0; +static FlagStatus strobeToggle = RESET; + +// Prototypes +uint8_t HSBtoRed(uint16_t hue, uint8_t sat); +uint8_t HSBtoGreen(uint16_t hue, uint8_t sat); +uint8_t HSBtoBlue(uint16_t hue, uint8_t sat); + +//---------------------------------------------------------------------------- +// Update RGB LED output with 16kHz +//---------------------------------------------------------------------------- +void CalculateLEDPWM(void) +{ + // Upcounting with overflow + counter_Red++; + counter_Green++; + counter_Blue++; + + // Set LEDs + gpio_bit_write(UPPER_LED_PORT, UPPER_LED_PIN, counter_Red >= setValue_Red ? RESET : SET); + gpio_bit_write(LOWER_LED_PORT, LOWER_LED_PIN, counter_Green >= setValue_Green ? RESET : SET); + gpio_bit_write(MOSFET_OUT_PORT, MOSFET_OUT_PIN, counter_Blue >= setValue_Blue ? RESET : SET); +} + +//---------------------------------------------------------------------------- +// Update RGB LED program every 1ms +//---------------------------------------------------------------------------- +void CalculateLEDProgram(void) +{ + if (GetRGBProgram() == LED_HSB_FADE) + { + fadingCounter++; + if(fadingCounter >= GetSpeedFading()) + { + fadingCounter = 0; + SetHSBHue(GetHSBHue()+1); + } + } + if (GetRGBProgram() == LED_HSB_BLINK) + { + blinkCounter++; + if(blinkCounter >= GetSpeedBlink()) + { + blinkCounter = 0; + SetHSBHue(GetHSBHue()+50); + } + } + if(GetRGBProgram() == LED_HSB_STROBE) + { + strobeCounter++; + if(strobeCounter >= GetSpeedStrobe()) + { + strobeCounter = 0; + if(strobeToggle == RESET) + { + strobeToggle = SET; + SetHSBBrightness(0); + } + else + { + strobeToggle = RESET; + SetHSBBrightness(63); + } + } + } +} + +//---------------------------------------------------------------------------- +// Sets LED program +//---------------------------------------------------------------------------- +void SetRGBProgram(LED_PROGRAM Program) +{ + // Check program count + if(!(Program < COUNT_PROGRAMS)) + { + Program = LED_OFF; + } + + // Save program for later + sLEDProgram = Program; + + switch(Program) + { + case LED_HSB: + case LED_HSB_BLINK: + case LED_HSB_FADE: + case LED_HSB_STROBE: + SetHSBHue(hueValue); + SetHSBSaturation(saturationValue); + SetHSBBrightness(brightnessValue); + break; + case LED_OFF: + default: + setValue_Red = 0; + setValue_Green = 0; + setValue_Blue = 0; + break; + } +} + +//---------------------------------------------------------------------------- +// Gets LED program +//---------------------------------------------------------------------------- +LED_PROGRAM GetRGBProgram(void) +{ + return sLEDProgram; +} + +//---------------------------------------------------------------------------- +// Sets hue from 0-764 +//---------------------------------------------------------------------------- +void SetHSBHue(uint16_t hue) +{ + uint8_t brightness = 0; + + // Save hue for later + if (hue > 764) + { + hueValue = 0; + } + else + { + hueValue = hue; + } + + // Calculate brightness with the lookuptable + brightness = su8BrightnessTable[brightnessValue]; //input: 0..63 output: 0..255 + + // Calculate RGB values + setValue_Red = ((brightness + 1) * HSBtoRed(hueValue, saturationValue)) >> 8; + setValue_Green = ((brightness + 1) * HSBtoGreen(hueValue, saturationValue)) >> 8; + setValue_Blue = ((brightness + 1) * HSBtoBlue(hueValue, saturationValue)) >> 8; +} + +//---------------------------------------------------------------------------- +// Gets hue from 0-764 +//---------------------------------------------------------------------------- +uint16_t GetHSBHue(void) +{ + return hueValue; +} + +//---------------------------------------------------------------------------- +// Sets saturation from 0-128 +//---------------------------------------------------------------------------- +void SetHSBSaturation(uint8_t saturation) +{ + uint8_t brightness = 0; + + // Save Saturation for later + saturationValue = MAX(saturation, 128); + + // Calculate brightness with the lookuptable + brightness = su8BrightnessTable[brightnessValue]; //input: 0..63 output: 0..255 + + // Calculate RGB values + setValue_Red = ((brightness + 1) * HSBtoRed(hueValue, saturationValue)) >> 8; + setValue_Green = ((brightness + 1) * HSBtoGreen(hueValue, saturationValue)) >> 8; + setValue_Blue = ((brightness + 1) * HSBtoBlue(hueValue, saturationValue)) >> 8; +} + +//---------------------------------------------------------------------------- +// Gets saturation from 0-128 +//---------------------------------------------------------------------------- +uint8_t GetHSBSaturation(void) +{ + return saturationValue; +} + +//---------------------------------------------------------------------------- +// Sets brightness from 0-63 +//---------------------------------------------------------------------------- +void SetHSBBrightness(uint8_t brightnessVal) +{ + uint8_t brightness = 0; + + // Save brightness for later + brightnessValue = MAX(brightnessVal, 63); + + // Calculate brightness with the lookuptable + brightness = su8BrightnessTable[brightnessValue]; //input: 0..63 output: 0..255 + + // Calculate RGB values + setValue_Red = ((brightness + 1) * HSBtoRed(hueValue, saturationValue)) >> 8; + setValue_Green = ((brightness + 1) * HSBtoGreen(hueValue, saturationValue)) >> 8; + setValue_Blue = ((brightness + 1) * HSBtoBlue(hueValue, saturationValue)) >> 8; +} + +//---------------------------------------------------------------------------- +// Gets brightness from 0-63 +//---------------------------------------------------------------------------- +uint8_t GetHSBBrightness(void) +{ + return brightnessValue; +} + +//---------------------------------------------------------------------------- +// Sets fading speed from 200-1000 +//---------------------------------------------------------------------------- +void SetSpeedFading(uint16_t speed) +{ + speedFading = CLAMP(speed, 200, 1000); +} + +//---------------------------------------------------------------------------- +// Gets fading speed from 200-1000 +//---------------------------------------------------------------------------- +uint16_t GetSpeedFading(void) +{ + return speedFading; +} + +//---------------------------------------------------------------------------- +// Sets blink speed from 700-2400 +//---------------------------------------------------------------------------- +void SetSpeedBlink(uint16_t speed) +{ + speedBlink = CLAMP(speed, 700, 2400); +} + +//---------------------------------------------------------------------------- +// Gets blink speed from 700-2400 +//---------------------------------------------------------------------------- +uint16_t GetSpeedBlink(void) +{ + return speedBlink; +} + +//---------------------------------------------------------------------------- +// Sets strobe speed from 0-1000 +//---------------------------------------------------------------------------- +void SetSpeedStrobe(uint16_t speed) +{ + speedStrobe = CLAMP(speed, 40, 400); +} + +//---------------------------------------------------------------------------- +// Gets strobe speed from 0-1000 +//---------------------------------------------------------------------------- +uint16_t GetSpeedStrobe(void) +{ + return speedStrobe; +} + +//---------------------------------------------------------------------------- +// Hue to red +//---------------------------------------------------------------------------- +uint8_t HSBtoRed(uint16_t hue, uint8_t sat) +{ + unsigned char red_val = 0; + + if (hue > 764) + { + hue = 0; + } + if (hue < 255) + { + red_val = (10880 - sat * (hue - 170)) >> 7; + } + else if (hue < 510) + { + red_val = (10880 - sat * 85) >> 7; + } + else + { + red_val = (10880 - sat * (595 - hue)) >> 7; + } + + return red_val; +} + +//---------------------------------------------------------------------------- +// Hue to green +//---------------------------------------------------------------------------- +uint8_t HSBtoGreen(uint16_t hue, uint8_t sat) +{ + uint8_t green_val = 0; + + if (hue > 764) + { + hue = 0; + } + if (hue < 255) + { + green_val = (10880 - sat * (85 - hue)) >> 7; + } + else if (hue < 510) + { + green_val = (10880 - sat * (hue - 425)) >> 7; + } + else + { + green_val = (10880 - sat * 85) >> 7; + } + + return green_val; +} + +//---------------------------------------------------------------------------- +// Hue to blue +//---------------------------------------------------------------------------- +uint8_t HSBtoBlue(uint16_t hue, uint8_t sat) +{ + uint8_t blue_val = 0; + + if (hue > 764) + { + hue = 0; + } + if (hue < 255) + { + blue_val = (10880 - sat * 85) >> 7; + } + else if (hue < 510) + { + blue_val = (10880 - sat * (340 - hue)) >> 7; + } + else + { + blue_val = (10880 - sat * (hue - 680)) >> 7; + } + + return blue_val; +} +#endif diff --git a/HUGS/Src/main.c b/HUGS/Src/main.c new file mode 100644 index 00000000..4e931a52 --- /dev/null +++ b/HUGS/Src/main.c @@ -0,0 +1,228 @@ +/* +* This file is part of the Hoverboard Utility Gateway System (HUGS) project. +* +* The HUGS project goal is to enable Hoverboards, or Hoverboard drive components +* to be re-purposed to provide low-cost mobility to other systems, such +* as assistive devices for the disabled, general purpose robots or other +* labor saving devices. +* +* Copyright (C) 2020 Phil Malone +* Copyright (C) 2018 Florian Staeblein +* Copyright (C) 2018 Jakob Broemauer +* Copyright (C) 2018 Kai Liebich +* Copyright (C) 2018 Christoph Lehnert +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* Overall Project Revision History +* Rev Date Description +* 2.0 5/8/2020 Switch to HUGS 2.0 (Little Endian) +* Change speeds over to mm/s +* 2.1 5/14/2020 Added Motion Response. +*/ + +#define ARM_MATH_CM3 + +#include "gd32f1x0.h" + +#include "../Inc/setup.h" +#include "../Inc/defines.h" +#include "../Inc/config.h" +#include "../Inc/it.h" +#include "../Inc/bldc.h" +#include "../Inc/comms.h" +#include "../Inc/commsHUGS.h" +#include "../Inc/commsSteering.h" +#include "stdio.h" +#include "stdlib.h" +#include "string.h" +#include + +FlagStatus activateWeakening = RESET; // global variable for weakening + +extern uint16_t batteryVoltagemV; // global variable for battery voltage + +extern FlagStatus timedOut; // Timeoutvariable set by timeout timer + +extern bool HUGS_ESTOP; + +extern uint8_t buzzerFreq; // global variable for the buzzer pitch. can be 1, 2, 3, 4, 5, 6, 7... +extern uint8_t buzzerPattern; // global variable for the buzzer pattern. can be 1, 2, 3, 4, 5, 6, 7... + +uint32_t inactivityTimer = 0; // Inactivity counter ms From last command + +void ShowBatteryState(uint32_t pin); +void ShutOff(void); + +//---------------------------------------------------------------------------- +// MAIN function +//---------------------------------------------------------------------------- +int main (void) +{ + //SystemClock_Config(); + SystemCoreClockUpdate(); + SysTick_Config(SystemCoreClock / 100); + + // Init watchdog + if (Watchdog_init() == ERROR) + { + // If an error accours with watchdog initialization do not start device + while(1); + } + + // Init Interrupts + Interrupt_init(); + + // Init timeout timer + TimeoutTimer_init(); + + // Init GPIOs + GPIO_init(); + + // Activate self hold direct after GPIO-init + gpio_bit_write(SELF_HOLD_PORT, SELF_HOLD_PIN, SET); + + // Init usart master slave + USART_HUGS_init(); + + // Init ADC + ADC_init(); + + // Init PWM + PWM_init(); + + // Device has 1,6 seconds to do all the initialization + // afterwards watchdog will be fired + fwdgt_counter_reload(); + + // Init usart steer/bluetooth + USART_Steer_COM_init(); + + // Startup-Sound. This plays for 1 second + buzzerFreq = 7; + Delay(1000); + fwdgt_counter_reload(); + buzzerFreq = 0; + + // Wait until button is pressed ???? + while (gpio_input_bit_get(BUTTON_PORT, BUTTON_PIN)) + { + // Reload watchdog while button is pressed + fwdgt_counter_reload(); + } + + while(1) + { + // Shut device if ESTOP requested or when button is pressed + if (HUGS_ESTOP || gpio_input_bit_get(BUTTON_PORT, BUTTON_PIN)) + { + ShutOff(); + } + + // Shut off device after INACTIVITY_TIMEOUT in minutes + if (inactivityTimer++ > INACTIVITY_COUNTER) + { + ShutOff(); + } else if (inactivityTimer > INACTIVITY_WARNING) { + buzzerFreq = 8; + buzzerPattern = 8; + } else { + + // Show green battery symbol when battery level BAT_LOW_LVL1 is reached + if (batteryVoltagemV > BAT_LOW_LVL1_MV) + { + // Show green battery light + ShowBatteryState(LED_GREEN); + buzzerFreq = 0; + } + // Make silent sound and show orange battery symbol when battery level BAT_LOW_LVL2 is reached + else if (batteryVoltagemV > BAT_LOW_LVL2_MV && batteryVoltagemV < BAT_LOW_LVL1_MV) + { + // Show orange battery light + ShowBatteryState(LED_ORANGE); + buzzerFreq = 5; + buzzerPattern = 8; + } + // Make even more sound and show red battery symbol when battery level BAT_LOW_DEAD is reached + else if (batteryVoltagemV > BAT_LOW_DEAD_MV && batteryVoltagemV < BAT_LOW_LVL2_MV) + { + // Show red battery light + ShowBatteryState(LED_RED); + buzzerFreq = 5; + buzzerPattern = 1; + } + else + { + ShutOff(); + } + } + + + Delay(DELAY_IN_MAIN_LOOP); + + // Reload watchdog (watchdog fires after 1,6 seconds) + fwdgt_counter_reload(); + } +} + +//---------------------------------------------------------------------------- +// Turns the device off +//---------------------------------------------------------------------------- +void ShutOff(void) +{ + int index = 0; + buzzerPattern = 0; + + // Reload watchdog (watchdog fires after 1,6 seconds) + fwdgt_counter_reload(); + + // Ensure that drive is off and estop status set. + SetPWM(0); + HUGS_ESTOP = TRUE; + SetEnable(RESET); + SendHUGSReply(); // Transfer ESTOP to Controller + SendHUGSCmd(XXX, 0); // Tell possible slave to stop as well. + + + // Play shutdown sound + for (index = 0; index < 8; index++) + { + buzzerFreq = index; + Delay(100); + } + buzzerFreq = 0; + + // Disable usart + usart_deinit(USART_HUGS); + + // Turn off power + gpio_bit_write(SELF_HOLD_PORT, SELF_HOLD_PIN, RESET); + while(1) + { + // Reload watchdog until device is off + fwdgt_counter_reload(); + } +} + +//---------------------------------------------------------------------------- +// Shows the battery state on the LEDs +//---------------------------------------------------------------------------- +void ShowBatteryState(uint32_t pin) +{ + gpio_bit_write(LED_GREEN_PORT, LED_GREEN, pin == LED_GREEN ? SET : RESET); + gpio_bit_write(LED_ORANGE_PORT, LED_ORANGE, pin == LED_ORANGE ? SET : RESET); + gpio_bit_write(LED_RED_PORT, LED_RED, pin == LED_RED ? SET : RESET); +} + + +void resetInactivityTimer(void) { + inactivityTimer = 0; +} diff --git a/HoverBoardGigaDevice/Src/setup.c b/HUGS/Src/setup.c similarity index 87% rename from HoverBoardGigaDevice/Src/setup.c rename to HUGS/Src/setup.c index 80fbaef5..430cb780 100644 --- a/HoverBoardGigaDevice/Src/setup.c +++ b/HUGS/Src/setup.c @@ -1,497 +1,490 @@ -/* -* This file is part of the hoverboard-firmware-hack-V2 project. The -* firmware is used to hack the generation 2 board of the hoverboard. -* These new hoverboards have no mainboard anymore. They consist of -* two Sensorboards which have their own BLDC-Bridge per Motor and an -* ARM Cortex-M3 processor GD32F130C8. -* -* Copyright (C) 2018 Florian Staeblein -* Copyright (C) 2018 Jakob Broemauer -* Copyright (C) 2018 Kai Liebich -* Copyright (C) 2018 Christoph Lehnert -* -* The program is based on the hoverboard project by Niklas Fauth. The -* structure was tried to be as similar as possible, so that everyone -* could find a better way through the code. -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -*/ - -#include "gd32f1x0.h" -#include "../Inc/setup.h" -#include "../Inc/defines.h" -#include "../Inc/config.h" -#include "../Inc/it.h" - -#define TIMEOUT_FREQ 1000 - -// timeout timer parameter structs -timer_parameter_struct timeoutTimer_paramter_struct; - -// PWM timer Parameter structs -timer_parameter_struct timerBldc_paramter_struct; -timer_break_parameter_struct timerBldc_break_parameter_struct; -timer_oc_parameter_struct timerBldc_oc_parameter_struct; - -// DMA (USART) structs -dma_parameter_struct dma_init_struct_usart; -uint8_t usartMasterSlave_rx_buf[USART_MASTERSLAVE_RX_BUFFERSIZE]; -uint8_t usartSteer_COM_rx_buf[USART_STEER_COM_RX_BUFFERSIZE]; - -// DMA (ADC) structs -dma_parameter_struct dma_init_struct_adc; -extern adc_buf_t adc_buffer; - -//---------------------------------------------------------------------------- -// Initializes the interrupts -//---------------------------------------------------------------------------- -void Interrupt_init(void) -{ - // Set IRQ priority configuration - nvic_priority_group_set(NVIC_PRIGROUP_PRE4_SUB0); -} - -//---------------------------------------------------------------------------- -// Initializes the watchdog -//---------------------------------------------------------------------------- -ErrStatus Watchdog_init(void) -{ - // Check if the system has resumed from FWDGT reset - if (RESET != rcu_flag_get(RCU_FLAG_FWDGTRST)) - { - // FWDGTRST flag set - rcu_all_reset_flag_clear(); - } - - // Clock source is IRC40K (40 kHz) - // Prescaler is 16 - // Reload value is 4096 (0x0FFF) - // Watchdog fires after 1638.4 ms - if (fwdgt_config(0x0FFF, FWDGT_PSC_DIV16) != SUCCESS || - fwdgt_window_value_config(0x0FFF) != SUCCESS) - { - return ERROR; - } - - // Enable free watchdog timer - fwdgt_enable(); - - return SUCCESS; -} - -//---------------------------------------------------------------------------- -// Initializes the timeout timer -//---------------------------------------------------------------------------- -void TimeoutTimer_init(void) -{ - // Enable timer clock - rcu_periph_clock_enable(RCU_TIMER13); - - // Initial deinitialize of the timer - timer_deinit(TIMER13); - - // Set up the basic parameter struct for the timer - // Update event will be fired every 1ms - timeoutTimer_paramter_struct.counterdirection = TIMER_COUNTER_UP; - timeoutTimer_paramter_struct.prescaler = 0; - timeoutTimer_paramter_struct.alignedmode = TIMER_COUNTER_CENTER_DOWN; - timeoutTimer_paramter_struct.period = 72000000 / 2 / TIMEOUT_FREQ; - timeoutTimer_paramter_struct.clockdivision = TIMER_CKDIV_DIV1; - timeoutTimer_paramter_struct.repetitioncounter = 0; - timer_auto_reload_shadow_disable(TIMER13); - timer_init(TIMER13, &timeoutTimer_paramter_struct); - - // Enable TIMER_INT_UP interrupt and set priority - nvic_irq_enable(TIMER13_IRQn, 0, 0); - timer_interrupt_enable(TIMER13, TIMER_INT_UP); - - // Enable timer - timer_enable(TIMER13); -} - -//---------------------------------------------------------------------------- -// Initializes the GPIOs -//---------------------------------------------------------------------------- -void GPIO_init(void) -{ - // Enable all GPIO clocks - rcu_periph_clock_enable(RCU_GPIOA); - rcu_periph_clock_enable(RCU_GPIOB); - rcu_periph_clock_enable(RCU_GPIOC); - rcu_periph_clock_enable(RCU_GPIOF); - - // Init green LED - gpio_mode_set(LED_GREEN_PORT , GPIO_MODE_OUTPUT, GPIO_PUPD_NONE,LED_GREEN); - gpio_output_options_set(LED_GREEN_PORT, GPIO_OTYPE_PP, GPIO_OSPEED_10MHZ, LED_GREEN); - - // Init red LED - gpio_mode_set(LED_RED_PORT , GPIO_MODE_OUTPUT, GPIO_PUPD_NONE,LED_RED); - gpio_output_options_set(LED_RED_PORT, GPIO_OTYPE_PP, GPIO_OSPEED_10MHZ, LED_RED); - - // Init orange LED - gpio_mode_set(LED_ORANGE_PORT , GPIO_MODE_OUTPUT, GPIO_PUPD_NONE,LED_ORANGE); - gpio_output_options_set(LED_ORANGE_PORT, GPIO_OTYPE_PP, GPIO_OSPEED_10MHZ, LED_ORANGE); - - // Init UPPER/LOWER LED - gpio_mode_set(UPPER_LED_PORT , GPIO_MODE_OUTPUT, GPIO_PUPD_NONE,UPPER_LED_PIN); - gpio_output_options_set(UPPER_LED_PORT, GPIO_OTYPE_PP, GPIO_OSPEED_10MHZ, UPPER_LED_PIN); - gpio_mode_set(LOWER_LED_PORT , GPIO_MODE_OUTPUT, GPIO_PUPD_NONE,LOWER_LED_PIN); - gpio_output_options_set(LOWER_LED_PORT, GPIO_OTYPE_PP, GPIO_OSPEED_10MHZ, LOWER_LED_PIN); - - // Init mosfet output - gpio_mode_set(MOSFET_OUT_PORT, GPIO_MODE_OUTPUT, GPIO_PUPD_NONE, MOSFET_OUT_PIN); - gpio_output_options_set(MOSFET_OUT_PORT, GPIO_OTYPE_PP, GPIO_OSPEED_50MHZ, MOSFET_OUT_PIN); - - // Init HAL input - gpio_mode_set(HALL_A_PORT , GPIO_MODE_INPUT, GPIO_PUPD_NONE, HALL_A_PIN); - gpio_mode_set(HALL_B_PORT , GPIO_MODE_INPUT, GPIO_PUPD_NONE, HALL_B_PIN); - gpio_mode_set(HALL_C_PORT , GPIO_MODE_INPUT, GPIO_PUPD_NONE, HALL_C_PIN); - - // Init USART_MASTERSLAVE - gpio_mode_set(USART_MASTERSLAVE_TX_PORT , GPIO_MODE_AF, GPIO_PUPD_PULLUP, USART_MASTERSLAVE_TX_PIN); - gpio_mode_set(USART_MASTERSLAVE_RX_PORT , GPIO_MODE_AF, GPIO_PUPD_PULLUP, USART_MASTERSLAVE_RX_PIN); - gpio_output_options_set(USART_MASTERSLAVE_TX_PORT, GPIO_OTYPE_PP, GPIO_OSPEED_50MHZ, USART_MASTERSLAVE_TX_PIN); - gpio_output_options_set(USART_MASTERSLAVE_RX_PORT, GPIO_OTYPE_PP, GPIO_OSPEED_50MHZ, USART_MASTERSLAVE_RX_PIN); - gpio_af_set(USART_MASTERSLAVE_TX_PORT, GPIO_AF_1, USART_MASTERSLAVE_TX_PIN); - gpio_af_set(USART_MASTERSLAVE_RX_PORT, GPIO_AF_1, USART_MASTERSLAVE_RX_PIN); - - // Init ADC pins - gpio_mode_set(VBATT_PORT, GPIO_MODE_ANALOG, GPIO_PUPD_NONE, VBATT_PIN); - gpio_mode_set(CURRENT_DC_PORT, GPIO_MODE_ANALOG, GPIO_PUPD_NONE, CURRENT_DC_PIN); - gpio_mode_set(GPIOA, GPIO_MODE_ANALOG, GPIO_PUPD_NONE, GPIO_PIN_6); - gpio_mode_set(GPIOB, GPIO_MODE_ANALOG, GPIO_PUPD_NONE, GPIO_PIN_0); - - // Init debug pin - gpio_mode_set(DEBUG_PORT , GPIO_MODE_OUTPUT, GPIO_PUPD_NONE, DEBUG_PIN); - gpio_output_options_set(DEBUG_PORT, GPIO_OTYPE_PP, GPIO_OSPEED_50MHZ, DEBUG_PIN); - - // Init emergency shutdown pin - gpio_mode_set(TIMER_BLDC_EMERGENCY_SHUTDOWN_PORT , GPIO_MODE_AF, GPIO_PUPD_NONE, TIMER_BLDC_EMERGENCY_SHUTDOWN_PIN); - gpio_af_set(TIMER_BLDC_EMERGENCY_SHUTDOWN_PORT, GPIO_AF_2, TIMER_BLDC_EMERGENCY_SHUTDOWN_PIN); - - // Init PWM output Pins (Configure as alternate functions, push-pull, no pullup) - gpio_mode_set(TIMER_BLDC_GH_PORT, GPIO_MODE_AF, GPIO_PUPD_NONE, TIMER_BLDC_GH_PIN); - gpio_mode_set(TIMER_BLDC_BH_PORT, GPIO_MODE_AF, GPIO_PUPD_NONE, TIMER_BLDC_BH_PIN); - gpio_mode_set(TIMER_BLDC_YH_PORT, GPIO_MODE_AF, GPIO_PUPD_NONE, TIMER_BLDC_YH_PIN); - gpio_mode_set(TIMER_BLDC_GL_PORT, GPIO_MODE_AF, GPIO_PUPD_NONE, TIMER_BLDC_GL_PIN); - gpio_mode_set(TIMER_BLDC_BL_PORT, GPIO_MODE_AF, GPIO_PUPD_NONE, TIMER_BLDC_BL_PIN); - gpio_mode_set(TIMER_BLDC_YL_PORT, GPIO_MODE_AF, GPIO_PUPD_NONE, TIMER_BLDC_YL_PIN); - - gpio_output_options_set(TIMER_BLDC_GH_PORT, GPIO_OTYPE_PP, GPIO_OSPEED_2MHZ, TIMER_BLDC_GH_PIN); - gpio_output_options_set(TIMER_BLDC_BH_PORT, GPIO_OTYPE_PP, GPIO_OSPEED_2MHZ, TIMER_BLDC_BH_PIN); - gpio_output_options_set(TIMER_BLDC_YH_PORT, GPIO_OTYPE_PP, GPIO_OSPEED_2MHZ, TIMER_BLDC_YH_PIN); - gpio_output_options_set(TIMER_BLDC_GL_PORT, GPIO_OTYPE_PP, GPIO_OSPEED_2MHZ, TIMER_BLDC_GL_PIN); - gpio_output_options_set(TIMER_BLDC_BL_PORT, GPIO_OTYPE_PP, GPIO_OSPEED_2MHZ, TIMER_BLDC_BL_PIN); - gpio_output_options_set(TIMER_BLDC_YL_PORT, GPIO_OTYPE_PP, GPIO_OSPEED_2MHZ, TIMER_BLDC_YL_PIN); - - gpio_af_set(TIMER_BLDC_GH_PORT, GPIO_AF_2, TIMER_BLDC_GH_PIN); - gpio_af_set(TIMER_BLDC_BH_PORT, GPIO_AF_2, TIMER_BLDC_BH_PIN); - gpio_af_set(TIMER_BLDC_YH_PORT, GPIO_AF_2, TIMER_BLDC_YH_PIN); - gpio_af_set(TIMER_BLDC_GL_PORT, GPIO_AF_2, TIMER_BLDC_GL_PIN); - gpio_af_set(TIMER_BLDC_BL_PORT, GPIO_AF_2, TIMER_BLDC_BL_PIN); - gpio_af_set(TIMER_BLDC_YL_PORT, GPIO_AF_2, TIMER_BLDC_YL_PIN); - - // Init self hold - gpio_mode_set(SELF_HOLD_PORT , GPIO_MODE_OUTPUT, GPIO_PUPD_NONE, SELF_HOLD_PIN); - gpio_output_options_set(SELF_HOLD_PORT, GPIO_OTYPE_PP, GPIO_OSPEED_10MHZ, SELF_HOLD_PIN); - - // Init USART0 - gpio_mode_set(USART_STEER_COM_TX_PORT , GPIO_MODE_AF, GPIO_PUPD_PULLUP, USART_STEER_COM_TX_PIN); - gpio_mode_set(USART_STEER_COM_RX_PORT , GPIO_MODE_AF, GPIO_PUPD_PULLUP, USART_STEER_COM_RX_PIN); - gpio_output_options_set(USART_STEER_COM_TX_PORT, GPIO_OTYPE_PP, GPIO_OSPEED_50MHZ, USART_STEER_COM_TX_PIN); - gpio_output_options_set(USART_STEER_COM_RX_PORT, GPIO_OTYPE_PP, GPIO_OSPEED_50MHZ, USART_STEER_COM_RX_PIN); - gpio_af_set(USART_STEER_COM_TX_PORT, GPIO_AF_0, USART_STEER_COM_TX_PIN); - gpio_af_set(USART_STEER_COM_RX_PORT, GPIO_AF_0, USART_STEER_COM_RX_PIN); - -#ifdef MASTER - // Init buzzer - gpio_mode_set(BUZZER_PORT , GPIO_MODE_OUTPUT, GPIO_PUPD_NONE, BUZZER_PIN); - gpio_output_options_set(BUZZER_PORT, GPIO_OTYPE_PP, GPIO_OSPEED_50MHZ, BUZZER_PIN); - - // Init button - gpio_mode_set(BUTTON_PORT , GPIO_MODE_INPUT, GPIO_PUPD_NONE, BUTTON_PIN); - - // Init charge state - gpio_mode_set(CHARGE_STATE_PORT, GPIO_MODE_INPUT, GPIO_PUPD_PULLUP, CHARGE_STATE_PIN); -#endif -} - -//---------------------------------------------------------------------------- -// Initializes the PWM -//---------------------------------------------------------------------------- -void PWM_init(void) -{ - // Enable timer clock - rcu_periph_clock_enable(RCU_TIMER_BLDC); - - // Initial deinitialize of the timer - timer_deinit(TIMER_BLDC); - - // Set up the basic parameter struct for the timer - timerBldc_paramter_struct.counterdirection = TIMER_COUNTER_UP; - timerBldc_paramter_struct.prescaler = 0; - timerBldc_paramter_struct.alignedmode = TIMER_COUNTER_CENTER_DOWN; - timerBldc_paramter_struct.period = 72000000 / 2 / PWM_FREQ; - timerBldc_paramter_struct.clockdivision = TIMER_CKDIV_DIV1; - timerBldc_paramter_struct.repetitioncounter = 0; - timer_auto_reload_shadow_disable(TIMER_BLDC); - - // Initialize timer with basic parameter struct - timer_init(TIMER_BLDC, &timerBldc_paramter_struct); - - // Deactivate output channel fastmode - timer_channel_output_fast_config(TIMER_BLDC, TIMER_BLDC_CHANNEL_G, TIMER_OC_FAST_DISABLE); - timer_channel_output_fast_config(TIMER_BLDC, TIMER_BLDC_CHANNEL_B, TIMER_OC_FAST_DISABLE); - timer_channel_output_fast_config(TIMER_BLDC, TIMER_BLDC_CHANNEL_Y, TIMER_OC_FAST_DISABLE); - - // Deactivate output channel shadow function - timer_channel_output_shadow_config(TIMER_BLDC, TIMER_BLDC_CHANNEL_G, TIMER_OC_SHADOW_DISABLE); - timer_channel_output_shadow_config(TIMER_BLDC, TIMER_BLDC_CHANNEL_B, TIMER_OC_SHADOW_DISABLE); - timer_channel_output_shadow_config(TIMER_BLDC, TIMER_BLDC_CHANNEL_Y, TIMER_OC_SHADOW_DISABLE); - - // Set output channel PWM type to PWM1 - timer_channel_output_mode_config(TIMER_BLDC, TIMER_BLDC_CHANNEL_G, TIMER_OC_MODE_PWM1); - timer_channel_output_mode_config(TIMER_BLDC, TIMER_BLDC_CHANNEL_B, TIMER_OC_MODE_PWM1); - timer_channel_output_mode_config(TIMER_BLDC, TIMER_BLDC_CHANNEL_Y, TIMER_OC_MODE_PWM1); - - // Initialize pulse length with value 0 (pulse duty factor = zero) - timer_channel_output_pulse_value_config(TIMER_BLDC, TIMER_BLDC_CHANNEL_G, 0); - timer_channel_output_pulse_value_config(TIMER_BLDC, TIMER_BLDC_CHANNEL_B, 0); - timer_channel_output_pulse_value_config(TIMER_BLDC, TIMER_BLDC_CHANNEL_Y, 0); - - // Set up the output channel parameter struct - timerBldc_oc_parameter_struct.ocpolarity = TIMER_OC_POLARITY_HIGH; - timerBldc_oc_parameter_struct.ocnpolarity = TIMER_OCN_POLARITY_LOW; - timerBldc_oc_parameter_struct.ocidlestate = TIMER_OC_IDLE_STATE_LOW; - timerBldc_oc_parameter_struct.ocnidlestate = TIMER_OCN_IDLE_STATE_HIGH; - - // Configure all three output channels with the output channel parameter struct - timer_channel_output_config(TIMER_BLDC, TIMER_BLDC_CHANNEL_G, &timerBldc_oc_parameter_struct); - timer_channel_output_config(TIMER_BLDC, TIMER_BLDC_CHANNEL_B, &timerBldc_oc_parameter_struct); - timer_channel_output_config(TIMER_BLDC, TIMER_BLDC_CHANNEL_Y, &timerBldc_oc_parameter_struct); - - // Set up the break parameter struct - timerBldc_break_parameter_struct.runoffstate = TIMER_ROS_STATE_ENABLE; - timerBldc_break_parameter_struct.ideloffstate = TIMER_IOS_STATE_DISABLE; - timerBldc_break_parameter_struct.protectmode = TIMER_CCHP_PROT_OFF; - timerBldc_break_parameter_struct.deadtime = DEAD_TIME; - timerBldc_break_parameter_struct.breakstate = TIMER_BREAK_ENABLE; - timerBldc_break_parameter_struct.breakpolarity = TIMER_BREAK_POLARITY_LOW; - timerBldc_break_parameter_struct.outputautostate = TIMER_OUTAUTO_ENABLE; - - // Configure the timer with the break parameter struct - timer_break_config(TIMER_BLDC, &timerBldc_break_parameter_struct); - - // Disable until all channels are set for PWM output - timer_disable(TIMER_BLDC); - - // Enable all three channels for PWM output - timer_channel_output_state_config(TIMER_BLDC, TIMER_BLDC_CHANNEL_G, TIMER_CCX_ENABLE); - timer_channel_output_state_config(TIMER_BLDC, TIMER_BLDC_CHANNEL_B, TIMER_CCX_ENABLE); - timer_channel_output_state_config(TIMER_BLDC, TIMER_BLDC_CHANNEL_Y, TIMER_CCX_ENABLE); - - // Enable all three complemenary channels for PWM output - timer_channel_complementary_output_state_config(TIMER_BLDC, TIMER_BLDC_CHANNEL_G, TIMER_CCXN_ENABLE); - timer_channel_complementary_output_state_config(TIMER_BLDC, TIMER_BLDC_CHANNEL_B, TIMER_CCXN_ENABLE); - timer_channel_complementary_output_state_config(TIMER_BLDC, TIMER_BLDC_CHANNEL_Y, TIMER_CCXN_ENABLE); - - // Enable TIMER_INT_UP interrupt and set priority - nvic_irq_enable(TIMER0_BRK_UP_TRG_COM_IRQn, 0, 0); - timer_interrupt_enable(TIMER_BLDC, TIMER_INT_UP); - - // Enable the timer and start PWM - timer_enable(TIMER_BLDC); -} - -//---------------------------------------------------------------------------- -// Initializes the ADC -//---------------------------------------------------------------------------- -void ADC_init(void) -{ - // Enable ADC and DMA clock - rcu_periph_clock_enable(RCU_ADC); - rcu_periph_clock_enable(RCU_DMA); - - // Configure ADC clock (APB2 clock is DIV1 -> 72MHz, ADC clock is DIV6 -> 12MHz) - rcu_adc_clock_config(RCU_ADCCK_APB2_DIV6); - - // Interrupt channel 0 enable - nvic_irq_enable(DMA_Channel0_IRQn, 1, 0); - - // Initialize DMA channel 0 for ADC - dma_deinit(DMA_CH0); - dma_init_struct_adc.direction = DMA_PERIPHERAL_TO_MEMORY; - dma_init_struct_adc.memory_addr = (uint32_t)&adc_buffer; - dma_init_struct_adc.memory_inc = DMA_MEMORY_INCREASE_ENABLE; - dma_init_struct_adc.memory_width = DMA_MEMORY_WIDTH_16BIT; - dma_init_struct_adc.number = 2; - dma_init_struct_adc.periph_addr = (uint32_t)&ADC_RDATA; - dma_init_struct_adc.periph_inc = DMA_PERIPH_INCREASE_DISABLE; - dma_init_struct_adc.periph_width = DMA_PERIPHERAL_WIDTH_16BIT; - dma_init_struct_adc.priority = DMA_PRIORITY_ULTRA_HIGH; - dma_init(DMA_CH0, dma_init_struct_adc); - - // Configure DMA mode - dma_circulation_enable(DMA_CH0); - dma_memory_to_memory_disable(DMA_CH0); - - // Enable DMA transfer complete interrupt - dma_interrupt_enable(DMA_CH0, DMA_CHXCTL_FTFIE); - - // At least clear number of remaining data to be transferred by the DMA - dma_transfer_number_config(DMA_CH0, 2); - - // Enable DMA channel 0 - dma_channel_enable(DMA_CH0); - - adc_channel_length_config(ADC_REGULAR_CHANNEL, 2); - adc_regular_channel_config(0, VBATT_CHANNEL, ADC_SAMPLETIME_13POINT5); - adc_regular_channel_config(1, CURRENT_DC_CHANNEL, ADC_SAMPLETIME_13POINT5); - adc_data_alignment_config(ADC_DATAALIGN_RIGHT); - - // Set trigger of ADC - adc_external_trigger_config(ADC_REGULAR_CHANNEL, ENABLE); - adc_external_trigger_source_config(ADC_REGULAR_CHANNEL, ADC_EXTTRIG_REGULAR_SWRCST); - - // Disable the temperature sensor, Vrefint and vbat channel - adc_tempsensor_vrefint_disable(); - adc_vbat_disable(); - - // ADC analog watchdog disable - adc_watchdog_disable(); - - // Enable ADC (must be before calibration) - adc_enable(); - - // Calibrate ADC values - adc_calibration_enable(); - - // Enable DMA request - adc_dma_mode_enable(); - - // Set ADC to scan mode - adc_special_function_config(ADC_SCAN_MODE, ENABLE); -} - -//---------------------------------------------------------------------------- -// Initializes the usart master slave -//---------------------------------------------------------------------------- -void USART_MasterSlave_init(void) -{ - // Enable ADC and DMA clock - rcu_periph_clock_enable(RCU_USART1); - rcu_periph_clock_enable(RCU_DMA); - - // Init USART for 115200 baud, 8N1 - usart_baudrate_set(USART_MASTERSLAVE, 115200); - usart_parity_config(USART_MASTERSLAVE, USART_PM_NONE); - usart_word_length_set(USART_MASTERSLAVE, USART_WL_8BIT); - usart_stop_bit_set(USART_MASTERSLAVE, USART_STB_1BIT); - usart_oversample_config(USART_MASTERSLAVE, USART_OVSMOD_16); - - // Enable both transmitter and receiver - usart_transmit_config(USART_MASTERSLAVE, USART_TRANSMIT_ENABLE); - usart_receive_config(USART_MASTERSLAVE, USART_RECEIVE_ENABLE); - - // Enable USART - usart_enable(USART_MASTERSLAVE); - - // Interrupt channel 3/4 enable - nvic_irq_enable(DMA_Channel3_4_IRQn, 2, 0); - - // Initialize DMA channel 4 for USART_SLAVE RX - dma_deinit(DMA_CH4); - dma_init_struct_usart.direction = DMA_PERIPHERAL_TO_MEMORY; - dma_init_struct_usart.memory_addr = (uint32_t)usartMasterSlave_rx_buf; - dma_init_struct_usart.memory_inc = DMA_MEMORY_INCREASE_ENABLE; - dma_init_struct_usart.memory_width = DMA_MEMORY_WIDTH_8BIT; - dma_init_struct_usart.number = USART_MASTERSLAVE_RX_BUFFERSIZE; - dma_init_struct_usart.periph_addr = USART_MASTERSLAVE_DATA_RX_ADDRESS; - dma_init_struct_usart.periph_inc = DMA_PERIPH_INCREASE_DISABLE; - dma_init_struct_usart.periph_width = DMA_PERIPHERAL_WIDTH_8BIT; - dma_init_struct_usart.priority = DMA_PRIORITY_ULTRA_HIGH; - dma_init(DMA_CH4, dma_init_struct_usart); - - // Configure DMA mode - dma_circulation_enable(DMA_CH4); - dma_memory_to_memory_disable(DMA_CH4); - - // USART DMA enable for transmission and receive - usart_dma_receive_config(USART_MASTERSLAVE, USART_DENR_ENABLE); - - // Enable DMA transfer complete interrupt - dma_interrupt_enable(DMA_CH4, DMA_CHXCTL_FTFIE); - - // At least clear number of remaining data to be transferred by the DMA - dma_transfer_number_config(DMA_CH4, 1); - - // Enable dma receive channel - dma_channel_enable(DMA_CH4); -} - -//---------------------------------------------------------------------------- -// Initializes the usart steer/bluetooth -//---------------------------------------------------------------------------- -void USART_Steer_COM_init(void) -{ - // Enable ADC and DMA clock - rcu_periph_clock_enable(RCU_USART0); - rcu_periph_clock_enable(RCU_DMA); - - // Init USART for 19200 baud, 8N1 - usart_baudrate_set(USART_STEER_COM, 19200); - usart_parity_config(USART_STEER_COM, USART_PM_NONE); - usart_word_length_set(USART_STEER_COM, USART_WL_8BIT); - usart_stop_bit_set(USART_STEER_COM, USART_STB_1BIT); - usart_oversample_config(USART_STEER_COM, USART_OVSMOD_16); - - // Enable both transmitter and receiver - usart_transmit_config(USART_STEER_COM, USART_TRANSMIT_ENABLE); - usart_receive_config(USART_STEER_COM, USART_RECEIVE_ENABLE); - - // Enable USART - usart_enable(USART_STEER_COM); - - // Interrupt channel 1/2 enable - nvic_irq_enable(DMA_Channel1_2_IRQn, 2, 0); - - // Initialize DMA channel 2 for USART_STEER_COM RX - dma_deinit(DMA_CH2); - dma_init_struct_usart.direction = DMA_PERIPHERAL_TO_MEMORY; - dma_init_struct_usart.memory_addr = (uint32_t)usartSteer_COM_rx_buf; - dma_init_struct_usart.memory_inc = DMA_MEMORY_INCREASE_ENABLE; - dma_init_struct_usart.memory_width = DMA_MEMORY_WIDTH_8BIT; - dma_init_struct_usart.number = USART_STEER_COM_RX_BUFFERSIZE; - dma_init_struct_usart.periph_addr = USART_STEER_COM_DATA_RX_ADDRESS; - dma_init_struct_usart.periph_inc = DMA_PERIPH_INCREASE_DISABLE; - dma_init_struct_usart.periph_width = DMA_PERIPHERAL_WIDTH_8BIT; - dma_init_struct_usart.priority = DMA_PRIORITY_ULTRA_HIGH; - dma_init(DMA_CH2, dma_init_struct_usart); - - // Configure DMA mode - dma_circulation_enable(DMA_CH2); - dma_memory_to_memory_disable(DMA_CH2); - - // USART DMA enable for transmission and receive - usart_dma_receive_config(USART_STEER_COM, USART_DENR_ENABLE); - - // Enable DMA transfer complete interrupt - dma_interrupt_enable(DMA_CH2, DMA_CHXCTL_FTFIE); - - // At least clear number of remaining data to be transferred by the DMA - dma_transfer_number_config(DMA_CH2, 1); - - // Enable dma receive channel - dma_channel_enable(DMA_CH2); -} +/* +* This file is part of the Hoverboard Utility Gateway System (HUGS) project. +* +* The HUGS project goal is to enable Hoverboards, or Hoverboard drive components +* to be re-purposed to provide low-cost mobility to other systems, such +* as assistive devices for the disabled, general purpose robots or other +* labor saving devices. +* +* Copyright (C) 2020 Phil Malone +* Copyright (C) 2018 Florian Staeblein +* Copyright (C) 2018 Jakob Broemauer +* Copyright (C) 2018 Kai Liebich +* Copyright (C) 2018 Christoph Lehnert +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +*/ + +#include "gd32f1x0.h" +#include "../Inc/setup.h" +#include "../Inc/defines.h" +#include "../Inc/config.h" +#include "../Inc/it.h" + +#define TIMEOUT_FREQ 1000 + +// timeout timer parameter structs +timer_parameter_struct timeoutTimer_paramter_struct; + +// PWM timer Parameter structs +timer_parameter_struct timerBldc_paramter_struct; +timer_break_parameter_struct timerBldc_break_parameter_struct; +timer_oc_parameter_struct timerBldc_oc_parameter_struct; + +// DMA (USART) structs +dma_parameter_struct dma_init_struct_usart; +uint8_t usartHUGS_rx_buf[USART_HUGS_RX_BUFFERSIZE]; +uint8_t usartSteer_COM_rx_buf[USART_STEER_COM_RX_BUFFERSIZE]; + +// DMA (ADC) structs +dma_parameter_struct dma_init_struct_adc; +extern adc_buf_t adc_buffer; + +//---------------------------------------------------------------------------- +// Initializes the interrupts +//---------------------------------------------------------------------------- +void Interrupt_init(void) +{ + // Set IRQ priority configuration + nvic_priority_group_set(NVIC_PRIGROUP_PRE4_SUB0); +} + +//---------------------------------------------------------------------------- +// Initializes the watchdog +//---------------------------------------------------------------------------- +ErrStatus Watchdog_init(void) +{ + // Check if the system has resumed from FWDGT reset + if (RESET != rcu_flag_get(RCU_FLAG_FWDGTRST)) + { + // FWDGTRST flag set + rcu_all_reset_flag_clear(); + } + + // Clock source is IRC40K (40 kHz) + // Prescaler is 16 + // Reload value is 4096 (0x0FFF) + // Watchdog fires after 1638.4 ms + if (fwdgt_config(0x0FFF, FWDGT_PSC_DIV16) != SUCCESS || + fwdgt_window_value_config(0x0FFF) != SUCCESS) + { + return ERROR; + } + + // Enable free watchdog timer + fwdgt_enable(); + + return SUCCESS; +} + +//---------------------------------------------------------------------------- +// Initializes the timeout timer +//---------------------------------------------------------------------------- +void TimeoutTimer_init(void) +{ + // Enable timer clock + rcu_periph_clock_enable(RCU_TIMER13); + + // Initial deinitialize of the timer + timer_deinit(TIMER13); + + // Set up the basic parameter struct for the timer + // Update event will be fired every 1ms + timeoutTimer_paramter_struct.counterdirection = TIMER_COUNTER_UP; + timeoutTimer_paramter_struct.prescaler = 0; + timeoutTimer_paramter_struct.alignedmode = TIMER_COUNTER_CENTER_DOWN; + timeoutTimer_paramter_struct.period = 72000000 / 2 / TIMEOUT_FREQ; + timeoutTimer_paramter_struct.clockdivision = TIMER_CKDIV_DIV1; + timeoutTimer_paramter_struct.repetitioncounter = 0; + timer_auto_reload_shadow_disable(TIMER13); + timer_init(TIMER13, &timeoutTimer_paramter_struct); + + // Enable TIMER_INT_UP interrupt and set priority + nvic_irq_enable(TIMER13_IRQn, 0, 0); + timer_interrupt_enable(TIMER13, TIMER_INT_UP); + + // Enable timer + timer_enable(TIMER13); +} + +//---------------------------------------------------------------------------- +// Initializes the GPIOs +//---------------------------------------------------------------------------- +void GPIO_init(void) +{ + // Enable all GPIO clocks + rcu_periph_clock_enable(RCU_GPIOA); + rcu_periph_clock_enable(RCU_GPIOB); + rcu_periph_clock_enable(RCU_GPIOC); + rcu_periph_clock_enable(RCU_GPIOF); + + // Init green LED + gpio_mode_set(LED_GREEN_PORT , GPIO_MODE_OUTPUT, GPIO_PUPD_NONE,LED_GREEN); + gpio_output_options_set(LED_GREEN_PORT, GPIO_OTYPE_PP, GPIO_OSPEED_10MHZ, LED_GREEN); + + // Init red LED + gpio_mode_set(LED_RED_PORT , GPIO_MODE_OUTPUT, GPIO_PUPD_NONE,LED_RED); + gpio_output_options_set(LED_RED_PORT, GPIO_OTYPE_PP, GPIO_OSPEED_10MHZ, LED_RED); + + // Init orange LED + gpio_mode_set(LED_ORANGE_PORT , GPIO_MODE_OUTPUT, GPIO_PUPD_NONE,LED_ORANGE); + gpio_output_options_set(LED_ORANGE_PORT, GPIO_OTYPE_PP, GPIO_OSPEED_10MHZ, LED_ORANGE); + + // Init UPPER/LOWER LED + gpio_mode_set(UPPER_LED_PORT , GPIO_MODE_OUTPUT, GPIO_PUPD_NONE,UPPER_LED_PIN); + gpio_output_options_set(UPPER_LED_PORT, GPIO_OTYPE_PP, GPIO_OSPEED_10MHZ, UPPER_LED_PIN); + gpio_mode_set(LOWER_LED_PORT , GPIO_MODE_OUTPUT, GPIO_PUPD_NONE,LOWER_LED_PIN); + gpio_output_options_set(LOWER_LED_PORT, GPIO_OTYPE_PP, GPIO_OSPEED_10MHZ, LOWER_LED_PIN); + + // Init mosfet output + gpio_mode_set(MOSFET_OUT_PORT, GPIO_MODE_OUTPUT, GPIO_PUPD_NONE, MOSFET_OUT_PIN); + gpio_output_options_set(MOSFET_OUT_PORT, GPIO_OTYPE_PP, GPIO_OSPEED_50MHZ, MOSFET_OUT_PIN); + + // Init HAL input + gpio_mode_set(HALL_A_PORT , GPIO_MODE_INPUT, GPIO_PUPD_NONE, HALL_A_PIN); + gpio_mode_set(HALL_B_PORT , GPIO_MODE_INPUT, GPIO_PUPD_NONE, HALL_B_PIN); + gpio_mode_set(HALL_C_PORT , GPIO_MODE_INPUT, GPIO_PUPD_NONE, HALL_C_PIN); + + // Init USART_HUGS + gpio_mode_set(USART_HUGS_TX_PORT , GPIO_MODE_AF, GPIO_PUPD_PULLUP, USART_HUGS_TX_PIN); + gpio_mode_set(USART_HUGS_RX_PORT , GPIO_MODE_AF, GPIO_PUPD_PULLUP, USART_HUGS_RX_PIN); + gpio_output_options_set(USART_HUGS_TX_PORT, GPIO_OTYPE_PP, GPIO_OSPEED_50MHZ, USART_HUGS_TX_PIN); + gpio_output_options_set(USART_HUGS_RX_PORT, GPIO_OTYPE_PP, GPIO_OSPEED_50MHZ, USART_HUGS_RX_PIN); + gpio_af_set(USART_HUGS_TX_PORT, GPIO_AF_1, USART_HUGS_TX_PIN); + gpio_af_set(USART_HUGS_RX_PORT, GPIO_AF_1, USART_HUGS_RX_PIN); + + // Init ADC pins + gpio_mode_set(VBATT_PORT, GPIO_MODE_ANALOG, GPIO_PUPD_NONE, VBATT_PIN); + gpio_mode_set(CURRENT_DC_PORT, GPIO_MODE_ANALOG, GPIO_PUPD_NONE, CURRENT_DC_PIN); + gpio_mode_set(GPIOA, GPIO_MODE_ANALOG, GPIO_PUPD_NONE, GPIO_PIN_6); + gpio_mode_set(GPIOB, GPIO_MODE_ANALOG, GPIO_PUPD_NONE, GPIO_PIN_0); + + // Init debug pin + gpio_mode_set(DEBUG_PORT , GPIO_MODE_OUTPUT, GPIO_PUPD_NONE, DEBUG_PIN); + gpio_output_options_set(DEBUG_PORT, GPIO_OTYPE_PP, GPIO_OSPEED_50MHZ, DEBUG_PIN); + + // Init emergency shutdown pin + gpio_mode_set(TIMER_BLDC_EMERGENCY_SHUTDOWN_PORT , GPIO_MODE_AF, GPIO_PUPD_NONE, TIMER_BLDC_EMERGENCY_SHUTDOWN_PIN); + gpio_af_set(TIMER_BLDC_EMERGENCY_SHUTDOWN_PORT, GPIO_AF_2, TIMER_BLDC_EMERGENCY_SHUTDOWN_PIN); + + // Init PWM output Pins (Configure as alternate functions, push-pull, no pullup) + gpio_mode_set(TIMER_BLDC_GH_PORT, GPIO_MODE_AF, GPIO_PUPD_NONE, TIMER_BLDC_GH_PIN); + gpio_mode_set(TIMER_BLDC_BH_PORT, GPIO_MODE_AF, GPIO_PUPD_NONE, TIMER_BLDC_BH_PIN); + gpio_mode_set(TIMER_BLDC_YH_PORT, GPIO_MODE_AF, GPIO_PUPD_NONE, TIMER_BLDC_YH_PIN); + gpio_mode_set(TIMER_BLDC_GL_PORT, GPIO_MODE_AF, GPIO_PUPD_NONE, TIMER_BLDC_GL_PIN); + gpio_mode_set(TIMER_BLDC_BL_PORT, GPIO_MODE_AF, GPIO_PUPD_NONE, TIMER_BLDC_BL_PIN); + gpio_mode_set(TIMER_BLDC_YL_PORT, GPIO_MODE_AF, GPIO_PUPD_NONE, TIMER_BLDC_YL_PIN); + + gpio_output_options_set(TIMER_BLDC_GH_PORT, GPIO_OTYPE_PP, GPIO_OSPEED_2MHZ, TIMER_BLDC_GH_PIN); + gpio_output_options_set(TIMER_BLDC_BH_PORT, GPIO_OTYPE_PP, GPIO_OSPEED_2MHZ, TIMER_BLDC_BH_PIN); + gpio_output_options_set(TIMER_BLDC_YH_PORT, GPIO_OTYPE_PP, GPIO_OSPEED_2MHZ, TIMER_BLDC_YH_PIN); + gpio_output_options_set(TIMER_BLDC_GL_PORT, GPIO_OTYPE_PP, GPIO_OSPEED_2MHZ, TIMER_BLDC_GL_PIN); + gpio_output_options_set(TIMER_BLDC_BL_PORT, GPIO_OTYPE_PP, GPIO_OSPEED_2MHZ, TIMER_BLDC_BL_PIN); + gpio_output_options_set(TIMER_BLDC_YL_PORT, GPIO_OTYPE_PP, GPIO_OSPEED_2MHZ, TIMER_BLDC_YL_PIN); + + gpio_af_set(TIMER_BLDC_GH_PORT, GPIO_AF_2, TIMER_BLDC_GH_PIN); + gpio_af_set(TIMER_BLDC_BH_PORT, GPIO_AF_2, TIMER_BLDC_BH_PIN); + gpio_af_set(TIMER_BLDC_YH_PORT, GPIO_AF_2, TIMER_BLDC_YH_PIN); + gpio_af_set(TIMER_BLDC_GL_PORT, GPIO_AF_2, TIMER_BLDC_GL_PIN); + gpio_af_set(TIMER_BLDC_BL_PORT, GPIO_AF_2, TIMER_BLDC_BL_PIN); + gpio_af_set(TIMER_BLDC_YL_PORT, GPIO_AF_2, TIMER_BLDC_YL_PIN); + + // Init self hold + gpio_mode_set(SELF_HOLD_PORT , GPIO_MODE_OUTPUT, GPIO_PUPD_NONE, SELF_HOLD_PIN); + gpio_output_options_set(SELF_HOLD_PORT, GPIO_OTYPE_PP, GPIO_OSPEED_10MHZ, SELF_HOLD_PIN); + + // Init USART0 + gpio_mode_set(USART_STEER_COM_TX_PORT , GPIO_MODE_AF, GPIO_PUPD_PULLUP, USART_STEER_COM_TX_PIN); + gpio_mode_set(USART_STEER_COM_RX_PORT , GPIO_MODE_AF, GPIO_PUPD_PULLUP, USART_STEER_COM_RX_PIN); + gpio_output_options_set(USART_STEER_COM_TX_PORT, GPIO_OTYPE_PP, GPIO_OSPEED_50MHZ, USART_STEER_COM_TX_PIN); + gpio_output_options_set(USART_STEER_COM_RX_PORT, GPIO_OTYPE_PP, GPIO_OSPEED_50MHZ, USART_STEER_COM_RX_PIN); + gpio_af_set(USART_STEER_COM_TX_PORT, GPIO_AF_0, USART_STEER_COM_TX_PIN); + gpio_af_set(USART_STEER_COM_RX_PORT, GPIO_AF_0, USART_STEER_COM_RX_PIN); + + // Init buzzer + gpio_mode_set(BUZZER_PORT , GPIO_MODE_OUTPUT, GPIO_PUPD_NONE, BUZZER_PIN); + gpio_output_options_set(BUZZER_PORT, GPIO_OTYPE_PP, GPIO_OSPEED_50MHZ, BUZZER_PIN); + + // Init button + gpio_mode_set(BUTTON_PORT , GPIO_MODE_INPUT, GPIO_PUPD_NONE, BUTTON_PIN); + + // Init charge state + gpio_mode_set(CHARGE_STATE_PORT, GPIO_MODE_INPUT, GPIO_PUPD_PULLUP, CHARGE_STATE_PIN); +} + +//---------------------------------------------------------------------------- +// Initializes the PWM +//---------------------------------------------------------------------------- +void PWM_init(void) +{ + // Enable timer clock + rcu_periph_clock_enable(RCU_TIMER_BLDC); + + // Initial deinitialize of the timer + timer_deinit(TIMER_BLDC); + + // Set up the basic parameter struct for the timer + timerBldc_paramter_struct.counterdirection = TIMER_COUNTER_UP; + timerBldc_paramter_struct.prescaler = 0; + timerBldc_paramter_struct.alignedmode = TIMER_COUNTER_CENTER_DOWN; + timerBldc_paramter_struct.period = 72000000 / 2 / PWM_FREQ; + timerBldc_paramter_struct.clockdivision = TIMER_CKDIV_DIV1; + timerBldc_paramter_struct.repetitioncounter = 0; + timer_auto_reload_shadow_disable(TIMER_BLDC); + + // Initialize timer with basic parameter struct + timer_init(TIMER_BLDC, &timerBldc_paramter_struct); + + // Deactivate output channel fastmode + timer_channel_output_fast_config(TIMER_BLDC, TIMER_BLDC_CHANNEL_G, TIMER_OC_FAST_DISABLE); + timer_channel_output_fast_config(TIMER_BLDC, TIMER_BLDC_CHANNEL_B, TIMER_OC_FAST_DISABLE); + timer_channel_output_fast_config(TIMER_BLDC, TIMER_BLDC_CHANNEL_Y, TIMER_OC_FAST_DISABLE); + + // Deactivate output channel shadow function + timer_channel_output_shadow_config(TIMER_BLDC, TIMER_BLDC_CHANNEL_G, TIMER_OC_SHADOW_DISABLE); + timer_channel_output_shadow_config(TIMER_BLDC, TIMER_BLDC_CHANNEL_B, TIMER_OC_SHADOW_DISABLE); + timer_channel_output_shadow_config(TIMER_BLDC, TIMER_BLDC_CHANNEL_Y, TIMER_OC_SHADOW_DISABLE); + + // Set output channel PWM type to PWM1 + timer_channel_output_mode_config(TIMER_BLDC, TIMER_BLDC_CHANNEL_G, TIMER_OC_MODE_PWM1); + timer_channel_output_mode_config(TIMER_BLDC, TIMER_BLDC_CHANNEL_B, TIMER_OC_MODE_PWM1); + timer_channel_output_mode_config(TIMER_BLDC, TIMER_BLDC_CHANNEL_Y, TIMER_OC_MODE_PWM1); + + // Initialize pulse length with value 0 (pulse duty factor = zero) + timer_channel_output_pulse_value_config(TIMER_BLDC, TIMER_BLDC_CHANNEL_G, 0); + timer_channel_output_pulse_value_config(TIMER_BLDC, TIMER_BLDC_CHANNEL_B, 0); + timer_channel_output_pulse_value_config(TIMER_BLDC, TIMER_BLDC_CHANNEL_Y, 0); + + // Set up the output channel parameter struct + timerBldc_oc_parameter_struct.ocpolarity = TIMER_OC_POLARITY_HIGH; + timerBldc_oc_parameter_struct.ocnpolarity = TIMER_OCN_POLARITY_LOW; + timerBldc_oc_parameter_struct.ocidlestate = TIMER_OC_IDLE_STATE_LOW; + timerBldc_oc_parameter_struct.ocnidlestate = TIMER_OCN_IDLE_STATE_HIGH; + + // Configure all three output channels with the output channel parameter struct + timer_channel_output_config(TIMER_BLDC, TIMER_BLDC_CHANNEL_G, &timerBldc_oc_parameter_struct); + timer_channel_output_config(TIMER_BLDC, TIMER_BLDC_CHANNEL_B, &timerBldc_oc_parameter_struct); + timer_channel_output_config(TIMER_BLDC, TIMER_BLDC_CHANNEL_Y, &timerBldc_oc_parameter_struct); + + // Set up the break parameter struct + timerBldc_break_parameter_struct.runoffstate = TIMER_ROS_STATE_ENABLE; + timerBldc_break_parameter_struct.ideloffstate = TIMER_IOS_STATE_DISABLE; + timerBldc_break_parameter_struct.protectmode = TIMER_CCHP_PROT_OFF; + timerBldc_break_parameter_struct.deadtime = DEAD_TIME; + timerBldc_break_parameter_struct.breakstate = TIMER_BREAK_ENABLE; + timerBldc_break_parameter_struct.breakpolarity = TIMER_BREAK_POLARITY_LOW; + timerBldc_break_parameter_struct.outputautostate = TIMER_OUTAUTO_ENABLE; + + // Configure the timer with the break parameter struct + timer_break_config(TIMER_BLDC, &timerBldc_break_parameter_struct); + + // Disable until all channels are set for PWM output + timer_disable(TIMER_BLDC); + + // Enable all three channels for PWM output + timer_channel_output_state_config(TIMER_BLDC, TIMER_BLDC_CHANNEL_G, TIMER_CCX_ENABLE); + timer_channel_output_state_config(TIMER_BLDC, TIMER_BLDC_CHANNEL_B, TIMER_CCX_ENABLE); + timer_channel_output_state_config(TIMER_BLDC, TIMER_BLDC_CHANNEL_Y, TIMER_CCX_ENABLE); + + // Enable all three complemenary channels for PWM output + timer_channel_complementary_output_state_config(TIMER_BLDC, TIMER_BLDC_CHANNEL_G, TIMER_CCXN_ENABLE); + timer_channel_complementary_output_state_config(TIMER_BLDC, TIMER_BLDC_CHANNEL_B, TIMER_CCXN_ENABLE); + timer_channel_complementary_output_state_config(TIMER_BLDC, TIMER_BLDC_CHANNEL_Y, TIMER_CCXN_ENABLE); + + // Enable TIMER_INT_UP interrupt and set priority + nvic_irq_enable(TIMER0_BRK_UP_TRG_COM_IRQn, 0, 0); + timer_interrupt_enable(TIMER_BLDC, TIMER_INT_UP); + + // Enable the timer and start PWM + timer_enable(TIMER_BLDC); +} + +//---------------------------------------------------------------------------- +// Initializes the ADC +//---------------------------------------------------------------------------- +void ADC_init(void) +{ + // Enable ADC and DMA clock + rcu_periph_clock_enable(RCU_ADC); + rcu_periph_clock_enable(RCU_DMA); + + // Configure ADC clock (APB2 clock is DIV1 -> 72MHz, ADC clock is DIV6 -> 12MHz) + rcu_adc_clock_config(RCU_ADCCK_APB2_DIV6); + + // Interrupt channel 0 enable + nvic_irq_enable(DMA_Channel0_IRQn, 1, 0); + + // Initialize DMA channel 0 for ADC + dma_deinit(DMA_CH0); + dma_init_struct_adc.direction = DMA_PERIPHERAL_TO_MEMORY; + dma_init_struct_adc.memory_addr = (uint32_t)&adc_buffer; + dma_init_struct_adc.memory_inc = DMA_MEMORY_INCREASE_ENABLE; + dma_init_struct_adc.memory_width = DMA_MEMORY_WIDTH_16BIT; + dma_init_struct_adc.number = 2; + dma_init_struct_adc.periph_addr = (uint32_t)&ADC_RDATA; + dma_init_struct_adc.periph_inc = DMA_PERIPH_INCREASE_DISABLE; + dma_init_struct_adc.periph_width = DMA_PERIPHERAL_WIDTH_16BIT; + dma_init_struct_adc.priority = DMA_PRIORITY_ULTRA_HIGH; + dma_init(DMA_CH0, dma_init_struct_adc); + + // Configure DMA mode + dma_circulation_enable(DMA_CH0); + dma_memory_to_memory_disable(DMA_CH0); + + // Enable DMA transfer complete interrupt + dma_interrupt_enable(DMA_CH0, DMA_CHXCTL_FTFIE); + + // At least clear number of remaining data to be transferred by the DMA + dma_transfer_number_config(DMA_CH0, 2); + + // Enable DMA channel 0 + dma_channel_enable(DMA_CH0); + + adc_channel_length_config(ADC_REGULAR_CHANNEL, 2); + adc_regular_channel_config(0, VBATT_CHANNEL, ADC_SAMPLETIME_13POINT5); + adc_regular_channel_config(1, CURRENT_DC_CHANNEL, ADC_SAMPLETIME_13POINT5); + adc_data_alignment_config(ADC_DATAALIGN_RIGHT); + + // Set trigger of ADC + adc_external_trigger_config(ADC_REGULAR_CHANNEL, ENABLE); + adc_external_trigger_source_config(ADC_REGULAR_CHANNEL, ADC_EXTTRIG_REGULAR_SWRCST); + + // Disable the temperature sensor, Vrefint and vbat channel + adc_tempsensor_vrefint_disable(); + adc_vbat_disable(); + + // ADC analog watchdog disable + adc_watchdog_disable(); + + // Enable ADC (must be before calibration) + adc_enable(); + + // Calibrate ADC values + adc_calibration_enable(); + + // Enable DMA request + adc_dma_mode_enable(); + + // Set ADC to scan mode + adc_special_function_config(ADC_SCAN_MODE, ENABLE); +} + +//---------------------------------------------------------------------------- +// Initializes the usart master slave +//---------------------------------------------------------------------------- +void USART_HUGS_init(void) +{ + // Enable ADC and DMA clock + rcu_periph_clock_enable(RCU_USART1); + rcu_periph_clock_enable(RCU_DMA); + + // Init USART for 115200 baud, 8N1 + usart_baudrate_set(USART_HUGS, 115200); + usart_parity_config(USART_HUGS, USART_PM_NONE); + usart_word_length_set(USART_HUGS, USART_WL_8BIT); + usart_stop_bit_set(USART_HUGS, USART_STB_1BIT); + usart_oversample_config(USART_HUGS, USART_OVSMOD_16); + + // Enable both transmitter and receiver + usart_transmit_config(USART_HUGS, USART_TRANSMIT_ENABLE); + usart_receive_config(USART_HUGS, USART_RECEIVE_ENABLE); + + // Enable USART + usart_enable(USART_HUGS); + + // Interrupt channel 3/4 enable + nvic_irq_enable(DMA_Channel3_4_IRQn, 2, 0); + + // Initialize DMA channel 4 for USART_SLAVE RX + dma_deinit(DMA_CH4); + dma_init_struct_usart.direction = DMA_PERIPHERAL_TO_MEMORY; + dma_init_struct_usart.memory_addr = (uint32_t)usartHUGS_rx_buf; + dma_init_struct_usart.memory_inc = DMA_MEMORY_INCREASE_ENABLE; + dma_init_struct_usart.memory_width = DMA_MEMORY_WIDTH_8BIT; + dma_init_struct_usart.number = USART_HUGS_RX_BUFFERSIZE; + dma_init_struct_usart.periph_addr = USART_HUGS_DATA_RX_ADDRESS; + dma_init_struct_usart.periph_inc = DMA_PERIPH_INCREASE_DISABLE; + dma_init_struct_usart.periph_width = DMA_PERIPHERAL_WIDTH_8BIT; + dma_init_struct_usart.priority = DMA_PRIORITY_ULTRA_HIGH; + dma_init(DMA_CH4, dma_init_struct_usart); + + // Configure DMA mode + dma_circulation_enable(DMA_CH4); + dma_memory_to_memory_disable(DMA_CH4); + + // USART DMA enable for transmission and receive + usart_dma_receive_config(USART_HUGS, USART_DENR_ENABLE); + + // Enable DMA transfer complete interrupt + dma_interrupt_enable(DMA_CH4, DMA_CHXCTL_FTFIE); + + // At least clear number of remaining data to be transferred by the DMA + dma_transfer_number_config(DMA_CH4, 1); + + // Enable dma receive channel + dma_channel_enable(DMA_CH4); +} + +//---------------------------------------------------------------------------- +// Initializes the usart steer/bluetooth +//---------------------------------------------------------------------------- +void USART_Steer_COM_init(void) +{ + // Enable ADC and DMA clock + rcu_periph_clock_enable(RCU_USART0); + rcu_periph_clock_enable(RCU_DMA); + + // Init USART for 38400 baud, 8N1 (Works best with PIC 8MHz) + usart_baudrate_set(USART_STEER_COM, 38400); + usart_parity_config(USART_STEER_COM, USART_PM_NONE); + usart_word_length_set(USART_STEER_COM, USART_WL_8BIT); + usart_stop_bit_set(USART_STEER_COM, USART_STB_1BIT); + usart_oversample_config(USART_STEER_COM, USART_OVSMOD_16); + + // Enable both transmitter and receiver + usart_transmit_config(USART_STEER_COM, USART_TRANSMIT_ENABLE); + usart_receive_config(USART_STEER_COM, USART_RECEIVE_ENABLE); + + // Enable USART + usart_enable(USART_STEER_COM); + + // Interrupt channel 1/2 enable + nvic_irq_enable(DMA_Channel1_2_IRQn, 2, 0); + + // Initialize DMA channel 2 for USART_STEER_COM RX + dma_deinit(DMA_CH2); + dma_init_struct_usart.direction = DMA_PERIPHERAL_TO_MEMORY; + dma_init_struct_usart.memory_addr = (uint32_t)usartSteer_COM_rx_buf; + dma_init_struct_usart.memory_inc = DMA_MEMORY_INCREASE_ENABLE; + dma_init_struct_usart.memory_width = DMA_MEMORY_WIDTH_8BIT; + dma_init_struct_usart.number = USART_STEER_COM_RX_BUFFERSIZE; + dma_init_struct_usart.periph_addr = USART_STEER_COM_DATA_RX_ADDRESS; + dma_init_struct_usart.periph_inc = DMA_PERIPH_INCREASE_DISABLE; + dma_init_struct_usart.periph_width = DMA_PERIPHERAL_WIDTH_8BIT; + dma_init_struct_usart.priority = DMA_PRIORITY_ULTRA_HIGH; + dma_init(DMA_CH2, dma_init_struct_usart); + + // Configure DMA mode + dma_circulation_enable(DMA_CH2); + dma_memory_to_memory_disable(DMA_CH2); + + // USART DMA enable for transmission and receive + usart_dma_receive_config(USART_STEER_COM, USART_DENR_ENABLE); + + // Enable DMA transfer complete interrupt + dma_interrupt_enable(DMA_CH2, DMA_CHXCTL_FTFIE); + + // At least clear number of remaining data to be transferred by the DMA + dma_transfer_number_config(DMA_CH2, 1); + + // Enable dma receive channel + dma_channel_enable(DMA_CH2); +} diff --git a/Hardware_Overview_small.png b/Hardware_Overview_small.png deleted file mode 100644 index c5ef17f3..00000000 Binary files a/Hardware_Overview_small.png and /dev/null differ diff --git a/HoverBoardGigaDevice/Inc/bldc.h b/HoverBoardGigaDevice/Inc/bldc.h deleted file mode 100644 index 0ca9bbe2..00000000 --- a/HoverBoardGigaDevice/Inc/bldc.h +++ /dev/null @@ -1,52 +0,0 @@ -/* -* This file is part of the hoverboard-firmware-hack-V2 project. The -* firmware is used to hack the generation 2 board of the hoverboard. -* These new hoverboards have no mainboard anymore. They consist of -* two Sensorboards which have their own BLDC-Bridge per Motor and an -* ARM Cortex-M3 processor GD32F130C8. -* -* Copyright (C) 2018 Florian Staeblein -* Copyright (C) 2018 Jakob Broemauer -* Copyright (C) 2018 Kai Liebich -* Copyright (C) 2018 Christoph Lehnert -* -* The program is based on the hoverboard project by Niklas Fauth. The -* structure was tried to be as similar as possible, so that everyone -* could find a better way through the code. -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -*/ - -#ifndef BLDC_H -#define BLDC_H - -#include "gd32f1x0.h" -#include "../Inc/config.h" - -//---------------------------------------------------------------------------- -// Set motor enable -//---------------------------------------------------------------------------- -void SetEnable(FlagStatus setEnable); - -//---------------------------------------------------------------------------- -// Set pwm -1000 to 1000 -//---------------------------------------------------------------------------- -void SetPWM(int16_t setPwm); - -//---------------------------------------------------------------------------- -// Calculation-Routine for BLDC => calculates with 16kHz -//---------------------------------------------------------------------------- -void CalculateBLDC(void); - -#endif diff --git a/HoverBoardGigaDevice/Inc/commsBluetooth.h b/HoverBoardGigaDevice/Inc/commsBluetooth.h deleted file mode 100644 index 84e5586b..00000000 --- a/HoverBoardGigaDevice/Inc/commsBluetooth.h +++ /dev/null @@ -1,47 +0,0 @@ -/* -* This file is part of the hoverboard-firmware-hack-V2 project. The -* firmware is used to hack the generation 2 board of the hoverboard. -* These new hoverboards have no mainboard anymore. They consist of -* two Sensorboards which have their own BLDC-Bridge per Motor and an -* ARM Cortex-M3 processor GD32F130C8. -* -* Copyright (C) 2018 Florian Staeblein -* Copyright (C) 2018 Jakob Broemauer -* Copyright (C) 2018 Kai Liebich -* Copyright (C) 2018 Christoph Lehnert -* -* The program is based on the hoverboard project by Niklas Fauth. The -* structure was tried to be as similar as possible, so that everyone -* could find a better way through the code. -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -*/ - -#ifndef COMMSBLUETOOTH_H -#define COMMSBLUETOOTH_H - -#include "gd32f1x0.h" -#include "../Inc/config.h" - -// Only slave communicates over bluetooth -#ifdef SLAVE - -//---------------------------------------------------------------------------- -// Update USART bluetooth input -//---------------------------------------------------------------------------- -void UpdateUSARTBluetoothInput(void); - -#endif - -#endif diff --git a/HoverBoardGigaDevice/RTE/_Target_1/RTE_Components.h b/HoverBoardGigaDevice/RTE/_Target_1/RTE_Components.h deleted file mode 100644 index 5d00c025..00000000 --- a/HoverBoardGigaDevice/RTE/_Target_1/RTE_Components.h +++ /dev/null @@ -1,34 +0,0 @@ - -/* - * Auto generated Run-Time-Environment Component Configuration File - * *** Do not modify ! *** - * - * Project: 'Hoverboard' - * Target: 'Target 1' - */ - -#ifndef RTE_COMPONENTS_H -#define RTE_COMPONENTS_H - - -/* - * Define the Device Header File: - */ -#define CMSIS_device_header "gd32f1x0.h" - -#define RTE_DEVICE_STDPERIPHERALS_ADC -#define RTE_DEVICE_STDPERIPHERALS_DBG -#define RTE_DEVICE_STDPERIPHERALS_DMA -#define RTE_DEVICE_STDPERIPHERALS_FWDGT -#define RTE_DEVICE_STDPERIPHERALS_GPIO -#define RTE_DEVICE_STDPERIPHERALS_I2C -#define RTE_DEVICE_STDPERIPHERALS_MISC -#define RTE_DEVICE_STDPERIPHERALS_OPA -#define RTE_DEVICE_STDPERIPHERALS_PMU -#define RTE_DEVICE_STDPERIPHERALS_RCU -#define RTE_DEVICE_STDPERIPHERALS_SYSCFG -#define RTE_DEVICE_STDPERIPHERALS_TIMER -#define RTE_DEVICE_STDPERIPHERALS_USART -#define RTE_DEVICE_STDPERIPHERALS_WWDGT - -#endif /* RTE_COMPONENTS_H */ diff --git a/HoverBoardGigaDevice/Src/bldc.c b/HoverBoardGigaDevice/Src/bldc.c deleted file mode 100644 index 63464d82..00000000 --- a/HoverBoardGigaDevice/Src/bldc.c +++ /dev/null @@ -1,243 +0,0 @@ -/* -* This file is part of the hoverboard-firmware-hack-V2 project. The -* firmware is used to hack the generation 2 board of the hoverboard. -* These new hoverboards have no mainboard anymore. They consist of -* two Sensorboards which have their own BLDC-Bridge per Motor and an -* ARM Cortex-M3 processor GD32F130C8. -* -* Copyright (C) 2018 Florian Staeblein -* Copyright (C) 2018 Jakob Broemauer -* Copyright (C) 2018 Kai Liebich -* Copyright (C) 2018 Christoph Lehnert -* -* The program is based on the hoverboard project by Niklas Fauth. The -* structure was tried to be as similar as possible, so that everyone -* could find a better way through the code. -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -*/ - -#include "gd32f1x0.h" -#include "../Inc/setup.h" -#include "../Inc/defines.h" -#include "../Inc/config.h" - -// Internal constants -const int16_t pwm_res = 72000000 / 2 / PWM_FREQ; // = 2000 - -// Global variables for voltage and current -float batteryVoltage = 40.0; -float currentDC = 0.0; -float realSpeed = 0.0; - -// Timeoutvariable set by timeout timer -extern FlagStatus timedOut; - -// Variables to be set from the main routine -int16_t bldc_inputFilterPwm = 0; -FlagStatus bldc_enable = RESET; - -// ADC buffer to be filled by DMA -adc_buf_t adc_buffer; - -// Internal calculation variables -uint8_t hall_a; -uint8_t hall_b; -uint8_t hall_c; -uint8_t hall; -uint8_t pos; -uint8_t lastPos; -int16_t bldc_outputFilterPwm = 0; -int32_t filter_reg; -FlagStatus buzzerToggle = RESET; -uint8_t buzzerFreq = 0; -uint8_t buzzerPattern = 0; -uint16_t buzzerTimer = 0; -int16_t offsetcount = 0; -int16_t offsetdc = 2000; -uint32_t speedCounter = 0; - -//---------------------------------------------------------------------------- -// Commutation table -//---------------------------------------------------------------------------- -const uint8_t hall_to_pos[8] = -{ - // annotation: for example SA=0 means hall sensor pulls SA down to Ground - 0, // hall position [-] - No function (access from 1-6) - 3, // hall position [1] (SA=1, SB=0, SC=0) -> PWM-position 3 - 5, // hall position [2] (SA=0, SB=1, SC=0) -> PWM-position 5 - 4, // hall position [3] (SA=1, SB=1, SC=0) -> PWM-position 4 - 1, // hall position [4] (SA=0, SB=0, SC=1) -> PWM-position 1 - 2, // hall position [5] (SA=1, SB=0, SC=1) -> PWM-position 2 - 6, // hall position [6] (SA=0, SB=1, SC=1) -> PWM-position 6 - 0, // hall position [-] - No function (access from 1-6) -}; - -//---------------------------------------------------------------------------- -// Block PWM calculation based on position -//---------------------------------------------------------------------------- -__INLINE void blockPWM(int pwm, int pwmPos, int *y, int *b, int *g) -{ - switch(pwmPos) - { - case 1: - *y = 0; - *b = pwm; - *g = -pwm; - break; - case 2: - *y = -pwm; - *b = pwm; - *g = 0; - break; - case 3: - *y = -pwm; - *b = 0; - *g = pwm; - break; - case 4: - *y = 0; - *b = -pwm; - *g = pwm; - break; - case 5: - *y = pwm; - *b = -pwm; - *g = 0; - break; - case 6: - *y = pwm; - *b = 0; - *g = -pwm; - break; - default: - *y = 0; - *b = 0; - *g = 0; - } -} - -//---------------------------------------------------------------------------- -// Set motor enable -//---------------------------------------------------------------------------- -void SetEnable(FlagStatus setEnable) -{ - bldc_enable = setEnable; -} - -//---------------------------------------------------------------------------- -// Set pwm -1000 to 1000 -//---------------------------------------------------------------------------- -void SetPWM(int16_t setPwm) -{ - bldc_inputFilterPwm = CLAMP(setPwm, -1000, 1000); -} - -//---------------------------------------------------------------------------- -// Calculation-Routine for BLDC => calculates with 16kHz -//---------------------------------------------------------------------------- -void CalculateBLDC(void) -{ - int y = 0; // yellow = phase A - int b = 0; // blue = phase B - int g = 0; // green = phase C - - // Calibrate ADC offsets for the first 1000 cycles - if (offsetcount < 1000) - { - offsetcount++; - offsetdc = (adc_buffer.current_dc + offsetdc) / 2; - return; - } - - // Calculate battery voltage every 100 cycles - if (buzzerTimer % 100 == 0) - { - batteryVoltage = batteryVoltage * 0.999 + ((float)adc_buffer.v_batt * ADC_BATTERY_VOLT) * 0.001; - } - -#ifdef MASTER - // Create square wave for buzzer - buzzerTimer++; - if (buzzerFreq != 0 && (buzzerTimer / 5000) % (buzzerPattern + 1) == 0) - { - if (buzzerTimer % buzzerFreq == 0) - { - buzzerToggle = buzzerToggle == RESET ? SET : RESET; // toggle variable - gpio_bit_write(BUZZER_PORT, BUZZER_PIN, buzzerToggle); - } - } - else - { - gpio_bit_write(BUZZER_PORT, BUZZER_PIN, RESET); - } -#endif - - // Calculate current DC - currentDC = ABS((adc_buffer.current_dc - offsetdc) * MOTOR_AMP_CONV_DC_AMP); - - // Disable PWM when current limit is reached (current chopping), enable is not set or timeout is reached - if (currentDC > DC_CUR_LIMIT || bldc_enable == RESET || timedOut == SET) - { - timer_automatic_output_disable(TIMER_BLDC); - } - else - { - timer_automatic_output_enable(TIMER_BLDC); - } - - // Read hall sensors - hall_a = gpio_input_bit_get(HALL_A_PORT, HALL_A_PIN); - hall_b = gpio_input_bit_get(HALL_B_PORT, HALL_B_PIN); - hall_c = gpio_input_bit_get(HALL_C_PORT, HALL_C_PIN); - - // Determine current position based on hall sensors - hall = hall_a * 1 + hall_b * 2 + hall_c * 4; - pos = hall_to_pos[hall]; - - // Calculate low-pass filter for pwm value - filter_reg = filter_reg - (filter_reg >> FILTER_SHIFT) + bldc_inputFilterPwm; - bldc_outputFilterPwm = filter_reg >> FILTER_SHIFT; - - // Update PWM channels based on position y(ellow), b(lue), g(reen) - blockPWM(bldc_outputFilterPwm, pos, &y, &b, &g); - - // Set PWM output (pwm_res/2 is the mean value, setvalue has to be between 10 and pwm_res-10) - timer_channel_output_pulse_value_config(TIMER_BLDC, TIMER_BLDC_CHANNEL_G, CLAMP(g + pwm_res / 2, 10, pwm_res-10)); - timer_channel_output_pulse_value_config(TIMER_BLDC, TIMER_BLDC_CHANNEL_B, CLAMP(b + pwm_res / 2, 10, pwm_res-10)); - timer_channel_output_pulse_value_config(TIMER_BLDC, TIMER_BLDC_CHANNEL_Y, CLAMP(y + pwm_res / 2, 10, pwm_res-10)); - - // Increments with 62.5us - if(speedCounter < 4000) // No speed after 250ms - { - speedCounter++; - } - - // Every time position reaches value 1, one round is performed (rising edge) - if (lastPos != 1 && pos == 1) - { - realSpeed = 1991.81f / (float)speedCounter; //[km/h] - speedCounter = 0; - } - else - { - if (speedCounter >= 4000) - { - realSpeed = 0; - } - } - - // Safe last position - lastPos = pos; -} diff --git a/HoverBoardGigaDevice/Src/commsBluetooth.c b/HoverBoardGigaDevice/Src/commsBluetooth.c deleted file mode 100644 index 1cf8b0b6..00000000 --- a/HoverBoardGigaDevice/Src/commsBluetooth.c +++ /dev/null @@ -1,279 +0,0 @@ -/* -* This file is part of the hoverboard-firmware-hack-V2 project. The -* firmware is used to hack the generation 2 board of the hoverboard. -* These new hoverboards have no mainboard anymore. They consist of -* two Sensorboards which have their own BLDC-Bridge per Motor and an -* ARM Cortex-M3 processor GD32F130C8. -* -* Copyright (C) 2018 Florian Staeblein -* Copyright (C) 2018 Jakob Broemauer -* Copyright (C) 2018 Kai Liebich -* Copyright (C) 2018 Christoph Lehnert -* -* The program is based on the hoverboard project by Niklas Fauth. The -* structure was tried to be as similar as possible, so that everyone -* could find a better way through the code. -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -*/ - -#include "gd32f1x0.h" -#include "../Inc/defines.h" -#include "../Inc/setup.h" -#include "../Inc/comms.h" -#include "../Inc/commsMasterSlave.h" -#include "../Inc/commsBluetooth.h" -#include "../Inc/led.h" -#include "stdio.h" -#include "string.h" - -// Only slave communicates over bluetooth -#ifdef SLAVE -// Variables which will be send over bluetooth -extern float currentDC; -extern float realSpeed; - -extern uint32_t hornCounter_ms; - -#define USART_BLUETOOTH_TX_BYTES 11 // Transmit byte count including start '/' and stop character '\n' -#define USART_BLUETOOTH_RX_BYTES 11 // Receive byte count including start '/' and stop character '\n' - -extern uint8_t usartSteer_COM_rx_buf[USART_STEER_COM_RX_BUFFERSIZE]; -static uint8_t sBluetoothRecord = 0; -static uint8_t sUSARTBluetoothRecordBuffer[USART_BLUETOOTH_RX_BYTES]; -static uint8_t sUSARTBluetoothRecordBufferCounter = 0; - -void CheckUSARTBluetoothInput(uint8_t USARTBuffer[]); -void SendBluetoothDevice(uint8_t identifier, int16_t value); - -//---------------------------------------------------------------------------- -// Update USART bluetooth input -//---------------------------------------------------------------------------- -void UpdateUSARTBluetoothInput(void) -{ - uint8_t character = usartSteer_COM_rx_buf[0]; - - // Start character is captured, start record - if (character == '/') - { - sUSARTBluetoothRecordBufferCounter = 0; - sBluetoothRecord = 1; - } - - if (sBluetoothRecord) - { - sUSARTBluetoothRecordBuffer[sUSARTBluetoothRecordBufferCounter] = character; - sUSARTBluetoothRecordBufferCounter++; - - if (sUSARTBluetoothRecordBufferCounter >= USART_BLUETOOTH_RX_BYTES) - { - sUSARTBluetoothRecordBufferCounter = 0; - sBluetoothRecord = 0; - - // Check input - CheckUSARTBluetoothInput (sUSARTBluetoothRecordBuffer); - } - } -} - -//---------------------------------------------------------------------------- -// Check USART bluetooth input -//---------------------------------------------------------------------------- -void CheckUSARTBluetoothInput(uint8_t USARTBuffer[]) -{ - // Auxiliary variables - uint8_t identifier = 0; - uint8_t readWrite = 0; - int16_t sign = 0; - int16_t digit1 = 0; - int16_t digit2 = 0; - int16_t digit3 = 0; - int16_t digit4 = 0; - int16_t digit5 = 0; - int16_t value = 0; - - // Check start and stop character - if ( USARTBuffer[0] != '/' || - USARTBuffer[USART_BLUETOOTH_RX_BYTES - 1] != '\n') - { - return; - } - - // Calculate identifier (number 0-99) - digit1 = (USARTBuffer[1] - '0') * 10; - digit2 = (USARTBuffer[2] - '0'); - identifier = digit1 + digit2; - - // Calculate read or write access (0 - read, 1 - write) - readWrite = USARTBuffer[3] - '0'; - - // If read mode, answer with correct value - if (readWrite == 0) - { - switch(identifier) - { - case 0: - // Answer with battery voltage from master - value = GetBatteryMaster(); - break; - case 1: - // Answer with current from master - value = GetCurrentDCMaster(); - break; - case 2: - // Answer with current from slave - value = currentDC * 100; - break; - case 3: - // Answer with real speed of master - value = GetRealSpeedMaster(); - break; - case 4: - // Answer with real speed of slave - value = realSpeed * 100; - break; - case 5: - // Answer with beeps backwards from master - value = GetBeepsBackwardsMaster() == RESET ? 0 : 1; - break; - case 6: - // Answer with lower LED state of master (music box) - value = GetLowerLEDMaster() == RESET ? 0 : 1; - break; - case 7: - // Answer with upper LED state of master (horn) - value = GetUpperLEDMaster() == RESET ? 0 : 1; - break; - case 8: - // Answer with hue value - value = GetHSBHue(); - break; - case 9: - // Answer with saturation value - value = GetHSBSaturation(); - break; - case 10: - // Answer with brightness value - value = GetHSBBrightness(); - break; - case 11: - // Answer with LEDMode - value = GetRGBProgram(); - break; - case 12: - // Answer with fading speed - value = GetSpeedFading(); - break; - case 13: - // Answer with blink speed - value = GetSpeedBlink(); - break; - case 14: - // Answer with strobe speed - value = GetSpeedStrobe(); - break; - } - - // Send Answer - SendBluetoothDevice(identifier, value); - } - // If write mode, get result value - else if ( readWrite == 1) - { - // Calculate result value (-10000 to 10000) - sign = USARTBuffer[4] == '-' ? -1 : 1; - digit1 = (USARTBuffer[5] - '0') * 10000; - digit2 = (USARTBuffer[6] - '0') * 1000; - digit3 = (USARTBuffer[7] - '0') * 100; - digit4 = (USARTBuffer[8] - '0') * 10; - digit5 = (USARTBuffer[9] - '0'); - value = sign * (digit1 + digit2 + digit3 + digit4 + digit5); - - switch(identifier) - { - case 5: - SetBeepsBackwardsMaster(value == 0 ? RESET : SET); - break; - case 6: - // Set lower LED of master (music box) - SetLowerLEDMaster(value == 0 ? RESET : SET); - break; - case 7: - // Set upper LED of master (horn) - hornCounter_ms = 0; - SetUpperLEDMaster(value == 0 ? RESET : SET); - break; - case 8: - // Set LED hue - SetHSBHue(value); - break; - case 9: - // Set LED saturation - SetHSBSaturation(value); - break; - case 10: - // Set LED brightness - SetHSBBrightness(value); - break; - case 11: - // Set LED mode - SetRGBProgram((LED_PROGRAM)value); - break; - case 12: - // Set fading speed - SetSpeedFading(value); - break; - case 13: - // Set blink speed - SetSpeedBlink(value); - break; - case 14: - // Set strobe speed - SetSpeedStrobe(value); - break; - default: - // Do nothing for the rest of the identifiers - break; - } - } -} - -//---------------------------------------------------------------------------- -// Send frame to bluetooth device -//---------------------------------------------------------------------------- -void SendBluetoothDevice(uint8_t identifier, int16_t value) -{ - int index = 0; - char charVal[5]; - uint8_t buffer[USART_BLUETOOTH_TX_BYTES]; - - // Send bluetooth frame - buffer[index++] = '/'; - sprintf(charVal, "%02d", identifier); - buffer[index++] = charVal[0]; - buffer[index++] = charVal[1]; - buffer[index++] = '0'; - sprintf(charVal, "%05d", value); - buffer[index++] = value < 0 ? '-' : '+'; - buffer[index++] = charVal[0]; - buffer[index++] = charVal[1]; - buffer[index++] = charVal[2]; - buffer[index++] = charVal[3]; - buffer[index++] = charVal[4]; - buffer[index++] = '\n'; - - SendBuffer(USART_STEER_COM, buffer, index); -} - -#endif diff --git a/HoverBoardGigaDevice/Src/commsMasterSlave.c b/HoverBoardGigaDevice/Src/commsMasterSlave.c deleted file mode 100644 index 92697475..00000000 --- a/HoverBoardGigaDevice/Src/commsMasterSlave.c +++ /dev/null @@ -1,414 +0,0 @@ -/* -* This file is part of the hoverboard-firmware-hack-V2 project. The -* firmware is used to hack the generation 2 board of the hoverboard. -* These new hoverboards have no mainboard anymore. They consist of -* two Sensorboards which have their own BLDC-Bridge per Motor and an -* ARM Cortex-M3 processor GD32F130C8. -* -* Copyright (C) 2018 Florian Staeblein -* Copyright (C) 2018 Jakob Broemauer -* Copyright (C) 2018 Kai Liebich -* Copyright (C) 2018 Christoph Lehnert -* -* The program is based on the hoverboard project by Niklas Fauth. The -* structure was tried to be as similar as possible, so that everyone -* could find a better way through the code. -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -*/ - -#include "gd32f1x0.h" -#include "../Inc/it.h" -#include "../Inc/comms.h" -#include "../Inc/commsMasterSlave.h" -#include "../Inc/setup.h" -#include "../Inc/config.h" -#include "../Inc/defines.h" -#include "../Inc/bldc.h" -#include "stdio.h" -#include "string.h" - -#ifdef MASTER -#define USART_MASTERSLAVE_TX_BYTES 10 // Transmit byte count including start '/' and stop character '\n' -#define USART_MASTERSLAVE_RX_BYTES 5 // Receive byte count including start '/' and stop character '\n' - -// Variables which will be written by slave frame -extern FlagStatus beepsBackwards; -#endif -#ifdef SLAVE -#define USART_MASTERSLAVE_TX_BYTES 5 // Transmit byte count including start '/' and stop character '\n' -#define USART_MASTERSLAVE_RX_BYTES 10 // Receive byte count including start '/' and stop character '\n' - -// Variables which will be send to master -FlagStatus upperLEDMaster = RESET; -FlagStatus lowerLEDMaster = RESET; -FlagStatus mosfetOutMaster = RESET; -FlagStatus beepsBackwardsMaster = RESET; - -// Variables which will be written by master frame -int16_t currentDCMaster = 0; -int16_t batteryMaster = 0; -int16_t realSpeedMaster = 0; - -void CheckGeneralValue(uint8_t identifier, int16_t value); -#endif - -extern uint8_t usartMasterSlave_rx_buf[USART_MASTERSLAVE_RX_BUFFERSIZE]; -static uint8_t sMasterSlaveRecord = 0; -static uint8_t sUSARTMasterSlaveRecordBuffer[USART_MASTERSLAVE_RX_BYTES]; -static uint8_t sUSARTMasterSlaveRecordBufferCounter = 0; - -void CheckUSARTMasterSlaveInput(uint8_t u8USARTBuffer[]); -void SendBuffer(uint32_t usart_periph, uint8_t buffer[], uint8_t length); -uint16_t CalcCRC(uint8_t *ptr, int count); - -//---------------------------------------------------------------------------- -// Update USART master slave input -//---------------------------------------------------------------------------- -void UpdateUSARTMasterSlaveInput(void) -{ - uint8_t character = usartMasterSlave_rx_buf[0]; - - // Start character is captured, start record - if (character == '/') - { - sUSARTMasterSlaveRecordBufferCounter = 0; - sMasterSlaveRecord = 1; - } - - if (sMasterSlaveRecord) - { - sUSARTMasterSlaveRecordBuffer[sUSARTMasterSlaveRecordBufferCounter] = character; - sUSARTMasterSlaveRecordBufferCounter++; - - if (sUSARTMasterSlaveRecordBufferCounter >= USART_MASTERSLAVE_RX_BYTES) - { - sUSARTMasterSlaveRecordBufferCounter = 0; - sMasterSlaveRecord = 0; - - // Check input - CheckUSARTMasterSlaveInput (sUSARTMasterSlaveRecordBuffer); - } - } -} - -//---------------------------------------------------------------------------- -// Check USART master slave input -//---------------------------------------------------------------------------- -void CheckUSARTMasterSlaveInput(uint8_t USARTBuffer[]) -{ -#ifdef MASTER - // Result variables - FlagStatus upperLED = RESET; - FlagStatus lowerLED = RESET; - FlagStatus mosfetOut = RESET; - - // Auxiliary variables - uint8_t byte; -#endif -#ifdef SLAVE - // Result variables - int16_t pwmSlave = 0; - FlagStatus enable = RESET; - FlagStatus shutoff = RESET; - FlagStatus chargeStateLowActive = SET; - - // Auxiliary variables - uint8_t identifier = 0; - int16_t value = 0; - uint8_t byte; -#endif - // Auxiliary variables - uint16_t crc; - - // Check start and stop character - if ( USARTBuffer[0] != '/' || - USARTBuffer[USART_MASTERSLAVE_RX_BYTES - 1] != '\n') - { - return; - } - - // Calculate CRC (first bytes except crc and stop byte) - crc = CalcCRC(USARTBuffer, USART_MASTERSLAVE_RX_BYTES - 3); - - // Check CRC - if ( USARTBuffer[USART_MASTERSLAVE_RX_BYTES - 3] != ((crc >> 8) & 0xFF) || - USARTBuffer[USART_MASTERSLAVE_RX_BYTES - 2] != (crc & 0xFF)) - { - return; - } - -#ifdef MASTER - // Calculate setvalues for LED and mosfets - byte = USARTBuffer[1]; - - //none = (byte & BIT(7)) ? SET : RESET; - //none = (byte & BIT(6)) ? SET : RESET; - //none = (byte & BIT(5)) ? SET : RESET; - //none = (byte & BIT(4)) ? SET : RESET; - beepsBackwards = (byte & BIT(3)) ? SET : RESET; - mosfetOut = (byte & BIT(2)) ? SET : RESET; - lowerLED = (byte & BIT(1)) ? SET : RESET; - upperLED = (byte & BIT(0)) ? SET : RESET; - - // Set functions according to the variables - gpio_bit_write(MOSFET_OUT_PORT, MOSFET_OUT_PIN, mosfetOut); - gpio_bit_write(UPPER_LED_PORT, UPPER_LED_PIN, upperLED); - gpio_bit_write(LOWER_LED_PORT, LOWER_LED_PIN, lowerLED); -#endif -#ifdef SLAVE - // Calculate result pwm value -1000 to 1000 - pwmSlave = (int16_t)((USARTBuffer[1] << 8) | USARTBuffer[2]); - - // Get identifier - identifier = USARTBuffer[3]; - - // Calculate result general value - value = (int16_t)((USARTBuffer[4] << 8) | USARTBuffer[5]); - - // Calculate setvalues for enable and shutoff - byte = USARTBuffer[6]; - - shutoff = (byte & BIT(7)) ? SET : RESET; - //none = (byte & BIT(6)) ? SET : RESET; - //none = (byte & BIT(5)) ? SET : RESET; - //none = (byte & BIT(4)) ? SET : RESET; - //none = (byte & BIT(3)) ? SET : RESET; - //none = (byte & BIT(2)) ? SET : RESET; - chargeStateLowActive = (byte & BIT(1)) ? SET : RESET; - enable = (byte & BIT(0)) ? SET : RESET; - - if (shutoff == SET) - { - // Disable usart - usart_deinit(USART_MASTERSLAVE); - - // Set pwm and enable to off - SetEnable(RESET); - SetPWM(0); - - gpio_bit_write(SELF_HOLD_PORT, SELF_HOLD_PIN, RESET); - while(1) - { - // Reload watchdog until device is off - fwdgt_counter_reload(); - } - } - - // Set functions according to the variables - gpio_bit_write(LED_GREEN_PORT, LED_GREEN, chargeStateLowActive == SET ? SET : RESET); - gpio_bit_write(LED_RED_PORT, LED_RED, chargeStateLowActive == RESET ? SET : RESET); - SetEnable(enable); - SetPWM(pwmSlave); - CheckGeneralValue(identifier, value); - - // Send answer - SendMaster(upperLEDMaster, lowerLEDMaster, mosfetOutMaster, beepsBackwardsMaster); - - // Reset the pwm timout to avoid stopping motors - ResetTimeout(); -#endif -} - -#ifdef MASTER -//---------------------------------------------------------------------------- -// Send slave frame via USART -//---------------------------------------------------------------------------- -void SendSlave(int16_t pwmSlave, FlagStatus enable, FlagStatus shutoff, FlagStatus chargeState, uint8_t identifier, int16_t value) -{ - uint8_t index = 0; - uint16_t crc = 0; - uint8_t buffer[USART_MASTERSLAVE_TX_BYTES]; - - // Format pwmValue and general value - int16_t sendPwm = CLAMP(pwmSlave, -1000, 1000); - uint16_t sendPwm_Uint = (uint16_t)(sendPwm); - uint16_t value_Uint = (uint16_t)(value); - - uint8_t sendByte = 0; - sendByte |= (shutoff << 7); - sendByte |= (0 << 6); - sendByte |= (0 << 5); - sendByte |= (0 << 4); - sendByte |= (0 << 3); - sendByte |= (0 << 2); - sendByte |= (chargeState << 1); - sendByte |= (enable << 0); - - // Send answer - buffer[index++] = '/'; - buffer[index++] = (sendPwm_Uint >> 8) & 0xFF; - buffer[index++] = sendPwm_Uint & 0xFF; - buffer[index++] = identifier; - buffer[index++] = (value_Uint >> 8) & 0xFF; - buffer[index++] = value_Uint & 0xFF; - buffer[index++] = sendByte; - - // Calculate CRC - crc = CalcCRC(buffer, index); - buffer[index++] = (crc >> 8) & 0xFF; - buffer[index++] = crc & 0xFF; - - // Stop byte - buffer[index++] = '\n'; - - SendBuffer(USART_MASTERSLAVE, buffer, index); -} -#endif -#ifdef SLAVE -//---------------------------------------------------------------------------- -// Send master frame via USART -//---------------------------------------------------------------------------- -void SendMaster(FlagStatus upperLEDMaster, FlagStatus lowerLEDMaster, FlagStatus mosfetOutMaster, FlagStatus beepsBackwards) -{ - uint8_t index = 0; - uint16_t crc = 0; - uint8_t buffer[USART_MASTERSLAVE_TX_BYTES]; - - uint8_t sendByte = 0; - sendByte |= (0 << 7); - sendByte |= (0 << 6); - sendByte |= (0 << 5); - sendByte |= (0 << 4); - sendByte |= (beepsBackwards << 3); - sendByte |= (mosfetOutMaster << 2); - sendByte |= (lowerLEDMaster << 1); - sendByte |= (upperLEDMaster << 0); - - // Send answer - buffer[index++] = '/'; - buffer[index++] = sendByte; - - // Calculate CRC - crc = CalcCRC(buffer, index); - buffer[index++] = (crc >> 8) & 0xFF; - buffer[index++] = crc & 0xFF; - - // Stop byte - buffer[index++] = '\n'; - - SendBuffer(USART_MASTERSLAVE, buffer, index); -} - -//---------------------------------------------------------------------------- -// Checks input value from master to set value depending on identifier -//---------------------------------------------------------------------------- -void CheckGeneralValue(uint8_t identifier, int16_t value) -{ - switch(identifier) - { - case 0: - currentDCMaster = value; - break; - case 1: - batteryMaster = value; - break; - case 2: - realSpeedMaster = value; - break; - case 3: - break; - default: - break; - } -} - -//---------------------------------------------------------------------------- -// Returns current value sent by master -//---------------------------------------------------------------------------- -int16_t GetCurrentDCMaster(void) -{ - return currentDCMaster; -} - -//---------------------------------------------------------------------------- -// Returns battery value sent by master -//---------------------------------------------------------------------------- -int16_t GetBatteryMaster(void) -{ - return batteryMaster; -} - -//---------------------------------------------------------------------------- -// Returns realspeed value sent by master -//---------------------------------------------------------------------------- -int16_t GetRealSpeedMaster(void) -{ - return realSpeedMaster; -} - -//---------------------------------------------------------------------------- -// Sets upper LED value which will be send to master -//---------------------------------------------------------------------------- -void SetUpperLEDMaster(FlagStatus value) -{ - upperLEDMaster = value; -} - -//---------------------------------------------------------------------------- -// Returns upper LED value sent by master -//---------------------------------------------------------------------------- -FlagStatus GetUpperLEDMaster(void) -{ - return upperLEDMaster; -} - -//---------------------------------------------------------------------------- -// Sets lower LED value which will be send to master -//---------------------------------------------------------------------------- -void SetLowerLEDMaster(FlagStatus value) -{ - lowerLEDMaster = value; -} - -//---------------------------------------------------------------------------- -// Returns lower LED value sent by master -//---------------------------------------------------------------------------- -FlagStatus GetLowerLEDMaster(void) -{ - return lowerLEDMaster; -} - -//---------------------------------------------------------------------------- -// Sets mosfetOut value which will be send to master -//---------------------------------------------------------------------------- -void SetMosfetOutMaster(FlagStatus value) -{ - mosfetOutMaster = value; -} - -//---------------------------------------------------------------------------- -// Returns MosfetOut value sent by master -//---------------------------------------------------------------------------- -FlagStatus GetMosfetOutMaster(void) -{ - return mosfetOutMaster; -} - -//---------------------------------------------------------------------------- -// Sets beepsBackwards value which will be send to master -//---------------------------------------------------------------------------- -void SetBeepsBackwardsMaster(FlagStatus value) -{ - beepsBackwardsMaster = value; -} - -//---------------------------------------------------------------------------- -// Returns beepsBackwardsMaster value sent by master -//---------------------------------------------------------------------------- -FlagStatus GetBeepsBackwardsMaster(void) -{ - return beepsBackwardsMaster; -} -#endif diff --git a/HoverBoardGigaDevice/Src/commsSteering.c b/HoverBoardGigaDevice/Src/commsSteering.c deleted file mode 100644 index 45ae8d8e..00000000 --- a/HoverBoardGigaDevice/Src/commsSteering.c +++ /dev/null @@ -1,136 +0,0 @@ -/* -* This file is part of the hoverboard-firmware-hack-V2 project. The -* firmware is used to hack the generation 2 board of the hoverboard. -* These new hoverboards have no mainboard anymore. They consist of -* two Sensorboards which have their own BLDC-Bridge per Motor and an -* ARM Cortex-M3 processor GD32F130C8. -* -* Copyright (C) 2018 Florian Staeblein -* Copyright (C) 2018 Jakob Broemauer -* Copyright (C) 2018 Kai Liebich -* Copyright (C) 2018 Christoph Lehnert -* -* The program is based on the hoverboard project by Niklas Fauth. The -* structure was tried to be as similar as possible, so that everyone -* could find a better way through the code. -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -*/ - -#include "gd32f1x0.h" -#include "../Inc/it.h" -#include "../Inc/comms.h" -#include "../Inc/commsSteering.h" -#include "../Inc/setup.h" -#include "../Inc/config.h" -#include "../Inc/defines.h" -#include "../Inc/bldc.h" -#include "stdio.h" -#include "string.h" - -// Only master communicates with steerin device -#ifdef MASTER -#define USART_STEER_TX_BYTES 2 // Transmit byte count including start '/' and stop character '\n' -#define USART_STEER_RX_BYTES 8 // Receive byte count including start '/' and stop character '\n' - -extern uint8_t usartSteer_COM_rx_buf[USART_STEER_COM_RX_BUFFERSIZE]; -static uint8_t sSteerRecord = 0; -static uint8_t sUSARTSteerRecordBuffer[USART_STEER_RX_BYTES]; -static uint8_t sUSARTSteerRecordBufferCounter = 0; - -void CheckUSARTSteerInput(uint8_t u8USARTBuffer[]); - -extern int32_t steer; -extern int32_t speed; - -//---------------------------------------------------------------------------- -// Send frame to steer device -//---------------------------------------------------------------------------- -void SendSteerDevice(void) -{ - int index = 0; - uint8_t buffer[USART_STEER_TX_BYTES]; - - // Ask for steer input - buffer[index++] = '/'; - buffer[index++] = '\n'; - - SendBuffer(USART_STEER_COM, buffer, index); -} - -//---------------------------------------------------------------------------- -// Update USART steer input -//---------------------------------------------------------------------------- -void UpdateUSARTSteerInput(void) -{ - uint8_t character = usartSteer_COM_rx_buf[0]; - - // Start character is captured, start record - if (character == '/') - { - sUSARTSteerRecordBufferCounter = 0; - sSteerRecord = 1; - } - - if (sSteerRecord) - { - sUSARTSteerRecordBuffer[sUSARTSteerRecordBufferCounter] = character; - sUSARTSteerRecordBufferCounter++; - - if (sUSARTSteerRecordBufferCounter >= USART_STEER_RX_BYTES) - { - sUSARTSteerRecordBufferCounter = 0; - sSteerRecord = 0; - - // Check input - CheckUSARTSteerInput (sUSARTSteerRecordBuffer); - } - } -} - -//---------------------------------------------------------------------------- -// Check USART steer input -//---------------------------------------------------------------------------- -void CheckUSARTSteerInput(uint8_t USARTBuffer[]) -{ - // Auxiliary variables - uint16_t crc; - - // Check start and stop character - if ( USARTBuffer[0] != '/' || - USARTBuffer[USART_STEER_RX_BYTES - 1] != '\n') - { - return; - } - - // Calculate CRC (first bytes except crc and stop byte) - crc = CalcCRC(USARTBuffer, USART_STEER_RX_BYTES - 3); - - // Check CRC - if ( USARTBuffer[USART_STEER_RX_BYTES - 3] != ((crc >> 8) & 0xFF) || - USARTBuffer[USART_STEER_RX_BYTES - 2] != (crc & 0xFF)) - { - return; - } - - // Calculate result speed value -1000 to 1000 - speed = (int16_t)((USARTBuffer[1] << 8) | USARTBuffer[2]); - - // Calculate result steering value -1000 to 1000 - steer = (int16_t)((USARTBuffer[3] << 8) | USARTBuffer[4]); - - // Reset the pwm timout to avoid stopping motors - ResetTimeout(); -} -#endif diff --git a/HoverBoardGigaDevice/Src/main.c b/HoverBoardGigaDevice/Src/main.c deleted file mode 100644 index a8389700..00000000 --- a/HoverBoardGigaDevice/Src/main.c +++ /dev/null @@ -1,538 +0,0 @@ -/* -* This file is part of the hoverboard-firmware-hack-V2 project. The -* firmware is used to hack the generation 2 board of the hoverboard. -* These new hoverboards have no mainboard anymore. They consist of -* two Sensorboards which have their own BLDC-Bridge per Motor and an -* ARM Cortex-M3 processor GD32F130C8. -* -* Copyright (C) 2018 Florian Staeblein -* Copyright (C) 2018 Jakob Broemauer -* Copyright (C) 2018 Kai Liebich -* Copyright (C) 2018 Christoph Lehnert -* -* The program is based on the hoverboard project by Niklas Fauth. The -* structure was tried to be as similar as possible, so that everyone -* could find a better way through the code. -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -*/ - -#define ARM_MATH_CM3 - -#include "gd32f1x0.h" - -#include "../Inc/setup.h" -#include "../Inc/defines.h" -#include "../Inc/config.h" -#include "../Inc/it.h" -#include "../Inc/bldc.h" -#include "../Inc/commsMasterSlave.h" -#include "../Inc/commsSteering.h" -#include "../Inc/commsBluetooth.h" -#include "stdio.h" -#include "stdlib.h" -#include "string.h" -#include -#include "arm_math.h" - -#ifdef MASTER -int32_t steer = 0; // global variable for steering. -1000 to 1000 -int32_t speed = 0; // global variable for speed. -1000 to 1000 -FlagStatus activateWeakening = RESET; // global variable for weakening -FlagStatus beepsBackwards = RESET; // global variable for beeps backwards - -extern uint8_t buzzerFreq; // global variable for the buzzer pitch. can be 1, 2, 3, 4, 5, 6, 7... -extern uint8_t buzzerPattern; // global variable for the buzzer pattern. can be 1, 2, 3, 4, 5, 6, 7... - -extern float batteryVoltage; // global variable for battery voltage -extern float currentDC; // global variable for current dc -extern float realSpeed; // global variable for real Speed -uint8_t slaveError = 0; // global variable for slave error - -extern FlagStatus timedOut; // Timeoutvariable set by timeout timer - -uint32_t inactivity_timeout_counter = 0; // Inactivity counter -uint32_t steerCounter = 0; // Steer counter for setting update rate - -void ShowBatteryState(uint32_t pin); -void BeepsBackwards(FlagStatus beepsBackwards); -void ShutOff(void); -#endif - -const float lookUpTableAngle[181] = -{ - -1, - -0.937202577, - -0.878193767, - -0.822607884, - -0.770124422, - -0.720461266, - -0.673369096, - -0.628626737, - -0.58603728, - -0.545424828, - -0.506631749, - -0.46951635, - -0.433950895, - -0.399819915, - -0.367018754, - -0.335452314, - -0.30503398, - -0.275684674, - -0.24733204, - -0.219909731, - -0.193356783, - -0.167617063, - -0.142638788, - -0.118374098, - -0.094778672, - -0.071811398, - -0.049434068, - -0.027611115, - -0.006309372, - 0.014502141, - 0.03485241, - 0.054768601, - 0.074276213, - 0.093399224, - 0.112160212, - 0.130580478, - 0.148680146, - 0.166478264, - 0.183992885, - 0.201241154, - 0.218239378, - 0.235003093, - 0.251547129, - 0.267885663, - 0.284032276, - 0.3, - 0.315801365, - 0.331448439, - 0.34695287, - 0.362325923, - 0.377578512, - 0.392721236, - 0.407764409, - 0.422718089, - 0.437592106, - 0.45239609, - 0.467139493, - 0.48183162, - 0.496481645, - 0.511098642, - 0.5256916, - 0.540269454, - 0.554841097, - 0.569415411, - 0.584001283, - 0.598607627, - 0.613243408, - 0.627917665, - 0.642639528, - 0.657418247, - 0.672263213, - 0.687183982, - 0.702190301, - 0.717292134, - 0.732499689, - 0.747823448, - 0.763274197, - 0.778863056, - 0.794601516, - 0.810501473, - 0.826575268, - 0.842835728, - 0.859296209, - 0.875970644, - 0.892873598, - 0.910020317, - 0.927426794, - 0.94510983, - 0.963087109, - 0.981377271, - 1, - 1.018976116, - 1.038327677, - 1.058078086, - 1.07825222, - 1.098876565, - 1.119979359, - 1.141590767, - 1.163743061, - 1.186470823, - 1.209811179, - 1.23380405, - 1.258492439, - 1.283922754, - 1.310145166, - 1.33721402, - 1.365188293, - 1.394132116, - 1.42411537, - 1.455214362, - 1.487512601, - 1.521101681, - 1.556082309, - 1.592565485, - 1.630673867, - 1.670543366, - 1.712325006, - 1.7561871, - 1.802317825, - 1.85092826, - 1.902255998, - 1.956569473, - 2.014173151, - 2.075413814, - 2.140688197, - 2.210452351, - 2.28523318, - 2.365642792, - 2.452396478, - 2.546335439, - 2.648455802, - 2.75994605, - 2.882235846, - 3.01706052, - 3.166547428, - 3.333333333, - 3.520726642, - 3.732935875, - 3.97539819, - 4.255263139, - 4.582124498, - 4.96916252, - 5.434992778, - 6.006790189, - 6.72584757, - 7.658112588, - 8.915817681, - 10.70672711, - 13.46326037, - 18.25863694, - 28.69242032, - 68.95533643, - -158.4943784, - -36.21729907, - -20.22896451, - -13.92536607, - -10.55089693, - -8.447794056, - -7.010715755, - -5.965979741, - -5.171786508, - -4.547320366, - -4.043147824, - -3.62733258, - -3.278323283, - -2.981049637, - -2.72465641, - -2.501126036, - -2.304408198, - -2.129851283, - -1.973820239, - -1.833433222, - -1.706376086, - -1.590769119, - -1.485069639, - -1.387999671, - -1.29849148, - -1.21564602, - -1.138700863, - -1.067005175, - -1 -}; - - -//---------------------------------------------------------------------------- -// MAIN function -//---------------------------------------------------------------------------- -int main (void) -{ -#ifdef MASTER - FlagStatus enable = RESET; - FlagStatus enableSlave = RESET; - FlagStatus chargeStateLowActive = SET; - int16_t sendSlaveValue = 0; - uint8_t sendSlaveIdentifier = 0; - int8_t index = 8; - int16_t pwmSlave = 0; - int16_t pwmMaster = 0; - int16_t scaledSpeed = 0; - int16_t scaledSteer = 0; - float expo = 0; - float steerAngle = 0; - float xScale = 0; -#endif - - //SystemClock_Config(); - SystemCoreClockUpdate(); - SysTick_Config(SystemCoreClock / 100); - - // Init watchdog - if (Watchdog_init() == ERROR) - { - // If an error accours with watchdog initialization do not start device - while(1); - } - - // Init Interrupts - Interrupt_init(); - - // Init timeout timer - TimeoutTimer_init(); - - // Init GPIOs - GPIO_init(); - - // Activate self hold direct after GPIO-init - gpio_bit_write(SELF_HOLD_PORT, SELF_HOLD_PIN, SET); - - // Init usart master slave - USART_MasterSlave_init(); - - // Init ADC - ADC_init(); - - // Init PWM - PWM_init(); - - // Device has 1,6 seconds to do all the initialization - // afterwards watchdog will be fired - fwdgt_counter_reload(); - - // Init usart steer/bluetooth - USART_Steer_COM_init(); - -#ifdef MASTER - // Startup-Sound - for (; index >= 0; index--) - { - buzzerFreq = index; - Delay(10); - } - buzzerFreq = 0; - - // Wait until button is pressed - while (gpio_input_bit_get(BUTTON_PORT, BUTTON_PIN)) - { - // Reload watchdog while button is pressed - fwdgt_counter_reload(); - } -#endif - - while(1) - { -#ifdef MASTER - steerCounter++; - if ((steerCounter % 2) == 0) - { - // Request steering data - SendSteerDevice(); - } - - // Calculate expo rate for less steering with higher speeds - expo = MAP((float)ABS(speed), 0, 1000, 1, 0.5); - - // Each speedvalue or steervalue between 50 and -50 means absolutely no pwm - // -> to get the device calm 'around zero speed' - scaledSpeed = speed < 50 && speed > -50 ? 0 : CLAMP(speed, -1000, 1000) * SPEED_COEFFICIENT; - scaledSteer = steer < 50 && steer > -50 ? 0 : CLAMP(steer, -1000, 1000) * STEER_COEFFICIENT * expo; - - // Map to an angle of 180 degress to 0 degrees for array access (means angle -90 to 90 degrees) - steerAngle = MAP((float)scaledSteer, -1000, 1000, 180, 0); - xScale = lookUpTableAngle[(uint16_t)steerAngle]; - - // Mix steering and speed value for right and left speed - if(steerAngle >= 90) - { - pwmSlave = CLAMP(scaledSpeed, -1000, 1000); - pwmMaster = CLAMP(pwmSlave / xScale, -1000, 1000); - } - else - { - pwmMaster = CLAMP(scaledSpeed, -1000, 1000); - pwmSlave = CLAMP(xScale * pwmMaster, -1000, 1000); - } - - // Read charge state - chargeStateLowActive = gpio_input_bit_get(CHARGE_STATE_PORT, CHARGE_STATE_PIN); - - // Enable is depending on charger is connected or not - enable = chargeStateLowActive; - - // Enable channel output - SetEnable(enable); - - // Decide if slave will be enabled - enableSlave = (enable == SET && timedOut == RESET) ? SET : RESET; - - // Decide which process value has to be sent - switch(sendSlaveIdentifier) - { - case 0: - sendSlaveValue = currentDC * 100; - break; - case 1: - sendSlaveValue = batteryVoltage * 100; - break; - case 2: - sendSlaveValue = realSpeed * 100; - break; - default: - break; - } - - // Set output - SetPWM(pwmMaster); - SendSlave(-pwmSlave, enableSlave, RESET, chargeStateLowActive, sendSlaveIdentifier, sendSlaveValue); - - // Increment identifier - sendSlaveIdentifier++; - if (sendSlaveIdentifier > 2) - { - sendSlaveIdentifier = 0; - } - - // Show green battery symbol when battery level BAT_LOW_LVL1 is reached - if (batteryVoltage > BAT_LOW_LVL1) - { - // Show green battery light - ShowBatteryState(LED_GREEN); - - // Beeps backwards - BeepsBackwards(beepsBackwards); - } - // Make silent sound and show orange battery symbol when battery level BAT_LOW_LVL2 is reached - else if (batteryVoltage > BAT_LOW_LVL2 && batteryVoltage < BAT_LOW_LVL1) - { - // Show orange battery light - ShowBatteryState(LED_ORANGE); - - buzzerFreq = 5; - buzzerPattern = 8; - } - // Make even more sound and show red battery symbol when battery level BAT_LOW_DEAD is reached - else if (batteryVoltage > BAT_LOW_DEAD && batteryVoltage < BAT_LOW_LVL2) - { - // Show red battery light - ShowBatteryState(LED_RED); - - buzzerFreq = 5; - buzzerPattern = 1; - } - // Shut device off, when battery is dead - else if (batteryVoltage < BAT_LOW_DEAD) - { - ShutOff(); - } - else - { - ShutOff(); - } - - // Shut device off when button is pressed - if (gpio_input_bit_get(BUTTON_PORT, BUTTON_PIN)) - { - while (gpio_input_bit_get(BUTTON_PORT, BUTTON_PIN)) {} - ShutOff(); - } - - // Calculate inactivity timeout (Except, when charger is active -> keep device running) - if (ABS(pwmMaster) > 50 || ABS(pwmSlave) > 50 || !chargeStateLowActive) - { - inactivity_timeout_counter = 0; - } - else - { - inactivity_timeout_counter++; - } - - // Shut off device after INACTIVITY_TIMEOUT in minutes - if (inactivity_timeout_counter > (INACTIVITY_TIMEOUT * 60 * 1000) / (DELAY_IN_MAIN_LOOP + 1)) - { - ShutOff(); - } -#endif - - Delay(DELAY_IN_MAIN_LOOP); - - // Reload watchdog (watchdog fires after 1,6 seconds) - fwdgt_counter_reload(); - } -} - -#ifdef MASTER -//---------------------------------------------------------------------------- -// Turns the device off -//---------------------------------------------------------------------------- -void ShutOff(void) -{ - int index = 0; - - buzzerPattern = 0; - for (; index < 8; index++) - { - buzzerFreq = index; - Delay(10); - } - buzzerFreq = 0; - - // Send shut off command to slave - SendSlave(0, RESET, SET, RESET, RESET, RESET); - - // Disable usart - usart_deinit(USART_MASTERSLAVE); - - // Set pwm and enable to off - SetEnable(RESET); - SetPWM(0); - - gpio_bit_write(SELF_HOLD_PORT, SELF_HOLD_PIN, RESET); - while(1) - { - // Reload watchdog until device is off - fwdgt_counter_reload(); - } -} - -//---------------------------------------------------------------------------- -// Shows the battery state on the LEDs -//---------------------------------------------------------------------------- -void ShowBatteryState(uint32_t pin) -{ - gpio_bit_write(LED_GREEN_PORT, LED_GREEN, pin == LED_GREEN ? SET : RESET); - gpio_bit_write(LED_ORANGE_PORT, LED_ORANGE, pin == LED_ORANGE ? SET : RESET); - gpio_bit_write(LED_RED_PORT, LED_RED, pin == LED_RED ? SET : RESET); -} - -//---------------------------------------------------------------------------- -// Beeps while driving backwards -//---------------------------------------------------------------------------- -void BeepsBackwards(FlagStatus beepsBackwards) -{ - // If the speed is less than -50, beep while driving backwards - if (beepsBackwards == SET && speed < -50) - { - buzzerFreq = 5; - buzzerPattern = 4; - } - else - { - buzzerFreq = 0; - buzzerPattern = 0; - } -} -#endif diff --git a/PPMDeviceArduino_V1.0/PPMDevice/PPMDevice.ino b/PPMDeviceArduino_V1.0/PPMDevice/PPMDevice.ino deleted file mode 100644 index 05b28210..00000000 --- a/PPMDeviceArduino_V1.0/PPMDevice/PPMDevice.ino +++ /dev/null @@ -1,76 +0,0 @@ -/* -* This file is part of the hoverboard-firmware-hack-V2 project. The -* firmware is used to hack the generation 2 board of the hoverboard. -* These new hoverboards have no mainboard anymore. They consist of -* two Sensorboards which have their own BLDC-Bridge per Motor and an -* ARM Cortex-M3 processor GD32F130C8. -* -* Copyright (C) 2018 Florian Staeblein -* Copyright (C) 2018 Jakob Broemauer -* Copyright (C) 2018 Kai Liebich -* Copyright (C) 2018 Christoph Lehnert -* -* The program is based on the hoverboard project by Niklas Fauth. The -* structure was tried to be as similar as possible, so that everyone -* could find a better way through the code. -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -*/ - -#include "RCReceiver.h" -#include "SteeringSerial.h" -#include "utils.h" - -void setup() -{ - // Initialize steering serial - InitSteeringSerial(); - - // Enable Debug LED - pinMode(LED_BUILTIN, OUTPUT); - digitalWrite(LED_BUILTIN, 1); - - // Initialize RC receiver - InitRCReceiver(); - - // Start RC receiver - RCReceiverStart(); -} - -void loop() -{ - uint16_t channel1 = GetRCValue(0); - uint16_t channel2 = GetRCValue(1); - uint16_t channel3 = GetRCValue(2); - - // Activate/deactivate speed mode - float factor = channel3 < 1500 ? 0.5 : 1; - - // Handle receiver values - SetSpeed(channel1, factor); - SetSteer(channel2); - -/* SendDebug(); */ - - // Reply only when you receive data - if (Serial.available() > 0) - { - char character = Serial.read(); - if (character == '\n') - { - SendAnswer(); - } - } -} - diff --git a/PPMDeviceArduino_V1.0/PPMDevice/RCReceiver.cpp b/PPMDeviceArduino_V1.0/PPMDevice/RCReceiver.cpp deleted file mode 100644 index 812e5250..00000000 --- a/PPMDeviceArduino_V1.0/PPMDevice/RCReceiver.cpp +++ /dev/null @@ -1,211 +0,0 @@ -/* -* This file is part of the hoverboard-firmware-hack-V2 project. The -* firmware is used to hack the generation 2 board of the hoverboard. -* These new hoverboards have no mainboard anymore. They consist of -* two Sensorboards which have their own BLDC-Bridge per Motor and an -* ARM Cortex-M3 processor GD32F130C8. -* -* Copyright (C) 2018 Florian Staeblein -* Copyright (C) 2018 Jakob Broemauer -* Copyright (C) 2018 Kai Liebich -* Copyright (C) 2018 Christoph Lehnert -* -* The program is based on the hoverboard project by Niklas Fauth. The -* structure was tried to be as similar as possible, so that everyone -* could find a better way through the code. -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -*/ - -#include "RCReceiver.h" - -uint16_t m_pulseStart[SERVOS]; // Last measured pulse start for each input. -uint16_t m_pulseLength_us[SERVOS]; // Last measured pulse length for each input. -static uint8_t lastB = 0; -volatile static bool enable = false; -volatile static bool pinChangeActive = false; - -uint16_t RCReceiverGetStartCount(); -uint16_t RCReceiverGetStopCount(uint8_t p_servo); -uint16_t RCReceiverGetCnt(); - -//---------------------------------------------------------------------------- -// Initializes the steering serial -//---------------------------------------------------------------------------- -void InitRCReceiver(void) -{ - // Deinitialize timer1 - TCCR1A = 0; - TCCR1B = 0; - TCCR1C = 0; - TIMSK1 = 0; - OCR1A = 0; - OCR1B = 0; - TCNT1 = 0; - - // We use pin 8-10 PB0, PB1, PB2 as Servo input pins - pinMode(8, INPUT); - pinMode(9, INPUT); - pinMode(10, INPUT); - - // We use pin change interrupts to detect changes in the signal - // Only allow pin change interrupts for PB0-3 (digital pins 8-10) - PCMSK0 |= (1 << PCINT0) | (1 << PCINT1) | (1 << PCINT2); - - // Enable pin change interrupt 0 - PCICR |= (1 << PCIE0); -} - -//---------------------------------------------------------------------------- -// Starts the receiver -//---------------------------------------------------------------------------- -void RCReceiverStart() -{ - // Clean buffers - for (uint8_t i = 0; i < SERVOS; ++i) - { - m_pulseStart[i] = 0; - m_pulseLength_us[i] = ZERO_US; - } - - // Start Timer 1 - // Timer 1 counts up with 1MHz, so that 1 count = 1us - // Overflow interrupt after 1000000MHz / 65536 = 0,065536s -> every 65,5ms - TCCR1B = (TCCR1B & ~(_BV(CS12) | _BV(CS11) | _BV(CS10))) | _BV(CS11); - TIMSK1 |= _BV(TOIE1); -} - -//---------------------------------------------------------------------------- -// Returns the current result value of specified pin -//---------------------------------------------------------------------------- -uint16_t GetRCValue(uint8_t pin) -{ - if (pin < 0 || pin > SERVOS) - { - return ZERO_US; - } - return m_pulseLength_us[pin]; -} - -//---------------------------------------------------------------------------- -// Will be called when a reciever pin changes -//---------------------------------------------------------------------------- -void RCReceiverPinChanged(uint8_t p_servo, bool p_high) -{ - if (p_high) - { - // Start of pulse - m_pulseStart[p_servo] = RCReceiverGetStartCount(); - } - else - { - // End of pulse - m_pulseLength_us[p_servo] = CLAMP(RCReceiverGetStopCount(p_servo), 1000, 2000); - } -} - -//---------------------------------------------------------------------------- -// Returns the start count of the timer -//---------------------------------------------------------------------------- -uint16_t RCReceiverGetStartCount() -{ - uint16_t cnt = RCReceiverGetCnt(); - - // Start of pulse - return cnt; -} - -//---------------------------------------------------------------------------- -// Returns the stop count of the specified input pin -//---------------------------------------------------------------------------- -uint16_t RCReceiverGetStopCount(uint8_t p_servo) -{ - uint16_t cnt = RCReceiverGetCnt(); - - // End of pulse - return (cnt - m_pulseStart[p_servo]) >> 1; -} - -//---------------------------------------------------------------------------- -// Returns the count value of the timer -//---------------------------------------------------------------------------- -uint16_t RCReceiverGetCnt() -{ - uint8_t oldSREG = SREG; - cli(); - uint16_t cnt = TCNT1; - SREG = oldSREG; - - return cnt; -} - -//---------------------------------------------------------------------------- -// Interrupt service routine for timer1 overflow -//---------------------------------------------------------------------------- -ISR(TIMER1_OVF_vect) -{ - sei(); - - // Between two overflow interrupts (every 65,5ms) should be - // at least one pin change interrupt (receiver pwm period is 6ms) - if (pinChangeActive) - { - enable = true; - } - else - { - m_pulseLength_us[0] = ZERO_US; - m_pulseLength_us[1] = ZERO_US; - m_pulseLength_us[2] = ZERO_US; - enable = false; - } - pinChangeActive = false; -} - -// -//---------------------------------------------------------------------------- -// Interrupt service routine for pin change port 0 interrupt -//---------------------------------------------------------------------------- -ISR(PCINT0_vect) -{ - if (enable == false) - { - pinChangeActive = true; - return; - } - pinChangeActive = true; - uint8_t newB = PINB; - - // Bitwise XOR will set all bits that have changed - uint8_t chgB = newB ^ lastB; - lastB = newB; - - // Has any of the pins changed? - if (chgB) - { - // Find out which pin has changed - if (chgB & _BV(0)) - { - RCReceiverPinChanged(0, newB & _BV(0)); - } - if (chgB & _BV(1)) - { - RCReceiverPinChanged(1, newB & _BV(1)); - } - if (chgB & _BV(2)) - { - RCReceiverPinChanged(2, newB & _BV(2)); - } - } -} diff --git a/PPMDeviceArduino_V1.0/PPMDevice/SteeringSerial.cpp b/PPMDeviceArduino_V1.0/PPMDevice/SteeringSerial.cpp deleted file mode 100644 index 75717712..00000000 --- a/PPMDeviceArduino_V1.0/PPMDevice/SteeringSerial.cpp +++ /dev/null @@ -1,181 +0,0 @@ -/* -* This file is part of the hoverboard-firmware-hack-V2 project. The -* firmware is used to hack the generation 2 board of the hoverboard. -* These new hoverboards have no mainboard anymore. They consist of -* two Sensorboards which have their own BLDC-Bridge per Motor and an -* ARM Cortex-M3 processor GD32F130C8. -* -* Copyright (C) 2018 Florian Staeblein -* Copyright (C) 2018 Jakob Broemauer -* Copyright (C) 2018 Kai Liebich -* Copyright (C) 2018 Christoph Lehnert -* -* The program is based on the hoverboard project by Niklas Fauth. The -* structure was tried to be as similar as possible, so that everyone -* could find a better way through the code. -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -*/ - -#include "SteeringSerial.h" - -//---------------------------------------------------------------------------- -// Variables -//---------------------------------------------------------------------------- -int32_t speedValue = 0; -int32_t steerValue = 0; -uint8_t upperLEDMaster = 0; -uint8_t lowerLEDMaster = 0; -uint8_t mosfetOutMaster = 0; -uint8_t upperLEDSlave = 0; -uint8_t lowerLEDSlave = 0; -uint8_t mosfetOutSlave = 0; -uint8_t beepsBackwards = 0; -uint8_t activateWeakening = 0; - -void SendBuffer(uint8_t buffer[], uint8_t length); -uint16_t CalcCRC(uint8_t *ptr, int count); - -//---------------------------------------------------------------------------- -// Initializes the steering serial -//---------------------------------------------------------------------------- -void InitSteeringSerial(void) -{ - // Set up serial communication - Serial.begin(19200, SERIAL_8N1); -} - -//---------------------------------------------------------------------------- -// Sets the speed value -//---------------------------------------------------------------------------- -void SetSpeed(uint16_t data, float factor) -{ - int16_t tempValue = ((float)data * 2 ) - 3000.0; // Value -1000 to 1000 - tempValue *= factor; - tempValue = CLAMP(tempValue, -1000, 1000); // Avoid calculation failure - speedValue = tempValue; -} - -//---------------------------------------------------------------------------- -// Sets the steering value -//---------------------------------------------------------------------------- -void SetSteer(uint16_t data) -{ - int16_t tempValue = ((float)data * 2 ) - 3000.0; // Value -1000 to 1000 - tempValue = CLAMP(tempValue, -1000, 1000); // Avoid calculation failure - if (speedValue < 0) - { - steerValue *= -1; - } - steerValue = tempValue; -} - -//---------------------------------------------------------------------------- -// Sends answer to master device -//---------------------------------------------------------------------------- -void SendAnswer(void) -{ - int index = 0; - uint8_t buffer[9]; - uint8_t byte1 = 0; - uint8_t byte2 = 0; - uint8_t byte3 = 0; - uint8_t byte4 = 0; - - uint8_t sendByte = 0; - sendByte |= (activateWeakening << 7); - sendByte |= (beepsBackwards << 6); - sendByte |= (mosfetOutSlave << 5); - sendByte |= (lowerLEDSlave << 4); - sendByte |= (upperLEDSlave << 3); - sendByte |= (mosfetOutMaster << 2); - sendByte |= (lowerLEDMaster << 1); - sendByte |= (upperLEDMaster << 0); - - uint16_t speedValue_Format = (uint16_t)(speedValue); - byte1 |= (speedValue_Format >> 8) & 0xFF; - byte2 |= speedValue_Format & 0xFF; - - uint16_t steerValue_Format = (uint16_t)(steerValue); - byte3 |= (steerValue_Format >> 8) & 0xFF; - byte4 |= steerValue_Format & 0xFF; - - // Send answer - buffer[index++] = '/'; - buffer[index++] = byte1; - buffer[index++] = byte2; - buffer[index++] = byte3; - buffer[index++] = byte4; - buffer[index++] = sendByte; - - // Calculate CRC - uint16_t crc = CalcCRC(buffer, index); - buffer[index++] = (crc >> 8) & 0xFF; - buffer[index++] = crc & 0xFF; - - // Stop byte - buffer[index++] = '\n'; - - SendBuffer(buffer, index); -} - -//---------------------------------------------------------------------------- -// Calculates CRC value -//---------------------------------------------------------------------------- -uint16_t CalcCRC(uint8_t *ptr, int count) -{ - uint16_t crc; - uint8_t i; - crc = 0; - while (--count >= 0) - { - crc = crc ^ (uint16_t) *ptr++ << 8; - i = 8; - do - { - if (crc & 0x8000) - { - crc = crc << 1 ^ 0x1021; - } - else - { - crc = crc << 1; - } - } while(--i); - } - return (crc); -} - -//---------------------------------------------------------------------------- -// Sends buffer -//---------------------------------------------------------------------------- -void SendBuffer(uint8_t buffer[], uint8_t length) -{ - uint8_t index = 0; - - for(; index < length; index++) - { - Serial.write(buffer[index]); - } -} - -//---------------------------------------------------------------------------- -// Sends debug infos -//---------------------------------------------------------------------------- -void SendDebug() -{ - Serial.print(speedValue); - Serial.print(","); - Serial.println(steerValue); -} diff --git a/PPMDeviceArduino_V1.0/PPMDevice/SteeringSerial.h b/PPMDeviceArduino_V1.0/PPMDevice/SteeringSerial.h deleted file mode 100644 index 5dd333fe..00000000 --- a/PPMDeviceArduino_V1.0/PPMDevice/SteeringSerial.h +++ /dev/null @@ -1,64 +0,0 @@ -/* -* This file is part of the hoverboard-firmware-hack-V2 project. The -* firmware is used to hack the generation 2 board of the hoverboard. -* These new hoverboards have no mainboard anymore. They consist of -* two Sensorboards which have their own BLDC-Bridge per Motor and an -* ARM Cortex-M3 processor GD32F130C8. -* -* Copyright (C) 2018 Florian Staeblein -* Copyright (C) 2018 Jakob Broemauer -* Copyright (C) 2018 Kai Liebich -* Copyright (C) 2018 Christoph Lehnert -* -* The program is based on the hoverboard project by Niklas Fauth. The -* structure was tried to be as similar as possible, so that everyone -* could find a better way through the code. -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -*/ - -#ifndef STEERINGSERIAL_H -#define STEERINGSERIAL_H - -#include -#include -#include "utils.h" - -//---------------------------------------------------------------------------- -// Initializes the steering serial -//---------------------------------------------------------------------------- -void InitSteeringSerial(void); - -//---------------------------------------------------------------------------- -// Sets the speed value -//---------------------------------------------------------------------------- -void SetSpeed(uint16_t data, float factor); - -//---------------------------------------------------------------------------- -// Sets the steering value -//---------------------------------------------------------------------------- -void SetSteer(uint16_t data); - -//---------------------------------------------------------------------------- -// Sends answer to master device -//---------------------------------------------------------------------------- -void SendAnswer(void); - - -//---------------------------------------------------------------------------- -// Sends debug infos -//---------------------------------------------------------------------------- -void SendDebug(); - -#endif diff --git a/PPMDeviceArduino_V1.0/PPMDevice/utils.h b/PPMDeviceArduino_V1.0/PPMDevice/utils.h deleted file mode 100644 index 914cad94..00000000 --- a/PPMDeviceArduino_V1.0/PPMDevice/utils.h +++ /dev/null @@ -1,38 +0,0 @@ -/* -* This file is part of the hoverboard-firmware-hack-V2 project. The -* firmware is used to hack the generation 2 board of the hoverboard. -* These new hoverboards have no mainboard anymore. They consist of -* two Sensorboards which have their own BLDC-Bridge per Motor and an -* ARM Cortex-M3 processor GD32F130C8. -* -* Copyright (C) 2018 Florian Staeblein -* Copyright (C) 2018 Jakob Broemauer -* Copyright (C) 2018 Kai Liebich -* Copyright (C) 2018 Christoph Lehnert -* -* The program is based on the hoverboard project by Niklas Fauth. The -* structure was tried to be as similar as possible, so that everyone -* could find a better way through the code. -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -*/ - -#ifndef UTILS_H -#define UTILS_H - -#define ABS(a) (((a) < 0.0) ? -(a) : (a)) -#define CLAMP(x, low, high) (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x))) -#define MAP(x, xMin, xMax, yMin, yMax) ((x - xMin) * (yMax - yMin) / (xMax - xMin) + yMin) - -#endif diff --git a/README.md b/README.md index d06aebdf..e5ff78b3 100644 --- a/README.md +++ b/README.md @@ -1,36 +1,68 @@ -#### Updates: -```` -- Firmware is ready. -- Sadly I can not support any issues. I'm not a student, less free time :) -```` -### Hoverboard-Firmware-Hack-Gen2 +### Hoverboard Utility Gateway System (HUGS). -Hoverboard Hack Firmware Generation 2 for the Hoverboard with the two Mainboards instead of the Sensorboards (See Pictures). +Based on: Hoverboard-Firmware-Hack-Gen2 -This repo contains open source firmware for generic Hoverboards with two mainboards. It allows you to control the hardware of the new version of hoverboards (like the Mainboard, Motors and Battery) with an arduino or some other steering device for projects like driving armchairs. +Hackaday Project Page: https://hackaday.io/project/170932-hoverboards-for-assistive-devices -The structure of the firmware is based on the firmware hack of Niklas Fauth (https://github.com/NiklasFauth/hoverboard-firmware-hack/). Because of a different model of processor (GD32F130C8 instead of STM32F103) it was not possible to use the same firmware and it has to be written from scratch (Different hardware, different, pins, different registers :( ) +More inclusive Repo: https://github.com/gearsincorg/Hoverboards-for-assistive-devices -- This project requires knowledge of the initial project linked above. -- At the current point I am not able to support any questions or issues - sorry! +### Purpose: +The HUGS project goal is to enable Hoverboards, or Hoverboard drive components to be re-purposed to provide low-cost mobility to other systems, such as assistive devices for the disabled, general purpose robots or other labor saving devices. +To implement this goal, new code will be developed and installed in existing hoverboards, to provide a generic purpose control protocol. This protocol will be used by external devices to run one or more “hoverboard” type wheels. + +### This project requires Rev 3.1 of the Giga Device libraries. +In Keil compliier, use Project/Manage/Pack Installer and then File/Import and point to the pack file in this repo: GigaDevice.GD32F1x0_DFP.3.1.0.pack +Ensure this is the device associated with this project. + +### Latest release: +A major modification to the base control strategy was adding several different motor control methods. + +The basic method is a simple PWM power control where the the user requests a PWM level from 0 to 1000 and the comutation happens as required by the current sensed position. The resulting speed is an open loop response. + +The next method was a closed loop response using the resultant phase transition speed as feedback. A Feed forward control loop with proportional and integral gain was created to regulate the resulting speed. Control input is an actual linear speed in the +/- 5MPS range, expressed in mmPS. + +The third method is a low speed closed loop mode that uses a sinusoidal stepper motor sequence to drive the commutation at a fixed rate, depending on the requested speed. The method optains higgly accurate speeds at rates less than about 200 mmPS. + +The fourth and final mode is a hybrid of the last two which switches automatically between the low speed stepper mode and the PID control mode. + +### Background: +The popular “Hoverboard” toy uses a somewhat unique drive system. A powerful brushless DC motor has been integrated inside each of the small rubber wheels, and paired with a low cost motor controller. This mechanical/electrical combination provides a compact drive system that produce precise motions, under considerable load, for relatively low cost. + +Through reverse engineering the controller electronics and firmware, code is now available which can be modified to provide alternative operation of the drive system (no longer tied to a tilt-and-drive control system). + +The goal of HUGS is to reprogram the motor controller to accept external control commands, and return wheel status information. HUGS will permit individual wheels to be commanded to run at set speeds, and to move to specified positions. Current speed and position information will be returned. +By providing an open control protocol, other groups can develop their own high level control logic to run the drive wheels for a myriad of applications. + +This repo contains open source firmware that has been deveoped and tested on HOVER-1 Ultra Hoverboard --- #### Hardware -![otter](https://github.com/flo199213/Hoverboard-Firmware-Hack-Gen2/blob/master/Hardware_Overview_small.png) +My initial Hoverboard purchase was the Hover-1 Ultra. I wanted to do the work on a board that could be purchased by name. +I chose this model because it looked like the company had several models and was likely to be a more reliable vendor than most "direct from China" vendors. + +Ultimately my choice backfired on me because instead of the more common single board controller, this unit had two boards (one master and one slave). So I had to work from a more limited development set of Gen2 hoverboard. + +My most upsetting discovery was that when I was all done, I purchased a different model (Maverick vs Ultra) from the same supllier, and discovered that the Ultra code does not translate. -The hardware has two main boards, which are different equipped. They are connected via USART. Additionally there are some LED PCB connected at X1 and X2 which signalize the battery state and the error state. There is an programming connector for ST-Link/V2 and they break out GND, USART/I2C, 5V on a second pinhead. +Since I'm realy not able to reverse engineer this new hardware, this my be a throw-away hoverboard. -The reverse-engineered schematics of the mainboards can be found here: -https://github.com/flo199213/Hoverboard-Firmware-Hack-Gen2/blob/master/Schematics/HoverBoard_CoolAndFun.pdf +So "For the record" everything here has been developed on the Hover-1 Ultra unit, and pictures of the controller boards are in the Documentation folder of this repo. +The HOVER-1 Ultra has two sepparate motor controller boards, usually configured as a master and a slave with a USART Serial port passing commands and data back and forth. + +There is a sets of pads that can be used to program the processor using a ST-Link/V2. + +There is also a set of pads that can be used for a remote monitor /control port. --- #### Flashing -The firmware is built with Keil (free up to 32KByte). To build the firmware, open the Keil project file which is includes in repository. Right to the STM32, there is a debugging header with GND, 3V3, SWDIO and SWCLK. Connect GND, SWDIO and SWCLK to your SWD programmer, like the ST-Link found on many STM devboards. -- If you never flashed your mainboard before, the controller is locked. To unlock the flash, use STM32 ST-LINK Utility or openOCD. -- To flash the STM32, use the STM32 ST-LINK Utility as well, ST-Flash utility or Keil by itself. +The firmware is built with Keil (free up to 32KByte). +To build the firmware, open the Keil project file (includes in repository). + +- If the controller boards contain the original firmware, they will need to be unlocked. To do this, use the STM32 ST-LINK Utility. +- To flash the STM32, use the STM32 ST-LINK Utility, or use Keil and run the code in debug mode, which will download the code first. - Hold the powerbutton while flashing the firmware, as the controller releases the power latch and switches itself off during flashing diff --git a/Schematics/HoverBoard_CoolAndFun.sch b/Schematics/HoverBoard_CoolAndFun.sch deleted file mode 100644 index 97157b79..00000000 --- a/Schematics/HoverBoard_CoolAndFun.sch +++ /dev/null @@ -1,7695 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<b>Frames for Sheet and Layout</b> - - - - - - - - - - - - - - - - - - - - ->DRAWING_NAME ->LAST_DATE_TIME ->SHEET -Sheet: - - - - - -<b>FRAME</b><p> -DIN A4, landscape with location and doc. field - - - - - - - - - - - - - - -<b>Resistors, Capacitors, Inductors</b><p> -Based on the previous libraries: -<ul> -<li>r.lbr -<li>cap.lbr -<li>cap-fe.lbr -<li>captant.lbr -<li>polcap.lbr -<li>ipc-smd.lbr -</ul> -All SMD packages are defined according to the IPC specifications and CECC<p> -<author>Created by librarian@cadsoft.de</author><p> -<p> -for Electrolyt Capacitors see also :<p> -www.bccomponents.com <p> -www.panasonic.com<p> -www.kemet.com<p> -http://www.secc.co.jp/pdf/os_e/2004/e_os_all.pdf <b>(SANYO)</b> -<p> -for trimmer refence see : <u>www.electrospec-inc.com/cross_references/trimpotcrossref.asp</u><p> - -<table border=0 cellspacing=0 cellpadding=0 width="100%" cellpaddding=0> -<tr valign="top"> - -<! <td width="10">&nbsp;</td> -<td width="90%"> - -<b><font color="#0000FF" size="4">TRIM-POT CROSS REFERENCE</font></b> -<P> -<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=2> - <TR> - <TD COLSPAN=8> - <FONT SIZE=3 FACE=ARIAL><B>RECTANGULAR MULTI-TURN</B></FONT> - </TD> - </TR> - <TR> - <TD ALIGN=CENTER> - <B> - <FONT SIZE=3 FACE=ARIAL color="#FF0000">BOURNS</FONT> - </B> - </TD> - <TD ALIGN=CENTER> - <B> - <FONT SIZE=3 FACE=ARIAL color="#FF0000">BI&nbsp;TECH</FONT> - </B> - </TD> - <TD ALIGN=CENTER> - <B> - <FONT SIZE=3 FACE=ARIAL color="#FF0000">DALE-VISHAY</FONT> - </B> - </TD> - <TD ALIGN=CENTER> - <B> - <FONT SIZE=3 FACE=ARIAL color="#FF0000">PHILIPS/MEPCO</FONT> - </B> - </TD> - <TD ALIGN=CENTER> - <B> - <FONT SIZE=3 FACE=ARIAL color="#FF0000">MURATA</FONT> - </B> - </TD> - <TD ALIGN=CENTER> - <B> - <FONT SIZE=3 FACE=ARIAL color="#FF0000">PANASONIC</FONT> - </B> - </TD> - <TD ALIGN=CENTER> - <B> - <FONT SIZE=3 FACE=ARIAL color="#FF0000">SPECTROL</FONT> - </B> - </TD> - <TD ALIGN=CENTER> - <B> - <FONT SIZE=3 FACE=ARIAL color="#FF0000">MILSPEC</FONT> - </B> - </TD><TD>&nbsp;</TD> - </TR> - <TR> - <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3 > - 3005P<BR> - 3006P<BR> - 3006W<BR> - 3006Y<BR> - 3009P<BR> - 3009W<BR> - 3009Y<BR> - 3057J<BR> - 3057L<BR> - 3057P<BR> - 3057Y<BR> - 3059J<BR> - 3059L<BR> - 3059P<BR> - 3059Y<BR></FONT> - </TD> - <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> - -<BR> - 89P<BR> - 89W<BR> - 89X<BR> - 89PH<BR> - 76P<BR> - 89XH<BR> - 78SLT<BR> - 78L&nbsp;ALT<BR> - 56P&nbsp;ALT<BR> - 78P&nbsp;ALT<BR> - T8S<BR> - 78L<BR> - 56P<BR> - 78P<BR></FONT> - </TD> - <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> - -<BR> - T18/784<BR> - 783<BR> - 781<BR> - -<BR> - -<BR> - -<BR> - 2199<BR> - 1697/1897<BR> - 1680/1880<BR> - 2187<BR> - -<BR> - -<BR> - -<BR> - -<BR></FONT> - </TD> - <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> - -<BR> - 8035EKP/CT20/RJ-20P<BR> - -<BR> - RJ-20X<BR> - -<BR> - -<BR> - -<BR> - 1211L<BR> - 8012EKQ&nbsp;ALT<BR> - 8012EKR&nbsp;ALT<BR> - 1211P<BR> - 8012EKJ<BR> - 8012EKL<BR> - 8012EKQ<BR> - 8012EKR<BR></FONT> - </TD> - <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> - -<BR> - 2101P<BR> - 2101W<BR> - 2101Y<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - 2102L<BR> - 2102S<BR> - 2102Y<BR></FONT> - </TD> - <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> - -<BR> - EVMCOG<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR></FONT> - </TD> - <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> - -<BR> - 43P<BR> - 43W<BR> - 43Y<BR> - -<BR> - -<BR> - -<BR> - -<BR> - 40L<BR> - 40P<BR> - 40Y<BR> - 70Y-T602<BR> - 70L<BR> - 70P<BR> - 70Y<BR></FONT> - </TD> - <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - RT/RTR12<BR> - RT/RTR12<BR> - RT/RTR12<BR> - -<BR> - RJ/RJR12<BR> - RJ/RJR12<BR> - RJ/RJR12<BR></FONT> - </TD> - </TR> - <TR> - <TD COLSPAN=8>&nbsp; - </TD> - </TR> - <TR> - <TD COLSPAN=8> - <FONT SIZE=4 FACE=ARIAL><B>SQUARE MULTI-TURN</B></FONT> - </TD> - </TR> - <TR> - <TD ALIGN=CENTER> - <FONT SIZE=3 FACE=ARIAL><B>BOURN</B></FONT> - </TD> - <TD ALIGN=CENTER> - <FONT SIZE=3 FACE=ARIAL><B>BI&nbsp;TECH</B></FONT> - </TD> - <TD ALIGN=CENTER> - <FONT SIZE=3 FACE=ARIAL><B>DALE-VISHAY</B></FONT> - </TD> - <TD ALIGN=CENTER> - <FONT SIZE=3 FACE=ARIAL><B>PHILIPS/MEPCO</B></FONT> - </TD> - <TD ALIGN=CENTER> - <FONT SIZE=3 FACE=ARIAL><B>MURATA</B></FONT> - </TD> - <TD ALIGN=CENTER> - <FONT SIZE=3 FACE=ARIAL><B>PANASONIC</B></FONT> - </TD> - <TD ALIGN=CENTER> - <FONT SIZE=3 FACE=ARIAL><B>SPECTROL</B></FONT> - </TD> - <TD ALIGN=CENTER> - <FONT SIZE=3 FACE=ARIAL><B>MILSPEC</B></FONT> - </TD> - </TR> - <TR> - <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> - 3250L<BR> - 3250P<BR> - 3250W<BR> - 3250X<BR> - 3252P<BR> - 3252W<BR> - 3252X<BR> - 3260P<BR> - 3260W<BR> - 3260X<BR> - 3262P<BR> - 3262W<BR> - 3262X<BR> - 3266P<BR> - 3266W<BR> - 3266X<BR> - 3290H<BR> - 3290P<BR> - 3290W<BR> - 3292P<BR> - 3292W<BR> - 3292X<BR> - 3296P<BR> - 3296W<BR> - 3296X<BR> - 3296Y<BR> - 3296Z<BR> - 3299P<BR> - 3299W<BR> - 3299X<BR> - 3299Y<BR> - 3299Z<BR></FONT> - </TD> - <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> - -<BR> - 66P&nbsp;ALT<BR> - 66W&nbsp;ALT<BR> - 66X&nbsp;ALT<BR> - 66P&nbsp;ALT<BR> - 66W&nbsp;ALT<BR> - 66X&nbsp;ALT<BR> - -<BR> - 64W&nbsp;ALT<BR> - -<BR> - 64P&nbsp;ALT<BR> - 64W&nbsp;ALT<BR> - 64X&nbsp;ALT<BR> - 64P<BR> - 64W<BR> - 64X<BR> - 66X&nbsp;ALT<BR> - 66P&nbsp;ALT<BR> - 66W&nbsp;ALT<BR> - 66P<BR> - 66W<BR> - 66X<BR> - 67P<BR> - 67W<BR> - 67X<BR> - 67Y<BR> - 67Z<BR> - 68P<BR> - 68W<BR> - 68X<BR> - 67Y&nbsp;ALT<BR> - 67Z&nbsp;ALT<BR></FONT> - </TD> - <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> - 5050<BR> - 5091<BR> - 5080<BR> - 5087<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - T63YB<BR> - T63XB<BR> - -<BR> - -<BR> - -<BR> - 5887<BR> - 5891<BR> - 5880<BR> - -<BR> - -<BR> - -<BR> - T93Z<BR> - T93YA<BR> - T93XA<BR> - T93YB<BR> - T93XB<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR></FONT> - </TD> - <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - 8026EKP<BR> - 8026EKW<BR> - 8026EKM<BR> - 8026EKP<BR> - 8026EKB<BR> - 8026EKM<BR> - 1309X<BR> - 1309P<BR> - 1309W<BR> - 8024EKP<BR> - 8024EKW<BR> - 8024EKN<BR> - RJ-9P/CT9P<BR> - RJ-9W<BR> - RJ-9X<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR></FONT> - </TD> - <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - 3103P<BR> - 3103Y<BR> - 3103Z<BR> - 3103P<BR> - 3103Y<BR> - 3103Z<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - 3105P/3106P<BR> - 3105W/3106W<BR> - 3105X/3106X<BR> - 3105Y/3106Y<BR> - 3105Z/3105Z<BR> - 3102P<BR> - 3102W<BR> - 3102X<BR> - 3102Y<BR> - 3102Z<BR></FONT> - </TD> - <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - EVMCBG<BR> - EVMCCG<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR></FONT> - </TD> - <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> - 55-1-X<BR> - 55-4-X<BR> - 55-3-X<BR> - 55-2-X<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - 50-2-X<BR> - 50-4-X<BR> - 50-3-X<BR> - -<BR> - -<BR> - -<BR> - 64P<BR> - 64W<BR> - 64X<BR> - 64Y<BR> - 64Z<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR></FONT> - </TD> - <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> - RT/RTR22<BR> - RT/RTR22<BR> - RT/RTR22<BR> - RT/RTR22<BR> - RJ/RJR22<BR> - RJ/RJR22<BR> - RJ/RJR22<BR> - RT/RTR26<BR> - RT/RTR26<BR> - RT/RTR26<BR> - RJ/RJR26<BR> - RJ/RJR26<BR> - RJ/RJR26<BR> - RJ/RJR26<BR> - RJ/RJR26<BR> - RJ/RJR26<BR> - RT/RTR24<BR> - RT/RTR24<BR> - RT/RTR24<BR> - RJ/RJR24<BR> - RJ/RJR24<BR> - RJ/RJR24<BR> - RJ/RJR24<BR> - RJ/RJR24<BR> - RJ/RJR24<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR></FONT> - </TD> - </TR> - <TR> - <TD COLSPAN=8>&nbsp; - </TD> - </TR> - <TR> - <TD COLSPAN=8> - <FONT SIZE=4 FACE=ARIAL><B>SINGLE TURN</B></FONT> - </TD> - </TR> - <TR> - <TD ALIGN=CENTER> - <FONT SIZE=3 FACE=ARIAL><B>BOURN</B></FONT> - </TD> - <TD ALIGN=CENTER> - <FONT SIZE=3 FACE=ARIAL><B>BI&nbsp;TECH</B></FONT> - </TD> - <TD ALIGN=CENTER> - <FONT SIZE=3 FACE=ARIAL><B>DALE-VISHAY</B></FONT> - </TD> - <TD ALIGN=CENTER> - <FONT SIZE=3 FACE=ARIAL><B>PHILIPS/MEPCO</B></FONT> - </TD> - <TD ALIGN=CENTER> - <FONT SIZE=3 FACE=ARIAL><B>MURATA</B></FONT> - </TD> - <TD ALIGN=CENTER> - <FONT SIZE=3 FACE=ARIAL><B>PANASONIC</B></FONT> - </TD> - <TD ALIGN=CENTER> - <FONT SIZE=3 FACE=ARIAL><B>SPECTROL</B></FONT> - </TD> - <TD ALIGN=CENTER> - <FONT SIZE=3 FACE=ARIAL><B>MILSPEC</B></FONT> - </TD> - </TR> - <TR> - <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> - 3323P<BR> - 3323S<BR> - 3323W<BR> - 3329H<BR> - 3329P<BR> - 3329W<BR> - 3339H<BR> - 3339P<BR> - 3339W<BR> - 3352E<BR> - 3352H<BR> - 3352K<BR> - 3352P<BR> - 3352T<BR> - 3352V<BR> - 3352W<BR> - 3362H<BR> - 3362M<BR> - 3362P<BR> - 3362R<BR> - 3362S<BR> - 3362U<BR> - 3362W<BR> - 3362X<BR> - 3386B<BR> - 3386C<BR> - 3386F<BR> - 3386H<BR> - 3386K<BR> - 3386M<BR> - 3386P<BR> - 3386S<BR> - 3386W<BR> - 3386X<BR></FONT> - </TD> - <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> - 25P<BR> - 25S<BR> - 25RX<BR> - 82P<BR> - 82M<BR> - 82PA<BR> - -<BR> - -<BR> - -<BR> - 91E<BR> - 91X<BR> - 91T<BR> - 91B<BR> - 91A<BR> - 91V<BR> - 91W<BR> - 25W<BR> - 25V<BR> - 25P<BR> - -<BR> - 25S<BR> - 25U<BR> - 25RX<BR> - 25X<BR> - 72XW<BR> - 72XL<BR> - 72PM<BR> - 72RX<BR> - -<BR> - 72PX<BR> - 72P<BR> - 72RXW<BR> - 72RXL<BR> - 72X<BR></FONT> - </TD> - <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> - -<BR> - -<BR> - -<BR> - T7YB<BR> - T7YA<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - TXD<BR> - TYA<BR> - TYP<BR> - -<BR> - TYD<BR> - TX<BR> - -<BR> - 150SX<BR> - 100SX<BR> - 102T<BR> - 101S<BR> - 190T<BR> - 150TX<BR> - 101<BR> - -<BR> - -<BR> - 101SX<BR></FONT> - </TD> - <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> - ET6P<BR> - ET6S<BR> - ET6X<BR> - RJ-6W/8014EMW<BR> - RJ-6P/8014EMP<BR> - RJ-6X/8014EMX<BR> - TM7W<BR> - TM7P<BR> - TM7X<BR> - -<BR> - 8017SMS<BR> - -<BR> - 8017SMB<BR> - 8017SMA<BR> - -<BR> - -<BR> - CT-6W<BR> - CT-6H<BR> - CT-6P<BR> - CT-6R<BR> - -<BR> - CT-6V<BR> - CT-6X<BR> - -<BR> - -<BR> - 8038EKV<BR> - -<BR> - 8038EKX<BR> - -<BR> - -<BR> - 8038EKP<BR> - 8038EKZ<BR> - 8038EKW<BR> - -<BR></FONT> - </TD> - <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> - -<BR> - -<BR> - -<BR> - 3321H<BR> - 3321P<BR> - 3321N<BR> - 1102H<BR> - 1102P<BR> - 1102T<BR> - RVA0911V304A<BR> - -<BR> - RVA0911H413A<BR> - RVG0707V100A<BR> - RVA0607V(H)306A<BR> - RVA1214H213A<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - 3104B<BR> - 3104C<BR> - 3104F<BR> - 3104H<BR> - -<BR> - 3104M<BR> - 3104P<BR> - 3104S<BR> - 3104W<BR> - 3104X<BR></FONT> - </TD> - <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> - EVMQ0G<BR> - EVMQIG<BR> - EVMQ3G<BR> - EVMS0G<BR> - EVMQ0G<BR> - EVMG0G<BR> - -<BR> - -<BR> - -<BR> - EVMK4GA00B<BR> - EVM30GA00B<BR> - EVMK0GA00B<BR> - EVM38GA00B<BR> - EVMB6<BR> - EVLQ0<BR> - -<BR> - EVMMSG<BR> - EVMMBG<BR> - EVMMAG<BR> - -<BR> - -<BR> - EVMMCS<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - EVMM1<BR> - -<BR> - -<BR> - EVMM0<BR> - -<BR> - -<BR> - EVMM3<BR></FONT> - </TD> - <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> - -<BR> - -<BR> - -<BR> - 62-3-1<BR> - 62-1-2<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - 67R<BR> - -<BR> - 67P<BR> - -<BR> - -<BR> - -<BR> - -<BR> - 67X<BR> - 63V<BR> - 63S<BR> - 63M<BR> - -<BR> - -<BR> - 63H<BR> - 63P<BR> - -<BR> - -<BR> - 63X<BR></FONT> - </TD> - <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> - -<BR> - -<BR> - -<BR> - RJ/RJR50<BR> - RJ/RJR50<BR> - RJ/RJR50<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR></FONT> - </TD> - </TR> -</TABLE> -<P>&nbsp;<P> -<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=3> - <TR> - <TD COLSPAN=7> - <FONT color="#0000FF" SIZE=4 FACE=ARIAL><B>SMD TRIM-POT CROSS REFERENCE</B></FONT> - <P> - <FONT SIZE=4 FACE=ARIAL><B>MULTI-TURN</B></FONT> - </TD> - </TR> - <TR> - <TD> - <FONT SIZE=3 FACE=ARIAL><B>BOURNS</B></FONT> - </TD> - <TD> - <FONT SIZE=3 FACE=ARIAL><B>BI&nbsp;TECH</B></FONT> - </TD> - <TD> - <FONT SIZE=3 FACE=ARIAL><B>DALE-VISHAY</B></FONT> - </TD> - <TD> - <FONT SIZE=3 FACE=ARIAL><B>PHILIPS/MEPCO</B></FONT> - </TD> - <TD> - <FONT SIZE=3 FACE=ARIAL><B>PANASONIC</B></FONT> - </TD> - <TD> - <FONT SIZE=3 FACE=ARIAL><B>TOCOS</B></FONT> - </TD> - <TD> - <FONT SIZE=3 FACE=ARIAL><B>AUX/KYOCERA</B></FONT> - </TD> - </TR> - <TR> - <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> - 3224G<BR> - 3224J<BR> - 3224W<BR> - 3269P<BR> - 3269W<BR> - 3269X<BR></FONT> - </TD> - <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> - 44G<BR> - 44J<BR> - 44W<BR> - 84P<BR> - 84W<BR> - 84X<BR></FONT> - </TD> - <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> - -<BR> - -<BR> - -<BR> - ST63Z<BR> - ST63Y<BR> - -<BR></FONT> - </TD> - <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> - -<BR> - -<BR> - -<BR> - ST5P<BR> - ST5W<BR> - ST5X<BR></FONT> - </TD> - <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR></FONT> - </TD> - <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR></FONT> - </TD> - <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR> - -<BR></FONT> - </TD> - </TR> - <TR> - <TD COLSPAN=7>&nbsp; - </TD> - </TR> - <TR> - <TD COLSPAN=7> - <FONT SIZE=4 FACE=ARIAL><B>SINGLE TURN</B></FONT> - </TD> - </TR> - <TR> - <TD> - <FONT SIZE=3 FACE=ARIAL><B>BOURNS</B></FONT> - </TD> - <TD> - <FONT SIZE=3 FACE=ARIAL><B>BI&nbsp;TECH</B></FONT> - </TD> - <TD> - <FONT SIZE=3 FACE=ARIAL><B>DALE-VISHAY</B></FONT> - </TD> - <TD> - <FONT SIZE=3 FACE=ARIAL><B>PHILIPS/MEPCO</B></FONT> - </TD> - <TD> - <FONT SIZE=3 FACE=ARIAL><B>PANASONIC</B></FONT> - </TD> - <TD> - <FONT SIZE=3 FACE=ARIAL><B>TOCOS</B></FONT> - </TD> - <TD> - <FONT SIZE=3 FACE=ARIAL><B>AUX/KYOCERA</B></FONT> - </TD> - </TR> - <TR> - <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> - 3314G<BR> - 3314J<BR> - 3364A/B<BR> - 3364C/D<BR> - 3364W/X<BR> - 3313G<BR> - 3313J<BR></FONT> - </TD> - <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> - 23B<BR> - 23A<BR> - 21X<BR> - 21W<BR> - -<BR> - 22B<BR> - 22A<BR></FONT> - </TD> - <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> - ST5YL/ST53YL<BR> - ST5YJ/5T53YJ<BR> - ST-23A<BR> - ST-22B<BR> - ST-22<BR> - -<BR> - -<BR></FONT> - </TD> - <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> - ST-4B<BR> - ST-4A<BR> - -<BR> - -<BR> - -<BR> - ST-3B<BR> - ST-3A<BR></FONT> - </TD> - <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> - -<BR> - EVM-6YS<BR> - EVM-1E<BR> - EVM-1G<BR> - EVM-1D<BR> - -<BR> - -<BR></FONT> - </TD> - <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> - G4B<BR> - G4A<BR> - TR04-3S1<BR> - TRG04-2S1<BR> - -<BR> - -<BR> - -<BR></FONT> - </TD> - <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> - -<BR> - -<BR> - DVR-43A<BR> - CVR-42C<BR> - CVR-42A/C<BR> - -<BR> - -<BR></FONT> - </TD> - </TR> -</TABLE> -<P> -<FONT SIZE=4 FACE=ARIAL><B>ALT =&nbsp;ALTERNATE</B></FONT> -<P> - -&nbsp; -<P> -</td> -</tr> -</table> - - -<b>RESISTOR</b> - - - - - - - - ->NAME ->VALUE - - - - - -<b>RESISTOR</b> - - - - - - - - ->NAME ->VALUE - - - - - -<b>RESISTOR</b><p> - - - - - - - - ->NAME ->VALUE - - - - - -<b>RESISTOR</b> wave soldering<p> - - - - - - - - ->NAME ->VALUE - - - - - -<b>RESISTOR</b> - - - - - - - - ->NAME ->VALUE - - - - - -<b>RESISTOR</b><p> -wave soldering - - - - - - - - ->NAME ->VALUE - - - - - -<b>RESISTOR</b> - - - - - - - - ->NAME ->VALUE - - - - - -<b>RESISTOR</b><p> -wave soldering - - - - - - - - ->NAME ->VALUE - - - - - -<b>RESISTOR</b> - - - - - - - - ->NAME ->VALUE - - - - -<b>RESISTOR</b><p> -wave soldering - - - - - - - - ->NAME ->VALUE - - - - -<b>RESISTOR</b> - - - - - - - - ->NAME ->VALUE - - - - - -<b>RESISTOR</b><p> -wave soldering - - - - - - - - ->NAME ->VALUE - - - - - -<b>RESISTOR</b> - - - - - - - - ->NAME ->VALUE - - - - - -<b>RESISTOR</b><p> -wave soldering - - - - - - - - ->NAME ->VALUE - - - - - -<b>RESISTOR</b> - - - - - - - - ->NAME ->VALUE - - - - - -<b>RESISTOR</b><p> -wave soldering - - - - - - - - ->NAME ->VALUE - - - - - -<b>RESISTOR</b> - - - - - - - - ->NAME ->VALUE - - - - - -<b>RESISTOR</b><p> -wave soldering - - - - - - - - ->NAME ->VALUE - - - - - -<b>RESISTOR</b> - - - - - - - - ->NAME ->VALUE - - - - - -<b>RESISTOR</b><p> -wave soldering - - - - - - - - ->NAME ->VALUE - - - - - -<b>RESISTOR</b><p> -Source: http://download.siliconexpert.com/pdfs/2005/02/24/Semi_Ap/2/VSH/Resistor/dcrcwfre.pdf - - - - - - - - ->NAME ->VALUE - - - - - -<b>RESISTOR</b> wave soldering<p> -Source: http://download.siliconexpert.com/pdfs/2005/02/24/Semi_Ap/2/VSH/Resistor/dcrcwfre.pdf - - - - - - - - ->NAME ->VALUE - - - - - -<b>RESISTOR</b><p> -MELF 0.10 W - - - - - - - - ->NAME ->VALUE - - - - - -<b>RESISTOR</b><p> -MELF 0.25 W - - - - - - - - ->NAME ->VALUE - - - - - -<b>RESISTOR</b><p> -MELF 0.12 W - - - - - - - - ->NAME ->VALUE - - - - - -<b>RESISTOR</b><p> -MELF 0.10 W - - - - - - - - ->NAME ->VALUE - - - - - -<b>RESISTOR</b><p> -MELF 0.25 W - - - - - - - - ->NAME ->VALUE - - - - - -<b>RESISTOR</b><p> -MELF 0.25 W - - - - - - - - ->NAME ->VALUE - - - - - -<b>RESISTOR</b><p> -MELF 0.12 W - - - - - - - - ->NAME ->VALUE - - - - - -<b>RESISTOR</b><p> -MELF 0.25 W - - - - - - - - ->NAME ->VALUE - - - - - -<b>RESISTOR</b><p> -type 0204, grid 5 mm - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - -<b>RESISTOR</b><p> -type 0204, grid 7.5 mm - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - -<b>RESISTOR</b><p> -type 0204, grid 2.5 mm - - - - - - ->NAME ->VALUE - - -<b>RESISTOR</b><p> -type 0207, grid 10 mm - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - -<b>RESISTOR</b><p> -type 0207, grid 12 mm - - - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - - - -<b>RESISTOR</b><p> -type 0207, grid 15mm - - - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - - - -<b>RESISTOR</b><p> -type 0207, grid 2.5 mm - - - - - - - ->NAME ->VALUE - - -<b>RESISTOR</b><p> -type 0207, grid 5 mm - - - - - - - ->NAME ->VALUE - - -<b>RESISTOR</b><p> -type 0207, grid 7.5 mm - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - -<b>RESISTOR</b><p> -type 0309, grid 10mm - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - -<b>RESISTOR</b><p> -type 0309, grid 12.5 mm - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - -<b>RESISTOR</b><p> -type 0309, grid 2.5 mm - - - - - - ->NAME ->VALUE - - - - - -<b>RESISTOR</b><p> -type 0411, grid 12.5 mm - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - -<b>RESISTOR</b><p> -type 0411, grid 15 mm - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - -<b>RESISTOR</b><p> -type 0411, grid 3.81 mm - - - - - - ->NAME ->VALUE - - - -<b>RESISTOR</b><p> -type 0414, grid 15 mm - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - -<b>RESISTOR</b><p> -type 0414, grid 5 mm - - - - - - ->NAME ->VALUE - - - -<b>RESISTOR</b><p> -type 0617, grid 17.5 mm - - - - - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - -<b>RESISTOR</b><p> -type 0617, grid 22.5 mm - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - -<b>RESISTOR</b><p> -type 0617, grid 5 mm - - - - - - ->NAME ->VALUE - - - -<b>RESISTOR</b><p> -type 0922, grid 22.5 mm - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - - - -<b>RESISTOR</b><p> -type 0613, grid 5 mm - - - - - - ->NAME ->VALUE - - - -<b>RESISTOR</b><p> -type 0613, grid 15 mm - - - - - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - -<b>RESISTOR</b><p> -type 0817, grid 22.5 mm - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE -0817 - - - - -<b>RESISTOR</b><p> -type 0817, grid 6.35 mm - - - - - - ->NAME ->VALUE -0817 - - - -<b>RESISTOR</b><p> -type V234, grid 12.5 mm - - - - - - - - - - - - ->NAME ->VALUE - - - - -<b>RESISTOR</b><p> -type V235, grid 17.78 mm - - - - - - - - - - - - ->NAME ->VALUE - - - - -<b>RESISTOR</b><p> -type V526-0, grid 2.5 mm - - - - - - - - - - ->NAME ->VALUE - - -<b>CECC Size RC2211</b> Reflow Soldering<p> -source Beyschlag - - - - - - ->NAME ->VALUE - - -<b>CECC Size RC2211</b> Wave Soldering<p> -source Beyschlag - - - - - - ->NAME ->VALUE - - -<b>CECC Size RC3715</b> Reflow Soldering<p> -source Beyschlag - - - - - - - - ->NAME ->VALUE - - -<b>CECC Size RC3715</b> Wave Soldering<p> -source Beyschlag - - - - - - - - ->NAME ->VALUE - - -<b>CECC Size RC6123</b> Reflow Soldering<p> -source Beyschlag - - - - - - - - ->NAME ->VALUE - - -<b>CECC Size RC6123</b> Wave Soldering<p> -source Beyschlag - - - - - - - - ->NAME ->VALUE - - -<b>RESISTOR</b><p> -type 0922, grid 7.5 mm - - - - - - ->NAME ->VALUE -0922 - - - -<b>RESISTOR</b><p> -type RDH, grid 15 mm - - - - - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE -RDH - - - - -<b>Mini MELF 0102 Axial</b> - - - - ->NAME ->VALUE - - - -<b>RESISTOR</b> chip<p> -Source: http://www.vishay.com/docs/20008/dcrcw.pdf - - ->NAME ->VALUE - - - - - -<b>Bulk Metal® Foil Technology</b>, Tubular Axial Lead Resistors, Meets or Exceeds MIL-R-39005 Requirements<p> -MIL SIZE RBR52<br> -Source: VISHAY .. vta56.pdf - - - - - - - - - - ->NAME ->VALUE - - - - -<b>Bulk Metal® Foil Technology</b>, Tubular Axial Lead Resistors, Meets or Exceeds MIL-R-39005 Requirements<p> -MIL SIZE RBR53<br> -Source: VISHAY .. vta56.pdf - - - - - - - - - - ->NAME ->VALUE - - - - -<b>Bulk Metal® Foil Technology</b>, Tubular Axial Lead Resistors, Meets or Exceeds MIL-R-39005 Requirements<p> -MIL SIZE RBR54<br> -Source: VISHAY .. vta56.pdf - - - - - - - - - - ->NAME ->VALUE - - - - -<b>Bulk Metal® Foil Technology</b>, Tubular Axial Lead Resistors, Meets or Exceeds MIL-R-39005 Requirements<p> -MIL SIZE RBR55<br> -Source: VISHAY .. vta56.pdf - - - - - - - - - - ->NAME ->VALUE - - - - -<b>Bulk Metal® Foil Technology</b>, Tubular Axial Lead Resistors, Meets or Exceeds MIL-R-39005 Requirements<p> -MIL SIZE RBR56<br> -Source: VISHAY .. vta56.pdf - - - - - - - - - - ->NAME ->VALUE - - - - -<b>Bulk Metal® Foil Technology</b>, Tubular Axial Lead Resistors, Meets or Exceeds MIL-R-39005 Requirements<p> -MIL SIZE RNC55<br> -Source: VISHAY .. vta56.pdf - - - - - - - - ->NAME ->VALUE - - - - -<b>Bulk Metal® Foil Technology</b>, Tubular Axial Lead Resistors, Meets or Exceeds MIL-R-39005 Requirements<p> -MIL SIZE RNC60<br> -Source: VISHAY .. vta56.pdf - - - - - - - - ->NAME ->VALUE - - - - -<b>Package 4527</b><p> -Source: http://www.vishay.com/docs/31059/wsrhigh.pdf - - - - - - ->NAME ->VALUE - - -<b>Wirewound Resistors, Precision Power</b><p> -Source: VISHAY wscwsn.pdf - - - - - - - - - - ->NAME ->VALUE - - -<b>Wirewound Resistors, Precision Power</b><p> -Source: VISHAY wscwsn.pdf - - - - - - ->NAME ->VALUE - - -<b>Wirewound Resistors, Precision Power</b><p> -Source: VISHAY wscwsn.pdf - - - - - - - - - - ->NAME ->VALUE - - -<b>Wirewound Resistors, Precision Power</b><p> -Source: VISHAY wscwsn.pdf - - - - - - - - - - ->NAME ->VALUE - - -<b>Wirewound Resistors, Precision Power</b><p> -Source: VISHAY wscwsn.pdf - - - - - - ->NAME ->VALUE - - -<b>Wirewound Resistors, Precision Power</b><p> -Source: VISHAY wscwsn.pdf - - - - - - ->NAME ->VALUE - - -<b>CRCW1218 Thick Film, Rectangular Chip Resistors</b><p> -Source: http://www.vishay.com .. dcrcw.pdf - - - - ->NAME ->VALUE - - - - -<b>Chip Monolithic Ceramic Capacitors</b> Medium Voltage High Capacitance for General Use<p> -Source: http://www.murata.com .. GRM43DR72E224KW01.pdf - - - - - - ->NAME ->VALUE - - - - -<b>PRL1632 are realized as 1W for 3.2 × 1.6mm(1206)</b><p> -Source: http://www.mouser.com/ds/2/392/products_18-2245.pdf - - - - ->NAME ->VALUE - - - - - - ->NAME ->VALUE - - - - - - -<b>CAPACITOR</b> - - - - - - - - ->NAME ->VALUE - - - - - -<b>CAPACITOR</b> - - - - - - - - ->NAME ->VALUE - - - - - -<b>CAPACITOR</b> - - - - - - - - ->NAME ->VALUE - - - - - -<b>CAPACITOR</b><p> - - - - - - - - ->NAME ->VALUE - - - - - -<b>CAPACITOR</b> - - - - - - - - ->NAME ->VALUE - - - - - -<b>CAPACITOR</b> - - - - - - - - ->NAME ->VALUE - - - - - -<b>CAPACITOR</b> - - - - - - - - ->NAME ->VALUE - - - - - -<b>CAPACITOR</b> - - - - - - - - ->NAME ->VALUE - - - - - -<b>CAPACITOR</b> - - - - - - - - ->NAME ->VALUE - - - - - -<b>CAPACITOR</b> - - - - - - - - ->NAME ->VALUE - - - - - -<b>CAPACITOR</b> - - - - - - - - ->NAME ->VALUE - - - - - -<b>CAPACITOR</b> - - - - - - - - ->NAME ->VALUE - - - - - -<b>CAPACITOR</b> - - - - - - - - ->NAME ->VALUE - - - - - -<b>CAPACITOR</b> - - - - - - - - ->NAME ->VALUE - - - - - -<b>CAPACITOR</b> - - - - - - - - ->NAME ->VALUE - - - - - -<b>CAPACITOR</b><p> -grid 2.5 mm, outline 2.4 x 4.4 mm - - - - - - - - - - - - - - ->NAME ->VALUE - - -<b>CAPACITOR</b><p> -grid 2.5 mm, outline 2.5 x 5 mm - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - -<b>CAPACITOR</b><p> -grid 2.5 mm, outline 3 x 5 mm - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - -<b>CAPACITOR</b><p> -grid 2.5 mm, outline 4 x 5 mm - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - -<b>CAPACITOR</b><p> -grid 2.5 mm, outline 5 x 5 mm - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - -<b>CAPACITOR</b><p> -grid 2.5 mm, outline 6 x 5 mm - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - -<b>CAPACITOR</b><p> -grid 2.5 mm + 5 mm, outline 2.4 x 7 mm - - - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - -<b>CAPACITOR</b><p> -grid 2.5 + 5 mm, outline 2.5 x 7.5 mm - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - -<b>CAPACITOR</b><p> -grid 2.5 + 5 mm, outline 3.5 x 7.5 mm - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - -<b>CAPACITOR</b><p> -grid 2.5 + 5 mm, outline 4.5 x 7.5 mm - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - -<b>CAPACITOR</b><p> -grid 2.5 + 5 mm, outline 5.5 x 7.5 mm - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - -<b>CAPACITOR</b><p> -grid 5 mm, outline 2.4 x 4.4 mm - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - -<b>CAPACITOR</b><p> -grid 5 mm, outline 2.5 x 7.5 mm - - - - - - - - - - - - - - - - ->NAME ->VALUE - - -<b>CAPACITOR</b><p> -grid 5 mm, outline 4.5 x 7.5 mm - - - - - - - - - - - - - - - - ->NAME ->VALUE - - -<b>CAPACITOR</b><p> -grid 5 mm, outline 3 x 7.5 mm - - - - - - - - - - - - - - - - ->NAME ->VALUE - - -<b>CAPACITOR</b><p> -grid 5 mm, outline 5 x 7.5 mm - - - - - - - - - - - - - - - - ->NAME ->VALUE - - -<b>CAPACITOR</b><p> -grid 5 mm, outline 5.5 x 7.5 mm - - - - - - - - - - - - - - - - ->NAME ->VALUE - - -<b>CAPACITOR</b><p> -grid 5 mm, outline 7.5 x 7.5 mm - - - - - - - - - - - - - - - - ->NAME ->VALUE - - -<b>CAPACITOR</b><p> -Horizontal, grid 5 mm, outline 7.5 x 7.5 mm - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - - - -<b>CAPACITOR</b><p> -grid 7.5 mm, outline 3.2 x 10.3 mm - - - - - - - - - - - - - - - - ->NAME ->VALUE - - -<b>CAPACITOR</b><p> -grid 7.5 mm, outline 4.2 x 10.3 mm - - - - - - - - - - - - - - - - ->NAME ->VALUE - - -<b>CAPACITOR</b><p> -grid 7.5 mm, outline 5.2 x 10.6 mm - - - - - - - - - - - - - - - - ->NAME ->VALUE - - -<b>CAPACITOR</b><p> -grid 10.2 mm, outline 4.3 x 13.3 mm - - - - - - - - - - - - - - - - ->NAME ->VALUE - - -<b>CAPACITOR</b><p> -grid 10.2 mm, outline 5.4 x 13.3 mm - - - - - - - - - - - - - - - - ->NAME ->VALUE - - -<b>CAPACITOR</b><p> -grid 10.2 mm, outline 6.4 x 13.3 mm - - - - - - - - - - - - - - - - ->NAME ->VALUE - - -<b>CAPACITOR</b><p> -grid 10.2 mm + 15.2 mm, outline 6.2 x 18.4 mm - - - - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE - - -<b>CAPACITOR</b><p> -grid 15 mm, outline 5.4 x 18.3 mm - - - - - - - - - - - - - - - - ->NAME ->VALUE - - -<b>CAPACITOR</b><p> -grid 15 mm, outline 6.4 x 18.3 mm - - - - - - - - - - - - - - - - ->NAME ->VALUE - - -<b>CAPACITOR</b><p> -grid 15 mm, outline 7.2 x 18.3 mm - - - - - - - - - - - - - - - - ->NAME ->VALUE - - -<b>CAPACITOR</b><p> -grid 15 mm, outline 8.4 x 18.3 mm - - - - - - - - - - - - - - - - ->NAME ->VALUE - - -<b>CAPACITOR</b><p> -grid 15 mm, outline 9.1 x 18.2 mm - - - - - - - - - - - - - - - - ->NAME ->VALUE - - -<b>CAPACITOR</b><p> -grid 22.5 mm, outline 6.2 x 26.8 mm - - - - - - - - - - - - - - - - ->NAME ->VALUE - - -<b>CAPACITOR</b><p> -grid 22.5 mm, outline 7.4 x 26.8 mm - - - - - - - - - - - - - - - - ->NAME ->VALUE - - -<b>CAPACITOR</b><p> -grid 22.5 mm, outline 8.7 x 26.8 mm - - - - - - - - - - - - - - - - ->NAME ->VALUE - - -<b>CAPACITOR</b><p> -grid 22.5 mm, outline 10.8 x 26.8 mm - - - - - - - - - - - - - - - - ->NAME ->VALUE - - -<b>CAPACITOR</b><p> -grid 22.5 mm, outline 11.3 x 26.8 mm - - - - - - - - - - - - - - - - ->NAME ->VALUE - - -<b>CAPACITOR</b><p> -grid 27.5 mm, outline 9.3 x 31.6 mm - - - - - - - - - - - - - - - - ->NAME ->VALUE - - -<b>CAPACITOR</b><p> -grid 27.5 mm, outline 11.3 x 31.6 mm - - - - - - - - - - - - - - - - ->NAME ->VALUE - - -<b>CAPACITOR</b><p> -grid 27.5 mm, outline 13.4 x 31.6 mm - - - - - - - - - - - - - - - - ->NAME ->VALUE - - -<b>CAPACITOR</b><p> -grid 27.5 mm, outline 20.5 x 31.6 mm - - - - - - - - - - - - - - - - ->NAME ->VALUE - - -<b>CAPACITOR</b><p> -grid 32.5 mm, outline 13.7 x 37.4 mm - - - - - - - - - - - - ->NAME ->VALUE - - -<b>CAPACITOR</b><p> -grid 32.5 mm, outline 16.2 x 37.4 mm - - - - - - - - - - - - ->NAME ->VALUE - - -<b>CAPACITOR</b><p> -grid 32.5 mm, outline 18.2 x 37.4 mm - - - - - - - - - - - - ->NAME ->VALUE - - -<b>CAPACITOR</b><p> -grid 37.5 mm, outline 19.2 x 41.8 mm - - - - - - - - - - - - - - - - ->NAME ->VALUE - - -<b>CAPACITOR</b><p> -grid 37.5 mm, outline 20.3 x 41.8 mm - - - - - - - - - - - - - - - - ->NAME ->VALUE - - -<b>CAPACITOR</b><p> -grid 5 mm, outline 3.5 x 7.5 mm - - - - - - - - - - - - - - - - ->NAME ->VALUE - - -<b>CAPACITOR</b><p> -grid 37.5 mm, outline 15.5 x 41.8 mm - - - - - - - - - - - - - - - - ->NAME ->VALUE - - -<b>CAPACITOR</b><p> -grid 7.5 mm, outline 6.3 x 10.6 mm - - - - - - - - - - - - - - - - ->NAME ->VALUE - - -<b>CAPACITOR</b><p> -grid 27.5 mm, outline 15.4 x 31.6 mm - - - - - - - - - - - - - - - - ->NAME ->VALUE - - -<b>CAPACITOR</b><p> -grid 27.5 mm, outline 17.3 x 31.6 mm - - - - - - - - - - - - - - - - ->NAME ->VALUE - - -<b>Ceramic Chip Capacitor KEMET 0204 reflow solder</b><p> -Metric Code Size 1005 - - - - ->NAME ->VALUE - - - - -<b>Ceramic Chip Capacitor KEMET 0603 reflow solder</b><p> -Metric Code Size 1608 - - - - ->NAME ->VALUE - - - - -<b>Ceramic Chip Capacitor KEMET 0805 reflow solder</b><p> -Metric Code Size 2012 - - - - ->NAME ->VALUE - - - - -<b>Ceramic Chip Capacitor KEMET 1206 reflow solder</b><p> -Metric Code Size 3216 - - - - ->NAME ->VALUE - - - - -<b>Ceramic Chip Capacitor KEMET 1210 reflow solder</b><p> -Metric Code Size 3225 - - - - ->NAME ->VALUE - - - - -<b>Ceramic Chip Capacitor KEMET 1812 reflow solder</b><p> -Metric Code Size 4532 - - - - ->NAME ->VALUE - - - - -<b>Ceramic Chip Capacitor KEMET 1825 reflow solder</b><p> -Metric Code Size 4564 - - - - ->NAME ->VALUE - - - - -<b>Ceramic Chip Capacitor KEMET 2220 reflow solder</b><p>Metric Code Size 5650 - - - - ->NAME ->VALUE - - - - -<b>Ceramic Chip Capacitor KEMET 2225 reflow solder</b><p>Metric Code Size 5664 - - - - ->NAME ->VALUE - - - - -<b> </b><p> -Source: http://www.vishay.com/docs/10129/hpc0201a.pdf - - ->NAME ->VALUE - - - -Source: http://www.avxcorp.com/docs/catalogs/cx5r.pdf - - ->NAME ->VALUE - - - - - - -<b>CAPACITOR</b><p> -Source: AVX .. aphvc.pdf - - - - ->NAME ->VALUE - - - - -<b>CAPACITOR</b><p> -Source: AVX .. aphvc.pdf - - - - ->NAME ->VALUE - - - - -<b>CAPACITOR</b> - - - - - - - ->NAME ->VALUE - - - - -RESISTOR - - -RESISTOR - - -RESISTOR - - -RESISTOR wave soldering - - -RESISTOR - - -RESISTOR -wave soldering - - -RESISTOR - - -RESISTOR -wave soldering - - -RESISTOR - - -RESISTOR -wave soldering - - -RESISTOR - - -RESISTOR -wave soldering - - -RESISTOR - - -RESISTOR -wave soldering - - -RESISTOR - - -RESISTOR -wave soldering - - -RESISTOR - - -RESISTOR -wave soldering - - -RESISTOR - - -RESISTOR -wave soldering - - -RESISTOR -Source: http://download.siliconexpert.com/pdfs/2005/02/24/Semi_Ap/2/VSH/Resistor/dcrcwfre.pdf - - -RESISTOR wave soldering -Source: http://download.siliconexpert.com/pdfs/2005/02/24/Semi_Ap/2/VSH/Resistor/dcrcwfre.pdf - - -RESISTOR -MELF 0.10 W - - -RESISTOR -MELF 0.25 W - - -RESISTOR -MELF 0.12 W - - -RESISTOR -MELF 0.10 W - - -RESISTOR -MELF 0.25 W - - -RESISTOR -MELF 0.25 W - - -RESISTOR -MELF 0.12 W - - -RESISTOR -MELF 0.25 W - - -RESISTOR -type 0204, grid 5 mm - - -RESISTOR -type 0204, grid 7.5 mm - - -RESISTOR -type 0204, grid 2.5 mm - - -RESISTOR -type 0207, grid 10 mm - - -RESISTOR -type 0207, grid 12 mm - - -RESISTOR -type 0207, grid 15mm - - -RESISTOR -type 0207, grid 2.5 mm - - -RESISTOR -type 0207, grid 5 mm - - -RESISTOR -type 0207, grid 7.5 mm - - -RESISTOR -type 0309, grid 10mm - - -RESISTOR -type 0309, grid 12.5 mm - - -RESISTOR -type 0309, grid 2.5 mm - - -RESISTOR -type 0411, grid 12.5 mm - - -RESISTOR -type 0411, grid 15 mm - - -RESISTOR -type 0411, grid 3.81 mm - - -RESISTOR -type 0414, grid 15 mm - - -RESISTOR -type 0414, grid 5 mm - - -RESISTOR -type 0617, grid 17.5 mm - - -RESISTOR -type 0617, grid 22.5 mm - - -RESISTOR -type 0617, grid 5 mm - - -RESISTOR -type 0922, grid 22.5 mm - - -RESISTOR -type 0613, grid 5 mm - - -RESISTOR -type 0613, grid 15 mm - - -RESISTOR -type 0817, grid 22.5 mm - - -RESISTOR -type 0817, grid 6.35 mm - - -RESISTOR -type V234, grid 12.5 mm - - -RESISTOR -type V235, grid 17.78 mm - - -RESISTOR -type V526-0, grid 2.5 mm - - -CECC Size RC2211 Reflow Soldering -source Beyschlag - - -CECC Size RC2211 Wave Soldering -source Beyschlag - - -CECC Size RC3715 Reflow Soldering -source Beyschlag - - -CECC Size RC3715 Wave Soldering -source Beyschlag - - -CECC Size RC6123 Reflow Soldering -source Beyschlag - - -CECC Size RC6123 Wave Soldering -source Beyschlag - - -RESISTOR -type 0922, grid 7.5 mm - - -RESISTOR -type RDH, grid 15 mm - - -Mini MELF 0102 Axial - - -RESISTOR chip -Source: http://www.vishay.com/docs/20008/dcrcw.pdf - - -Bulk Metal® Foil Technology, Tubular Axial Lead Resistors, Meets or Exceeds MIL-R-39005 Requirements -MIL SIZE RBR52 -Source: VISHAY .. vta56.pdf - - -Bulk Metal® Foil Technology, Tubular Axial Lead Resistors, Meets or Exceeds MIL-R-39005 Requirements -MIL SIZE RBR53 -Source: VISHAY .. vta56.pdf - - -Bulk Metal® Foil Technology, Tubular Axial Lead Resistors, Meets or Exceeds MIL-R-39005 Requirements -MIL SIZE RBR54 -Source: VISHAY .. vta56.pdf - - -Bulk Metal® Foil Technology, Tubular Axial Lead Resistors, Meets or Exceeds MIL-R-39005 Requirements -MIL SIZE RBR55 -Source: VISHAY .. vta56.pdf - - -Bulk Metal® Foil Technology, Tubular Axial Lead Resistors, Meets or Exceeds MIL-R-39005 Requirements -MIL SIZE RBR56 -Source: VISHAY .. vta56.pdf - - -Bulk Metal® Foil Technology, Tubular Axial Lead Resistors, Meets or Exceeds MIL-R-39005 Requirements -MIL SIZE RNC55 -Source: VISHAY .. vta56.pdf - - -Bulk Metal® Foil Technology, Tubular Axial Lead Resistors, Meets or Exceeds MIL-R-39005 Requirements -MIL SIZE RNC60 -Source: VISHAY .. vta56.pdf - - -Package 4527 -Source: http://www.vishay.com/docs/31059/wsrhigh.pdf - - -Wirewound Resistors, Precision Power -Source: VISHAY wscwsn.pdf - - -Wirewound Resistors, Precision Power -Source: VISHAY wscwsn.pdf - - -Wirewound Resistors, Precision Power -Source: VISHAY wscwsn.pdf - - -Wirewound Resistors, Precision Power -Source: VISHAY wscwsn.pdf - - -Wirewound Resistors, Precision Power -Source: VISHAY wscwsn.pdf - - -Wirewound Resistors, Precision Power -Source: VISHAY wscwsn.pdf - - -CRCW1218 Thick Film, Rectangular Chip Resistors -Source: http://www.vishay.com .. dcrcw.pdf - - -Chip Monolithic Ceramic Capacitors Medium Voltage High Capacitance for General Use -Source: http://www.murata.com .. GRM43DR72E224KW01.pdf - - -PRL1632 are realized as 1W for 3.2 × 1.6mm(1206) -Source: http://www.mouser.com/ds/2/392/products_18-2245.pdf - - - - -CAPACITOR - - -CAPACITOR - - -CAPACITOR - - -CAPACITOR - - -CAPACITOR - - -CAPACITOR - - -CAPACITOR - - -CAPACITOR - - -CAPACITOR - - -CAPACITOR - - -CAPACITOR - - -CAPACITOR - - -CAPACITOR - - -CAPACITOR - - -CAPACITOR - - -CAPACITOR -grid 2.5 mm, outline 2.4 x 4.4 mm - - -CAPACITOR -grid 2.5 mm, outline 2.5 x 5 mm - - -CAPACITOR -grid 2.5 mm, outline 3 x 5 mm - - -CAPACITOR -grid 2.5 mm, outline 4 x 5 mm - - -CAPACITOR -grid 2.5 mm, outline 5 x 5 mm - - -CAPACITOR -grid 2.5 mm, outline 6 x 5 mm - - -CAPACITOR -grid 2.5 mm + 5 mm, outline 2.4 x 7 mm - - -CAPACITOR -grid 2.5 + 5 mm, outline 2.5 x 7.5 mm - - -CAPACITOR -grid 2.5 + 5 mm, outline 3.5 x 7.5 mm - - -CAPACITOR -grid 2.5 + 5 mm, outline 4.5 x 7.5 mm - - -CAPACITOR -grid 2.5 + 5 mm, outline 5.5 x 7.5 mm - - -CAPACITOR -grid 5 mm, outline 2.4 x 4.4 mm - - -CAPACITOR -grid 5 mm, outline 2.5 x 7.5 mm - - -CAPACITOR -grid 5 mm, outline 4.5 x 7.5 mm - - -CAPACITOR -grid 5 mm, outline 3 x 7.5 mm - - -CAPACITOR -grid 5 mm, outline 5 x 7.5 mm - - -CAPACITOR -grid 5 mm, outline 5.5 x 7.5 mm - - -CAPACITOR -grid 5 mm, outline 7.5 x 7.5 mm - - -CAPACITOR -Horizontal, grid 5 mm, outline 7.5 x 7.5 mm - - -CAPACITOR -grid 7.5 mm, outline 3.2 x 10.3 mm - - -CAPACITOR -grid 7.5 mm, outline 4.2 x 10.3 mm - - -CAPACITOR -grid 7.5 mm, outline 5.2 x 10.6 mm - - -CAPACITOR -grid 10.2 mm, outline 4.3 x 13.3 mm - - -CAPACITOR -grid 10.2 mm, outline 5.4 x 13.3 mm - - -CAPACITOR -grid 10.2 mm, outline 6.4 x 13.3 mm - - -CAPACITOR -grid 10.2 mm + 15.2 mm, outline 6.2 x 18.4 mm - - -CAPACITOR -grid 15 mm, outline 5.4 x 18.3 mm - - -CAPACITOR -grid 15 mm, outline 6.4 x 18.3 mm - - -CAPACITOR -grid 15 mm, outline 7.2 x 18.3 mm - - -CAPACITOR -grid 15 mm, outline 8.4 x 18.3 mm - - -CAPACITOR -grid 15 mm, outline 9.1 x 18.2 mm - - -CAPACITOR -grid 22.5 mm, outline 6.2 x 26.8 mm - - -CAPACITOR -grid 22.5 mm, outline 7.4 x 26.8 mm - - -CAPACITOR -grid 22.5 mm, outline 8.7 x 26.8 mm - - -CAPACITOR -grid 22.5 mm, outline 10.8 x 26.8 mm - - -CAPACITOR -grid 22.5 mm, outline 11.3 x 26.8 mm - - -CAPACITOR -grid 27.5 mm, outline 9.3 x 31.6 mm - - -CAPACITOR -grid 27.5 mm, outline 11.3 x 31.6 mm - - -CAPACITOR -grid 27.5 mm, outline 13.4 x 31.6 mm - - -CAPACITOR -grid 27.5 mm, outline 20.5 x 31.6 mm - - -CAPACITOR -grid 32.5 mm, outline 13.7 x 37.4 mm - - -CAPACITOR -grid 32.5 mm, outline 16.2 x 37.4 mm - - -CAPACITOR -grid 32.5 mm, outline 18.2 x 37.4 mm - - -CAPACITOR -grid 37.5 mm, outline 19.2 x 41.8 mm - - -CAPACITOR -grid 37.5 mm, outline 20.3 x 41.8 mm - - -CAPACITOR -grid 5 mm, outline 3.5 x 7.5 mm - - -CAPACITOR -grid 37.5 mm, outline 15.5 x 41.8 mm - - -CAPACITOR -grid 7.5 mm, outline 6.3 x 10.6 mm - - -CAPACITOR -grid 27.5 mm, outline 15.4 x 31.6 mm - - -CAPACITOR -grid 27.5 mm, outline 17.3 x 31.6 mm - - -Ceramic Chip Capacitor KEMET 0204 reflow solder -Metric Code Size 1005 - - -Ceramic Chip Capacitor KEMET 0603 reflow solder -Metric Code Size 1608 - - -Ceramic Chip Capacitor KEMET 0805 reflow solder -Metric Code Size 2012 - - -Ceramic Chip Capacitor KEMET 1206 reflow solder -Metric Code Size 3216 - - -Ceramic Chip Capacitor KEMET 1210 reflow solder -Metric Code Size 3225 - - -Ceramic Chip Capacitor KEMET 1812 reflow solder -Metric Code Size 4532 - - -Ceramic Chip Capacitor KEMET 1825 reflow solder -Metric Code Size 4564 - - -Ceramic Chip Capacitor KEMET 2220 reflow solderMetric Code Size 5650 - - -Ceramic Chip Capacitor KEMET 2225 reflow solderMetric Code Size 5664 - - - -Source: http://www.vishay.com/docs/10129/hpc0201a.pdf - - -Source: http://www.avxcorp.com/docs/catalogs/cx5r.pdf - - -CAPACITOR -Source: AVX .. aphvc.pdf - - -CAPACITOR -Source: AVX .. aphvc.pdf - - -CAPACITOR - - - - - - - - ->NAME ->VALUE - - - - - - ->NAME ->VALUE - - - - - - - - -<B>RESISTOR</B>, European symbol - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<B>CAPACITOR</B>, European symbol - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<b>Supply Symbols</b><p> - GND, VCC, 0V, +5V, -5V, etc.<p> - Please keep in mind, that these devices are necessary for the - automatic wiring of the supply signals.<p> - The pin name defined in the symbol is identical to the net which is to be wired automatically.<p> - In this library the device names are the same as the pin names of the symbols, therefore the correct signal names appear next to the supply symbols in the schematic.<p> - <author>Created by librarian@cadsoft.de</author> - - - - - ->VALUE - - - - - ->VALUE - - - - - ->VALUE - - - - - -<b>SUPPLY SYMBOL</b> - - - - - - - - - - - - -<b>SUPPLY SYMBOL</b> - - - - - - - - - - - - -<b>SUPPLY SYMBOL</b> - - - - - - - - - - - - - - -<b>Power Transistors</b><p> -<author>Created by librarian@cadsoft.de</author> - - - - - - - - - - - - - - - - - - - - ->NAME ->VALUE -D -S -G - - - - - - - -N-CHANNEL MOS FET <b>SYMBOL</b> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -© Copyright Florian Stäblein 2018 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -12V -12V -1 -1 -1 -2 -2 -3 -4 -5 -VBAT -VBAT -3 - - - - - - - - - - - - - - - - -X1 -X2 -X3 - - - - - - - - - - - - - - - - -SC -GND -SB -SA - - -T -5V - - - - - -HALL - - - - - - - - - - - - - -RX -GND -TX - - -5V - - - - - -USART - - - - -K1 -K2 - - - - - -SWITCH - - - - - - - - - -VBAT - - -VBAT -GND - - - - - - - -CHARGE - - -GND - - - - - -CHARGER - - - - - -VBAT - - - - -GND - - - - -Y - - - - -B - - - - -G - - - - -L2 - - - - -L1 - - - - - - - - -T -5V -R - - -GND - - - - - -REMOTE - - - - - - - - - -D -3,3V -C - - -GND - - - - - -ST-LINK - - - -PHASE GREEN -PHASE BLUE -PHASE YELLOW - - -LIGHT BARRIER -LIGHT BARRIER - - -BATTERY- -BATTERY+ - -B -BUZZER -X1.1: PA15 (out) -X1.2: PA12 (out) -X1.3: PB13 (out) -X1.4: N/A (PB4) -X1.5: N/A (PB5) - -X2.1: PA1 (out) -X2.2: PA0 (out) -X2.3: N/A (connected with X3.1) - -X3.1: PC13 (out) -X4.SC: PC14 (in) -X4.SB: PF1 (in) -X4.SA: PB11 (in) - -X5.RX: PA3 (in, USART1) -X5.TX: PA2 (out, USART1) - -BUZZER.B: PB10 (out) -SWITCH.K1: PC15 (in) -LATCH: PB2 (out) -G_High: PA10 (out) TIM0_CH3 -G_Low : PB15 (out) TIM0_CH3N -B_High: PA9 (out) TIM0_CH2 -B_Low : PB14 (out) TIM0_CH2N -Y_High: PA8 (out) TIM0_CH1 -Y_Low : PB13 (out) TIM0_CH1N -Controller: GD32F130C8 -Cool&Fun TT-SD2.2 -V_BATT: PA4 (analog) -CURRENT_DC: PA6 (analog) -EMERGENCY_OFF: PB12 (in) TIM0_Break_Input -CHARGE_STATE: PF0 (in, pullup) - -unused: PB4, PB5, PA6 -L1: PA7 (in) -L2: PA11 (in) - -REMOTE.R: PB7 (I2C1_SDA / USART0_RX) -REMOTE.T: PB6 (I2C1_SCL / USART0_TX) -MPU6050.SDA: PB9 (I2C2) -MPU6050.SCL: PB8 (I2C2) - - - - - - - - - - - -© Copyright Florian Stäblein 2018 -HALL -HALL (SA / SB / SC) -uC - - - - - - - - -Low-Pass -Pullup - -USART -RX -uC, PA3 - - - - - -Protective resistance -TX -uC, PA2 - - -Battery measurement -uC, PA4 -Battery voltage -Ubatt_measure = ( ADC / 4096 - 1 ) * 3,3V * 30 - -0,004 Ohm -uC, PA6 -uC, PB12 -Uthgs = 600mV (=150A Shunt) --> short circuit detection -3,3V * 1/3 - 0,004Ohm * IL(ampere) = (ADC-Data/4095) *3,3V -Current measurement - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Since Version 6.2.2 text objects can contain more than one line, -which will not be processed correctly with this version. - - -Since Version 8.2, EAGLE supports online libraries. The ids -of those online libraries will not be understood (or retained) -with this version. - - -Since Version 8.3, EAGLE supports URNs for individual library -assets (packages, symbols, and devices). The URNs of those assets -will not be understood (or retained) with this version. - - -Since Version 8.3, EAGLE supports the association of 3D packages -with devices in libraries, schematics, and board files. Those 3D -packages will not be understood (or retained) with this version. - - -