diff --git a/electronics/rosaled.kicad_sch b/electronics/rosaled.kicad_sch index e5a3fc5..15477fb 100644 --- a/electronics/rosaled.kicad_sch +++ b/electronics/rosaled.kicad_sch @@ -2180,6 +2180,7 @@ (alternate "" input line) (alternate "OSC_OUT" output line) (alternate "" input line) + (alternate "" input line) (alternate "[SPI_MOSI]" bidirectional line) (alternate "[USART_RX]" input line) ) @@ -2371,6 +2372,7 @@ ) (alternate "" input line) (alternate "" input line) + (alternate "" input line) ) (pin power_in line (at 0 -21.59 90) @@ -2391,6 +2393,7 @@ ) (alternate "" input line) (alternate "" input line) + (alternate "" input line) ) (pin bidirectional line (at 17.78 11.43 180) @@ -2412,7 +2415,6 @@ (alternate "" input line) (alternate "I2C_SDA" bidirectional line) (alternate "" input line) - (alternate "" input line) ) (pin bidirectional line (at 17.78 8.89 180) @@ -2459,7 +2461,6 @@ (alternate "COMP2_INM" input line) (alternate "I2C1_SMB" bidirectional line) (alternate "" input line) - (alternate "" input line) (alternate "USART_CK" output line) ) (pin bidirectional line @@ -6372,18 +6373,19 @@ ) (pin "5" (uuid "16ef0a54-5f7f-4f3b-8a6d-fb491b1f9b50") + (alternate "[USART_TX]") ) (pin "6" (uuid "32098c74-ad21-42d2-a4ec-d9e1c4ace3e5") - (alternate "TIM3_CH2") + (alternate "[USART_RX]") ) (pin "7" (uuid "a31e34c8-353c-4e6e-9046-a78a4dfd9f3a") - (alternate "TIM2_CH1") + (alternate "V_{SS}/V_{SSA}/V_{REF-}") ) (pin "8" (uuid "12c981a3-ad26-4a29-8b26-73b74349229c") - (alternate "TIM3_CH1") + (alternate "V_{DD}/V_{DDA}/V_{REF-}") ) (pin "9" (uuid "126197c6-274e-46fa-9ca6-37ffdc40e4e4") diff --git a/firmware/.vscode/settings.json b/firmware/.vscode/settings.json index fd061af..2dfef88 100644 --- a/firmware/.vscode/settings.json +++ b/firmware/.vscode/settings.json @@ -5,6 +5,9 @@ "stm8l15x_conf.h": "c", "stm8l15x_rtc.h": "c", "stdio.h": "c", - "stm8l15x_usart.h": "c" + "stm8l15x_usart.h": "c", + "stm8l15x_pwr.h": "c", + "stm8l15x_syscfg.h": "c", + "stm8l15x_exti.h": "c" } } \ No newline at end of file diff --git a/firmware/SDCC/Makefile b/firmware/SDCC/Makefile index 4a13418..16a76b9 100644 --- a/firmware/SDCC/Makefile +++ b/firmware/SDCC/Makefile @@ -36,7 +36,7 @@ PRJ_OBJECTS := $(addprefix $(OUTPUT_DIR)/, $(PRJ_SOURCE:.c=.rel)) SPL_ROOT = $(PRJ_INC_DIR)/stm8l151x SPL_SRC_DIR = $(SPL_ROOT)/src SPL_INC_DIR = $(SPL_ROOT)/inc -SPL_SOURCE = stm8l15x_usart.c stm8l15x_clk.c stm8l15x_gpio.c stm8l15x_rtc.c #$(notdir $(wildcard $(SPL_SRC_DIR)/*.c)) +SPL_SOURCE = stm8l15x_clk.c stm8l15x_gpio.c stm8l15x_rtc.c stm8l15x_it.c #$(notdir $(wildcard $(SPL_SRC_DIR)/*.c)) SPL_OBJECTS := $(addprefix $(OUTPUT_DIR)/, $(SPL_SOURCE:.c=.rel)) # collect all include folders diff --git a/firmware/STM8L15X_LD/STM8L15X_LD.hex b/firmware/STM8L15X_LD/STM8L15X_LD.hex index 7327c9d..1f2956a 100644 --- a/firmware/STM8L15X_LD/STM8L15X_LD.hex +++ b/firmware/STM8L15X_LD/STM8L15X_LD.hex @@ -1,155 +1,126 @@ -:20800000820080838200818F820000008200819082008191820081928200819382008194DE -:2080200082008195820081968200819782008198820081998200819A8200819B8200819C64 -:208040008200819D8200819E8200819F820081A0820081A1820081A2820081A3820081A404 -:20806000820081A5820081A6820081A7820081A8820081A9820081AA820081AB820081ACA4 -:20808300CD92B74D2703CC8080AE00002707724F00005A26F9AE00002709D680B3D70000B0 +:20800000820080838200815182000000820081528200815382008154820081558200815D4B +:208020008200815E8200815F8200816082008161820081628200816382008164820081651C +:20804000820081668200816782008168820081698200816A8200816B8200816C8200816DBC +:208060008200816E8200816F8200817082008171820081728200817382008174820081755C +:20808300CD8F2B4D2703CC8080AE00002707724F00005A26F9AE00002709D680ADD7000045 :0680A3005A26F7CC808094 -:03808000CC80B4FD -:2080B4004BC0A610AE500ACD88285F5CCD80E8CD814CAE80A9CD814420FE81A601CD862DAD -:2080D400A608CD85CE4FCD8629CD85D2A10826F98120F68152041F015F1F031E03130122A1 -:2080F40031A610AE500ACD88D65F909390A30FA022049D5C20F4A610AE500ACD88DF5F90DA -:208114009390A30FA022049D5C20F41E035C1F0320C95B0481AE523088F695845D2AF6C730 -:20813400523181F62601815C89CD81298520F481CD8137A60ACC8129C6509EA4CFC7509E8C -:208154007218509E4BF0A604AE5000CD88284B00A608AE5000CD88284B01A605CD86514BD9 -:1B817400084B004B004B004B804B255F89AE5230CD81C4A601AE5230CC827B02 -:0680A90048656C6C6F00DD -:20818F008080808080808080808080808080808080808080808080808080808080809093AD -:2081AF00E601936F03936F02936F04936F05936F06936F0781520B1F0A1C0004F6A4E96B8D -:2081CF0009F77B121A141A09F71E0A1C0006F6A4CFF71A13F71E0A5C5C1F01F61E017F1E3B -:2081EF000A1C00031F03F6A40F1E03F71E037FCD85D61F081E10891E10891E0C899089CD6E -:20820F00925C5B0817059EA4F06B0916037B0990F79FA40F1A09160390F7A610629F1E012D -:20822F00F71E0A1C0005F6A4F3F71A15F71E0C5B15FC52056B051C00061F01F6A4F86B03A6 -:20824F001E017B03F77B081A096B047B0A1A041A031E01F71E01F60D052707AA081E01F773 -:20826F002005A4F71E01F71E065B0AFC886B011C0004F60D012705A4DFF72003AA20F7846E -:20828F00811C000AF7811C0005F6AA01F781E60181899093E604A480974F95581F0190E6EB -:2082AF00011A02977B01A401955B02815CF78152031F021C0004F6A4BF6B01F71606905441 -:2082CF009054909FA4401A01F71E025C7B07F71E045B07FC886B011C0005F60D012705AA22 -:2082EF0002F72003A4FDF78481886B011C0007F6A4F0F71A01F78481886B011C0004F6A459 -:20830F00F7F71A01F78481886B011C0008F60D012705AA08F72003A4F7F78481886B011C8E -:20832F000008F60D012705AA20F72003A4DFF78481886B011C0008F60D012705AA10F7207A -:20834F0003A4EFF784811C0009F781886B011C0008F60D012705AA04F72003A4FBF7848134 -:20836F00886B011C0008F60D012705AA02F72003A4FDF78481881C000888F66B02840D0417 -:20838F0027051A01F72004431401F7848584FC52091F081E0C7B0DA40F88A6016B08844D3A -:2083AF00270508074A26FB9E4A2605A6016B01C50F01160872A9000417029EA00526044CFE -:2083CF006B04C50F041E081C00081F051E081C00050D0E27220D01270A1E02F61A071E0298 -:2083EF00F720360D04270A1E05F61A071E05F72028F61A07F7202203070D01270A1E02F694 -:20840F0014071E02F720120D04270A1E05F614071E05F72004F61407F71E0A5B0EFC881602 -:20842F00047B056B0190A30101260DE60514012704A601200C4F2009F614012703A6012162 -:20844F004F1E025B05FC16039053909FF71E015B04FC52091F087B0D97A40F88A6016B04B4 -:20846F00844D270508034A26FB9F4EA40F88A6016B08844D270508074A26FB160C17011671 -:20848F000817041E01A30100261D1608170193E60414076B071E04F6140327080D072704C7 -:2084AF00A60120414F203E1E08E60514071E01A3023526206B061E08E608A4016B071E04CF -:2084CF00F61403270C0D0626040D072704A60120144F20116B071E04F6140327070D07276C -:2084EF0003A601214F1E0A5B0DFCF6A4BFF71E015B04FC351150C2350050C6350050C135DF -:20850F000050CB350150C8350050C9350350C0350050C3358050C4350050D0350050CA3563 -:20852F000050C5350050CD350050CC350050CE35B950CF81886B01C650C20D012707AA01E0 -:20854F00C750C22005A4FEC750C2848135AC50CE353550CEC750CD81886B01C650C20D01C8 -:20856F002707AA04C750C22005A4FBC750C28481886B01721150C6721950C6C650C61A0170 -:20858F00C750C68481886B01721550C6721B50C6C650C61A01C750C68481721050CA818838 -:2085AF006B01C650CA0D012707AA10C750CA2005A4EFC750CA84811A03C750C58584FCC726 -:2085CF0050C881C650C78152085F1F031F01C650C7A101260CAE24001F03AE00F41F012013 -:2085EF001CA102260AAE94701F035F1F01200EA104260AAE24001F03AE00F41F01C650C09B -:20860F00A4075F97D680AF5F0F0588894F881E07891E0789CD925C5B1081C750C081886BFC -:20862F0001C650C90D012707AA02C750C92005A4FDC750C984811A03C750C18584FCC750C7 -:20864F00CB818988A4F097849093A40F88A6016B02844D270508014A26FB7B01436B029F51 -:20866F004D2615C650C30D0527071A01C750C320351402C750C3202E909FA1102615C65091 -:20868F00C40D0527071A01C750C4201A1402C750C42013C650D00D0527071A01C750D0202B -:2086AF00051402C750D0858584FC7210519081721251908188AE50C288F66B02840D042766 -:2086CF00071A01C750C22006431401C750C2848584FC886B01C650CF0D012707A4FDC750E3 -:2086EF00CF2005AA02C750CF848188A11C260788A6016B0284C50F01A02C26024C214F0DBC -:20870F000427250D01270AC650C9AA04C750C9203A4D270AC65190AA04C75190202DC65016 -:20872F00CAAA04C750CA20230D01270AC650C9A4FBC750C920154D270AC65190A4FBC751E0 -:20874F00902008C650CAA4FBC750CA848584FC8897A4F0889FA40F97844D2605C650C12052 -:20876F0042A1102605C650C22039A1202605C650C52030A1302605C650C62027A140260559 -:20878F00C650C9201EA1502605C650CA2015A1702605C650CF200CA1802605C65190200319 -:2087AF00C650CB88A6016B029F4D270508024A26FB8414012703A601214F5B01817217510F -:2087CF009081886B01A11C260FC650C91401A00C26034C20244F20217B01A12C260FC65115 -:2087EF00901401A00C26034C200F4F200CC650CA1401A00C26024C214F5B0181A4F0A12043 -:0C880F0026057217519081721750C98124 -:0580AF000102040810AD -:20881B0090936F04907F936F02936F038152081F076B061E071C00041F01F6887B07436B0A -:20883B00048414031E01F71E075C5C1F040D0B2A1D1E07F6887B0CA5108427051A06F72043 -:20885B00031403F71E04F61A061E04F720081E04F614031E04F71E071C0003F6887B0CA53D -:20887B00408427051A06F720031403F71E01F6887B0CA5208427071A061E01F72005140398 -:20889B001E01F75B088584FC881C000388F66B02840D0427051A01F72004431401F784855E -:2088BB0084FCF7818888F66B02840D0427051A01F72004431401F7848584FC886B01F61A5F -:2088DB0001F784818888F66B0284431401F78481886B01F61801F78481E60181F681886B64 -:2088FB0001E6011401404F495B0181886B01F61401404F495B018135CA515935535159CD4F -:20891B008A474D26064F35FF51598135005140350051413500514235015144352151453503 -:20893B000051463500515035FF5151357F51523500516C3500516D350051483500514935CB -:20895B0000514A5F7204514C0CA3FFFF27075C3500514C20EF7204514C064F35FF51598110 -:20897B003500514835FF515435FF51553500515C3500515D3500515E3500515F35005164E3 -:20899B0035005165350051663500514C3500514D7203514C0E5F7203514C08A3FFFF2703DC -:2089BB005C20F37202514C143500516A3500516BCD8A6D4D26034F2004A601214F35FF51DE -:2089DB00598152031F0235CA515935535159CD8A474D26034F202D721D5148C651486B01AE -:2089FB001E02F61A01C751481E025C5CE601F6C75150E601C751511E02E601C75152721F5C -:208A1B00514CA60135FF51595B038151907F935CA67FF79390AE00FFEF02814D270535FFE0 -:208A3B0051598135CA51593553515981720C514C123580514C5F720C514C08A3FFFF2703C8 -:208A5B005C20F3720C514C024F81A60181721F514C8135CA515935535159C6514CA45FC7C0 -:208A7B00514C5F720A514C08A3FFFF27035C20F3720B514C03A601214F35FF515981886BFE -:208A9B000135CA515935535159C651480D012707AA20C751482005A4DFC7514835FF515934 -:208ABB008481886B0135CA515935535159C651480D012707AA10C751482005A4EFC75148FA -:208ADB0035FF5159848152066B061F04C6514835CA515935535159CD8A474D26074F35FFD7 -:208AFB005159206B720D5148071E04E6036B01C50F0116041E045C1F021E0490E6020D0655 -:208B1B002712C75140160290F6C75141F61A01C75142201D89CD923585C75140160290F672 -:208B3B0089CD923585C75141F6CD92351A01C75142C65146721F514C35FF515972085148A4 -:208B5B000CCD8A6D4D26034F2005A601C5A6015B068190936F03907F936F01936F028152CD -:208B7B00066B0690935C5C1F01C651401E01F7935C1F03C651411E03F7C651426B05C6519A -:208B9B0046937B05A4BFF772A900037B05A44090F70D062619F689CD924885F71E03F6CD26 -:208BBB0092481E03F71E01F6CD92481E01F75B068189C6515795C6515897C651460F025B99 -:208BDB000281520A6B0A1F085C1F010D0A26111E01F69743A51026089FA4EFAB0A1E01F766 -:208BFB0035CA515935535159CD8A474D26074F35FF51592071C651401E08160817031608D6 -:208C1B0072A900031705E6020D0A271CC751441E01F66B071E03F64EA4F0481A07C751451B -:208C3B001E05F6C751462023CD9235C751441E01F6CD92356B071E03F64EA4F0481A07C72B -:208C5B0051451E05F6CD9235C75146721F514C35FF5159720851480CCD8A6D4D26034F2084 -:208C7B0005A601C5A6015B0A8151A60190F7935C5CA601F7935CA601F7936F038152066B9D -:208C9B000651C65140935C5C1F01C651441E01F7C651456B03931C00031F04C651461E0411 -:208CBB00F7935C7B03A41FF77B03A4E04EA40F4490F70D06261D160490F689CD92488516EC -:208CDB000490F7F689CD924885F71E01F6CD92481E01F75B068152116B1151C65148931C5A -:208CFB0000041F0535CA5159355351591701935C1F031707931C00031F09931C00061F0B56 -:208D1B00931C00051F0D1E01E6026B100D1127471E05F697A4801A106B0F160390F66B10B8 -:208D3B009F48A4801A106B10160790F66B06160990F61A066B0A9F4848A4801A0A6B0A1618 -:208D5B000B90F66B09160D90F61A096B0E9F484848A4801A0E20557B10CD92356B101E05B9 -:208D7B00F6A4801A106B0F1E03F6CD92356B101E05F648A4801A106B101E07F6CD92356BB0 -:208D9B00081E09F61A086B0A1E05F64848A4801A0A6B0A1E0BF6CD92356B0C1E0DF61A0C25 -:208DBB006B0E1E05F6484848A4801A0EAE515C887B10F784AE515D887B11F784AE515E8829 -:208DDB007B0BF784C7515F35FF51595B118190936F03907F936F01936F02936F05A601904C -:208DFB00E706A6F090E70481520B6B0B1F09C6515C6B08C6515D6B01C6515E6B02C6515FC0 -:208E1B006B031E095C5C1F047B08A47F1E04F77B08A4806B081E095C1F067B01A47F1E0683 -:208E3B00F77B01A480441A086B0816097B02A43F90F71E091C00037B02A440F77B02A48062 -:208E5B0044441A086B081E091C00061F017B03A43F1E01F71E091C00057B03A440F77B03DB -:208E7B00A4804444441A081E091C0004F70D0B262690F69089CD9248908590F71E06F6CD5A -:208E9B0092481E06F71E04F6CD92481E04F71E01F6CD92481E01F75B0B8152036B035F1FF0 -:208EBB000135CA515935535159C651490D032709AA01C75149A6012022A4FEC75149C6510C -:208EDB004CA4011E015C270A4D26071E015C1F0120F17200514C024FC5A60135FF51595BAF -:208EFB000381896B0235CA515935535159720C514C24C65149AA016B01721151499EC75179 -:208F1B00649FC75165AE51667B02F7C651491A01C75149A601214F35FF51598581886B0112 -:208F3B0035CA51593553515972155149C65148A4F8C75148C651481A01C7514835FF515907 -:208F5B00848135CA5159355351599EC751549FC7515535FF51598189C65154950F02C651F0 -:208F7B0055975B0281886B0135CA515935535159C651490D012709AA04C75149A601201CAD -:208F9B00A4FBC751495F7204514C08A3FFFF27035C20F37204514C024FC5A60135FF515954 -:208FBB005B0181889735CA515935535159C6514AA4FBC7514AC6514A6B019F1A041A01C7F1 -:208FDB00514A35FF5159848584FCC6514AA40481889735CA515935535159C6514AA48FC795 -:208FFB00514AC6514A6B019F1A041A01C7514A35FF5159848584FC886B015135CA5159352A -:20901B005351597207514C0E5F7207514C08A3FFFF27035C20F37206514C0F909E1A01C729 -:20903B00515A909FC7515BA601214F35FF51595B018188909735CA515935535159720351A6 -:20905B004C0E5F7203514C08A3FFFF27035C20F37202514C15909F1A046B017B051A01C7A7 -:20907B00516A7B06C7516BA601214F35FF51591E025B06FC886B0135CA515935535159C60F -:20909B00514A0D012707AA08C7514A2005A4F7C7514A35FF51598481886B0135CA515935F3 -:2090BB00535159C6514A0D012707AA80C7514A2005A47FC7514A35FF51598481889735CAC4 -:2090DB00515935535159C6516C6B019F480D0427071A01C7516C2006431401C7516C35FFAF -:2090FB005159848584FC886B0135CA515935535159C6516DA4E7C7516DC6516D1A01C75108 -:20911B006D35FF51598481886B0135CA515935535159C6516DA4F8C7516DC6516D1A01C70A -:20913B00516D35FF51598481886B0135CA515935535159C6516DA41FC7516DC6516D1A0139 -:20915B00C7516D35FF515984818835CA515935535159AE516C88F66B02840D0427071A01F5 -:20917B00C7516C2006431401C7516C35FF5159848584FC52036B0335CA515935535159C683 -:20919B0051496B029FA4F0889FA4016B02840D03270F1A02C75149C6516C1A01C7516C20B8 -:2091BB0013431402C75149C6516C6B027B01431402C7516C35FF51595B03815206C6514C06 -:2091DB0090970F02C6514D0F036B06616B05619F1406021405955D2703A601214F5B06813A -:2091FB009F43C7514D9E43A47FC7514C8188C651496B019F14016B01C6514D545454548973 -:20921B001402850D0127064D2703A601214F5B0181A610629F43C7514D815FA10A25055C82 -:20923B00A00A20F758585858891A0285819097A4F04EA40F97A60A42909FA40F891B0285F5 -:20925B008152095F1F05A6206B097B0C484F49080F090E090D090C160558905917054D27AE -:20927B000354995913127B0612117B051210252172F0127B0612116B067B0512106B057BC3 -:1E929B000FAA016B047B0E160C6B0E170C7B046B0F0A0926B51E0E160C5B09814F815B +:03808000CC80AE03 +:2080AE004BE0A604AE5005CD849CCD8118CD81074BE0A604AE5005CD849C4BD0A601AE50AD +:2080CE0005CD849CCD81314B00A610CD82B94B01A612CD82C54FCD8BF4A603CD8BACAE000A +:2080EE00FACD8BD1A601CD8BF4A601AE0040CD8E029ACD81318E20FA81352050B23500504C +:20810E00B3721250B3721450B381A601CD82A1A602CD82424FCD829DCD8246A10226F9812A +:20812E0020F681A601AE5005CD8553A604AE5005CD854AA604AE5005CD8553A601AE500506 +:20814E00CC854A8080808062AE0040CD8EA08080808080808080808080808080808080802B +:20816E008080808080808080351150C2350050C6350050C1350050CB350150C8350050C91C +:20818E00350350C0350050C3358050C4350050D0350050CA350050C5350050CD350050CCE7 +:2081AE00350050CE35B950CF81886B01C650C20D012707AA01C750C22005A4FEC750C28420 +:2081CE008135AC50CE353550CEC750CD81886B01C650C20D012707AA04C750C22005A4FBD1 +:2081EE00C750C28481886B01721150C6721950C6C650C61A01C750C68481886B01721550C1 +:20820E00C6721B50C6C650C61A01C750C68481721050CA81886B01C650CA0D012707AA1027 +:20822E00C750CA2005A4EFC750CA84811A03C750C58584FCC750C881C650C78152085F1F1D +:20824E00031F01C650C7A101260CAE24001F03AE00F41F01201CA102260AAE94701F035F44 +:20826E001F01200EA104260AAE24001F03AE00F41F01C650C0A4075F97D680A95F0F0588A6 +:20828E00894F881E07891E0789CD8ED05B1081C750C081886B01C650C90D012707AA02C723 +:2082AE0050C92005A4FDC750C984811A03C750C18584FCC750CB818988A4F097849093A408 +:2082CE000F88A6016B02844D270508014A26FB7B01436B029F4D2615C650C30D0527071AEE +:2082EE0001C750C320351402C750C3202E909FA1102615C650C40D0527071A01C750C420B7 +:20830E001A1402C750C42013C650D00D0527071A01C750D020051402C750D0858584FC72CB +:20832E0010519081721251908188AE50C288F66B02840D0427071A01C750C220064314016F +:20834E00C750C2848584FC886B01C650CF0D012707A4FDC750CF2005AA02C750CF848188CD +:20836E00A11C260788A6016B0284C50F01A02C26024C214F0D0427250D01270AC650C9AA3B +:20838E0004C750C9203A4D270AC65190AA04C75190202DC650CAAA04C750CA20230D0127E2 +:2083AE000AC650C9A4FBC750C920154D270AC65190A4FBC751902008C650CAA4FBC750CA1E +:2083CE00848584FC8897A4F0889FA40F97844D2605C650C12042A1102605C650C22039A1FF +:2083EE00202605C650C52030A1302605C650C62027A1402605C650C9201EA1502605C6507F +:20840E00CA2015A1702605C650CF200CA1802605C651902003C650CB88A6016B029F4D275C +:20842E000508024A26FB8414012703A601214F5B01817217519081886B01A11C260FC65016 +:20844E00C91401A00C26034C20244F20217B01A12C260FC651901401A00C26034C200F4F62 +:20846E00200CC650CA1401A00C26024C214F5B0181A4F0A12026057217519081721750C953 +:01848E00816C +:0580A9000102040810B3 +:20848F0090936F04907F936F02936F038152081F076B061E071C00041F01F6887B07436B9A +:2084AF00048414031E01F71E075C5C1F040D0B2A1D1E07F6887B0CA5108427051A06F720D3 +:2084CF00031403F71E04F61A061E04F720081E04F614031E04F71E071C0003F6887B0CA5CD +:2084EF00408427051A06F720031403F71E01F6887B0CA5208427071A061E01F72005140328 +:20850F001E01F75B088584FC881C000388F66B02840D0427051A01F72004431401F78485ED +:20852F0084FCF7818888F66B02840D0427051A01F72004431401F7848584FC886B01F61AEE +:20854F0001F784818888F66B0284431401F78481886B01F61801F78481E60181F681886BF3 +:20856F0001E6011401404F495B0181886B01F61401404F495B018135CA515935535159CDDE +:20858F0086BB4D26064F35FF51598135005140350051413500514235015144352151453523 +:2085AF000051463500515035FF5151357F51523500516C3500516D3500514835005149355B +:2085CF0000514A5F7204514C0CA3FFFF27075C3500514C20EF7204514C064F35FF515981A0 +:2085EF003500514835FF515435FF51553500515C3500515D3500515E3500515F3500516473 +:20860F0035005165350051663500514C3500514D7203514C0E5F7203514C08A3FFFF27036B +:20862F005C20F37202514C143500516A3500516BCD86E14D26034F2004A601214F35FF51FD +:20864F00598152031F0235CA515935535159CD86BB4D26034F202D721D5148C651486B01CD +:20866F001E02F61A01C751481E025C5CE601F6C75150E601C751511E02E601C75152721FEB +:20868F00514CA60135FF51595B038151907F935CA67FF79390AE00FFEF02814D270535FF70 +:2086AF0051598135CA51593553515981720C514C123580514C5F720C514C08A3FFFF270358 +:2086CF005C20F3720C514C024F81A60181721F514C8135CA515935535159C6514CA45FC750 +:2086EF00514C5F720A514C08A3FFFF27035C20F3720B514C03A601214F35FF515981886B8E +:20870F000135CA515935535159C651480D012707AA20C751482005A4DFC7514835FF5159C3 +:20872F008481886B0135CA515935535159C651480D012707AA10C751482005A4EFC7514889 +:20874F0035FF5159848152066B061F04C6514835CA515935535159CD86BB4D26074F35FFF6 +:20876F005159206B720D5148071E04E6036B01C50F0116041E045C1F021E0490E6020D06E4 +:20878F002712C75140160290F6C75141F61A01C75142201D89CD8EA985C75140160290F692 +:2087AF0089CD8EA985C75141F6CD8EA91A01C75142C65146721F514C35FF51597208514854 +:2087CF000CCD86E14D26034F2005A601C5A6015B068190936F03907F936F01936F028152ED +:2087EF00066B0690935C5C1F01C651401E01F7935C1F03C651411E03F7C651426B05C6512A +:20880F0046937B05A4BFF772A900037B05A44090F70D062619F689CD8EBC85F71E03F6CD45 +:20882F008EBC1E03F71E01F6CD8EBC1E01F75B068189C6515795C6515897C651460F025B48 +:20884F000281520A6B0A1F085C1F010D0A26111E01F69743A51026089FA4EFAB0A1E01F7F5 +:20886F0035CA515935535159CD86BB4D26074F35FF51592071C651401E08160817031608F5 +:20888F0072A900031705E6020D0A271CC751441E01F66B071E03F64EA4F0481A07C75145AB +:2088AF001E05F6C751462023CD8EA9C751441E01F6CD8EA96B071E03F64EA4F0481A07C7DB +:2088CF0051451E05F6CD8EA9C75146721F514C35FF5159720851480CCD86E14D26034F2034 +:2088EF0005A601C5A6015B0A8151A60190F7935C5CA601F7935CA601F7936F038152066B2D +:20890F000651C65140935C5C1F01C651441E01F7C651456B03931C00031F04C651461E04A0 +:20892F00F7935C7B03A41FF77B03A4E04EA40F4490F70D06261D160490F689CD8EBC85160B +:20894F000490F7F689CD8EBC85F71E01F6CD8EBC1E01F75B068152116B1151C65148931C09 +:20896F0000041F0535CA5159355351591701935C1F031707931C00031F09931C00061F0BE5 +:20898F00931C00051F0D1E01E6026B100D1127471E05F697A4801A106B0F160390F66B1048 +:2089AF009F48A4801A106B10160790F66B06160990F61A066B0A9F4848A4801A0A6B0A16A8 +:2089CF000B90F66B09160D90F61A096B0E9F484848A4801A0E20557B10CD8EA96B101E05D9 +:2089EF00F6A4801A106B0F1E03F6CD8EA96B101E05F648A4801A106B101E07F6CD8EA96B60 +:208A0F00081E09F61A086B0A1E05F64848A4801A0A6B0A1E0BF6CD8EA96B0C1E0DF61A0C44 +:208A2F006B0E1E05F6484848A4801A0EAE515C887B10F784AE515D887B11F784AE515E88B8 +:208A4F007B0BF784C7515F35FF51595B118190936F03907F936F01936F02936F05A60190DB +:208A6F00E706A6F090E70481520B6B0B1F09C6515C6B08C6515D6B01C6515E6B02C6515F4F +:208A8F006B031E095C5C1F047B08A47F1E04F77B08A4806B081E095C1F067B01A47F1E0613 +:208AAF00F77B01A480441A086B0816097B02A43F90F71E091C00037B02A440F77B02A480F2 +:208ACF0044441A086B081E091C00061F017B03A43F1E01F71E091C00057B03A440F77B036B +:208AEF00A4804444441A081E091C0004F70D0B262690F69089CD8EBC908590F71E06F6CD7A +:208B0F008EBC1E06F71E04F6CD8EBC1E04F71E01F6CD8EBC1E01F75B0B8152036B035F1F2F +:208B2F000135CA515935535159C651490D032709AA01C75149A6012022A4FEC75149C6519B +:208B4F004CA4011E015C270A4D26071E015C1F0120F17200514C024FC5A60135FF51595B3E +:208B6F000381896B0235CA515935535159720C514C24C65149AA016B01721151499EC75108 +:208B8F00649FC75165AE51667B02F7C651491A01C75149A601214F35FF51598581886B01A2 +:208BAF0035CA51593553515972155149C65148A4F8C75148C651481A01C7514835FF515997 +:208BCF00848135CA5159355351599EC751549FC7515535FF51598189C65154950F02C65180 +:208BEF0055975B0281886B0135CA515935535159C651490D012709AA04C75149A601201C3D +:208C0F00A4FBC751495F7204514C08A3FFFF27035C20F37204514C024FC5A60135FF5159E3 +:208C2F005B0181889735CA515935535159C6514AA4FBC7514AC6514A6B019F1A041A01C780 +:208C4F00514A35FF5159848584FCC6514AA40481889735CA515935535159C6514AA48FC724 +:208C6F00514AC6514A6B019F1A041A01C7514A35FF5159848584FC886B015135CA515935B9 +:208C8F005351597207514C0E5F7207514C08A3FFFF27035C20F37206514C0F909E1A01C7B9 +:208CAF00515A909FC7515BA601214F35FF51595B018188909735CA51593553515972035136 +:208CCF004C0E5F7203514C08A3FFFF27035C20F37202514C15909F1A046B017B051A01C737 +:208CEF00516A7B06C7516BA601214F35FF51591E025B06FC886B0135CA515935535159C69F +:208D0F00514A0D012707AA08C7514A2005A4F7C7514A35FF51598481886B0135CA51593582 +:208D2F00535159C6514A0D012707AA80C7514A2005A47FC7514A35FF51598481889735CA53 +:208D4F00515935535159C6516C6B019F480D0427071A01C7516C2006431401C7516C35FF3E +:208D6F005159848584FC886B0135CA515935535159C6516DA4E7C7516DC6516D1A01C75197 +:208D8F006D35FF51598481886B0135CA515935535159C6516DA4F8C7516DC6516D1A01C79A +:208DAF00516D35FF51598481886B0135CA515935535159C6516DA41FC7516DC6516D1A01C9 +:208DCF00C7516D35FF515984818835CA515935535159AE516C88F66B02840D0427071A0185 +:208DEF00C7516C2006431401C7516C35FF5159848584FC52036B0335CA515935535159C613 +:208E0F0051496B029FA4F0889FA4016B02840D03270F1A02C75149C6516C1A01C7516C2047 +:208E2F0013431402C75149C6516C6B027B01431402C7516C35FF51595B03815206C6514C95 +:208E4F0090970F02C6514D0F036B06616B05619F1406021405955D2703A601214F5B0681C9 +:208E6F009F43C7514D9E43A47FC7514C8188C651496B019F14016B01C6514D545454548902 +:208E8F001402850D0127064D2703A601214F5B0181A610629F43C7514D815FA10A25055C12 +:208EAF00A00A20F758585858891A0285819097A4F04EA40F97A60A42909FA40F891B028585 +:208ECF008152095F1F05A6206B097B0C484F49080F090E090D090C160558905917054D273E +:208EEF000354995913127B0612117B051210252172F0127B0612116B067B0512106B057B53 +:1E8F0F000FAA016B047B0E160C6B0E170C7B046B0F0A0926B51E0E160C5B09814F81EA :00000001FF diff --git a/firmware/STM8L15X_LD/STM8L15X_LD.lk b/firmware/STM8L15X_LD/STM8L15X_LD.lk index 11d5f87..057e847 100644 --- a/firmware/STM8L15X_LD/STM8L15X_LD.lk +++ b/firmware/STM8L15X_LD/STM8L15X_LD.lk @@ -8,7 +8,6 @@ -l stm8 ../STM8L15X_LD/main.rel ../STM8L15X_LD/stm8l15x_it.rel -../STM8L15X_LD/stm8l15x_usart.rel ../STM8L15X_LD/stm8l15x_clk.rel ../STM8L15X_LD/stm8l15x_gpio.rel ../STM8L15X_LD/stm8l15x_rtc.rel diff --git a/firmware/STM8L15X_LD/STM8L15X_LD.map b/firmware/STM8L15X_LD/STM8L15X_LD.map index b757e48..4977081 100644 --- a/firmware/STM8L15X_LD/STM8L15X_LD.map +++ b/firmware/STM8L15X_LD/STM8L15X_LD.map @@ -22,16 +22,16 @@ Area Addr Size Decimal Bytes (A 00000001 s_INITIALIZED 00000001 s_SSEG 00000003 l_GSFINAL - 0000000B l_CONST + 00000005 l_CONST 00000023 l_GSINIT 00000083 l_HOME - 00001205 l_CODE + 00000E7F l_CODE 00008000 s_HOME 00008083 s_GSINIT 000080A6 s_GSFINAL 000080A9 s_CONST - 000080B4 s_CODE - 000080B4 s_INITIALIZER + 000080AE s_CODE + 000080AE s_INITIALIZER ASxxxx Linker V03.00/V05.40 + sdld, page 2. Hexadecimal [32-Bits] @@ -74,184 +74,159 @@ Hexadecimal [32-Bits] Area Addr Size Decimal Bytes (Attributes) -------------------------------- ---- ---- ------- ----- ------------ -CONST 000080A9 0000000B = 11. bytes (REL,CON) +CONST 000080A9 00000005 = 5. bytes (REL,CON) Value Global Global Defined In Module ----- -------------------------------- ------------------------ - 000080AF _SYSDivFactor stm8l15x_clk + 000080A9 _SYSDivFactor stm8l15x_clk ASxxxx Linker V03.00/V05.40 + sdld, page 7. Hexadecimal [32-Bits] Area Addr Size Decimal Bytes (Attributes) -------------------------------- ---- ---- ------- ----- ------------ -CODE 000080B4 00001205 = 4613. bytes (REL,CON) +CODE 000080AE 00000E7F = 3711. bytes (REL,CON) Value Global Global Defined In Module ----- -------------------------------- ------------------------ - 000080B4 _main main - 0000818F _TRAP_IRQHandler stm8l15x_it - 00008190 _FLASH_IRQHandler stm8l15x_it - 00008191 _DMA1_CHANNEL0_1_IRQHandler stm8l15x_it - 00008192 _DMA1_CHANNEL2_3_IRQHandler stm8l15x_it - 00008193 _RTC_CSSLSE_IRQHandler stm8l15x_it - 00008194 _EXTIE_F_PVD_IRQHandler stm8l15x_it - 00008195 _EXTIB_G_IRQHandler stm8l15x_it - 00008196 _EXTID_H_IRQHandler stm8l15x_it - 00008197 _EXTI0_IRQHandler stm8l15x_it - 00008198 _EXTI1_IRQHandler stm8l15x_it - 00008199 _EXTI2_IRQHandler stm8l15x_it - 0000819A _EXTI3_IRQHandler stm8l15x_it - 0000819B _EXTI4_IRQHandler stm8l15x_it - 0000819C _EXTI5_IRQHandler stm8l15x_it - 0000819D _EXTI6_IRQHandler stm8l15x_it - 0000819E _EXTI7_IRQHandler stm8l15x_it - 0000819F _LCD_AES_IRQHandler stm8l15x_it - 000081A0 _SWITCH_CSS_BREAK_DAC_IRQHandler stm8l15x_it - 000081A1 _ADC1_COMP_IRQHandler stm8l15x_it - 000081A2 _TIM2_UPD_OVF_TRG_BRK_USART2_TX_ stm8l15x_it - 000081A3 _TIM2_CC_USART2_RX_IRQHandler stm8l15x_it - 000081A4 _TIM3_UPD_OVF_TRG_BRK_USART3_TX_ stm8l15x_it - 000081A5 _TIM3_CC_USART3_RX_IRQHandler stm8l15x_it - 000081A6 _TIM1_UPD_OVF_TRG_COM_IRQHandler stm8l15x_it - 000081A7 _TIM1_CC_IRQHandler stm8l15x_it - 000081A8 _TIM4_UPD_OVF_TRG_IRQHandler stm8l15x_it - 000081A9 _SPI1_IRQHandler stm8l15x_it - 000081AA _USART1_TX_TIM5_UPD_OVF_TRG_BRK_ stm8l15x_it - 000081AB _USART1_RX_TIM5_CC_IRQHandler stm8l15x_it - 000081AC _I2C1_SPI2_IRQHandler stm8l15x_it - 000081AD _USART_DeInit stm8l15x_usart - 000081C4 _USART_Init stm8l15x_usart - 00008241 _USART_ClockInit stm8l15x_usart - 0000827B _USART_Cmd stm8l15x_usart - 00008290 _USART_SetPrescaler stm8l15x_usart - 00008295 _USART_SendBreak stm8l15x_usart - 0000829D _USART_ReceiveData8 stm8l15x_usart - 000082A0 _USART_ReceiveData9 stm8l15x_usart - 000082BB _USART_SendData8 stm8l15x_usart - 000082BE _USART_SendData9 stm8l15x_usart - 000082E3 _USART_ReceiverWakeUpCmd stm8l15x_usart - 000082F8 _USART_SetAddress stm8l15x_usart - 00008307 _USART_WakeUpConfig stm8l15x_usart - 00008316 _USART_HalfDuplexCmd stm8l15x_usart - 0000832B _USART_SmartCardCmd stm8l15x_usart - 00008340 _USART_SmartCardNACKCmd stm8l15x_usart - 00008355 _USART_SetGuardTime stm8l15x_usart - 0000835A _USART_IrDAConfig stm8l15x_usart - 0000836F _USART_IrDACmd stm8l15x_usart + 000080AE _main main + 00008151 _TRAP_IRQHandler stm8l15x_it + 00008152 _FLASH_IRQHandler stm8l15x_it + 00008153 _DMA1_CHANNEL0_1_IRQHandler stm8l15x_it + 00008154 _DMA1_CHANNEL2_3_IRQHandler stm8l15x_it + 00008155 _RTC_CSSLSE_IRQHandler stm8l15x_it + 0000815D _EXTIE_F_PVD_IRQHandler stm8l15x_it + 0000815E _EXTIB_G_IRQHandler stm8l15x_it + 0000815F _EXTID_H_IRQHandler stm8l15x_it + 00008160 _EXTI0_IRQHandler stm8l15x_it + 00008161 _EXTI1_IRQHandler stm8l15x_it + 00008162 _EXTI2_IRQHandler stm8l15x_it + 00008163 _EXTI3_IRQHandler stm8l15x_it + 00008164 _EXTI4_IRQHandler stm8l15x_it + 00008165 _EXTI5_IRQHandler stm8l15x_it + 00008166 _EXTI6_IRQHandler stm8l15x_it + 00008167 _EXTI7_IRQHandler stm8l15x_it + 00008168 _LCD_AES_IRQHandler stm8l15x_it + 00008169 _SWITCH_CSS_BREAK_DAC_IRQHandler stm8l15x_it + 0000816A _ADC1_COMP_IRQHandler stm8l15x_it + 0000816B _TIM2_UPD_OVF_TRG_BRK_USART2_TX_ stm8l15x_it + 0000816C _TIM2_CC_USART2_RX_IRQHandler stm8l15x_it + 0000816D _TIM3_UPD_OVF_TRG_BRK_USART3_TX_ stm8l15x_it + 0000816E _TIM3_CC_USART3_RX_IRQHandler stm8l15x_it + 0000816F _TIM1_UPD_OVF_TRG_COM_IRQHandler stm8l15x_it + 00008170 _TIM1_CC_IRQHandler stm8l15x_it + 00008171 _TIM4_UPD_OVF_TRG_IRQHandler stm8l15x_it + 00008172 _SPI1_IRQHandler stm8l15x_it + 00008173 _USART1_TX_TIM5_UPD_OVF_TRG_BRK_ stm8l15x_it + 00008174 _USART1_RX_TIM5_CC_IRQHandler stm8l15x_it + 00008175 _I2C1_SPI2_IRQHandler stm8l15x_it + 00008176 _CLK_DeInit stm8l15x_clk + 000081B7 _CLK_HSICmd stm8l15x_clk + 000081CF _CLK_AdjustHSICalibrationValue stm8l15x_clk + 000081DB _CLK_LSICmd stm8l15x_clk + 000081F3 _CLK_HSEConfig stm8l15x_clk + 00008208 _CLK_LSEConfig stm8l15x_clk + 0000821D _CLK_ClockSecuritySystemEnable stm8l15x_clk + 00008222 _CLK_ClockSecuritySytemDeglitchC stm8l15x_clk + 0000823A _CLK_CCOConfig stm8l15x_clk + 00008242 _CLK_SYSCLKSourceConfig stm8l15x_clk + 00008246 _CLK_GetSYSCLKSource stm8l15x_clk + 0000824A _CLK_GetClockFreq stm8l15x_clk + 0000829D _CLK_SYSCLKDivConfig stm8l15x_clk + 000082A1 _CLK_SYSCLKSourceSwitchCmd stm8l15x_clk + 000082B9 _CLK_RTCClockConfig stm8l15x_clk + 000082C1 _CLK_BEEPClockConfig stm8l15x_clk + 000082C5 _CLK_PeripheralClockConfig stm8l15x_clk + 0000832D _CLK_LSEClockSecuritySystemEnabl stm8l15x_clk + 00008332 _CLK_RTCCLKSwitchOnLSEFailureEna stm8l15x_clk ASxxxx Linker V03.00/V05.40 + sdld, page 8. Hexadecimal [32-Bits] Area Addr Size Decimal Bytes (Attributes) -------------------------------- ---- ---- ------- ----- ------------ -CODE 000080B4 00001205 = 4613. bytes (REL,CON) +CODE 000080AE 00000E7F = 3711. bytes (REL,CON) Value Global Global Defined In Module ----- -------------------------------- ------------------------ - 00008384 _USART_DMACmd stm8l15x_usart - 0000839E _USART_ITConfig stm8l15x_usart - 0000842D _USART_GetFlagStatus stm8l15x_usart - 00008455 _USART_ClearFlag stm8l15x_usart - 00008461 _USART_GetITStatus stm8l15x_usart - 000084F9 _USART_ClearITPendingBit stm8l15x_usart - 00008502 _CLK_DeInit stm8l15x_clk - 00008543 _CLK_HSICmd stm8l15x_clk - 0000855B _CLK_AdjustHSICalibrationValue stm8l15x_clk - 00008567 _CLK_LSICmd stm8l15x_clk - 0000857F _CLK_HSEConfig stm8l15x_clk - 00008594 _CLK_LSEConfig stm8l15x_clk - 000085A9 _CLK_ClockSecuritySystemEnable stm8l15x_clk - 000085AE _CLK_ClockSecuritySytemDeglitchC stm8l15x_clk - 000085C6 _CLK_CCOConfig stm8l15x_clk - 000085CE _CLK_SYSCLKSourceConfig stm8l15x_clk - 000085D2 _CLK_GetSYSCLKSource stm8l15x_clk - 000085D6 _CLK_GetClockFreq stm8l15x_clk - 00008629 _CLK_SYSCLKDivConfig stm8l15x_clk - 0000862D _CLK_SYSCLKSourceSwitchCmd stm8l15x_clk - 00008645 _CLK_RTCClockConfig stm8l15x_clk - 0000864D _CLK_BEEPClockConfig stm8l15x_clk - 00008651 _CLK_PeripheralClockConfig stm8l15x_clk - 000086B9 _CLK_LSEClockSecuritySystemEnabl stm8l15x_clk - 000086BE _CLK_RTCCLKSwitchOnLSEFailureEna stm8l15x_clk - 000086C3 _CLK_HaltConfig stm8l15x_clk - 000086E1 _CLK_MainRegulatorCmd stm8l15x_clk - 000086F9 _CLK_ITConfig stm8l15x_clk - 0000875E _CLK_GetFlagStatus stm8l15x_clk - 000087CC _CLK_ClearFlag stm8l15x_clk - 000087D1 _CLK_GetITStatus stm8l15x_clk - 0000880B _CLK_ClearITPendingBit stm8l15x_clk - 0000881B _GPIO_DeInit stm8l15x_gpio - 00008828 _GPIO_Init stm8l15x_gpio - 000088A3 _GPIO_ExternalPullUpConfig stm8l15x_gpio - 000088BD _GPIO_Write stm8l15x_gpio - 000088BF _GPIO_WriteBit stm8l15x_gpio - 000088D6 _GPIO_SetBits stm8l15x_gpio - 000088DF _GPIO_ResetBits stm8l15x_gpio - 000088EB _GPIO_ToggleBits stm8l15x_gpio - 000088F4 _GPIO_ReadInputData stm8l15x_gpio - 000088F7 _GPIO_ReadOutputData stm8l15x_gpio - 000088F9 _GPIO_ReadInputDataBit stm8l15x_gpio - 00008906 _GPIO_ReadOutputDataBit stm8l15x_gpio - 00008912 _RTC_DeInit stm8l15x_rtc - 000089DD _RTC_Init stm8l15x_rtc - 00008A26 _RTC_StructInit stm8l15x_rtc - 00008A36 _RTC_WriteProtectionCmd stm8l15x_rtc - 00008A47 _RTC_EnterInitMode stm8l15x_rtc - 00008A68 _RTC_ExitInitMode stm8l15x_rtc - 00008A6D _RTC_WaitForSynchro stm8l15x_rtc + 00008337 _CLK_HaltConfig stm8l15x_clk + 00008355 _CLK_MainRegulatorCmd stm8l15x_clk + 0000836D _CLK_ITConfig stm8l15x_clk + 000083D2 _CLK_GetFlagStatus stm8l15x_clk + 00008440 _CLK_ClearFlag stm8l15x_clk + 00008445 _CLK_GetITStatus stm8l15x_clk + 0000847F _CLK_ClearITPendingBit stm8l15x_clk + 0000848F _GPIO_DeInit stm8l15x_gpio + 0000849C _GPIO_Init stm8l15x_gpio + 00008517 _GPIO_ExternalPullUpConfig stm8l15x_gpio + 00008531 _GPIO_Write stm8l15x_gpio + 00008533 _GPIO_WriteBit stm8l15x_gpio + 0000854A _GPIO_SetBits stm8l15x_gpio + 00008553 _GPIO_ResetBits stm8l15x_gpio + 0000855F _GPIO_ToggleBits stm8l15x_gpio + 00008568 _GPIO_ReadInputData stm8l15x_gpio + 0000856B _GPIO_ReadOutputData stm8l15x_gpio + 0000856D _GPIO_ReadInputDataBit stm8l15x_gpio + 0000857A _GPIO_ReadOutputDataBit stm8l15x_gpio + 00008586 _RTC_DeInit stm8l15x_rtc + 00008651 _RTC_Init stm8l15x_rtc + 0000869A _RTC_StructInit stm8l15x_rtc + 000086AA _RTC_WriteProtectionCmd stm8l15x_rtc + 000086BB _RTC_EnterInitMode stm8l15x_rtc + 000086DC _RTC_ExitInitMode stm8l15x_rtc + 000086E1 _RTC_WaitForSynchro stm8l15x_rtc + 0000870D _RTC_RatioCmd stm8l15x_rtc + 00008731 _RTC_BypassShadowCmd stm8l15x_rtc + 00008755 _RTC_SetTime stm8l15x_rtc + 000087E1 _RTC_TimeStructInit stm8l15x_rtc + 000087EE _RTC_GetTime stm8l15x_rtc + 00008840 _RTC_GetSubSecond stm8l15x_rtc + 00008851 _RTC_SetDate stm8l15x_rtc + 000088F8 _RTC_DateStructInit stm8l15x_rtc + 0000890C _RTC_GetDate stm8l15x_rtc + 00008965 _RTC_SetAlarm stm8l15x_rtc + 00008A5D _RTC_AlarmStructInit stm8l15x_rtc + 00008A77 _RTC_GetAlarm stm8l15x_rtc + 00008B29 _RTC_AlarmCmd stm8l15x_rtc + 00008B71 _RTC_AlarmSubSecondConfig stm8l15x_rtc + 00008BAC _RTC_WakeUpClockConfig stm8l15x_rtc + 00008BD1 _RTC_SetWakeUpCounter stm8l15x_rtc + 00008BE6 _RTC_GetWakeUpCounter stm8l15x_rtc + 00008BF4 _RTC_WakeUpCmd stm8l15x_rtc + 00008C32 _RTC_DayLightSavingConfig stm8l15x_rtc + 00008C59 _RTC_GetStoreOperation stm8l15x_rtc + 00008C5F _RTC_OutputConfig stm8l15x_rtc + 00008C86 _RTC_SynchroShiftConfig stm8l15x_rtc + 00008CC1 _RTC_SmoothCalibConfig stm8l15x_rtc + 00008D03 _RTC_CalibOutputConfig stm8l15x_rtc + 00008D27 _RTC_CalibOutputCmd stm8l15x_rtc ASxxxx Linker V03.00/V05.40 + sdld, page 9. Hexadecimal [32-Bits] Area Addr Size Decimal Bytes (Attributes) -------------------------------- ---- ---- ------- ----- ------------ -CODE 000080B4 00001205 = 4613. bytes (REL,CON) +CODE 000080AE 00000E7F = 3711. bytes (REL,CON) Value Global Global Defined In Module ----- -------------------------------- ------------------------ - 00008A99 _RTC_RatioCmd stm8l15x_rtc - 00008ABD _RTC_BypassShadowCmd stm8l15x_rtc - 00008AE1 _RTC_SetTime stm8l15x_rtc - 00008B6D _RTC_TimeStructInit stm8l15x_rtc - 00008B7A _RTC_GetTime stm8l15x_rtc - 00008BCC _RTC_GetSubSecond stm8l15x_rtc - 00008BDD _RTC_SetDate stm8l15x_rtc - 00008C84 _RTC_DateStructInit stm8l15x_rtc - 00008C98 _RTC_GetDate stm8l15x_rtc - 00008CF1 _RTC_SetAlarm stm8l15x_rtc - 00008DE9 _RTC_AlarmStructInit stm8l15x_rtc - 00008E03 _RTC_GetAlarm stm8l15x_rtc - 00008EB5 _RTC_AlarmCmd stm8l15x_rtc - 00008EFD _RTC_AlarmSubSecondConfig stm8l15x_rtc - 00008F38 _RTC_WakeUpClockConfig stm8l15x_rtc - 00008F5D _RTC_SetWakeUpCounter stm8l15x_rtc - 00008F72 _RTC_GetWakeUpCounter stm8l15x_rtc - 00008F80 _RTC_WakeUpCmd stm8l15x_rtc - 00008FBE _RTC_DayLightSavingConfig stm8l15x_rtc - 00008FE5 _RTC_GetStoreOperation stm8l15x_rtc - 00008FEB _RTC_OutputConfig stm8l15x_rtc - 00009012 _RTC_SynchroShiftConfig stm8l15x_rtc - 0000904D _RTC_SmoothCalibConfig stm8l15x_rtc - 0000908F _RTC_CalibOutputConfig stm8l15x_rtc - 000090B3 _RTC_CalibOutputCmd stm8l15x_rtc - 000090D7 _RTC_TamperLevelConfig stm8l15x_rtc - 00009101 _RTC_TamperFilterConfig stm8l15x_rtc - 00009122 _RTC_TamperSamplingFreqConfig stm8l15x_rtc - 00009143 _RTC_TamperPinsPrechargeDuration stm8l15x_rtc - 00009164 _RTC_TamperCmd stm8l15x_rtc - 0000918E _RTC_ITConfig stm8l15x_rtc - 000091D6 _RTC_GetFlagStatus stm8l15x_rtc - 000091FB _RTC_ClearFlag stm8l15x_rtc - 00009208 _RTC_GetITStatus stm8l15x_rtc - 0000922C _RTC_ClearITPendingBit stm8l15x_rtc - 0000925C __divulong _divulong - 000092B7 ___sdcc_external_startup _startup + 00008D4B _RTC_TamperLevelConfig stm8l15x_rtc + 00008D75 _RTC_TamperFilterConfig stm8l15x_rtc + 00008D96 _RTC_TamperSamplingFreqConfig stm8l15x_rtc + 00008DB7 _RTC_TamperPinsPrechargeDuration stm8l15x_rtc + 00008DD8 _RTC_TamperCmd stm8l15x_rtc + 00008E02 _RTC_ITConfig stm8l15x_rtc + 00008E4A _RTC_GetFlagStatus stm8l15x_rtc + 00008E6F _RTC_ClearFlag stm8l15x_rtc + 00008E7C _RTC_GetITStatus stm8l15x_rtc + 00008EA0 _RTC_ClearITPendingBit stm8l15x_rtc + 00008ED0 __divulong _divulong + 00008F2B ___sdcc_external_startup _startup + ASxxxx Linker V03.00/V05.40 + sdld, page 10. Files Linked [ module(s) ] ../STM8L15X_LD/main.rel [ main ] ../STM8L15X_LD/stm8l15x_it.rel [ stm8l15x_it ] -../STM8L15X_LD/stm8l15x_usart.rel [ stm8l15x_usart ] ../STM8L15X_LD/stm8l15x_clk.rel [ stm8l15x_clk ] ../STM8L15X_LD/stm8l15x_gpio.rel [ stm8l15x_gpio ] ../STM8L15X_LD/stm8l15x_rtc.rel [ stm8l15x_rtc ] diff --git a/firmware/STM8L15X_LD/main.asm b/firmware/STM8L15X_LD/main.asm index 3ce84e9..961ccbe 100644 --- a/firmware/STM8L15X_LD/main.asm +++ b/firmware/STM8L15X_LD/main.asm @@ -8,12 +8,15 @@ ; Public variables in this module ;-------------------------------------------------------- .globl _main - .globl _USART_Cmd - .globl _USART_Init + .globl _RTC_ITConfig + .globl _RTC_WakeUpCmd + .globl _RTC_SetWakeUpCounter + .globl _RTC_WakeUpClockConfig .globl _GPIO_ResetBits .globl _GPIO_SetBits .globl _GPIO_Init .globl _CLK_PeripheralClockConfig + .globl _CLK_RTCClockConfig .globl _CLK_SYSCLKSourceSwitchCmd .globl _CLK_SYSCLKDivConfig .globl _CLK_GetSYSCLKSource @@ -126,199 +129,128 @@ __sdcc_program_startup: ; code ;-------------------------------------------------------- .area CODE -; ../src/main.c: 24: void main(void) +; ../src/main.c: 28: void main(void) ; ----------------------------------------- ; function main ; ----------------------------------------- _main: -; ../src/main.c: 27: Led_Init; - push #0xc0 - ld a, #0x10 - ldw x, #0x500a +; ../src/main.c: 30: GPIO_Init(GPIOB, GPIO_Pin_2, GPIO_Mode_Out_PP_Low_Fast); + push #0xe0 + ld a, #0x04 + ldw x, #0x5005 call _GPIO_Init -; ../src/main.c: 28: blink(1); - clrw x - incw x - call _blink -; ../src/main.c: 29: USART_Config(); - call _USART_Config -; ../src/main.c: 30: println("Hello"); - ldw x, #(___str_0+0) - call _println -; ../src/main.c: 31: while (1); +; ../src/main.c: 33: CLK_Config(); + call _CLK_Config +; ../src/main.c: 34: PWR_Config(); + call _PWR_Config +; ../src/main.c: 35: Led2_Init; + push #0xe0 + ld a, #0x04 + ldw x, #0x5005 + call _GPIO_Init +; ../src/main.c: 36: Mono_Init; + push #0xd0 + ld a, #0x01 + ldw x, #0x5005 + call _GPIO_Init +; ../src/main.c: 37: blink2(); + call _blink2 +; ../src/main.c: 41: CLK_RTCClockConfig(CLK_RTCCLKSource_LSE, CLK_RTCCLKDiv_1); + push #0x00 + ld a, #0x10 + call _CLK_RTCClockConfig +; ../src/main.c: 42: CLK_PeripheralClockConfig(CLK_Peripheral_RTC, ENABLE); + push #0x01 + ld a, #0x12 + call _CLK_PeripheralClockConfig +; ../src/main.c: 45: RTC_WakeUpCmd(DISABLE); + clr a + call _RTC_WakeUpCmd +; ../src/main.c: 46: RTC_WakeUpClockConfig(RTC_WakeUpClock_RTCCLK_Div2); + ld a, #0x03 + call _RTC_WakeUpClockConfig +; ../src/main.c: 47: RTC_SetWakeUpCounter(250); + ldw x, #0x00fa + call _RTC_SetWakeUpCounter +; ../src/main.c: 48: RTC_WakeUpCmd(ENABLE); + ld a, #0x01 + call _RTC_WakeUpCmd +; ../src/main.c: 50: RTC_ITConfig(RTC_IT_WUT, ENABLE); + ld a, #0x01 + ldw x, #0x0040 + call _RTC_ITConfig +; ../src/main.c: 52: enableInterrupts(); + rim +; ../src/main.c: 53: while (1){ 00102$: +; ../src/main.c: 54: blink2(); + call _blink2 +; ../src/main.c: 55: halt(); + halt jra 00102$ -; ../src/main.c: 32: } +; ../src/main.c: 57: } ret -; ../src/main.c: 34: static void CLK_Config(void) +; ../src/main.c: 59: static void PWR_Config(void){ +; ----------------------------------------- +; function PWR_Config +; ----------------------------------------- +_PWR_Config: +; ../src/main.c: 60: PWR->CSR1 = PWR_CSR1_PVDIF; + mov 0x50b2+0, #0x20 +; ../src/main.c: 61: PWR->CSR2 = PWR_CSR2_RESET_VALUE; + mov 0x50b3+0, #0x00 +; ../src/main.c: 62: PWR->CSR2 |= PWR_CSR2_ULP; + bset 0x50b3, #1 +; ../src/main.c: 63: PWR->CSR2 |= PWR_CSR2_FWU; + bset 0x50b3, #2 +; ../src/main.c: 64: } + ret +; ../src/main.c: 66: static void CLK_Config(void) ; ----------------------------------------- ; function CLK_Config ; ----------------------------------------- _CLK_Config: -; ../src/main.c: 37: CLK_SYSCLKSourceSwitchCmd(ENABLE); +; ../src/main.c: 68: CLK_SYSCLKSourceSwitchCmd(ENABLE); ld a, #0x01 call _CLK_SYSCLKSourceSwitchCmd -; ../src/main.c: 38: CLK_SYSCLKSourceConfig(CLK_SYSCLKSource_LSE); - ld a, #0x08 +; ../src/main.c: 69: CLK_SYSCLKSourceConfig(CLK_SYSCLKSource_LSI); + ld a, #0x02 call _CLK_SYSCLKSourceConfig -; ../src/main.c: 40: CLK_SYSCLKDivConfig(CLK_SYSCLKDiv_1); +; ../src/main.c: 70: CLK_SYSCLKDivConfig(CLK_SYSCLKDiv_1); clr a call _CLK_SYSCLKDivConfig -; ../src/main.c: 41: while (CLK_GetSYSCLKSource() != CLK_SYSCLKSource_LSE); +; ../src/main.c: 71: while (CLK_GetSYSCLKSource() != CLK_SYSCLKSource_LSI); 00101$: call _CLK_GetSYSCLKSource - cp a, #0x08 + cp a, #0x02 jrne 00101$ ret jra 00101$ -; ../src/main.c: 42: } +; ../src/main.c: 72: } ret -; ../src/main.c: 44: static void blink(uint16_t repeats) { +; ../src/main.c: 85: static void blink2() { ; ----------------------------------------- -; function blink +; function blink2 ; ----------------------------------------- -_blink: - sub sp, #4 - ldw (0x01, sp), x -; ../src/main.c: 45: for (uint16_t i = 0; i <= repeats; i++) { - clrw x - ldw (0x03, sp), x -00111$: - ldw x, (0x03, sp) - cpw x, (0x01, sp) - jrugt 00113$ -; ../src/main.c: 46: Led_ON; - ld a, #0x10 - ldw x, #0x500a - call _GPIO_SetBits -; ../src/main.c: 47: for (uint16_t j = 0; j <= 4000; j++) {nop();} - clrw x -00105$: - ldw y, x - cpw y, #0x0fa0 - jrugt 00101$ - nop - incw x - jra 00105$ -00101$: -; ../src/main.c: 48: Led_OFF; - ld a, #0x10 - ldw x, #0x500a - call _GPIO_ResetBits -; ../src/main.c: 49: for (uint16_t j = 0; j <= 4000; j++) {nop();} - clrw x -00108$: - ldw y, x - cpw y, #0x0fa0 - jrugt 00112$ - nop - incw x - jra 00108$ -00112$: -; ../src/main.c: 45: for (uint16_t i = 0; i <= repeats; i++) { - ldw x, (0x03, sp) - incw x - ldw (0x03, sp), x - jra 00111$ -00113$: -; ../src/main.c: 51: } - addw sp, #4 - ret -; ../src/main.c: 53: static void putchar(uint8_t Data) { -; ----------------------------------------- -; function putchar -; ----------------------------------------- -_putchar: -; ../src/main.c: 54: while (!(USART1->SR & USART_FLAG_TXE)); -00101$: - ldw x, #0x5230 - push a - ld a, (x) - ld xh, a - pop a - tnzw x - jrpl 00101$ -; ../src/main.c: 55: USART1->DR = Data; - ld 0x5231, a -; ../src/main.c: 56: } - ret -; ../src/main.c: 58: static void print(const char* s){ -; ----------------------------------------- -; function print -; ----------------------------------------- -_print: -; ../src/main.c: 59: while (*s) { -00101$: - ld a, (x) - jrne 00121$ - ret -00121$: -; ../src/main.c: 60: putchar(*s++); - incw x - pushw x - call _putchar - popw x - jra 00101$ -; ../src/main.c: 62: } - ret -; ../src/main.c: 64: static void println(const char* s){ -; ----------------------------------------- -; function println -; ----------------------------------------- -_println: -; ../src/main.c: 65: print(s); - call _print -; ../src/main.c: 66: putchar('\n'); - ld a, #0x0a -; ../src/main.c: 67: } - jp _putchar -; ../src/main.c: 69: static void USART_Config(void) -; ----------------------------------------- -; function USART_Config -; ----------------------------------------- -_USART_Config: -; ../src/main.c: 72: SYSCFG->RMPCR1 &= ~(0b11 << 4); - ld a, 0x509e - and a, #0xcf - ld 0x509e, a -; ../src/main.c: 73: SYSCFG->RMPCR1 |= (0b01 << 4); - bset 0x509e, #4 -; ../src/main.c: 75: GPIO_Init(GPIOA, GPIO_Pin_2, GPIO_Mode_Out_PP_High_Fast); - push #0xf0 - ld a, #0x04 - ldw x, #0x5000 - call _GPIO_Init -; ../src/main.c: 76: GPIO_Init(GPIOA, GPIO_Pin_3, GPIO_Mode_In_FL_No_IT); - push #0x00 - ld a, #0x08 - ldw x, #0x5000 - call _GPIO_Init -; ../src/main.c: 78: CLK_PeripheralClockConfig(CLK_Peripheral_USART1, ENABLE); - push #0x01 - ld a, #0x05 - call _CLK_PeripheralClockConfig -; ../src/main.c: 80: USART_Init(USART1, (uint32_t)9600, - push #0x08 - push #0x00 - push #0x00 - push #0x00 - push #0x80 - push #0x25 - clrw x - pushw x - ldw x, #0x5230 - call _USART_Init -; ../src/main.c: 83: USART_Cmd(USART1, ENABLE); +_blink2: +; ../src/main.c: 86: Mono_ON; ld a, #0x01 - ldw x, #0x5230 -; ../src/main.c: 84: } - jp _USART_Cmd + ldw x, #0x5005 + call _GPIO_ResetBits +; ../src/main.c: 87: Led2_ON; + ld a, #0x04 + ldw x, #0x5005 + call _GPIO_SetBits +; ../src/main.c: 88: Led2_OFF; + ld a, #0x04 + ldw x, #0x5005 + call _GPIO_ResetBits +; ../src/main.c: 89: Mono_OFF; + ld a, #0x01 + ldw x, #0x5005 +; ../src/main.c: 90: } + jp _GPIO_SetBits .area CODE .area CONST - .area CONST -___str_0: - .ascii "Hello" - .db 0x00 - .area CODE .area INITIALIZER .area CABS (ABS) diff --git a/firmware/STM8L15X_LD/main.lst b/firmware/STM8L15X_LD/main.lst index 21a7a08..17b6430 100644 --- a/firmware/STM8L15X_LD/main.lst +++ b/firmware/STM8L15X_LD/main.lst @@ -8,317 +8,249 @@ 8 ; Public variables in this module 9 ;-------------------------------------------------------- 10 .globl _main - 11 .globl _USART_Cmd - 12 .globl _USART_Init - 13 .globl _GPIO_ResetBits - 14 .globl _GPIO_SetBits - 15 .globl _GPIO_Init - 16 .globl _CLK_PeripheralClockConfig - 17 .globl _CLK_SYSCLKSourceSwitchCmd - 18 .globl _CLK_SYSCLKDivConfig - 19 .globl _CLK_GetSYSCLKSource - 20 .globl _CLK_SYSCLKSourceConfig - 21 ;-------------------------------------------------------- - 22 ; ram data - 23 ;-------------------------------------------------------- - 24 .area DATA - 25 ;-------------------------------------------------------- - 26 ; ram data - 27 ;-------------------------------------------------------- - 28 .area INITIALIZED - 29 ;-------------------------------------------------------- - 30 ; Stack segment in internal ram - 31 ;-------------------------------------------------------- - 32 .area SSEG - 000000 33 __start__stack: - 000000 34 .ds 1 - 35 - 36 ;-------------------------------------------------------- - 37 ; absolute external ram data - 38 ;-------------------------------------------------------- - 39 .area DABS (ABS) - 40 - 41 ; default segment ordering for linker - 42 .area HOME - 43 .area GSINIT - 44 .area GSFINAL - 45 .area CONST - 46 .area INITIALIZER - 47 .area CODE - 48 - 49 ;-------------------------------------------------------- - 50 ; interrupt vector - 51 ;-------------------------------------------------------- - 52 .area HOME - 000000 53 __interrupt_vect: - 000000 82v00u00u00 54 int s_GSINIT ; reset - 000004 82v00u00u00 55 int _TRAP_IRQHandler ; trap - 000008 82 00 00 00 56 int 0x000000 ; int0 - 00000C 82v00u00u00 57 int _FLASH_IRQHandler ; int1 - 000010 82v00u00u00 58 int _DMA1_CHANNEL0_1_IRQHandler ; int2 - 000014 82v00u00u00 59 int _DMA1_CHANNEL2_3_IRQHandler ; int3 - 000018 82v00u00u00 60 int _RTC_CSSLSE_IRQHandler ; int4 - 00001C 82v00u00u00 61 int _EXTIE_F_PVD_IRQHandler ; int5 - 000020 82v00u00u00 62 int _EXTIB_G_IRQHandler ; int6 - 000024 82v00u00u00 63 int _EXTID_H_IRQHandler ; int7 - 000028 82v00u00u00 64 int _EXTI0_IRQHandler ; int8 - 00002C 82v00u00u00 65 int _EXTI1_IRQHandler ; int9 - 000030 82v00u00u00 66 int _EXTI2_IRQHandler ; int10 - 000034 82v00u00u00 67 int _EXTI3_IRQHandler ; int11 - 000038 82v00u00u00 68 int _EXTI4_IRQHandler ; int12 - 00003C 82v00u00u00 69 int _EXTI5_IRQHandler ; int13 - 000040 82v00u00u00 70 int _EXTI6_IRQHandler ; int14 - 000044 82v00u00u00 71 int _EXTI7_IRQHandler ; int15 - 000048 82v00u00u00 72 int _LCD_AES_IRQHandler ; int16 - 00004C 82v00u00u00 73 int _SWITCH_CSS_BREAK_DAC_IRQHandler ; int17 - 000050 82v00u00u00 74 int _ADC1_COMP_IRQHandler ; int18 - 000054 82v00u00u00 75 int _TIM2_UPD_OVF_TRG_BRK_USART2_TX_IRQHandler ; int19 - 000058 82v00u00u00 76 int _TIM2_CC_USART2_RX_IRQHandler ; int20 - 00005C 82v00u00u00 77 int _TIM3_UPD_OVF_TRG_BRK_USART3_TX_IRQHandler ; int21 - 000060 82v00u00u00 78 int _TIM3_CC_USART3_RX_IRQHandler ; int22 - 000064 82v00u00u00 79 int _TIM1_UPD_OVF_TRG_COM_IRQHandler ; int23 - 000068 82v00u00u00 80 int _TIM1_CC_IRQHandler ; int24 - 00006C 82v00u00u00 81 int _TIM4_UPD_OVF_TRG_IRQHandler ; int25 - 000070 82v00u00u00 82 int _SPI1_IRQHandler ; int26 - 000074 82v00u00u00 83 int _USART1_TX_TIM5_UPD_OVF_TRG_BRK_IRQHandler ; int27 - 000078 82v00u00u00 84 int _USART1_RX_TIM5_CC_IRQHandler ; int28 - 00007C 82v00u00u00 85 int _I2C1_SPI2_IRQHandler ; int29 - 86 ;-------------------------------------------------------- - 87 ; global & static initialisations - 88 ;-------------------------------------------------------- - 89 .area HOME - 90 .area GSINIT - 91 .area GSFINAL - 92 .area GSINIT - 000000 CDr00r00 [ 4] 93 call ___sdcc_external_startup - 000003 4D [ 1] 94 tnz a - 000004 27 03 [ 1] 95 jreq __sdcc_init_data - 000006 CCr00r80 [ 2] 96 jp __sdcc_program_startup - 000009 97 __sdcc_init_data: - 98 ; stm8_genXINIT() start - 000009 AEr00r00 [ 2] 99 ldw x, #l_DATA - 00000C 27 07 [ 1] 100 jreq 00002$ - 00000E 101 00001$: - 00000E 72 4FuFFuFF [ 1] 102 clr (s_DATA - 1, x) - 000012 5A [ 2] 103 decw x - 000013 26 F9 [ 1] 104 jrne 00001$ - 000015 105 00002$: - 000015 AEr00r00 [ 2] 106 ldw x, #l_INITIALIZER - 000018 27 09 [ 1] 107 jreq 00004$ - 00001A 108 00003$: - 00001A D6uFFuFF [ 1] 109 ld a, (s_INITIALIZER - 1, x) - 00001D D7uFFuFF [ 1] 110 ld (s_INITIALIZED - 1, x), a - 000020 5A [ 2] 111 decw x - 000021 26 F7 [ 1] 112 jrne 00003$ - 000023 113 00004$: - 114 ; stm8_genXINIT() end - 115 .area GSFINAL - 000000 CCr00r80 [ 2] 116 jp __sdcc_program_startup - 117 ;-------------------------------------------------------- - 118 ; Home - 119 ;-------------------------------------------------------- - 120 .area HOME - 121 .area HOME - 000080 122 __sdcc_program_startup: - 000080 CCr00r00 [ 2] 123 jp _main - 124 ; return from main will return to caller - 125 ;-------------------------------------------------------- - 126 ; code - 127 ;-------------------------------------------------------- - 128 .area CODE - 129 ; ../src/main.c: 24: void main(void) - 130 ; ----------------------------------------- - 131 ; function main - 132 ; ----------------------------------------- - 000000 133 _main: - 134 ; ../src/main.c: 27: Led_Init; - 000000 4B C0 [ 1] 135 push #0xc0 - 000002 A6 10 [ 1] 136 ld a, #0x10 - 000004 AE 50 0A [ 2] 137 ldw x, #0x500a - 000007 CDr00r00 [ 4] 138 call _GPIO_Init - 139 ; ../src/main.c: 28: blink(1); - 00000A 5F [ 1] 140 clrw x - 00000B 5C [ 1] 141 incw x - 00000C CDr00r34 [ 4] 142 call _blink - 143 ; ../src/main.c: 29: USART_Config(); - 00000F CDr00r98 [ 4] 144 call _USART_Config - 145 ; ../src/main.c: 30: println("Hello"); - 000012 AEr00r00 [ 2] 146 ldw x, #(___str_0+0) - 000015 CDr00r90 [ 4] 147 call _println - 148 ; ../src/main.c: 31: while (1); - 000018 149 00102$: - 000018 20 FE [ 2] 150 jra 00102$ - 151 ; ../src/main.c: 32: } - 00001A 81 [ 4] 152 ret - 153 ; ../src/main.c: 34: static void CLK_Config(void) - 154 ; ----------------------------------------- - 155 ; function CLK_Config - 156 ; ----------------------------------------- - 00001B 157 _CLK_Config: - 158 ; ../src/main.c: 37: CLK_SYSCLKSourceSwitchCmd(ENABLE); - 00001B A6 01 [ 1] 159 ld a, #0x01 - 00001D CDr00r00 [ 4] 160 call _CLK_SYSCLKSourceSwitchCmd - 161 ; ../src/main.c: 38: CLK_SYSCLKSourceConfig(CLK_SYSCLKSource_LSE); - 000020 A6 08 [ 1] 162 ld a, #0x08 - 000022 CDr00r00 [ 4] 163 call _CLK_SYSCLKSourceConfig - 164 ; ../src/main.c: 40: CLK_SYSCLKDivConfig(CLK_SYSCLKDiv_1); - 000025 4F [ 1] 165 clr a - 000026 CDr00r00 [ 4] 166 call _CLK_SYSCLKDivConfig - 167 ; ../src/main.c: 41: while (CLK_GetSYSCLKSource() != CLK_SYSCLKSource_LSE); - 000029 168 00101$: - 000029 CDr00r00 [ 4] 169 call _CLK_GetSYSCLKSource - 00002C A1 08 [ 1] 170 cp a, #0x08 - 00002E 26 F9 [ 1] 171 jrne 00101$ - 000030 81 [ 4] 172 ret - 000031 20 F6 [ 2] 173 jra 00101$ - 174 ; ../src/main.c: 42: } - 000033 81 [ 4] 175 ret - 176 ; ../src/main.c: 44: static void blink(uint16_t repeats) { - 177 ; ----------------------------------------- - 178 ; function blink - 179 ; ----------------------------------------- - 000034 180 _blink: - 000034 52 04 [ 2] 181 sub sp, #4 - 000036 1F 01 [ 2] 182 ldw (0x01, sp), x - 183 ; ../src/main.c: 45: for (uint16_t i = 0; i <= repeats; i++) { - 000038 5F [ 1] 184 clrw x - 000039 1F 03 [ 2] 185 ldw (0x03, sp), x - 00003B 186 00111$: - 00003B 1E 03 [ 2] 187 ldw x, (0x03, sp) - 00003D 13 01 [ 2] 188 cpw x, (0x01, sp) - 00003F 22 31 [ 1] 189 jrugt 00113$ - 190 ; ../src/main.c: 46: Led_ON; - 000041 A6 10 [ 1] 191 ld a, #0x10 - 000043 AE 50 0A [ 2] 192 ldw x, #0x500a - 000046 CDr00r00 [ 4] 193 call _GPIO_SetBits - 194 ; ../src/main.c: 47: for (uint16_t j = 0; j <= 4000; j++) {nop();} - 000049 5F [ 1] 195 clrw x - 00004A 196 00105$: - 00004A 90 93 [ 1] 197 ldw y, x - 00004C 90 A3 0F A0 [ 2] 198 cpw y, #0x0fa0 - 000050 22 04 [ 1] 199 jrugt 00101$ - 000052 9D [ 1] 200 nop - 000053 5C [ 1] 201 incw x - 000054 20 F4 [ 2] 202 jra 00105$ - 000056 203 00101$: - 204 ; ../src/main.c: 48: Led_OFF; - 000056 A6 10 [ 1] 205 ld a, #0x10 - 000058 AE 50 0A [ 2] 206 ldw x, #0x500a - 00005B CDr00r00 [ 4] 207 call _GPIO_ResetBits - 208 ; ../src/main.c: 49: for (uint16_t j = 0; j <= 4000; j++) {nop();} - 00005E 5F [ 1] 209 clrw x - 00005F 210 00108$: - 00005F 90 93 [ 1] 211 ldw y, x - 000061 90 A3 0F A0 [ 2] 212 cpw y, #0x0fa0 - 000065 22 04 [ 1] 213 jrugt 00112$ - 000067 9D [ 1] 214 nop - 000068 5C [ 1] 215 incw x - 000069 20 F4 [ 2] 216 jra 00108$ - 00006B 217 00112$: - 218 ; ../src/main.c: 45: for (uint16_t i = 0; i <= repeats; i++) { - 00006B 1E 03 [ 2] 219 ldw x, (0x03, sp) - 00006D 5C [ 1] 220 incw x - 00006E 1F 03 [ 2] 221 ldw (0x03, sp), x - 000070 20 C9 [ 2] 222 jra 00111$ - 000072 223 00113$: - 224 ; ../src/main.c: 51: } - 000072 5B 04 [ 2] 225 addw sp, #4 - 000074 81 [ 4] 226 ret - 227 ; ../src/main.c: 53: static void putchar(uint8_t Data) { - 228 ; ----------------------------------------- - 229 ; function putchar - 230 ; ----------------------------------------- - 000075 231 _putchar: - 232 ; ../src/main.c: 54: while (!(USART1->SR & USART_FLAG_TXE)); - 000075 233 00101$: - 000075 AE 52 30 [ 2] 234 ldw x, #0x5230 - 000078 88 [ 1] 235 push a - 000079 F6 [ 1] 236 ld a, (x) - 00007A 95 [ 1] 237 ld xh, a - 00007B 84 [ 1] 238 pop a - 00007C 5D [ 2] 239 tnzw x - 00007D 2A F6 [ 1] 240 jrpl 00101$ - 241 ; ../src/main.c: 55: USART1->DR = Data; - 00007F C7 52 31 [ 1] 242 ld 0x5231, a - 243 ; ../src/main.c: 56: } - 000082 81 [ 4] 244 ret - 245 ; ../src/main.c: 58: static void print(const char* s){ - 246 ; ----------------------------------------- - 247 ; function print - 248 ; ----------------------------------------- - 000083 249 _print: - 250 ; ../src/main.c: 59: while (*s) { - 000083 251 00101$: - 000083 F6 [ 1] 252 ld a, (x) - 000084 26 01 [ 1] 253 jrne 00121$ - 000086 81 [ 4] 254 ret - 000087 255 00121$: - 256 ; ../src/main.c: 60: putchar(*s++); - 000087 5C [ 1] 257 incw x - 000088 89 [ 2] 258 pushw x - 000089 CDr00r75 [ 4] 259 call _putchar - 00008C 85 [ 2] 260 popw x - 00008D 20 F4 [ 2] 261 jra 00101$ - 262 ; ../src/main.c: 62: } - 00008F 81 [ 4] 263 ret - 264 ; ../src/main.c: 64: static void println(const char* s){ - 265 ; ----------------------------------------- - 266 ; function println - 267 ; ----------------------------------------- - 000090 268 _println: - 269 ; ../src/main.c: 65: print(s); - 000090 CDr00r83 [ 4] 270 call _print - 271 ; ../src/main.c: 66: putchar('\n'); - 000093 A6 0A [ 1] 272 ld a, #0x0a - 273 ; ../src/main.c: 67: } - 000095 CCr00r75 [ 2] 274 jp _putchar - 275 ; ../src/main.c: 69: static void USART_Config(void) - 276 ; ----------------------------------------- - 277 ; function USART_Config - 278 ; ----------------------------------------- - 000098 279 _USART_Config: - 280 ; ../src/main.c: 72: SYSCFG->RMPCR1 &= ~(0b11 << 4); - 000098 C6 50 9E [ 1] 281 ld a, 0x509e - 00009B A4 CF [ 1] 282 and a, #0xcf - 00009D C7 50 9E [ 1] 283 ld 0x509e, a - 284 ; ../src/main.c: 73: SYSCFG->RMPCR1 |= (0b01 << 4); - 0000A0 72 18 50 9E [ 1] 285 bset 0x509e, #4 - 286 ; ../src/main.c: 75: GPIO_Init(GPIOA, GPIO_Pin_2, GPIO_Mode_Out_PP_High_Fast); - 0000A4 4B F0 [ 1] 287 push #0xf0 - 0000A6 A6 04 [ 1] 288 ld a, #0x04 - 0000A8 AE 50 00 [ 2] 289 ldw x, #0x5000 - 0000AB CDr00r00 [ 4] 290 call _GPIO_Init - 291 ; ../src/main.c: 76: GPIO_Init(GPIOA, GPIO_Pin_3, GPIO_Mode_In_FL_No_IT); - 0000AE 4B 00 [ 1] 292 push #0x00 - 0000B0 A6 08 [ 1] 293 ld a, #0x08 - 0000B2 AE 50 00 [ 2] 294 ldw x, #0x5000 - 0000B5 CDr00r00 [ 4] 295 call _GPIO_Init - 296 ; ../src/main.c: 78: CLK_PeripheralClockConfig(CLK_Peripheral_USART1, ENABLE); - 0000B8 4B 01 [ 1] 297 push #0x01 - 0000BA A6 05 [ 1] 298 ld a, #0x05 - 0000BC CDr00r00 [ 4] 299 call _CLK_PeripheralClockConfig - 300 ; ../src/main.c: 80: USART_Init(USART1, (uint32_t)9600, - 0000BF 4B 08 [ 1] 301 push #0x08 - 0000C1 4B 00 [ 1] 302 push #0x00 - 0000C3 4B 00 [ 1] 303 push #0x00 - 0000C5 4B 00 [ 1] 304 push #0x00 - 0000C7 4B 80 [ 1] 305 push #0x80 - 0000C9 4B 25 [ 1] 306 push #0x25 - 0000CB 5F [ 1] 307 clrw x - 0000CC 89 [ 2] 308 pushw x - 0000CD AE 52 30 [ 2] 309 ldw x, #0x5230 - 0000D0 CDr00r00 [ 4] 310 call _USART_Init - 311 ; ../src/main.c: 83: USART_Cmd(USART1, ENABLE); - 0000D3 A6 01 [ 1] 312 ld a, #0x01 - 0000D5 AE 52 30 [ 2] 313 ldw x, #0x5230 - 314 ; ../src/main.c: 84: } - 0000D8 CCr00r00 [ 2] 315 jp _USART_Cmd - 316 .area CODE - 317 .area CONST - 318 .area CONST - 000000 319 ___str_0: - 000000 48 65 6C 6C 6F 320 .ascii "Hello" - 000005 00 321 .db 0x00 - 322 .area CODE - 323 .area INITIALIZER - 324 .area CABS (ABS) + 11 .globl _RTC_ITConfig + 12 .globl _RTC_WakeUpCmd + 13 .globl _RTC_SetWakeUpCounter + 14 .globl _RTC_WakeUpClockConfig + 15 .globl _GPIO_ResetBits + 16 .globl _GPIO_SetBits + 17 .globl _GPIO_Init + 18 .globl _CLK_PeripheralClockConfig + 19 .globl _CLK_RTCClockConfig + 20 .globl _CLK_SYSCLKSourceSwitchCmd + 21 .globl _CLK_SYSCLKDivConfig + 22 .globl _CLK_GetSYSCLKSource + 23 .globl _CLK_SYSCLKSourceConfig + 24 ;-------------------------------------------------------- + 25 ; ram data + 26 ;-------------------------------------------------------- + 27 .area DATA + 28 ;-------------------------------------------------------- + 29 ; ram data + 30 ;-------------------------------------------------------- + 31 .area INITIALIZED + 32 ;-------------------------------------------------------- + 33 ; Stack segment in internal ram + 34 ;-------------------------------------------------------- + 35 .area SSEG + 000000 36 __start__stack: + 000000 37 .ds 1 + 38 + 39 ;-------------------------------------------------------- + 40 ; absolute external ram data + 41 ;-------------------------------------------------------- + 42 .area DABS (ABS) + 43 + 44 ; default segment ordering for linker + 45 .area HOME + 46 .area GSINIT + 47 .area GSFINAL + 48 .area CONST + 49 .area INITIALIZER + 50 .area CODE + 51 + 52 ;-------------------------------------------------------- + 53 ; interrupt vector + 54 ;-------------------------------------------------------- + 55 .area HOME + 000000 56 __interrupt_vect: + 000000 82v00u00u00 57 int s_GSINIT ; reset + 000004 82v00u00u00 58 int _TRAP_IRQHandler ; trap + 000008 82 00 00 00 59 int 0x000000 ; int0 + 00000C 82v00u00u00 60 int _FLASH_IRQHandler ; int1 + 000010 82v00u00u00 61 int _DMA1_CHANNEL0_1_IRQHandler ; int2 + 000014 82v00u00u00 62 int _DMA1_CHANNEL2_3_IRQHandler ; int3 + 000018 82v00u00u00 63 int _RTC_CSSLSE_IRQHandler ; int4 + 00001C 82v00u00u00 64 int _EXTIE_F_PVD_IRQHandler ; int5 + 000020 82v00u00u00 65 int _EXTIB_G_IRQHandler ; int6 + 000024 82v00u00u00 66 int _EXTID_H_IRQHandler ; int7 + 000028 82v00u00u00 67 int _EXTI0_IRQHandler ; int8 + 00002C 82v00u00u00 68 int _EXTI1_IRQHandler ; int9 + 000030 82v00u00u00 69 int _EXTI2_IRQHandler ; int10 + 000034 82v00u00u00 70 int _EXTI3_IRQHandler ; int11 + 000038 82v00u00u00 71 int _EXTI4_IRQHandler ; int12 + 00003C 82v00u00u00 72 int _EXTI5_IRQHandler ; int13 + 000040 82v00u00u00 73 int _EXTI6_IRQHandler ; int14 + 000044 82v00u00u00 74 int _EXTI7_IRQHandler ; int15 + 000048 82v00u00u00 75 int _LCD_AES_IRQHandler ; int16 + 00004C 82v00u00u00 76 int _SWITCH_CSS_BREAK_DAC_IRQHandler ; int17 + 000050 82v00u00u00 77 int _ADC1_COMP_IRQHandler ; int18 + 000054 82v00u00u00 78 int _TIM2_UPD_OVF_TRG_BRK_USART2_TX_IRQHandler ; int19 + 000058 82v00u00u00 79 int _TIM2_CC_USART2_RX_IRQHandler ; int20 + 00005C 82v00u00u00 80 int _TIM3_UPD_OVF_TRG_BRK_USART3_TX_IRQHandler ; int21 + 000060 82v00u00u00 81 int _TIM3_CC_USART3_RX_IRQHandler ; int22 + 000064 82v00u00u00 82 int _TIM1_UPD_OVF_TRG_COM_IRQHandler ; int23 + 000068 82v00u00u00 83 int _TIM1_CC_IRQHandler ; int24 + 00006C 82v00u00u00 84 int _TIM4_UPD_OVF_TRG_IRQHandler ; int25 + 000070 82v00u00u00 85 int _SPI1_IRQHandler ; int26 + 000074 82v00u00u00 86 int _USART1_TX_TIM5_UPD_OVF_TRG_BRK_IRQHandler ; int27 + 000078 82v00u00u00 87 int _USART1_RX_TIM5_CC_IRQHandler ; int28 + 00007C 82v00u00u00 88 int _I2C1_SPI2_IRQHandler ; int29 + 89 ;-------------------------------------------------------- + 90 ; global & static initialisations + 91 ;-------------------------------------------------------- + 92 .area HOME + 93 .area GSINIT + 94 .area GSFINAL + 95 .area GSINIT + 000000 CDr00r00 [ 4] 96 call ___sdcc_external_startup + 000003 4D [ 1] 97 tnz a + 000004 27 03 [ 1] 98 jreq __sdcc_init_data + 000006 CCr00r80 [ 2] 99 jp __sdcc_program_startup + 000009 100 __sdcc_init_data: + 101 ; stm8_genXINIT() start + 000009 AEr00r00 [ 2] 102 ldw x, #l_DATA + 00000C 27 07 [ 1] 103 jreq 00002$ + 00000E 104 00001$: + 00000E 72 4FuFFuFF [ 1] 105 clr (s_DATA - 1, x) + 000012 5A [ 2] 106 decw x + 000013 26 F9 [ 1] 107 jrne 00001$ + 000015 108 00002$: + 000015 AEr00r00 [ 2] 109 ldw x, #l_INITIALIZER + 000018 27 09 [ 1] 110 jreq 00004$ + 00001A 111 00003$: + 00001A D6uFFuFF [ 1] 112 ld a, (s_INITIALIZER - 1, x) + 00001D D7uFFuFF [ 1] 113 ld (s_INITIALIZED - 1, x), a + 000020 5A [ 2] 114 decw x + 000021 26 F7 [ 1] 115 jrne 00003$ + 000023 116 00004$: + 117 ; stm8_genXINIT() end + 118 .area GSFINAL + 000000 CCr00r80 [ 2] 119 jp __sdcc_program_startup + 120 ;-------------------------------------------------------- + 121 ; Home + 122 ;-------------------------------------------------------- + 123 .area HOME + 124 .area HOME + 000080 125 __sdcc_program_startup: + 000080 CCr00r00 [ 2] 126 jp _main + 127 ; return from main will return to caller + 128 ;-------------------------------------------------------- + 129 ; code + 130 ;-------------------------------------------------------- + 131 .area CODE + 132 ; ../src/main.c: 28: void main(void) + 133 ; ----------------------------------------- + 134 ; function main + 135 ; ----------------------------------------- + 000000 136 _main: + 137 ; ../src/main.c: 30: GPIO_Init(GPIOB, GPIO_Pin_2, GPIO_Mode_Out_PP_Low_Fast); + 000000 4B E0 [ 1] 138 push #0xe0 + 000002 A6 04 [ 1] 139 ld a, #0x04 + 000004 AE 50 05 [ 2] 140 ldw x, #0x5005 + 000007 CDr00r00 [ 4] 141 call _GPIO_Init + 142 ; ../src/main.c: 33: CLK_Config(); + 00000A CDr00r6A [ 4] 143 call _CLK_Config + 144 ; ../src/main.c: 34: PWR_Config(); + 00000D CDr00r59 [ 4] 145 call _PWR_Config + 146 ; ../src/main.c: 35: Led2_Init; + 000010 4B E0 [ 1] 147 push #0xe0 + 000012 A6 04 [ 1] 148 ld a, #0x04 + 000014 AE 50 05 [ 2] 149 ldw x, #0x5005 + 000017 CDr00r00 [ 4] 150 call _GPIO_Init + 151 ; ../src/main.c: 36: Mono_Init; + 00001A 4B D0 [ 1] 152 push #0xd0 + 00001C A6 01 [ 1] 153 ld a, #0x01 + 00001E AE 50 05 [ 2] 154 ldw x, #0x5005 + 000021 CDr00r00 [ 4] 155 call _GPIO_Init + 156 ; ../src/main.c: 37: blink2(); + 000024 CDr00r83 [ 4] 157 call _blink2 + 158 ; ../src/main.c: 41: CLK_RTCClockConfig(CLK_RTCCLKSource_LSE, CLK_RTCCLKDiv_1); + 000027 4B 00 [ 1] 159 push #0x00 + 000029 A6 10 [ 1] 160 ld a, #0x10 + 00002B CDr00r00 [ 4] 161 call _CLK_RTCClockConfig + 162 ; ../src/main.c: 42: CLK_PeripheralClockConfig(CLK_Peripheral_RTC, ENABLE); + 00002E 4B 01 [ 1] 163 push #0x01 + 000030 A6 12 [ 1] 164 ld a, #0x12 + 000032 CDr00r00 [ 4] 165 call _CLK_PeripheralClockConfig + 166 ; ../src/main.c: 45: RTC_WakeUpCmd(DISABLE); + 000035 4F [ 1] 167 clr a + 000036 CDr00r00 [ 4] 168 call _RTC_WakeUpCmd + 169 ; ../src/main.c: 46: RTC_WakeUpClockConfig(RTC_WakeUpClock_RTCCLK_Div2); + 000039 A6 03 [ 1] 170 ld a, #0x03 + 00003B CDr00r00 [ 4] 171 call _RTC_WakeUpClockConfig + 172 ; ../src/main.c: 47: RTC_SetWakeUpCounter(250); + 00003E AE 00 FA [ 2] 173 ldw x, #0x00fa + 000041 CDr00r00 [ 4] 174 call _RTC_SetWakeUpCounter + 175 ; ../src/main.c: 48: RTC_WakeUpCmd(ENABLE); + 000044 A6 01 [ 1] 176 ld a, #0x01 + 000046 CDr00r00 [ 4] 177 call _RTC_WakeUpCmd + 178 ; ../src/main.c: 50: RTC_ITConfig(RTC_IT_WUT, ENABLE); + 000049 A6 01 [ 1] 179 ld a, #0x01 + 00004B AE 00 40 [ 2] 180 ldw x, #0x0040 + 00004E CDr00r00 [ 4] 181 call _RTC_ITConfig + 182 ; ../src/main.c: 52: enableInterrupts(); + 000051 9A [ 1] 183 rim + 184 ; ../src/main.c: 53: while (1){ + 000052 185 00102$: + 186 ; ../src/main.c: 54: blink2(); + 000052 CDr00r83 [ 4] 187 call _blink2 + 188 ; ../src/main.c: 55: halt(); + 000055 8E [10] 189 halt + 000056 20 FA [ 2] 190 jra 00102$ + 191 ; ../src/main.c: 57: } + 000058 81 [ 4] 192 ret + 193 ; ../src/main.c: 59: static void PWR_Config(void){ + 194 ; ----------------------------------------- + 195 ; function PWR_Config + 196 ; ----------------------------------------- + 000059 197 _PWR_Config: + 198 ; ../src/main.c: 60: PWR->CSR1 = PWR_CSR1_PVDIF; + 000059 35 20 50 B2 [ 1] 199 mov 0x50b2+0, #0x20 + 200 ; ../src/main.c: 61: PWR->CSR2 = PWR_CSR2_RESET_VALUE; + 00005D 35 00 50 B3 [ 1] 201 mov 0x50b3+0, #0x00 + 202 ; ../src/main.c: 62: PWR->CSR2 |= PWR_CSR2_ULP; + 000061 72 12 50 B3 [ 1] 203 bset 0x50b3, #1 + 204 ; ../src/main.c: 63: PWR->CSR2 |= PWR_CSR2_FWU; + 000065 72 14 50 B3 [ 1] 205 bset 0x50b3, #2 + 206 ; ../src/main.c: 64: } + 000069 81 [ 4] 207 ret + 208 ; ../src/main.c: 66: static void CLK_Config(void) + 209 ; ----------------------------------------- + 210 ; function CLK_Config + 211 ; ----------------------------------------- + 00006A 212 _CLK_Config: + 213 ; ../src/main.c: 68: CLK_SYSCLKSourceSwitchCmd(ENABLE); + 00006A A6 01 [ 1] 214 ld a, #0x01 + 00006C CDr00r00 [ 4] 215 call _CLK_SYSCLKSourceSwitchCmd + 216 ; ../src/main.c: 69: CLK_SYSCLKSourceConfig(CLK_SYSCLKSource_LSI); + 00006F A6 02 [ 1] 217 ld a, #0x02 + 000071 CDr00r00 [ 4] 218 call _CLK_SYSCLKSourceConfig + 219 ; ../src/main.c: 70: CLK_SYSCLKDivConfig(CLK_SYSCLKDiv_1); + 000074 4F [ 1] 220 clr a + 000075 CDr00r00 [ 4] 221 call _CLK_SYSCLKDivConfig + 222 ; ../src/main.c: 71: while (CLK_GetSYSCLKSource() != CLK_SYSCLKSource_LSI); + 000078 223 00101$: + 000078 CDr00r00 [ 4] 224 call _CLK_GetSYSCLKSource + 00007B A1 02 [ 1] 225 cp a, #0x02 + 00007D 26 F9 [ 1] 226 jrne 00101$ + 00007F 81 [ 4] 227 ret + 000080 20 F6 [ 2] 228 jra 00101$ + 229 ; ../src/main.c: 72: } + 000082 81 [ 4] 230 ret + 231 ; ../src/main.c: 85: static void blink2() { + 232 ; ----------------------------------------- + 233 ; function blink2 + 234 ; ----------------------------------------- + 000083 235 _blink2: + 236 ; ../src/main.c: 86: Mono_ON; + 000083 A6 01 [ 1] 237 ld a, #0x01 + 000085 AE 50 05 [ 2] 238 ldw x, #0x5005 + 000088 CDr00r00 [ 4] 239 call _GPIO_ResetBits + 240 ; ../src/main.c: 87: Led2_ON; + 00008B A6 04 [ 1] 241 ld a, #0x04 + 00008D AE 50 05 [ 2] 242 ldw x, #0x5005 + 000090 CDr00r00 [ 4] 243 call _GPIO_SetBits + 244 ; ../src/main.c: 88: Led2_OFF; + 000093 A6 04 [ 1] 245 ld a, #0x04 + 000095 AE 50 05 [ 2] 246 ldw x, #0x5005 + 000098 CDr00r00 [ 4] 247 call _GPIO_ResetBits + 248 ; ../src/main.c: 89: Mono_OFF; + 00009B A6 01 [ 1] 249 ld a, #0x01 + 00009D AE 50 05 [ 2] 250 ldw x, #0x5005 + 251 ; ../src/main.c: 90: } + 0000A0 CCr00r00 [ 2] 252 jp _GPIO_SetBits + 253 .area CODE + 254 .area CONST + 255 .area INITIALIZER + 256 .area CABS (ABS) diff --git a/firmware/STM8L15X_LD/main.rel b/firmware/STM8L15X_LD/main.rel index 3259d7f..9c52407 100644 --- a/firmware/STM8L15X_LD/main.rel +++ b/firmware/STM8L15X_LD/main.rel @@ -1,13 +1,16 @@ XH3 -H C areas 31 global symbols +H C areas 34 global symbols M main +S _RTC_SetWakeUpCounter Ref000000 S _GPIO_Init Ref000000 S _CLK_GetSYSCLKSource Ref000000 S _GPIO_ResetBits Ref000000 S _DMA1_CHANNEL0_1_IRQHandler Ref000000 +S _CLK_RTCClockConfig Ref000000 S _SPI1_IRQHandler Ref000000 S _DMA1_CHANNEL2_3_IRQHandler Ref000000 S s_INITIALIZED Ref000000 +S _RTC_WakeUpCmd Ref000000 S _EXTIB_G_IRQHandler Ref000000 S _TIM2_UPD_OVF_TRG_BRK_USART2_TX_IRQHandler Ref000000 S _USART1_TX_TIM5_UPD_OVF_TRG_BRK_IRQHandler Ref000000 @@ -29,12 +32,11 @@ S _FLASH_IRQHandler Ref000000 S _EXTI5_IRQHandler Ref000000 S _EXTI6_IRQHandler Ref000000 S _EXTI7_IRQHandler Ref000000 +S _RTC_ITConfig Ref000000 S .__.ABS. Def000000 S _TIM1_UPD_OVF_TRG_COM_IRQHandler Ref000000 S _TRAP_IRQHandler Ref000000 S s_GSINIT Ref000000 -S _USART_Init Ref000000 -S _USART_Cmd Ref000000 S _TIM4_UPD_OVF_TRG_IRQHandler Ref000000 S l_DATA Ref000000 S _CLK_PeripheralClockConfig Ref000000 @@ -47,6 +49,7 @@ S _SWITCH_CSS_BREAK_DAC_IRQHandler Ref000000 S ___sdcc_external_startup Ref000000 S _ADC1_COMP_IRQHandler Ref000000 S _LCD_AES_IRQHandler Ref000000 +S _RTC_WakeUpClockConfig Ref000000 S _CLK_SYSCLKSourceConfig Ref000000 S _RTC_CSSLSE_IRQHandler Ref000000 A _CODE size 0 flags 0 addr 0 @@ -57,9 +60,9 @@ A DABS size 0 flags 8 addr 0 A HOME size 83 flags 0 addr 0 A GSINIT size 23 flags 0 addr 0 A GSFINAL size 3 flags 0 addr 0 -A CONST size 6 flags 0 addr 0 +A CONST size 0 flags 0 addr 0 A INITIALIZER size 0 flags 0 addr 0 -A CODE size DB flags 0 addr 0 +A CODE size A3 flags 0 addr 0 S _main Def000000 A CABS size 0 flags 8 addr 0 T 00 00 00 @@ -69,55 +72,55 @@ R 00 00 00 03 T 00 00 00 R 00 00 00 05 T 00 00 00 82 00 00 00 82 00 00 00 82 00 00 00 82 -R 00 00 00 05 92 04 00 1F 92 08 00 1E +R 00 00 00 05 92 04 00 23 92 08 00 22 T 00 00 0D 00 00 00 82 00 00 00 82 -R 00 00 00 05 92 03 00 18 92 07 00 03 +R 00 00 00 05 92 03 00 1B 92 07 00 04 T 00 00 15 00 00 00 82 00 00 00 82 -R 00 00 00 05 92 03 00 05 92 07 00 2F +R 00 00 00 05 92 03 00 07 92 07 00 32 T 00 00 1D 00 00 00 82 00 00 00 82 -R 00 00 00 05 92 03 00 15 92 07 00 07 +R 00 00 00 05 92 03 00 18 92 07 00 0A T 00 00 25 00 00 00 82 00 00 00 82 -R 00 00 00 05 92 03 00 0B 92 07 00 0E +R 00 00 00 05 92 03 00 0E 92 07 00 11 T 00 00 2D 00 00 00 82 00 00 00 82 -R 00 00 00 05 92 03 00 0F 92 07 00 13 +R 00 00 00 05 92 03 00 12 92 07 00 16 T 00 00 35 00 00 00 82 00 00 00 82 -R 00 00 00 05 92 03 00 14 92 07 00 17 +R 00 00 00 05 92 03 00 17 92 07 00 1A T 00 00 3D 00 00 00 82 00 00 00 82 -R 00 00 00 05 92 03 00 19 92 07 00 1A +R 00 00 00 05 92 03 00 1C 92 07 00 1D T 00 00 45 00 00 00 82 00 00 00 82 -R 00 00 00 05 92 03 00 1B 92 07 00 2D +R 00 00 00 05 92 03 00 1E 92 07 00 2F T 00 00 4D 00 00 00 82 00 00 00 82 -R 00 00 00 05 92 03 00 2A 92 07 00 2C +R 00 00 00 05 92 03 00 2C 92 07 00 2E T 00 00 55 00 00 00 82 00 00 00 82 -R 00 00 00 05 92 03 00 08 92 07 00 0D +R 00 00 00 05 92 03 00 0B 92 07 00 10 T 00 00 5D 00 00 00 82 00 00 00 82 -R 00 00 00 05 92 03 00 0A 92 07 00 12 +R 00 00 00 05 92 03 00 0D 92 07 00 15 T 00 00 65 00 00 00 82 00 00 00 82 -R 00 00 00 05 92 03 00 1D 92 07 00 25 +R 00 00 00 05 92 03 00 21 92 07 00 27 T 00 00 6D 00 00 00 82 00 00 00 82 -R 00 00 00 05 92 03 00 22 92 07 00 04 +R 00 00 00 05 92 03 00 24 92 07 00 06 T 00 00 75 00 00 00 82 00 00 00 82 -R 00 00 00 05 92 03 00 09 92 07 00 11 +R 00 00 00 05 92 03 00 0C 92 07 00 14 T 00 00 7D 00 00 00 -R 00 00 00 05 92 03 00 10 +R 00 00 00 05 92 03 00 13 T 00 00 00 CD 00 00 4D 27 03 CC 00 80 -R 00 00 00 06 02 04 00 2B 00 0A 00 05 +R 00 00 00 06 02 04 00 2D 00 0A 00 05 T 00 00 09 R 00 00 00 06 T 00 00 09 AE 00 00 27 07 -R 00 00 00 06 02 04 00 23 +R 00 00 00 06 02 04 00 25 T 00 00 0E R 00 00 00 06 T 00 00 0E 72 4F FF FF 5A 26 F9 -R 00 00 00 06 12 05 00 29 +R 00 00 00 06 12 05 00 2B T 00 00 15 R 00 00 00 06 T 00 00 15 AE 00 00 27 09 -R 00 00 00 06 02 04 00 0C +R 00 00 00 06 02 04 00 0F T 00 00 1A R 00 00 00 06 T 00 00 1A D6 FF FF D7 FF FF 5A 26 F7 -R 00 00 00 06 12 04 00 16 12 07 00 06 +R 00 00 00 06 12 04 00 19 12 07 00 08 T 00 00 23 R 00 00 00 06 T 00 00 00 CC 00 80 @@ -128,93 +131,45 @@ T 00 00 80 CC 00 00 R 00 00 00 05 00 04 00 0A T 00 00 00 R 00 00 00 0A -T 00 00 00 4B C0 A6 10 AE 50 0A CD 00 00 5F 5C CD -R 00 00 00 0A 02 0B 00 00 -T 00 00 0D 00 34 CD 00 98 AE -R 00 00 00 0A 00 03 00 0A 00 06 00 0A -T 00 00 13 00 00 CD 00 90 -R 00 00 00 0A 00 03 00 08 00 06 00 0A -T 00 00 18 +T 00 00 00 4B E0 A6 04 AE 50 05 CD 00 00 CD 00 6A +R 00 00 00 0A 02 0B 00 01 00 0E 00 0A +T 00 00 0D CD 00 59 4B E0 A6 04 AE 50 05 CD 00 00 +R 00 00 00 0A 00 04 00 0A 02 0E 00 01 +T 00 00 1A 4B D0 A6 01 AE 50 05 CD 00 00 CD 00 83 +R 00 00 00 0A 02 0B 00 01 00 0E 00 0A +T 00 00 27 4B 00 A6 10 CD 00 00 4B 01 A6 12 CD +R 00 00 00 0A 02 08 00 05 +T 00 00 33 00 00 4F CD 00 00 A6 03 CD +R 00 00 00 0A 02 03 00 26 02 07 00 09 +T 00 00 3C 00 00 AE 00 FA CD 00 00 A6 01 CD +R 00 00 00 0A 02 03 00 30 02 09 00 00 +T 00 00 47 00 00 A6 01 AE 00 40 CD 00 00 9A +R 00 00 00 0A 02 03 00 09 02 0B 00 1F +T 00 00 52 R 00 00 00 0A -T 00 00 18 20 FE 81 +T 00 00 52 CD 00 83 8E 20 FA 81 +R 00 00 00 0A 00 04 00 0A +T 00 00 59 R 00 00 00 0A -T 00 00 1B +T 00 00 59 35 20 50 B2 35 00 50 B3 72 12 50 B3 72 R 00 00 00 0A -T 00 00 1B A6 01 CD 00 00 A6 08 CD 00 00 4F CD -R 00 00 00 0A 02 06 00 26 02 0B 00 2E -T 00 00 27 00 00 -R 00 00 00 0A 02 03 00 27 -T 00 00 29 +T 00 00 66 14 50 B3 81 R 00 00 00 0A -T 00 00 29 CD 00 00 A1 08 26 F9 81 20 F6 81 -R 00 00 00 0A 02 04 00 01 -T 00 00 34 +T 00 00 6A R 00 00 00 0A -T 00 00 34 52 04 1F 01 5F 1F 03 -R 00 00 00 0A -T 00 00 3B -R 00 00 00 0A -T 00 00 3B 1E 03 13 01 22 31 A6 10 AE 50 0A CD -R 00 00 00 0A -T 00 00 47 00 00 5F -R 00 00 00 0A 02 03 00 28 -T 00 00 4A -R 00 00 00 0A -T 00 00 4A 90 93 90 A3 0F A0 22 04 9D 5C 20 F4 -R 00 00 00 0A -T 00 00 56 -R 00 00 00 0A -T 00 00 56 A6 10 AE 50 0A CD 00 00 5F -R 00 00 00 0A 02 09 00 02 -T 00 00 5F -R 00 00 00 0A -T 00 00 5F 90 93 90 A3 0F A0 22 04 9D 5C 20 F4 -R 00 00 00 0A -T 00 00 6B -R 00 00 00 0A -T 00 00 6B 1E 03 5C 1F 03 20 C9 -R 00 00 00 0A -T 00 00 72 -R 00 00 00 0A -T 00 00 72 5B 04 81 -R 00 00 00 0A -T 00 00 75 -R 00 00 00 0A -T 00 00 75 -R 00 00 00 0A -T 00 00 75 AE 52 30 88 F6 95 84 5D 2A F6 C7 52 31 -R 00 00 00 0A -T 00 00 82 81 +T 00 00 6A A6 01 CD 00 00 A6 02 CD 00 00 4F CD +R 00 00 00 0A 02 06 00 28 02 0B 00 31 +T 00 00 76 00 00 +R 00 00 00 0A 02 03 00 29 +T 00 00 78 R 00 00 00 0A +T 00 00 78 CD 00 00 A1 02 26 F9 81 20 F6 81 +R 00 00 00 0A 02 04 00 02 T 00 00 83 R 00 00 00 0A -T 00 00 83 -R 00 00 00 0A -T 00 00 83 F6 26 01 81 -R 00 00 00 0A -T 00 00 87 -R 00 00 00 0A -T 00 00 87 5C 89 CD 00 75 85 20 F4 81 -R 00 00 00 0A 00 06 00 0A -T 00 00 90 -R 00 00 00 0A -T 00 00 90 CD 00 83 A6 0A CC 00 75 -R 00 00 00 0A 00 04 00 0A 00 09 00 0A -T 00 00 98 -R 00 00 00 0A -T 00 00 98 C6 50 9E A4 CF C7 50 9E 72 18 50 9E 4B -R 00 00 00 0A -T 00 00 A5 F0 A6 04 AE 50 00 CD 00 00 4B 00 A6 08 -R 00 00 00 0A 02 0A 00 00 -T 00 00 B2 AE 50 00 CD 00 00 4B 01 A6 05 CD 00 00 -R 00 00 00 0A 02 07 00 00 02 0E 00 24 -T 00 00 BF 4B 08 4B 00 4B 00 4B 00 4B 80 4B 25 5F -R 00 00 00 0A -T 00 00 CC 89 AE 52 30 CD 00 00 A6 01 AE 52 30 CC -R 00 00 00 0A 02 08 00 20 -T 00 00 D9 00 00 -R 00 00 00 0A 02 03 00 21 -T 00 00 00 -R 00 00 00 08 -T 00 00 00 48 65 6C 6C 6F 00 -R 00 00 00 08 +T 00 00 83 A6 01 AE 50 05 CD 00 00 A6 04 AE 50 05 +R 00 00 00 0A 02 09 00 03 +T 00 00 90 CD 00 00 A6 04 AE 50 05 CD 00 00 A6 01 +R 00 00 00 0A 02 04 00 2A 02 0C 00 03 +T 00 00 9D AE 50 05 CC 00 00 +R 00 00 00 0A 02 07 00 2A diff --git a/firmware/STM8L15X_LD/main.rst b/firmware/STM8L15X_LD/main.rst index 6dd727b..6d519ba 100644 --- a/firmware/STM8L15X_LD/main.rst +++ b/firmware/STM8L15X_LD/main.rst @@ -8,317 +8,249 @@ 8 ; Public variables in this module 9 ;-------------------------------------------------------- 10 .globl _main - 11 .globl _USART_Cmd - 12 .globl _USART_Init - 13 .globl _GPIO_ResetBits - 14 .globl _GPIO_SetBits - 15 .globl _GPIO_Init - 16 .globl _CLK_PeripheralClockConfig - 17 .globl _CLK_SYSCLKSourceSwitchCmd - 18 .globl _CLK_SYSCLKDivConfig - 19 .globl _CLK_GetSYSCLKSource - 20 .globl _CLK_SYSCLKSourceConfig - 21 ;-------------------------------------------------------- - 22 ; ram data - 23 ;-------------------------------------------------------- - 24 .area DATA - 25 ;-------------------------------------------------------- - 26 ; ram data - 27 ;-------------------------------------------------------- - 28 .area INITIALIZED - 29 ;-------------------------------------------------------- - 30 ; Stack segment in internal ram - 31 ;-------------------------------------------------------- - 32 .area SSEG - 000001 33 __start__stack: - 000001 34 .ds 1 - 35 - 36 ;-------------------------------------------------------- - 37 ; absolute external ram data - 38 ;-------------------------------------------------------- - 39 .area DABS (ABS) - 40 - 41 ; default segment ordering for linker - 42 .area HOME - 43 .area GSINIT - 44 .area GSFINAL - 45 .area CONST - 46 .area INITIALIZER - 47 .area CODE - 48 - 49 ;-------------------------------------------------------- - 50 ; interrupt vector - 51 ;-------------------------------------------------------- - 52 .area HOME - 008000 53 __interrupt_vect: - 008000 82 00 80 83 54 int s_GSINIT ; reset - 008004 82 00 81 8F 55 int _TRAP_IRQHandler ; trap - 008008 82 00 00 00 56 int 0x000000 ; int0 - 00800C 82 00 81 90 57 int _FLASH_IRQHandler ; int1 - 008010 82 00 81 91 58 int _DMA1_CHANNEL0_1_IRQHandler ; int2 - 008014 82 00 81 92 59 int _DMA1_CHANNEL2_3_IRQHandler ; int3 - 008018 82 00 81 93 60 int _RTC_CSSLSE_IRQHandler ; int4 - 00801C 82 00 81 94 61 int _EXTIE_F_PVD_IRQHandler ; int5 - 008020 82 00 81 95 62 int _EXTIB_G_IRQHandler ; int6 - 008024 82 00 81 96 63 int _EXTID_H_IRQHandler ; int7 - 008028 82 00 81 97 64 int _EXTI0_IRQHandler ; int8 - 00802C 82 00 81 98 65 int _EXTI1_IRQHandler ; int9 - 008030 82 00 81 99 66 int _EXTI2_IRQHandler ; int10 - 008034 82 00 81 9A 67 int _EXTI3_IRQHandler ; int11 - 008038 82 00 81 9B 68 int _EXTI4_IRQHandler ; int12 - 00803C 82 00 81 9C 69 int _EXTI5_IRQHandler ; int13 - 008040 82 00 81 9D 70 int _EXTI6_IRQHandler ; int14 - 008044 82 00 81 9E 71 int _EXTI7_IRQHandler ; int15 - 008048 82 00 81 9F 72 int _LCD_AES_IRQHandler ; int16 - 00804C 82 00 81 A0 73 int _SWITCH_CSS_BREAK_DAC_IRQHandler ; int17 - 008050 82 00 81 A1 74 int _ADC1_COMP_IRQHandler ; int18 - 008054 82 00 81 A2 75 int _TIM2_UPD_OVF_TRG_BRK_USART2_TX_IRQHandler ; int19 - 008058 82 00 81 A3 76 int _TIM2_CC_USART2_RX_IRQHandler ; int20 - 00805C 82 00 81 A4 77 int _TIM3_UPD_OVF_TRG_BRK_USART3_TX_IRQHandler ; int21 - 008060 82 00 81 A5 78 int _TIM3_CC_USART3_RX_IRQHandler ; int22 - 008064 82 00 81 A6 79 int _TIM1_UPD_OVF_TRG_COM_IRQHandler ; int23 - 008068 82 00 81 A7 80 int _TIM1_CC_IRQHandler ; int24 - 00806C 82 00 81 A8 81 int _TIM4_UPD_OVF_TRG_IRQHandler ; int25 - 008070 82 00 81 A9 82 int _SPI1_IRQHandler ; int26 - 008074 82 00 81 AA 83 int _USART1_TX_TIM5_UPD_OVF_TRG_BRK_IRQHandler ; int27 - 008078 82 00 81 AB 84 int _USART1_RX_TIM5_CC_IRQHandler ; int28 - 00807C 82 00 81 AC 85 int _I2C1_SPI2_IRQHandler ; int29 - 86 ;-------------------------------------------------------- - 87 ; global & static initialisations - 88 ;-------------------------------------------------------- - 89 .area HOME - 90 .area GSINIT - 91 .area GSFINAL - 92 .area GSINIT - 008083 CD 92 B7 [ 4] 93 call ___sdcc_external_startup - 008086 4D [ 1] 94 tnz a - 008087 27 03 [ 1] 95 jreq __sdcc_init_data - 008089 CC 80 80 [ 2] 96 jp __sdcc_program_startup - 00808C 97 __sdcc_init_data: - 98 ; stm8_genXINIT() start - 00808C AE 00 00 [ 2] 99 ldw x, #l_DATA - 00808F 27 07 [ 1] 100 jreq 00002$ - 008091 101 00001$: - 008091 72 4F 00 00 [ 1] 102 clr (s_DATA - 1, x) - 008095 5A [ 2] 103 decw x - 008096 26 F9 [ 1] 104 jrne 00001$ - 008098 105 00002$: - 008098 AE 00 00 [ 2] 106 ldw x, #l_INITIALIZER - 00809B 27 09 [ 1] 107 jreq 00004$ - 00809D 108 00003$: - 00809D D6 80 B3 [ 1] 109 ld a, (s_INITIALIZER - 1, x) - 0080A0 D7 00 00 [ 1] 110 ld (s_INITIALIZED - 1, x), a - 0080A3 5A [ 2] 111 decw x - 0080A4 26 F7 [ 1] 112 jrne 00003$ - 0080A6 113 00004$: - 114 ; stm8_genXINIT() end - 115 .area GSFINAL - 0080A6 CC 80 80 [ 2] 116 jp __sdcc_program_startup - 117 ;-------------------------------------------------------- - 118 ; Home - 119 ;-------------------------------------------------------- - 120 .area HOME - 121 .area HOME - 008080 122 __sdcc_program_startup: - 008080 CC 80 B4 [ 2] 123 jp _main - 124 ; return from main will return to caller - 125 ;-------------------------------------------------------- - 126 ; code - 127 ;-------------------------------------------------------- - 128 .area CODE - 129 ; ../src/main.c: 24: void main(void) - 130 ; ----------------------------------------- - 131 ; function main - 132 ; ----------------------------------------- - 0080B4 133 _main: - 134 ; ../src/main.c: 27: Led_Init; - 0080B4 4B C0 [ 1] 135 push #0xc0 - 0080B6 A6 10 [ 1] 136 ld a, #0x10 - 0080B8 AE 50 0A [ 2] 137 ldw x, #0x500a - 0080BB CD 88 28 [ 4] 138 call _GPIO_Init - 139 ; ../src/main.c: 28: blink(1); - 0080BE 5F [ 1] 140 clrw x - 0080BF 5C [ 1] 141 incw x - 0080C0 CD 80 E8 [ 4] 142 call _blink - 143 ; ../src/main.c: 29: USART_Config(); - 0080C3 CD 81 4C [ 4] 144 call _USART_Config - 145 ; ../src/main.c: 30: println("Hello"); - 0080C6 AE 80 A9 [ 2] 146 ldw x, #(___str_0+0) - 0080C9 CD 81 44 [ 4] 147 call _println - 148 ; ../src/main.c: 31: while (1); - 0080CC 149 00102$: - 0080CC 20 FE [ 2] 150 jra 00102$ - 151 ; ../src/main.c: 32: } - 0080CE 81 [ 4] 152 ret - 153 ; ../src/main.c: 34: static void CLK_Config(void) - 154 ; ----------------------------------------- - 155 ; function CLK_Config - 156 ; ----------------------------------------- - 0080CF 157 _CLK_Config: - 158 ; ../src/main.c: 37: CLK_SYSCLKSourceSwitchCmd(ENABLE); - 0080CF A6 01 [ 1] 159 ld a, #0x01 - 0080D1 CD 86 2D [ 4] 160 call _CLK_SYSCLKSourceSwitchCmd - 161 ; ../src/main.c: 38: CLK_SYSCLKSourceConfig(CLK_SYSCLKSource_LSE); - 0080D4 A6 08 [ 1] 162 ld a, #0x08 - 0080D6 CD 85 CE [ 4] 163 call _CLK_SYSCLKSourceConfig - 164 ; ../src/main.c: 40: CLK_SYSCLKDivConfig(CLK_SYSCLKDiv_1); - 0080D9 4F [ 1] 165 clr a - 0080DA CD 86 29 [ 4] 166 call _CLK_SYSCLKDivConfig - 167 ; ../src/main.c: 41: while (CLK_GetSYSCLKSource() != CLK_SYSCLKSource_LSE); - 0080DD 168 00101$: - 0080DD CD 85 D2 [ 4] 169 call _CLK_GetSYSCLKSource - 0080E0 A1 08 [ 1] 170 cp a, #0x08 - 0080E2 26 F9 [ 1] 171 jrne 00101$ - 0080E4 81 [ 4] 172 ret - 0080E5 20 F6 [ 2] 173 jra 00101$ - 174 ; ../src/main.c: 42: } - 0080E7 81 [ 4] 175 ret - 176 ; ../src/main.c: 44: static void blink(uint16_t repeats) { - 177 ; ----------------------------------------- - 178 ; function blink - 179 ; ----------------------------------------- - 0080E8 180 _blink: - 0080E8 52 04 [ 2] 181 sub sp, #4 - 0080EA 1F 01 [ 2] 182 ldw (0x01, sp), x - 183 ; ../src/main.c: 45: for (uint16_t i = 0; i <= repeats; i++) { - 0080EC 5F [ 1] 184 clrw x - 0080ED 1F 03 [ 2] 185 ldw (0x03, sp), x - 0080EF 186 00111$: - 0080EF 1E 03 [ 2] 187 ldw x, (0x03, sp) - 0080F1 13 01 [ 2] 188 cpw x, (0x01, sp) - 0080F3 22 31 [ 1] 189 jrugt 00113$ - 190 ; ../src/main.c: 46: Led_ON; - 0080F5 A6 10 [ 1] 191 ld a, #0x10 - 0080F7 AE 50 0A [ 2] 192 ldw x, #0x500a - 0080FA CD 88 D6 [ 4] 193 call _GPIO_SetBits - 194 ; ../src/main.c: 47: for (uint16_t j = 0; j <= 4000; j++) {nop();} - 0080FD 5F [ 1] 195 clrw x - 0080FE 196 00105$: - 0080FE 90 93 [ 1] 197 ldw y, x - 008100 90 A3 0F A0 [ 2] 198 cpw y, #0x0fa0 - 008104 22 04 [ 1] 199 jrugt 00101$ - 008106 9D [ 1] 200 nop - 008107 5C [ 1] 201 incw x - 008108 20 F4 [ 2] 202 jra 00105$ - 00810A 203 00101$: - 204 ; ../src/main.c: 48: Led_OFF; - 00810A A6 10 [ 1] 205 ld a, #0x10 - 00810C AE 50 0A [ 2] 206 ldw x, #0x500a - 00810F CD 88 DF [ 4] 207 call _GPIO_ResetBits - 208 ; ../src/main.c: 49: for (uint16_t j = 0; j <= 4000; j++) {nop();} - 008112 5F [ 1] 209 clrw x - 008113 210 00108$: - 008113 90 93 [ 1] 211 ldw y, x - 008115 90 A3 0F A0 [ 2] 212 cpw y, #0x0fa0 - 008119 22 04 [ 1] 213 jrugt 00112$ - 00811B 9D [ 1] 214 nop - 00811C 5C [ 1] 215 incw x - 00811D 20 F4 [ 2] 216 jra 00108$ - 00811F 217 00112$: - 218 ; ../src/main.c: 45: for (uint16_t i = 0; i <= repeats; i++) { - 00811F 1E 03 [ 2] 219 ldw x, (0x03, sp) - 008121 5C [ 1] 220 incw x - 008122 1F 03 [ 2] 221 ldw (0x03, sp), x - 008124 20 C9 [ 2] 222 jra 00111$ - 008126 223 00113$: - 224 ; ../src/main.c: 51: } - 008126 5B 04 [ 2] 225 addw sp, #4 - 008128 81 [ 4] 226 ret - 227 ; ../src/main.c: 53: static void putchar(uint8_t Data) { - 228 ; ----------------------------------------- - 229 ; function putchar - 230 ; ----------------------------------------- - 008129 231 _putchar: - 232 ; ../src/main.c: 54: while (!(USART1->SR & USART_FLAG_TXE)); - 008129 233 00101$: - 008129 AE 52 30 [ 2] 234 ldw x, #0x5230 - 00812C 88 [ 1] 235 push a - 00812D F6 [ 1] 236 ld a, (x) - 00812E 95 [ 1] 237 ld xh, a - 00812F 84 [ 1] 238 pop a - 008130 5D [ 2] 239 tnzw x - 008131 2A F6 [ 1] 240 jrpl 00101$ - 241 ; ../src/main.c: 55: USART1->DR = Data; - 008133 C7 52 31 [ 1] 242 ld 0x5231, a - 243 ; ../src/main.c: 56: } - 008136 81 [ 4] 244 ret - 245 ; ../src/main.c: 58: static void print(const char* s){ - 246 ; ----------------------------------------- - 247 ; function print - 248 ; ----------------------------------------- - 008137 249 _print: - 250 ; ../src/main.c: 59: while (*s) { - 008137 251 00101$: - 008137 F6 [ 1] 252 ld a, (x) - 008138 26 01 [ 1] 253 jrne 00121$ - 00813A 81 [ 4] 254 ret - 00813B 255 00121$: - 256 ; ../src/main.c: 60: putchar(*s++); - 00813B 5C [ 1] 257 incw x - 00813C 89 [ 2] 258 pushw x - 00813D CD 81 29 [ 4] 259 call _putchar - 008140 85 [ 2] 260 popw x - 008141 20 F4 [ 2] 261 jra 00101$ - 262 ; ../src/main.c: 62: } - 008143 81 [ 4] 263 ret - 264 ; ../src/main.c: 64: static void println(const char* s){ - 265 ; ----------------------------------------- - 266 ; function println - 267 ; ----------------------------------------- - 008144 268 _println: - 269 ; ../src/main.c: 65: print(s); - 008144 CD 81 37 [ 4] 270 call _print - 271 ; ../src/main.c: 66: putchar('\n'); - 008147 A6 0A [ 1] 272 ld a, #0x0a - 273 ; ../src/main.c: 67: } - 008149 CC 81 29 [ 2] 274 jp _putchar - 275 ; ../src/main.c: 69: static void USART_Config(void) - 276 ; ----------------------------------------- - 277 ; function USART_Config - 278 ; ----------------------------------------- - 00814C 279 _USART_Config: - 280 ; ../src/main.c: 72: SYSCFG->RMPCR1 &= ~(0b11 << 4); - 00814C C6 50 9E [ 1] 281 ld a, 0x509e - 00814F A4 CF [ 1] 282 and a, #0xcf - 008151 C7 50 9E [ 1] 283 ld 0x509e, a - 284 ; ../src/main.c: 73: SYSCFG->RMPCR1 |= (0b01 << 4); - 008154 72 18 50 9E [ 1] 285 bset 0x509e, #4 - 286 ; ../src/main.c: 75: GPIO_Init(GPIOA, GPIO_Pin_2, GPIO_Mode_Out_PP_High_Fast); - 008158 4B F0 [ 1] 287 push #0xf0 - 00815A A6 04 [ 1] 288 ld a, #0x04 - 00815C AE 50 00 [ 2] 289 ldw x, #0x5000 - 00815F CD 88 28 [ 4] 290 call _GPIO_Init - 291 ; ../src/main.c: 76: GPIO_Init(GPIOA, GPIO_Pin_3, GPIO_Mode_In_FL_No_IT); - 008162 4B 00 [ 1] 292 push #0x00 - 008164 A6 08 [ 1] 293 ld a, #0x08 - 008166 AE 50 00 [ 2] 294 ldw x, #0x5000 - 008169 CD 88 28 [ 4] 295 call _GPIO_Init - 296 ; ../src/main.c: 78: CLK_PeripheralClockConfig(CLK_Peripheral_USART1, ENABLE); - 00816C 4B 01 [ 1] 297 push #0x01 - 00816E A6 05 [ 1] 298 ld a, #0x05 - 008170 CD 86 51 [ 4] 299 call _CLK_PeripheralClockConfig - 300 ; ../src/main.c: 80: USART_Init(USART1, (uint32_t)9600, - 008173 4B 08 [ 1] 301 push #0x08 - 008175 4B 00 [ 1] 302 push #0x00 - 008177 4B 00 [ 1] 303 push #0x00 - 008179 4B 00 [ 1] 304 push #0x00 - 00817B 4B 80 [ 1] 305 push #0x80 - 00817D 4B 25 [ 1] 306 push #0x25 - 00817F 5F [ 1] 307 clrw x - 008180 89 [ 2] 308 pushw x - 008181 AE 52 30 [ 2] 309 ldw x, #0x5230 - 008184 CD 81 C4 [ 4] 310 call _USART_Init - 311 ; ../src/main.c: 83: USART_Cmd(USART1, ENABLE); - 008187 A6 01 [ 1] 312 ld a, #0x01 - 008189 AE 52 30 [ 2] 313 ldw x, #0x5230 - 314 ; ../src/main.c: 84: } - 00818C CC 82 7B [ 2] 315 jp _USART_Cmd - 316 .area CODE - 317 .area CONST - 318 .area CONST - 0080A9 319 ___str_0: - 0080A9 48 65 6C 6C 6F 320 .ascii "Hello" - 0080AE 00 321 .db 0x00 - 322 .area CODE - 323 .area INITIALIZER - 324 .area CABS (ABS) + 11 .globl _RTC_ITConfig + 12 .globl _RTC_WakeUpCmd + 13 .globl _RTC_SetWakeUpCounter + 14 .globl _RTC_WakeUpClockConfig + 15 .globl _GPIO_ResetBits + 16 .globl _GPIO_SetBits + 17 .globl _GPIO_Init + 18 .globl _CLK_PeripheralClockConfig + 19 .globl _CLK_RTCClockConfig + 20 .globl _CLK_SYSCLKSourceSwitchCmd + 21 .globl _CLK_SYSCLKDivConfig + 22 .globl _CLK_GetSYSCLKSource + 23 .globl _CLK_SYSCLKSourceConfig + 24 ;-------------------------------------------------------- + 25 ; ram data + 26 ;-------------------------------------------------------- + 27 .area DATA + 28 ;-------------------------------------------------------- + 29 ; ram data + 30 ;-------------------------------------------------------- + 31 .area INITIALIZED + 32 ;-------------------------------------------------------- + 33 ; Stack segment in internal ram + 34 ;-------------------------------------------------------- + 35 .area SSEG + 000001 36 __start__stack: + 000001 37 .ds 1 + 38 + 39 ;-------------------------------------------------------- + 40 ; absolute external ram data + 41 ;-------------------------------------------------------- + 42 .area DABS (ABS) + 43 + 44 ; default segment ordering for linker + 45 .area HOME + 46 .area GSINIT + 47 .area GSFINAL + 48 .area CONST + 49 .area INITIALIZER + 50 .area CODE + 51 + 52 ;-------------------------------------------------------- + 53 ; interrupt vector + 54 ;-------------------------------------------------------- + 55 .area HOME + 008000 56 __interrupt_vect: + 008000 82 00 80 83 57 int s_GSINIT ; reset + 008004 82 00 81 51 58 int _TRAP_IRQHandler ; trap + 008008 82 00 00 00 59 int 0x000000 ; int0 + 00800C 82 00 81 52 60 int _FLASH_IRQHandler ; int1 + 008010 82 00 81 53 61 int _DMA1_CHANNEL0_1_IRQHandler ; int2 + 008014 82 00 81 54 62 int _DMA1_CHANNEL2_3_IRQHandler ; int3 + 008018 82 00 81 55 63 int _RTC_CSSLSE_IRQHandler ; int4 + 00801C 82 00 81 5D 64 int _EXTIE_F_PVD_IRQHandler ; int5 + 008020 82 00 81 5E 65 int _EXTIB_G_IRQHandler ; int6 + 008024 82 00 81 5F 66 int _EXTID_H_IRQHandler ; int7 + 008028 82 00 81 60 67 int _EXTI0_IRQHandler ; int8 + 00802C 82 00 81 61 68 int _EXTI1_IRQHandler ; int9 + 008030 82 00 81 62 69 int _EXTI2_IRQHandler ; int10 + 008034 82 00 81 63 70 int _EXTI3_IRQHandler ; int11 + 008038 82 00 81 64 71 int _EXTI4_IRQHandler ; int12 + 00803C 82 00 81 65 72 int _EXTI5_IRQHandler ; int13 + 008040 82 00 81 66 73 int _EXTI6_IRQHandler ; int14 + 008044 82 00 81 67 74 int _EXTI7_IRQHandler ; int15 + 008048 82 00 81 68 75 int _LCD_AES_IRQHandler ; int16 + 00804C 82 00 81 69 76 int _SWITCH_CSS_BREAK_DAC_IRQHandler ; int17 + 008050 82 00 81 6A 77 int _ADC1_COMP_IRQHandler ; int18 + 008054 82 00 81 6B 78 int _TIM2_UPD_OVF_TRG_BRK_USART2_TX_IRQHandler ; int19 + 008058 82 00 81 6C 79 int _TIM2_CC_USART2_RX_IRQHandler ; int20 + 00805C 82 00 81 6D 80 int _TIM3_UPD_OVF_TRG_BRK_USART3_TX_IRQHandler ; int21 + 008060 82 00 81 6E 81 int _TIM3_CC_USART3_RX_IRQHandler ; int22 + 008064 82 00 81 6F 82 int _TIM1_UPD_OVF_TRG_COM_IRQHandler ; int23 + 008068 82 00 81 70 83 int _TIM1_CC_IRQHandler ; int24 + 00806C 82 00 81 71 84 int _TIM4_UPD_OVF_TRG_IRQHandler ; int25 + 008070 82 00 81 72 85 int _SPI1_IRQHandler ; int26 + 008074 82 00 81 73 86 int _USART1_TX_TIM5_UPD_OVF_TRG_BRK_IRQHandler ; int27 + 008078 82 00 81 74 87 int _USART1_RX_TIM5_CC_IRQHandler ; int28 + 00807C 82 00 81 75 88 int _I2C1_SPI2_IRQHandler ; int29 + 89 ;-------------------------------------------------------- + 90 ; global & static initialisations + 91 ;-------------------------------------------------------- + 92 .area HOME + 93 .area GSINIT + 94 .area GSFINAL + 95 .area GSINIT + 008083 CD 8F 2B [ 4] 96 call ___sdcc_external_startup + 008086 4D [ 1] 97 tnz a + 008087 27 03 [ 1] 98 jreq __sdcc_init_data + 008089 CC 80 80 [ 2] 99 jp __sdcc_program_startup + 00808C 100 __sdcc_init_data: + 101 ; stm8_genXINIT() start + 00808C AE 00 00 [ 2] 102 ldw x, #l_DATA + 00808F 27 07 [ 1] 103 jreq 00002$ + 008091 104 00001$: + 008091 72 4F 00 00 [ 1] 105 clr (s_DATA - 1, x) + 008095 5A [ 2] 106 decw x + 008096 26 F9 [ 1] 107 jrne 00001$ + 008098 108 00002$: + 008098 AE 00 00 [ 2] 109 ldw x, #l_INITIALIZER + 00809B 27 09 [ 1] 110 jreq 00004$ + 00809D 111 00003$: + 00809D D6 80 AD [ 1] 112 ld a, (s_INITIALIZER - 1, x) + 0080A0 D7 00 00 [ 1] 113 ld (s_INITIALIZED - 1, x), a + 0080A3 5A [ 2] 114 decw x + 0080A4 26 F7 [ 1] 115 jrne 00003$ + 0080A6 116 00004$: + 117 ; stm8_genXINIT() end + 118 .area GSFINAL + 0080A6 CC 80 80 [ 2] 119 jp __sdcc_program_startup + 120 ;-------------------------------------------------------- + 121 ; Home + 122 ;-------------------------------------------------------- + 123 .area HOME + 124 .area HOME + 008080 125 __sdcc_program_startup: + 008080 CC 80 AE [ 2] 126 jp _main + 127 ; return from main will return to caller + 128 ;-------------------------------------------------------- + 129 ; code + 130 ;-------------------------------------------------------- + 131 .area CODE + 132 ; ../src/main.c: 28: void main(void) + 133 ; ----------------------------------------- + 134 ; function main + 135 ; ----------------------------------------- + 0080AE 136 _main: + 137 ; ../src/main.c: 30: GPIO_Init(GPIOB, GPIO_Pin_2, GPIO_Mode_Out_PP_Low_Fast); + 0080AE 4B E0 [ 1] 138 push #0xe0 + 0080B0 A6 04 [ 1] 139 ld a, #0x04 + 0080B2 AE 50 05 [ 2] 140 ldw x, #0x5005 + 0080B5 CD 84 9C [ 4] 141 call _GPIO_Init + 142 ; ../src/main.c: 33: CLK_Config(); + 0080B8 CD 81 18 [ 4] 143 call _CLK_Config + 144 ; ../src/main.c: 34: PWR_Config(); + 0080BB CD 81 07 [ 4] 145 call _PWR_Config + 146 ; ../src/main.c: 35: Led2_Init; + 0080BE 4B E0 [ 1] 147 push #0xe0 + 0080C0 A6 04 [ 1] 148 ld a, #0x04 + 0080C2 AE 50 05 [ 2] 149 ldw x, #0x5005 + 0080C5 CD 84 9C [ 4] 150 call _GPIO_Init + 151 ; ../src/main.c: 36: Mono_Init; + 0080C8 4B D0 [ 1] 152 push #0xd0 + 0080CA A6 01 [ 1] 153 ld a, #0x01 + 0080CC AE 50 05 [ 2] 154 ldw x, #0x5005 + 0080CF CD 84 9C [ 4] 155 call _GPIO_Init + 156 ; ../src/main.c: 37: blink2(); + 0080D2 CD 81 31 [ 4] 157 call _blink2 + 158 ; ../src/main.c: 41: CLK_RTCClockConfig(CLK_RTCCLKSource_LSE, CLK_RTCCLKDiv_1); + 0080D5 4B 00 [ 1] 159 push #0x00 + 0080D7 A6 10 [ 1] 160 ld a, #0x10 + 0080D9 CD 82 B9 [ 4] 161 call _CLK_RTCClockConfig + 162 ; ../src/main.c: 42: CLK_PeripheralClockConfig(CLK_Peripheral_RTC, ENABLE); + 0080DC 4B 01 [ 1] 163 push #0x01 + 0080DE A6 12 [ 1] 164 ld a, #0x12 + 0080E0 CD 82 C5 [ 4] 165 call _CLK_PeripheralClockConfig + 166 ; ../src/main.c: 45: RTC_WakeUpCmd(DISABLE); + 0080E3 4F [ 1] 167 clr a + 0080E4 CD 8B F4 [ 4] 168 call _RTC_WakeUpCmd + 169 ; ../src/main.c: 46: RTC_WakeUpClockConfig(RTC_WakeUpClock_RTCCLK_Div2); + 0080E7 A6 03 [ 1] 170 ld a, #0x03 + 0080E9 CD 8B AC [ 4] 171 call _RTC_WakeUpClockConfig + 172 ; ../src/main.c: 47: RTC_SetWakeUpCounter(250); + 0080EC AE 00 FA [ 2] 173 ldw x, #0x00fa + 0080EF CD 8B D1 [ 4] 174 call _RTC_SetWakeUpCounter + 175 ; ../src/main.c: 48: RTC_WakeUpCmd(ENABLE); + 0080F2 A6 01 [ 1] 176 ld a, #0x01 + 0080F4 CD 8B F4 [ 4] 177 call _RTC_WakeUpCmd + 178 ; ../src/main.c: 50: RTC_ITConfig(RTC_IT_WUT, ENABLE); + 0080F7 A6 01 [ 1] 179 ld a, #0x01 + 0080F9 AE 00 40 [ 2] 180 ldw x, #0x0040 + 0080FC CD 8E 02 [ 4] 181 call _RTC_ITConfig + 182 ; ../src/main.c: 52: enableInterrupts(); + 0080FF 9A [ 1] 183 rim + 184 ; ../src/main.c: 53: while (1){ + 008100 185 00102$: + 186 ; ../src/main.c: 54: blink2(); + 008100 CD 81 31 [ 4] 187 call _blink2 + 188 ; ../src/main.c: 55: halt(); + 008103 8E [10] 189 halt + 008104 20 FA [ 2] 190 jra 00102$ + 191 ; ../src/main.c: 57: } + 008106 81 [ 4] 192 ret + 193 ; ../src/main.c: 59: static void PWR_Config(void){ + 194 ; ----------------------------------------- + 195 ; function PWR_Config + 196 ; ----------------------------------------- + 008107 197 _PWR_Config: + 198 ; ../src/main.c: 60: PWR->CSR1 = PWR_CSR1_PVDIF; + 008107 35 20 50 B2 [ 1] 199 mov 0x50b2+0, #0x20 + 200 ; ../src/main.c: 61: PWR->CSR2 = PWR_CSR2_RESET_VALUE; + 00810B 35 00 50 B3 [ 1] 201 mov 0x50b3+0, #0x00 + 202 ; ../src/main.c: 62: PWR->CSR2 |= PWR_CSR2_ULP; + 00810F 72 12 50 B3 [ 1] 203 bset 0x50b3, #1 + 204 ; ../src/main.c: 63: PWR->CSR2 |= PWR_CSR2_FWU; + 008113 72 14 50 B3 [ 1] 205 bset 0x50b3, #2 + 206 ; ../src/main.c: 64: } + 008117 81 [ 4] 207 ret + 208 ; ../src/main.c: 66: static void CLK_Config(void) + 209 ; ----------------------------------------- + 210 ; function CLK_Config + 211 ; ----------------------------------------- + 008118 212 _CLK_Config: + 213 ; ../src/main.c: 68: CLK_SYSCLKSourceSwitchCmd(ENABLE); + 008118 A6 01 [ 1] 214 ld a, #0x01 + 00811A CD 82 A1 [ 4] 215 call _CLK_SYSCLKSourceSwitchCmd + 216 ; ../src/main.c: 69: CLK_SYSCLKSourceConfig(CLK_SYSCLKSource_LSI); + 00811D A6 02 [ 1] 217 ld a, #0x02 + 00811F CD 82 42 [ 4] 218 call _CLK_SYSCLKSourceConfig + 219 ; ../src/main.c: 70: CLK_SYSCLKDivConfig(CLK_SYSCLKDiv_1); + 008122 4F [ 1] 220 clr a + 008123 CD 82 9D [ 4] 221 call _CLK_SYSCLKDivConfig + 222 ; ../src/main.c: 71: while (CLK_GetSYSCLKSource() != CLK_SYSCLKSource_LSI); + 008126 223 00101$: + 008126 CD 82 46 [ 4] 224 call _CLK_GetSYSCLKSource + 008129 A1 02 [ 1] 225 cp a, #0x02 + 00812B 26 F9 [ 1] 226 jrne 00101$ + 00812D 81 [ 4] 227 ret + 00812E 20 F6 [ 2] 228 jra 00101$ + 229 ; ../src/main.c: 72: } + 008130 81 [ 4] 230 ret + 231 ; ../src/main.c: 85: static void blink2() { + 232 ; ----------------------------------------- + 233 ; function blink2 + 234 ; ----------------------------------------- + 008131 235 _blink2: + 236 ; ../src/main.c: 86: Mono_ON; + 008131 A6 01 [ 1] 237 ld a, #0x01 + 008133 AE 50 05 [ 2] 238 ldw x, #0x5005 + 008136 CD 85 53 [ 4] 239 call _GPIO_ResetBits + 240 ; ../src/main.c: 87: Led2_ON; + 008139 A6 04 [ 1] 241 ld a, #0x04 + 00813B AE 50 05 [ 2] 242 ldw x, #0x5005 + 00813E CD 85 4A [ 4] 243 call _GPIO_SetBits + 244 ; ../src/main.c: 88: Led2_OFF; + 008141 A6 04 [ 1] 245 ld a, #0x04 + 008143 AE 50 05 [ 2] 246 ldw x, #0x5005 + 008146 CD 85 53 [ 4] 247 call _GPIO_ResetBits + 248 ; ../src/main.c: 89: Mono_OFF; + 008149 A6 01 [ 1] 249 ld a, #0x01 + 00814B AE 50 05 [ 2] 250 ldw x, #0x5005 + 251 ; ../src/main.c: 90: } + 00814E CC 85 4A [ 2] 252 jp _GPIO_SetBits + 253 .area CODE + 254 .area CONST + 255 .area INITIALIZER + 256 .area CABS (ABS) diff --git a/firmware/STM8L15X_LD/main.sym b/firmware/STM8L15X_LD/main.sym index 0fc5fba..6053f2f 100644 --- a/firmware/STM8L15X_LD/main.sym +++ b/firmware/STM8L15X_LD/main.sym @@ -8,9 +8,10 @@ Symbol Table .__.CPU. = 000000 L .__.H$L. = 000001 L _ADC1_COMP_IRQHandler ****** GX - A _CLK_Config 00001B R + A _CLK_Config 00006A R _CLK_GetSYSCLKSource ****** GX _CLK_PeripheralClockConfig ****** GX + _CLK_RTCClockConfig ****** GX _CLK_SYSCLKDivConfig ****** GX _CLK_SYSCLKSourceConfig ****** GX _CLK_SYSCLKSourceSwitchCmd ****** GX @@ -33,7 +34,12 @@ Symbol Table _GPIO_SetBits ****** GX _I2C1_SPI2_IRQHandler ****** GX _LCD_AES_IRQHandler ****** GX + A _PWR_Config 000059 R _RTC_CSSLSE_IRQHandler ****** GX + _RTC_ITConfig ****** GX + _RTC_SetWakeUpCounter ****** GX + _RTC_WakeUpClockConfig ****** GX + _RTC_WakeUpCmd ****** GX _SPI1_IRQHandler ****** GX _SWITCH_CSS_BREAK_DAC_IRQHandler ****** GX _TIM1_CC_IRQHandler ****** GX @@ -46,25 +52,18 @@ Symbol Table _TRAP_IRQHandler ****** GX _USART1_RX_TIM5_CC_IRQHandler ****** GX _USART1_TX_TIM5_UPD_OVF_TRG_BRK_IRQHandler ****** GX - _USART_Cmd ****** GX - A _USART_Config 000098 R - _USART_Init ****** GX ___sdcc_external_startup ****** GX - 8 ___str_0 000000 R 5 __interrupt_vect 000000 R 6 __sdcc_init_data 000009 R 5 __sdcc_program_startup 000080 R 3 __start__stack 000000 R - A _blink 000034 R - A _main 000000 GR - A _print 000083 R + A _blink2 000083 R ASxxxx Assembler V02.00 + NoICE + SDCC mods (STMicroelectronics STM8) Page 2 Hexadecimal [24-Bits] Symbol Table - A _println 000090 R - A _putchar 000075 R + A _main 000000 GR l_DATA ****** GX l_INITIALIZER ****** GX s_DATA ****** GX @@ -72,6 +71,7 @@ Symbol Table s_INITIALIZED ****** GX s_INITIALIZER ****** GX + ASxxxx Assembler V02.00 + NoICE + SDCC mods (STMicroelectronics STM8) Page 3 Hexadecimal [24-Bits] @@ -85,8 +85,8 @@ Area Table 5 HOME size 83 flags 0 6 GSINIT size 23 flags 0 7 GSFINAL size 3 flags 0 - 8 CONST size 6 flags 0 + 8 CONST size 0 flags 0 9 INITIALIZER size 0 flags 0 - A CODE size DB flags 0 + A CODE size A3 flags 0 B CABS size 0 flags 8 diff --git a/firmware/STM8L15X_LD/stm8l15x_clk.rst b/firmware/STM8L15X_LD/stm8l15x_clk.rst index a23d252..965e609 100644 --- a/firmware/STM8L15X_LD/stm8l15x_clk.rst +++ b/firmware/STM8L15X_LD/stm8l15x_clk.rst @@ -75,749 +75,749 @@ 75 ; ----------------------------------------- 76 ; function CLK_DeInit 77 ; ----------------------------------------- - 008502 78 _CLK_DeInit: + 008176 78 _CLK_DeInit: 79 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 122: CLK->ICKCR = CLK_ICKCR_RESET_VALUE; - 008502 35 11 50 C2 [ 1] 80 mov 0x50c2+0, #0x11 + 008176 35 11 50 C2 [ 1] 80 mov 0x50c2+0, #0x11 81 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 123: CLK->ECKCR = CLK_ECKCR_RESET_VALUE; - 008506 35 00 50 C6 [ 1] 82 mov 0x50c6+0, #0x00 + 00817A 35 00 50 C6 [ 1] 82 mov 0x50c6+0, #0x00 83 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 124: CLK->CRTCR = CLK_CRTCR_RESET_VALUE; - 00850A 35 00 50 C1 [ 1] 84 mov 0x50c1+0, #0x00 + 00817E 35 00 50 C1 [ 1] 84 mov 0x50c1+0, #0x00 85 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 125: CLK->CBEEPR = CLK_CBEEPR_RESET_VALUE; - 00850E 35 00 50 CB [ 1] 86 mov 0x50cb+0, #0x00 + 008182 35 00 50 CB [ 1] 86 mov 0x50cb+0, #0x00 87 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 126: CLK->SWR = CLK_SWR_RESET_VALUE; - 008512 35 01 50 C8 [ 1] 88 mov 0x50c8+0, #0x01 + 008186 35 01 50 C8 [ 1] 88 mov 0x50c8+0, #0x01 89 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 127: CLK->SWCR = CLK_SWCR_RESET_VALUE; - 008516 35 00 50 C9 [ 1] 90 mov 0x50c9+0, #0x00 + 00818A 35 00 50 C9 [ 1] 90 mov 0x50c9+0, #0x00 91 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 128: CLK->CKDIVR = CLK_CKDIVR_RESET_VALUE; - 00851A 35 03 50 C0 [ 1] 92 mov 0x50c0+0, #0x03 + 00818E 35 03 50 C0 [ 1] 92 mov 0x50c0+0, #0x03 93 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 129: CLK->PCKENR1 = CLK_PCKENR1_RESET_VALUE; - 00851E 35 00 50 C3 [ 1] 94 mov 0x50c3+0, #0x00 + 008192 35 00 50 C3 [ 1] 94 mov 0x50c3+0, #0x00 95 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 130: CLK->PCKENR2 = CLK_PCKENR2_RESET_VALUE; - 008522 35 80 50 C4 [ 1] 96 mov 0x50c4+0, #0x80 + 008196 35 80 50 C4 [ 1] 96 mov 0x50c4+0, #0x80 97 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 131: CLK->PCKENR3 = CLK_PCKENR3_RESET_VALUE; - 008526 35 00 50 D0 [ 1] 98 mov 0x50d0+0, #0x00 + 00819A 35 00 50 D0 [ 1] 98 mov 0x50d0+0, #0x00 99 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 132: CLK->CSSR = CLK_CSSR_RESET_VALUE; - 00852A 35 00 50 CA [ 1] 100 mov 0x50ca+0, #0x00 + 00819E 35 00 50 CA [ 1] 100 mov 0x50ca+0, #0x00 101 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 133: CLK->CCOR = CLK_CCOR_RESET_VALUE; - 00852E 35 00 50 C5 [ 1] 102 mov 0x50c5+0, #0x00 + 0081A2 35 00 50 C5 [ 1] 102 mov 0x50c5+0, #0x00 103 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 134: CLK->HSITRIMR = CLK_HSITRIMR_RESET_VALUE; - 008532 35 00 50 CD [ 1] 104 mov 0x50cd+0, #0x00 + 0081A6 35 00 50 CD [ 1] 104 mov 0x50cd+0, #0x00 105 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 135: CLK->HSICALR = CLK_HSICALR_RESET_VALUE; - 008536 35 00 50 CC [ 1] 106 mov 0x50cc+0, #0x00 + 0081AA 35 00 50 CC [ 1] 106 mov 0x50cc+0, #0x00 107 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 136: CLK->HSIUNLCKR = CLK_HSIUNLCKR_RESET_VALUE; - 00853A 35 00 50 CE [ 1] 108 mov 0x50ce+0, #0x00 + 0081AE 35 00 50 CE [ 1] 108 mov 0x50ce+0, #0x00 109 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 137: CLK->REGCSR = CLK_REGCSR_RESET_VALUE; - 00853E 35 B9 50 CF [ 1] 110 mov 0x50cf+0, #0xb9 + 0081B2 35 B9 50 CF [ 1] 110 mov 0x50cf+0, #0xb9 111 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 138: } - 008542 81 [ 4] 112 ret + 0081B6 81 [ 4] 112 ret 113 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 160: void CLK_HSICmd(FunctionalState NewState) 114 ; ----------------------------------------- 115 ; function CLK_HSICmd 116 ; ----------------------------------------- - 008543 117 _CLK_HSICmd: - 008543 88 [ 1] 118 push a - 008544 6B 01 [ 1] 119 ld (0x01, sp), a + 0081B7 117 _CLK_HSICmd: + 0081B7 88 [ 1] 118 push a + 0081B8 6B 01 [ 1] 119 ld (0x01, sp), a 120 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 168: CLK->ICKCR |= CLK_ICKCR_HSION; - 008546 C6 50 C2 [ 1] 121 ld a, 0x50c2 + 0081BA C6 50 C2 [ 1] 121 ld a, 0x50c2 122 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 165: if (NewState != DISABLE) - 008549 0D 01 [ 1] 123 tnz (0x01, sp) - 00854B 27 07 [ 1] 124 jreq 00102$ + 0081BD 0D 01 [ 1] 123 tnz (0x01, sp) + 0081BF 27 07 [ 1] 124 jreq 00102$ 125 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 168: CLK->ICKCR |= CLK_ICKCR_HSION; - 00854D AA 01 [ 1] 126 or a, #0x01 - 00854F C7 50 C2 [ 1] 127 ld 0x50c2, a - 008552 20 05 [ 2] 128 jra 00104$ - 008554 129 00102$: + 0081C1 AA 01 [ 1] 126 or a, #0x01 + 0081C3 C7 50 C2 [ 1] 127 ld 0x50c2, a + 0081C6 20 05 [ 2] 128 jra 00104$ + 0081C8 129 00102$: 130 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 173: CLK->ICKCR &= (uint8_t)(~CLK_ICKCR_HSION); - 008554 A4 FE [ 1] 131 and a, #0xfe - 008556 C7 50 C2 [ 1] 132 ld 0x50c2, a - 008559 133 00104$: + 0081C8 A4 FE [ 1] 131 and a, #0xfe + 0081CA C7 50 C2 [ 1] 132 ld 0x50c2, a + 0081CD 133 00104$: 134 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 175: } - 008559 84 [ 1] 135 pop a - 00855A 81 [ 4] 136 ret + 0081CD 84 [ 1] 135 pop a + 0081CE 81 [ 4] 136 ret 137 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 188: void CLK_AdjustHSICalibrationValue(uint8_t CLK_HSICalibrationValue) 138 ; ----------------------------------------- 139 ; function CLK_AdjustHSICalibrationValue 140 ; ----------------------------------------- - 00855B 141 _CLK_AdjustHSICalibrationValue: + 0081CF 141 _CLK_AdjustHSICalibrationValue: 142 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 191: CLK->HSIUNLCKR = 0xAC; - 00855B 35 AC 50 CE [ 1] 143 mov 0x50ce+0, #0xac + 0081CF 35 AC 50 CE [ 1] 143 mov 0x50ce+0, #0xac 144 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 192: CLK->HSIUNLCKR = 0x35; - 00855F 35 35 50 CE [ 1] 145 mov 0x50ce+0, #0x35 + 0081D3 35 35 50 CE [ 1] 145 mov 0x50ce+0, #0x35 146 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 195: CLK->HSITRIMR = (uint8_t)CLK_HSICalibrationValue; - 008563 C7 50 CD [ 1] 147 ld 0x50cd, a + 0081D7 C7 50 CD [ 1] 147 ld 0x50cd, a 148 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 196: } - 008566 81 [ 4] 149 ret + 0081DA 81 [ 4] 149 ret 150 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 212: void CLK_LSICmd(FunctionalState NewState) 151 ; ----------------------------------------- 152 ; function CLK_LSICmd 153 ; ----------------------------------------- - 008567 154 _CLK_LSICmd: - 008567 88 [ 1] 155 push a - 008568 6B 01 [ 1] 156 ld (0x01, sp), a + 0081DB 154 _CLK_LSICmd: + 0081DB 88 [ 1] 155 push a + 0081DC 6B 01 [ 1] 156 ld (0x01, sp), a 157 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 221: CLK->ICKCR |= CLK_ICKCR_LSION; - 00856A C6 50 C2 [ 1] 158 ld a, 0x50c2 + 0081DE C6 50 C2 [ 1] 158 ld a, 0x50c2 159 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 218: if (NewState != DISABLE) - 00856D 0D 01 [ 1] 160 tnz (0x01, sp) - 00856F 27 07 [ 1] 161 jreq 00102$ + 0081E1 0D 01 [ 1] 160 tnz (0x01, sp) + 0081E3 27 07 [ 1] 161 jreq 00102$ 162 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 221: CLK->ICKCR |= CLK_ICKCR_LSION; - 008571 AA 04 [ 1] 163 or a, #0x04 - 008573 C7 50 C2 [ 1] 164 ld 0x50c2, a - 008576 20 05 [ 2] 165 jra 00104$ - 008578 166 00102$: + 0081E5 AA 04 [ 1] 163 or a, #0x04 + 0081E7 C7 50 C2 [ 1] 164 ld 0x50c2, a + 0081EA 20 05 [ 2] 165 jra 00104$ + 0081EC 166 00102$: 167 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 226: CLK->ICKCR &= (uint8_t)(~CLK_ICKCR_LSION); - 008578 A4 FB [ 1] 168 and a, #0xfb - 00857A C7 50 C2 [ 1] 169 ld 0x50c2, a - 00857D 170 00104$: + 0081EC A4 FB [ 1] 168 and a, #0xfb + 0081EE C7 50 C2 [ 1] 169 ld 0x50c2, a + 0081F1 170 00104$: 171 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 228: } - 00857D 84 [ 1] 172 pop a - 00857E 81 [ 4] 173 ret + 0081F1 84 [ 1] 172 pop a + 0081F2 81 [ 4] 173 ret 174 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 249: void CLK_HSEConfig(CLK_HSE_TypeDef CLK_HSE) 175 ; ----------------------------------------- 176 ; function CLK_HSEConfig 177 ; ----------------------------------------- - 00857F 178 _CLK_HSEConfig: - 00857F 88 [ 1] 179 push a - 008580 6B 01 [ 1] 180 ld (0x01, sp), a + 0081F3 178 _CLK_HSEConfig: + 0081F3 88 [ 1] 179 push a + 0081F4 6B 01 [ 1] 180 ld (0x01, sp), a 181 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 256: CLK->ECKCR &= (uint8_t)~CLK_ECKCR_HSEON; - 008582 72 11 50 C6 [ 1] 182 bres 0x50c6, #0 + 0081F6 72 11 50 C6 [ 1] 182 bres 0x50c6, #0 183 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 259: CLK->ECKCR &= (uint8_t)~CLK_ECKCR_HSEBYP; - 008586 72 19 50 C6 [ 1] 184 bres 0x50c6, #4 + 0081FA 72 19 50 C6 [ 1] 184 bres 0x50c6, #4 185 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 262: CLK->ECKCR |= (uint8_t)CLK_HSE; - 00858A C6 50 C6 [ 1] 186 ld a, 0x50c6 - 00858D 1A 01 [ 1] 187 or a, (0x01, sp) - 00858F C7 50 C6 [ 1] 188 ld 0x50c6, a + 0081FE C6 50 C6 [ 1] 186 ld a, 0x50c6 + 008201 1A 01 [ 1] 187 or a, (0x01, sp) + 008203 C7 50 C6 [ 1] 188 ld 0x50c6, a 189 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 263: } - 008592 84 [ 1] 190 pop a - 008593 81 [ 4] 191 ret + 008206 84 [ 1] 190 pop a + 008207 81 [ 4] 191 ret 192 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 280: void CLK_LSEConfig(CLK_LSE_TypeDef CLK_LSE) 193 ; ----------------------------------------- 194 ; function CLK_LSEConfig 195 ; ----------------------------------------- - 008594 196 _CLK_LSEConfig: - 008594 88 [ 1] 197 push a - 008595 6B 01 [ 1] 198 ld (0x01, sp), a + 008208 196 _CLK_LSEConfig: + 008208 88 [ 1] 197 push a + 008209 6B 01 [ 1] 198 ld (0x01, sp), a 199 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 287: CLK->ECKCR &= (uint8_t)~CLK_ECKCR_LSEON; - 008597 72 15 50 C6 [ 1] 200 bres 0x50c6, #2 + 00820B 72 15 50 C6 [ 1] 200 bres 0x50c6, #2 201 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 290: CLK->ECKCR &= (uint8_t)~CLK_ECKCR_LSEBYP; - 00859B 72 1B 50 C6 [ 1] 202 bres 0x50c6, #5 + 00820F 72 1B 50 C6 [ 1] 202 bres 0x50c6, #5 203 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 293: CLK->ECKCR |= (uint8_t)CLK_LSE; - 00859F C6 50 C6 [ 1] 204 ld a, 0x50c6 - 0085A2 1A 01 [ 1] 205 or a, (0x01, sp) - 0085A4 C7 50 C6 [ 1] 206 ld 0x50c6, a + 008213 C6 50 C6 [ 1] 204 ld a, 0x50c6 + 008216 1A 01 [ 1] 205 or a, (0x01, sp) + 008218 C7 50 C6 [ 1] 206 ld 0x50c6, a 207 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 295: } - 0085A7 84 [ 1] 208 pop a - 0085A8 81 [ 4] 209 ret + 00821B 84 [ 1] 208 pop a + 00821C 81 [ 4] 209 ret 210 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 306: void CLK_ClockSecuritySystemEnable(void) 211 ; ----------------------------------------- 212 ; function CLK_ClockSecuritySystemEnable 213 ; ----------------------------------------- - 0085A9 214 _CLK_ClockSecuritySystemEnable: + 00821D 214 _CLK_ClockSecuritySystemEnable: 215 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 309: CLK->CSSR |= CLK_CSSR_CSSEN; - 0085A9 72 10 50 CA [ 1] 216 bset 0x50ca, #0 + 00821D 72 10 50 CA [ 1] 216 bset 0x50ca, #0 217 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 310: } - 0085AD 81 [ 4] 218 ret + 008221 81 [ 4] 218 ret 219 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 317: void CLK_ClockSecuritySytemDeglitchCmd(FunctionalState NewState) 220 ; ----------------------------------------- 221 ; function CLK_ClockSecuritySytemDeglitchCmd 222 ; ----------------------------------------- - 0085AE 223 _CLK_ClockSecuritySytemDeglitchCmd: - 0085AE 88 [ 1] 224 push a - 0085AF 6B 01 [ 1] 225 ld (0x01, sp), a + 008222 223 _CLK_ClockSecuritySytemDeglitchCmd: + 008222 88 [ 1] 224 push a + 008223 6B 01 [ 1] 225 ld (0x01, sp), a 226 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 325: CLK->CSSR |= CLK_CSSR_CSSDGON; - 0085B1 C6 50 CA [ 1] 227 ld a, 0x50ca + 008225 C6 50 CA [ 1] 227 ld a, 0x50ca 228 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 322: if (NewState != DISABLE) - 0085B4 0D 01 [ 1] 229 tnz (0x01, sp) - 0085B6 27 07 [ 1] 230 jreq 00102$ + 008228 0D 01 [ 1] 229 tnz (0x01, sp) + 00822A 27 07 [ 1] 230 jreq 00102$ 231 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 325: CLK->CSSR |= CLK_CSSR_CSSDGON; - 0085B8 AA 10 [ 1] 232 or a, #0x10 - 0085BA C7 50 CA [ 1] 233 ld 0x50ca, a - 0085BD 20 05 [ 2] 234 jra 00104$ - 0085BF 235 00102$: + 00822C AA 10 [ 1] 232 or a, #0x10 + 00822E C7 50 CA [ 1] 233 ld 0x50ca, a + 008231 20 05 [ 2] 234 jra 00104$ + 008233 235 00102$: 236 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 330: CLK->CSSR &= (uint8_t)(~CLK_CSSR_CSSDGON); - 0085BF A4 EF [ 1] 237 and a, #0xef - 0085C1 C7 50 CA [ 1] 238 ld 0x50ca, a - 0085C4 239 00104$: + 008233 A4 EF [ 1] 237 and a, #0xef + 008235 C7 50 CA [ 1] 238 ld 0x50ca, a + 008238 239 00104$: 240 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 332: } - 0085C4 84 [ 1] 241 pop a - 0085C5 81 [ 4] 242 ret + 008238 84 [ 1] 241 pop a + 008239 81 [ 4] 242 ret 243 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 356: void CLK_CCOConfig(CLK_CCOSource_TypeDef CLK_CCOSource, CLK_CCODiv_TypeDef CLK_CCODiv) 244 ; ----------------------------------------- 245 ; function CLK_CCOConfig 246 ; ----------------------------------------- - 0085C6 247 _CLK_CCOConfig: + 00823A 247 _CLK_CCOConfig: 248 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 363: CLK->CCOR = (uint8_t)((uint8_t)CLK_CCOSource | (uint8_t)CLK_CCODiv); - 0085C6 1A 03 [ 1] 249 or a, (0x03, sp) - 0085C8 C7 50 C5 [ 1] 250 ld 0x50c5, a + 00823A 1A 03 [ 1] 249 or a, (0x03, sp) + 00823C C7 50 C5 [ 1] 250 ld 0x50c5, a 251 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 364: } - 0085CB 85 [ 2] 252 popw x - 0085CC 84 [ 1] 253 pop a - 0085CD FC [ 2] 254 jp (x) + 00823F 85 [ 2] 252 popw x + 008240 84 [ 1] 253 pop a + 008241 FC [ 2] 254 jp (x) 255 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 416: void CLK_SYSCLKSourceConfig(CLK_SYSCLKSource_TypeDef CLK_SYSCLKSource) 256 ; ----------------------------------------- 257 ; function CLK_SYSCLKSourceConfig 258 ; ----------------------------------------- - 0085CE 259 _CLK_SYSCLKSourceConfig: + 008242 259 _CLK_SYSCLKSourceConfig: 260 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 422: CLK->SWR = (uint8_t)CLK_SYSCLKSource; - 0085CE C7 50 C8 [ 1] 261 ld 0x50c8, a + 008242 C7 50 C8 [ 1] 261 ld 0x50c8, a 262 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 423: } - 0085D1 81 [ 4] 263 ret + 008245 81 [ 4] 263 ret 264 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 435: CLK_SYSCLKSource_TypeDef CLK_GetSYSCLKSource(void) 265 ; ----------------------------------------- 266 ; function CLK_GetSYSCLKSource 267 ; ----------------------------------------- - 0085D2 268 _CLK_GetSYSCLKSource: + 008246 268 _CLK_GetSYSCLKSource: 269 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 437: return ((CLK_SYSCLKSource_TypeDef)(CLK->SCSR)); - 0085D2 C6 50 C7 [ 1] 270 ld a, 0x50c7 + 008246 C6 50 C7 [ 1] 270 ld a, 0x50c7 271 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 438: } - 0085D5 81 [ 4] 272 ret + 008249 81 [ 4] 272 ret 273 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 478: uint32_t CLK_GetClockFreq(void) 274 ; ----------------------------------------- 275 ; function CLK_GetClockFreq 276 ; ----------------------------------------- - 0085D6 277 _CLK_GetClockFreq: - 0085D6 52 08 [ 2] 278 sub sp, #8 + 00824A 277 _CLK_GetClockFreq: + 00824A 52 08 [ 2] 278 sub sp, #8 279 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 481: uint32_t sourcefrequency = 0; - 0085D8 5F [ 1] 280 clrw x - 0085D9 1F 03 [ 2] 281 ldw (0x03, sp), x - 0085DB 1F 01 [ 2] 282 ldw (0x01, sp), x + 00824C 5F [ 1] 280 clrw x + 00824D 1F 03 [ 2] 281 ldw (0x03, sp), x + 00824F 1F 01 [ 2] 282 ldw (0x01, sp), x 283 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 486: clocksource = (CLK_SYSCLKSource_TypeDef)CLK->SCSR; - 0085DD C6 50 C7 [ 1] 284 ld a, 0x50c7 + 008251 C6 50 C7 [ 1] 284 ld a, 0x50c7 285 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 488: if ( clocksource == CLK_SYSCLKSource_HSI) - 0085E0 A1 01 [ 1] 286 cp a, #0x01 - 0085E2 26 0C [ 1] 287 jrne 00108$ + 008254 A1 01 [ 1] 286 cp a, #0x01 + 008256 26 0C [ 1] 287 jrne 00108$ 288 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 490: sourcefrequency = HSI_VALUE; - 0085E4 AE 24 00 [ 2] 289 ldw x, #0x2400 - 0085E7 1F 03 [ 2] 290 ldw (0x03, sp), x - 0085E9 AE 00 F4 [ 2] 291 ldw x, #0x00f4 - 0085EC 1F 01 [ 2] 292 ldw (0x01, sp), x - 0085EE 20 1C [ 2] 293 jra 00109$ - 0085F0 294 00108$: + 008258 AE 24 00 [ 2] 289 ldw x, #0x2400 + 00825B 1F 03 [ 2] 290 ldw (0x03, sp), x + 00825D AE 00 F4 [ 2] 291 ldw x, #0x00f4 + 008260 1F 01 [ 2] 292 ldw (0x01, sp), x + 008262 20 1C [ 2] 293 jra 00109$ + 008264 294 00108$: 295 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 492: else if ( clocksource == CLK_SYSCLKSource_LSI) - 0085F0 A1 02 [ 1] 296 cp a, #0x02 - 0085F2 26 0A [ 1] 297 jrne 00105$ + 008264 A1 02 [ 1] 296 cp a, #0x02 + 008266 26 0A [ 1] 297 jrne 00105$ 298 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 494: sourcefrequency = LSI_VALUE; - 0085F4 AE 94 70 [ 2] 299 ldw x, #0x9470 - 0085F7 1F 03 [ 2] 300 ldw (0x03, sp), x - 0085F9 5F [ 1] 301 clrw x - 0085FA 1F 01 [ 2] 302 ldw (0x01, sp), x - 0085FC 20 0E [ 2] 303 jra 00109$ - 0085FE 304 00105$: + 008268 AE 94 70 [ 2] 299 ldw x, #0x9470 + 00826B 1F 03 [ 2] 300 ldw (0x03, sp), x + 00826D 5F [ 1] 301 clrw x + 00826E 1F 01 [ 2] 302 ldw (0x01, sp), x + 008270 20 0E [ 2] 303 jra 00109$ + 008272 304 00105$: 305 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 496: else if ( clocksource == CLK_SYSCLKSource_HSE) - 0085FE A1 04 [ 1] 306 cp a, #0x04 - 008600 26 0A [ 1] 307 jrne 00109$ + 008272 A1 04 [ 1] 306 cp a, #0x04 + 008274 26 0A [ 1] 307 jrne 00109$ 308 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 498: sourcefrequency = HSE_VALUE; - 008602 AE 24 00 [ 2] 309 ldw x, #0x2400 - 008605 1F 03 [ 2] 310 ldw (0x03, sp), x - 008607 AE 00 F4 [ 2] 311 ldw x, #0x00f4 - 00860A 1F 01 [ 2] 312 ldw (0x01, sp), x + 008276 AE 24 00 [ 2] 309 ldw x, #0x2400 + 008279 1F 03 [ 2] 310 ldw (0x03, sp), x + 00827B AE 00 F4 [ 2] 311 ldw x, #0x00f4 + 00827E 1F 01 [ 2] 312 ldw (0x01, sp), x 313 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 502: clockfrequency = LSE_VALUE; - 00860C 314 00109$: + 008280 314 00109$: 315 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 506: tmp = (uint8_t)(CLK->CKDIVR & CLK_CKDIVR_CKM); - 00860C C6 50 C0 [ 1] 316 ld a, 0x50c0 - 00860F A4 07 [ 1] 317 and a, #0x07 + 008280 C6 50 C0 [ 1] 316 ld a, 0x50c0 + 008283 A4 07 [ 1] 317 and a, #0x07 318 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 507: presc = SYSDivFactor[tmp]; - 008611 5F [ 1] 319 clrw x - 008612 97 [ 1] 320 ld xl, a - 008613 D6 80 AF [ 1] 321 ld a, (_SYSDivFactor+0, x) + 008285 5F [ 1] 319 clrw x + 008286 97 [ 1] 320 ld xl, a + 008287 D6 80 A9 [ 1] 321 ld a, (_SYSDivFactor+0, x) 322 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 510: clockfrequency = sourcefrequency / presc; - 008616 5F [ 1] 323 clrw x - 008617 0F 05 [ 1] 324 clr (0x05, sp) - 008619 88 [ 1] 325 push a - 00861A 89 [ 2] 326 pushw x - 00861B 4F [ 1] 327 clr a - 00861C 88 [ 1] 328 push a - 00861D 1E 07 [ 2] 329 ldw x, (0x07, sp) - 00861F 89 [ 2] 330 pushw x - 008620 1E 07 [ 2] 331 ldw x, (0x07, sp) - 008622 89 [ 2] 332 pushw x + 00828A 5F [ 1] 323 clrw x + 00828B 0F 05 [ 1] 324 clr (0x05, sp) + 00828D 88 [ 1] 325 push a + 00828E 89 [ 2] 326 pushw x + 00828F 4F [ 1] 327 clr a + 008290 88 [ 1] 328 push a + 008291 1E 07 [ 2] 329 ldw x, (0x07, sp) + 008293 89 [ 2] 330 pushw x + 008294 1E 07 [ 2] 331 ldw x, (0x07, sp) + 008296 89 [ 2] 332 pushw x 333 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 512: return((uint32_t)clockfrequency); - 008623 CD 92 5C [ 4] 334 call __divulong + 008297 CD 8E D0 [ 4] 334 call __divulong 335 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 513: } - 008626 5B 10 [ 2] 336 addw sp, #16 - 008628 81 [ 4] 337 ret + 00829A 5B 10 [ 2] 336 addw sp, #16 + 00829C 81 [ 4] 337 ret 338 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 528: void CLK_SYSCLKDivConfig(CLK_SYSCLKDiv_TypeDef CLK_SYSCLKDiv) 339 ; ----------------------------------------- 340 ; function CLK_SYSCLKDivConfig 341 ; ----------------------------------------- - 008629 342 _CLK_SYSCLKDivConfig: + 00829D 342 _CLK_SYSCLKDivConfig: 343 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 533: CLK->CKDIVR = (uint8_t)(CLK_SYSCLKDiv); - 008629 C7 50 C0 [ 1] 344 ld 0x50c0, a + 00829D C7 50 C0 [ 1] 344 ld 0x50c0, a 345 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 534: } - 00862C 81 [ 4] 346 ret + 0082A0 81 [ 4] 346 ret 347 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 541: void CLK_SYSCLKSourceSwitchCmd(FunctionalState NewState) 348 ; ----------------------------------------- 349 ; function CLK_SYSCLKSourceSwitchCmd 350 ; ----------------------------------------- - 00862D 351 _CLK_SYSCLKSourceSwitchCmd: - 00862D 88 [ 1] 352 push a - 00862E 6B 01 [ 1] 353 ld (0x01, sp), a + 0082A1 351 _CLK_SYSCLKSourceSwitchCmd: + 0082A1 88 [ 1] 352 push a + 0082A2 6B 01 [ 1] 353 ld (0x01, sp), a 354 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 549: CLK->SWCR |= CLK_SWCR_SWEN; - 008630 C6 50 C9 [ 1] 355 ld a, 0x50c9 + 0082A4 C6 50 C9 [ 1] 355 ld a, 0x50c9 356 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 546: if (NewState != DISABLE) - 008633 0D 01 [ 1] 357 tnz (0x01, sp) - 008635 27 07 [ 1] 358 jreq 00102$ + 0082A7 0D 01 [ 1] 357 tnz (0x01, sp) + 0082A9 27 07 [ 1] 358 jreq 00102$ 359 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 549: CLK->SWCR |= CLK_SWCR_SWEN; - 008637 AA 02 [ 1] 360 or a, #0x02 - 008639 C7 50 C9 [ 1] 361 ld 0x50c9, a - 00863C 20 05 [ 2] 362 jra 00104$ - 00863E 363 00102$: + 0082AB AA 02 [ 1] 360 or a, #0x02 + 0082AD C7 50 C9 [ 1] 361 ld 0x50c9, a + 0082B0 20 05 [ 2] 362 jra 00104$ + 0082B2 363 00102$: 364 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 554: CLK->SWCR &= (uint8_t)(~CLK_SWCR_SWEN); - 00863E A4 FD [ 1] 365 and a, #0xfd - 008640 C7 50 C9 [ 1] 366 ld 0x50c9, a - 008643 367 00104$: + 0082B2 A4 FD [ 1] 365 and a, #0xfd + 0082B4 C7 50 C9 [ 1] 366 ld 0x50c9, a + 0082B7 367 00104$: 368 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 556: } - 008643 84 [ 1] 369 pop a - 008644 81 [ 4] 370 ret + 0082B7 84 [ 1] 369 pop a + 0082B8 81 [ 4] 370 ret 371 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 616: void CLK_RTCClockConfig(CLK_RTCCLKSource_TypeDef CLK_RTCCLKSource, CLK_RTCCLKDiv_TypeDef CLK_RTCCLKDiv) 372 ; ----------------------------------------- 373 ; function CLK_RTCClockConfig 374 ; ----------------------------------------- - 008645 375 _CLK_RTCClockConfig: + 0082B9 375 _CLK_RTCClockConfig: 376 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 623: CLK->CRTCR = (uint8_t)((uint8_t)CLK_RTCCLKSource | (uint8_t)CLK_RTCCLKDiv); - 008645 1A 03 [ 1] 377 or a, (0x03, sp) - 008647 C7 50 C1 [ 1] 378 ld 0x50c1, a + 0082B9 1A 03 [ 1] 377 or a, (0x03, sp) + 0082BB C7 50 C1 [ 1] 378 ld 0x50c1, a 379 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 624: } - 00864A 85 [ 2] 380 popw x - 00864B 84 [ 1] 381 pop a - 00864C FC [ 2] 382 jp (x) + 0082BE 85 [ 2] 380 popw x + 0082BF 84 [ 1] 381 pop a + 0082C0 FC [ 2] 382 jp (x) 383 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 635: void CLK_BEEPClockConfig(CLK_BEEPCLKSource_TypeDef CLK_BEEPCLKSource) 384 ; ----------------------------------------- 385 ; function CLK_BEEPClockConfig 386 ; ----------------------------------------- - 00864D 387 _CLK_BEEPClockConfig: + 0082C1 387 _CLK_BEEPClockConfig: 388 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 641: CLK->CBEEPR = (uint8_t)(CLK_BEEPCLKSource); - 00864D C7 50 CB [ 1] 389 ld 0x50cb, a + 0082C1 C7 50 CB [ 1] 389 ld 0x50cb, a 390 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 643: } - 008650 81 [ 4] 391 ret + 0082C4 81 [ 4] 391 ret 392 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 677: void CLK_PeripheralClockConfig(CLK_Peripheral_TypeDef CLK_Peripheral, FunctionalState NewState) 393 ; ----------------------------------------- 394 ; function CLK_PeripheralClockConfig 395 ; ----------------------------------------- - 008651 396 _CLK_PeripheralClockConfig: - 008651 89 [ 2] 397 pushw x + 0082C5 396 _CLK_PeripheralClockConfig: + 0082C5 89 [ 2] 397 pushw x 398 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 686: reg = (uint8_t)((uint8_t)CLK_Peripheral & (uint8_t)0xF0); - 008652 88 [ 1] 399 push a - 008653 A4 F0 [ 1] 400 and a, #0xf0 - 008655 97 [ 1] 401 ld xl, a - 008656 84 [ 1] 402 pop a - 008657 90 93 [ 1] 403 ldw y, x + 0082C6 88 [ 1] 399 push a + 0082C7 A4 F0 [ 1] 400 and a, #0xf0 + 0082C9 97 [ 1] 401 ld xl, a + 0082CA 84 [ 1] 402 pop a + 0082CB 90 93 [ 1] 403 ldw y, x 404 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 693: CLK->PCKENR1 |= (uint8_t)((uint8_t)1 << ((uint8_t)CLK_Peripheral & (uint8_t)0x0F)); - 008659 A4 0F [ 1] 405 and a, #0x0f - 00865B 88 [ 1] 406 push a - 00865C A6 01 [ 1] 407 ld a, #0x01 - 00865E 6B 02 [ 1] 408 ld (0x02, sp), a - 008660 84 [ 1] 409 pop a - 008661 4D [ 1] 410 tnz a - 008662 27 05 [ 1] 411 jreq 00154$ - 008664 412 00153$: - 008664 08 01 [ 1] 413 sll (0x01, sp) - 008666 4A [ 1] 414 dec a - 008667 26 FB [ 1] 415 jrne 00153$ - 008669 416 00154$: + 0082CD A4 0F [ 1] 405 and a, #0x0f + 0082CF 88 [ 1] 406 push a + 0082D0 A6 01 [ 1] 407 ld a, #0x01 + 0082D2 6B 02 [ 1] 408 ld (0x02, sp), a + 0082D4 84 [ 1] 409 pop a + 0082D5 4D [ 1] 410 tnz a + 0082D6 27 05 [ 1] 411 jreq 00154$ + 0082D8 412 00153$: + 0082D8 08 01 [ 1] 413 sll (0x01, sp) + 0082DA 4A [ 1] 414 dec a + 0082DB 26 FB [ 1] 415 jrne 00153$ + 0082DD 416 00154$: 417 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 698: CLK->PCKENR1 &= (uint8_t)(~(uint8_t)(((uint8_t)1 << ((uint8_t)CLK_Peripheral & (uint8_t)0x0F)))); - 008669 7B 01 [ 1] 418 ld a, (0x01, sp) - 00866B 43 [ 1] 419 cpl a - 00866C 6B 02 [ 1] 420 ld (0x02, sp), a + 0082DD 7B 01 [ 1] 418 ld a, (0x01, sp) + 0082DF 43 [ 1] 419 cpl a + 0082E0 6B 02 [ 1] 420 ld (0x02, sp), a 421 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 688: if ( reg == 0x00) - 00866E 9F [ 1] 422 ld a, xl - 00866F 4D [ 1] 423 tnz a - 008670 26 15 [ 1] 424 jrne 00114$ + 0082E2 9F [ 1] 422 ld a, xl + 0082E3 4D [ 1] 423 tnz a + 0082E4 26 15 [ 1] 424 jrne 00114$ 425 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 693: CLK->PCKENR1 |= (uint8_t)((uint8_t)1 << ((uint8_t)CLK_Peripheral & (uint8_t)0x0F)); - 008672 C6 50 C3 [ 1] 426 ld a, 0x50c3 + 0082E6 C6 50 C3 [ 1] 426 ld a, 0x50c3 427 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 690: if (NewState != DISABLE) - 008675 0D 05 [ 1] 428 tnz (0x05, sp) - 008677 27 07 [ 1] 429 jreq 00102$ + 0082E9 0D 05 [ 1] 428 tnz (0x05, sp) + 0082EB 27 07 [ 1] 429 jreq 00102$ 430 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 693: CLK->PCKENR1 |= (uint8_t)((uint8_t)1 << ((uint8_t)CLK_Peripheral & (uint8_t)0x0F)); - 008679 1A 01 [ 1] 431 or a, (0x01, sp) - 00867B C7 50 C3 [ 1] 432 ld 0x50c3, a - 00867E 20 35 [ 2] 433 jra 00116$ - 008680 434 00102$: + 0082ED 1A 01 [ 1] 431 or a, (0x01, sp) + 0082EF C7 50 C3 [ 1] 432 ld 0x50c3, a + 0082F2 20 35 [ 2] 433 jra 00116$ + 0082F4 434 00102$: 435 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 698: CLK->PCKENR1 &= (uint8_t)(~(uint8_t)(((uint8_t)1 << ((uint8_t)CLK_Peripheral & (uint8_t)0x0F)))); - 008680 14 02 [ 1] 436 and a, (0x02, sp) - 008682 C7 50 C3 [ 1] 437 ld 0x50c3, a - 008685 20 2E [ 2] 438 jra 00116$ - 008687 439 00114$: + 0082F4 14 02 [ 1] 436 and a, (0x02, sp) + 0082F6 C7 50 C3 [ 1] 437 ld 0x50c3, a + 0082F9 20 2E [ 2] 438 jra 00116$ + 0082FB 439 00114$: 440 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 701: else if (reg == 0x10) - 008687 90 9F [ 1] 441 ld a, yl - 008689 A1 10 [ 1] 442 cp a, #0x10 - 00868B 26 15 [ 1] 443 jrne 00111$ + 0082FB 90 9F [ 1] 441 ld a, yl + 0082FD A1 10 [ 1] 442 cp a, #0x10 + 0082FF 26 15 [ 1] 443 jrne 00111$ 444 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 706: CLK->PCKENR2 |= (uint8_t)((uint8_t)1 << ((uint8_t)CLK_Peripheral & (uint8_t)0x0F)); - 00868D C6 50 C4 [ 1] 445 ld a, 0x50c4 + 008301 C6 50 C4 [ 1] 445 ld a, 0x50c4 446 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 703: if (NewState != DISABLE) - 008690 0D 05 [ 1] 447 tnz (0x05, sp) - 008692 27 07 [ 1] 448 jreq 00105$ + 008304 0D 05 [ 1] 447 tnz (0x05, sp) + 008306 27 07 [ 1] 448 jreq 00105$ 449 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 706: CLK->PCKENR2 |= (uint8_t)((uint8_t)1 << ((uint8_t)CLK_Peripheral & (uint8_t)0x0F)); - 008694 1A 01 [ 1] 450 or a, (0x01, sp) - 008696 C7 50 C4 [ 1] 451 ld 0x50c4, a - 008699 20 1A [ 2] 452 jra 00116$ - 00869B 453 00105$: + 008308 1A 01 [ 1] 450 or a, (0x01, sp) + 00830A C7 50 C4 [ 1] 451 ld 0x50c4, a + 00830D 20 1A [ 2] 452 jra 00116$ + 00830F 453 00105$: 454 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 711: CLK->PCKENR2 &= (uint8_t)(~(uint8_t)(((uint8_t)1 << ((uint8_t)CLK_Peripheral & (uint8_t)0x0F)))); - 00869B 14 02 [ 1] 455 and a, (0x02, sp) - 00869D C7 50 C4 [ 1] 456 ld 0x50c4, a - 0086A0 20 13 [ 2] 457 jra 00116$ - 0086A2 458 00111$: + 00830F 14 02 [ 1] 455 and a, (0x02, sp) + 008311 C7 50 C4 [ 1] 456 ld 0x50c4, a + 008314 20 13 [ 2] 457 jra 00116$ + 008316 458 00111$: 459 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 719: CLK->PCKENR3 |= (uint8_t)((uint8_t)1 << ((uint8_t)CLK_Peripheral & (uint8_t)0x0F)); - 0086A2 C6 50 D0 [ 1] 460 ld a, 0x50d0 + 008316 C6 50 D0 [ 1] 460 ld a, 0x50d0 461 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 716: if (NewState != DISABLE) - 0086A5 0D 05 [ 1] 462 tnz (0x05, sp) - 0086A7 27 07 [ 1] 463 jreq 00108$ + 008319 0D 05 [ 1] 462 tnz (0x05, sp) + 00831B 27 07 [ 1] 463 jreq 00108$ 464 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 719: CLK->PCKENR3 |= (uint8_t)((uint8_t)1 << ((uint8_t)CLK_Peripheral & (uint8_t)0x0F)); - 0086A9 1A 01 [ 1] 465 or a, (0x01, sp) - 0086AB C7 50 D0 [ 1] 466 ld 0x50d0, a - 0086AE 20 05 [ 2] 467 jra 00116$ - 0086B0 468 00108$: + 00831D 1A 01 [ 1] 465 or a, (0x01, sp) + 00831F C7 50 D0 [ 1] 466 ld 0x50d0, a + 008322 20 05 [ 2] 467 jra 00116$ + 008324 468 00108$: 469 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 724: CLK->PCKENR3 &= (uint8_t)(~(uint8_t)(((uint8_t)1 << ((uint8_t)CLK_Peripheral & (uint8_t)0x0F)))); - 0086B0 14 02 [ 1] 470 and a, (0x02, sp) - 0086B2 C7 50 D0 [ 1] 471 ld 0x50d0, a - 0086B5 472 00116$: + 008324 14 02 [ 1] 470 and a, (0x02, sp) + 008326 C7 50 D0 [ 1] 471 ld 0x50d0, a + 008329 472 00116$: 473 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 727: } - 0086B5 85 [ 2] 474 popw x - 0086B6 85 [ 2] 475 popw x - 0086B7 84 [ 1] 476 pop a - 0086B8 FC [ 2] 477 jp (x) + 008329 85 [ 2] 474 popw x + 00832A 85 [ 2] 475 popw x + 00832B 84 [ 1] 476 pop a + 00832C FC [ 2] 477 jp (x) 478 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 765: void CLK_LSEClockSecuritySystemEnable(void) 479 ; ----------------------------------------- 480 ; function CLK_LSEClockSecuritySystemEnable 481 ; ----------------------------------------- - 0086B9 482 _CLK_LSEClockSecuritySystemEnable: + 00832D 482 _CLK_LSEClockSecuritySystemEnable: 483 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 768: CSSLSE->CSR |= CSSLSE_CSR_CSSEN; - 0086B9 72 10 51 90 [ 1] 484 bset 0x5190, #0 + 00832D 72 10 51 90 [ 1] 484 bset 0x5190, #0 485 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 769: } - 0086BD 81 [ 4] 486 ret + 008331 81 [ 4] 486 ret 487 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 777: void CLK_RTCCLKSwitchOnLSEFailureEnable(void) 488 ; ----------------------------------------- 489 ; function CLK_RTCCLKSwitchOnLSEFailureEnable 490 ; ----------------------------------------- - 0086BE 491 _CLK_RTCCLKSwitchOnLSEFailureEnable: + 008332 491 _CLK_RTCCLKSwitchOnLSEFailureEnable: 492 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 780: CSSLSE->CSR |= CSSLSE_CSR_SWITCHEN; - 0086BE 72 12 51 90 [ 1] 493 bset 0x5190, #1 + 008332 72 12 51 90 [ 1] 493 bset 0x5190, #1 494 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 781: } - 0086C2 81 [ 4] 495 ret + 008336 81 [ 4] 495 ret 496 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 807: void CLK_HaltConfig(CLK_Halt_TypeDef CLK_Halt, FunctionalState NewState) 497 ; ----------------------------------------- 498 ; function CLK_HaltConfig 499 ; ----------------------------------------- - 0086C3 500 _CLK_HaltConfig: - 0086C3 88 [ 1] 501 push a + 008337 500 _CLK_HaltConfig: + 008337 88 [ 1] 501 push a 502 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 815: CLK->ICKCR |= (uint8_t)(CLK_Halt); - 0086C4 AE 50 C2 [ 2] 503 ldw x, #0x50c2 - 0086C7 88 [ 1] 504 push a - 0086C8 F6 [ 1] 505 ld a, (x) - 0086C9 6B 02 [ 1] 506 ld (0x02, sp), a - 0086CB 84 [ 1] 507 pop a + 008338 AE 50 C2 [ 2] 503 ldw x, #0x50c2 + 00833B 88 [ 1] 504 push a + 00833C F6 [ 1] 505 ld a, (x) + 00833D 6B 02 [ 1] 506 ld (0x02, sp), a + 00833F 84 [ 1] 507 pop a 508 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 813: if (NewState != DISABLE) - 0086CC 0D 04 [ 1] 509 tnz (0x04, sp) - 0086CE 27 07 [ 1] 510 jreq 00102$ + 008340 0D 04 [ 1] 509 tnz (0x04, sp) + 008342 27 07 [ 1] 510 jreq 00102$ 511 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 815: CLK->ICKCR |= (uint8_t)(CLK_Halt); - 0086D0 1A 01 [ 1] 512 or a, (0x01, sp) - 0086D2 C7 50 C2 [ 1] 513 ld 0x50c2, a - 0086D5 20 06 [ 2] 514 jra 00104$ - 0086D7 515 00102$: + 008344 1A 01 [ 1] 512 or a, (0x01, sp) + 008346 C7 50 C2 [ 1] 513 ld 0x50c2, a + 008349 20 06 [ 2] 514 jra 00104$ + 00834B 515 00102$: 516 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 819: CLK->ICKCR &= (uint8_t)(~CLK_Halt); - 0086D7 43 [ 1] 517 cpl a - 0086D8 14 01 [ 1] 518 and a, (0x01, sp) - 0086DA C7 50 C2 [ 1] 519 ld 0x50c2, a - 0086DD 520 00104$: + 00834B 43 [ 1] 517 cpl a + 00834C 14 01 [ 1] 518 and a, (0x01, sp) + 00834E C7 50 C2 [ 1] 519 ld 0x50c2, a + 008351 520 00104$: 521 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 821: } - 0086DD 84 [ 1] 522 pop a - 0086DE 85 [ 2] 523 popw x - 0086DF 84 [ 1] 524 pop a - 0086E0 FC [ 2] 525 jp (x) + 008351 84 [ 1] 522 pop a + 008352 85 [ 2] 523 popw x + 008353 84 [ 1] 524 pop a + 008354 FC [ 2] 525 jp (x) 526 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 831: void CLK_MainRegulatorCmd(FunctionalState NewState) 527 ; ----------------------------------------- 528 ; function CLK_MainRegulatorCmd 529 ; ----------------------------------------- - 0086E1 530 _CLK_MainRegulatorCmd: - 0086E1 88 [ 1] 531 push a - 0086E2 6B 01 [ 1] 532 ld (0x01, sp), a + 008355 530 _CLK_MainRegulatorCmd: + 008355 88 [ 1] 531 push a + 008356 6B 01 [ 1] 532 ld (0x01, sp), a 533 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 839: CLK->REGCSR &= (uint8_t)(~CLK_REGCSR_REGOFF); - 0086E4 C6 50 CF [ 1] 534 ld a, 0x50cf + 008358 C6 50 CF [ 1] 534 ld a, 0x50cf 535 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 836: if (NewState != DISABLE) - 0086E7 0D 01 [ 1] 536 tnz (0x01, sp) - 0086E9 27 07 [ 1] 537 jreq 00102$ + 00835B 0D 01 [ 1] 536 tnz (0x01, sp) + 00835D 27 07 [ 1] 537 jreq 00102$ 538 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 839: CLK->REGCSR &= (uint8_t)(~CLK_REGCSR_REGOFF); - 0086EB A4 FD [ 1] 539 and a, #0xfd - 0086ED C7 50 CF [ 1] 540 ld 0x50cf, a - 0086F0 20 05 [ 2] 541 jra 00104$ - 0086F2 542 00102$: + 00835F A4 FD [ 1] 539 and a, #0xfd + 008361 C7 50 CF [ 1] 540 ld 0x50cf, a + 008364 20 05 [ 2] 541 jra 00104$ + 008366 542 00102$: 543 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 844: CLK->REGCSR |= CLK_REGCSR_REGOFF; - 0086F2 AA 02 [ 1] 544 or a, #0x02 - 0086F4 C7 50 CF [ 1] 545 ld 0x50cf, a - 0086F7 546 00104$: + 008366 AA 02 [ 1] 544 or a, #0x02 + 008368 C7 50 CF [ 1] 545 ld 0x50cf, a + 00836B 546 00104$: 547 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 846: } - 0086F7 84 [ 1] 548 pop a - 0086F8 81 [ 4] 549 ret + 00836B 84 [ 1] 548 pop a + 00836C 81 [ 4] 549 ret 550 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 875: void CLK_ITConfig(CLK_IT_TypeDef CLK_IT, FunctionalState NewState) 551 ; ----------------------------------------- 552 ; function CLK_ITConfig 553 ; ----------------------------------------- - 0086F9 554 _CLK_ITConfig: - 0086F9 88 [ 1] 555 push a + 00836D 554 _CLK_ITConfig: + 00836D 88 [ 1] 555 push a 556 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 884: if (CLK_IT == CLK_IT_SWIF) - 0086FA A1 1C [ 1] 557 cp a, #0x1c - 0086FC 26 07 [ 1] 558 jrne 00154$ - 0086FE 88 [ 1] 559 push a - 0086FF A6 01 [ 1] 560 ld a, #0x01 - 008701 6B 02 [ 1] 561 ld (0x02, sp), a - 008703 84 [ 1] 562 pop a - 008704 C5 563 .byte 0xc5 - 008705 564 00154$: - 008705 0F 01 [ 1] 565 clr (0x01, sp) - 008707 566 00155$: + 00836E A1 1C [ 1] 557 cp a, #0x1c + 008370 26 07 [ 1] 558 jrne 00154$ + 008372 88 [ 1] 559 push a + 008373 A6 01 [ 1] 560 ld a, #0x01 + 008375 6B 02 [ 1] 561 ld (0x02, sp), a + 008377 84 [ 1] 562 pop a + 008378 C5 563 .byte 0xc5 + 008379 564 00154$: + 008379 0F 01 [ 1] 565 clr (0x01, sp) + 00837B 566 00155$: 567 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 889: else if (CLK_IT == CLK_IT_LSECSSF) - 008707 A0 2C [ 1] 568 sub a, #0x2c - 008709 26 02 [ 1] 569 jrne 00157$ - 00870B 4C [ 1] 570 inc a - 00870C 21 571 .byte 0x21 - 00870D 572 00157$: - 00870D 4F [ 1] 573 clr a - 00870E 574 00158$: + 00837B A0 2C [ 1] 568 sub a, #0x2c + 00837D 26 02 [ 1] 569 jrne 00157$ + 00837F 4C [ 1] 570 inc a + 008380 21 571 .byte 0x21 + 008381 572 00157$: + 008381 4F [ 1] 573 clr a + 008382 574 00158$: 575 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 882: if (NewState != DISABLE) - 00870E 0D 04 [ 1] 576 tnz (0x04, sp) - 008710 27 25 [ 1] 577 jreq 00114$ + 008382 0D 04 [ 1] 576 tnz (0x04, sp) + 008384 27 25 [ 1] 577 jreq 00114$ 578 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 884: if (CLK_IT == CLK_IT_SWIF) - 008712 0D 01 [ 1] 579 tnz (0x01, sp) - 008714 27 0A [ 1] 580 jreq 00105$ + 008386 0D 01 [ 1] 579 tnz (0x01, sp) + 008388 27 0A [ 1] 580 jreq 00105$ 581 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 887: CLK->SWCR |= CLK_SWCR_SWIEN; - 008716 C6 50 C9 [ 1] 582 ld a, 0x50c9 - 008719 AA 04 [ 1] 583 or a, #0x04 - 00871B C7 50 C9 [ 1] 584 ld 0x50c9, a - 00871E 20 3A [ 2] 585 jra 00116$ - 008720 586 00105$: + 00838A C6 50 C9 [ 1] 582 ld a, 0x50c9 + 00838D AA 04 [ 1] 583 or a, #0x04 + 00838F C7 50 C9 [ 1] 584 ld 0x50c9, a + 008392 20 3A [ 2] 585 jra 00116$ + 008394 586 00105$: 587 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 889: else if (CLK_IT == CLK_IT_LSECSSF) - 008720 4D [ 1] 588 tnz a - 008721 27 0A [ 1] 589 jreq 00102$ + 008394 4D [ 1] 588 tnz a + 008395 27 0A [ 1] 589 jreq 00102$ 590 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 892: CSSLSE->CSR |= CSSLSE_CSR_CSSIE; - 008723 C6 51 90 [ 1] 591 ld a, 0x5190 - 008726 AA 04 [ 1] 592 or a, #0x04 - 008728 C7 51 90 [ 1] 593 ld 0x5190, a - 00872B 20 2D [ 2] 594 jra 00116$ - 00872D 595 00102$: + 008397 C6 51 90 [ 1] 591 ld a, 0x5190 + 00839A AA 04 [ 1] 592 or a, #0x04 + 00839C C7 51 90 [ 1] 593 ld 0x5190, a + 00839F 20 2D [ 2] 594 jra 00116$ + 0083A1 595 00102$: 596 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 897: CLK->CSSR |= CLK_CSSR_CSSDIE; - 00872D C6 50 CA [ 1] 597 ld a, 0x50ca - 008730 AA 04 [ 1] 598 or a, #0x04 - 008732 C7 50 CA [ 1] 599 ld 0x50ca, a - 008735 20 23 [ 2] 600 jra 00116$ - 008737 601 00114$: + 0083A1 C6 50 CA [ 1] 597 ld a, 0x50ca + 0083A4 AA 04 [ 1] 598 or a, #0x04 + 0083A6 C7 50 CA [ 1] 599 ld 0x50ca, a + 0083A9 20 23 [ 2] 600 jra 00116$ + 0083AB 601 00114$: 602 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 902: if (CLK_IT == CLK_IT_SWIF) - 008737 0D 01 [ 1] 603 tnz (0x01, sp) - 008739 27 0A [ 1] 604 jreq 00111$ + 0083AB 0D 01 [ 1] 603 tnz (0x01, sp) + 0083AD 27 0A [ 1] 604 jreq 00111$ 605 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 905: CLK->SWCR &= (uint8_t)(~CLK_SWCR_SWIEN); - 00873B C6 50 C9 [ 1] 606 ld a, 0x50c9 - 00873E A4 FB [ 1] 607 and a, #0xfb - 008740 C7 50 C9 [ 1] 608 ld 0x50c9, a - 008743 20 15 [ 2] 609 jra 00116$ - 008745 610 00111$: + 0083AF C6 50 C9 [ 1] 606 ld a, 0x50c9 + 0083B2 A4 FB [ 1] 607 and a, #0xfb + 0083B4 C7 50 C9 [ 1] 608 ld 0x50c9, a + 0083B7 20 15 [ 2] 609 jra 00116$ + 0083B9 610 00111$: 611 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 907: else if (CLK_IT == CLK_IT_LSECSSF) - 008745 4D [ 1] 612 tnz a - 008746 27 0A [ 1] 613 jreq 00108$ + 0083B9 4D [ 1] 612 tnz a + 0083BA 27 0A [ 1] 613 jreq 00108$ 614 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 910: CSSLSE->CSR &= (uint8_t)(~CSSLSE_CSR_CSSIE); - 008748 C6 51 90 [ 1] 615 ld a, 0x5190 - 00874B A4 FB [ 1] 616 and a, #0xfb - 00874D C7 51 90 [ 1] 617 ld 0x5190, a - 008750 20 08 [ 2] 618 jra 00116$ - 008752 619 00108$: + 0083BC C6 51 90 [ 1] 615 ld a, 0x5190 + 0083BF A4 FB [ 1] 616 and a, #0xfb + 0083C1 C7 51 90 [ 1] 617 ld 0x5190, a + 0083C4 20 08 [ 2] 618 jra 00116$ + 0083C6 619 00108$: 620 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 915: CLK->CSSR &= (uint8_t)(~CLK_CSSR_CSSDIE); - 008752 C6 50 CA [ 1] 621 ld a, 0x50ca - 008755 A4 FB [ 1] 622 and a, #0xfb - 008757 C7 50 CA [ 1] 623 ld 0x50ca, a - 00875A 624 00116$: + 0083C6 C6 50 CA [ 1] 621 ld a, 0x50ca + 0083C9 A4 FB [ 1] 622 and a, #0xfb + 0083CB C7 50 CA [ 1] 623 ld 0x50ca, a + 0083CE 624 00116$: 625 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 918: } - 00875A 84 [ 1] 626 pop a - 00875B 85 [ 2] 627 popw x - 00875C 84 [ 1] 628 pop a - 00875D FC [ 2] 629 jp (x) + 0083CE 84 [ 1] 626 pop a + 0083CF 85 [ 2] 627 popw x + 0083D0 84 [ 1] 628 pop a + 0083D1 FC [ 2] 629 jp (x) 630 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 945: FlagStatus CLK_GetFlagStatus(CLK_FLAG_TypeDef CLK_FLAG) 631 ; ----------------------------------------- 632 ; function CLK_GetFlagStatus 633 ; ----------------------------------------- - 00875E 634 _CLK_GetFlagStatus: - 00875E 88 [ 1] 635 push a + 0083D2 634 _CLK_GetFlagStatus: + 0083D2 88 [ 1] 635 push a 636 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 955: reg = (uint8_t)((uint8_t)CLK_FLAG & (uint8_t)0xF0); - 00875F 97 [ 1] 637 ld xl, a - 008760 A4 F0 [ 1] 638 and a, #0xf0 + 0083D3 97 [ 1] 637 ld xl, a + 0083D4 A4 F0 [ 1] 638 and a, #0xf0 639 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 958: pos = (uint8_t)((uint8_t)CLK_FLAG & (uint8_t)0x0F); - 008762 88 [ 1] 640 push a - 008763 9F [ 1] 641 ld a, xl - 008764 A4 0F [ 1] 642 and a, #0x0f - 008766 97 [ 1] 643 ld xl, a - 008767 84 [ 1] 644 pop a + 0083D6 88 [ 1] 640 push a + 0083D7 9F [ 1] 641 ld a, xl + 0083D8 A4 0F [ 1] 642 and a, #0x0f + 0083DA 97 [ 1] 643 ld xl, a + 0083DB 84 [ 1] 644 pop a 645 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 960: if (reg == 0x00) /* The flag to check is in CRTC Rregister */ - 008768 4D [ 1] 646 tnz a - 008769 26 05 [ 1] 647 jrne 00123$ + 0083DC 4D [ 1] 646 tnz a + 0083DD 26 05 [ 1] 647 jrne 00123$ 648 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 962: reg = CLK->CRTCR; - 00876B C6 50 C1 [ 1] 649 ld a, 0x50c1 - 00876E 20 42 [ 2] 650 jra 00124$ - 008770 651 00123$: + 0083DF C6 50 C1 [ 1] 649 ld a, 0x50c1 + 0083E2 20 42 [ 2] 650 jra 00124$ + 0083E4 651 00123$: 652 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 964: else if (reg == 0x10) /* The flag to check is in ICKCR register */ - 008770 A1 10 [ 1] 653 cp a, #0x10 - 008772 26 05 [ 1] 654 jrne 00120$ + 0083E4 A1 10 [ 1] 653 cp a, #0x10 + 0083E6 26 05 [ 1] 654 jrne 00120$ 655 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 966: reg = CLK->ICKCR; - 008774 C6 50 C2 [ 1] 656 ld a, 0x50c2 - 008777 20 39 [ 2] 657 jra 00124$ - 008779 658 00120$: + 0083E8 C6 50 C2 [ 1] 656 ld a, 0x50c2 + 0083EB 20 39 [ 2] 657 jra 00124$ + 0083ED 658 00120$: 659 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 968: else if (reg == 0x20) /* The flag to check is in CCOR register */ - 008779 A1 20 [ 1] 660 cp a, #0x20 - 00877B 26 05 [ 1] 661 jrne 00117$ + 0083ED A1 20 [ 1] 660 cp a, #0x20 + 0083EF 26 05 [ 1] 661 jrne 00117$ 662 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 970: reg = CLK->CCOR; - 00877D C6 50 C5 [ 1] 663 ld a, 0x50c5 - 008780 20 30 [ 2] 664 jra 00124$ - 008782 665 00117$: + 0083F1 C6 50 C5 [ 1] 663 ld a, 0x50c5 + 0083F4 20 30 [ 2] 664 jra 00124$ + 0083F6 665 00117$: 666 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 972: else if (reg == 0x30) /* The flag to check is in ECKCR register */ - 008782 A1 30 [ 1] 667 cp a, #0x30 - 008784 26 05 [ 1] 668 jrne 00114$ + 0083F6 A1 30 [ 1] 667 cp a, #0x30 + 0083F8 26 05 [ 1] 668 jrne 00114$ 669 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 974: reg = CLK->ECKCR; - 008786 C6 50 C6 [ 1] 670 ld a, 0x50c6 - 008789 20 27 [ 2] 671 jra 00124$ - 00878B 672 00114$: + 0083FA C6 50 C6 [ 1] 670 ld a, 0x50c6 + 0083FD 20 27 [ 2] 671 jra 00124$ + 0083FF 672 00114$: 673 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 976: else if (reg == 0x40) /* The flag to check is in SWCR register */ - 00878B A1 40 [ 1] 674 cp a, #0x40 - 00878D 26 05 [ 1] 675 jrne 00111$ + 0083FF A1 40 [ 1] 674 cp a, #0x40 + 008401 26 05 [ 1] 675 jrne 00111$ 676 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 978: reg = CLK->SWCR; - 00878F C6 50 C9 [ 1] 677 ld a, 0x50c9 - 008792 20 1E [ 2] 678 jra 00124$ - 008794 679 00111$: + 008403 C6 50 C9 [ 1] 677 ld a, 0x50c9 + 008406 20 1E [ 2] 678 jra 00124$ + 008408 679 00111$: 680 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 980: else if (reg == 0x50) /* The flag to check is in CSSR register */ - 008794 A1 50 [ 1] 681 cp a, #0x50 - 008796 26 05 [ 1] 682 jrne 00108$ + 008408 A1 50 [ 1] 681 cp a, #0x50 + 00840A 26 05 [ 1] 682 jrne 00108$ 683 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 982: reg = CLK->CSSR; - 008798 C6 50 CA [ 1] 684 ld a, 0x50ca - 00879B 20 15 [ 2] 685 jra 00124$ - 00879D 686 00108$: + 00840C C6 50 CA [ 1] 684 ld a, 0x50ca + 00840F 20 15 [ 2] 685 jra 00124$ + 008411 686 00108$: 687 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 984: else if (reg == 0x70) /* The flag to check is in REGCSR register */ - 00879D A1 70 [ 1] 688 cp a, #0x70 - 00879F 26 05 [ 1] 689 jrne 00105$ + 008411 A1 70 [ 1] 688 cp a, #0x70 + 008413 26 05 [ 1] 689 jrne 00105$ 690 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 986: reg = CLK->REGCSR; - 0087A1 C6 50 CF [ 1] 691 ld a, 0x50cf - 0087A4 20 0C [ 2] 692 jra 00124$ - 0087A6 693 00105$: + 008415 C6 50 CF [ 1] 691 ld a, 0x50cf + 008418 20 0C [ 2] 692 jra 00124$ + 00841A 693 00105$: 694 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 988: else if (reg == 0x80) /* The flag to check is in CSSLSE_CSRregister */ - 0087A6 A1 80 [ 1] 695 cp a, #0x80 - 0087A8 26 05 [ 1] 696 jrne 00102$ + 00841A A1 80 [ 1] 695 cp a, #0x80 + 00841C 26 05 [ 1] 696 jrne 00102$ 697 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 990: reg = CSSLSE->CSR; - 0087AA C6 51 90 [ 1] 698 ld a, 0x5190 - 0087AD 20 03 [ 2] 699 jra 00124$ - 0087AF 700 00102$: + 00841E C6 51 90 [ 1] 698 ld a, 0x5190 + 008421 20 03 [ 2] 699 jra 00124$ + 008423 700 00102$: 701 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 994: reg = CLK->CBEEPR; - 0087AF C6 50 CB [ 1] 702 ld a, 0x50cb - 0087B2 703 00124$: + 008423 C6 50 CB [ 1] 702 ld a, 0x50cb + 008426 703 00124$: 704 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 998: if ((reg & (uint8_t)((uint8_t)1 << (uint8_t)pos)) != (uint8_t)RESET) - 0087B2 88 [ 1] 705 push a - 0087B3 A6 01 [ 1] 706 ld a, #0x01 - 0087B5 6B 02 [ 1] 707 ld (0x02, sp), a - 0087B7 9F [ 1] 708 ld a, xl - 0087B8 4D [ 1] 709 tnz a - 0087B9 27 05 [ 1] 710 jreq 00216$ - 0087BB 711 00215$: - 0087BB 08 02 [ 1] 712 sll (0x02, sp) - 0087BD 4A [ 1] 713 dec a - 0087BE 26 FB [ 1] 714 jrne 00215$ - 0087C0 715 00216$: - 0087C0 84 [ 1] 716 pop a - 0087C1 14 01 [ 1] 717 and a, (0x01, sp) - 0087C3 27 03 [ 1] 718 jreq 00126$ + 008426 88 [ 1] 705 push a + 008427 A6 01 [ 1] 706 ld a, #0x01 + 008429 6B 02 [ 1] 707 ld (0x02, sp), a + 00842B 9F [ 1] 708 ld a, xl + 00842C 4D [ 1] 709 tnz a + 00842D 27 05 [ 1] 710 jreq 00216$ + 00842F 711 00215$: + 00842F 08 02 [ 1] 712 sll (0x02, sp) + 008431 4A [ 1] 713 dec a + 008432 26 FB [ 1] 714 jrne 00215$ + 008434 715 00216$: + 008434 84 [ 1] 716 pop a + 008435 14 01 [ 1] 717 and a, (0x01, sp) + 008437 27 03 [ 1] 718 jreq 00126$ 719 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 1000: bitstatus = SET; - 0087C5 A6 01 [ 1] 720 ld a, #0x01 + 008439 A6 01 [ 1] 720 ld a, #0x01 721 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 1004: bitstatus = RESET; - 0087C7 21 722 .byte 0x21 - 0087C8 723 00126$: - 0087C8 4F [ 1] 724 clr a - 0087C9 725 00127$: + 00843B 21 722 .byte 0x21 + 00843C 723 00126$: + 00843C 4F [ 1] 724 clr a + 00843D 725 00127$: 726 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 1008: return((FlagStatus)bitstatus); 727 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 1009: } - 0087C9 5B 01 [ 2] 728 addw sp, #1 - 0087CB 81 [ 4] 729 ret + 00843D 5B 01 [ 2] 728 addw sp, #1 + 00843F 81 [ 4] 729 ret 730 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 1016: void CLK_ClearFlag(void) 731 ; ----------------------------------------- 732 ; function CLK_ClearFlag 733 ; ----------------------------------------- - 0087CC 734 _CLK_ClearFlag: + 008440 734 _CLK_ClearFlag: 735 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 1020: CSSLSE->CSR &= (uint8_t)(~CSSLSE_CSR_CSSF); - 0087CC 72 17 51 90 [ 1] 736 bres 0x5190, #3 + 008440 72 17 51 90 [ 1] 736 bres 0x5190, #3 737 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 1021: } - 0087D0 81 [ 4] 738 ret + 008444 81 [ 4] 738 ret 739 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 1032: ITStatus CLK_GetITStatus(CLK_IT_TypeDef CLK_IT) 740 ; ----------------------------------------- 741 ; function CLK_GetITStatus 742 ; ----------------------------------------- - 0087D1 743 _CLK_GetITStatus: - 0087D1 88 [ 1] 744 push a + 008445 743 _CLK_GetITStatus: + 008445 88 [ 1] 744 push a 745 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 1040: if (CLK_IT == CLK_IT_SWIF) - 0087D2 6B 01 [ 1] 746 ld (0x01, sp), a - 0087D4 A1 1C [ 1] 747 cp a, #0x1c - 0087D6 26 0F [ 1] 748 jrne 00114$ + 008446 6B 01 [ 1] 746 ld (0x01, sp), a + 008448 A1 1C [ 1] 747 cp a, #0x1c + 00844A 26 0F [ 1] 748 jrne 00114$ 749 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 1043: if ((CLK->SWCR & (uint8_t)CLK_IT) == (uint8_t)0x0C) - 0087D8 C6 50 C9 [ 1] 750 ld a, 0x50c9 - 0087DB 14 01 [ 1] 751 and a, (0x01, sp) + 00844C C6 50 C9 [ 1] 750 ld a, 0x50c9 + 00844F 14 01 [ 1] 751 and a, (0x01, sp) 752 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 1045: bitstatus = SET; - 0087DD A0 0C [ 1] 753 sub a, #0x0c - 0087DF 26 03 [ 1] 754 jrne 00102$ - 0087E1 4C [ 1] 755 inc a - 0087E2 20 24 [ 2] 756 jra 00115$ - 0087E4 757 00102$: + 008451 A0 0C [ 1] 753 sub a, #0x0c + 008453 26 03 [ 1] 754 jrne 00102$ + 008455 4C [ 1] 755 inc a + 008456 20 24 [ 2] 756 jra 00115$ + 008458 757 00102$: 758 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 1049: bitstatus = RESET; - 0087E4 4F [ 1] 759 clr a - 0087E5 20 21 [ 2] 760 jra 00115$ - 0087E7 761 00114$: + 008458 4F [ 1] 759 clr a + 008459 20 21 [ 2] 760 jra 00115$ + 00845B 761 00114$: 762 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 1052: else if (CLK_IT == CLK_IT_LSECSSF) - 0087E7 7B 01 [ 1] 763 ld a, (0x01, sp) - 0087E9 A1 2C [ 1] 764 cp a, #0x2c - 0087EB 26 0F [ 1] 765 jrne 00111$ + 00845B 7B 01 [ 1] 763 ld a, (0x01, sp) + 00845D A1 2C [ 1] 764 cp a, #0x2c + 00845F 26 0F [ 1] 765 jrne 00111$ 766 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 1055: if ((CSSLSE->CSR & (uint8_t)CLK_IT) == (uint8_t)0x0C) - 0087ED C6 51 90 [ 1] 767 ld a, 0x5190 - 0087F0 14 01 [ 1] 768 and a, (0x01, sp) + 008461 C6 51 90 [ 1] 767 ld a, 0x5190 + 008464 14 01 [ 1] 768 and a, (0x01, sp) 769 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 1057: bitstatus = SET; - 0087F2 A0 0C [ 1] 770 sub a, #0x0c - 0087F4 26 03 [ 1] 771 jrne 00105$ - 0087F6 4C [ 1] 772 inc a - 0087F7 20 0F [ 2] 773 jra 00115$ - 0087F9 774 00105$: + 008466 A0 0C [ 1] 770 sub a, #0x0c + 008468 26 03 [ 1] 771 jrne 00105$ + 00846A 4C [ 1] 772 inc a + 00846B 20 0F [ 2] 773 jra 00115$ + 00846D 774 00105$: 775 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 1061: bitstatus = RESET; - 0087F9 4F [ 1] 776 clr a - 0087FA 20 0C [ 2] 777 jra 00115$ - 0087FC 778 00111$: + 00846D 4F [ 1] 776 clr a + 00846E 20 0C [ 2] 777 jra 00115$ + 008470 778 00111$: 779 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 1067: if ((CLK->CSSR & (uint8_t)CLK_IT) == (uint8_t)0x0C) - 0087FC C6 50 CA [ 1] 780 ld a, 0x50ca - 0087FF 14 01 [ 1] 781 and a, (0x01, sp) + 008470 C6 50 CA [ 1] 780 ld a, 0x50ca + 008473 14 01 [ 1] 781 and a, (0x01, sp) 782 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 1069: bitstatus = SET; - 008801 A0 0C [ 1] 783 sub a, #0x0c - 008803 26 02 [ 1] 784 jrne 00108$ - 008805 4C [ 1] 785 inc a + 008475 A0 0C [ 1] 783 sub a, #0x0c + 008477 26 02 [ 1] 784 jrne 00108$ + 008479 4C [ 1] 785 inc a 786 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 1073: bitstatus = RESET; - 008806 21 787 .byte 0x21 - 008807 788 00108$: - 008807 4F [ 1] 789 clr a - 008808 790 00115$: + 00847A 21 787 .byte 0x21 + 00847B 788 00108$: + 00847B 4F [ 1] 789 clr a + 00847C 790 00115$: 791 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 1078: return bitstatus; 792 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 1079: } - 008808 5B 01 [ 2] 793 addw sp, #1 - 00880A 81 [ 4] 794 ret + 00847C 5B 01 [ 2] 793 addw sp, #1 + 00847E 81 [ 4] 794 ret 795 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 1089: void CLK_ClearITPendingBit(CLK_IT_TypeDef CLK_IT) 796 ; ----------------------------------------- 797 ; function CLK_ClearITPendingBit 798 ; ----------------------------------------- - 00880B 799 _CLK_ClearITPendingBit: + 00847F 799 _CLK_ClearITPendingBit: 800 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 1095: if ((uint8_t)((uint8_t)CLK_IT & (uint8_t)0xF0) == (uint8_t)0x20) - 00880B A4 F0 [ 1] 801 and a, #0xf0 - 00880D A1 20 [ 1] 802 cp a, #0x20 - 00880F 26 05 [ 1] 803 jrne 00102$ + 00847F A4 F0 [ 1] 801 and a, #0xf0 + 008481 A1 20 [ 1] 802 cp a, #0x20 + 008483 26 05 [ 1] 803 jrne 00102$ 804 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 1098: CSSLSE->CSR &= (uint8_t)(~CSSLSE_CSR_CSSF); - 008811 72 17 51 90 [ 1] 805 bres 0x5190, #3 - 008815 81 [ 4] 806 ret - 008816 807 00102$: + 008485 72 17 51 90 [ 1] 805 bres 0x5190, #3 + 008489 81 [ 4] 806 ret + 00848A 807 00102$: 808 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 1103: CLK->SWCR &= (uint8_t)(~CLK_SWCR_SWIF); - 008816 72 17 50 C9 [ 1] 809 bres 0x50c9, #3 + 00848A 72 17 50 C9 [ 1] 809 bres 0x50c9, #3 810 ; ../inc/stm8l151x/src/stm8l15x_clk.c: 1105: } - 00881A 81 [ 4] 811 ret + 00848E 81 [ 4] 811 ret 812 .area CODE 813 .area CONST 814 .area CONST - 0080AF 815 _SYSDivFactor: - 0080AF 01 816 .db #0x01 ; 1 - 0080B0 02 817 .db #0x02 ; 2 - 0080B1 04 818 .db #0x04 ; 4 - 0080B2 08 819 .db #0x08 ; 8 - 0080B3 10 820 .db #0x10 ; 16 + 0080A9 815 _SYSDivFactor: + 0080A9 01 816 .db #0x01 ; 1 + 0080AA 02 817 .db #0x02 ; 2 + 0080AB 04 818 .db #0x04 ; 4 + 0080AC 08 819 .db #0x08 ; 8 + 0080AD 10 820 .db #0x10 ; 16 821 .area CODE 822 .area INITIALIZER 823 .area CABS (ABS) diff --git a/firmware/STM8L15X_LD/stm8l15x_gpio.rst b/firmware/STM8L15X_LD/stm8l15x_gpio.rst index 2e66d9f..1f042ce 100644 --- a/firmware/STM8L15X_LD/stm8l15x_gpio.rst +++ b/firmware/STM8L15X_LD/stm8l15x_gpio.rst @@ -60,289 +60,289 @@ 60 ; ----------------------------------------- 61 ; function GPIO_DeInit 62 ; ----------------------------------------- - 00881B 63 _GPIO_DeInit: + 00848F 63 _GPIO_DeInit: 64 ; ../inc/stm8l151x/src/stm8l15x_gpio.c: 98: GPIOx->CR2 = GPIO_CR2_RESET_VALUE; /* Reset Control Register 2 */ - 00881B 90 93 [ 1] 65 ldw y, x - 00881D 6F 04 [ 1] 66 clr (0x0004, x) + 00848F 90 93 [ 1] 65 ldw y, x + 008491 6F 04 [ 1] 66 clr (0x0004, x) 67 ; ../inc/stm8l151x/src/stm8l15x_gpio.c: 99: GPIOx->ODR = GPIO_ODR_RESET_VALUE; /* Reset Output Data Register */ - 00881F 90 7F [ 1] 68 clr (y) + 008493 90 7F [ 1] 68 clr (y) 69 ; ../inc/stm8l151x/src/stm8l15x_gpio.c: 100: GPIOx->DDR = GPIO_DDR_RESET_VALUE; /* Reset Data Direction Register */ - 008821 93 [ 1] 70 ldw x, y - 008822 6F 02 [ 1] 71 clr (0x02, x) + 008495 93 [ 1] 70 ldw x, y + 008496 6F 02 [ 1] 71 clr (0x02, x) 72 ; ../inc/stm8l151x/src/stm8l15x_gpio.c: 101: GPIOx->CR1 = GPIO_CR1_RESET_VALUE; /* Reset Control Register 1 */ - 008824 93 [ 1] 73 ldw x, y - 008825 6F 03 [ 1] 74 clr (0x0003, x) + 008498 93 [ 1] 73 ldw x, y + 008499 6F 03 [ 1] 74 clr (0x0003, x) 75 ; ../inc/stm8l151x/src/stm8l15x_gpio.c: 102: } - 008827 81 [ 4] 76 ret + 00849B 81 [ 4] 76 ret 77 ; ../inc/stm8l151x/src/stm8l15x_gpio.c: 133: void GPIO_Init(GPIO_TypeDef* GPIOx, uint8_t GPIO_Pin, GPIO_Mode_TypeDef GPIO_Mode) 78 ; ----------------------------------------- 79 ; function GPIO_Init 80 ; ----------------------------------------- - 008828 81 _GPIO_Init: - 008828 52 08 [ 2] 82 sub sp, #8 - 00882A 1F 07 [ 2] 83 ldw (0x07, sp), x - 00882C 6B 06 [ 1] 84 ld (0x06, sp), a + 00849C 81 _GPIO_Init: + 00849C 52 08 [ 2] 82 sub sp, #8 + 00849E 1F 07 [ 2] 83 ldw (0x07, sp), x + 0084A0 6B 06 [ 1] 84 ld (0x06, sp), a 85 ; ../inc/stm8l151x/src/stm8l15x_gpio.c: 143: GPIOx->CR2 &= (uint8_t)(~(GPIO_Pin)); - 00882E 1E 07 [ 2] 86 ldw x, (0x07, sp) - 008830 1C 00 04 [ 2] 87 addw x, #0x0004 - 008833 1F 01 [ 2] 88 ldw (0x01, sp), x - 008835 F6 [ 1] 89 ld a, (x) - 008836 88 [ 1] 90 push a - 008837 7B 07 [ 1] 91 ld a, (0x07, sp) - 008839 43 [ 1] 92 cpl a - 00883A 6B 04 [ 1] 93 ld (0x04, sp), a - 00883C 84 [ 1] 94 pop a - 00883D 14 03 [ 1] 95 and a, (0x03, sp) - 00883F 1E 01 [ 2] 96 ldw x, (0x01, sp) - 008841 F7 [ 1] 97 ld (x), a + 0084A2 1E 07 [ 2] 86 ldw x, (0x07, sp) + 0084A4 1C 00 04 [ 2] 87 addw x, #0x0004 + 0084A7 1F 01 [ 2] 88 ldw (0x01, sp), x + 0084A9 F6 [ 1] 89 ld a, (x) + 0084AA 88 [ 1] 90 push a + 0084AB 7B 07 [ 1] 91 ld a, (0x07, sp) + 0084AD 43 [ 1] 92 cpl a + 0084AE 6B 04 [ 1] 93 ld (0x04, sp), a + 0084B0 84 [ 1] 94 pop a + 0084B1 14 03 [ 1] 95 and a, (0x03, sp) + 0084B3 1E 01 [ 2] 96 ldw x, (0x01, sp) + 0084B5 F7 [ 1] 97 ld (x), a 98 ; ../inc/stm8l151x/src/stm8l15x_gpio.c: 159: GPIOx->DDR |= GPIO_Pin; - 008842 1E 07 [ 2] 99 ldw x, (0x07, sp) - 008844 5C [ 1] 100 incw x - 008845 5C [ 1] 101 incw x - 008846 1F 04 [ 2] 102 ldw (0x04, sp), x + 0084B6 1E 07 [ 2] 99 ldw x, (0x07, sp) + 0084B8 5C [ 1] 100 incw x + 0084B9 5C [ 1] 101 incw x + 0084BA 1F 04 [ 2] 102 ldw (0x04, sp), x 103 ; ../inc/stm8l151x/src/stm8l15x_gpio.c: 149: if ((((uint8_t)(GPIO_Mode)) & (uint8_t)0x80) != (uint8_t)0x00) /* Output mode */ - 008848 0D 0B [ 1] 104 tnz (0x0b, sp) - 00884A 2A 1D [ 1] 105 jrpl 00105$ + 0084BC 0D 0B [ 1] 104 tnz (0x0b, sp) + 0084BE 2A 1D [ 1] 105 jrpl 00105$ 106 ; ../inc/stm8l151x/src/stm8l15x_gpio.c: 153: GPIOx->ODR |= GPIO_Pin; - 00884C 1E 07 [ 2] 107 ldw x, (0x07, sp) - 00884E F6 [ 1] 108 ld a, (x) + 0084C0 1E 07 [ 2] 107 ldw x, (0x07, sp) + 0084C2 F6 [ 1] 108 ld a, (x) 109 ; ../inc/stm8l151x/src/stm8l15x_gpio.c: 151: if ((((uint8_t)(GPIO_Mode)) & (uint8_t)0x10) != (uint8_t)0x00) /* High level */ - 00884F 88 [ 1] 110 push a - 008850 7B 0C [ 1] 111 ld a, (0x0c, sp) - 008852 A5 10 [ 1] 112 bcp a, #0x10 - 008854 84 [ 1] 113 pop a - 008855 27 05 [ 1] 114 jreq 00102$ + 0084C3 88 [ 1] 110 push a + 0084C4 7B 0C [ 1] 111 ld a, (0x0c, sp) + 0084C6 A5 10 [ 1] 112 bcp a, #0x10 + 0084C8 84 [ 1] 113 pop a + 0084C9 27 05 [ 1] 114 jreq 00102$ 115 ; ../inc/stm8l151x/src/stm8l15x_gpio.c: 153: GPIOx->ODR |= GPIO_Pin; - 008857 1A 06 [ 1] 116 or a, (0x06, sp) - 008859 F7 [ 1] 117 ld (x), a - 00885A 20 03 [ 2] 118 jra 00103$ - 00885C 119 00102$: + 0084CB 1A 06 [ 1] 116 or a, (0x06, sp) + 0084CD F7 [ 1] 117 ld (x), a + 0084CE 20 03 [ 2] 118 jra 00103$ + 0084D0 119 00102$: 120 ; ../inc/stm8l151x/src/stm8l15x_gpio.c: 156: GPIOx->ODR &= (uint8_t)(~(GPIO_Pin)); - 00885C 14 03 [ 1] 121 and a, (0x03, sp) - 00885E F7 [ 1] 122 ld (x), a - 00885F 123 00103$: + 0084D0 14 03 [ 1] 121 and a, (0x03, sp) + 0084D2 F7 [ 1] 122 ld (x), a + 0084D3 123 00103$: 124 ; ../inc/stm8l151x/src/stm8l15x_gpio.c: 159: GPIOx->DDR |= GPIO_Pin; - 00885F 1E 04 [ 2] 125 ldw x, (0x04, sp) - 008861 F6 [ 1] 126 ld a, (x) - 008862 1A 06 [ 1] 127 or a, (0x06, sp) - 008864 1E 04 [ 2] 128 ldw x, (0x04, sp) - 008866 F7 [ 1] 129 ld (x), a - 008867 20 08 [ 2] 130 jra 00106$ - 008869 131 00105$: + 0084D3 1E 04 [ 2] 125 ldw x, (0x04, sp) + 0084D5 F6 [ 1] 126 ld a, (x) + 0084D6 1A 06 [ 1] 127 or a, (0x06, sp) + 0084D8 1E 04 [ 2] 128 ldw x, (0x04, sp) + 0084DA F7 [ 1] 129 ld (x), a + 0084DB 20 08 [ 2] 130 jra 00106$ + 0084DD 131 00105$: 132 ; ../inc/stm8l151x/src/stm8l15x_gpio.c: 163: GPIOx->DDR &= (uint8_t)(~(GPIO_Pin)); - 008869 1E 04 [ 2] 133 ldw x, (0x04, sp) - 00886B F6 [ 1] 134 ld a, (x) - 00886C 14 03 [ 1] 135 and a, (0x03, sp) - 00886E 1E 04 [ 2] 136 ldw x, (0x04, sp) - 008870 F7 [ 1] 137 ld (x), a - 008871 138 00106$: + 0084DD 1E 04 [ 2] 133 ldw x, (0x04, sp) + 0084DF F6 [ 1] 134 ld a, (x) + 0084E0 14 03 [ 1] 135 and a, (0x03, sp) + 0084E2 1E 04 [ 2] 136 ldw x, (0x04, sp) + 0084E4 F7 [ 1] 137 ld (x), a + 0084E5 138 00106$: 139 ; ../inc/stm8l151x/src/stm8l15x_gpio.c: 172: GPIOx->CR1 |= GPIO_Pin; - 008871 1E 07 [ 2] 140 ldw x, (0x07, sp) - 008873 1C 00 03 [ 2] 141 addw x, #0x0003 - 008876 F6 [ 1] 142 ld a, (x) + 0084E5 1E 07 [ 2] 140 ldw x, (0x07, sp) + 0084E7 1C 00 03 [ 2] 141 addw x, #0x0003 + 0084EA F6 [ 1] 142 ld a, (x) 143 ; ../inc/stm8l151x/src/stm8l15x_gpio.c: 170: if ((((uint8_t)(GPIO_Mode)) & (uint8_t)0x40) != (uint8_t)0x00) /* Pull-Up or Push-Pull */ - 008877 88 [ 1] 144 push a - 008878 7B 0C [ 1] 145 ld a, (0x0c, sp) - 00887A A5 40 [ 1] 146 bcp a, #0x40 - 00887C 84 [ 1] 147 pop a - 00887D 27 05 [ 1] 148 jreq 00108$ + 0084EB 88 [ 1] 144 push a + 0084EC 7B 0C [ 1] 145 ld a, (0x0c, sp) + 0084EE A5 40 [ 1] 146 bcp a, #0x40 + 0084F0 84 [ 1] 147 pop a + 0084F1 27 05 [ 1] 148 jreq 00108$ 149 ; ../inc/stm8l151x/src/stm8l15x_gpio.c: 172: GPIOx->CR1 |= GPIO_Pin; - 00887F 1A 06 [ 1] 150 or a, (0x06, sp) - 008881 F7 [ 1] 151 ld (x), a - 008882 20 03 [ 2] 152 jra 00109$ - 008884 153 00108$: + 0084F3 1A 06 [ 1] 150 or a, (0x06, sp) + 0084F5 F7 [ 1] 151 ld (x), a + 0084F6 20 03 [ 2] 152 jra 00109$ + 0084F8 153 00108$: 154 ; ../inc/stm8l151x/src/stm8l15x_gpio.c: 175: GPIOx->CR1 &= (uint8_t)(~(GPIO_Pin)); - 008884 14 03 [ 1] 155 and a, (0x03, sp) - 008886 F7 [ 1] 156 ld (x), a - 008887 157 00109$: + 0084F8 14 03 [ 1] 155 and a, (0x03, sp) + 0084FA F7 [ 1] 156 ld (x), a + 0084FB 157 00109$: 158 ; ../inc/stm8l151x/src/stm8l15x_gpio.c: 143: GPIOx->CR2 &= (uint8_t)(~(GPIO_Pin)); - 008887 1E 01 [ 2] 159 ldw x, (0x01, sp) - 008889 F6 [ 1] 160 ld a, (x) + 0084FB 1E 01 [ 2] 159 ldw x, (0x01, sp) + 0084FD F6 [ 1] 160 ld a, (x) 161 ; ../inc/stm8l151x/src/stm8l15x_gpio.c: 182: if ((((uint8_t)(GPIO_Mode)) & (uint8_t)0x20) != (uint8_t)0x00) /* Interrupt or Slow slope */ - 00888A 88 [ 1] 162 push a - 00888B 7B 0C [ 1] 163 ld a, (0x0c, sp) - 00888D A5 20 [ 1] 164 bcp a, #0x20 - 00888F 84 [ 1] 165 pop a - 008890 27 07 [ 1] 166 jreq 00111$ + 0084FE 88 [ 1] 162 push a + 0084FF 7B 0C [ 1] 163 ld a, (0x0c, sp) + 008501 A5 20 [ 1] 164 bcp a, #0x20 + 008503 84 [ 1] 165 pop a + 008504 27 07 [ 1] 166 jreq 00111$ 167 ; ../inc/stm8l151x/src/stm8l15x_gpio.c: 184: GPIOx->CR2 |= GPIO_Pin; - 008892 1A 06 [ 1] 168 or a, (0x06, sp) - 008894 1E 01 [ 2] 169 ldw x, (0x01, sp) - 008896 F7 [ 1] 170 ld (x), a - 008897 20 05 [ 2] 171 jra 00113$ - 008899 172 00111$: + 008506 1A 06 [ 1] 168 or a, (0x06, sp) + 008508 1E 01 [ 2] 169 ldw x, (0x01, sp) + 00850A F7 [ 1] 170 ld (x), a + 00850B 20 05 [ 2] 171 jra 00113$ + 00850D 172 00111$: 173 ; ../inc/stm8l151x/src/stm8l15x_gpio.c: 187: GPIOx->CR2 &= (uint8_t)(~(GPIO_Pin)); - 008899 14 03 [ 1] 174 and a, (0x03, sp) - 00889B 1E 01 [ 2] 175 ldw x, (0x01, sp) - 00889D F7 [ 1] 176 ld (x), a - 00889E 177 00113$: + 00850D 14 03 [ 1] 174 and a, (0x03, sp) + 00850F 1E 01 [ 2] 175 ldw x, (0x01, sp) + 008511 F7 [ 1] 176 ld (x), a + 008512 177 00113$: 178 ; ../inc/stm8l151x/src/stm8l15x_gpio.c: 190: } - 00889E 5B 08 [ 2] 179 addw sp, #8 - 0088A0 85 [ 2] 180 popw x - 0088A1 84 [ 1] 181 pop a - 0088A2 FC [ 2] 182 jp (x) + 008512 5B 08 [ 2] 179 addw sp, #8 + 008514 85 [ 2] 180 popw x + 008515 84 [ 1] 181 pop a + 008516 FC [ 2] 182 jp (x) 183 ; ../inc/stm8l151x/src/stm8l15x_gpio.c: 209: void GPIO_ExternalPullUpConfig(GPIO_TypeDef* GPIOx, uint8_t GPIO_Pin, FunctionalState NewState) 184 ; ----------------------------------------- 185 ; function GPIO_ExternalPullUpConfig 186 ; ----------------------------------------- - 0088A3 187 _GPIO_ExternalPullUpConfig: - 0088A3 88 [ 1] 188 push a + 008517 187 _GPIO_ExternalPullUpConfig: + 008517 88 [ 1] 188 push a 189 ; ../inc/stm8l151x/src/stm8l15x_gpio.c: 217: GPIOx->CR1 |= GPIO_Pin; - 0088A4 1C 00 03 [ 2] 190 addw x, #0x0003 - 0088A7 88 [ 1] 191 push a - 0088A8 F6 [ 1] 192 ld a, (x) - 0088A9 6B 02 [ 1] 193 ld (0x02, sp), a - 0088AB 84 [ 1] 194 pop a + 008518 1C 00 03 [ 2] 190 addw x, #0x0003 + 00851B 88 [ 1] 191 push a + 00851C F6 [ 1] 192 ld a, (x) + 00851D 6B 02 [ 1] 193 ld (0x02, sp), a + 00851F 84 [ 1] 194 pop a 195 ; ../inc/stm8l151x/src/stm8l15x_gpio.c: 215: if (NewState != DISABLE) /* External Pull-Up Set*/ - 0088AC 0D 04 [ 1] 196 tnz (0x04, sp) - 0088AE 27 05 [ 1] 197 jreq 00102$ + 008520 0D 04 [ 1] 196 tnz (0x04, sp) + 008522 27 05 [ 1] 197 jreq 00102$ 198 ; ../inc/stm8l151x/src/stm8l15x_gpio.c: 217: GPIOx->CR1 |= GPIO_Pin; - 0088B0 1A 01 [ 1] 199 or a, (0x01, sp) - 0088B2 F7 [ 1] 200 ld (x), a - 0088B3 20 04 [ 2] 201 jra 00104$ - 0088B5 202 00102$: + 008524 1A 01 [ 1] 199 or a, (0x01, sp) + 008526 F7 [ 1] 200 ld (x), a + 008527 20 04 [ 2] 201 jra 00104$ + 008529 202 00102$: 203 ; ../inc/stm8l151x/src/stm8l15x_gpio.c: 220: GPIOx->CR1 &= (uint8_t)(~(GPIO_Pin)); - 0088B5 43 [ 1] 204 cpl a - 0088B6 14 01 [ 1] 205 and a, (0x01, sp) - 0088B8 F7 [ 1] 206 ld (x), a - 0088B9 207 00104$: + 008529 43 [ 1] 204 cpl a + 00852A 14 01 [ 1] 205 and a, (0x01, sp) + 00852C F7 [ 1] 206 ld (x), a + 00852D 207 00104$: 208 ; ../inc/stm8l151x/src/stm8l15x_gpio.c: 222: } - 0088B9 84 [ 1] 209 pop a - 0088BA 85 [ 2] 210 popw x - 0088BB 84 [ 1] 211 pop a - 0088BC FC [ 2] 212 jp (x) + 00852D 84 [ 1] 209 pop a + 00852E 85 [ 2] 210 popw x + 00852F 84 [ 1] 211 pop a + 008530 FC [ 2] 212 jp (x) 213 ; ../inc/stm8l151x/src/stm8l15x_gpio.c: 248: void GPIO_Write(GPIO_TypeDef* GPIOx, uint8_t GPIO_PortVal) 214 ; ----------------------------------------- 215 ; function GPIO_Write 216 ; ----------------------------------------- - 0088BD 217 _GPIO_Write: + 008531 217 _GPIO_Write: 218 ; ../inc/stm8l151x/src/stm8l15x_gpio.c: 250: GPIOx->ODR = GPIO_PortVal; - 0088BD F7 [ 1] 219 ld (x), a + 008531 F7 [ 1] 219 ld (x), a 220 ; ../inc/stm8l151x/src/stm8l15x_gpio.c: 251: } - 0088BE 81 [ 4] 221 ret + 008532 81 [ 4] 221 ret 222 ; ../inc/stm8l151x/src/stm8l15x_gpio.c: 270: void GPIO_WriteBit(GPIO_TypeDef* GPIOx, GPIO_Pin_TypeDef GPIO_Pin, BitAction GPIO_BitVal) 223 ; ----------------------------------------- 224 ; function GPIO_WriteBit 225 ; ----------------------------------------- - 0088BF 226 _GPIO_WriteBit: - 0088BF 88 [ 1] 227 push a + 008533 226 _GPIO_WriteBit: + 008533 88 [ 1] 227 push a 228 ; ../inc/stm8l151x/src/stm8l15x_gpio.c: 278: GPIOx->ODR |= GPIO_Pin; - 0088C0 88 [ 1] 229 push a - 0088C1 F6 [ 1] 230 ld a, (x) - 0088C2 6B 02 [ 1] 231 ld (0x02, sp), a - 0088C4 84 [ 1] 232 pop a + 008534 88 [ 1] 229 push a + 008535 F6 [ 1] 230 ld a, (x) + 008536 6B 02 [ 1] 231 ld (0x02, sp), a + 008538 84 [ 1] 232 pop a 233 ; ../inc/stm8l151x/src/stm8l15x_gpio.c: 276: if (GPIO_BitVal != RESET) - 0088C5 0D 04 [ 1] 234 tnz (0x04, sp) - 0088C7 27 05 [ 1] 235 jreq 00102$ + 008539 0D 04 [ 1] 234 tnz (0x04, sp) + 00853B 27 05 [ 1] 235 jreq 00102$ 236 ; ../inc/stm8l151x/src/stm8l15x_gpio.c: 278: GPIOx->ODR |= GPIO_Pin; - 0088C9 1A 01 [ 1] 237 or a, (0x01, sp) - 0088CB F7 [ 1] 238 ld (x), a - 0088CC 20 04 [ 2] 239 jra 00104$ - 0088CE 240 00102$: + 00853D 1A 01 [ 1] 237 or a, (0x01, sp) + 00853F F7 [ 1] 238 ld (x), a + 008540 20 04 [ 2] 239 jra 00104$ + 008542 240 00102$: 241 ; ../inc/stm8l151x/src/stm8l15x_gpio.c: 283: GPIOx->ODR &= (uint8_t)(~GPIO_Pin); - 0088CE 43 [ 1] 242 cpl a - 0088CF 14 01 [ 1] 243 and a, (0x01, sp) - 0088D1 F7 [ 1] 244 ld (x), a - 0088D2 245 00104$: + 008542 43 [ 1] 242 cpl a + 008543 14 01 [ 1] 243 and a, (0x01, sp) + 008545 F7 [ 1] 244 ld (x), a + 008546 245 00104$: 246 ; ../inc/stm8l151x/src/stm8l15x_gpio.c: 285: } - 0088D2 84 [ 1] 247 pop a - 0088D3 85 [ 2] 248 popw x - 0088D4 84 [ 1] 249 pop a - 0088D5 FC [ 2] 250 jp (x) + 008546 84 [ 1] 247 pop a + 008547 85 [ 2] 248 popw x + 008548 84 [ 1] 249 pop a + 008549 FC [ 2] 250 jp (x) 251 ; ../inc/stm8l151x/src/stm8l15x_gpio.c: 303: void GPIO_SetBits(GPIO_TypeDef* GPIOx, uint8_t GPIO_Pin) 252 ; ----------------------------------------- 253 ; function GPIO_SetBits 254 ; ----------------------------------------- - 0088D6 255 _GPIO_SetBits: - 0088D6 88 [ 1] 256 push a - 0088D7 6B 01 [ 1] 257 ld (0x01, sp), a + 00854A 255 _GPIO_SetBits: + 00854A 88 [ 1] 256 push a + 00854B 6B 01 [ 1] 257 ld (0x01, sp), a 258 ; ../inc/stm8l151x/src/stm8l15x_gpio.c: 305: GPIOx->ODR |= GPIO_Pin; - 0088D9 F6 [ 1] 259 ld a, (x) - 0088DA 1A 01 [ 1] 260 or a, (0x01, sp) - 0088DC F7 [ 1] 261 ld (x), a + 00854D F6 [ 1] 259 ld a, (x) + 00854E 1A 01 [ 1] 260 or a, (0x01, sp) + 008550 F7 [ 1] 261 ld (x), a 262 ; ../inc/stm8l151x/src/stm8l15x_gpio.c: 306: } - 0088DD 84 [ 1] 263 pop a - 0088DE 81 [ 4] 264 ret + 008551 84 [ 1] 263 pop a + 008552 81 [ 4] 264 ret 265 ; ../inc/stm8l151x/src/stm8l15x_gpio.c: 324: void GPIO_ResetBits(GPIO_TypeDef* GPIOx, uint8_t GPIO_Pin) 266 ; ----------------------------------------- 267 ; function GPIO_ResetBits 268 ; ----------------------------------------- - 0088DF 269 _GPIO_ResetBits: - 0088DF 88 [ 1] 270 push a + 008553 269 _GPIO_ResetBits: + 008553 88 [ 1] 270 push a 271 ; ../inc/stm8l151x/src/stm8l15x_gpio.c: 326: GPIOx->ODR &= (uint8_t)(~GPIO_Pin); - 0088E0 88 [ 1] 272 push a - 0088E1 F6 [ 1] 273 ld a, (x) - 0088E2 6B 02 [ 1] 274 ld (0x02, sp), a - 0088E4 84 [ 1] 275 pop a - 0088E5 43 [ 1] 276 cpl a - 0088E6 14 01 [ 1] 277 and a, (0x01, sp) - 0088E8 F7 [ 1] 278 ld (x), a + 008554 88 [ 1] 272 push a + 008555 F6 [ 1] 273 ld a, (x) + 008556 6B 02 [ 1] 274 ld (0x02, sp), a + 008558 84 [ 1] 275 pop a + 008559 43 [ 1] 276 cpl a + 00855A 14 01 [ 1] 277 and a, (0x01, sp) + 00855C F7 [ 1] 278 ld (x), a 279 ; ../inc/stm8l151x/src/stm8l15x_gpio.c: 327: } - 0088E9 84 [ 1] 280 pop a - 0088EA 81 [ 4] 281 ret + 00855D 84 [ 1] 280 pop a + 00855E 81 [ 4] 281 ret 282 ; ../inc/stm8l151x/src/stm8l15x_gpio.c: 336: void GPIO_ToggleBits(GPIO_TypeDef* GPIOx, uint8_t GPIO_Pin) 283 ; ----------------------------------------- 284 ; function GPIO_ToggleBits 285 ; ----------------------------------------- - 0088EB 286 _GPIO_ToggleBits: - 0088EB 88 [ 1] 287 push a - 0088EC 6B 01 [ 1] 288 ld (0x01, sp), a + 00855F 286 _GPIO_ToggleBits: + 00855F 88 [ 1] 287 push a + 008560 6B 01 [ 1] 288 ld (0x01, sp), a 289 ; ../inc/stm8l151x/src/stm8l15x_gpio.c: 338: GPIOx->ODR ^= GPIO_Pin; - 0088EE F6 [ 1] 290 ld a, (x) - 0088EF 18 01 [ 1] 291 xor a, (0x01, sp) - 0088F1 F7 [ 1] 292 ld (x), a + 008562 F6 [ 1] 290 ld a, (x) + 008563 18 01 [ 1] 291 xor a, (0x01, sp) + 008565 F7 [ 1] 292 ld (x), a 293 ; ../inc/stm8l151x/src/stm8l15x_gpio.c: 339: } - 0088F2 84 [ 1] 294 pop a - 0088F3 81 [ 4] 295 ret + 008566 84 [ 1] 294 pop a + 008567 81 [ 4] 295 ret 296 ; ../inc/stm8l151x/src/stm8l15x_gpio.c: 347: uint8_t GPIO_ReadInputData(GPIO_TypeDef* GPIOx) 297 ; ----------------------------------------- 298 ; function GPIO_ReadInputData 299 ; ----------------------------------------- - 0088F4 300 _GPIO_ReadInputData: + 008568 300 _GPIO_ReadInputData: 301 ; ../inc/stm8l151x/src/stm8l15x_gpio.c: 349: return ((uint8_t)GPIOx->IDR); - 0088F4 E6 01 [ 1] 302 ld a, (0x1, x) + 008568 E6 01 [ 1] 302 ld a, (0x1, x) 303 ; ../inc/stm8l151x/src/stm8l15x_gpio.c: 350: } - 0088F6 81 [ 4] 304 ret + 00856A 81 [ 4] 304 ret 305 ; ../inc/stm8l151x/src/stm8l15x_gpio.c: 358: uint8_t GPIO_ReadOutputData(GPIO_TypeDef* GPIOx) 306 ; ----------------------------------------- 307 ; function GPIO_ReadOutputData 308 ; ----------------------------------------- - 0088F7 309 _GPIO_ReadOutputData: + 00856B 309 _GPIO_ReadOutputData: 310 ; ../inc/stm8l151x/src/stm8l15x_gpio.c: 360: return ((uint8_t)GPIOx->ODR); - 0088F7 F6 [ 1] 311 ld a, (x) + 00856B F6 [ 1] 311 ld a, (x) 312 ; ../inc/stm8l151x/src/stm8l15x_gpio.c: 361: } - 0088F8 81 [ 4] 313 ret + 00856C 81 [ 4] 313 ret 314 ; ../inc/stm8l151x/src/stm8l15x_gpio.c: 378: BitStatus GPIO_ReadInputDataBit(GPIO_TypeDef* GPIOx, GPIO_Pin_TypeDef GPIO_Pin) 315 ; ----------------------------------------- 316 ; function GPIO_ReadInputDataBit 317 ; ----------------------------------------- - 0088F9 318 _GPIO_ReadInputDataBit: - 0088F9 88 [ 1] 319 push a - 0088FA 6B 01 [ 1] 320 ld (0x01, sp), a + 00856D 318 _GPIO_ReadInputDataBit: + 00856D 88 [ 1] 319 push a + 00856E 6B 01 [ 1] 320 ld (0x01, sp), a 321 ; ../inc/stm8l151x/src/stm8l15x_gpio.c: 380: return ((BitStatus)(GPIOx->IDR & (uint8_t)GPIO_Pin)); - 0088FC E6 01 [ 1] 322 ld a, (0x1, x) - 0088FE 14 01 [ 1] 323 and a, (0x01, sp) - 008900 40 [ 1] 324 neg a - 008901 4F [ 1] 325 clr a - 008902 49 [ 1] 326 rlc a + 008570 E6 01 [ 1] 322 ld a, (0x1, x) + 008572 14 01 [ 1] 323 and a, (0x01, sp) + 008574 40 [ 1] 324 neg a + 008575 4F [ 1] 325 clr a + 008576 49 [ 1] 326 rlc a 327 ; ../inc/stm8l151x/src/stm8l15x_gpio.c: 381: } - 008903 5B 01 [ 2] 328 addw sp, #1 - 008905 81 [ 4] 329 ret + 008577 5B 01 [ 2] 328 addw sp, #1 + 008579 81 [ 4] 329 ret 330 ; ../inc/stm8l151x/src/stm8l15x_gpio.c: 389: BitStatus GPIO_ReadOutputDataBit(GPIO_TypeDef* GPIOx, GPIO_Pin_TypeDef GPIO_Pin) 331 ; ----------------------------------------- 332 ; function GPIO_ReadOutputDataBit 333 ; ----------------------------------------- - 008906 334 _GPIO_ReadOutputDataBit: - 008906 88 [ 1] 335 push a - 008907 6B 01 [ 1] 336 ld (0x01, sp), a + 00857A 334 _GPIO_ReadOutputDataBit: + 00857A 88 [ 1] 335 push a + 00857B 6B 01 [ 1] 336 ld (0x01, sp), a 337 ; ../inc/stm8l151x/src/stm8l15x_gpio.c: 391: return ((BitStatus)(GPIOx->ODR & (uint8_t)GPIO_Pin)); - 008909 F6 [ 1] 338 ld a, (x) - 00890A 14 01 [ 1] 339 and a, (0x01, sp) - 00890C 40 [ 1] 340 neg a - 00890D 4F [ 1] 341 clr a - 00890E 49 [ 1] 342 rlc a + 00857D F6 [ 1] 338 ld a, (x) + 00857E 14 01 [ 1] 339 and a, (0x01, sp) + 008580 40 [ 1] 340 neg a + 008581 4F [ 1] 341 clr a + 008582 49 [ 1] 342 rlc a 343 ; ../inc/stm8l151x/src/stm8l15x_gpio.c: 392: } - 00890F 5B 01 [ 2] 344 addw sp, #1 - 008911 81 [ 4] 345 ret + 008583 5B 01 [ 2] 344 addw sp, #1 + 008585 81 [ 4] 345 ret 346 .area CODE 347 .area CONST 348 .area INITIALIZER diff --git a/firmware/STM8L15X_LD/stm8l15x_it.asm b/firmware/STM8L15X_LD/stm8l15x_it.asm index 5f2e401..dd65b72 100644 --- a/firmware/STM8L15X_LD/stm8l15x_it.asm +++ b/firmware/STM8L15X_LD/stm8l15x_it.asm @@ -7,6 +7,7 @@ ;-------------------------------------------------------- ; Public variables in this module ;-------------------------------------------------------- + .globl _RTC_ClearITPendingBit .globl _TRAP_IRQHandler .globl _FLASH_IRQHandler .globl _DMA1_CHANNEL0_1_IRQHandler @@ -107,182 +108,186 @@ _DMA1_CHANNEL2_3_IRQHandler: ; function RTC_CSSLSE_IRQHandler ; ----------------------------------------- _RTC_CSSLSE_IRQHandler: -; ../src/stm8l15x_it.c: 116: } + div x, a +; ../src/stm8l15x_it.c: 113: RTC_ClearITPendingBit(RTC_IT_WUT); + ldw x, #0x0040 + call _RTC_ClearITPendingBit +; ../src/stm8l15x_it.c: 118: } iret -; ../src/stm8l15x_it.c: 122: INTERRUPT_HANDLER(EXTIE_F_PVD_IRQHandler,5) +; ../src/stm8l15x_it.c: 124: INTERRUPT_HANDLER(EXTIE_F_PVD_IRQHandler,5) ; ----------------------------------------- ; function EXTIE_F_PVD_IRQHandler ; ----------------------------------------- _EXTIE_F_PVD_IRQHandler: -; ../src/stm8l15x_it.c: 127: } +; ../src/stm8l15x_it.c: 129: } iret -; ../src/stm8l15x_it.c: 134: INTERRUPT_HANDLER(EXTIB_G_IRQHandler,6) +; ../src/stm8l15x_it.c: 136: INTERRUPT_HANDLER(EXTIB_G_IRQHandler,6) ; ----------------------------------------- ; function EXTIB_G_IRQHandler ; ----------------------------------------- _EXTIB_G_IRQHandler: -; ../src/stm8l15x_it.c: 139: } +; ../src/stm8l15x_it.c: 141: } iret -; ../src/stm8l15x_it.c: 146: INTERRUPT_HANDLER(EXTID_H_IRQHandler,7) +; ../src/stm8l15x_it.c: 148: INTERRUPT_HANDLER(EXTID_H_IRQHandler,7) ; ----------------------------------------- ; function EXTID_H_IRQHandler ; ----------------------------------------- _EXTID_H_IRQHandler: -; ../src/stm8l15x_it.c: 151: } +; ../src/stm8l15x_it.c: 153: } iret -; ../src/stm8l15x_it.c: 158: INTERRUPT_HANDLER(EXTI0_IRQHandler,8) +; ../src/stm8l15x_it.c: 160: INTERRUPT_HANDLER(EXTI0_IRQHandler,8) ; ----------------------------------------- ; function EXTI0_IRQHandler ; ----------------------------------------- _EXTI0_IRQHandler: -; ../src/stm8l15x_it.c: 163: } +; ../src/stm8l15x_it.c: 165: } iret -; ../src/stm8l15x_it.c: 170: INTERRUPT_HANDLER(EXTI1_IRQHandler,9) +; ../src/stm8l15x_it.c: 172: INTERRUPT_HANDLER(EXTI1_IRQHandler,9) ; ----------------------------------------- ; function EXTI1_IRQHandler ; ----------------------------------------- _EXTI1_IRQHandler: -; ../src/stm8l15x_it.c: 175: } +; ../src/stm8l15x_it.c: 177: } iret -; ../src/stm8l15x_it.c: 182: INTERRUPT_HANDLER(EXTI2_IRQHandler,10) +; ../src/stm8l15x_it.c: 184: INTERRUPT_HANDLER(EXTI2_IRQHandler,10) ; ----------------------------------------- ; function EXTI2_IRQHandler ; ----------------------------------------- _EXTI2_IRQHandler: -; ../src/stm8l15x_it.c: 187: } +; ../src/stm8l15x_it.c: 189: } iret -; ../src/stm8l15x_it.c: 194: INTERRUPT_HANDLER(EXTI3_IRQHandler,11) +; ../src/stm8l15x_it.c: 196: INTERRUPT_HANDLER(EXTI3_IRQHandler,11) ; ----------------------------------------- ; function EXTI3_IRQHandler ; ----------------------------------------- _EXTI3_IRQHandler: -; ../src/stm8l15x_it.c: 199: } +; ../src/stm8l15x_it.c: 201: } iret -; ../src/stm8l15x_it.c: 206: INTERRUPT_HANDLER(EXTI4_IRQHandler,12) +; ../src/stm8l15x_it.c: 208: INTERRUPT_HANDLER(EXTI4_IRQHandler,12) ; ----------------------------------------- ; function EXTI4_IRQHandler ; ----------------------------------------- _EXTI4_IRQHandler: -; ../src/stm8l15x_it.c: 211: } +; ../src/stm8l15x_it.c: 213: } iret -; ../src/stm8l15x_it.c: 218: INTERRUPT_HANDLER(EXTI5_IRQHandler,13) +; ../src/stm8l15x_it.c: 220: INTERRUPT_HANDLER(EXTI5_IRQHandler,13) ; ----------------------------------------- ; function EXTI5_IRQHandler ; ----------------------------------------- _EXTI5_IRQHandler: -; ../src/stm8l15x_it.c: 223: } +; ../src/stm8l15x_it.c: 225: } iret -; ../src/stm8l15x_it.c: 230: INTERRUPT_HANDLER(EXTI6_IRQHandler,14) +; ../src/stm8l15x_it.c: 232: INTERRUPT_HANDLER(EXTI6_IRQHandler,14) ; ----------------------------------------- ; function EXTI6_IRQHandler ; ----------------------------------------- _EXTI6_IRQHandler: -; ../src/stm8l15x_it.c: 235: } +; ../src/stm8l15x_it.c: 237: } iret -; ../src/stm8l15x_it.c: 242: INTERRUPT_HANDLER(EXTI7_IRQHandler,15) +; ../src/stm8l15x_it.c: 244: INTERRUPT_HANDLER(EXTI7_IRQHandler,15) ; ----------------------------------------- ; function EXTI7_IRQHandler ; ----------------------------------------- _EXTI7_IRQHandler: -; ../src/stm8l15x_it.c: 247: } +; ../src/stm8l15x_it.c: 249: } iret -; ../src/stm8l15x_it.c: 253: INTERRUPT_HANDLER(LCD_AES_IRQHandler,16) +; ../src/stm8l15x_it.c: 255: INTERRUPT_HANDLER(LCD_AES_IRQHandler,16) ; ----------------------------------------- ; function LCD_AES_IRQHandler ; ----------------------------------------- _LCD_AES_IRQHandler: -; ../src/stm8l15x_it.c: 258: } +; ../src/stm8l15x_it.c: 260: } iret -; ../src/stm8l15x_it.c: 264: INTERRUPT_HANDLER(SWITCH_CSS_BREAK_DAC_IRQHandler,17) +; ../src/stm8l15x_it.c: 266: INTERRUPT_HANDLER(SWITCH_CSS_BREAK_DAC_IRQHandler,17) ; ----------------------------------------- ; function SWITCH_CSS_BREAK_DAC_IRQHandler ; ----------------------------------------- _SWITCH_CSS_BREAK_DAC_IRQHandler: -; ../src/stm8l15x_it.c: 269: } +; ../src/stm8l15x_it.c: 271: } iret -; ../src/stm8l15x_it.c: 276: INTERRUPT_HANDLER(ADC1_COMP_IRQHandler,18) +; ../src/stm8l15x_it.c: 278: INTERRUPT_HANDLER(ADC1_COMP_IRQHandler,18) ; ----------------------------------------- ; function ADC1_COMP_IRQHandler ; ----------------------------------------- _ADC1_COMP_IRQHandler: -; ../src/stm8l15x_it.c: 281: } +; ../src/stm8l15x_it.c: 283: } iret -; ../src/stm8l15x_it.c: 288: INTERRUPT_HANDLER(TIM2_UPD_OVF_TRG_BRK_USART2_TX_IRQHandler,19) +; ../src/stm8l15x_it.c: 290: INTERRUPT_HANDLER(TIM2_UPD_OVF_TRG_BRK_USART2_TX_IRQHandler,19) ; ----------------------------------------- ; function TIM2_UPD_OVF_TRG_BRK_USART2_TX_IRQHandler ; ----------------------------------------- _TIM2_UPD_OVF_TRG_BRK_USART2_TX_IRQHandler: -; ../src/stm8l15x_it.c: 293: } +; ../src/stm8l15x_it.c: 295: } iret -; ../src/stm8l15x_it.c: 300: INTERRUPT_HANDLER(TIM2_CC_USART2_RX_IRQHandler,20) +; ../src/stm8l15x_it.c: 302: INTERRUPT_HANDLER(TIM2_CC_USART2_RX_IRQHandler,20) ; ----------------------------------------- ; function TIM2_CC_USART2_RX_IRQHandler ; ----------------------------------------- _TIM2_CC_USART2_RX_IRQHandler: -; ../src/stm8l15x_it.c: 305: } +; ../src/stm8l15x_it.c: 307: } iret -; ../src/stm8l15x_it.c: 313: INTERRUPT_HANDLER(TIM3_UPD_OVF_TRG_BRK_USART3_TX_IRQHandler,21) +; ../src/stm8l15x_it.c: 315: INTERRUPT_HANDLER(TIM3_UPD_OVF_TRG_BRK_USART3_TX_IRQHandler,21) ; ----------------------------------------- ; function TIM3_UPD_OVF_TRG_BRK_USART3_TX_IRQHandler ; ----------------------------------------- _TIM3_UPD_OVF_TRG_BRK_USART3_TX_IRQHandler: -; ../src/stm8l15x_it.c: 318: } +; ../src/stm8l15x_it.c: 320: } iret -; ../src/stm8l15x_it.c: 324: INTERRUPT_HANDLER(TIM3_CC_USART3_RX_IRQHandler,22) +; ../src/stm8l15x_it.c: 326: INTERRUPT_HANDLER(TIM3_CC_USART3_RX_IRQHandler,22) ; ----------------------------------------- ; function TIM3_CC_USART3_RX_IRQHandler ; ----------------------------------------- _TIM3_CC_USART3_RX_IRQHandler: -; ../src/stm8l15x_it.c: 329: } +; ../src/stm8l15x_it.c: 331: } iret -; ../src/stm8l15x_it.c: 335: INTERRUPT_HANDLER(TIM1_UPD_OVF_TRG_COM_IRQHandler,23) +; ../src/stm8l15x_it.c: 337: INTERRUPT_HANDLER(TIM1_UPD_OVF_TRG_COM_IRQHandler,23) ; ----------------------------------------- ; function TIM1_UPD_OVF_TRG_COM_IRQHandler ; ----------------------------------------- _TIM1_UPD_OVF_TRG_COM_IRQHandler: -; ../src/stm8l15x_it.c: 340: } +; ../src/stm8l15x_it.c: 342: } iret -; ../src/stm8l15x_it.c: 346: INTERRUPT_HANDLER(TIM1_CC_IRQHandler,24) +; ../src/stm8l15x_it.c: 348: INTERRUPT_HANDLER(TIM1_CC_IRQHandler,24) ; ----------------------------------------- ; function TIM1_CC_IRQHandler ; ----------------------------------------- _TIM1_CC_IRQHandler: -; ../src/stm8l15x_it.c: 351: } +; ../src/stm8l15x_it.c: 353: } iret -; ../src/stm8l15x_it.c: 358: INTERRUPT_HANDLER(TIM4_UPD_OVF_TRG_IRQHandler,25) +; ../src/stm8l15x_it.c: 360: INTERRUPT_HANDLER(TIM4_UPD_OVF_TRG_IRQHandler,25) ; ----------------------------------------- ; function TIM4_UPD_OVF_TRG_IRQHandler ; ----------------------------------------- _TIM4_UPD_OVF_TRG_IRQHandler: -; ../src/stm8l15x_it.c: 363: } +; ../src/stm8l15x_it.c: 365: } iret -; ../src/stm8l15x_it.c: 369: INTERRUPT_HANDLER(SPI1_IRQHandler,26) +; ../src/stm8l15x_it.c: 371: INTERRUPT_HANDLER(SPI1_IRQHandler,26) ; ----------------------------------------- ; function SPI1_IRQHandler ; ----------------------------------------- _SPI1_IRQHandler: -; ../src/stm8l15x_it.c: 374: } +; ../src/stm8l15x_it.c: 376: } iret -; ../src/stm8l15x_it.c: 381: INTERRUPT_HANDLER(USART1_TX_TIM5_UPD_OVF_TRG_BRK_IRQHandler,27) +; ../src/stm8l15x_it.c: 383: INTERRUPT_HANDLER(USART1_TX_TIM5_UPD_OVF_TRG_BRK_IRQHandler,27) ; ----------------------------------------- ; function USART1_TX_TIM5_UPD_OVF_TRG_BRK_IRQHandler ; ----------------------------------------- _USART1_TX_TIM5_UPD_OVF_TRG_BRK_IRQHandler: -; ../src/stm8l15x_it.c: 386: } +; ../src/stm8l15x_it.c: 388: } iret -; ../src/stm8l15x_it.c: 393: INTERRUPT_HANDLER(USART1_RX_TIM5_CC_IRQHandler,28) +; ../src/stm8l15x_it.c: 395: INTERRUPT_HANDLER(USART1_RX_TIM5_CC_IRQHandler,28) ; ----------------------------------------- ; function USART1_RX_TIM5_CC_IRQHandler ; ----------------------------------------- _USART1_RX_TIM5_CC_IRQHandler: -; ../src/stm8l15x_it.c: 398: } +; ../src/stm8l15x_it.c: 400: } iret -; ../src/stm8l15x_it.c: 405: INTERRUPT_HANDLER(I2C1_SPI2_IRQHandler,29) +; ../src/stm8l15x_it.c: 407: INTERRUPT_HANDLER(I2C1_SPI2_IRQHandler,29) ; ----------------------------------------- ; function I2C1_SPI2_IRQHandler ; ----------------------------------------- _I2C1_SPI2_IRQHandler: -; ../src/stm8l15x_it.c: 410: } +; ../src/stm8l15x_it.c: 412: } iret .area CODE .area CONST diff --git a/firmware/STM8L15X_LD/stm8l15x_it.lst b/firmware/STM8L15X_LD/stm8l15x_it.lst index ac4a222..d0694bc 100644 --- a/firmware/STM8L15X_LD/stm8l15x_it.lst +++ b/firmware/STM8L15X_LD/stm8l15x_it.lst @@ -7,284 +7,289 @@ 7 ;-------------------------------------------------------- 8 ; Public variables in this module 9 ;-------------------------------------------------------- - 10 .globl _TRAP_IRQHandler - 11 .globl _FLASH_IRQHandler - 12 .globl _DMA1_CHANNEL0_1_IRQHandler - 13 .globl _DMA1_CHANNEL2_3_IRQHandler - 14 .globl _RTC_CSSLSE_IRQHandler - 15 .globl _EXTIE_F_PVD_IRQHandler - 16 .globl _EXTIB_G_IRQHandler - 17 .globl _EXTID_H_IRQHandler - 18 .globl _EXTI0_IRQHandler - 19 .globl _EXTI1_IRQHandler - 20 .globl _EXTI2_IRQHandler - 21 .globl _EXTI3_IRQHandler - 22 .globl _EXTI4_IRQHandler - 23 .globl _EXTI5_IRQHandler - 24 .globl _EXTI6_IRQHandler - 25 .globl _EXTI7_IRQHandler - 26 .globl _LCD_AES_IRQHandler - 27 .globl _SWITCH_CSS_BREAK_DAC_IRQHandler - 28 .globl _ADC1_COMP_IRQHandler - 29 .globl _TIM2_UPD_OVF_TRG_BRK_USART2_TX_IRQHandler - 30 .globl _TIM2_CC_USART2_RX_IRQHandler - 31 .globl _TIM3_UPD_OVF_TRG_BRK_USART3_TX_IRQHandler - 32 .globl _TIM3_CC_USART3_RX_IRQHandler - 33 .globl _TIM1_UPD_OVF_TRG_COM_IRQHandler - 34 .globl _TIM1_CC_IRQHandler - 35 .globl _TIM4_UPD_OVF_TRG_IRQHandler - 36 .globl _SPI1_IRQHandler - 37 .globl _USART1_TX_TIM5_UPD_OVF_TRG_BRK_IRQHandler - 38 .globl _USART1_RX_TIM5_CC_IRQHandler - 39 .globl _I2C1_SPI2_IRQHandler - 40 ;-------------------------------------------------------- - 41 ; ram data - 42 ;-------------------------------------------------------- - 43 .area DATA - 44 ;-------------------------------------------------------- - 45 ; ram data - 46 ;-------------------------------------------------------- - 47 .area INITIALIZED - 48 ;-------------------------------------------------------- - 49 ; absolute external ram data - 50 ;-------------------------------------------------------- - 51 .area DABS (ABS) - 52 - 53 ; default segment ordering for linker - 54 .area HOME - 55 .area GSINIT - 56 .area GSFINAL - 57 .area CONST - 58 .area INITIALIZER - 59 .area CODE - 60 - 61 ;-------------------------------------------------------- - 62 ; global & static initialisations - 63 ;-------------------------------------------------------- - 64 .area HOME - 65 .area GSINIT - 66 .area GSFINAL - 67 .area GSINIT - 68 ;-------------------------------------------------------- - 69 ; Home - 70 ;-------------------------------------------------------- - 71 .area HOME + 10 .globl _RTC_ClearITPendingBit + 11 .globl _TRAP_IRQHandler + 12 .globl _FLASH_IRQHandler + 13 .globl _DMA1_CHANNEL0_1_IRQHandler + 14 .globl _DMA1_CHANNEL2_3_IRQHandler + 15 .globl _RTC_CSSLSE_IRQHandler + 16 .globl _EXTIE_F_PVD_IRQHandler + 17 .globl _EXTIB_G_IRQHandler + 18 .globl _EXTID_H_IRQHandler + 19 .globl _EXTI0_IRQHandler + 20 .globl _EXTI1_IRQHandler + 21 .globl _EXTI2_IRQHandler + 22 .globl _EXTI3_IRQHandler + 23 .globl _EXTI4_IRQHandler + 24 .globl _EXTI5_IRQHandler + 25 .globl _EXTI6_IRQHandler + 26 .globl _EXTI7_IRQHandler + 27 .globl _LCD_AES_IRQHandler + 28 .globl _SWITCH_CSS_BREAK_DAC_IRQHandler + 29 .globl _ADC1_COMP_IRQHandler + 30 .globl _TIM2_UPD_OVF_TRG_BRK_USART2_TX_IRQHandler + 31 .globl _TIM2_CC_USART2_RX_IRQHandler + 32 .globl _TIM3_UPD_OVF_TRG_BRK_USART3_TX_IRQHandler + 33 .globl _TIM3_CC_USART3_RX_IRQHandler + 34 .globl _TIM1_UPD_OVF_TRG_COM_IRQHandler + 35 .globl _TIM1_CC_IRQHandler + 36 .globl _TIM4_UPD_OVF_TRG_IRQHandler + 37 .globl _SPI1_IRQHandler + 38 .globl _USART1_TX_TIM5_UPD_OVF_TRG_BRK_IRQHandler + 39 .globl _USART1_RX_TIM5_CC_IRQHandler + 40 .globl _I2C1_SPI2_IRQHandler + 41 ;-------------------------------------------------------- + 42 ; ram data + 43 ;-------------------------------------------------------- + 44 .area DATA + 45 ;-------------------------------------------------------- + 46 ; ram data + 47 ;-------------------------------------------------------- + 48 .area INITIALIZED + 49 ;-------------------------------------------------------- + 50 ; absolute external ram data + 51 ;-------------------------------------------------------- + 52 .area DABS (ABS) + 53 + 54 ; default segment ordering for linker + 55 .area HOME + 56 .area GSINIT + 57 .area GSFINAL + 58 .area CONST + 59 .area INITIALIZER + 60 .area CODE + 61 + 62 ;-------------------------------------------------------- + 63 ; global & static initialisations + 64 ;-------------------------------------------------------- + 65 .area HOME + 66 .area GSINIT + 67 .area GSFINAL + 68 .area GSINIT + 69 ;-------------------------------------------------------- + 70 ; Home + 71 ;-------------------------------------------------------- 72 .area HOME - 73 ;-------------------------------------------------------- - 74 ; code - 75 ;-------------------------------------------------------- - 76 .area CODE - 77 ; ../src/stm8l15x_it.c: 67: INTERRUPT_HANDLER_TRAP(TRAP_IRQHandler) - 78 ; ----------------------------------------- - 79 ; function TRAP_IRQHandler - 80 ; ----------------------------------------- - 000000 81 _TRAP_IRQHandler: - 82 ; ../src/stm8l15x_it.c: 72: } - 000000 80 [11] 83 iret - 84 ; ../src/stm8l15x_it.c: 78: INTERRUPT_HANDLER(FLASH_IRQHandler,1) - 85 ; ----------------------------------------- - 86 ; function FLASH_IRQHandler - 87 ; ----------------------------------------- - 000001 88 _FLASH_IRQHandler: - 89 ; ../src/stm8l15x_it.c: 83: } - 000001 80 [11] 90 iret - 91 ; ../src/stm8l15x_it.c: 89: INTERRUPT_HANDLER(DMA1_CHANNEL0_1_IRQHandler,2) - 92 ; ----------------------------------------- - 93 ; function DMA1_CHANNEL0_1_IRQHandler - 94 ; ----------------------------------------- - 000002 95 _DMA1_CHANNEL0_1_IRQHandler: - 96 ; ../src/stm8l15x_it.c: 94: } - 000002 80 [11] 97 iret - 98 ; ../src/stm8l15x_it.c: 100: INTERRUPT_HANDLER(DMA1_CHANNEL2_3_IRQHandler,3) - 99 ; ----------------------------------------- - 100 ; function DMA1_CHANNEL2_3_IRQHandler - 101 ; ----------------------------------------- - 000003 102 _DMA1_CHANNEL2_3_IRQHandler: - 103 ; ../src/stm8l15x_it.c: 105: } - 000003 80 [11] 104 iret - 105 ; ../src/stm8l15x_it.c: 111: INTERRUPT_HANDLER(RTC_CSSLSE_IRQHandler,4) - 106 ; ----------------------------------------- - 107 ; function RTC_CSSLSE_IRQHandler - 108 ; ----------------------------------------- - 000004 109 _RTC_CSSLSE_IRQHandler: - 110 ; ../src/stm8l15x_it.c: 116: } - 000004 80 [11] 111 iret - 112 ; ../src/stm8l15x_it.c: 122: INTERRUPT_HANDLER(EXTIE_F_PVD_IRQHandler,5) - 113 ; ----------------------------------------- - 114 ; function EXTIE_F_PVD_IRQHandler - 115 ; ----------------------------------------- - 000005 116 _EXTIE_F_PVD_IRQHandler: - 117 ; ../src/stm8l15x_it.c: 127: } - 000005 80 [11] 118 iret - 119 ; ../src/stm8l15x_it.c: 134: INTERRUPT_HANDLER(EXTIB_G_IRQHandler,6) + 73 .area HOME + 74 ;-------------------------------------------------------- + 75 ; code + 76 ;-------------------------------------------------------- + 77 .area CODE + 78 ; ../src/stm8l15x_it.c: 67: INTERRUPT_HANDLER_TRAP(TRAP_IRQHandler) + 79 ; ----------------------------------------- + 80 ; function TRAP_IRQHandler + 81 ; ----------------------------------------- + 000000 82 _TRAP_IRQHandler: + 83 ; ../src/stm8l15x_it.c: 72: } + 000000 80 [11] 84 iret + 85 ; ../src/stm8l15x_it.c: 78: INTERRUPT_HANDLER(FLASH_IRQHandler,1) + 86 ; ----------------------------------------- + 87 ; function FLASH_IRQHandler + 88 ; ----------------------------------------- + 000001 89 _FLASH_IRQHandler: + 90 ; ../src/stm8l15x_it.c: 83: } + 000001 80 [11] 91 iret + 92 ; ../src/stm8l15x_it.c: 89: INTERRUPT_HANDLER(DMA1_CHANNEL0_1_IRQHandler,2) + 93 ; ----------------------------------------- + 94 ; function DMA1_CHANNEL0_1_IRQHandler + 95 ; ----------------------------------------- + 000002 96 _DMA1_CHANNEL0_1_IRQHandler: + 97 ; ../src/stm8l15x_it.c: 94: } + 000002 80 [11] 98 iret + 99 ; ../src/stm8l15x_it.c: 100: INTERRUPT_HANDLER(DMA1_CHANNEL2_3_IRQHandler,3) + 100 ; ----------------------------------------- + 101 ; function DMA1_CHANNEL2_3_IRQHandler + 102 ; ----------------------------------------- + 000003 103 _DMA1_CHANNEL2_3_IRQHandler: + 104 ; ../src/stm8l15x_it.c: 105: } + 000003 80 [11] 105 iret + 106 ; ../src/stm8l15x_it.c: 111: INTERRUPT_HANDLER(RTC_CSSLSE_IRQHandler,4) + 107 ; ----------------------------------------- + 108 ; function RTC_CSSLSE_IRQHandler + 109 ; ----------------------------------------- + 000004 110 _RTC_CSSLSE_IRQHandler: + 000004 62 [ 2] 111 div x, a + 112 ; ../src/stm8l15x_it.c: 113: RTC_ClearITPendingBit(RTC_IT_WUT); + 000005 AE 00 40 [ 2] 113 ldw x, #0x0040 + 000008 CDr00r00 [ 4] 114 call _RTC_ClearITPendingBit + 115 ; ../src/stm8l15x_it.c: 118: } + 00000B 80 [11] 116 iret + 117 ; ../src/stm8l15x_it.c: 124: INTERRUPT_HANDLER(EXTIE_F_PVD_IRQHandler,5) + 118 ; ----------------------------------------- + 119 ; function EXTIE_F_PVD_IRQHandler 120 ; ----------------------------------------- - 121 ; function EXTIB_G_IRQHandler - 122 ; ----------------------------------------- - 000006 123 _EXTIB_G_IRQHandler: - 124 ; ../src/stm8l15x_it.c: 139: } - 000006 80 [11] 125 iret - 126 ; ../src/stm8l15x_it.c: 146: INTERRUPT_HANDLER(EXTID_H_IRQHandler,7) + 00000C 121 _EXTIE_F_PVD_IRQHandler: + 122 ; ../src/stm8l15x_it.c: 129: } + 00000C 80 [11] 123 iret + 124 ; ../src/stm8l15x_it.c: 136: INTERRUPT_HANDLER(EXTIB_G_IRQHandler,6) + 125 ; ----------------------------------------- + 126 ; function EXTIB_G_IRQHandler 127 ; ----------------------------------------- - 128 ; function EXTID_H_IRQHandler - 129 ; ----------------------------------------- - 000007 130 _EXTID_H_IRQHandler: - 131 ; ../src/stm8l15x_it.c: 151: } - 000007 80 [11] 132 iret - 133 ; ../src/stm8l15x_it.c: 158: INTERRUPT_HANDLER(EXTI0_IRQHandler,8) + 00000D 128 _EXTIB_G_IRQHandler: + 129 ; ../src/stm8l15x_it.c: 141: } + 00000D 80 [11] 130 iret + 131 ; ../src/stm8l15x_it.c: 148: INTERRUPT_HANDLER(EXTID_H_IRQHandler,7) + 132 ; ----------------------------------------- + 133 ; function EXTID_H_IRQHandler 134 ; ----------------------------------------- - 135 ; function EXTI0_IRQHandler - 136 ; ----------------------------------------- - 000008 137 _EXTI0_IRQHandler: - 138 ; ../src/stm8l15x_it.c: 163: } - 000008 80 [11] 139 iret - 140 ; ../src/stm8l15x_it.c: 170: INTERRUPT_HANDLER(EXTI1_IRQHandler,9) + 00000E 135 _EXTID_H_IRQHandler: + 136 ; ../src/stm8l15x_it.c: 153: } + 00000E 80 [11] 137 iret + 138 ; ../src/stm8l15x_it.c: 160: INTERRUPT_HANDLER(EXTI0_IRQHandler,8) + 139 ; ----------------------------------------- + 140 ; function EXTI0_IRQHandler 141 ; ----------------------------------------- - 142 ; function EXTI1_IRQHandler - 143 ; ----------------------------------------- - 000009 144 _EXTI1_IRQHandler: - 145 ; ../src/stm8l15x_it.c: 175: } - 000009 80 [11] 146 iret - 147 ; ../src/stm8l15x_it.c: 182: INTERRUPT_HANDLER(EXTI2_IRQHandler,10) + 00000F 142 _EXTI0_IRQHandler: + 143 ; ../src/stm8l15x_it.c: 165: } + 00000F 80 [11] 144 iret + 145 ; ../src/stm8l15x_it.c: 172: INTERRUPT_HANDLER(EXTI1_IRQHandler,9) + 146 ; ----------------------------------------- + 147 ; function EXTI1_IRQHandler 148 ; ----------------------------------------- - 149 ; function EXTI2_IRQHandler - 150 ; ----------------------------------------- - 00000A 151 _EXTI2_IRQHandler: - 152 ; ../src/stm8l15x_it.c: 187: } - 00000A 80 [11] 153 iret - 154 ; ../src/stm8l15x_it.c: 194: INTERRUPT_HANDLER(EXTI3_IRQHandler,11) + 000010 149 _EXTI1_IRQHandler: + 150 ; ../src/stm8l15x_it.c: 177: } + 000010 80 [11] 151 iret + 152 ; ../src/stm8l15x_it.c: 184: INTERRUPT_HANDLER(EXTI2_IRQHandler,10) + 153 ; ----------------------------------------- + 154 ; function EXTI2_IRQHandler 155 ; ----------------------------------------- - 156 ; function EXTI3_IRQHandler - 157 ; ----------------------------------------- - 00000B 158 _EXTI3_IRQHandler: - 159 ; ../src/stm8l15x_it.c: 199: } - 00000B 80 [11] 160 iret - 161 ; ../src/stm8l15x_it.c: 206: INTERRUPT_HANDLER(EXTI4_IRQHandler,12) + 000011 156 _EXTI2_IRQHandler: + 157 ; ../src/stm8l15x_it.c: 189: } + 000011 80 [11] 158 iret + 159 ; ../src/stm8l15x_it.c: 196: INTERRUPT_HANDLER(EXTI3_IRQHandler,11) + 160 ; ----------------------------------------- + 161 ; function EXTI3_IRQHandler 162 ; ----------------------------------------- - 163 ; function EXTI4_IRQHandler - 164 ; ----------------------------------------- - 00000C 165 _EXTI4_IRQHandler: - 166 ; ../src/stm8l15x_it.c: 211: } - 00000C 80 [11] 167 iret - 168 ; ../src/stm8l15x_it.c: 218: INTERRUPT_HANDLER(EXTI5_IRQHandler,13) + 000012 163 _EXTI3_IRQHandler: + 164 ; ../src/stm8l15x_it.c: 201: } + 000012 80 [11] 165 iret + 166 ; ../src/stm8l15x_it.c: 208: INTERRUPT_HANDLER(EXTI4_IRQHandler,12) + 167 ; ----------------------------------------- + 168 ; function EXTI4_IRQHandler 169 ; ----------------------------------------- - 170 ; function EXTI5_IRQHandler - 171 ; ----------------------------------------- - 00000D 172 _EXTI5_IRQHandler: - 173 ; ../src/stm8l15x_it.c: 223: } - 00000D 80 [11] 174 iret - 175 ; ../src/stm8l15x_it.c: 230: INTERRUPT_HANDLER(EXTI6_IRQHandler,14) + 000013 170 _EXTI4_IRQHandler: + 171 ; ../src/stm8l15x_it.c: 213: } + 000013 80 [11] 172 iret + 173 ; ../src/stm8l15x_it.c: 220: INTERRUPT_HANDLER(EXTI5_IRQHandler,13) + 174 ; ----------------------------------------- + 175 ; function EXTI5_IRQHandler 176 ; ----------------------------------------- - 177 ; function EXTI6_IRQHandler - 178 ; ----------------------------------------- - 00000E 179 _EXTI6_IRQHandler: - 180 ; ../src/stm8l15x_it.c: 235: } - 00000E 80 [11] 181 iret - 182 ; ../src/stm8l15x_it.c: 242: INTERRUPT_HANDLER(EXTI7_IRQHandler,15) + 000014 177 _EXTI5_IRQHandler: + 178 ; ../src/stm8l15x_it.c: 225: } + 000014 80 [11] 179 iret + 180 ; ../src/stm8l15x_it.c: 232: INTERRUPT_HANDLER(EXTI6_IRQHandler,14) + 181 ; ----------------------------------------- + 182 ; function EXTI6_IRQHandler 183 ; ----------------------------------------- - 184 ; function EXTI7_IRQHandler - 185 ; ----------------------------------------- - 00000F 186 _EXTI7_IRQHandler: - 187 ; ../src/stm8l15x_it.c: 247: } - 00000F 80 [11] 188 iret - 189 ; ../src/stm8l15x_it.c: 253: INTERRUPT_HANDLER(LCD_AES_IRQHandler,16) + 000015 184 _EXTI6_IRQHandler: + 185 ; ../src/stm8l15x_it.c: 237: } + 000015 80 [11] 186 iret + 187 ; ../src/stm8l15x_it.c: 244: INTERRUPT_HANDLER(EXTI7_IRQHandler,15) + 188 ; ----------------------------------------- + 189 ; function EXTI7_IRQHandler 190 ; ----------------------------------------- - 191 ; function LCD_AES_IRQHandler - 192 ; ----------------------------------------- - 000010 193 _LCD_AES_IRQHandler: - 194 ; ../src/stm8l15x_it.c: 258: } - 000010 80 [11] 195 iret - 196 ; ../src/stm8l15x_it.c: 264: INTERRUPT_HANDLER(SWITCH_CSS_BREAK_DAC_IRQHandler,17) + 000016 191 _EXTI7_IRQHandler: + 192 ; ../src/stm8l15x_it.c: 249: } + 000016 80 [11] 193 iret + 194 ; ../src/stm8l15x_it.c: 255: INTERRUPT_HANDLER(LCD_AES_IRQHandler,16) + 195 ; ----------------------------------------- + 196 ; function LCD_AES_IRQHandler 197 ; ----------------------------------------- - 198 ; function SWITCH_CSS_BREAK_DAC_IRQHandler - 199 ; ----------------------------------------- - 000011 200 _SWITCH_CSS_BREAK_DAC_IRQHandler: - 201 ; ../src/stm8l15x_it.c: 269: } - 000011 80 [11] 202 iret - 203 ; ../src/stm8l15x_it.c: 276: INTERRUPT_HANDLER(ADC1_COMP_IRQHandler,18) + 000017 198 _LCD_AES_IRQHandler: + 199 ; ../src/stm8l15x_it.c: 260: } + 000017 80 [11] 200 iret + 201 ; ../src/stm8l15x_it.c: 266: INTERRUPT_HANDLER(SWITCH_CSS_BREAK_DAC_IRQHandler,17) + 202 ; ----------------------------------------- + 203 ; function SWITCH_CSS_BREAK_DAC_IRQHandler 204 ; ----------------------------------------- - 205 ; function ADC1_COMP_IRQHandler - 206 ; ----------------------------------------- - 000012 207 _ADC1_COMP_IRQHandler: - 208 ; ../src/stm8l15x_it.c: 281: } - 000012 80 [11] 209 iret - 210 ; ../src/stm8l15x_it.c: 288: INTERRUPT_HANDLER(TIM2_UPD_OVF_TRG_BRK_USART2_TX_IRQHandler,19) + 000018 205 _SWITCH_CSS_BREAK_DAC_IRQHandler: + 206 ; ../src/stm8l15x_it.c: 271: } + 000018 80 [11] 207 iret + 208 ; ../src/stm8l15x_it.c: 278: INTERRUPT_HANDLER(ADC1_COMP_IRQHandler,18) + 209 ; ----------------------------------------- + 210 ; function ADC1_COMP_IRQHandler 211 ; ----------------------------------------- - 212 ; function TIM2_UPD_OVF_TRG_BRK_USART2_TX_IRQHandler - 213 ; ----------------------------------------- - 000013 214 _TIM2_UPD_OVF_TRG_BRK_USART2_TX_IRQHandler: - 215 ; ../src/stm8l15x_it.c: 293: } - 000013 80 [11] 216 iret - 217 ; ../src/stm8l15x_it.c: 300: INTERRUPT_HANDLER(TIM2_CC_USART2_RX_IRQHandler,20) + 000019 212 _ADC1_COMP_IRQHandler: + 213 ; ../src/stm8l15x_it.c: 283: } + 000019 80 [11] 214 iret + 215 ; ../src/stm8l15x_it.c: 290: INTERRUPT_HANDLER(TIM2_UPD_OVF_TRG_BRK_USART2_TX_IRQHandler,19) + 216 ; ----------------------------------------- + 217 ; function TIM2_UPD_OVF_TRG_BRK_USART2_TX_IRQHandler 218 ; ----------------------------------------- - 219 ; function TIM2_CC_USART2_RX_IRQHandler - 220 ; ----------------------------------------- - 000014 221 _TIM2_CC_USART2_RX_IRQHandler: - 222 ; ../src/stm8l15x_it.c: 305: } - 000014 80 [11] 223 iret - 224 ; ../src/stm8l15x_it.c: 313: INTERRUPT_HANDLER(TIM3_UPD_OVF_TRG_BRK_USART3_TX_IRQHandler,21) + 00001A 219 _TIM2_UPD_OVF_TRG_BRK_USART2_TX_IRQHandler: + 220 ; ../src/stm8l15x_it.c: 295: } + 00001A 80 [11] 221 iret + 222 ; ../src/stm8l15x_it.c: 302: INTERRUPT_HANDLER(TIM2_CC_USART2_RX_IRQHandler,20) + 223 ; ----------------------------------------- + 224 ; function TIM2_CC_USART2_RX_IRQHandler 225 ; ----------------------------------------- - 226 ; function TIM3_UPD_OVF_TRG_BRK_USART3_TX_IRQHandler - 227 ; ----------------------------------------- - 000015 228 _TIM3_UPD_OVF_TRG_BRK_USART3_TX_IRQHandler: - 229 ; ../src/stm8l15x_it.c: 318: } - 000015 80 [11] 230 iret - 231 ; ../src/stm8l15x_it.c: 324: INTERRUPT_HANDLER(TIM3_CC_USART3_RX_IRQHandler,22) + 00001B 226 _TIM2_CC_USART2_RX_IRQHandler: + 227 ; ../src/stm8l15x_it.c: 307: } + 00001B 80 [11] 228 iret + 229 ; ../src/stm8l15x_it.c: 315: INTERRUPT_HANDLER(TIM3_UPD_OVF_TRG_BRK_USART3_TX_IRQHandler,21) + 230 ; ----------------------------------------- + 231 ; function TIM3_UPD_OVF_TRG_BRK_USART3_TX_IRQHandler 232 ; ----------------------------------------- - 233 ; function TIM3_CC_USART3_RX_IRQHandler - 234 ; ----------------------------------------- - 000016 235 _TIM3_CC_USART3_RX_IRQHandler: - 236 ; ../src/stm8l15x_it.c: 329: } - 000016 80 [11] 237 iret - 238 ; ../src/stm8l15x_it.c: 335: INTERRUPT_HANDLER(TIM1_UPD_OVF_TRG_COM_IRQHandler,23) + 00001C 233 _TIM3_UPD_OVF_TRG_BRK_USART3_TX_IRQHandler: + 234 ; ../src/stm8l15x_it.c: 320: } + 00001C 80 [11] 235 iret + 236 ; ../src/stm8l15x_it.c: 326: INTERRUPT_HANDLER(TIM3_CC_USART3_RX_IRQHandler,22) + 237 ; ----------------------------------------- + 238 ; function TIM3_CC_USART3_RX_IRQHandler 239 ; ----------------------------------------- - 240 ; function TIM1_UPD_OVF_TRG_COM_IRQHandler - 241 ; ----------------------------------------- - 000017 242 _TIM1_UPD_OVF_TRG_COM_IRQHandler: - 243 ; ../src/stm8l15x_it.c: 340: } - 000017 80 [11] 244 iret - 245 ; ../src/stm8l15x_it.c: 346: INTERRUPT_HANDLER(TIM1_CC_IRQHandler,24) + 00001D 240 _TIM3_CC_USART3_RX_IRQHandler: + 241 ; ../src/stm8l15x_it.c: 331: } + 00001D 80 [11] 242 iret + 243 ; ../src/stm8l15x_it.c: 337: INTERRUPT_HANDLER(TIM1_UPD_OVF_TRG_COM_IRQHandler,23) + 244 ; ----------------------------------------- + 245 ; function TIM1_UPD_OVF_TRG_COM_IRQHandler 246 ; ----------------------------------------- - 247 ; function TIM1_CC_IRQHandler - 248 ; ----------------------------------------- - 000018 249 _TIM1_CC_IRQHandler: - 250 ; ../src/stm8l15x_it.c: 351: } - 000018 80 [11] 251 iret - 252 ; ../src/stm8l15x_it.c: 358: INTERRUPT_HANDLER(TIM4_UPD_OVF_TRG_IRQHandler,25) + 00001E 247 _TIM1_UPD_OVF_TRG_COM_IRQHandler: + 248 ; ../src/stm8l15x_it.c: 342: } + 00001E 80 [11] 249 iret + 250 ; ../src/stm8l15x_it.c: 348: INTERRUPT_HANDLER(TIM1_CC_IRQHandler,24) + 251 ; ----------------------------------------- + 252 ; function TIM1_CC_IRQHandler 253 ; ----------------------------------------- - 254 ; function TIM4_UPD_OVF_TRG_IRQHandler - 255 ; ----------------------------------------- - 000019 256 _TIM4_UPD_OVF_TRG_IRQHandler: - 257 ; ../src/stm8l15x_it.c: 363: } - 000019 80 [11] 258 iret - 259 ; ../src/stm8l15x_it.c: 369: INTERRUPT_HANDLER(SPI1_IRQHandler,26) + 00001F 254 _TIM1_CC_IRQHandler: + 255 ; ../src/stm8l15x_it.c: 353: } + 00001F 80 [11] 256 iret + 257 ; ../src/stm8l15x_it.c: 360: INTERRUPT_HANDLER(TIM4_UPD_OVF_TRG_IRQHandler,25) + 258 ; ----------------------------------------- + 259 ; function TIM4_UPD_OVF_TRG_IRQHandler 260 ; ----------------------------------------- - 261 ; function SPI1_IRQHandler - 262 ; ----------------------------------------- - 00001A 263 _SPI1_IRQHandler: - 264 ; ../src/stm8l15x_it.c: 374: } - 00001A 80 [11] 265 iret - 266 ; ../src/stm8l15x_it.c: 381: INTERRUPT_HANDLER(USART1_TX_TIM5_UPD_OVF_TRG_BRK_IRQHandler,27) + 000020 261 _TIM4_UPD_OVF_TRG_IRQHandler: + 262 ; ../src/stm8l15x_it.c: 365: } + 000020 80 [11] 263 iret + 264 ; ../src/stm8l15x_it.c: 371: INTERRUPT_HANDLER(SPI1_IRQHandler,26) + 265 ; ----------------------------------------- + 266 ; function SPI1_IRQHandler 267 ; ----------------------------------------- - 268 ; function USART1_TX_TIM5_UPD_OVF_TRG_BRK_IRQHandler - 269 ; ----------------------------------------- - 00001B 270 _USART1_TX_TIM5_UPD_OVF_TRG_BRK_IRQHandler: - 271 ; ../src/stm8l15x_it.c: 386: } - 00001B 80 [11] 272 iret - 273 ; ../src/stm8l15x_it.c: 393: INTERRUPT_HANDLER(USART1_RX_TIM5_CC_IRQHandler,28) + 000021 268 _SPI1_IRQHandler: + 269 ; ../src/stm8l15x_it.c: 376: } + 000021 80 [11] 270 iret + 271 ; ../src/stm8l15x_it.c: 383: INTERRUPT_HANDLER(USART1_TX_TIM5_UPD_OVF_TRG_BRK_IRQHandler,27) + 272 ; ----------------------------------------- + 273 ; function USART1_TX_TIM5_UPD_OVF_TRG_BRK_IRQHandler 274 ; ----------------------------------------- - 275 ; function USART1_RX_TIM5_CC_IRQHandler - 276 ; ----------------------------------------- - 00001C 277 _USART1_RX_TIM5_CC_IRQHandler: - 278 ; ../src/stm8l15x_it.c: 398: } - 00001C 80 [11] 279 iret - 280 ; ../src/stm8l15x_it.c: 405: INTERRUPT_HANDLER(I2C1_SPI2_IRQHandler,29) + 000022 275 _USART1_TX_TIM5_UPD_OVF_TRG_BRK_IRQHandler: + 276 ; ../src/stm8l15x_it.c: 388: } + 000022 80 [11] 277 iret + 278 ; ../src/stm8l15x_it.c: 395: INTERRUPT_HANDLER(USART1_RX_TIM5_CC_IRQHandler,28) + 279 ; ----------------------------------------- + 280 ; function USART1_RX_TIM5_CC_IRQHandler 281 ; ----------------------------------------- - 282 ; function I2C1_SPI2_IRQHandler - 283 ; ----------------------------------------- - 00001D 284 _I2C1_SPI2_IRQHandler: - 285 ; ../src/stm8l15x_it.c: 410: } - 00001D 80 [11] 286 iret - 287 .area CODE - 288 .area CONST - 289 .area INITIALIZER - 290 .area CABS (ABS) + 000023 282 _USART1_RX_TIM5_CC_IRQHandler: + 283 ; ../src/stm8l15x_it.c: 400: } + 000023 80 [11] 284 iret + 285 ; ../src/stm8l15x_it.c: 407: INTERRUPT_HANDLER(I2C1_SPI2_IRQHandler,29) + 286 ; ----------------------------------------- + 287 ; function I2C1_SPI2_IRQHandler + 288 ; ----------------------------------------- + 000024 289 _I2C1_SPI2_IRQHandler: + 290 ; ../src/stm8l15x_it.c: 412: } + 000024 80 [11] 291 iret + 292 .area CODE + 293 .area CONST + 294 .area INITIALIZER + 295 .area CABS (ABS) diff --git a/firmware/STM8L15X_LD/stm8l15x_it.rel b/firmware/STM8L15X_LD/stm8l15x_it.rel index ffa8e64..9bf3d3b 100644 --- a/firmware/STM8L15X_LD/stm8l15x_it.rel +++ b/firmware/STM8L15X_LD/stm8l15x_it.rel @@ -1,6 +1,7 @@ XH3 -H B areas 1F global symbols +H B areas 20 global symbols M stm8l15x_it +S _RTC_ClearITPendingBit Ref000000 S .__.ABS. Def000000 A _CODE size 0 flags 0 addr 0 A DATA size 0 flags 0 addr 0 @@ -11,36 +12,36 @@ A GSINIT size 0 flags 0 addr 0 A GSFINAL size 0 flags 0 addr 0 A CONST size 0 flags 0 addr 0 A INITIALIZER size 0 flags 0 addr 0 -A CODE size 1E flags 0 addr 0 +A CODE size 25 flags 0 addr 0 S _DMA1_CHANNEL0_1_IRQHandler Def000002 -S _SPI1_IRQHandler Def00001A +S _SPI1_IRQHandler Def000021 S _DMA1_CHANNEL2_3_IRQHandler Def000003 -S _EXTIB_G_IRQHandler Def000006 -S _TIM2_UPD_OVF_TRG_BRK_USART2_TX_IRQHandler Def000013 -S _USART1_TX_TIM5_UPD_OVF_TRG_BRK_IRQHandler Def00001B -S _TIM3_UPD_OVF_TRG_BRK_USART3_TX_IRQHandler Def000015 -S _EXTID_H_IRQHandler Def000007 -S _TIM2_CC_USART2_RX_IRQHandler Def000014 -S _EXTI0_IRQHandler Def000008 -S _EXTI1_IRQHandler Def000009 -S _I2C1_SPI2_IRQHandler Def00001D -S _USART1_RX_TIM5_CC_IRQHandler Def00001C -S _TIM3_CC_USART3_RX_IRQHandler Def000016 -S _EXTI2_IRQHandler Def00000A -S _EXTI3_IRQHandler Def00000B -S _EXTIE_F_PVD_IRQHandler Def000005 -S _EXTI4_IRQHandler Def00000C +S _EXTIB_G_IRQHandler Def00000D +S _TIM2_UPD_OVF_TRG_BRK_USART2_TX_IRQHandler Def00001A +S _USART1_TX_TIM5_UPD_OVF_TRG_BRK_IRQHandler Def000022 +S _TIM3_UPD_OVF_TRG_BRK_USART3_TX_IRQHandler Def00001C +S _EXTID_H_IRQHandler Def00000E +S _TIM2_CC_USART2_RX_IRQHandler Def00001B +S _EXTI0_IRQHandler Def00000F +S _EXTI1_IRQHandler Def000010 +S _I2C1_SPI2_IRQHandler Def000024 +S _USART1_RX_TIM5_CC_IRQHandler Def000023 +S _TIM3_CC_USART3_RX_IRQHandler Def00001D +S _EXTI2_IRQHandler Def000011 +S _EXTI3_IRQHandler Def000012 +S _EXTIE_F_PVD_IRQHandler Def00000C +S _EXTI4_IRQHandler Def000013 S _FLASH_IRQHandler Def000001 -S _EXTI5_IRQHandler Def00000D -S _EXTI6_IRQHandler Def00000E -S _EXTI7_IRQHandler Def00000F -S _TIM1_UPD_OVF_TRG_COM_IRQHandler Def000017 +S _EXTI5_IRQHandler Def000014 +S _EXTI6_IRQHandler Def000015 +S _EXTI7_IRQHandler Def000016 +S _TIM1_UPD_OVF_TRG_COM_IRQHandler Def00001E S _TRAP_IRQHandler Def000000 -S _TIM4_UPD_OVF_TRG_IRQHandler Def000019 -S _TIM1_CC_IRQHandler Def000018 -S _SWITCH_CSS_BREAK_DAC_IRQHandler Def000011 -S _ADC1_COMP_IRQHandler Def000012 -S _LCD_AES_IRQHandler Def000010 +S _TIM4_UPD_OVF_TRG_IRQHandler Def000020 +S _TIM1_CC_IRQHandler Def00001F +S _SWITCH_CSS_BREAK_DAC_IRQHandler Def000018 +S _ADC1_COMP_IRQHandler Def000019 +S _LCD_AES_IRQHandler Def000017 S _RTC_CSSLSE_IRQHandler Def000004 A CABS size 0 flags 8 addr 0 T 00 00 00 @@ -61,36 +62,8 @@ T 00 00 03 80 R 00 00 00 09 T 00 00 04 R 00 00 00 09 -T 00 00 04 80 -R 00 00 00 09 -T 00 00 05 -R 00 00 00 09 -T 00 00 05 80 -R 00 00 00 09 -T 00 00 06 -R 00 00 00 09 -T 00 00 06 80 -R 00 00 00 09 -T 00 00 07 -R 00 00 00 09 -T 00 00 07 80 -R 00 00 00 09 -T 00 00 08 -R 00 00 00 09 -T 00 00 08 80 -R 00 00 00 09 -T 00 00 09 -R 00 00 00 09 -T 00 00 09 80 -R 00 00 00 09 -T 00 00 0A -R 00 00 00 09 -T 00 00 0A 80 -R 00 00 00 09 -T 00 00 0B -R 00 00 00 09 -T 00 00 0B 80 -R 00 00 00 09 +T 00 00 04 62 AE 00 40 CD 00 00 80 +R 00 00 00 09 02 08 00 00 T 00 00 0C R 00 00 00 09 T 00 00 0C 80 @@ -163,3 +136,31 @@ T 00 00 1D R 00 00 00 09 T 00 00 1D 80 R 00 00 00 09 +T 00 00 1E +R 00 00 00 09 +T 00 00 1E 80 +R 00 00 00 09 +T 00 00 1F +R 00 00 00 09 +T 00 00 1F 80 +R 00 00 00 09 +T 00 00 20 +R 00 00 00 09 +T 00 00 20 80 +R 00 00 00 09 +T 00 00 21 +R 00 00 00 09 +T 00 00 21 80 +R 00 00 00 09 +T 00 00 22 +R 00 00 00 09 +T 00 00 22 80 +R 00 00 00 09 +T 00 00 23 +R 00 00 00 09 +T 00 00 23 80 +R 00 00 00 09 +T 00 00 24 +R 00 00 00 09 +T 00 00 24 80 +R 00 00 00 09 diff --git a/firmware/STM8L15X_LD/stm8l15x_it.rst b/firmware/STM8L15X_LD/stm8l15x_it.rst index fa98c6d..a32fb74 100644 --- a/firmware/STM8L15X_LD/stm8l15x_it.rst +++ b/firmware/STM8L15X_LD/stm8l15x_it.rst @@ -7,284 +7,289 @@ 7 ;-------------------------------------------------------- 8 ; Public variables in this module 9 ;-------------------------------------------------------- - 10 .globl _TRAP_IRQHandler - 11 .globl _FLASH_IRQHandler - 12 .globl _DMA1_CHANNEL0_1_IRQHandler - 13 .globl _DMA1_CHANNEL2_3_IRQHandler - 14 .globl _RTC_CSSLSE_IRQHandler - 15 .globl _EXTIE_F_PVD_IRQHandler - 16 .globl _EXTIB_G_IRQHandler - 17 .globl _EXTID_H_IRQHandler - 18 .globl _EXTI0_IRQHandler - 19 .globl _EXTI1_IRQHandler - 20 .globl _EXTI2_IRQHandler - 21 .globl _EXTI3_IRQHandler - 22 .globl _EXTI4_IRQHandler - 23 .globl _EXTI5_IRQHandler - 24 .globl _EXTI6_IRQHandler - 25 .globl _EXTI7_IRQHandler - 26 .globl _LCD_AES_IRQHandler - 27 .globl _SWITCH_CSS_BREAK_DAC_IRQHandler - 28 .globl _ADC1_COMP_IRQHandler - 29 .globl _TIM2_UPD_OVF_TRG_BRK_USART2_TX_IRQHandler - 30 .globl _TIM2_CC_USART2_RX_IRQHandler - 31 .globl _TIM3_UPD_OVF_TRG_BRK_USART3_TX_IRQHandler - 32 .globl _TIM3_CC_USART3_RX_IRQHandler - 33 .globl _TIM1_UPD_OVF_TRG_COM_IRQHandler - 34 .globl _TIM1_CC_IRQHandler - 35 .globl _TIM4_UPD_OVF_TRG_IRQHandler - 36 .globl _SPI1_IRQHandler - 37 .globl _USART1_TX_TIM5_UPD_OVF_TRG_BRK_IRQHandler - 38 .globl _USART1_RX_TIM5_CC_IRQHandler - 39 .globl _I2C1_SPI2_IRQHandler - 40 ;-------------------------------------------------------- - 41 ; ram data - 42 ;-------------------------------------------------------- - 43 .area DATA - 44 ;-------------------------------------------------------- - 45 ; ram data - 46 ;-------------------------------------------------------- - 47 .area INITIALIZED - 48 ;-------------------------------------------------------- - 49 ; absolute external ram data - 50 ;-------------------------------------------------------- - 51 .area DABS (ABS) - 52 - 53 ; default segment ordering for linker - 54 .area HOME - 55 .area GSINIT - 56 .area GSFINAL - 57 .area CONST - 58 .area INITIALIZER - 59 .area CODE - 60 - 61 ;-------------------------------------------------------- - 62 ; global & static initialisations - 63 ;-------------------------------------------------------- - 64 .area HOME - 65 .area GSINIT - 66 .area GSFINAL - 67 .area GSINIT - 68 ;-------------------------------------------------------- - 69 ; Home - 70 ;-------------------------------------------------------- - 71 .area HOME + 10 .globl _RTC_ClearITPendingBit + 11 .globl _TRAP_IRQHandler + 12 .globl _FLASH_IRQHandler + 13 .globl _DMA1_CHANNEL0_1_IRQHandler + 14 .globl _DMA1_CHANNEL2_3_IRQHandler + 15 .globl _RTC_CSSLSE_IRQHandler + 16 .globl _EXTIE_F_PVD_IRQHandler + 17 .globl _EXTIB_G_IRQHandler + 18 .globl _EXTID_H_IRQHandler + 19 .globl _EXTI0_IRQHandler + 20 .globl _EXTI1_IRQHandler + 21 .globl _EXTI2_IRQHandler + 22 .globl _EXTI3_IRQHandler + 23 .globl _EXTI4_IRQHandler + 24 .globl _EXTI5_IRQHandler + 25 .globl _EXTI6_IRQHandler + 26 .globl _EXTI7_IRQHandler + 27 .globl _LCD_AES_IRQHandler + 28 .globl _SWITCH_CSS_BREAK_DAC_IRQHandler + 29 .globl _ADC1_COMP_IRQHandler + 30 .globl _TIM2_UPD_OVF_TRG_BRK_USART2_TX_IRQHandler + 31 .globl _TIM2_CC_USART2_RX_IRQHandler + 32 .globl _TIM3_UPD_OVF_TRG_BRK_USART3_TX_IRQHandler + 33 .globl _TIM3_CC_USART3_RX_IRQHandler + 34 .globl _TIM1_UPD_OVF_TRG_COM_IRQHandler + 35 .globl _TIM1_CC_IRQHandler + 36 .globl _TIM4_UPD_OVF_TRG_IRQHandler + 37 .globl _SPI1_IRQHandler + 38 .globl _USART1_TX_TIM5_UPD_OVF_TRG_BRK_IRQHandler + 39 .globl _USART1_RX_TIM5_CC_IRQHandler + 40 .globl _I2C1_SPI2_IRQHandler + 41 ;-------------------------------------------------------- + 42 ; ram data + 43 ;-------------------------------------------------------- + 44 .area DATA + 45 ;-------------------------------------------------------- + 46 ; ram data + 47 ;-------------------------------------------------------- + 48 .area INITIALIZED + 49 ;-------------------------------------------------------- + 50 ; absolute external ram data + 51 ;-------------------------------------------------------- + 52 .area DABS (ABS) + 53 + 54 ; default segment ordering for linker + 55 .area HOME + 56 .area GSINIT + 57 .area GSFINAL + 58 .area CONST + 59 .area INITIALIZER + 60 .area CODE + 61 + 62 ;-------------------------------------------------------- + 63 ; global & static initialisations + 64 ;-------------------------------------------------------- + 65 .area HOME + 66 .area GSINIT + 67 .area GSFINAL + 68 .area GSINIT + 69 ;-------------------------------------------------------- + 70 ; Home + 71 ;-------------------------------------------------------- 72 .area HOME - 73 ;-------------------------------------------------------- - 74 ; code - 75 ;-------------------------------------------------------- - 76 .area CODE - 77 ; ../src/stm8l15x_it.c: 67: INTERRUPT_HANDLER_TRAP(TRAP_IRQHandler) - 78 ; ----------------------------------------- - 79 ; function TRAP_IRQHandler - 80 ; ----------------------------------------- - 00818F 81 _TRAP_IRQHandler: - 82 ; ../src/stm8l15x_it.c: 72: } - 00818F 80 [11] 83 iret - 84 ; ../src/stm8l15x_it.c: 78: INTERRUPT_HANDLER(FLASH_IRQHandler,1) - 85 ; ----------------------------------------- - 86 ; function FLASH_IRQHandler - 87 ; ----------------------------------------- - 008190 88 _FLASH_IRQHandler: - 89 ; ../src/stm8l15x_it.c: 83: } - 008190 80 [11] 90 iret - 91 ; ../src/stm8l15x_it.c: 89: INTERRUPT_HANDLER(DMA1_CHANNEL0_1_IRQHandler,2) - 92 ; ----------------------------------------- - 93 ; function DMA1_CHANNEL0_1_IRQHandler - 94 ; ----------------------------------------- - 008191 95 _DMA1_CHANNEL0_1_IRQHandler: - 96 ; ../src/stm8l15x_it.c: 94: } - 008191 80 [11] 97 iret - 98 ; ../src/stm8l15x_it.c: 100: INTERRUPT_HANDLER(DMA1_CHANNEL2_3_IRQHandler,3) - 99 ; ----------------------------------------- - 100 ; function DMA1_CHANNEL2_3_IRQHandler - 101 ; ----------------------------------------- - 008192 102 _DMA1_CHANNEL2_3_IRQHandler: - 103 ; ../src/stm8l15x_it.c: 105: } - 008192 80 [11] 104 iret - 105 ; ../src/stm8l15x_it.c: 111: INTERRUPT_HANDLER(RTC_CSSLSE_IRQHandler,4) - 106 ; ----------------------------------------- - 107 ; function RTC_CSSLSE_IRQHandler - 108 ; ----------------------------------------- - 008193 109 _RTC_CSSLSE_IRQHandler: - 110 ; ../src/stm8l15x_it.c: 116: } - 008193 80 [11] 111 iret - 112 ; ../src/stm8l15x_it.c: 122: INTERRUPT_HANDLER(EXTIE_F_PVD_IRQHandler,5) - 113 ; ----------------------------------------- - 114 ; function EXTIE_F_PVD_IRQHandler - 115 ; ----------------------------------------- - 008194 116 _EXTIE_F_PVD_IRQHandler: - 117 ; ../src/stm8l15x_it.c: 127: } - 008194 80 [11] 118 iret - 119 ; ../src/stm8l15x_it.c: 134: INTERRUPT_HANDLER(EXTIB_G_IRQHandler,6) + 73 .area HOME + 74 ;-------------------------------------------------------- + 75 ; code + 76 ;-------------------------------------------------------- + 77 .area CODE + 78 ; ../src/stm8l15x_it.c: 67: INTERRUPT_HANDLER_TRAP(TRAP_IRQHandler) + 79 ; ----------------------------------------- + 80 ; function TRAP_IRQHandler + 81 ; ----------------------------------------- + 008151 82 _TRAP_IRQHandler: + 83 ; ../src/stm8l15x_it.c: 72: } + 008151 80 [11] 84 iret + 85 ; ../src/stm8l15x_it.c: 78: INTERRUPT_HANDLER(FLASH_IRQHandler,1) + 86 ; ----------------------------------------- + 87 ; function FLASH_IRQHandler + 88 ; ----------------------------------------- + 008152 89 _FLASH_IRQHandler: + 90 ; ../src/stm8l15x_it.c: 83: } + 008152 80 [11] 91 iret + 92 ; ../src/stm8l15x_it.c: 89: INTERRUPT_HANDLER(DMA1_CHANNEL0_1_IRQHandler,2) + 93 ; ----------------------------------------- + 94 ; function DMA1_CHANNEL0_1_IRQHandler + 95 ; ----------------------------------------- + 008153 96 _DMA1_CHANNEL0_1_IRQHandler: + 97 ; ../src/stm8l15x_it.c: 94: } + 008153 80 [11] 98 iret + 99 ; ../src/stm8l15x_it.c: 100: INTERRUPT_HANDLER(DMA1_CHANNEL2_3_IRQHandler,3) + 100 ; ----------------------------------------- + 101 ; function DMA1_CHANNEL2_3_IRQHandler + 102 ; ----------------------------------------- + 008154 103 _DMA1_CHANNEL2_3_IRQHandler: + 104 ; ../src/stm8l15x_it.c: 105: } + 008154 80 [11] 105 iret + 106 ; ../src/stm8l15x_it.c: 111: INTERRUPT_HANDLER(RTC_CSSLSE_IRQHandler,4) + 107 ; ----------------------------------------- + 108 ; function RTC_CSSLSE_IRQHandler + 109 ; ----------------------------------------- + 008155 110 _RTC_CSSLSE_IRQHandler: + 008155 62 [ 2] 111 div x, a + 112 ; ../src/stm8l15x_it.c: 113: RTC_ClearITPendingBit(RTC_IT_WUT); + 008156 AE 00 40 [ 2] 113 ldw x, #0x0040 + 008159 CD 8E A0 [ 4] 114 call _RTC_ClearITPendingBit + 115 ; ../src/stm8l15x_it.c: 118: } + 00815C 80 [11] 116 iret + 117 ; ../src/stm8l15x_it.c: 124: INTERRUPT_HANDLER(EXTIE_F_PVD_IRQHandler,5) + 118 ; ----------------------------------------- + 119 ; function EXTIE_F_PVD_IRQHandler 120 ; ----------------------------------------- - 121 ; function EXTIB_G_IRQHandler - 122 ; ----------------------------------------- - 008195 123 _EXTIB_G_IRQHandler: - 124 ; ../src/stm8l15x_it.c: 139: } - 008195 80 [11] 125 iret - 126 ; ../src/stm8l15x_it.c: 146: INTERRUPT_HANDLER(EXTID_H_IRQHandler,7) + 00815D 121 _EXTIE_F_PVD_IRQHandler: + 122 ; ../src/stm8l15x_it.c: 129: } + 00815D 80 [11] 123 iret + 124 ; ../src/stm8l15x_it.c: 136: INTERRUPT_HANDLER(EXTIB_G_IRQHandler,6) + 125 ; ----------------------------------------- + 126 ; function EXTIB_G_IRQHandler 127 ; ----------------------------------------- - 128 ; function EXTID_H_IRQHandler - 129 ; ----------------------------------------- - 008196 130 _EXTID_H_IRQHandler: - 131 ; ../src/stm8l15x_it.c: 151: } - 008196 80 [11] 132 iret - 133 ; ../src/stm8l15x_it.c: 158: INTERRUPT_HANDLER(EXTI0_IRQHandler,8) + 00815E 128 _EXTIB_G_IRQHandler: + 129 ; ../src/stm8l15x_it.c: 141: } + 00815E 80 [11] 130 iret + 131 ; ../src/stm8l15x_it.c: 148: INTERRUPT_HANDLER(EXTID_H_IRQHandler,7) + 132 ; ----------------------------------------- + 133 ; function EXTID_H_IRQHandler 134 ; ----------------------------------------- - 135 ; function EXTI0_IRQHandler - 136 ; ----------------------------------------- - 008197 137 _EXTI0_IRQHandler: - 138 ; ../src/stm8l15x_it.c: 163: } - 008197 80 [11] 139 iret - 140 ; ../src/stm8l15x_it.c: 170: INTERRUPT_HANDLER(EXTI1_IRQHandler,9) + 00815F 135 _EXTID_H_IRQHandler: + 136 ; ../src/stm8l15x_it.c: 153: } + 00815F 80 [11] 137 iret + 138 ; ../src/stm8l15x_it.c: 160: INTERRUPT_HANDLER(EXTI0_IRQHandler,8) + 139 ; ----------------------------------------- + 140 ; function EXTI0_IRQHandler 141 ; ----------------------------------------- - 142 ; function EXTI1_IRQHandler - 143 ; ----------------------------------------- - 008198 144 _EXTI1_IRQHandler: - 145 ; ../src/stm8l15x_it.c: 175: } - 008198 80 [11] 146 iret - 147 ; ../src/stm8l15x_it.c: 182: INTERRUPT_HANDLER(EXTI2_IRQHandler,10) + 008160 142 _EXTI0_IRQHandler: + 143 ; ../src/stm8l15x_it.c: 165: } + 008160 80 [11] 144 iret + 145 ; ../src/stm8l15x_it.c: 172: INTERRUPT_HANDLER(EXTI1_IRQHandler,9) + 146 ; ----------------------------------------- + 147 ; function EXTI1_IRQHandler 148 ; ----------------------------------------- - 149 ; function EXTI2_IRQHandler - 150 ; ----------------------------------------- - 008199 151 _EXTI2_IRQHandler: - 152 ; ../src/stm8l15x_it.c: 187: } - 008199 80 [11] 153 iret - 154 ; ../src/stm8l15x_it.c: 194: INTERRUPT_HANDLER(EXTI3_IRQHandler,11) + 008161 149 _EXTI1_IRQHandler: + 150 ; ../src/stm8l15x_it.c: 177: } + 008161 80 [11] 151 iret + 152 ; ../src/stm8l15x_it.c: 184: INTERRUPT_HANDLER(EXTI2_IRQHandler,10) + 153 ; ----------------------------------------- + 154 ; function EXTI2_IRQHandler 155 ; ----------------------------------------- - 156 ; function EXTI3_IRQHandler - 157 ; ----------------------------------------- - 00819A 158 _EXTI3_IRQHandler: - 159 ; ../src/stm8l15x_it.c: 199: } - 00819A 80 [11] 160 iret - 161 ; ../src/stm8l15x_it.c: 206: INTERRUPT_HANDLER(EXTI4_IRQHandler,12) + 008162 156 _EXTI2_IRQHandler: + 157 ; ../src/stm8l15x_it.c: 189: } + 008162 80 [11] 158 iret + 159 ; ../src/stm8l15x_it.c: 196: INTERRUPT_HANDLER(EXTI3_IRQHandler,11) + 160 ; ----------------------------------------- + 161 ; function EXTI3_IRQHandler 162 ; ----------------------------------------- - 163 ; function EXTI4_IRQHandler - 164 ; ----------------------------------------- - 00819B 165 _EXTI4_IRQHandler: - 166 ; ../src/stm8l15x_it.c: 211: } - 00819B 80 [11] 167 iret - 168 ; ../src/stm8l15x_it.c: 218: INTERRUPT_HANDLER(EXTI5_IRQHandler,13) + 008163 163 _EXTI3_IRQHandler: + 164 ; ../src/stm8l15x_it.c: 201: } + 008163 80 [11] 165 iret + 166 ; ../src/stm8l15x_it.c: 208: INTERRUPT_HANDLER(EXTI4_IRQHandler,12) + 167 ; ----------------------------------------- + 168 ; function EXTI4_IRQHandler 169 ; ----------------------------------------- - 170 ; function EXTI5_IRQHandler - 171 ; ----------------------------------------- - 00819C 172 _EXTI5_IRQHandler: - 173 ; ../src/stm8l15x_it.c: 223: } - 00819C 80 [11] 174 iret - 175 ; ../src/stm8l15x_it.c: 230: INTERRUPT_HANDLER(EXTI6_IRQHandler,14) + 008164 170 _EXTI4_IRQHandler: + 171 ; ../src/stm8l15x_it.c: 213: } + 008164 80 [11] 172 iret + 173 ; ../src/stm8l15x_it.c: 220: INTERRUPT_HANDLER(EXTI5_IRQHandler,13) + 174 ; ----------------------------------------- + 175 ; function EXTI5_IRQHandler 176 ; ----------------------------------------- - 177 ; function EXTI6_IRQHandler - 178 ; ----------------------------------------- - 00819D 179 _EXTI6_IRQHandler: - 180 ; ../src/stm8l15x_it.c: 235: } - 00819D 80 [11] 181 iret - 182 ; ../src/stm8l15x_it.c: 242: INTERRUPT_HANDLER(EXTI7_IRQHandler,15) + 008165 177 _EXTI5_IRQHandler: + 178 ; ../src/stm8l15x_it.c: 225: } + 008165 80 [11] 179 iret + 180 ; ../src/stm8l15x_it.c: 232: INTERRUPT_HANDLER(EXTI6_IRQHandler,14) + 181 ; ----------------------------------------- + 182 ; function EXTI6_IRQHandler 183 ; ----------------------------------------- - 184 ; function EXTI7_IRQHandler - 185 ; ----------------------------------------- - 00819E 186 _EXTI7_IRQHandler: - 187 ; ../src/stm8l15x_it.c: 247: } - 00819E 80 [11] 188 iret - 189 ; ../src/stm8l15x_it.c: 253: INTERRUPT_HANDLER(LCD_AES_IRQHandler,16) + 008166 184 _EXTI6_IRQHandler: + 185 ; ../src/stm8l15x_it.c: 237: } + 008166 80 [11] 186 iret + 187 ; ../src/stm8l15x_it.c: 244: INTERRUPT_HANDLER(EXTI7_IRQHandler,15) + 188 ; ----------------------------------------- + 189 ; function EXTI7_IRQHandler 190 ; ----------------------------------------- - 191 ; function LCD_AES_IRQHandler - 192 ; ----------------------------------------- - 00819F 193 _LCD_AES_IRQHandler: - 194 ; ../src/stm8l15x_it.c: 258: } - 00819F 80 [11] 195 iret - 196 ; ../src/stm8l15x_it.c: 264: INTERRUPT_HANDLER(SWITCH_CSS_BREAK_DAC_IRQHandler,17) + 008167 191 _EXTI7_IRQHandler: + 192 ; ../src/stm8l15x_it.c: 249: } + 008167 80 [11] 193 iret + 194 ; ../src/stm8l15x_it.c: 255: INTERRUPT_HANDLER(LCD_AES_IRQHandler,16) + 195 ; ----------------------------------------- + 196 ; function LCD_AES_IRQHandler 197 ; ----------------------------------------- - 198 ; function SWITCH_CSS_BREAK_DAC_IRQHandler - 199 ; ----------------------------------------- - 0081A0 200 _SWITCH_CSS_BREAK_DAC_IRQHandler: - 201 ; ../src/stm8l15x_it.c: 269: } - 0081A0 80 [11] 202 iret - 203 ; ../src/stm8l15x_it.c: 276: INTERRUPT_HANDLER(ADC1_COMP_IRQHandler,18) + 008168 198 _LCD_AES_IRQHandler: + 199 ; ../src/stm8l15x_it.c: 260: } + 008168 80 [11] 200 iret + 201 ; ../src/stm8l15x_it.c: 266: INTERRUPT_HANDLER(SWITCH_CSS_BREAK_DAC_IRQHandler,17) + 202 ; ----------------------------------------- + 203 ; function SWITCH_CSS_BREAK_DAC_IRQHandler 204 ; ----------------------------------------- - 205 ; function ADC1_COMP_IRQHandler - 206 ; ----------------------------------------- - 0081A1 207 _ADC1_COMP_IRQHandler: - 208 ; ../src/stm8l15x_it.c: 281: } - 0081A1 80 [11] 209 iret - 210 ; ../src/stm8l15x_it.c: 288: INTERRUPT_HANDLER(TIM2_UPD_OVF_TRG_BRK_USART2_TX_IRQHandler,19) + 008169 205 _SWITCH_CSS_BREAK_DAC_IRQHandler: + 206 ; ../src/stm8l15x_it.c: 271: } + 008169 80 [11] 207 iret + 208 ; ../src/stm8l15x_it.c: 278: INTERRUPT_HANDLER(ADC1_COMP_IRQHandler,18) + 209 ; ----------------------------------------- + 210 ; function ADC1_COMP_IRQHandler 211 ; ----------------------------------------- - 212 ; function TIM2_UPD_OVF_TRG_BRK_USART2_TX_IRQHandler - 213 ; ----------------------------------------- - 0081A2 214 _TIM2_UPD_OVF_TRG_BRK_USART2_TX_IRQHandler: - 215 ; ../src/stm8l15x_it.c: 293: } - 0081A2 80 [11] 216 iret - 217 ; ../src/stm8l15x_it.c: 300: INTERRUPT_HANDLER(TIM2_CC_USART2_RX_IRQHandler,20) + 00816A 212 _ADC1_COMP_IRQHandler: + 213 ; ../src/stm8l15x_it.c: 283: } + 00816A 80 [11] 214 iret + 215 ; ../src/stm8l15x_it.c: 290: INTERRUPT_HANDLER(TIM2_UPD_OVF_TRG_BRK_USART2_TX_IRQHandler,19) + 216 ; ----------------------------------------- + 217 ; function TIM2_UPD_OVF_TRG_BRK_USART2_TX_IRQHandler 218 ; ----------------------------------------- - 219 ; function TIM2_CC_USART2_RX_IRQHandler - 220 ; ----------------------------------------- - 0081A3 221 _TIM2_CC_USART2_RX_IRQHandler: - 222 ; ../src/stm8l15x_it.c: 305: } - 0081A3 80 [11] 223 iret - 224 ; ../src/stm8l15x_it.c: 313: INTERRUPT_HANDLER(TIM3_UPD_OVF_TRG_BRK_USART3_TX_IRQHandler,21) + 00816B 219 _TIM2_UPD_OVF_TRG_BRK_USART2_TX_IRQHandler: + 220 ; ../src/stm8l15x_it.c: 295: } + 00816B 80 [11] 221 iret + 222 ; ../src/stm8l15x_it.c: 302: INTERRUPT_HANDLER(TIM2_CC_USART2_RX_IRQHandler,20) + 223 ; ----------------------------------------- + 224 ; function TIM2_CC_USART2_RX_IRQHandler 225 ; ----------------------------------------- - 226 ; function TIM3_UPD_OVF_TRG_BRK_USART3_TX_IRQHandler - 227 ; ----------------------------------------- - 0081A4 228 _TIM3_UPD_OVF_TRG_BRK_USART3_TX_IRQHandler: - 229 ; ../src/stm8l15x_it.c: 318: } - 0081A4 80 [11] 230 iret - 231 ; ../src/stm8l15x_it.c: 324: INTERRUPT_HANDLER(TIM3_CC_USART3_RX_IRQHandler,22) + 00816C 226 _TIM2_CC_USART2_RX_IRQHandler: + 227 ; ../src/stm8l15x_it.c: 307: } + 00816C 80 [11] 228 iret + 229 ; ../src/stm8l15x_it.c: 315: INTERRUPT_HANDLER(TIM3_UPD_OVF_TRG_BRK_USART3_TX_IRQHandler,21) + 230 ; ----------------------------------------- + 231 ; function TIM3_UPD_OVF_TRG_BRK_USART3_TX_IRQHandler 232 ; ----------------------------------------- - 233 ; function TIM3_CC_USART3_RX_IRQHandler - 234 ; ----------------------------------------- - 0081A5 235 _TIM3_CC_USART3_RX_IRQHandler: - 236 ; ../src/stm8l15x_it.c: 329: } - 0081A5 80 [11] 237 iret - 238 ; ../src/stm8l15x_it.c: 335: INTERRUPT_HANDLER(TIM1_UPD_OVF_TRG_COM_IRQHandler,23) + 00816D 233 _TIM3_UPD_OVF_TRG_BRK_USART3_TX_IRQHandler: + 234 ; ../src/stm8l15x_it.c: 320: } + 00816D 80 [11] 235 iret + 236 ; ../src/stm8l15x_it.c: 326: INTERRUPT_HANDLER(TIM3_CC_USART3_RX_IRQHandler,22) + 237 ; ----------------------------------------- + 238 ; function TIM3_CC_USART3_RX_IRQHandler 239 ; ----------------------------------------- - 240 ; function TIM1_UPD_OVF_TRG_COM_IRQHandler - 241 ; ----------------------------------------- - 0081A6 242 _TIM1_UPD_OVF_TRG_COM_IRQHandler: - 243 ; ../src/stm8l15x_it.c: 340: } - 0081A6 80 [11] 244 iret - 245 ; ../src/stm8l15x_it.c: 346: INTERRUPT_HANDLER(TIM1_CC_IRQHandler,24) + 00816E 240 _TIM3_CC_USART3_RX_IRQHandler: + 241 ; ../src/stm8l15x_it.c: 331: } + 00816E 80 [11] 242 iret + 243 ; ../src/stm8l15x_it.c: 337: INTERRUPT_HANDLER(TIM1_UPD_OVF_TRG_COM_IRQHandler,23) + 244 ; ----------------------------------------- + 245 ; function TIM1_UPD_OVF_TRG_COM_IRQHandler 246 ; ----------------------------------------- - 247 ; function TIM1_CC_IRQHandler - 248 ; ----------------------------------------- - 0081A7 249 _TIM1_CC_IRQHandler: - 250 ; ../src/stm8l15x_it.c: 351: } - 0081A7 80 [11] 251 iret - 252 ; ../src/stm8l15x_it.c: 358: INTERRUPT_HANDLER(TIM4_UPD_OVF_TRG_IRQHandler,25) + 00816F 247 _TIM1_UPD_OVF_TRG_COM_IRQHandler: + 248 ; ../src/stm8l15x_it.c: 342: } + 00816F 80 [11] 249 iret + 250 ; ../src/stm8l15x_it.c: 348: INTERRUPT_HANDLER(TIM1_CC_IRQHandler,24) + 251 ; ----------------------------------------- + 252 ; function TIM1_CC_IRQHandler 253 ; ----------------------------------------- - 254 ; function TIM4_UPD_OVF_TRG_IRQHandler - 255 ; ----------------------------------------- - 0081A8 256 _TIM4_UPD_OVF_TRG_IRQHandler: - 257 ; ../src/stm8l15x_it.c: 363: } - 0081A8 80 [11] 258 iret - 259 ; ../src/stm8l15x_it.c: 369: INTERRUPT_HANDLER(SPI1_IRQHandler,26) + 008170 254 _TIM1_CC_IRQHandler: + 255 ; ../src/stm8l15x_it.c: 353: } + 008170 80 [11] 256 iret + 257 ; ../src/stm8l15x_it.c: 360: INTERRUPT_HANDLER(TIM4_UPD_OVF_TRG_IRQHandler,25) + 258 ; ----------------------------------------- + 259 ; function TIM4_UPD_OVF_TRG_IRQHandler 260 ; ----------------------------------------- - 261 ; function SPI1_IRQHandler - 262 ; ----------------------------------------- - 0081A9 263 _SPI1_IRQHandler: - 264 ; ../src/stm8l15x_it.c: 374: } - 0081A9 80 [11] 265 iret - 266 ; ../src/stm8l15x_it.c: 381: INTERRUPT_HANDLER(USART1_TX_TIM5_UPD_OVF_TRG_BRK_IRQHandler,27) + 008171 261 _TIM4_UPD_OVF_TRG_IRQHandler: + 262 ; ../src/stm8l15x_it.c: 365: } + 008171 80 [11] 263 iret + 264 ; ../src/stm8l15x_it.c: 371: INTERRUPT_HANDLER(SPI1_IRQHandler,26) + 265 ; ----------------------------------------- + 266 ; function SPI1_IRQHandler 267 ; ----------------------------------------- - 268 ; function USART1_TX_TIM5_UPD_OVF_TRG_BRK_IRQHandler - 269 ; ----------------------------------------- - 0081AA 270 _USART1_TX_TIM5_UPD_OVF_TRG_BRK_IRQHandler: - 271 ; ../src/stm8l15x_it.c: 386: } - 0081AA 80 [11] 272 iret - 273 ; ../src/stm8l15x_it.c: 393: INTERRUPT_HANDLER(USART1_RX_TIM5_CC_IRQHandler,28) + 008172 268 _SPI1_IRQHandler: + 269 ; ../src/stm8l15x_it.c: 376: } + 008172 80 [11] 270 iret + 271 ; ../src/stm8l15x_it.c: 383: INTERRUPT_HANDLER(USART1_TX_TIM5_UPD_OVF_TRG_BRK_IRQHandler,27) + 272 ; ----------------------------------------- + 273 ; function USART1_TX_TIM5_UPD_OVF_TRG_BRK_IRQHandler 274 ; ----------------------------------------- - 275 ; function USART1_RX_TIM5_CC_IRQHandler - 276 ; ----------------------------------------- - 0081AB 277 _USART1_RX_TIM5_CC_IRQHandler: - 278 ; ../src/stm8l15x_it.c: 398: } - 0081AB 80 [11] 279 iret - 280 ; ../src/stm8l15x_it.c: 405: INTERRUPT_HANDLER(I2C1_SPI2_IRQHandler,29) + 008173 275 _USART1_TX_TIM5_UPD_OVF_TRG_BRK_IRQHandler: + 276 ; ../src/stm8l15x_it.c: 388: } + 008173 80 [11] 277 iret + 278 ; ../src/stm8l15x_it.c: 395: INTERRUPT_HANDLER(USART1_RX_TIM5_CC_IRQHandler,28) + 279 ; ----------------------------------------- + 280 ; function USART1_RX_TIM5_CC_IRQHandler 281 ; ----------------------------------------- - 282 ; function I2C1_SPI2_IRQHandler - 283 ; ----------------------------------------- - 0081AC 284 _I2C1_SPI2_IRQHandler: - 285 ; ../src/stm8l15x_it.c: 410: } - 0081AC 80 [11] 286 iret - 287 .area CODE - 288 .area CONST - 289 .area INITIALIZER - 290 .area CABS (ABS) + 008174 282 _USART1_RX_TIM5_CC_IRQHandler: + 283 ; ../src/stm8l15x_it.c: 400: } + 008174 80 [11] 284 iret + 285 ; ../src/stm8l15x_it.c: 407: INTERRUPT_HANDLER(I2C1_SPI2_IRQHandler,29) + 286 ; ----------------------------------------- + 287 ; function I2C1_SPI2_IRQHandler + 288 ; ----------------------------------------- + 008175 289 _I2C1_SPI2_IRQHandler: + 290 ; ../src/stm8l15x_it.c: 412: } + 008175 80 [11] 291 iret + 292 .area CODE + 293 .area CONST + 294 .area INITIALIZER + 295 .area CABS (ABS) diff --git a/firmware/STM8L15X_LD/stm8l15x_it.sym b/firmware/STM8L15X_LD/stm8l15x_it.sym index 289d7bf..f46d0bf 100644 --- a/firmware/STM8L15X_LD/stm8l15x_it.sym +++ b/firmware/STM8L15X_LD/stm8l15x_it.sym @@ -7,36 +7,37 @@ Symbol Table .__.ABS. = 000000 G .__.CPU. = 000000 L .__.H$L. = 000001 L - 9 _ADC1_COMP_IRQHandler 000012 GR + 9 _ADC1_COMP_IRQHandler 000019 GR 9 _DMA1_CHANNEL0_1_IRQHandler 000002 GR 9 _DMA1_CHANNEL2_3_IRQHandler 000003 GR - 9 _EXTI0_IRQHandler 000008 GR - 9 _EXTI1_IRQHandler 000009 GR - 9 _EXTI2_IRQHandler 00000A GR - 9 _EXTI3_IRQHandler 00000B GR - 9 _EXTI4_IRQHandler 00000C GR - 9 _EXTI5_IRQHandler 00000D GR - 9 _EXTI6_IRQHandler 00000E GR - 9 _EXTI7_IRQHandler 00000F GR - 9 _EXTIB_G_IRQHandler 000006 GR - 9 _EXTID_H_IRQHandler 000007 GR - 9 _EXTIE_F_PVD_IRQHandler 000005 GR + 9 _EXTI0_IRQHandler 00000F GR + 9 _EXTI1_IRQHandler 000010 GR + 9 _EXTI2_IRQHandler 000011 GR + 9 _EXTI3_IRQHandler 000012 GR + 9 _EXTI4_IRQHandler 000013 GR + 9 _EXTI5_IRQHandler 000014 GR + 9 _EXTI6_IRQHandler 000015 GR + 9 _EXTI7_IRQHandler 000016 GR + 9 _EXTIB_G_IRQHandler 00000D GR + 9 _EXTID_H_IRQHandler 00000E GR + 9 _EXTIE_F_PVD_IRQHandler 00000C GR 9 _FLASH_IRQHandler 000001 GR - 9 _I2C1_SPI2_IRQHandler 00001D GR - 9 _LCD_AES_IRQHandler 000010 GR + 9 _I2C1_SPI2_IRQHandler 000024 GR + 9 _LCD_AES_IRQHandler 000017 GR 9 _RTC_CSSLSE_IRQHandler 000004 GR - 9 _SPI1_IRQHandler 00001A GR - 9 _SWITCH_CSS_BREAK_DAC_IRQHandler 000011 GR - 9 _TIM1_CC_IRQHandler 000018 GR - 9 _TIM1_UPD_OVF_TRG_COM_IRQHandler 000017 GR - 9 _TIM2_CC_USART2_RX_IRQHandler 000014 GR - 9 _TIM2_UPD_OVF_TRG_BRK_USART2_TX_IRQHandler 000013 GR - 9 _TIM3_CC_USART3_RX_IRQHandler 000016 GR - 9 _TIM3_UPD_OVF_TRG_BRK_USART3_TX_IRQHandler 000015 GR - 9 _TIM4_UPD_OVF_TRG_IRQHandler 000019 GR + _RTC_ClearITPendingBit ****** GX + 9 _SPI1_IRQHandler 000021 GR + 9 _SWITCH_CSS_BREAK_DAC_IRQHandler 000018 GR + 9 _TIM1_CC_IRQHandler 00001F GR + 9 _TIM1_UPD_OVF_TRG_COM_IRQHandler 00001E GR + 9 _TIM2_CC_USART2_RX_IRQHandler 00001B GR + 9 _TIM2_UPD_OVF_TRG_BRK_USART2_TX_IRQHandler 00001A GR + 9 _TIM3_CC_USART3_RX_IRQHandler 00001D GR + 9 _TIM3_UPD_OVF_TRG_BRK_USART3_TX_IRQHandler 00001C GR + 9 _TIM4_UPD_OVF_TRG_IRQHandler 000020 GR 9 _TRAP_IRQHandler 000000 GR - 9 _USART1_RX_TIM5_CC_IRQHandler 00001C GR - 9 _USART1_TX_TIM5_UPD_OVF_TRG_BRK_IRQHandler 00001B GR + 9 _USART1_RX_TIM5_CC_IRQHandler 000023 GR + 9 _USART1_TX_TIM5_UPD_OVF_TRG_BRK_IRQHandler 000022 GR ASxxxx Assembler V02.00 + NoICE + SDCC mods (STMicroelectronics STM8) Page 2 @@ -53,6 +54,6 @@ Area Table 6 GSFINAL size 0 flags 0 7 CONST size 0 flags 0 8 INITIALIZER size 0 flags 0 - 9 CODE size 1E flags 0 + 9 CODE size 25 flags 0 A CABS size 0 flags 8 diff --git a/firmware/STM8L15X_LD/stm8l15x_itc.asm b/firmware/STM8L15X_LD/stm8l15x_itc.asm new file mode 100644 index 0000000..3e54eec --- /dev/null +++ b/firmware/STM8L15X_LD/stm8l15x_itc.asm @@ -0,0 +1,421 @@ +;-------------------------------------------------------- +; File Created by SDCC : free open source ISO C Compiler +; Version 4.5.0 #15242 (Linux) +;-------------------------------------------------------- + .module stm8l15x_itc + +;-------------------------------------------------------- +; Public variables in this module +;-------------------------------------------------------- + .globl _ITC_GetCPUCC + .globl _ITC_DeInit + .globl _ITC_GetSoftIntStatus + .globl _ITC_GetSoftwarePriority + .globl _ITC_SetSoftwarePriority +;-------------------------------------------------------- +; ram data +;-------------------------------------------------------- + .area DATA +;-------------------------------------------------------- +; ram data +;-------------------------------------------------------- + .area INITIALIZED +;-------------------------------------------------------- +; absolute external ram data +;-------------------------------------------------------- + .area DABS (ABS) + +; default segment ordering for linker + .area HOME + .area GSINIT + .area GSFINAL + .area CONST + .area INITIALIZER + .area CODE + +;-------------------------------------------------------- +; global & static initialisations +;-------------------------------------------------------- + .area HOME + .area GSINIT + .area GSFINAL + .area GSINIT +;-------------------------------------------------------- +; Home +;-------------------------------------------------------- + .area HOME + .area HOME +;-------------------------------------------------------- +; code +;-------------------------------------------------------- + .area CODE +; ../inc/stm8l151x/src/stm8l15x_itc.c: 56: uint8_t ITC_GetCPUCC(void) +; ----------------------------------------- +; function ITC_GetCPUCC +; ----------------------------------------- +_ITC_GetCPUCC: +; ../inc/stm8l151x/src/stm8l15x_itc.c: 65: __asm__("push cc"); + push cc +; ../inc/stm8l151x/src/stm8l15x_itc.c: 66: __asm__("pop a"); + pop a +; ../inc/stm8l151x/src/stm8l15x_itc.c: 71: } + ret +; ../inc/stm8l151x/src/stm8l15x_itc.c: 90: void ITC_DeInit(void) +; ----------------------------------------- +; function ITC_DeInit +; ----------------------------------------- +_ITC_DeInit: +; ../inc/stm8l151x/src/stm8l15x_itc.c: 92: ITC->ISPR1 = ITC_SPRX_RESET_VALUE; + mov 0x7f70+0, #0xff +; ../inc/stm8l151x/src/stm8l15x_itc.c: 93: ITC->ISPR2 = ITC_SPRX_RESET_VALUE; + mov 0x7f71+0, #0xff +; ../inc/stm8l151x/src/stm8l15x_itc.c: 94: ITC->ISPR3 = ITC_SPRX_RESET_VALUE; + mov 0x7f72+0, #0xff +; ../inc/stm8l151x/src/stm8l15x_itc.c: 95: ITC->ISPR4 = ITC_SPRX_RESET_VALUE; + mov 0x7f73+0, #0xff +; ../inc/stm8l151x/src/stm8l15x_itc.c: 96: ITC->ISPR5 = ITC_SPRX_RESET_VALUE; + mov 0x7f74+0, #0xff +; ../inc/stm8l151x/src/stm8l15x_itc.c: 97: ITC->ISPR6 = ITC_SPRX_RESET_VALUE; + mov 0x7f75+0, #0xff +; ../inc/stm8l151x/src/stm8l15x_itc.c: 98: ITC->ISPR7 = ITC_SPRX_RESET_VALUE; + mov 0x7f76+0, #0xff +; ../inc/stm8l151x/src/stm8l15x_itc.c: 99: ITC->ISPR8 = ITC_SPRX_RESET_VALUE; + mov 0x7f77+0, #0xff +; ../inc/stm8l151x/src/stm8l15x_itc.c: 100: } + ret +; ../inc/stm8l151x/src/stm8l15x_itc.c: 107: uint8_t ITC_GetSoftIntStatus(void) +; ----------------------------------------- +; function ITC_GetSoftIntStatus +; ----------------------------------------- +_ITC_GetSoftIntStatus: +; ../inc/stm8l151x/src/stm8l15x_itc.c: 109: return ((uint8_t)(ITC_GetCPUCC() & CPU_SOFT_INT_DISABLED)); + call _ITC_GetCPUCC + and a, #0x28 +; ../inc/stm8l151x/src/stm8l15x_itc.c: 110: } + ret +; ../inc/stm8l151x/src/stm8l15x_itc.c: 117: ITC_PriorityLevel_TypeDef ITC_GetSoftwarePriority(IRQn_TypeDef IRQn) +; ----------------------------------------- +; function ITC_GetSoftwarePriority +; ----------------------------------------- +_ITC_GetSoftwarePriority: + pushw x + ld xl, a +; ../inc/stm8l151x/src/stm8l15x_itc.c: 119: uint8_t Value = 0; + clr a +; ../inc/stm8l151x/src/stm8l15x_itc.c: 126: Mask = (uint8_t)(0x03U << ((IRQn % 4U) * 2U)); + ldw y, x + push a + ld a, yl + and a, #0x03 + ld xh, a + pop a + rlwa x + ld (0x01, sp), a + rrwa x + sll (0x01, sp) + push a + ld a, #0x03 + ld (0x03, sp), a + ld a, (0x02, sp) + jreq 00139$ +00138$: + sll (0x03, sp) + dec a + jrne 00138$ +00139$: +; ../inc/stm8l151x/src/stm8l15x_itc.c: 128: switch (IRQn) + ld a, xl + cp a, #0x1d + pop a + jrugt 00128$ + rlwa x + clr a + rrwa x + sllw x + ldw x, (#00141$, x) + jp (x) +00141$: + .dw #00128$ + .dw #00103$ + .dw #00103$ + .dw #00103$ + .dw #00107$ + .dw #00107$ + .dw #00107$ + .dw #00107$ + .dw #00111$ + .dw #00111$ + .dw #00111$ + .dw #00111$ + .dw #00115$ + .dw #00115$ + .dw #00115$ + .dw #00115$ + .dw #00128$ + .dw #00118$ + .dw #00118$ + .dw #00118$ + .dw #00121$ + .dw #00121$ + .dw #00121$ + .dw #00128$ + .dw #00128$ + .dw #00124$ + .dw #00124$ + .dw #00124$ + .dw #00126$ + .dw #00126$ +; ../inc/stm8l151x/src/stm8l15x_itc.c: 132: case DMA1_CHANNEL2_3_IRQn: +00103$: +; ../inc/stm8l151x/src/stm8l15x_itc.c: 133: Value = (uint8_t)(ITC->ISPR1 & Mask); /* Read software priority */ + ld a, 0x7f70 + and a, (0x02, sp) +; ../inc/stm8l151x/src/stm8l15x_itc.c: 134: break; + jra 00128$ +; ../inc/stm8l151x/src/stm8l15x_itc.c: 144: case EXTID_IRQn: +00107$: +; ../inc/stm8l151x/src/stm8l15x_itc.c: 150: Value = (uint8_t)(ITC->ISPR2 & Mask); /* Read software priority */ + ld a, 0x7f71 + and a, (0x02, sp) +; ../inc/stm8l151x/src/stm8l15x_itc.c: 151: break; + jra 00128$ +; ../inc/stm8l151x/src/stm8l15x_itc.c: 156: case EXTI3_IRQn: +00111$: +; ../inc/stm8l151x/src/stm8l15x_itc.c: 157: Value = (uint8_t)(ITC->ISPR3 & Mask); /* Read software priority */ + ld a, 0x7f72 + and a, (0x02, sp) +; ../inc/stm8l151x/src/stm8l15x_itc.c: 158: break; + jra 00128$ +; ../inc/stm8l151x/src/stm8l15x_itc.c: 163: case EXTI7_IRQn: +00115$: +; ../inc/stm8l151x/src/stm8l15x_itc.c: 164: Value = (uint8_t)(ITC->ISPR4 & Mask); /* Read software priority */ + ld a, 0x7f73 + and a, (0x02, sp) +; ../inc/stm8l151x/src/stm8l15x_itc.c: 165: break; + jra 00128$ +; ../inc/stm8l151x/src/stm8l15x_itc.c: 177: case TIM2_UPD_OVF_TRG_BRK_IRQn: +00118$: +; ../inc/stm8l151x/src/stm8l15x_itc.c: 182: Value = (uint8_t)(ITC->ISPR5 & Mask); /* Read software priority */ + ld a, 0x7f74 + and a, (0x02, sp) +; ../inc/stm8l151x/src/stm8l15x_itc.c: 183: break; + jra 00128$ +; ../inc/stm8l151x/src/stm8l15x_itc.c: 192: case TIM3_CC_IRQn: +00121$: +; ../inc/stm8l151x/src/stm8l15x_itc.c: 198: Value = (uint8_t)(ITC->ISPR6 & Mask); /* Read software priority */ + ld a, 0x7f75 + and a, (0x02, sp) +; ../inc/stm8l151x/src/stm8l15x_itc.c: 199: break; + jra 00128$ +; ../inc/stm8l151x/src/stm8l15x_itc.c: 208: case USART1_TX_IRQn: +00124$: +; ../inc/stm8l151x/src/stm8l15x_itc.c: 212: Value = (uint8_t)(ITC->ISPR7 & Mask); /* Read software priority */ + ld a, 0x7f76 + and a, (0x02, sp) +; ../inc/stm8l151x/src/stm8l15x_itc.c: 213: break; + jra 00128$ +; ../inc/stm8l151x/src/stm8l15x_itc.c: 218: case I2C1_IRQn: +00126$: +; ../inc/stm8l151x/src/stm8l15x_itc.c: 223: Value = (uint8_t)(ITC->ISPR8 & Mask); /* Read software priority */ + ld a, 0x7f77 + and a, (0x02, sp) +; ../inc/stm8l151x/src/stm8l15x_itc.c: 228: } +00128$: +; ../inc/stm8l151x/src/stm8l15x_itc.c: 230: Value >>= (uint8_t)((IRQn % 4u) * 2u); + push a + ld a, (0x02, sp) + jreq 00143$ +00142$: + srl (1, sp) + dec a + jrne 00142$ +00143$: + pop a +; ../inc/stm8l151x/src/stm8l15x_itc.c: 232: return((ITC_PriorityLevel_TypeDef)Value); +; ../inc/stm8l151x/src/stm8l15x_itc.c: 234: } + popw x + ret +; ../inc/stm8l151x/src/stm8l15x_itc.c: 253: void ITC_SetSoftwarePriority(IRQn_TypeDef IRQn, ITC_PriorityLevel_TypeDef ITC_PriorityLevel) +; ----------------------------------------- +; function ITC_SetSoftwarePriority +; ----------------------------------------- +_ITC_SetSoftwarePriority: + pushw x +; ../inc/stm8l151x/src/stm8l15x_itc.c: 267: Mask = (uint8_t)(~(uint8_t)(0x03U << ((IRQn % 4U) * 2U))); + ld xl, a + and a, #0x03 + sll a + ld xh, a + ld a, #0x03 + push a + ld a, xh + tnz a + jreq 00139$ +00138$: + sll (1, sp) + dec a + jrne 00138$ +00139$: + pop a + cpl a + ld (0x01, sp), a +; ../inc/stm8l151x/src/stm8l15x_itc.c: 269: NewPriority = (uint8_t)((uint8_t)(ITC_PriorityLevel) << ((IRQn % 4U) * 2U)); + ld a, (0x05, sp) + push a + ld a, xh + tnz a + jreq 00141$ +00140$: + sll (1, sp) + dec a + jrne 00140$ +00141$: + pop a + ld (0x02, sp), a +; ../inc/stm8l151x/src/stm8l15x_itc.c: 271: switch (IRQn) + ld a, xl + cp a, #0x1d + jrule 00142$ + jp 00129$ +00142$: + clr a + ld xh, a + sllw x + ldw x, (#00143$, x) + jp (x) +00143$: + .dw #00129$ + .dw #00103$ + .dw #00103$ + .dw #00103$ + .dw #00107$ + .dw #00107$ + .dw #00107$ + .dw #00107$ + .dw #00111$ + .dw #00111$ + .dw #00111$ + .dw #00111$ + .dw #00115$ + .dw #00115$ + .dw #00115$ + .dw #00115$ + .dw #00129$ + .dw #00118$ + .dw #00118$ + .dw #00118$ + .dw #00121$ + .dw #00121$ + .dw #00121$ + .dw #00129$ + .dw #00129$ + .dw #00124$ + .dw #00124$ + .dw #00124$ + .dw #00126$ + .dw #00126$ +; ../inc/stm8l151x/src/stm8l15x_itc.c: 275: case DMA1_CHANNEL2_3_IRQn: +00103$: +; ../inc/stm8l151x/src/stm8l15x_itc.c: 276: ITC->ISPR1 &= Mask; + ld a, 0x7f70 + and a, (0x01, sp) + ld 0x7f70, a +; ../inc/stm8l151x/src/stm8l15x_itc.c: 277: ITC->ISPR1 |= NewPriority; + ld a, 0x7f70 + or a, (0x02, sp) + ld 0x7f70, a +; ../inc/stm8l151x/src/stm8l15x_itc.c: 278: break; + jra 00129$ +; ../inc/stm8l151x/src/stm8l15x_itc.c: 288: case EXTID_IRQn: +00107$: +; ../inc/stm8l151x/src/stm8l15x_itc.c: 294: ITC->ISPR2 &= Mask; + ld a, 0x7f71 + and a, (0x01, sp) + ld 0x7f71, a +; ../inc/stm8l151x/src/stm8l15x_itc.c: 295: ITC->ISPR2 |= NewPriority; + ld a, 0x7f71 + or a, (0x02, sp) + ld 0x7f71, a +; ../inc/stm8l151x/src/stm8l15x_itc.c: 296: break; + jra 00129$ +; ../inc/stm8l151x/src/stm8l15x_itc.c: 301: case EXTI3_IRQn: +00111$: +; ../inc/stm8l151x/src/stm8l15x_itc.c: 302: ITC->ISPR3 &= Mask; + ld a, 0x7f72 + and a, (0x01, sp) + ld 0x7f72, a +; ../inc/stm8l151x/src/stm8l15x_itc.c: 303: ITC->ISPR3 |= NewPriority; + ld a, 0x7f72 + or a, (0x02, sp) + ld 0x7f72, a +; ../inc/stm8l151x/src/stm8l15x_itc.c: 304: break; + jra 00129$ +; ../inc/stm8l151x/src/stm8l15x_itc.c: 309: case EXTI7_IRQn: +00115$: +; ../inc/stm8l151x/src/stm8l15x_itc.c: 310: ITC->ISPR4 &= Mask; + ld a, 0x7f73 + and a, (0x01, sp) + ld 0x7f73, a +; ../inc/stm8l151x/src/stm8l15x_itc.c: 311: ITC->ISPR4 |= NewPriority; + ld a, 0x7f73 + or a, (0x02, sp) + ld 0x7f73, a +; ../inc/stm8l151x/src/stm8l15x_itc.c: 312: break; + jra 00129$ +; ../inc/stm8l151x/src/stm8l15x_itc.c: 323: case TIM2_UPD_OVF_TRG_BRK_IRQn: +00118$: +; ../inc/stm8l151x/src/stm8l15x_itc.c: 328: ITC->ISPR5 &= Mask; + ld a, 0x7f74 + and a, (0x01, sp) + ld 0x7f74, a +; ../inc/stm8l151x/src/stm8l15x_itc.c: 329: ITC->ISPR5 |= NewPriority; + ld a, 0x7f74 + or a, (0x02, sp) + ld 0x7f74, a +; ../inc/stm8l151x/src/stm8l15x_itc.c: 330: break; + jra 00129$ +; ../inc/stm8l151x/src/stm8l15x_itc.c: 338: case TIM3_CC_IRQn: +00121$: +; ../inc/stm8l151x/src/stm8l15x_itc.c: 344: ITC->ISPR6 &= Mask; + ld a, 0x7f75 + and a, (0x01, sp) + ld 0x7f75, a +; ../inc/stm8l151x/src/stm8l15x_itc.c: 345: ITC->ISPR6 |= NewPriority; + ld a, 0x7f75 + or a, (0x02, sp) + ld 0x7f75, a +; ../inc/stm8l151x/src/stm8l15x_itc.c: 346: break; + jra 00129$ +; ../inc/stm8l151x/src/stm8l15x_itc.c: 355: case USART1_TX_IRQn: +00124$: +; ../inc/stm8l151x/src/stm8l15x_itc.c: 359: ITC->ISPR7 &= Mask; + ld a, 0x7f76 + and a, (0x01, sp) + ld 0x7f76, a +; ../inc/stm8l151x/src/stm8l15x_itc.c: 360: ITC->ISPR7 |= NewPriority; + ld a, 0x7f76 + or a, (0x02, sp) + ld 0x7f76, a +; ../inc/stm8l151x/src/stm8l15x_itc.c: 361: break; + jra 00129$ +; ../inc/stm8l151x/src/stm8l15x_itc.c: 366: case I2C1_IRQn: +00126$: +; ../inc/stm8l151x/src/stm8l15x_itc.c: 371: ITC->ISPR8 &= Mask; + ld a, 0x7f77 + and a, (0x01, sp) + ld 0x7f77, a +; ../inc/stm8l151x/src/stm8l15x_itc.c: 372: ITC->ISPR8 |= NewPriority; + ld a, 0x7f77 + or a, (0x02, sp) + ld 0x7f77, a +; ../inc/stm8l151x/src/stm8l15x_itc.c: 377: } +00129$: +; ../inc/stm8l151x/src/stm8l15x_itc.c: 378: } + popw x + popw x + pop a + jp (x) + .area CODE + .area CONST + .area INITIALIZER + .area CABS (ABS) diff --git a/firmware/STM8L15X_LD/stm8l15x_itc.lst b/firmware/STM8L15X_LD/stm8l15x_itc.lst new file mode 100644 index 0000000..e834fde --- /dev/null +++ b/firmware/STM8L15X_LD/stm8l15x_itc.lst @@ -0,0 +1,421 @@ + 1 ;-------------------------------------------------------- + 2 ; File Created by SDCC : free open source ISO C Compiler + 3 ; Version 4.5.0 #15242 (Linux) + 4 ;-------------------------------------------------------- + 5 .module stm8l15x_itc + 6 + 7 ;-------------------------------------------------------- + 8 ; Public variables in this module + 9 ;-------------------------------------------------------- + 10 .globl _ITC_GetCPUCC + 11 .globl _ITC_DeInit + 12 .globl _ITC_GetSoftIntStatus + 13 .globl _ITC_GetSoftwarePriority + 14 .globl _ITC_SetSoftwarePriority + 15 ;-------------------------------------------------------- + 16 ; ram data + 17 ;-------------------------------------------------------- + 18 .area DATA + 19 ;-------------------------------------------------------- + 20 ; ram data + 21 ;-------------------------------------------------------- + 22 .area INITIALIZED + 23 ;-------------------------------------------------------- + 24 ; absolute external ram data + 25 ;-------------------------------------------------------- + 26 .area DABS (ABS) + 27 + 28 ; default segment ordering for linker + 29 .area HOME + 30 .area GSINIT + 31 .area GSFINAL + 32 .area CONST + 33 .area INITIALIZER + 34 .area CODE + 35 + 36 ;-------------------------------------------------------- + 37 ; global & static initialisations + 38 ;-------------------------------------------------------- + 39 .area HOME + 40 .area GSINIT + 41 .area GSFINAL + 42 .area GSINIT + 43 ;-------------------------------------------------------- + 44 ; Home + 45 ;-------------------------------------------------------- + 46 .area HOME + 47 .area HOME + 48 ;-------------------------------------------------------- + 49 ; code + 50 ;-------------------------------------------------------- + 51 .area CODE + 52 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 56: uint8_t ITC_GetCPUCC(void) + 53 ; ----------------------------------------- + 54 ; function ITC_GetCPUCC + 55 ; ----------------------------------------- + 000000 56 _ITC_GetCPUCC: + 57 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 65: __asm__("push cc"); + 000000 8A [ 1] 58 push cc + 59 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 66: __asm__("pop a"); + 000001 84 [ 1] 60 pop a + 61 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 71: } + 000002 81 [ 4] 62 ret + 63 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 90: void ITC_DeInit(void) + 64 ; ----------------------------------------- + 65 ; function ITC_DeInit + 66 ; ----------------------------------------- + 000003 67 _ITC_DeInit: + 68 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 92: ITC->ISPR1 = ITC_SPRX_RESET_VALUE; + 000003 35 FF 7F 70 [ 1] 69 mov 0x7f70+0, #0xff + 70 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 93: ITC->ISPR2 = ITC_SPRX_RESET_VALUE; + 000007 35 FF 7F 71 [ 1] 71 mov 0x7f71+0, #0xff + 72 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 94: ITC->ISPR3 = ITC_SPRX_RESET_VALUE; + 00000B 35 FF 7F 72 [ 1] 73 mov 0x7f72+0, #0xff + 74 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 95: ITC->ISPR4 = ITC_SPRX_RESET_VALUE; + 00000F 35 FF 7F 73 [ 1] 75 mov 0x7f73+0, #0xff + 76 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 96: ITC->ISPR5 = ITC_SPRX_RESET_VALUE; + 000013 35 FF 7F 74 [ 1] 77 mov 0x7f74+0, #0xff + 78 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 97: ITC->ISPR6 = ITC_SPRX_RESET_VALUE; + 000017 35 FF 7F 75 [ 1] 79 mov 0x7f75+0, #0xff + 80 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 98: ITC->ISPR7 = ITC_SPRX_RESET_VALUE; + 00001B 35 FF 7F 76 [ 1] 81 mov 0x7f76+0, #0xff + 82 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 99: ITC->ISPR8 = ITC_SPRX_RESET_VALUE; + 00001F 35 FF 7F 77 [ 1] 83 mov 0x7f77+0, #0xff + 84 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 100: } + 000023 81 [ 4] 85 ret + 86 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 107: uint8_t ITC_GetSoftIntStatus(void) + 87 ; ----------------------------------------- + 88 ; function ITC_GetSoftIntStatus + 89 ; ----------------------------------------- + 000024 90 _ITC_GetSoftIntStatus: + 91 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 109: return ((uint8_t)(ITC_GetCPUCC() & CPU_SOFT_INT_DISABLED)); + 000024 CDr00r00 [ 4] 92 call _ITC_GetCPUCC + 000027 A4 28 [ 1] 93 and a, #0x28 + 94 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 110: } + 000029 81 [ 4] 95 ret + 96 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 117: ITC_PriorityLevel_TypeDef ITC_GetSoftwarePriority(IRQn_TypeDef IRQn) + 97 ; ----------------------------------------- + 98 ; function ITC_GetSoftwarePriority + 99 ; ----------------------------------------- + 00002A 100 _ITC_GetSoftwarePriority: + 00002A 89 [ 2] 101 pushw x + 00002B 97 [ 1] 102 ld xl, a + 103 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 119: uint8_t Value = 0; + 00002C 4F [ 1] 104 clr a + 105 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 126: Mask = (uint8_t)(0x03U << ((IRQn % 4U) * 2U)); + 00002D 90 93 [ 1] 106 ldw y, x + 00002F 88 [ 1] 107 push a + 000030 90 9F [ 1] 108 ld a, yl + 000032 A4 03 [ 1] 109 and a, #0x03 + 000034 95 [ 1] 110 ld xh, a + 000035 84 [ 1] 111 pop a + 000036 02 [ 1] 112 rlwa x + 000037 6B 01 [ 1] 113 ld (0x01, sp), a + 000039 01 [ 1] 114 rrwa x + 00003A 08 01 [ 1] 115 sll (0x01, sp) + 00003C 88 [ 1] 116 push a + 00003D A6 03 [ 1] 117 ld a, #0x03 + 00003F 6B 03 [ 1] 118 ld (0x03, sp), a + 000041 7B 02 [ 1] 119 ld a, (0x02, sp) + 000043 27 05 [ 1] 120 jreq 00139$ + 000045 121 00138$: + 000045 08 03 [ 1] 122 sll (0x03, sp) + 000047 4A [ 1] 123 dec a + 000048 26 FB [ 1] 124 jrne 00138$ + 00004A 125 00139$: + 126 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 128: switch (IRQn) + 00004A 9F [ 1] 127 ld a, xl + 00004B A1 1D [ 1] 128 cp a, #0x1d + 00004D 84 [ 1] 129 pop a + 00004E 22 7A [ 1] 130 jrugt 00128$ + 000050 02 [ 1] 131 rlwa x + 000051 4F [ 1] 132 clr a + 000052 01 [ 1] 133 rrwa x + 000053 58 [ 2] 134 sllw x + 000054 DEu00u58 [ 2] 135 ldw x, (#00141$, x) + 000057 FC [ 2] 136 jp (x) + 000058 137 00141$: + 000058r00rCA 138 .dw #00128$ + 00005Ar00r94 139 .dw #00103$ + 00005Cr00r94 140 .dw #00103$ + 00005Er00r94 141 .dw #00103$ + 000060r00r9B 142 .dw #00107$ + 000062r00r9B 143 .dw #00107$ + 000064r00r9B 144 .dw #00107$ + 000066r00r9B 145 .dw #00107$ + 000068r00rA2 146 .dw #00111$ + 00006Ar00rA2 147 .dw #00111$ + 00006Cr00rA2 148 .dw #00111$ + 00006Er00rA2 149 .dw #00111$ + 000070r00rA9 150 .dw #00115$ + 000072r00rA9 151 .dw #00115$ + 000074r00rA9 152 .dw #00115$ + 000076r00rA9 153 .dw #00115$ + 000078r00rCA 154 .dw #00128$ + 00007Ar00rB0 155 .dw #00118$ + 00007Cr00rB0 156 .dw #00118$ + 00007Er00rB0 157 .dw #00118$ + 000080r00rB7 158 .dw #00121$ + 000082r00rB7 159 .dw #00121$ + 000084r00rB7 160 .dw #00121$ + 000086r00rCA 161 .dw #00128$ + 000088r00rCA 162 .dw #00128$ + 00008Ar00rBE 163 .dw #00124$ + 00008Cr00rBE 164 .dw #00124$ + 00008Er00rBE 165 .dw #00124$ + 000090r00rC5 166 .dw #00126$ + 000092r00rC5 167 .dw #00126$ + 168 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 132: case DMA1_CHANNEL2_3_IRQn: + 000094 169 00103$: + 170 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 133: Value = (uint8_t)(ITC->ISPR1 & Mask); /* Read software priority */ + 000094 C6 7F 70 [ 1] 171 ld a, 0x7f70 + 000097 14 02 [ 1] 172 and a, (0x02, sp) + 173 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 134: break; + 000099 20 2F [ 2] 174 jra 00128$ + 175 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 144: case EXTID_IRQn: + 00009B 176 00107$: + 177 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 150: Value = (uint8_t)(ITC->ISPR2 & Mask); /* Read software priority */ + 00009B C6 7F 71 [ 1] 178 ld a, 0x7f71 + 00009E 14 02 [ 1] 179 and a, (0x02, sp) + 180 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 151: break; + 0000A0 20 28 [ 2] 181 jra 00128$ + 182 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 156: case EXTI3_IRQn: + 0000A2 183 00111$: + 184 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 157: Value = (uint8_t)(ITC->ISPR3 & Mask); /* Read software priority */ + 0000A2 C6 7F 72 [ 1] 185 ld a, 0x7f72 + 0000A5 14 02 [ 1] 186 and a, (0x02, sp) + 187 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 158: break; + 0000A7 20 21 [ 2] 188 jra 00128$ + 189 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 163: case EXTI7_IRQn: + 0000A9 190 00115$: + 191 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 164: Value = (uint8_t)(ITC->ISPR4 & Mask); /* Read software priority */ + 0000A9 C6 7F 73 [ 1] 192 ld a, 0x7f73 + 0000AC 14 02 [ 1] 193 and a, (0x02, sp) + 194 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 165: break; + 0000AE 20 1A [ 2] 195 jra 00128$ + 196 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 177: case TIM2_UPD_OVF_TRG_BRK_IRQn: + 0000B0 197 00118$: + 198 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 182: Value = (uint8_t)(ITC->ISPR5 & Mask); /* Read software priority */ + 0000B0 C6 7F 74 [ 1] 199 ld a, 0x7f74 + 0000B3 14 02 [ 1] 200 and a, (0x02, sp) + 201 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 183: break; + 0000B5 20 13 [ 2] 202 jra 00128$ + 203 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 192: case TIM3_CC_IRQn: + 0000B7 204 00121$: + 205 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 198: Value = (uint8_t)(ITC->ISPR6 & Mask); /* Read software priority */ + 0000B7 C6 7F 75 [ 1] 206 ld a, 0x7f75 + 0000BA 14 02 [ 1] 207 and a, (0x02, sp) + 208 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 199: break; + 0000BC 20 0C [ 2] 209 jra 00128$ + 210 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 208: case USART1_TX_IRQn: + 0000BE 211 00124$: + 212 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 212: Value = (uint8_t)(ITC->ISPR7 & Mask); /* Read software priority */ + 0000BE C6 7F 76 [ 1] 213 ld a, 0x7f76 + 0000C1 14 02 [ 1] 214 and a, (0x02, sp) + 215 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 213: break; + 0000C3 20 05 [ 2] 216 jra 00128$ + 217 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 218: case I2C1_IRQn: + 0000C5 218 00126$: + 219 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 223: Value = (uint8_t)(ITC->ISPR8 & Mask); /* Read software priority */ + 0000C5 C6 7F 77 [ 1] 220 ld a, 0x7f77 + 0000C8 14 02 [ 1] 221 and a, (0x02, sp) + 222 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 228: } + 0000CA 223 00128$: + 224 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 230: Value >>= (uint8_t)((IRQn % 4u) * 2u); + 0000CA 88 [ 1] 225 push a + 0000CB 7B 02 [ 1] 226 ld a, (0x02, sp) + 0000CD 27 05 [ 1] 227 jreq 00143$ + 0000CF 228 00142$: + 0000CF 04 01 [ 1] 229 srl (1, sp) + 0000D1 4A [ 1] 230 dec a + 0000D2 26 FB [ 1] 231 jrne 00142$ + 0000D4 232 00143$: + 0000D4 84 [ 1] 233 pop a + 234 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 232: return((ITC_PriorityLevel_TypeDef)Value); + 235 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 234: } + 0000D5 85 [ 2] 236 popw x + 0000D6 81 [ 4] 237 ret + 238 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 253: void ITC_SetSoftwarePriority(IRQn_TypeDef IRQn, ITC_PriorityLevel_TypeDef ITC_PriorityLevel) + 239 ; ----------------------------------------- + 240 ; function ITC_SetSoftwarePriority + 241 ; ----------------------------------------- + 0000D7 242 _ITC_SetSoftwarePriority: + 0000D7 89 [ 2] 243 pushw x + 244 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 267: Mask = (uint8_t)(~(uint8_t)(0x03U << ((IRQn % 4U) * 2U))); + 0000D8 97 [ 1] 245 ld xl, a + 0000D9 A4 03 [ 1] 246 and a, #0x03 + 0000DB 48 [ 1] 247 sll a + 0000DC 95 [ 1] 248 ld xh, a + 0000DD A6 03 [ 1] 249 ld a, #0x03 + 0000DF 88 [ 1] 250 push a + 0000E0 9E [ 1] 251 ld a, xh + 0000E1 4D [ 1] 252 tnz a + 0000E2 27 05 [ 1] 253 jreq 00139$ + 0000E4 254 00138$: + 0000E4 08 01 [ 1] 255 sll (1, sp) + 0000E6 4A [ 1] 256 dec a + 0000E7 26 FB [ 1] 257 jrne 00138$ + 0000E9 258 00139$: + 0000E9 84 [ 1] 259 pop a + 0000EA 43 [ 1] 260 cpl a + 0000EB 6B 01 [ 1] 261 ld (0x01, sp), a + 262 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 269: NewPriority = (uint8_t)((uint8_t)(ITC_PriorityLevel) << ((IRQn % 4U) * 2U)); + 0000ED 7B 05 [ 1] 263 ld a, (0x05, sp) + 0000EF 88 [ 1] 264 push a + 0000F0 9E [ 1] 265 ld a, xh + 0000F1 4D [ 1] 266 tnz a + 0000F2 27 05 [ 1] 267 jreq 00141$ + 0000F4 268 00140$: + 0000F4 08 01 [ 1] 269 sll (1, sp) + 0000F6 4A [ 1] 270 dec a + 0000F7 26 FB [ 1] 271 jrne 00140$ + 0000F9 272 00141$: + 0000F9 84 [ 1] 273 pop a + 0000FA 6B 02 [ 1] 274 ld (0x02, sp), a + 275 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 271: switch (IRQn) + 0000FC 9F [ 1] 276 ld a, xl + 0000FD A1 1D [ 1] 277 cp a, #0x1d + 0000FF 23 03 [ 2] 278 jrule 00142$ + 000101 CCr01rD5 [ 2] 279 jp 00129$ + 000104 280 00142$: + 000104 4F [ 1] 281 clr a + 000105 95 [ 1] 282 ld xh, a + 000106 58 [ 2] 283 sllw x + 000107 DEu01u0B [ 2] 284 ldw x, (#00143$, x) + 00010A FC [ 2] 285 jp (x) + 00010B 286 00143$: + 00010Br01rD5 287 .dw #00129$ + 00010Dr01r47 288 .dw #00103$ + 00010Fr01r47 289 .dw #00103$ + 000111r01r47 290 .dw #00103$ + 000113r01r59 291 .dw #00107$ + 000115r01r59 292 .dw #00107$ + 000117r01r59 293 .dw #00107$ + 000119r01r59 294 .dw #00107$ + 00011Br01r6B 295 .dw #00111$ + 00011Dr01r6B 296 .dw #00111$ + 00011Fr01r6B 297 .dw #00111$ + 000121r01r6B 298 .dw #00111$ + 000123r01r7D 299 .dw #00115$ + 000125r01r7D 300 .dw #00115$ + 000127r01r7D 301 .dw #00115$ + 000129r01r7D 302 .dw #00115$ + 00012Br01rD5 303 .dw #00129$ + 00012Dr01r8F 304 .dw #00118$ + 00012Fr01r8F 305 .dw #00118$ + 000131r01r8F 306 .dw #00118$ + 000133r01rA1 307 .dw #00121$ + 000135r01rA1 308 .dw #00121$ + 000137r01rA1 309 .dw #00121$ + 000139r01rD5 310 .dw #00129$ + 00013Br01rD5 311 .dw #00129$ + 00013Dr01rB3 312 .dw #00124$ + 00013Fr01rB3 313 .dw #00124$ + 000141r01rB3 314 .dw #00124$ + 000143r01rC5 315 .dw #00126$ + 000145r01rC5 316 .dw #00126$ + 317 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 275: case DMA1_CHANNEL2_3_IRQn: + 000147 318 00103$: + 319 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 276: ITC->ISPR1 &= Mask; + 000147 C6 7F 70 [ 1] 320 ld a, 0x7f70 + 00014A 14 01 [ 1] 321 and a, (0x01, sp) + 00014C C7 7F 70 [ 1] 322 ld 0x7f70, a + 323 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 277: ITC->ISPR1 |= NewPriority; + 00014F C6 7F 70 [ 1] 324 ld a, 0x7f70 + 000152 1A 02 [ 1] 325 or a, (0x02, sp) + 000154 C7 7F 70 [ 1] 326 ld 0x7f70, a + 327 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 278: break; + 000157 20 7C [ 2] 328 jra 00129$ + 329 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 288: case EXTID_IRQn: + 000159 330 00107$: + 331 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 294: ITC->ISPR2 &= Mask; + 000159 C6 7F 71 [ 1] 332 ld a, 0x7f71 + 00015C 14 01 [ 1] 333 and a, (0x01, sp) + 00015E C7 7F 71 [ 1] 334 ld 0x7f71, a + 335 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 295: ITC->ISPR2 |= NewPriority; + 000161 C6 7F 71 [ 1] 336 ld a, 0x7f71 + 000164 1A 02 [ 1] 337 or a, (0x02, sp) + 000166 C7 7F 71 [ 1] 338 ld 0x7f71, a + 339 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 296: break; + 000169 20 6A [ 2] 340 jra 00129$ + 341 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 301: case EXTI3_IRQn: + 00016B 342 00111$: + 343 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 302: ITC->ISPR3 &= Mask; + 00016B C6 7F 72 [ 1] 344 ld a, 0x7f72 + 00016E 14 01 [ 1] 345 and a, (0x01, sp) + 000170 C7 7F 72 [ 1] 346 ld 0x7f72, a + 347 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 303: ITC->ISPR3 |= NewPriority; + 000173 C6 7F 72 [ 1] 348 ld a, 0x7f72 + 000176 1A 02 [ 1] 349 or a, (0x02, sp) + 000178 C7 7F 72 [ 1] 350 ld 0x7f72, a + 351 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 304: break; + 00017B 20 58 [ 2] 352 jra 00129$ + 353 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 309: case EXTI7_IRQn: + 00017D 354 00115$: + 355 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 310: ITC->ISPR4 &= Mask; + 00017D C6 7F 73 [ 1] 356 ld a, 0x7f73 + 000180 14 01 [ 1] 357 and a, (0x01, sp) + 000182 C7 7F 73 [ 1] 358 ld 0x7f73, a + 359 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 311: ITC->ISPR4 |= NewPriority; + 000185 C6 7F 73 [ 1] 360 ld a, 0x7f73 + 000188 1A 02 [ 1] 361 or a, (0x02, sp) + 00018A C7 7F 73 [ 1] 362 ld 0x7f73, a + 363 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 312: break; + 00018D 20 46 [ 2] 364 jra 00129$ + 365 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 323: case TIM2_UPD_OVF_TRG_BRK_IRQn: + 00018F 366 00118$: + 367 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 328: ITC->ISPR5 &= Mask; + 00018F C6 7F 74 [ 1] 368 ld a, 0x7f74 + 000192 14 01 [ 1] 369 and a, (0x01, sp) + 000194 C7 7F 74 [ 1] 370 ld 0x7f74, a + 371 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 329: ITC->ISPR5 |= NewPriority; + 000197 C6 7F 74 [ 1] 372 ld a, 0x7f74 + 00019A 1A 02 [ 1] 373 or a, (0x02, sp) + 00019C C7 7F 74 [ 1] 374 ld 0x7f74, a + 375 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 330: break; + 00019F 20 34 [ 2] 376 jra 00129$ + 377 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 338: case TIM3_CC_IRQn: + 0001A1 378 00121$: + 379 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 344: ITC->ISPR6 &= Mask; + 0001A1 C6 7F 75 [ 1] 380 ld a, 0x7f75 + 0001A4 14 01 [ 1] 381 and a, (0x01, sp) + 0001A6 C7 7F 75 [ 1] 382 ld 0x7f75, a + 383 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 345: ITC->ISPR6 |= NewPriority; + 0001A9 C6 7F 75 [ 1] 384 ld a, 0x7f75 + 0001AC 1A 02 [ 1] 385 or a, (0x02, sp) + 0001AE C7 7F 75 [ 1] 386 ld 0x7f75, a + 387 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 346: break; + 0001B1 20 22 [ 2] 388 jra 00129$ + 389 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 355: case USART1_TX_IRQn: + 0001B3 390 00124$: + 391 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 359: ITC->ISPR7 &= Mask; + 0001B3 C6 7F 76 [ 1] 392 ld a, 0x7f76 + 0001B6 14 01 [ 1] 393 and a, (0x01, sp) + 0001B8 C7 7F 76 [ 1] 394 ld 0x7f76, a + 395 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 360: ITC->ISPR7 |= NewPriority; + 0001BB C6 7F 76 [ 1] 396 ld a, 0x7f76 + 0001BE 1A 02 [ 1] 397 or a, (0x02, sp) + 0001C0 C7 7F 76 [ 1] 398 ld 0x7f76, a + 399 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 361: break; + 0001C3 20 10 [ 2] 400 jra 00129$ + 401 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 366: case I2C1_IRQn: + 0001C5 402 00126$: + 403 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 371: ITC->ISPR8 &= Mask; + 0001C5 C6 7F 77 [ 1] 404 ld a, 0x7f77 + 0001C8 14 01 [ 1] 405 and a, (0x01, sp) + 0001CA C7 7F 77 [ 1] 406 ld 0x7f77, a + 407 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 372: ITC->ISPR8 |= NewPriority; + 0001CD C6 7F 77 [ 1] 408 ld a, 0x7f77 + 0001D0 1A 02 [ 1] 409 or a, (0x02, sp) + 0001D2 C7 7F 77 [ 1] 410 ld 0x7f77, a + 411 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 377: } + 0001D5 412 00129$: + 413 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 378: } + 0001D5 85 [ 2] 414 popw x + 0001D6 85 [ 2] 415 popw x + 0001D7 84 [ 1] 416 pop a + 0001D8 FC [ 2] 417 jp (x) + 418 .area CODE + 419 .area CONST + 420 .area INITIALIZER + 421 .area CABS (ABS) diff --git a/firmware/STM8L15X_LD/stm8l15x_itc.rel b/firmware/STM8L15X_LD/stm8l15x_itc.rel new file mode 100644 index 0000000..865205d --- /dev/null +++ b/firmware/STM8L15X_LD/stm8l15x_itc.rel @@ -0,0 +1,238 @@ +XH3 +H B areas 6 global symbols +M stm8l15x_itc +S .__.ABS. Def000000 +A _CODE size 0 flags 0 addr 0 +A DATA size 0 flags 0 addr 0 +A INITIALIZED size 0 flags 0 addr 0 +A DABS size 0 flags 8 addr 0 +A HOME size 0 flags 0 addr 0 +A GSINIT size 0 flags 0 addr 0 +A GSFINAL size 0 flags 0 addr 0 +A CONST size 0 flags 0 addr 0 +A INITIALIZER size 0 flags 0 addr 0 +A CODE size 1D9 flags 0 addr 0 +S _ITC_GetSoftIntStatus Def000024 +S _ITC_DeInit Def000003 +S _ITC_GetSoftwarePriority Def00002A +S _ITC_GetCPUCC Def000000 +S _ITC_SetSoftwarePriority Def0000D7 +A CABS size 0 flags 8 addr 0 +T 00 00 00 +R 00 00 00 09 +T 00 00 00 8A 84 81 +R 00 00 00 09 +T 00 00 03 +R 00 00 00 09 +T 00 00 03 35 FF 7F 70 35 FF 7F 71 35 FF 7F 72 35 +R 00 00 00 09 +T 00 00 10 FF 7F 73 35 FF 7F 74 35 FF 7F 75 35 FF +R 00 00 00 09 +T 00 00 1D 7F 76 35 FF 7F 77 81 +R 00 00 00 09 +T 00 00 24 +R 00 00 00 09 +T 00 00 24 CD 00 00 A4 28 81 +R 00 00 00 09 00 04 00 09 +T 00 00 2A +R 00 00 00 09 +T 00 00 2A 89 97 4F 90 93 88 90 9F A4 03 95 84 02 +R 00 00 00 09 +T 00 00 37 6B 01 01 08 01 88 A6 03 6B 03 7B 02 27 +R 00 00 00 09 +T 00 00 44 05 +R 00 00 00 09 +T 00 00 45 +R 00 00 00 09 +T 00 00 45 08 03 4A 26 FB +R 00 00 00 09 +T 00 00 4A +R 00 00 00 09 +T 00 00 4A 9F A1 1D 84 22 7A 02 4F 01 58 DE 00 58 +R 00 00 00 09 10 0E 00 09 +T 00 00 57 FC +R 00 00 00 09 +T 00 00 58 +R 00 00 00 09 +T 00 00 58 00 CA 00 94 +R 00 00 00 09 00 03 00 09 00 05 00 09 +T 00 00 5C 00 94 00 94 +R 00 00 00 09 00 03 00 09 00 05 00 09 +T 00 00 60 00 9B 00 9B +R 00 00 00 09 00 03 00 09 00 05 00 09 +T 00 00 64 00 9B 00 9B +R 00 00 00 09 00 03 00 09 00 05 00 09 +T 00 00 68 00 A2 00 A2 +R 00 00 00 09 00 03 00 09 00 05 00 09 +T 00 00 6C 00 A2 00 A2 +R 00 00 00 09 00 03 00 09 00 05 00 09 +T 00 00 70 00 A9 00 A9 +R 00 00 00 09 00 03 00 09 00 05 00 09 +T 00 00 74 00 A9 00 A9 +R 00 00 00 09 00 03 00 09 00 05 00 09 +T 00 00 78 00 CA 00 B0 +R 00 00 00 09 00 03 00 09 00 05 00 09 +T 00 00 7C 00 B0 00 B0 +R 00 00 00 09 00 03 00 09 00 05 00 09 +T 00 00 80 00 B7 00 B7 +R 00 00 00 09 00 03 00 09 00 05 00 09 +T 00 00 84 00 B7 00 CA +R 00 00 00 09 00 03 00 09 00 05 00 09 +T 00 00 88 00 CA 00 BE +R 00 00 00 09 00 03 00 09 00 05 00 09 +T 00 00 8C 00 BE 00 BE +R 00 00 00 09 00 03 00 09 00 05 00 09 +T 00 00 90 00 C5 00 C5 +R 00 00 00 09 00 03 00 09 00 05 00 09 +T 00 00 94 +R 00 00 00 09 +T 00 00 94 C6 7F 70 14 02 20 2F +R 00 00 00 09 +T 00 00 9B +R 00 00 00 09 +T 00 00 9B C6 7F 71 14 02 20 28 +R 00 00 00 09 +T 00 00 A2 +R 00 00 00 09 +T 00 00 A2 C6 7F 72 14 02 20 21 +R 00 00 00 09 +T 00 00 A9 +R 00 00 00 09 +T 00 00 A9 C6 7F 73 14 02 20 1A +R 00 00 00 09 +T 00 00 B0 +R 00 00 00 09 +T 00 00 B0 C6 7F 74 14 02 20 13 +R 00 00 00 09 +T 00 00 B7 +R 00 00 00 09 +T 00 00 B7 C6 7F 75 14 02 20 0C +R 00 00 00 09 +T 00 00 BE +R 00 00 00 09 +T 00 00 BE C6 7F 76 14 02 20 05 +R 00 00 00 09 +T 00 00 C5 +R 00 00 00 09 +T 00 00 C5 C6 7F 77 14 02 +R 00 00 00 09 +T 00 00 CA +R 00 00 00 09 +T 00 00 CA 88 7B 02 27 05 +R 00 00 00 09 +T 00 00 CF +R 00 00 00 09 +T 00 00 CF 04 01 4A 26 FB +R 00 00 00 09 +T 00 00 D4 +R 00 00 00 09 +T 00 00 D4 84 85 81 +R 00 00 00 09 +T 00 00 D7 +R 00 00 00 09 +T 00 00 D7 89 97 A4 03 48 95 A6 03 88 9E 4D 27 05 +R 00 00 00 09 +T 00 00 E4 +R 00 00 00 09 +T 00 00 E4 08 01 4A 26 FB +R 00 00 00 09 +T 00 00 E9 +R 00 00 00 09 +T 00 00 E9 84 43 6B 01 7B 05 88 9E 4D 27 05 +R 00 00 00 09 +T 00 00 F4 +R 00 00 00 09 +T 00 00 F4 08 01 4A 26 FB +R 00 00 00 09 +T 00 00 F9 +R 00 00 00 09 +T 00 00 F9 84 6B 02 9F A1 1D 23 03 CC 01 D5 +R 00 00 00 09 00 0C 00 09 +T 00 01 04 +R 00 00 00 09 +T 00 01 04 4F 95 58 DE 01 0B FC +R 00 00 00 09 10 07 00 09 +T 00 01 0B +R 00 00 00 09 +T 00 01 0B 01 D5 01 47 +R 00 00 00 09 00 03 00 09 00 05 00 09 +T 00 01 0F 01 47 01 47 +R 00 00 00 09 00 03 00 09 00 05 00 09 +T 00 01 13 01 59 01 59 +R 00 00 00 09 00 03 00 09 00 05 00 09 +T 00 01 17 01 59 01 59 +R 00 00 00 09 00 03 00 09 00 05 00 09 +T 00 01 1B 01 6B 01 6B +R 00 00 00 09 00 03 00 09 00 05 00 09 +T 00 01 1F 01 6B 01 6B +R 00 00 00 09 00 03 00 09 00 05 00 09 +T 00 01 23 01 7D 01 7D +R 00 00 00 09 00 03 00 09 00 05 00 09 +T 00 01 27 01 7D 01 7D +R 00 00 00 09 00 03 00 09 00 05 00 09 +T 00 01 2B 01 D5 01 8F +R 00 00 00 09 00 03 00 09 00 05 00 09 +T 00 01 2F 01 8F 01 8F +R 00 00 00 09 00 03 00 09 00 05 00 09 +T 00 01 33 01 A1 01 A1 +R 00 00 00 09 00 03 00 09 00 05 00 09 +T 00 01 37 01 A1 01 D5 +R 00 00 00 09 00 03 00 09 00 05 00 09 +T 00 01 3B 01 D5 01 B3 +R 00 00 00 09 00 03 00 09 00 05 00 09 +T 00 01 3F 01 B3 01 B3 +R 00 00 00 09 00 03 00 09 00 05 00 09 +T 00 01 43 01 C5 01 C5 +R 00 00 00 09 00 03 00 09 00 05 00 09 +T 00 01 47 +R 00 00 00 09 +T 00 01 47 C6 7F 70 14 01 C7 7F 70 C6 7F 70 1A 02 +R 00 00 00 09 +T 00 01 54 C7 7F 70 20 7C +R 00 00 00 09 +T 00 01 59 +R 00 00 00 09 +T 00 01 59 C6 7F 71 14 01 C7 7F 71 C6 7F 71 1A 02 +R 00 00 00 09 +T 00 01 66 C7 7F 71 20 6A +R 00 00 00 09 +T 00 01 6B +R 00 00 00 09 +T 00 01 6B C6 7F 72 14 01 C7 7F 72 C6 7F 72 1A 02 +R 00 00 00 09 +T 00 01 78 C7 7F 72 20 58 +R 00 00 00 09 +T 00 01 7D +R 00 00 00 09 +T 00 01 7D C6 7F 73 14 01 C7 7F 73 C6 7F 73 1A 02 +R 00 00 00 09 +T 00 01 8A C7 7F 73 20 46 +R 00 00 00 09 +T 00 01 8F +R 00 00 00 09 +T 00 01 8F C6 7F 74 14 01 C7 7F 74 C6 7F 74 1A 02 +R 00 00 00 09 +T 00 01 9C C7 7F 74 20 34 +R 00 00 00 09 +T 00 01 A1 +R 00 00 00 09 +T 00 01 A1 C6 7F 75 14 01 C7 7F 75 C6 7F 75 1A 02 +R 00 00 00 09 +T 00 01 AE C7 7F 75 20 22 +R 00 00 00 09 +T 00 01 B3 +R 00 00 00 09 +T 00 01 B3 C6 7F 76 14 01 C7 7F 76 C6 7F 76 1A 02 +R 00 00 00 09 +T 00 01 C0 C7 7F 76 20 10 +R 00 00 00 09 +T 00 01 C5 +R 00 00 00 09 +T 00 01 C5 C6 7F 77 14 01 C7 7F 77 C6 7F 77 1A 02 +R 00 00 00 09 +T 00 01 D2 C7 7F 77 +R 00 00 00 09 +T 00 01 D5 +R 00 00 00 09 +T 00 01 D5 85 85 84 FC +R 00 00 00 09 diff --git a/firmware/STM8L15X_LD/stm8l15x_itc.rst b/firmware/STM8L15X_LD/stm8l15x_itc.rst new file mode 100644 index 0000000..a6422c5 --- /dev/null +++ b/firmware/STM8L15X_LD/stm8l15x_itc.rst @@ -0,0 +1,421 @@ + 1 ;-------------------------------------------------------- + 2 ; File Created by SDCC : free open source ISO C Compiler + 3 ; Version 4.5.0 #15242 (Linux) + 4 ;-------------------------------------------------------- + 5 .module stm8l15x_itc + 6 + 7 ;-------------------------------------------------------- + 8 ; Public variables in this module + 9 ;-------------------------------------------------------- + 10 .globl _ITC_GetCPUCC + 11 .globl _ITC_DeInit + 12 .globl _ITC_GetSoftIntStatus + 13 .globl _ITC_GetSoftwarePriority + 14 .globl _ITC_SetSoftwarePriority + 15 ;-------------------------------------------------------- + 16 ; ram data + 17 ;-------------------------------------------------------- + 18 .area DATA + 19 ;-------------------------------------------------------- + 20 ; ram data + 21 ;-------------------------------------------------------- + 22 .area INITIALIZED + 23 ;-------------------------------------------------------- + 24 ; absolute external ram data + 25 ;-------------------------------------------------------- + 26 .area DABS (ABS) + 27 + 28 ; default segment ordering for linker + 29 .area HOME + 30 .area GSINIT + 31 .area GSFINAL + 32 .area CONST + 33 .area INITIALIZER + 34 .area CODE + 35 + 36 ;-------------------------------------------------------- + 37 ; global & static initialisations + 38 ;-------------------------------------------------------- + 39 .area HOME + 40 .area GSINIT + 41 .area GSFINAL + 42 .area GSINIT + 43 ;-------------------------------------------------------- + 44 ; Home + 45 ;-------------------------------------------------------- + 46 .area HOME + 47 .area HOME + 48 ;-------------------------------------------------------- + 49 ; code + 50 ;-------------------------------------------------------- + 51 .area CODE + 52 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 56: uint8_t ITC_GetCPUCC(void) + 53 ; ----------------------------------------- + 54 ; function ITC_GetCPUCC + 55 ; ----------------------------------------- + 008EBF 56 _ITC_GetCPUCC: + 57 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 65: __asm__("push cc"); + 008EBF 8A [ 1] 58 push cc + 59 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 66: __asm__("pop a"); + 008EC0 84 [ 1] 60 pop a + 61 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 71: } + 008EC1 81 [ 4] 62 ret + 63 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 90: void ITC_DeInit(void) + 64 ; ----------------------------------------- + 65 ; function ITC_DeInit + 66 ; ----------------------------------------- + 008EC2 67 _ITC_DeInit: + 68 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 92: ITC->ISPR1 = ITC_SPRX_RESET_VALUE; + 008EC2 35 FF 7F 70 [ 1] 69 mov 0x7f70+0, #0xff + 70 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 93: ITC->ISPR2 = ITC_SPRX_RESET_VALUE; + 008EC6 35 FF 7F 71 [ 1] 71 mov 0x7f71+0, #0xff + 72 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 94: ITC->ISPR3 = ITC_SPRX_RESET_VALUE; + 008ECA 35 FF 7F 72 [ 1] 73 mov 0x7f72+0, #0xff + 74 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 95: ITC->ISPR4 = ITC_SPRX_RESET_VALUE; + 008ECE 35 FF 7F 73 [ 1] 75 mov 0x7f73+0, #0xff + 76 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 96: ITC->ISPR5 = ITC_SPRX_RESET_VALUE; + 008ED2 35 FF 7F 74 [ 1] 77 mov 0x7f74+0, #0xff + 78 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 97: ITC->ISPR6 = ITC_SPRX_RESET_VALUE; + 008ED6 35 FF 7F 75 [ 1] 79 mov 0x7f75+0, #0xff + 80 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 98: ITC->ISPR7 = ITC_SPRX_RESET_VALUE; + 008EDA 35 FF 7F 76 [ 1] 81 mov 0x7f76+0, #0xff + 82 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 99: ITC->ISPR8 = ITC_SPRX_RESET_VALUE; + 008EDE 35 FF 7F 77 [ 1] 83 mov 0x7f77+0, #0xff + 84 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 100: } + 008EE2 81 [ 4] 85 ret + 86 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 107: uint8_t ITC_GetSoftIntStatus(void) + 87 ; ----------------------------------------- + 88 ; function ITC_GetSoftIntStatus + 89 ; ----------------------------------------- + 008EE3 90 _ITC_GetSoftIntStatus: + 91 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 109: return ((uint8_t)(ITC_GetCPUCC() & CPU_SOFT_INT_DISABLED)); + 008EE3 CD 8E BF [ 4] 92 call _ITC_GetCPUCC + 008EE6 A4 28 [ 1] 93 and a, #0x28 + 94 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 110: } + 008EE8 81 [ 4] 95 ret + 96 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 117: ITC_PriorityLevel_TypeDef ITC_GetSoftwarePriority(IRQn_TypeDef IRQn) + 97 ; ----------------------------------------- + 98 ; function ITC_GetSoftwarePriority + 99 ; ----------------------------------------- + 008EE9 100 _ITC_GetSoftwarePriority: + 008EE9 89 [ 2] 101 pushw x + 008EEA 97 [ 1] 102 ld xl, a + 103 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 119: uint8_t Value = 0; + 008EEB 4F [ 1] 104 clr a + 105 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 126: Mask = (uint8_t)(0x03U << ((IRQn % 4U) * 2U)); + 008EEC 90 93 [ 1] 106 ldw y, x + 008EEE 88 [ 1] 107 push a + 008EEF 90 9F [ 1] 108 ld a, yl + 008EF1 A4 03 [ 1] 109 and a, #0x03 + 008EF3 95 [ 1] 110 ld xh, a + 008EF4 84 [ 1] 111 pop a + 008EF5 02 [ 1] 112 rlwa x + 008EF6 6B 01 [ 1] 113 ld (0x01, sp), a + 008EF8 01 [ 1] 114 rrwa x + 008EF9 08 01 [ 1] 115 sll (0x01, sp) + 008EFB 88 [ 1] 116 push a + 008EFC A6 03 [ 1] 117 ld a, #0x03 + 008EFE 6B 03 [ 1] 118 ld (0x03, sp), a + 008F00 7B 02 [ 1] 119 ld a, (0x02, sp) + 008F02 27 05 [ 1] 120 jreq 00139$ + 008F04 121 00138$: + 008F04 08 03 [ 1] 122 sll (0x03, sp) + 008F06 4A [ 1] 123 dec a + 008F07 26 FB [ 1] 124 jrne 00138$ + 008F09 125 00139$: + 126 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 128: switch (IRQn) + 008F09 9F [ 1] 127 ld a, xl + 008F0A A1 1D [ 1] 128 cp a, #0x1d + 008F0C 84 [ 1] 129 pop a + 008F0D 22 7A [ 1] 130 jrugt 00128$ + 008F0F 02 [ 1] 131 rlwa x + 008F10 4F [ 1] 132 clr a + 008F11 01 [ 1] 133 rrwa x + 008F12 58 [ 2] 134 sllw x + 008F13 DE 8F 17 [ 2] 135 ldw x, (#00141$, x) + 008F16 FC [ 2] 136 jp (x) + 008F17 137 00141$: + 008F17 8F 89 138 .dw #00128$ + 008F19 8F 53 139 .dw #00103$ + 008F1B 8F 53 140 .dw #00103$ + 008F1D 8F 53 141 .dw #00103$ + 008F1F 8F 5A 142 .dw #00107$ + 008F21 8F 5A 143 .dw #00107$ + 008F23 8F 5A 144 .dw #00107$ + 008F25 8F 5A 145 .dw #00107$ + 008F27 8F 61 146 .dw #00111$ + 008F29 8F 61 147 .dw #00111$ + 008F2B 8F 61 148 .dw #00111$ + 008F2D 8F 61 149 .dw #00111$ + 008F2F 8F 68 150 .dw #00115$ + 008F31 8F 68 151 .dw #00115$ + 008F33 8F 68 152 .dw #00115$ + 008F35 8F 68 153 .dw #00115$ + 008F37 8F 89 154 .dw #00128$ + 008F39 8F 6F 155 .dw #00118$ + 008F3B 8F 6F 156 .dw #00118$ + 008F3D 8F 6F 157 .dw #00118$ + 008F3F 8F 76 158 .dw #00121$ + 008F41 8F 76 159 .dw #00121$ + 008F43 8F 76 160 .dw #00121$ + 008F45 8F 89 161 .dw #00128$ + 008F47 8F 89 162 .dw #00128$ + 008F49 8F 7D 163 .dw #00124$ + 008F4B 8F 7D 164 .dw #00124$ + 008F4D 8F 7D 165 .dw #00124$ + 008F4F 8F 84 166 .dw #00126$ + 008F51 8F 84 167 .dw #00126$ + 168 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 132: case DMA1_CHANNEL2_3_IRQn: + 008F53 169 00103$: + 170 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 133: Value = (uint8_t)(ITC->ISPR1 & Mask); /* Read software priority */ + 008F53 C6 7F 70 [ 1] 171 ld a, 0x7f70 + 008F56 14 02 [ 1] 172 and a, (0x02, sp) + 173 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 134: break; + 008F58 20 2F [ 2] 174 jra 00128$ + 175 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 144: case EXTID_IRQn: + 008F5A 176 00107$: + 177 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 150: Value = (uint8_t)(ITC->ISPR2 & Mask); /* Read software priority */ + 008F5A C6 7F 71 [ 1] 178 ld a, 0x7f71 + 008F5D 14 02 [ 1] 179 and a, (0x02, sp) + 180 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 151: break; + 008F5F 20 28 [ 2] 181 jra 00128$ + 182 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 156: case EXTI3_IRQn: + 008F61 183 00111$: + 184 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 157: Value = (uint8_t)(ITC->ISPR3 & Mask); /* Read software priority */ + 008F61 C6 7F 72 [ 1] 185 ld a, 0x7f72 + 008F64 14 02 [ 1] 186 and a, (0x02, sp) + 187 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 158: break; + 008F66 20 21 [ 2] 188 jra 00128$ + 189 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 163: case EXTI7_IRQn: + 008F68 190 00115$: + 191 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 164: Value = (uint8_t)(ITC->ISPR4 & Mask); /* Read software priority */ + 008F68 C6 7F 73 [ 1] 192 ld a, 0x7f73 + 008F6B 14 02 [ 1] 193 and a, (0x02, sp) + 194 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 165: break; + 008F6D 20 1A [ 2] 195 jra 00128$ + 196 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 177: case TIM2_UPD_OVF_TRG_BRK_IRQn: + 008F6F 197 00118$: + 198 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 182: Value = (uint8_t)(ITC->ISPR5 & Mask); /* Read software priority */ + 008F6F C6 7F 74 [ 1] 199 ld a, 0x7f74 + 008F72 14 02 [ 1] 200 and a, (0x02, sp) + 201 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 183: break; + 008F74 20 13 [ 2] 202 jra 00128$ + 203 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 192: case TIM3_CC_IRQn: + 008F76 204 00121$: + 205 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 198: Value = (uint8_t)(ITC->ISPR6 & Mask); /* Read software priority */ + 008F76 C6 7F 75 [ 1] 206 ld a, 0x7f75 + 008F79 14 02 [ 1] 207 and a, (0x02, sp) + 208 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 199: break; + 008F7B 20 0C [ 2] 209 jra 00128$ + 210 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 208: case USART1_TX_IRQn: + 008F7D 211 00124$: + 212 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 212: Value = (uint8_t)(ITC->ISPR7 & Mask); /* Read software priority */ + 008F7D C6 7F 76 [ 1] 213 ld a, 0x7f76 + 008F80 14 02 [ 1] 214 and a, (0x02, sp) + 215 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 213: break; + 008F82 20 05 [ 2] 216 jra 00128$ + 217 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 218: case I2C1_IRQn: + 008F84 218 00126$: + 219 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 223: Value = (uint8_t)(ITC->ISPR8 & Mask); /* Read software priority */ + 008F84 C6 7F 77 [ 1] 220 ld a, 0x7f77 + 008F87 14 02 [ 1] 221 and a, (0x02, sp) + 222 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 228: } + 008F89 223 00128$: + 224 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 230: Value >>= (uint8_t)((IRQn % 4u) * 2u); + 008F89 88 [ 1] 225 push a + 008F8A 7B 02 [ 1] 226 ld a, (0x02, sp) + 008F8C 27 05 [ 1] 227 jreq 00143$ + 008F8E 228 00142$: + 008F8E 04 01 [ 1] 229 srl (1, sp) + 008F90 4A [ 1] 230 dec a + 008F91 26 FB [ 1] 231 jrne 00142$ + 008F93 232 00143$: + 008F93 84 [ 1] 233 pop a + 234 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 232: return((ITC_PriorityLevel_TypeDef)Value); + 235 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 234: } + 008F94 85 [ 2] 236 popw x + 008F95 81 [ 4] 237 ret + 238 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 253: void ITC_SetSoftwarePriority(IRQn_TypeDef IRQn, ITC_PriorityLevel_TypeDef ITC_PriorityLevel) + 239 ; ----------------------------------------- + 240 ; function ITC_SetSoftwarePriority + 241 ; ----------------------------------------- + 008F96 242 _ITC_SetSoftwarePriority: + 008F96 89 [ 2] 243 pushw x + 244 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 267: Mask = (uint8_t)(~(uint8_t)(0x03U << ((IRQn % 4U) * 2U))); + 008F97 97 [ 1] 245 ld xl, a + 008F98 A4 03 [ 1] 246 and a, #0x03 + 008F9A 48 [ 1] 247 sll a + 008F9B 95 [ 1] 248 ld xh, a + 008F9C A6 03 [ 1] 249 ld a, #0x03 + 008F9E 88 [ 1] 250 push a + 008F9F 9E [ 1] 251 ld a, xh + 008FA0 4D [ 1] 252 tnz a + 008FA1 27 05 [ 1] 253 jreq 00139$ + 008FA3 254 00138$: + 008FA3 08 01 [ 1] 255 sll (1, sp) + 008FA5 4A [ 1] 256 dec a + 008FA6 26 FB [ 1] 257 jrne 00138$ + 008FA8 258 00139$: + 008FA8 84 [ 1] 259 pop a + 008FA9 43 [ 1] 260 cpl a + 008FAA 6B 01 [ 1] 261 ld (0x01, sp), a + 262 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 269: NewPriority = (uint8_t)((uint8_t)(ITC_PriorityLevel) << ((IRQn % 4U) * 2U)); + 008FAC 7B 05 [ 1] 263 ld a, (0x05, sp) + 008FAE 88 [ 1] 264 push a + 008FAF 9E [ 1] 265 ld a, xh + 008FB0 4D [ 1] 266 tnz a + 008FB1 27 05 [ 1] 267 jreq 00141$ + 008FB3 268 00140$: + 008FB3 08 01 [ 1] 269 sll (1, sp) + 008FB5 4A [ 1] 270 dec a + 008FB6 26 FB [ 1] 271 jrne 00140$ + 008FB8 272 00141$: + 008FB8 84 [ 1] 273 pop a + 008FB9 6B 02 [ 1] 274 ld (0x02, sp), a + 275 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 271: switch (IRQn) + 008FBB 9F [ 1] 276 ld a, xl + 008FBC A1 1D [ 1] 277 cp a, #0x1d + 008FBE 23 03 [ 2] 278 jrule 00142$ + 008FC0 CC 90 94 [ 2] 279 jp 00129$ + 008FC3 280 00142$: + 008FC3 4F [ 1] 281 clr a + 008FC4 95 [ 1] 282 ld xh, a + 008FC5 58 [ 2] 283 sllw x + 008FC6 DE 8F CA [ 2] 284 ldw x, (#00143$, x) + 008FC9 FC [ 2] 285 jp (x) + 008FCA 286 00143$: + 008FCA 90 94 287 .dw #00129$ + 008FCC 90 06 288 .dw #00103$ + 008FCE 90 06 289 .dw #00103$ + 008FD0 90 06 290 .dw #00103$ + 008FD2 90 18 291 .dw #00107$ + 008FD4 90 18 292 .dw #00107$ + 008FD6 90 18 293 .dw #00107$ + 008FD8 90 18 294 .dw #00107$ + 008FDA 90 2A 295 .dw #00111$ + 008FDC 90 2A 296 .dw #00111$ + 008FDE 90 2A 297 .dw #00111$ + 008FE0 90 2A 298 .dw #00111$ + 008FE2 90 3C 299 .dw #00115$ + 008FE4 90 3C 300 .dw #00115$ + 008FE6 90 3C 301 .dw #00115$ + 008FE8 90 3C 302 .dw #00115$ + 008FEA 90 94 303 .dw #00129$ + 008FEC 90 4E 304 .dw #00118$ + 008FEE 90 4E 305 .dw #00118$ + 008FF0 90 4E 306 .dw #00118$ + 008FF2 90 60 307 .dw #00121$ + 008FF4 90 60 308 .dw #00121$ + 008FF6 90 60 309 .dw #00121$ + 008FF8 90 94 310 .dw #00129$ + 008FFA 90 94 311 .dw #00129$ + 008FFC 90 72 312 .dw #00124$ + 008FFE 90 72 313 .dw #00124$ + 009000 90 72 314 .dw #00124$ + 009002 90 84 315 .dw #00126$ + 009004 90 84 316 .dw #00126$ + 317 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 275: case DMA1_CHANNEL2_3_IRQn: + 009006 318 00103$: + 319 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 276: ITC->ISPR1 &= Mask; + 009006 C6 7F 70 [ 1] 320 ld a, 0x7f70 + 009009 14 01 [ 1] 321 and a, (0x01, sp) + 00900B C7 7F 70 [ 1] 322 ld 0x7f70, a + 323 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 277: ITC->ISPR1 |= NewPriority; + 00900E C6 7F 70 [ 1] 324 ld a, 0x7f70 + 009011 1A 02 [ 1] 325 or a, (0x02, sp) + 009013 C7 7F 70 [ 1] 326 ld 0x7f70, a + 327 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 278: break; + 009016 20 7C [ 2] 328 jra 00129$ + 329 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 288: case EXTID_IRQn: + 009018 330 00107$: + 331 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 294: ITC->ISPR2 &= Mask; + 009018 C6 7F 71 [ 1] 332 ld a, 0x7f71 + 00901B 14 01 [ 1] 333 and a, (0x01, sp) + 00901D C7 7F 71 [ 1] 334 ld 0x7f71, a + 335 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 295: ITC->ISPR2 |= NewPriority; + 009020 C6 7F 71 [ 1] 336 ld a, 0x7f71 + 009023 1A 02 [ 1] 337 or a, (0x02, sp) + 009025 C7 7F 71 [ 1] 338 ld 0x7f71, a + 339 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 296: break; + 009028 20 6A [ 2] 340 jra 00129$ + 341 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 301: case EXTI3_IRQn: + 00902A 342 00111$: + 343 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 302: ITC->ISPR3 &= Mask; + 00902A C6 7F 72 [ 1] 344 ld a, 0x7f72 + 00902D 14 01 [ 1] 345 and a, (0x01, sp) + 00902F C7 7F 72 [ 1] 346 ld 0x7f72, a + 347 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 303: ITC->ISPR3 |= NewPriority; + 009032 C6 7F 72 [ 1] 348 ld a, 0x7f72 + 009035 1A 02 [ 1] 349 or a, (0x02, sp) + 009037 C7 7F 72 [ 1] 350 ld 0x7f72, a + 351 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 304: break; + 00903A 20 58 [ 2] 352 jra 00129$ + 353 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 309: case EXTI7_IRQn: + 00903C 354 00115$: + 355 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 310: ITC->ISPR4 &= Mask; + 00903C C6 7F 73 [ 1] 356 ld a, 0x7f73 + 00903F 14 01 [ 1] 357 and a, (0x01, sp) + 009041 C7 7F 73 [ 1] 358 ld 0x7f73, a + 359 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 311: ITC->ISPR4 |= NewPriority; + 009044 C6 7F 73 [ 1] 360 ld a, 0x7f73 + 009047 1A 02 [ 1] 361 or a, (0x02, sp) + 009049 C7 7F 73 [ 1] 362 ld 0x7f73, a + 363 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 312: break; + 00904C 20 46 [ 2] 364 jra 00129$ + 365 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 323: case TIM2_UPD_OVF_TRG_BRK_IRQn: + 00904E 366 00118$: + 367 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 328: ITC->ISPR5 &= Mask; + 00904E C6 7F 74 [ 1] 368 ld a, 0x7f74 + 009051 14 01 [ 1] 369 and a, (0x01, sp) + 009053 C7 7F 74 [ 1] 370 ld 0x7f74, a + 371 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 329: ITC->ISPR5 |= NewPriority; + 009056 C6 7F 74 [ 1] 372 ld a, 0x7f74 + 009059 1A 02 [ 1] 373 or a, (0x02, sp) + 00905B C7 7F 74 [ 1] 374 ld 0x7f74, a + 375 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 330: break; + 00905E 20 34 [ 2] 376 jra 00129$ + 377 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 338: case TIM3_CC_IRQn: + 009060 378 00121$: + 379 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 344: ITC->ISPR6 &= Mask; + 009060 C6 7F 75 [ 1] 380 ld a, 0x7f75 + 009063 14 01 [ 1] 381 and a, (0x01, sp) + 009065 C7 7F 75 [ 1] 382 ld 0x7f75, a + 383 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 345: ITC->ISPR6 |= NewPriority; + 009068 C6 7F 75 [ 1] 384 ld a, 0x7f75 + 00906B 1A 02 [ 1] 385 or a, (0x02, sp) + 00906D C7 7F 75 [ 1] 386 ld 0x7f75, a + 387 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 346: break; + 009070 20 22 [ 2] 388 jra 00129$ + 389 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 355: case USART1_TX_IRQn: + 009072 390 00124$: + 391 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 359: ITC->ISPR7 &= Mask; + 009072 C6 7F 76 [ 1] 392 ld a, 0x7f76 + 009075 14 01 [ 1] 393 and a, (0x01, sp) + 009077 C7 7F 76 [ 1] 394 ld 0x7f76, a + 395 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 360: ITC->ISPR7 |= NewPriority; + 00907A C6 7F 76 [ 1] 396 ld a, 0x7f76 + 00907D 1A 02 [ 1] 397 or a, (0x02, sp) + 00907F C7 7F 76 [ 1] 398 ld 0x7f76, a + 399 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 361: break; + 009082 20 10 [ 2] 400 jra 00129$ + 401 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 366: case I2C1_IRQn: + 009084 402 00126$: + 403 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 371: ITC->ISPR8 &= Mask; + 009084 C6 7F 77 [ 1] 404 ld a, 0x7f77 + 009087 14 01 [ 1] 405 and a, (0x01, sp) + 009089 C7 7F 77 [ 1] 406 ld 0x7f77, a + 407 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 372: ITC->ISPR8 |= NewPriority; + 00908C C6 7F 77 [ 1] 408 ld a, 0x7f77 + 00908F 1A 02 [ 1] 409 or a, (0x02, sp) + 009091 C7 7F 77 [ 1] 410 ld 0x7f77, a + 411 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 377: } + 009094 412 00129$: + 413 ; ../inc/stm8l151x/src/stm8l15x_itc.c: 378: } + 009094 85 [ 2] 414 popw x + 009095 85 [ 2] 415 popw x + 009096 84 [ 1] 416 pop a + 009097 FC [ 2] 417 jp (x) + 418 .area CODE + 419 .area CONST + 420 .area INITIALIZER + 421 .area CABS (ABS) diff --git a/firmware/STM8L15X_LD/stm8l15x_itc.sym b/firmware/STM8L15X_LD/stm8l15x_itc.sym new file mode 100644 index 0000000..8391092 --- /dev/null +++ b/firmware/STM8L15X_LD/stm8l15x_itc.sym @@ -0,0 +1,32 @@ + ASxxxx Assembler V02.00 + NoICE + SDCC mods (STMicroelectronics STM8) Page 1 +Hexadecimal [24-Bits] + +Symbol Table + + .__.$$$. = 002710 L + .__.ABS. = 000000 G + .__.CPU. = 000000 L + .__.H$L. = 000001 L + 9 _ITC_DeInit 000003 GR + 9 _ITC_GetCPUCC 000000 GR + 9 _ITC_GetSoftIntStatus 000024 GR + 9 _ITC_GetSoftwarePriority 00002A GR + 9 _ITC_SetSoftwarePriority 0000D7 GR + + ASxxxx Assembler V02.00 + NoICE + SDCC mods (STMicroelectronics STM8) Page 2 +Hexadecimal [24-Bits] + +Area Table + + 0 _CODE size 0 flags 0 + 1 DATA size 0 flags 0 + 2 INITIALIZED size 0 flags 0 + 3 DABS size 0 flags 8 + 4 HOME size 0 flags 0 + 5 GSINIT size 0 flags 0 + 6 GSFINAL size 0 flags 0 + 7 CONST size 0 flags 0 + 8 INITIALIZER size 0 flags 0 + 9 CODE size 1D9 flags 0 + A CABS size 0 flags 8 + diff --git a/firmware/STM8L15X_LD/stm8l15x_pwr.asm b/firmware/STM8L15X_LD/stm8l15x_pwr.asm new file mode 100644 index 0000000..4ee3f17 --- /dev/null +++ b/firmware/STM8L15X_LD/stm8l15x_pwr.asm @@ -0,0 +1,267 @@ +;-------------------------------------------------------- +; File Created by SDCC : free open source ISO C Compiler +; Version 4.5.0 #15242 (Linux) +;-------------------------------------------------------- + .module stm8l15x_pwr + +;-------------------------------------------------------- +; Public variables in this module +;-------------------------------------------------------- + .globl _PWR_DeInit + .globl _PWR_PVDLevelConfig + .globl _PWR_PVDCmd + .globl _PWR_FastWakeUpCmd + .globl _PWR_UltraLowPowerCmd + .globl _PWR_PVDITConfig + .globl _PWR_GetFlagStatus + .globl _PWR_PVDClearFlag + .globl _PWR_PVDGetITStatus + .globl _PWR_PVDClearITPendingBit +;-------------------------------------------------------- +; ram data +;-------------------------------------------------------- + .area DATA +;-------------------------------------------------------- +; ram data +;-------------------------------------------------------- + .area INITIALIZED +;-------------------------------------------------------- +; absolute external ram data +;-------------------------------------------------------- + .area DABS (ABS) + +; default segment ordering for linker + .area HOME + .area GSINIT + .area GSFINAL + .area CONST + .area INITIALIZER + .area CODE + +;-------------------------------------------------------- +; global & static initialisations +;-------------------------------------------------------- + .area HOME + .area GSINIT + .area GSFINAL + .area GSINIT +;-------------------------------------------------------- +; Home +;-------------------------------------------------------- + .area HOME + .area HOME +;-------------------------------------------------------- +; code +;-------------------------------------------------------- + .area CODE +; ../inc/stm8l151x/src/stm8l15x_pwr.c: 82: void PWR_DeInit(void) +; ----------------------------------------- +; function PWR_DeInit +; ----------------------------------------- +_PWR_DeInit: +; ../inc/stm8l151x/src/stm8l15x_pwr.c: 84: PWR->CSR1 = PWR_CSR1_PVDIF; + mov 0x50b2+0, #0x20 +; ../inc/stm8l151x/src/stm8l15x_pwr.c: 85: PWR->CSR2 = PWR_CSR2_RESET_VALUE; + mov 0x50b3+0, #0x00 +; ../inc/stm8l151x/src/stm8l15x_pwr.c: 86: } + ret +; ../inc/stm8l151x/src/stm8l15x_pwr.c: 102: void PWR_PVDLevelConfig(PWR_PVDLevel_TypeDef PWR_PVDLevel) +; ----------------------------------------- +; function PWR_PVDLevelConfig +; ----------------------------------------- +_PWR_PVDLevelConfig: + push a + ld (0x01, sp), a +; ../inc/stm8l151x/src/stm8l15x_pwr.c: 108: PWR->CSR1 &= (uint8_t)(~PWR_CSR1_PLS); + ld a, 0x50b2 + and a, #0xf1 + ld 0x50b2, a +; ../inc/stm8l151x/src/stm8l15x_pwr.c: 111: PWR->CSR1 |= PWR_PVDLevel; + ld a, 0x50b2 + or a, (0x01, sp) + ld 0x50b2, a +; ../inc/stm8l151x/src/stm8l15x_pwr.c: 113: } + pop a + ret +; ../inc/stm8l151x/src/stm8l15x_pwr.c: 121: void PWR_PVDCmd(FunctionalState NewState) +; ----------------------------------------- +; function PWR_PVDCmd +; ----------------------------------------- +_PWR_PVDCmd: + push a + ld (0x01, sp), a +; ../inc/stm8l151x/src/stm8l15x_pwr.c: 129: PWR->CSR1 |= PWR_CSR1_PVDE; + ld a, 0x50b2 +; ../inc/stm8l151x/src/stm8l15x_pwr.c: 126: if (NewState != DISABLE) + tnz (0x01, sp) + jreq 00102$ +; ../inc/stm8l151x/src/stm8l15x_pwr.c: 129: PWR->CSR1 |= PWR_CSR1_PVDE; + or a, #0x01 + ld 0x50b2, a + jra 00104$ +00102$: +; ../inc/stm8l151x/src/stm8l15x_pwr.c: 134: PWR->CSR1 &= (uint8_t)(~PWR_CSR1_PVDE); + and a, #0xfe + ld 0x50b2, a +00104$: +; ../inc/stm8l151x/src/stm8l15x_pwr.c: 136: } + pop a + ret +; ../inc/stm8l151x/src/stm8l15x_pwr.c: 171: void PWR_FastWakeUpCmd(FunctionalState NewState) +; ----------------------------------------- +; function PWR_FastWakeUpCmd +; ----------------------------------------- +_PWR_FastWakeUpCmd: + push a + ld (0x01, sp), a +; ../inc/stm8l151x/src/stm8l15x_pwr.c: 179: PWR->CSR2 |= PWR_CSR2_FWU; + ld a, 0x50b3 +; ../inc/stm8l151x/src/stm8l15x_pwr.c: 176: if (NewState != DISABLE) + tnz (0x01, sp) + jreq 00102$ +; ../inc/stm8l151x/src/stm8l15x_pwr.c: 179: PWR->CSR2 |= PWR_CSR2_FWU; + or a, #0x04 + ld 0x50b3, a + jra 00104$ +00102$: +; ../inc/stm8l151x/src/stm8l15x_pwr.c: 184: PWR->CSR2 &= (uint8_t)(~PWR_CSR2_FWU); + and a, #0xfb + ld 0x50b3, a +00104$: +; ../inc/stm8l151x/src/stm8l15x_pwr.c: 186: } + pop a + ret +; ../inc/stm8l151x/src/stm8l15x_pwr.c: 194: void PWR_UltraLowPowerCmd(FunctionalState NewState) +; ----------------------------------------- +; function PWR_UltraLowPowerCmd +; ----------------------------------------- +_PWR_UltraLowPowerCmd: + push a + ld (0x01, sp), a +; ../inc/stm8l151x/src/stm8l15x_pwr.c: 202: PWR->CSR2 |= PWR_CSR2_ULP; + ld a, 0x50b3 +; ../inc/stm8l151x/src/stm8l15x_pwr.c: 199: if (NewState != DISABLE) + tnz (0x01, sp) + jreq 00102$ +; ../inc/stm8l151x/src/stm8l15x_pwr.c: 202: PWR->CSR2 |= PWR_CSR2_ULP; + or a, #0x02 + ld 0x50b3, a + jra 00104$ +00102$: +; ../inc/stm8l151x/src/stm8l15x_pwr.c: 207: PWR->CSR2 &= (uint8_t)(~PWR_CSR2_ULP); + and a, #0xfd + ld 0x50b3, a +00104$: +; ../inc/stm8l151x/src/stm8l15x_pwr.c: 209: } + pop a + ret +; ../inc/stm8l151x/src/stm8l15x_pwr.c: 232: void PWR_PVDITConfig(FunctionalState NewState) +; ----------------------------------------- +; function PWR_PVDITConfig +; ----------------------------------------- +_PWR_PVDITConfig: + push a + ld (0x01, sp), a +; ../inc/stm8l151x/src/stm8l15x_pwr.c: 240: PWR->CSR1 |= PWR_CSR1_PVDIEN; + ld a, 0x50b2 +; ../inc/stm8l151x/src/stm8l15x_pwr.c: 237: if (NewState != DISABLE) + tnz (0x01, sp) + jreq 00102$ +; ../inc/stm8l151x/src/stm8l15x_pwr.c: 240: PWR->CSR1 |= PWR_CSR1_PVDIEN; + or a, #0x10 + ld 0x50b2, a + jra 00104$ +00102$: +; ../inc/stm8l151x/src/stm8l15x_pwr.c: 245: PWR->CSR1 &= (uint8_t)(~PWR_CSR1_PVDIEN); + and a, #0xef + ld 0x50b2, a +00104$: +; ../inc/stm8l151x/src/stm8l15x_pwr.c: 247: } + pop a + ret +; ../inc/stm8l151x/src/stm8l15x_pwr.c: 261: FlagStatus PWR_GetFlagStatus(PWR_FLAG_TypeDef PWR_FLAG) +; ----------------------------------------- +; function PWR_GetFlagStatus +; ----------------------------------------- +_PWR_GetFlagStatus: + push a +; ../inc/stm8l151x/src/stm8l15x_pwr.c: 268: if ((PWR_FLAG & PWR_FLAG_VREFINTF) != 0) + ld (0x01, sp), a + srl a + jrnc 00108$ +; ../inc/stm8l151x/src/stm8l15x_pwr.c: 270: if ((PWR->CSR2 & PWR_CR2_VREFINTF) != (uint8_t)RESET ) + btjf 0x50b3, #0, 00102$ +; ../inc/stm8l151x/src/stm8l15x_pwr.c: 272: bitstatus = SET; + ld a, #0x01 + jra 00109$ +00102$: +; ../inc/stm8l151x/src/stm8l15x_pwr.c: 276: bitstatus = RESET; + clr a + jra 00109$ +00108$: +; ../inc/stm8l151x/src/stm8l15x_pwr.c: 281: if ((PWR->CSR1 & PWR_FLAG) != (uint8_t)RESET ) + ld a, 0x50b2 + and a, (0x01, sp) + jreq 00105$ +; ../inc/stm8l151x/src/stm8l15x_pwr.c: 283: bitstatus = SET; + ld a, #0x01 +; ../inc/stm8l151x/src/stm8l15x_pwr.c: 287: bitstatus = RESET; + .byte 0x21 +00105$: + clr a +00109$: +; ../inc/stm8l151x/src/stm8l15x_pwr.c: 292: return((FlagStatus)bitstatus); +; ../inc/stm8l151x/src/stm8l15x_pwr.c: 293: } + addw sp, #1 + ret +; ../inc/stm8l151x/src/stm8l15x_pwr.c: 300: void PWR_PVDClearFlag(void) +; ----------------------------------------- +; function PWR_PVDClearFlag +; ----------------------------------------- +_PWR_PVDClearFlag: +; ../inc/stm8l151x/src/stm8l15x_pwr.c: 303: PWR->CSR1 |= PWR_CSR1_PVDIF; + bset 0x50b2, #5 +; ../inc/stm8l151x/src/stm8l15x_pwr.c: 304: } + ret +; ../inc/stm8l151x/src/stm8l15x_pwr.c: 311: ITStatus PWR_PVDGetITStatus(void) +; ----------------------------------------- +; function PWR_PVDGetITStatus +; ----------------------------------------- +_PWR_PVDGetITStatus: + push a +; ../inc/stm8l151x/src/stm8l15x_pwr.c: 317: PVD_itStatus = (uint8_t)(PWR->CSR1 & (uint8_t)PWR_CSR1_PVDIF); + ld a, 0x50b2 + and a, #0x20 + ld (0x01, sp), a +; ../inc/stm8l151x/src/stm8l15x_pwr.c: 318: PVD_itEnable = (uint8_t)(PWR->CSR1 & (uint8_t)PWR_CSR1_PVDIEN); + ld a, 0x50b2 + and a, #0x10 +; ../inc/stm8l151x/src/stm8l15x_pwr.c: 320: if ((PVD_itStatus != (uint8_t)RESET ) && (PVD_itEnable != (uint8_t)RESET)) + tnz (0x01, sp) + jreq 00102$ + tnz a + jreq 00102$ +; ../inc/stm8l151x/src/stm8l15x_pwr.c: 322: bitstatus = (ITStatus)SET; + ld a, #0x01 +; ../inc/stm8l151x/src/stm8l15x_pwr.c: 326: bitstatus = (ITStatus)RESET; + .byte 0x21 +00102$: + clr a +00103$: +; ../inc/stm8l151x/src/stm8l15x_pwr.c: 328: return ((ITStatus)bitstatus); +; ../inc/stm8l151x/src/stm8l15x_pwr.c: 329: } + addw sp, #1 + ret +; ../inc/stm8l151x/src/stm8l15x_pwr.c: 336: void PWR_PVDClearITPendingBit(void) +; ----------------------------------------- +; function PWR_PVDClearITPendingBit +; ----------------------------------------- +_PWR_PVDClearITPendingBit: +; ../inc/stm8l151x/src/stm8l15x_pwr.c: 339: PWR->CSR1 |= PWR_CSR1_PVDIF; + bset 0x50b2, #5 +; ../inc/stm8l151x/src/stm8l15x_pwr.c: 340: } + ret + .area CODE + .area CONST + .area INITIALIZER + .area CABS (ABS) diff --git a/firmware/STM8L15X_LD/stm8l15x_pwr.lst b/firmware/STM8L15X_LD/stm8l15x_pwr.lst new file mode 100644 index 0000000..a2f286c --- /dev/null +++ b/firmware/STM8L15X_LD/stm8l15x_pwr.lst @@ -0,0 +1,267 @@ + 1 ;-------------------------------------------------------- + 2 ; File Created by SDCC : free open source ISO C Compiler + 3 ; Version 4.5.0 #15242 (Linux) + 4 ;-------------------------------------------------------- + 5 .module stm8l15x_pwr + 6 + 7 ;-------------------------------------------------------- + 8 ; Public variables in this module + 9 ;-------------------------------------------------------- + 10 .globl _PWR_DeInit + 11 .globl _PWR_PVDLevelConfig + 12 .globl _PWR_PVDCmd + 13 .globl _PWR_FastWakeUpCmd + 14 .globl _PWR_UltraLowPowerCmd + 15 .globl _PWR_PVDITConfig + 16 .globl _PWR_GetFlagStatus + 17 .globl _PWR_PVDClearFlag + 18 .globl _PWR_PVDGetITStatus + 19 .globl _PWR_PVDClearITPendingBit + 20 ;-------------------------------------------------------- + 21 ; ram data + 22 ;-------------------------------------------------------- + 23 .area DATA + 24 ;-------------------------------------------------------- + 25 ; ram data + 26 ;-------------------------------------------------------- + 27 .area INITIALIZED + 28 ;-------------------------------------------------------- + 29 ; absolute external ram data + 30 ;-------------------------------------------------------- + 31 .area DABS (ABS) + 32 + 33 ; default segment ordering for linker + 34 .area HOME + 35 .area GSINIT + 36 .area GSFINAL + 37 .area CONST + 38 .area INITIALIZER + 39 .area CODE + 40 + 41 ;-------------------------------------------------------- + 42 ; global & static initialisations + 43 ;-------------------------------------------------------- + 44 .area HOME + 45 .area GSINIT + 46 .area GSFINAL + 47 .area GSINIT + 48 ;-------------------------------------------------------- + 49 ; Home + 50 ;-------------------------------------------------------- + 51 .area HOME + 52 .area HOME + 53 ;-------------------------------------------------------- + 54 ; code + 55 ;-------------------------------------------------------- + 56 .area CODE + 57 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 82: void PWR_DeInit(void) + 58 ; ----------------------------------------- + 59 ; function PWR_DeInit + 60 ; ----------------------------------------- + 000000 61 _PWR_DeInit: + 62 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 84: PWR->CSR1 = PWR_CSR1_PVDIF; + 000000 35 20 50 B2 [ 1] 63 mov 0x50b2+0, #0x20 + 64 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 85: PWR->CSR2 = PWR_CSR2_RESET_VALUE; + 000004 35 00 50 B3 [ 1] 65 mov 0x50b3+0, #0x00 + 66 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 86: } + 000008 81 [ 4] 67 ret + 68 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 102: void PWR_PVDLevelConfig(PWR_PVDLevel_TypeDef PWR_PVDLevel) + 69 ; ----------------------------------------- + 70 ; function PWR_PVDLevelConfig + 71 ; ----------------------------------------- + 000009 72 _PWR_PVDLevelConfig: + 000009 88 [ 1] 73 push a + 00000A 6B 01 [ 1] 74 ld (0x01, sp), a + 75 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 108: PWR->CSR1 &= (uint8_t)(~PWR_CSR1_PLS); + 00000C C6 50 B2 [ 1] 76 ld a, 0x50b2 + 00000F A4 F1 [ 1] 77 and a, #0xf1 + 000011 C7 50 B2 [ 1] 78 ld 0x50b2, a + 79 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 111: PWR->CSR1 |= PWR_PVDLevel; + 000014 C6 50 B2 [ 1] 80 ld a, 0x50b2 + 000017 1A 01 [ 1] 81 or a, (0x01, sp) + 000019 C7 50 B2 [ 1] 82 ld 0x50b2, a + 83 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 113: } + 00001C 84 [ 1] 84 pop a + 00001D 81 [ 4] 85 ret + 86 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 121: void PWR_PVDCmd(FunctionalState NewState) + 87 ; ----------------------------------------- + 88 ; function PWR_PVDCmd + 89 ; ----------------------------------------- + 00001E 90 _PWR_PVDCmd: + 00001E 88 [ 1] 91 push a + 00001F 6B 01 [ 1] 92 ld (0x01, sp), a + 93 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 129: PWR->CSR1 |= PWR_CSR1_PVDE; + 000021 C6 50 B2 [ 1] 94 ld a, 0x50b2 + 95 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 126: if (NewState != DISABLE) + 000024 0D 01 [ 1] 96 tnz (0x01, sp) + 000026 27 07 [ 1] 97 jreq 00102$ + 98 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 129: PWR->CSR1 |= PWR_CSR1_PVDE; + 000028 AA 01 [ 1] 99 or a, #0x01 + 00002A C7 50 B2 [ 1] 100 ld 0x50b2, a + 00002D 20 05 [ 2] 101 jra 00104$ + 00002F 102 00102$: + 103 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 134: PWR->CSR1 &= (uint8_t)(~PWR_CSR1_PVDE); + 00002F A4 FE [ 1] 104 and a, #0xfe + 000031 C7 50 B2 [ 1] 105 ld 0x50b2, a + 000034 106 00104$: + 107 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 136: } + 000034 84 [ 1] 108 pop a + 000035 81 [ 4] 109 ret + 110 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 171: void PWR_FastWakeUpCmd(FunctionalState NewState) + 111 ; ----------------------------------------- + 112 ; function PWR_FastWakeUpCmd + 113 ; ----------------------------------------- + 000036 114 _PWR_FastWakeUpCmd: + 000036 88 [ 1] 115 push a + 000037 6B 01 [ 1] 116 ld (0x01, sp), a + 117 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 179: PWR->CSR2 |= PWR_CSR2_FWU; + 000039 C6 50 B3 [ 1] 118 ld a, 0x50b3 + 119 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 176: if (NewState != DISABLE) + 00003C 0D 01 [ 1] 120 tnz (0x01, sp) + 00003E 27 07 [ 1] 121 jreq 00102$ + 122 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 179: PWR->CSR2 |= PWR_CSR2_FWU; + 000040 AA 04 [ 1] 123 or a, #0x04 + 000042 C7 50 B3 [ 1] 124 ld 0x50b3, a + 000045 20 05 [ 2] 125 jra 00104$ + 000047 126 00102$: + 127 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 184: PWR->CSR2 &= (uint8_t)(~PWR_CSR2_FWU); + 000047 A4 FB [ 1] 128 and a, #0xfb + 000049 C7 50 B3 [ 1] 129 ld 0x50b3, a + 00004C 130 00104$: + 131 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 186: } + 00004C 84 [ 1] 132 pop a + 00004D 81 [ 4] 133 ret + 134 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 194: void PWR_UltraLowPowerCmd(FunctionalState NewState) + 135 ; ----------------------------------------- + 136 ; function PWR_UltraLowPowerCmd + 137 ; ----------------------------------------- + 00004E 138 _PWR_UltraLowPowerCmd: + 00004E 88 [ 1] 139 push a + 00004F 6B 01 [ 1] 140 ld (0x01, sp), a + 141 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 202: PWR->CSR2 |= PWR_CSR2_ULP; + 000051 C6 50 B3 [ 1] 142 ld a, 0x50b3 + 143 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 199: if (NewState != DISABLE) + 000054 0D 01 [ 1] 144 tnz (0x01, sp) + 000056 27 07 [ 1] 145 jreq 00102$ + 146 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 202: PWR->CSR2 |= PWR_CSR2_ULP; + 000058 AA 02 [ 1] 147 or a, #0x02 + 00005A C7 50 B3 [ 1] 148 ld 0x50b3, a + 00005D 20 05 [ 2] 149 jra 00104$ + 00005F 150 00102$: + 151 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 207: PWR->CSR2 &= (uint8_t)(~PWR_CSR2_ULP); + 00005F A4 FD [ 1] 152 and a, #0xfd + 000061 C7 50 B3 [ 1] 153 ld 0x50b3, a + 000064 154 00104$: + 155 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 209: } + 000064 84 [ 1] 156 pop a + 000065 81 [ 4] 157 ret + 158 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 232: void PWR_PVDITConfig(FunctionalState NewState) + 159 ; ----------------------------------------- + 160 ; function PWR_PVDITConfig + 161 ; ----------------------------------------- + 000066 162 _PWR_PVDITConfig: + 000066 88 [ 1] 163 push a + 000067 6B 01 [ 1] 164 ld (0x01, sp), a + 165 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 240: PWR->CSR1 |= PWR_CSR1_PVDIEN; + 000069 C6 50 B2 [ 1] 166 ld a, 0x50b2 + 167 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 237: if (NewState != DISABLE) + 00006C 0D 01 [ 1] 168 tnz (0x01, sp) + 00006E 27 07 [ 1] 169 jreq 00102$ + 170 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 240: PWR->CSR1 |= PWR_CSR1_PVDIEN; + 000070 AA 10 [ 1] 171 or a, #0x10 + 000072 C7 50 B2 [ 1] 172 ld 0x50b2, a + 000075 20 05 [ 2] 173 jra 00104$ + 000077 174 00102$: + 175 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 245: PWR->CSR1 &= (uint8_t)(~PWR_CSR1_PVDIEN); + 000077 A4 EF [ 1] 176 and a, #0xef + 000079 C7 50 B2 [ 1] 177 ld 0x50b2, a + 00007C 178 00104$: + 179 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 247: } + 00007C 84 [ 1] 180 pop a + 00007D 81 [ 4] 181 ret + 182 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 261: FlagStatus PWR_GetFlagStatus(PWR_FLAG_TypeDef PWR_FLAG) + 183 ; ----------------------------------------- + 184 ; function PWR_GetFlagStatus + 185 ; ----------------------------------------- + 00007E 186 _PWR_GetFlagStatus: + 00007E 88 [ 1] 187 push a + 188 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 268: if ((PWR_FLAG & PWR_FLAG_VREFINTF) != 0) + 00007F 6B 01 [ 1] 189 ld (0x01, sp), a + 000081 44 [ 1] 190 srl a + 000082 24 0C [ 1] 191 jrnc 00108$ + 192 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 270: if ((PWR->CSR2 & PWR_CR2_VREFINTF) != (uint8_t)RESET ) + 000084 72 01 50 B3 04 [ 2] 193 btjf 0x50b3, #0, 00102$ + 194 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 272: bitstatus = SET; + 000089 A6 01 [ 1] 195 ld a, #0x01 + 00008B 20 0E [ 2] 196 jra 00109$ + 00008D 197 00102$: + 198 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 276: bitstatus = RESET; + 00008D 4F [ 1] 199 clr a + 00008E 20 0B [ 2] 200 jra 00109$ + 000090 201 00108$: + 202 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 281: if ((PWR->CSR1 & PWR_FLAG) != (uint8_t)RESET ) + 000090 C6 50 B2 [ 1] 203 ld a, 0x50b2 + 000093 14 01 [ 1] 204 and a, (0x01, sp) + 000095 27 03 [ 1] 205 jreq 00105$ + 206 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 283: bitstatus = SET; + 000097 A6 01 [ 1] 207 ld a, #0x01 + 208 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 287: bitstatus = RESET; + 000099 21 209 .byte 0x21 + 00009A 210 00105$: + 00009A 4F [ 1] 211 clr a + 00009B 212 00109$: + 213 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 292: return((FlagStatus)bitstatus); + 214 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 293: } + 00009B 5B 01 [ 2] 215 addw sp, #1 + 00009D 81 [ 4] 216 ret + 217 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 300: void PWR_PVDClearFlag(void) + 218 ; ----------------------------------------- + 219 ; function PWR_PVDClearFlag + 220 ; ----------------------------------------- + 00009E 221 _PWR_PVDClearFlag: + 222 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 303: PWR->CSR1 |= PWR_CSR1_PVDIF; + 00009E 72 1A 50 B2 [ 1] 223 bset 0x50b2, #5 + 224 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 304: } + 0000A2 81 [ 4] 225 ret + 226 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 311: ITStatus PWR_PVDGetITStatus(void) + 227 ; ----------------------------------------- + 228 ; function PWR_PVDGetITStatus + 229 ; ----------------------------------------- + 0000A3 230 _PWR_PVDGetITStatus: + 0000A3 88 [ 1] 231 push a + 232 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 317: PVD_itStatus = (uint8_t)(PWR->CSR1 & (uint8_t)PWR_CSR1_PVDIF); + 0000A4 C6 50 B2 [ 1] 233 ld a, 0x50b2 + 0000A7 A4 20 [ 1] 234 and a, #0x20 + 0000A9 6B 01 [ 1] 235 ld (0x01, sp), a + 236 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 318: PVD_itEnable = (uint8_t)(PWR->CSR1 & (uint8_t)PWR_CSR1_PVDIEN); + 0000AB C6 50 B2 [ 1] 237 ld a, 0x50b2 + 0000AE A4 10 [ 1] 238 and a, #0x10 + 239 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 320: if ((PVD_itStatus != (uint8_t)RESET ) && (PVD_itEnable != (uint8_t)RESET)) + 0000B0 0D 01 [ 1] 240 tnz (0x01, sp) + 0000B2 27 06 [ 1] 241 jreq 00102$ + 0000B4 4D [ 1] 242 tnz a + 0000B5 27 03 [ 1] 243 jreq 00102$ + 244 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 322: bitstatus = (ITStatus)SET; + 0000B7 A6 01 [ 1] 245 ld a, #0x01 + 246 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 326: bitstatus = (ITStatus)RESET; + 0000B9 21 247 .byte 0x21 + 0000BA 248 00102$: + 0000BA 4F [ 1] 249 clr a + 0000BB 250 00103$: + 251 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 328: return ((ITStatus)bitstatus); + 252 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 329: } + 0000BB 5B 01 [ 2] 253 addw sp, #1 + 0000BD 81 [ 4] 254 ret + 255 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 336: void PWR_PVDClearITPendingBit(void) + 256 ; ----------------------------------------- + 257 ; function PWR_PVDClearITPendingBit + 258 ; ----------------------------------------- + 0000BE 259 _PWR_PVDClearITPendingBit: + 260 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 339: PWR->CSR1 |= PWR_CSR1_PVDIF; + 0000BE 72 1A 50 B2 [ 1] 261 bset 0x50b2, #5 + 262 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 340: } + 0000C2 81 [ 4] 263 ret + 264 .area CODE + 265 .area CONST + 266 .area INITIALIZER + 267 .area CABS (ABS) diff --git a/firmware/STM8L15X_LD/stm8l15x_pwr.rel b/firmware/STM8L15X_LD/stm8l15x_pwr.rel new file mode 100644 index 0000000..046198e --- /dev/null +++ b/firmware/STM8L15X_LD/stm8l15x_pwr.rel @@ -0,0 +1,135 @@ +XH3 +H B areas B global symbols +M stm8l15x_pwr +S .__.ABS. Def000000 +A _CODE size 0 flags 0 addr 0 +A DATA size 0 flags 0 addr 0 +A INITIALIZED size 0 flags 0 addr 0 +A DABS size 0 flags 8 addr 0 +A HOME size 0 flags 0 addr 0 +A GSINIT size 0 flags 0 addr 0 +A GSFINAL size 0 flags 0 addr 0 +A CONST size 0 flags 0 addr 0 +A INITIALIZER size 0 flags 0 addr 0 +A CODE size C3 flags 0 addr 0 +S _PWR_PVDClearFlag Def00009E +S _PWR_PVDClearITPendingBit Def0000BE +S _PWR_UltraLowPowerCmd Def00004E +S _PWR_PVDITConfig Def000066 +S _PWR_GetFlagStatus Def00007E +S _PWR_PVDGetITStatus Def0000A3 +S _PWR_FastWakeUpCmd Def000036 +S _PWR_PVDLevelConfig Def000009 +S _PWR_DeInit Def000000 +S _PWR_PVDCmd Def00001E +A CABS size 0 flags 8 addr 0 +T 00 00 00 +R 00 00 00 09 +T 00 00 00 35 20 50 B2 35 00 50 B3 81 +R 00 00 00 09 +T 00 00 09 +R 00 00 00 09 +T 00 00 09 88 6B 01 C6 50 B2 A4 F1 C7 50 B2 C6 +R 00 00 00 09 +T 00 00 15 50 B2 1A 01 C7 50 B2 84 81 +R 00 00 00 09 +T 00 00 1E +R 00 00 00 09 +T 00 00 1E 88 6B 01 C6 50 B2 0D 01 27 07 AA 01 C7 +R 00 00 00 09 +T 00 00 2B 50 B2 20 05 +R 00 00 00 09 +T 00 00 2F +R 00 00 00 09 +T 00 00 2F A4 FE C7 50 B2 +R 00 00 00 09 +T 00 00 34 +R 00 00 00 09 +T 00 00 34 84 81 +R 00 00 00 09 +T 00 00 36 +R 00 00 00 09 +T 00 00 36 88 6B 01 C6 50 B3 0D 01 27 07 AA 04 C7 +R 00 00 00 09 +T 00 00 43 50 B3 20 05 +R 00 00 00 09 +T 00 00 47 +R 00 00 00 09 +T 00 00 47 A4 FB C7 50 B3 +R 00 00 00 09 +T 00 00 4C +R 00 00 00 09 +T 00 00 4C 84 81 +R 00 00 00 09 +T 00 00 4E +R 00 00 00 09 +T 00 00 4E 88 6B 01 C6 50 B3 0D 01 27 07 AA 02 C7 +R 00 00 00 09 +T 00 00 5B 50 B3 20 05 +R 00 00 00 09 +T 00 00 5F +R 00 00 00 09 +T 00 00 5F A4 FD C7 50 B3 +R 00 00 00 09 +T 00 00 64 +R 00 00 00 09 +T 00 00 64 84 81 +R 00 00 00 09 +T 00 00 66 +R 00 00 00 09 +T 00 00 66 88 6B 01 C6 50 B2 0D 01 27 07 AA 10 C7 +R 00 00 00 09 +T 00 00 73 50 B2 20 05 +R 00 00 00 09 +T 00 00 77 +R 00 00 00 09 +T 00 00 77 A4 EF C7 50 B2 +R 00 00 00 09 +T 00 00 7C +R 00 00 00 09 +T 00 00 7C 84 81 +R 00 00 00 09 +T 00 00 7E +R 00 00 00 09 +T 00 00 7E 88 6B 01 44 24 0C 72 01 50 B3 04 A6 01 +R 00 00 00 09 +T 00 00 8B 20 0E +R 00 00 00 09 +T 00 00 8D +R 00 00 00 09 +T 00 00 8D 4F 20 0B +R 00 00 00 09 +T 00 00 90 +R 00 00 00 09 +T 00 00 90 C6 50 B2 14 01 27 03 A6 01 21 +R 00 00 00 09 +T 00 00 9A +R 00 00 00 09 +T 00 00 9A 4F +R 00 00 00 09 +T 00 00 9B +R 00 00 00 09 +T 00 00 9B 5B 01 81 +R 00 00 00 09 +T 00 00 9E +R 00 00 00 09 +T 00 00 9E 72 1A 50 B2 81 +R 00 00 00 09 +T 00 00 A3 +R 00 00 00 09 +T 00 00 A3 88 C6 50 B2 A4 20 6B 01 C6 50 B2 A4 10 +R 00 00 00 09 +T 00 00 B0 0D 01 27 06 4D 27 03 A6 01 21 +R 00 00 00 09 +T 00 00 BA +R 00 00 00 09 +T 00 00 BA 4F +R 00 00 00 09 +T 00 00 BB +R 00 00 00 09 +T 00 00 BB 5B 01 81 +R 00 00 00 09 +T 00 00 BE +R 00 00 00 09 +T 00 00 BE 72 1A 50 B2 81 +R 00 00 00 09 diff --git a/firmware/STM8L15X_LD/stm8l15x_pwr.rst b/firmware/STM8L15X_LD/stm8l15x_pwr.rst new file mode 100644 index 0000000..d3e410d --- /dev/null +++ b/firmware/STM8L15X_LD/stm8l15x_pwr.rst @@ -0,0 +1,267 @@ + 1 ;-------------------------------------------------------- + 2 ; File Created by SDCC : free open source ISO C Compiler + 3 ; Version 4.5.0 #15242 (Linux) + 4 ;-------------------------------------------------------- + 5 .module stm8l15x_pwr + 6 + 7 ;-------------------------------------------------------- + 8 ; Public variables in this module + 9 ;-------------------------------------------------------- + 10 .globl _PWR_DeInit + 11 .globl _PWR_PVDLevelConfig + 12 .globl _PWR_PVDCmd + 13 .globl _PWR_FastWakeUpCmd + 14 .globl _PWR_UltraLowPowerCmd + 15 .globl _PWR_PVDITConfig + 16 .globl _PWR_GetFlagStatus + 17 .globl _PWR_PVDClearFlag + 18 .globl _PWR_PVDGetITStatus + 19 .globl _PWR_PVDClearITPendingBit + 20 ;-------------------------------------------------------- + 21 ; ram data + 22 ;-------------------------------------------------------- + 23 .area DATA + 24 ;-------------------------------------------------------- + 25 ; ram data + 26 ;-------------------------------------------------------- + 27 .area INITIALIZED + 28 ;-------------------------------------------------------- + 29 ; absolute external ram data + 30 ;-------------------------------------------------------- + 31 .area DABS (ABS) + 32 + 33 ; default segment ordering for linker + 34 .area HOME + 35 .area GSINIT + 36 .area GSFINAL + 37 .area CONST + 38 .area INITIALIZER + 39 .area CODE + 40 + 41 ;-------------------------------------------------------- + 42 ; global & static initialisations + 43 ;-------------------------------------------------------- + 44 .area HOME + 45 .area GSINIT + 46 .area GSFINAL + 47 .area GSINIT + 48 ;-------------------------------------------------------- + 49 ; Home + 50 ;-------------------------------------------------------- + 51 .area HOME + 52 .area HOME + 53 ;-------------------------------------------------------- + 54 ; code + 55 ;-------------------------------------------------------- + 56 .area CODE + 57 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 82: void PWR_DeInit(void) + 58 ; ----------------------------------------- + 59 ; function PWR_DeInit + 60 ; ----------------------------------------- + 008969 61 _PWR_DeInit: + 62 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 84: PWR->CSR1 = PWR_CSR1_PVDIF; + 008969 35 20 50 B2 [ 1] 63 mov 0x50b2+0, #0x20 + 64 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 85: PWR->CSR2 = PWR_CSR2_RESET_VALUE; + 00896D 35 00 50 B3 [ 1] 65 mov 0x50b3+0, #0x00 + 66 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 86: } + 008971 81 [ 4] 67 ret + 68 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 102: void PWR_PVDLevelConfig(PWR_PVDLevel_TypeDef PWR_PVDLevel) + 69 ; ----------------------------------------- + 70 ; function PWR_PVDLevelConfig + 71 ; ----------------------------------------- + 008972 72 _PWR_PVDLevelConfig: + 008972 88 [ 1] 73 push a + 008973 6B 01 [ 1] 74 ld (0x01, sp), a + 75 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 108: PWR->CSR1 &= (uint8_t)(~PWR_CSR1_PLS); + 008975 C6 50 B2 [ 1] 76 ld a, 0x50b2 + 008978 A4 F1 [ 1] 77 and a, #0xf1 + 00897A C7 50 B2 [ 1] 78 ld 0x50b2, a + 79 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 111: PWR->CSR1 |= PWR_PVDLevel; + 00897D C6 50 B2 [ 1] 80 ld a, 0x50b2 + 008980 1A 01 [ 1] 81 or a, (0x01, sp) + 008982 C7 50 B2 [ 1] 82 ld 0x50b2, a + 83 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 113: } + 008985 84 [ 1] 84 pop a + 008986 81 [ 4] 85 ret + 86 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 121: void PWR_PVDCmd(FunctionalState NewState) + 87 ; ----------------------------------------- + 88 ; function PWR_PVDCmd + 89 ; ----------------------------------------- + 008987 90 _PWR_PVDCmd: + 008987 88 [ 1] 91 push a + 008988 6B 01 [ 1] 92 ld (0x01, sp), a + 93 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 129: PWR->CSR1 |= PWR_CSR1_PVDE; + 00898A C6 50 B2 [ 1] 94 ld a, 0x50b2 + 95 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 126: if (NewState != DISABLE) + 00898D 0D 01 [ 1] 96 tnz (0x01, sp) + 00898F 27 07 [ 1] 97 jreq 00102$ + 98 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 129: PWR->CSR1 |= PWR_CSR1_PVDE; + 008991 AA 01 [ 1] 99 or a, #0x01 + 008993 C7 50 B2 [ 1] 100 ld 0x50b2, a + 008996 20 05 [ 2] 101 jra 00104$ + 008998 102 00102$: + 103 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 134: PWR->CSR1 &= (uint8_t)(~PWR_CSR1_PVDE); + 008998 A4 FE [ 1] 104 and a, #0xfe + 00899A C7 50 B2 [ 1] 105 ld 0x50b2, a + 00899D 106 00104$: + 107 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 136: } + 00899D 84 [ 1] 108 pop a + 00899E 81 [ 4] 109 ret + 110 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 171: void PWR_FastWakeUpCmd(FunctionalState NewState) + 111 ; ----------------------------------------- + 112 ; function PWR_FastWakeUpCmd + 113 ; ----------------------------------------- + 00899F 114 _PWR_FastWakeUpCmd: + 00899F 88 [ 1] 115 push a + 0089A0 6B 01 [ 1] 116 ld (0x01, sp), a + 117 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 179: PWR->CSR2 |= PWR_CSR2_FWU; + 0089A2 C6 50 B3 [ 1] 118 ld a, 0x50b3 + 119 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 176: if (NewState != DISABLE) + 0089A5 0D 01 [ 1] 120 tnz (0x01, sp) + 0089A7 27 07 [ 1] 121 jreq 00102$ + 122 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 179: PWR->CSR2 |= PWR_CSR2_FWU; + 0089A9 AA 04 [ 1] 123 or a, #0x04 + 0089AB C7 50 B3 [ 1] 124 ld 0x50b3, a + 0089AE 20 05 [ 2] 125 jra 00104$ + 0089B0 126 00102$: + 127 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 184: PWR->CSR2 &= (uint8_t)(~PWR_CSR2_FWU); + 0089B0 A4 FB [ 1] 128 and a, #0xfb + 0089B2 C7 50 B3 [ 1] 129 ld 0x50b3, a + 0089B5 130 00104$: + 131 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 186: } + 0089B5 84 [ 1] 132 pop a + 0089B6 81 [ 4] 133 ret + 134 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 194: void PWR_UltraLowPowerCmd(FunctionalState NewState) + 135 ; ----------------------------------------- + 136 ; function PWR_UltraLowPowerCmd + 137 ; ----------------------------------------- + 0089B7 138 _PWR_UltraLowPowerCmd: + 0089B7 88 [ 1] 139 push a + 0089B8 6B 01 [ 1] 140 ld (0x01, sp), a + 141 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 202: PWR->CSR2 |= PWR_CSR2_ULP; + 0089BA C6 50 B3 [ 1] 142 ld a, 0x50b3 + 143 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 199: if (NewState != DISABLE) + 0089BD 0D 01 [ 1] 144 tnz (0x01, sp) + 0089BF 27 07 [ 1] 145 jreq 00102$ + 146 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 202: PWR->CSR2 |= PWR_CSR2_ULP; + 0089C1 AA 02 [ 1] 147 or a, #0x02 + 0089C3 C7 50 B3 [ 1] 148 ld 0x50b3, a + 0089C6 20 05 [ 2] 149 jra 00104$ + 0089C8 150 00102$: + 151 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 207: PWR->CSR2 &= (uint8_t)(~PWR_CSR2_ULP); + 0089C8 A4 FD [ 1] 152 and a, #0xfd + 0089CA C7 50 B3 [ 1] 153 ld 0x50b3, a + 0089CD 154 00104$: + 155 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 209: } + 0089CD 84 [ 1] 156 pop a + 0089CE 81 [ 4] 157 ret + 158 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 232: void PWR_PVDITConfig(FunctionalState NewState) + 159 ; ----------------------------------------- + 160 ; function PWR_PVDITConfig + 161 ; ----------------------------------------- + 0089CF 162 _PWR_PVDITConfig: + 0089CF 88 [ 1] 163 push a + 0089D0 6B 01 [ 1] 164 ld (0x01, sp), a + 165 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 240: PWR->CSR1 |= PWR_CSR1_PVDIEN; + 0089D2 C6 50 B2 [ 1] 166 ld a, 0x50b2 + 167 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 237: if (NewState != DISABLE) + 0089D5 0D 01 [ 1] 168 tnz (0x01, sp) + 0089D7 27 07 [ 1] 169 jreq 00102$ + 170 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 240: PWR->CSR1 |= PWR_CSR1_PVDIEN; + 0089D9 AA 10 [ 1] 171 or a, #0x10 + 0089DB C7 50 B2 [ 1] 172 ld 0x50b2, a + 0089DE 20 05 [ 2] 173 jra 00104$ + 0089E0 174 00102$: + 175 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 245: PWR->CSR1 &= (uint8_t)(~PWR_CSR1_PVDIEN); + 0089E0 A4 EF [ 1] 176 and a, #0xef + 0089E2 C7 50 B2 [ 1] 177 ld 0x50b2, a + 0089E5 178 00104$: + 179 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 247: } + 0089E5 84 [ 1] 180 pop a + 0089E6 81 [ 4] 181 ret + 182 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 261: FlagStatus PWR_GetFlagStatus(PWR_FLAG_TypeDef PWR_FLAG) + 183 ; ----------------------------------------- + 184 ; function PWR_GetFlagStatus + 185 ; ----------------------------------------- + 0089E7 186 _PWR_GetFlagStatus: + 0089E7 88 [ 1] 187 push a + 188 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 268: if ((PWR_FLAG & PWR_FLAG_VREFINTF) != 0) + 0089E8 6B 01 [ 1] 189 ld (0x01, sp), a + 0089EA 44 [ 1] 190 srl a + 0089EB 24 0C [ 1] 191 jrnc 00108$ + 192 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 270: if ((PWR->CSR2 & PWR_CR2_VREFINTF) != (uint8_t)RESET ) + 0089ED 72 01 50 B3 04 [ 2] 193 btjf 0x50b3, #0, 00102$ + 194 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 272: bitstatus = SET; + 0089F2 A6 01 [ 1] 195 ld a, #0x01 + 0089F4 20 0E [ 2] 196 jra 00109$ + 0089F6 197 00102$: + 198 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 276: bitstatus = RESET; + 0089F6 4F [ 1] 199 clr a + 0089F7 20 0B [ 2] 200 jra 00109$ + 0089F9 201 00108$: + 202 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 281: if ((PWR->CSR1 & PWR_FLAG) != (uint8_t)RESET ) + 0089F9 C6 50 B2 [ 1] 203 ld a, 0x50b2 + 0089FC 14 01 [ 1] 204 and a, (0x01, sp) + 0089FE 27 03 [ 1] 205 jreq 00105$ + 206 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 283: bitstatus = SET; + 008A00 A6 01 [ 1] 207 ld a, #0x01 + 208 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 287: bitstatus = RESET; + 008A02 21 209 .byte 0x21 + 008A03 210 00105$: + 008A03 4F [ 1] 211 clr a + 008A04 212 00109$: + 213 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 292: return((FlagStatus)bitstatus); + 214 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 293: } + 008A04 5B 01 [ 2] 215 addw sp, #1 + 008A06 81 [ 4] 216 ret + 217 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 300: void PWR_PVDClearFlag(void) + 218 ; ----------------------------------------- + 219 ; function PWR_PVDClearFlag + 220 ; ----------------------------------------- + 008A07 221 _PWR_PVDClearFlag: + 222 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 303: PWR->CSR1 |= PWR_CSR1_PVDIF; + 008A07 72 1A 50 B2 [ 1] 223 bset 0x50b2, #5 + 224 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 304: } + 008A0B 81 [ 4] 225 ret + 226 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 311: ITStatus PWR_PVDGetITStatus(void) + 227 ; ----------------------------------------- + 228 ; function PWR_PVDGetITStatus + 229 ; ----------------------------------------- + 008A0C 230 _PWR_PVDGetITStatus: + 008A0C 88 [ 1] 231 push a + 232 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 317: PVD_itStatus = (uint8_t)(PWR->CSR1 & (uint8_t)PWR_CSR1_PVDIF); + 008A0D C6 50 B2 [ 1] 233 ld a, 0x50b2 + 008A10 A4 20 [ 1] 234 and a, #0x20 + 008A12 6B 01 [ 1] 235 ld (0x01, sp), a + 236 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 318: PVD_itEnable = (uint8_t)(PWR->CSR1 & (uint8_t)PWR_CSR1_PVDIEN); + 008A14 C6 50 B2 [ 1] 237 ld a, 0x50b2 + 008A17 A4 10 [ 1] 238 and a, #0x10 + 239 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 320: if ((PVD_itStatus != (uint8_t)RESET ) && (PVD_itEnable != (uint8_t)RESET)) + 008A19 0D 01 [ 1] 240 tnz (0x01, sp) + 008A1B 27 06 [ 1] 241 jreq 00102$ + 008A1D 4D [ 1] 242 tnz a + 008A1E 27 03 [ 1] 243 jreq 00102$ + 244 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 322: bitstatus = (ITStatus)SET; + 008A20 A6 01 [ 1] 245 ld a, #0x01 + 246 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 326: bitstatus = (ITStatus)RESET; + 008A22 21 247 .byte 0x21 + 008A23 248 00102$: + 008A23 4F [ 1] 249 clr a + 008A24 250 00103$: + 251 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 328: return ((ITStatus)bitstatus); + 252 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 329: } + 008A24 5B 01 [ 2] 253 addw sp, #1 + 008A26 81 [ 4] 254 ret + 255 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 336: void PWR_PVDClearITPendingBit(void) + 256 ; ----------------------------------------- + 257 ; function PWR_PVDClearITPendingBit + 258 ; ----------------------------------------- + 008A27 259 _PWR_PVDClearITPendingBit: + 260 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 339: PWR->CSR1 |= PWR_CSR1_PVDIF; + 008A27 72 1A 50 B2 [ 1] 261 bset 0x50b2, #5 + 262 ; ../inc/stm8l151x/src/stm8l15x_pwr.c: 340: } + 008A2B 81 [ 4] 263 ret + 264 .area CODE + 265 .area CONST + 266 .area INITIALIZER + 267 .area CABS (ABS) diff --git a/firmware/STM8L15X_LD/stm8l15x_pwr.sym b/firmware/STM8L15X_LD/stm8l15x_pwr.sym new file mode 100644 index 0000000..9289404 --- /dev/null +++ b/firmware/STM8L15X_LD/stm8l15x_pwr.sym @@ -0,0 +1,38 @@ + ASxxxx Assembler V02.00 + NoICE + SDCC mods (STMicroelectronics STM8) Page 1 +Hexadecimal [24-Bits] + +Symbol Table + + .__.$$$. = 002710 L + .__.ABS. = 000000 G + .__.CPU. = 000000 L + .__.H$L. = 000001 L + 9 _PWR_DeInit 000000 GR + 9 _PWR_FastWakeUpCmd 000036 GR + 9 _PWR_GetFlagStatus 00007E GR + 9 _PWR_PVDClearFlag 00009E GR + 9 _PWR_PVDClearITPendingBit 0000BE GR + 9 _PWR_PVDCmd 00001E GR + 9 _PWR_PVDGetITStatus 0000A3 GR + 9 _PWR_PVDITConfig 000066 GR + 9 _PWR_PVDLevelConfig 000009 GR + 9 _PWR_UltraLowPowerCmd 00004E GR + + + ASxxxx Assembler V02.00 + NoICE + SDCC mods (STMicroelectronics STM8) Page 2 +Hexadecimal [24-Bits] + +Area Table + + 0 _CODE size 0 flags 0 + 1 DATA size 0 flags 0 + 2 INITIALIZED size 0 flags 0 + 3 DABS size 0 flags 8 + 4 HOME size 0 flags 0 + 5 GSINIT size 0 flags 0 + 6 GSFINAL size 0 flags 0 + 7 CONST size 0 flags 0 + 8 INITIALIZER size 0 flags 0 + 9 CODE size C3 flags 0 + A CABS size 0 flags 8 + diff --git a/firmware/STM8L15X_LD/stm8l15x_rtc.rst b/firmware/STM8L15X_LD/stm8l15x_rtc.rst index 9188982..cacc26a 100644 --- a/firmware/STM8L15X_LD/stm8l15x_rtc.rst +++ b/firmware/STM8L15X_LD/stm8l15x_rtc.rst @@ -90,1879 +90,1879 @@ 90 ; ----------------------------------------- 91 ; function RTC_DeInit 92 ; ----------------------------------------- - 008912 93 _RTC_DeInit: + 008586 93 _RTC_DeInit: 94 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 239: RTC->WPR = 0xCA; - 008912 35 CA 51 59 [ 1] 95 mov 0x5159+0, #0xca + 008586 35 CA 51 59 [ 1] 95 mov 0x5159+0, #0xca 96 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 240: RTC->WPR = 0x53; - 008916 35 53 51 59 [ 1] 97 mov 0x5159+0, #0x53 + 00858A 35 53 51 59 [ 1] 97 mov 0x5159+0, #0x53 98 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 243: if (RTC_EnterInitMode() == ERROR) - 00891A CD 8A 47 [ 4] 99 call _RTC_EnterInitMode - 00891D 4D [ 1] 100 tnz a - 00891E 26 06 [ 1] 101 jrne 00121$ + 00858E CD 86 BB [ 4] 99 call _RTC_EnterInitMode + 008591 4D [ 1] 100 tnz a + 008592 26 06 [ 1] 101 jrne 00121$ 102 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 245: status = ERROR; - 008920 4F [ 1] 103 clr a + 008594 4F [ 1] 103 clr a 104 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 247: RTC->WPR = 0xFF; - 008921 35 FF 51 59 [ 1] 105 mov 0x5159+0, #0xff - 008925 81 [ 4] 106 ret - 008926 107 00121$: + 008595 35 FF 51 59 [ 1] 105 mov 0x5159+0, #0xff + 008599 81 [ 4] 106 ret + 00859A 107 00121$: 108 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 252: RTC->TR1 = RTC_TR1_RESET_VALUE; - 008926 35 00 51 40 [ 1] 109 mov 0x5140+0, #0x00 + 00859A 35 00 51 40 [ 1] 109 mov 0x5140+0, #0x00 110 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 253: RTC->TR2 = RTC_TR2_RESET_VALUE; - 00892A 35 00 51 41 [ 1] 111 mov 0x5141+0, #0x00 + 00859E 35 00 51 41 [ 1] 111 mov 0x5141+0, #0x00 112 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 254: RTC->TR3 = RTC_TR3_RESET_VALUE; - 00892E 35 00 51 42 [ 1] 113 mov 0x5142+0, #0x00 + 0085A2 35 00 51 42 [ 1] 113 mov 0x5142+0, #0x00 114 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 257: RTC->DR1 = RTC_DR1_RESET_VALUE; - 008932 35 01 51 44 [ 1] 115 mov 0x5144+0, #0x01 + 0085A6 35 01 51 44 [ 1] 115 mov 0x5144+0, #0x01 116 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 258: RTC->DR2 = RTC_DR2_RESET_VALUE; - 008936 35 21 51 45 [ 1] 117 mov 0x5145+0, #0x21 + 0085AA 35 21 51 45 [ 1] 117 mov 0x5145+0, #0x21 118 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 259: RTC->DR3 = RTC_DR3_RESET_VALUE; - 00893A 35 00 51 46 [ 1] 119 mov 0x5146+0, #0x00 + 0085AE 35 00 51 46 [ 1] 119 mov 0x5146+0, #0x00 120 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 262: RTC->SPRERH = RTC_SPRERH_RESET_VALUE; - 00893E 35 00 51 50 [ 1] 121 mov 0x5150+0, #0x00 + 0085B2 35 00 51 50 [ 1] 121 mov 0x5150+0, #0x00 122 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 263: RTC->SPRERL = RTC_SPRERL_RESET_VALUE; - 008942 35 FF 51 51 [ 1] 123 mov 0x5151+0, #0xff + 0085B6 35 FF 51 51 [ 1] 123 mov 0x5151+0, #0xff 124 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 264: RTC->APRER = RTC_APRER_RESET_VALUE; - 008946 35 7F 51 52 [ 1] 125 mov 0x5152+0, #0x7f + 0085BA 35 7F 51 52 [ 1] 125 mov 0x5152+0, #0x7f 126 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 266: RTC->TCR1 = RTC_TCR1_RESET_VALUE; - 00894A 35 00 51 6C [ 1] 127 mov 0x516c+0, #0x00 + 0085BE 35 00 51 6C [ 1] 127 mov 0x516c+0, #0x00 128 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 267: RTC->TCR2 = RTC_TCR2_RESET_VALUE; - 00894E 35 00 51 6D [ 1] 129 mov 0x516d+0, #0x00 + 0085C2 35 00 51 6D [ 1] 129 mov 0x516d+0, #0x00 130 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 271: RTC->CR1 = RTC_CR1_RESET_VALUE; - 008952 35 00 51 48 [ 1] 131 mov 0x5148+0, #0x00 + 0085C6 35 00 51 48 [ 1] 131 mov 0x5148+0, #0x00 132 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 272: RTC->CR2 = RTC_CR2_RESET_VALUE; - 008956 35 00 51 49 [ 1] 133 mov 0x5149+0, #0x00 + 0085CA 35 00 51 49 [ 1] 133 mov 0x5149+0, #0x00 134 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 273: RTC->CR3 = RTC_CR3_RESET_VALUE; - 00895A 35 00 51 4A [ 1] 135 mov 0x514a+0, #0x00 + 0085CE 35 00 51 4A [ 1] 135 mov 0x514a+0, #0x00 136 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 276: while (((RTC->ISR1 & RTC_ISR1_WUTWF) == RESET) && ( wutwfcount != WUTWF_TIMEOUT)) - 00895E 5F [ 1] 137 clrw x - 00895F 138 00102$: - 00895F 72 04 51 4C 0C [ 2] 139 btjt 0x514c, #2, 00104$ - 008964 A3 FF FF [ 2] 140 cpw x, #0xffff - 008967 27 07 [ 1] 141 jreq 00104$ + 0085D2 5F [ 1] 137 clrw x + 0085D3 138 00102$: + 0085D3 72 04 51 4C 0C [ 2] 139 btjt 0x514c, #2, 00104$ + 0085D8 A3 FF FF [ 2] 140 cpw x, #0xffff + 0085DB 27 07 [ 1] 141 jreq 00104$ 142 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 278: wutwfcount++; - 008969 5C [ 1] 143 incw x + 0085DD 5C [ 1] 143 incw x 144 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 279: RTC->ISR1 = 0; - 00896A 35 00 51 4C [ 1] 145 mov 0x514c+0, #0x00 - 00896E 20 EF [ 2] 146 jra 00102$ - 008970 147 00104$: + 0085DE 35 00 51 4C [ 1] 145 mov 0x514c+0, #0x00 + 0085E2 20 EF [ 2] 146 jra 00102$ + 0085E4 147 00104$: 148 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 282: if ((RTC->ISR1 & RTC_ISR1_WUTWF) == RESET) - 008970 72 04 51 4C 06 [ 2] 149 btjt 0x514c, #2, 00118$ + 0085E4 72 04 51 4C 06 [ 2] 149 btjt 0x514c, #2, 00118$ 150 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 284: status = ERROR; - 008975 4F [ 1] 151 clr a + 0085E9 4F [ 1] 151 clr a 152 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 286: RTC->WPR = 0xFF; - 008976 35 FF 51 59 [ 1] 153 mov 0x5159+0, #0xff - 00897A 81 [ 4] 154 ret - 00897B 155 00118$: + 0085EA 35 FF 51 59 [ 1] 153 mov 0x5159+0, #0xff + 0085EE 81 [ 4] 154 ret + 0085EF 155 00118$: 156 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 291: RTC->CR1 = RTC_CR1_RESET_VALUE; - 00897B 35 00 51 48 [ 1] 157 mov 0x5148+0, #0x00 + 0085EF 35 00 51 48 [ 1] 157 mov 0x5148+0, #0x00 158 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 294: RTC->WUTRH = RTC_WUTRH_RESET_VALUE; - 00897F 35 FF 51 54 [ 1] 159 mov 0x5154+0, #0xff + 0085F3 35 FF 51 54 [ 1] 159 mov 0x5154+0, #0xff 160 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 295: RTC->WUTRL = RTC_WUTRL_RESET_VALUE; - 008983 35 FF 51 55 [ 1] 161 mov 0x5155+0, #0xff + 0085F7 35 FF 51 55 [ 1] 161 mov 0x5155+0, #0xff 162 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 298: RTC->ALRMAR1 = RTC_ALRMAR1_RESET_VALUE; - 008987 35 00 51 5C [ 1] 163 mov 0x515c+0, #0x00 + 0085FB 35 00 51 5C [ 1] 163 mov 0x515c+0, #0x00 164 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 299: RTC->ALRMAR2 = RTC_ALRMAR2_RESET_VALUE; - 00898B 35 00 51 5D [ 1] 165 mov 0x515d+0, #0x00 + 0085FF 35 00 51 5D [ 1] 165 mov 0x515d+0, #0x00 166 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 300: RTC->ALRMAR3 = RTC_ALRMAR3_RESET_VALUE; - 00898F 35 00 51 5E [ 1] 167 mov 0x515e+0, #0x00 + 008603 35 00 51 5E [ 1] 167 mov 0x515e+0, #0x00 168 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 301: RTC->ALRMAR4 = RTC_ALRMAR4_RESET_VALUE; - 008993 35 00 51 5F [ 1] 169 mov 0x515f+0, #0x00 + 008607 35 00 51 5F [ 1] 169 mov 0x515f+0, #0x00 170 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 303: RTC->ALRMASSRH = RTC_ALRMASSRH_RESET_VALUE; - 008997 35 00 51 64 [ 1] 171 mov 0x5164+0, #0x00 + 00860B 35 00 51 64 [ 1] 171 mov 0x5164+0, #0x00 172 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 304: RTC->ALRMASSRL = RTC_ALRMASSRL_RESET_VALUE; - 00899B 35 00 51 65 [ 1] 173 mov 0x5165+0, #0x00 + 00860F 35 00 51 65 [ 1] 173 mov 0x5165+0, #0x00 174 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 305: RTC->ALRMASSMSKR = RTC_ALRMASSMSKR_RESET_VALUE; - 00899F 35 00 51 66 [ 1] 175 mov 0x5166+0, #0x00 + 008613 35 00 51 66 [ 1] 175 mov 0x5166+0, #0x00 176 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 308: RTC->ISR1 = (uint8_t)0x00; - 0089A3 35 00 51 4C [ 1] 177 mov 0x514c+0, #0x00 + 008617 35 00 51 4C [ 1] 177 mov 0x514c+0, #0x00 178 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 309: RTC->ISR2 = RTC_ISR2_RESET_VALUE; - 0089A7 35 00 51 4D [ 1] 179 mov 0x514d+0, #0x00 + 00861B 35 00 51 4D [ 1] 179 mov 0x514d+0, #0x00 180 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 311: if ((RTC->ISR1 & RTC_ISR1_RECALPF) != RESET) - 0089AB 72 03 51 4C 0E [ 2] 181 btjf 0x514c, #1, 00110$ + 00861F 72 03 51 4C 0E [ 2] 181 btjf 0x514c, #1, 00110$ 182 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 313: while (((RTC->ISR1 & RTC_ISR1_RECALPF) != RESET) && (recalpfcount != RECALPF_TIMEOUT)) - 0089B0 5F [ 1] 183 clrw x - 0089B1 184 00106$: - 0089B1 72 03 51 4C 08 [ 2] 185 btjf 0x514c, #1, 00110$ - 0089B6 A3 FF FF [ 2] 186 cpw x, #0xffff - 0089B9 27 03 [ 1] 187 jreq 00110$ + 008624 5F [ 1] 183 clrw x + 008625 184 00106$: + 008625 72 03 51 4C 08 [ 2] 185 btjf 0x514c, #1, 00110$ + 00862A A3 FF FF [ 2] 186 cpw x, #0xffff + 00862D 27 03 [ 1] 187 jreq 00110$ 188 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 315: recalpfcount++; - 0089BB 5C [ 1] 189 incw x - 0089BC 20 F3 [ 2] 190 jra 00106$ - 0089BE 191 00110$: + 00862F 5C [ 1] 189 incw x + 008630 20 F3 [ 2] 190 jra 00106$ + 008632 191 00110$: 192 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 318: if ((RTC->ISR1 & RTC_ISR1_RECALPF) == RESET) - 0089BE 72 02 51 4C 14 [ 2] 193 btjt 0x514c, #1, 00115$ + 008632 72 02 51 4C 14 [ 2] 193 btjt 0x514c, #1, 00115$ 194 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 320: RTC->CALRH = RTC_CALRH_RESET_VALUE; - 0089C3 35 00 51 6A [ 1] 195 mov 0x516a+0, #0x00 + 008637 35 00 51 6A [ 1] 195 mov 0x516a+0, #0x00 196 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 321: RTC->CALRL = RTC_CALRL_RESET_VALUE; - 0089C7 35 00 51 6B [ 1] 197 mov 0x516b+0, #0x00 + 00863B 35 00 51 6B [ 1] 197 mov 0x516b+0, #0x00 198 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 323: if (RTC_WaitForSynchro() == ERROR) - 0089CB CD 8A 6D [ 4] 199 call _RTC_WaitForSynchro - 0089CE 4D [ 1] 200 tnz a - 0089CF 26 03 [ 1] 201 jrne 00112$ + 00863F CD 86 E1 [ 4] 199 call _RTC_WaitForSynchro + 008642 4D [ 1] 200 tnz a + 008643 26 03 [ 1] 201 jrne 00112$ 202 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 325: status = ERROR; - 0089D1 4F [ 1] 203 clr a - 0089D2 20 04 [ 2] 204 jra 00116$ - 0089D4 205 00112$: + 008645 4F [ 1] 203 clr a + 008646 20 04 [ 2] 204 jra 00116$ + 008648 205 00112$: 206 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 329: status = SUCCESS; - 0089D4 A6 01 [ 1] 207 ld a, #0x01 + 008648 A6 01 [ 1] 207 ld a, #0x01 208 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 334: status = ERROR; - 0089D6 21 209 .byte 0x21 - 0089D7 210 00115$: - 0089D7 4F [ 1] 211 clr a - 0089D8 212 00116$: + 00864A 21 209 .byte 0x21 + 00864B 210 00115$: + 00864B 4F [ 1] 211 clr a + 00864C 212 00116$: 213 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 338: RTC->WPR = 0xFF; - 0089D8 35 FF 51 59 [ 1] 214 mov 0x5159+0, #0xff + 00864C 35 FF 51 59 [ 1] 214 mov 0x5159+0, #0xff 215 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 343: return (ErrorStatus)status; 216 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 344: } - 0089DC 81 [ 4] 217 ret + 008650 81 [ 4] 217 ret 218 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 359: ErrorStatus RTC_Init(RTC_InitTypeDef* RTC_InitStruct) 219 ; ----------------------------------------- 220 ; function RTC_Init 221 ; ----------------------------------------- - 0089DD 222 _RTC_Init: - 0089DD 52 03 [ 2] 223 sub sp, #3 - 0089DF 1F 02 [ 2] 224 ldw (0x02, sp), x + 008651 222 _RTC_Init: + 008651 52 03 [ 2] 223 sub sp, #3 + 008653 1F 02 [ 2] 224 ldw (0x02, sp), x 225 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 369: RTC->WPR = 0xCA; - 0089E1 35 CA 51 59 [ 1] 226 mov 0x5159+0, #0xca + 008655 35 CA 51 59 [ 1] 226 mov 0x5159+0, #0xca 227 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 370: RTC->WPR = 0x53; - 0089E5 35 53 51 59 [ 1] 228 mov 0x5159+0, #0x53 + 008659 35 53 51 59 [ 1] 228 mov 0x5159+0, #0x53 229 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 373: if (RTC_EnterInitMode() == ERROR) - 0089E9 CD 8A 47 [ 4] 230 call _RTC_EnterInitMode - 0089EC 4D [ 1] 231 tnz a - 0089ED 26 03 [ 1] 232 jrne 00102$ + 00865D CD 86 BB [ 4] 230 call _RTC_EnterInitMode + 008660 4D [ 1] 231 tnz a + 008661 26 03 [ 1] 232 jrne 00102$ 233 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 375: status = ERROR; - 0089EF 4F [ 1] 234 clr a - 0089F0 20 2D [ 2] 235 jra 00103$ - 0089F2 236 00102$: + 008663 4F [ 1] 234 clr a + 008664 20 2D [ 2] 235 jra 00103$ + 008666 236 00102$: 237 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 380: RTC->CR1 &= ((uint8_t)~( RTC_CR1_FMT )); - 0089F2 72 1D 51 48 [ 1] 238 bres 0x5148, #6 + 008666 72 1D 51 48 [ 1] 238 bres 0x5148, #6 239 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 383: RTC->CR1 |= ((uint8_t)(RTC_InitStruct->RTC_HourFormat)); - 0089F6 C6 51 48 [ 1] 240 ld a, 0x5148 - 0089F9 6B 01 [ 1] 241 ld (0x01, sp), a - 0089FB 1E 02 [ 2] 242 ldw x, (0x02, sp) - 0089FD F6 [ 1] 243 ld a, (x) - 0089FE 1A 01 [ 1] 244 or a, (0x01, sp) - 008A00 C7 51 48 [ 1] 245 ld 0x5148, a + 00866A C6 51 48 [ 1] 240 ld a, 0x5148 + 00866D 6B 01 [ 1] 241 ld (0x01, sp), a + 00866F 1E 02 [ 2] 242 ldw x, (0x02, sp) + 008671 F6 [ 1] 243 ld a, (x) + 008672 1A 01 [ 1] 244 or a, (0x01, sp) + 008674 C7 51 48 [ 1] 245 ld 0x5148, a 246 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 386: RTC->SPRERH = (uint8_t)(RTC_InitStruct->RTC_SynchPrediv >> 8); - 008A03 1E 02 [ 2] 247 ldw x, (0x02, sp) - 008A05 5C [ 1] 248 incw x - 008A06 5C [ 1] 249 incw x - 008A07 E6 01 [ 1] 250 ld a, (0x1, x) - 008A09 F6 [ 1] 251 ld a, (x) - 008A0A C7 51 50 [ 1] 252 ld 0x5150, a + 008677 1E 02 [ 2] 247 ldw x, (0x02, sp) + 008679 5C [ 1] 248 incw x + 00867A 5C [ 1] 249 incw x + 00867B E6 01 [ 1] 250 ld a, (0x1, x) + 00867D F6 [ 1] 251 ld a, (x) + 00867E C7 51 50 [ 1] 252 ld 0x5150, a 253 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 387: RTC->SPRERL = (uint8_t)(RTC_InitStruct->RTC_SynchPrediv); - 008A0D E6 01 [ 1] 254 ld a, (0x1, x) - 008A0F C7 51 51 [ 1] 255 ld 0x5151, a + 008681 E6 01 [ 1] 254 ld a, (0x1, x) + 008683 C7 51 51 [ 1] 255 ld 0x5151, a 256 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 388: RTC->APRER = (uint8_t)(RTC_InitStruct->RTC_AsynchPrediv); - 008A12 1E 02 [ 2] 257 ldw x, (0x02, sp) - 008A14 E6 01 [ 1] 258 ld a, (0x1, x) - 008A16 C7 51 52 [ 1] 259 ld 0x5152, a + 008686 1E 02 [ 2] 257 ldw x, (0x02, sp) + 008688 E6 01 [ 1] 258 ld a, (0x1, x) + 00868A C7 51 52 [ 1] 259 ld 0x5152, a 260 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 391: RTC->ISR1 &= (uint8_t)~RTC_ISR1_INIT; - 008A19 72 1F 51 4C [ 1] 261 bres 0x514c, #7 + 00868D 72 1F 51 4C [ 1] 261 bres 0x514c, #7 262 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 393: status = SUCCESS; - 008A1D A6 01 [ 1] 263 ld a, #0x01 - 008A1F 264 00103$: + 008691 A6 01 [ 1] 263 ld a, #0x01 + 008693 264 00103$: 265 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 397: RTC->WPR = 0xFF; - 008A1F 35 FF 51 59 [ 1] 266 mov 0x5159+0, #0xff + 008693 35 FF 51 59 [ 1] 266 mov 0x5159+0, #0xff 267 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 400: return (ErrorStatus)(status); 268 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 401: } - 008A23 5B 03 [ 2] 269 addw sp, #3 - 008A25 81 [ 4] 270 ret + 008697 5B 03 [ 2] 269 addw sp, #3 + 008699 81 [ 4] 270 ret 271 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 410: void RTC_StructInit(RTC_InitTypeDef* RTC_InitStruct) 272 ; ----------------------------------------- 273 ; function RTC_StructInit 274 ; ----------------------------------------- - 008A26 275 _RTC_StructInit: - 008A26 51 [ 1] 276 exgw x, y + 00869A 275 _RTC_StructInit: + 00869A 51 [ 1] 276 exgw x, y 277 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 413: RTC_InitStruct->RTC_HourFormat = RTC_HourFormat_24; - 008A27 90 7F [ 1] 278 clr (y) + 00869B 90 7F [ 1] 278 clr (y) 279 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 416: RTC_InitStruct->RTC_AsynchPrediv = RTC_APRER_RESET_VALUE; - 008A29 93 [ 1] 280 ldw x, y - 008A2A 5C [ 1] 281 incw x - 008A2B A6 7F [ 1] 282 ld a, #0x7f - 008A2D F7 [ 1] 283 ld (x), a + 00869D 93 [ 1] 280 ldw x, y + 00869E 5C [ 1] 281 incw x + 00869F A6 7F [ 1] 282 ld a, #0x7f + 0086A1 F7 [ 1] 283 ld (x), a 284 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 419: RTC_InitStruct->RTC_SynchPrediv = RTC_SPRERL_RESET_VALUE; - 008A2E 93 [ 1] 285 ldw x, y - 008A2F 90 AE 00 FF [ 2] 286 ldw y, #0x00ff - 008A33 EF 02 [ 2] 287 ldw (0x02, x), y + 0086A2 93 [ 1] 285 ldw x, y + 0086A3 90 AE 00 FF [ 2] 286 ldw y, #0x00ff + 0086A7 EF 02 [ 2] 287 ldw (0x02, x), y 288 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 420: } - 008A35 81 [ 4] 289 ret + 0086A9 81 [ 4] 289 ret 290 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 430: void RTC_WriteProtectionCmd(FunctionalState NewState) 291 ; ----------------------------------------- 292 ; function RTC_WriteProtectionCmd 293 ; ----------------------------------------- - 008A36 294 _RTC_WriteProtectionCmd: + 0086AA 294 _RTC_WriteProtectionCmd: 295 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 435: if (NewState != DISABLE) - 008A36 4D [ 1] 296 tnz a - 008A37 27 05 [ 1] 297 jreq 00102$ + 0086AA 4D [ 1] 296 tnz a + 0086AB 27 05 [ 1] 297 jreq 00102$ 298 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 438: RTC->WPR = RTC_WPR_EnableKey; - 008A39 35 FF 51 59 [ 1] 299 mov 0x5159+0, #0xff - 008A3D 81 [ 4] 300 ret - 008A3E 301 00102$: + 0086AD 35 FF 51 59 [ 1] 299 mov 0x5159+0, #0xff + 0086B1 81 [ 4] 300 ret + 0086B2 301 00102$: 302 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 443: RTC->WPR = RTC_WPR_DisableKey1; - 008A3E 35 CA 51 59 [ 1] 303 mov 0x5159+0, #0xca + 0086B2 35 CA 51 59 [ 1] 303 mov 0x5159+0, #0xca 304 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 444: RTC->WPR = RTC_WPR_DisableKey2; - 008A42 35 53 51 59 [ 1] 305 mov 0x5159+0, #0x53 + 0086B6 35 53 51 59 [ 1] 305 mov 0x5159+0, #0x53 306 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 446: } - 008A46 81 [ 4] 307 ret + 0086BA 81 [ 4] 307 ret 308 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 458: ErrorStatus RTC_EnterInitMode(void) 309 ; ----------------------------------------- 310 ; function RTC_EnterInitMode 311 ; ----------------------------------------- - 008A47 312 _RTC_EnterInitMode: + 0086BB 312 _RTC_EnterInitMode: 313 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 464: if ((RTC->ISR1 & RTC_ISR1_INITF) == RESET) - 008A47 72 0C 51 4C 12 [ 2] 314 btjt 0x514c, #6, 00106$ + 0086BB 72 0C 51 4C 12 [ 2] 314 btjt 0x514c, #6, 00106$ 315 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 467: RTC->ISR1 = (uint8_t)RTC_ISR1_INIT; - 008A4C 35 80 51 4C [ 1] 316 mov 0x514c+0, #0x80 + 0086C0 35 80 51 4C [ 1] 316 mov 0x514c+0, #0x80 317 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 470: while (((RTC->ISR1 & RTC_ISR1_INITF) == RESET) && ( initfcount != INITF_TIMEOUT)) - 008A50 5F [ 1] 318 clrw x - 008A51 319 00102$: - 008A51 72 0C 51 4C 08 [ 2] 320 btjt 0x514c, #6, 00106$ - 008A56 A3 FF FF [ 2] 321 cpw x, #0xffff - 008A59 27 03 [ 1] 322 jreq 00106$ + 0086C4 5F [ 1] 318 clrw x + 0086C5 319 00102$: + 0086C5 72 0C 51 4C 08 [ 2] 320 btjt 0x514c, #6, 00106$ + 0086CA A3 FF FF [ 2] 321 cpw x, #0xffff + 0086CD 27 03 [ 1] 322 jreq 00106$ 323 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 472: initfcount++; - 008A5B 5C [ 1] 324 incw x - 008A5C 20 F3 [ 2] 325 jra 00102$ - 008A5E 326 00106$: + 0086CF 5C [ 1] 324 incw x + 0086D0 20 F3 [ 2] 325 jra 00102$ + 0086D2 326 00106$: 327 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 476: if ((RTC->ISR1 & RTC_ISR1_INITF) == RESET) - 008A5E 72 0C 51 4C 02 [ 2] 328 btjt 0x514c, #6, 00108$ + 0086D2 72 0C 51 4C 02 [ 2] 328 btjt 0x514c, #6, 00108$ 329 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 478: status = ERROR; - 008A63 4F [ 1] 330 clr a - 008A64 81 [ 4] 331 ret - 008A65 332 00108$: + 0086D7 4F [ 1] 330 clr a + 0086D8 81 [ 4] 331 ret + 0086D9 332 00108$: 333 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 482: status = SUCCESS; - 008A65 A6 01 [ 1] 334 ld a, #0x01 + 0086D9 A6 01 [ 1] 334 ld a, #0x01 335 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 485: return (ErrorStatus)status; 336 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 486: } - 008A67 81 [ 4] 337 ret + 0086DB 81 [ 4] 337 ret 338 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 498: void RTC_ExitInitMode(void) 339 ; ----------------------------------------- 340 ; function RTC_ExitInitMode 341 ; ----------------------------------------- - 008A68 342 _RTC_ExitInitMode: + 0086DC 342 _RTC_ExitInitMode: 343 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 501: RTC->ISR1 &= (uint8_t)~RTC_ISR1_INIT; - 008A68 72 1F 51 4C [ 1] 344 bres 0x514c, #7 + 0086DC 72 1F 51 4C [ 1] 344 bres 0x514c, #7 345 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 502: } - 008A6C 81 [ 4] 346 ret + 0086E0 81 [ 4] 346 ret 347 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 527: ErrorStatus RTC_WaitForSynchro(void) 348 ; ----------------------------------------- 349 ; function RTC_WaitForSynchro 350 ; ----------------------------------------- - 008A6D 351 _RTC_WaitForSynchro: + 0086E1 351 _RTC_WaitForSynchro: 352 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 533: RTC->WPR = 0xCA; - 008A6D 35 CA 51 59 [ 1] 353 mov 0x5159+0, #0xca + 0086E1 35 CA 51 59 [ 1] 353 mov 0x5159+0, #0xca 354 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 534: RTC->WPR = 0x53; - 008A71 35 53 51 59 [ 1] 355 mov 0x5159+0, #0x53 + 0086E5 35 53 51 59 [ 1] 355 mov 0x5159+0, #0x53 356 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 537: RTC->ISR1 &= (uint8_t)~(RTC_ISR1_RSF | RTC_ISR1_INIT); - 008A75 C6 51 4C [ 1] 357 ld a, 0x514c - 008A78 A4 5F [ 1] 358 and a, #0x5f - 008A7A C7 51 4C [ 1] 359 ld 0x514c, a + 0086E9 C6 51 4C [ 1] 357 ld a, 0x514c + 0086EC A4 5F [ 1] 358 and a, #0x5f + 0086EE C7 51 4C [ 1] 359 ld 0x514c, a 360 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 540: while (((RTC->ISR1 & RTC_ISR1_RSF) == RESET) && ( rsfcount != RSF_TIMEOUT)) - 008A7D 5F [ 1] 361 clrw x - 008A7E 362 00102$: - 008A7E 72 0A 51 4C 08 [ 2] 363 btjt 0x514c, #5, 00104$ - 008A83 A3 FF FF [ 2] 364 cpw x, #0xffff - 008A86 27 03 [ 1] 365 jreq 00104$ + 0086F1 5F [ 1] 361 clrw x + 0086F2 362 00102$: + 0086F2 72 0A 51 4C 08 [ 2] 363 btjt 0x514c, #5, 00104$ + 0086F7 A3 FF FF [ 2] 364 cpw x, #0xffff + 0086FA 27 03 [ 1] 365 jreq 00104$ 366 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 542: rsfcount++; - 008A88 5C [ 1] 367 incw x - 008A89 20 F3 [ 2] 368 jra 00102$ - 008A8B 369 00104$: + 0086FC 5C [ 1] 367 incw x + 0086FD 20 F3 [ 2] 368 jra 00102$ + 0086FF 369 00104$: 370 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 546: if ((RTC->ISR1 & RTC_ISR1_RSF) != RESET) - 008A8B 72 0B 51 4C 03 [ 2] 371 btjf 0x514c, #5, 00106$ + 0086FF 72 0B 51 4C 03 [ 2] 371 btjf 0x514c, #5, 00106$ 372 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 548: status = SUCCESS; - 008A90 A6 01 [ 1] 373 ld a, #0x01 + 008704 A6 01 [ 1] 373 ld a, #0x01 374 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 552: status = ERROR; - 008A92 21 375 .byte 0x21 - 008A93 376 00106$: - 008A93 4F [ 1] 377 clr a - 008A94 378 00107$: + 008706 21 375 .byte 0x21 + 008707 376 00106$: + 008707 4F [ 1] 377 clr a + 008708 378 00107$: 379 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 556: RTC->WPR = 0xFF; - 008A94 35 FF 51 59 [ 1] 380 mov 0x5159+0, #0xff + 008708 35 FF 51 59 [ 1] 380 mov 0x5159+0, #0xff 381 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 558: return (ErrorStatus)status; 382 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 559: } - 008A98 81 [ 4] 383 ret + 00870C 81 [ 4] 383 ret 384 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 568: void RTC_RatioCmd(FunctionalState NewState) 385 ; ----------------------------------------- 386 ; function RTC_RatioCmd 387 ; ----------------------------------------- - 008A99 388 _RTC_RatioCmd: - 008A99 88 [ 1] 389 push a - 008A9A 6B 01 [ 1] 390 ld (0x01, sp), a + 00870D 388 _RTC_RatioCmd: + 00870D 88 [ 1] 389 push a + 00870E 6B 01 [ 1] 390 ld (0x01, sp), a 391 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 574: RTC->WPR = 0xCA; - 008A9C 35 CA 51 59 [ 1] 392 mov 0x5159+0, #0xca + 008710 35 CA 51 59 [ 1] 392 mov 0x5159+0, #0xca 393 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 575: RTC->WPR = 0x53; - 008AA0 35 53 51 59 [ 1] 394 mov 0x5159+0, #0x53 + 008714 35 53 51 59 [ 1] 394 mov 0x5159+0, #0x53 395 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 580: RTC->CR1 |= (uint8_t)RTC_CR1_RATIO; - 008AA4 C6 51 48 [ 1] 396 ld a, 0x5148 + 008718 C6 51 48 [ 1] 396 ld a, 0x5148 397 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 577: if (NewState != DISABLE) - 008AA7 0D 01 [ 1] 398 tnz (0x01, sp) - 008AA9 27 07 [ 1] 399 jreq 00102$ + 00871B 0D 01 [ 1] 398 tnz (0x01, sp) + 00871D 27 07 [ 1] 399 jreq 00102$ 400 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 580: RTC->CR1 |= (uint8_t)RTC_CR1_RATIO; - 008AAB AA 20 [ 1] 401 or a, #0x20 - 008AAD C7 51 48 [ 1] 402 ld 0x5148, a - 008AB0 20 05 [ 2] 403 jra 00103$ - 008AB2 404 00102$: + 00871F AA 20 [ 1] 401 or a, #0x20 + 008721 C7 51 48 [ 1] 402 ld 0x5148, a + 008724 20 05 [ 2] 403 jra 00103$ + 008726 404 00102$: 405 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 585: RTC->CR1 &= (uint8_t)~RTC_CR1_RATIO; - 008AB2 A4 DF [ 1] 406 and a, #0xdf - 008AB4 C7 51 48 [ 1] 407 ld 0x5148, a - 008AB7 408 00103$: + 008726 A4 DF [ 1] 406 and a, #0xdf + 008728 C7 51 48 [ 1] 407 ld 0x5148, a + 00872B 408 00103$: 409 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 589: RTC->WPR = 0xFF; - 008AB7 35 FF 51 59 [ 1] 410 mov 0x5159+0, #0xff + 00872B 35 FF 51 59 [ 1] 410 mov 0x5159+0, #0xff 411 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 590: } - 008ABB 84 [ 1] 412 pop a - 008ABC 81 [ 4] 413 ret + 00872F 84 [ 1] 412 pop a + 008730 81 [ 4] 413 ret 414 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 598: void RTC_BypassShadowCmd(FunctionalState NewState) 415 ; ----------------------------------------- 416 ; function RTC_BypassShadowCmd 417 ; ----------------------------------------- - 008ABD 418 _RTC_BypassShadowCmd: - 008ABD 88 [ 1] 419 push a - 008ABE 6B 01 [ 1] 420 ld (0x01, sp), a + 008731 418 _RTC_BypassShadowCmd: + 008731 88 [ 1] 419 push a + 008732 6B 01 [ 1] 420 ld (0x01, sp), a 421 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 604: RTC->WPR = 0xCA; - 008AC0 35 CA 51 59 [ 1] 422 mov 0x5159+0, #0xca + 008734 35 CA 51 59 [ 1] 422 mov 0x5159+0, #0xca 423 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 605: RTC->WPR = 0x53; - 008AC4 35 53 51 59 [ 1] 424 mov 0x5159+0, #0x53 + 008738 35 53 51 59 [ 1] 424 mov 0x5159+0, #0x53 425 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 610: RTC->CR1 |= (uint8_t)RTC_CR1_BYPSHAD; - 008AC8 C6 51 48 [ 1] 426 ld a, 0x5148 + 00873C C6 51 48 [ 1] 426 ld a, 0x5148 427 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 607: if (NewState != DISABLE) - 008ACB 0D 01 [ 1] 428 tnz (0x01, sp) - 008ACD 27 07 [ 1] 429 jreq 00102$ + 00873F 0D 01 [ 1] 428 tnz (0x01, sp) + 008741 27 07 [ 1] 429 jreq 00102$ 430 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 610: RTC->CR1 |= (uint8_t)RTC_CR1_BYPSHAD; - 008ACF AA 10 [ 1] 431 or a, #0x10 - 008AD1 C7 51 48 [ 1] 432 ld 0x5148, a - 008AD4 20 05 [ 2] 433 jra 00103$ - 008AD6 434 00102$: + 008743 AA 10 [ 1] 431 or a, #0x10 + 008745 C7 51 48 [ 1] 432 ld 0x5148, a + 008748 20 05 [ 2] 433 jra 00103$ + 00874A 434 00102$: 435 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 615: RTC->CR1 &= (uint8_t)~RTC_CR1_BYPSHAD; - 008AD6 A4 EF [ 1] 436 and a, #0xef - 008AD8 C7 51 48 [ 1] 437 ld 0x5148, a - 008ADB 438 00103$: + 00874A A4 EF [ 1] 436 and a, #0xef + 00874C C7 51 48 [ 1] 437 ld 0x5148, a + 00874F 438 00103$: 439 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 619: RTC->WPR = 0xFF; - 008ADB 35 FF 51 59 [ 1] 440 mov 0x5159+0, #0xff + 00874F 35 FF 51 59 [ 1] 440 mov 0x5159+0, #0xff 441 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 620: } - 008ADF 84 [ 1] 442 pop a - 008AE0 81 [ 4] 443 ret + 008753 84 [ 1] 442 pop a + 008754 81 [ 4] 443 ret 444 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 659: ErrorStatus RTC_SetTime(RTC_Format_TypeDef RTC_Format, 445 ; ----------------------------------------- 446 ; function RTC_SetTime 447 ; ----------------------------------------- - 008AE1 448 _RTC_SetTime: - 008AE1 52 06 [ 2] 449 sub sp, #6 - 008AE3 6B 06 [ 1] 450 ld (0x06, sp), a - 008AE5 1F 04 [ 2] 451 ldw (0x04, sp), x + 008755 448 _RTC_SetTime: + 008755 52 06 [ 2] 449 sub sp, #6 + 008757 6B 06 [ 1] 450 ld (0x06, sp), a + 008759 1F 04 [ 2] 451 ldw (0x04, sp), x 452 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 671: if ((RTC->CR1 & RTC_CR1_FMT) != RESET) - 008AE7 C6 51 48 [ 1] 453 ld a, 0x5148 + 00875B C6 51 48 [ 1] 453 ld a, 0x5148 454 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 701: RTC->WPR = 0xCA; - 008AEA 35 CA 51 59 [ 1] 455 mov 0x5159+0, #0xca + 00875E 35 CA 51 59 [ 1] 455 mov 0x5159+0, #0xca 456 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 702: RTC->WPR = 0x53; - 008AEE 35 53 51 59 [ 1] 457 mov 0x5159+0, #0x53 + 008762 35 53 51 59 [ 1] 457 mov 0x5159+0, #0x53 458 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 705: if (RTC_EnterInitMode() == ERROR) - 008AF2 CD 8A 47 [ 4] 459 call _RTC_EnterInitMode - 008AF5 4D [ 1] 460 tnz a - 008AF6 26 07 [ 1] 461 jrne 00123$ + 008766 CD 86 BB [ 4] 459 call _RTC_EnterInitMode + 008769 4D [ 1] 460 tnz a + 00876A 26 07 [ 1] 461 jrne 00123$ 462 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 707: status = ERROR; - 008AF8 4F [ 1] 463 clr a + 00876C 4F [ 1] 463 clr a 464 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 709: RTC->WPR = 0xFF; - 008AF9 35 FF 51 59 [ 1] 465 mov 0x5159+0, #0xff - 008AFD 20 6B [ 2] 466 jra 00124$ - 008AFF 467 00123$: + 00876D 35 FF 51 59 [ 1] 465 mov 0x5159+0, #0xff + 008771 20 6B [ 2] 466 jra 00124$ + 008773 467 00123$: 468 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 714: if ((RTC->CR1 & RTC_CR1_FMT) != RESET) - 008AFF 72 0D 51 48 07 [ 2] 469 btjf 0x5148, #6, 00111$ + 008773 72 0D 51 48 07 [ 2] 469 btjf 0x5148, #6, 00111$ 470 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 717: temp = RTC_TimeStruct->RTC_H12; - 008B04 1E 04 [ 2] 471 ldw x, (0x04, sp) - 008B06 E6 03 [ 1] 472 ld a, (0x3, x) - 008B08 6B 01 [ 1] 473 ld (0x01, sp), a + 008778 1E 04 [ 2] 471 ldw x, (0x04, sp) + 00877A E6 03 [ 1] 472 ld a, (0x3, x) + 00877C 6B 01 [ 1] 473 ld (0x01, sp), a 474 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 721: temp = 0; - 008B0A C5 475 .byte 0xc5 - 008B0B 476 00111$: - 008B0B 0F 01 [ 1] 477 clr (0x01, sp) - 008B0D 478 00112$: + 00877E C5 475 .byte 0xc5 + 00877F 476 00111$: + 00877F 0F 01 [ 1] 477 clr (0x01, sp) + 008781 478 00112$: 479 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 726: RTC->TR1 = (uint8_t)(RTC_TimeStruct->RTC_Seconds); - 008B0D 16 04 [ 2] 480 ldw y, (0x04, sp) + 008781 16 04 [ 2] 480 ldw y, (0x04, sp) 481 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 727: RTC->TR2 = (uint8_t)(RTC_TimeStruct->RTC_Minutes) ; - 008B0F 1E 04 [ 2] 482 ldw x, (0x04, sp) - 008B11 5C [ 1] 483 incw x - 008B12 1F 02 [ 2] 484 ldw (0x02, sp), x + 008783 1E 04 [ 2] 482 ldw x, (0x04, sp) + 008785 5C [ 1] 483 incw x + 008786 1F 02 [ 2] 484 ldw (0x02, sp), x 485 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 728: RTC->TR3 = (uint8_t)( temp | RTC_TimeStruct->RTC_Hours) ; - 008B14 1E 04 [ 2] 486 ldw x, (0x04, sp) + 008788 1E 04 [ 2] 486 ldw x, (0x04, sp) 487 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 726: RTC->TR1 = (uint8_t)(RTC_TimeStruct->RTC_Seconds); - 008B16 90 E6 02 [ 1] 488 ld a, (0x2, y) + 00878A 90 E6 02 [ 1] 488 ld a, (0x2, y) 489 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 724: if (RTC_Format != RTC_Format_BIN) - 008B19 0D 06 [ 1] 490 tnz (0x06, sp) - 008B1B 27 12 [ 1] 491 jreq 00114$ + 00878D 0D 06 [ 1] 490 tnz (0x06, sp) + 00878F 27 12 [ 1] 491 jreq 00114$ 492 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 726: RTC->TR1 = (uint8_t)(RTC_TimeStruct->RTC_Seconds); - 008B1D C7 51 40 [ 1] 493 ld 0x5140, a + 008791 C7 51 40 [ 1] 493 ld 0x5140, a 494 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 727: RTC->TR2 = (uint8_t)(RTC_TimeStruct->RTC_Minutes) ; - 008B20 16 02 [ 2] 495 ldw y, (0x02, sp) - 008B22 90 F6 [ 1] 496 ld a, (y) - 008B24 C7 51 41 [ 1] 497 ld 0x5141, a + 008794 16 02 [ 2] 495 ldw y, (0x02, sp) + 008796 90 F6 [ 1] 496 ld a, (y) + 008798 C7 51 41 [ 1] 497 ld 0x5141, a 498 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 728: RTC->TR3 = (uint8_t)( temp | RTC_TimeStruct->RTC_Hours) ; - 008B27 F6 [ 1] 499 ld a, (x) - 008B28 1A 01 [ 1] 500 or a, (0x01, sp) - 008B2A C7 51 42 [ 1] 501 ld 0x5142, a - 008B2D 20 1D [ 2] 502 jra 00115$ - 008B2F 503 00114$: + 00879B F6 [ 1] 499 ld a, (x) + 00879C 1A 01 [ 1] 500 or a, (0x01, sp) + 00879E C7 51 42 [ 1] 501 ld 0x5142, a + 0087A1 20 1D [ 2] 502 jra 00115$ + 0087A3 503 00114$: 504 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 732: RTC->TR1 = (uint8_t)(ByteToBcd2(RTC_TimeStruct->RTC_Seconds)); - 008B2F 89 [ 2] 505 pushw x - 008B30 CD 92 35 [ 4] 506 call _ByteToBcd2 - 008B33 85 [ 2] 507 popw x - 008B34 C7 51 40 [ 1] 508 ld 0x5140, a + 0087A3 89 [ 2] 505 pushw x + 0087A4 CD 8E A9 [ 4] 506 call _ByteToBcd2 + 0087A7 85 [ 2] 507 popw x + 0087A8 C7 51 40 [ 1] 508 ld 0x5140, a 509 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 733: RTC->TR2 = (uint8_t)(ByteToBcd2(RTC_TimeStruct->RTC_Minutes)) ; - 008B37 16 02 [ 2] 510 ldw y, (0x02, sp) - 008B39 90 F6 [ 1] 511 ld a, (y) - 008B3B 89 [ 2] 512 pushw x - 008B3C CD 92 35 [ 4] 513 call _ByteToBcd2 - 008B3F 85 [ 2] 514 popw x - 008B40 C7 51 41 [ 1] 515 ld 0x5141, a + 0087AB 16 02 [ 2] 510 ldw y, (0x02, sp) + 0087AD 90 F6 [ 1] 511 ld a, (y) + 0087AF 89 [ 2] 512 pushw x + 0087B0 CD 8E A9 [ 4] 513 call _ByteToBcd2 + 0087B3 85 [ 2] 514 popw x + 0087B4 C7 51 41 [ 1] 515 ld 0x5141, a 516 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 734: RTC->TR3 = (uint8_t)( temp | ByteToBcd2(RTC_TimeStruct->RTC_Hours)); - 008B43 F6 [ 1] 517 ld a, (x) - 008B44 CD 92 35 [ 4] 518 call _ByteToBcd2 - 008B47 1A 01 [ 1] 519 or a, (0x01, sp) - 008B49 C7 51 42 [ 1] 520 ld 0x5142, a - 008B4C 521 00115$: + 0087B7 F6 [ 1] 517 ld a, (x) + 0087B8 CD 8E A9 [ 4] 518 call _ByteToBcd2 + 0087BB 1A 01 [ 1] 519 or a, (0x01, sp) + 0087BD C7 51 42 [ 1] 520 ld 0x5142, a + 0087C0 521 00115$: 522 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 737: (void)(RTC->DR3); - 008B4C C6 51 46 [ 1] 523 ld a, 0x5146 + 0087C0 C6 51 46 [ 1] 523 ld a, 0x5146 524 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 740: RTC->ISR1 &= (uint8_t)~RTC_ISR1_INIT; - 008B4F 72 1F 51 4C [ 1] 525 bres 0x514c, #7 + 0087C3 72 1F 51 4C [ 1] 525 bres 0x514c, #7 526 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 743: RTC->WPR = 0xFF; - 008B53 35 FF 51 59 [ 1] 527 mov 0x5159+0, #0xff + 0087C7 35 FF 51 59 [ 1] 527 mov 0x5159+0, #0xff 528 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 746: if ((RTC->CR1 & RTC_CR1_BYPSHAD) == RESET) - 008B57 72 08 51 48 0C [ 2] 529 btjt 0x5148, #4, 00120$ + 0087CB 72 08 51 48 0C [ 2] 529 btjt 0x5148, #4, 00120$ 530 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 748: if (RTC_WaitForSynchro() == ERROR) - 008B5C CD 8A 6D [ 4] 531 call _RTC_WaitForSynchro - 008B5F 4D [ 1] 532 tnz a - 008B60 26 03 [ 1] 533 jrne 00117$ + 0087D0 CD 86 E1 [ 4] 531 call _RTC_WaitForSynchro + 0087D3 4D [ 1] 532 tnz a + 0087D4 26 03 [ 1] 533 jrne 00117$ 534 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 750: status = ERROR; - 008B62 4F [ 1] 535 clr a - 008B63 20 05 [ 2] 536 jra 00124$ - 008B65 537 00117$: + 0087D6 4F [ 1] 535 clr a + 0087D7 20 05 [ 2] 536 jra 00124$ + 0087D9 537 00117$: 538 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 754: status = SUCCESS; - 008B65 A6 01 [ 1] 539 ld a, #0x01 + 0087D9 A6 01 [ 1] 539 ld a, #0x01 540 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 759: status = SUCCESS; - 008B67 C5 541 .byte 0xc5 - 008B68 542 00120$: - 008B68 A6 01 [ 1] 543 ld a, #0x01 - 008B6A 544 00124$: + 0087DB C5 541 .byte 0xc5 + 0087DC 542 00120$: + 0087DC A6 01 [ 1] 543 ld a, #0x01 + 0087DE 544 00124$: 545 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 763: return (ErrorStatus)status; 546 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 764: } - 008B6A 5B 06 [ 2] 547 addw sp, #6 - 008B6C 81 [ 4] 548 ret + 0087DE 5B 06 [ 2] 547 addw sp, #6 + 0087E0 81 [ 4] 548 ret 549 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 775: void RTC_TimeStructInit(RTC_TimeTypeDef* RTC_TimeStruct) 550 ; ----------------------------------------- 551 ; function RTC_TimeStructInit 552 ; ----------------------------------------- - 008B6D 553 _RTC_TimeStructInit: + 0087E1 553 _RTC_TimeStructInit: 554 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 778: RTC_TimeStruct->RTC_H12 = RTC_H12_AM; - 008B6D 90 93 [ 1] 555 ldw y, x - 008B6F 6F 03 [ 1] 556 clr (0x0003, x) + 0087E1 90 93 [ 1] 555 ldw y, x + 0087E3 6F 03 [ 1] 556 clr (0x0003, x) 557 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 779: RTC_TimeStruct->RTC_Hours = 0; - 008B71 90 7F [ 1] 558 clr (y) + 0087E5 90 7F [ 1] 558 clr (y) 559 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 780: RTC_TimeStruct->RTC_Minutes = 0; - 008B73 93 [ 1] 560 ldw x, y - 008B74 6F 01 [ 1] 561 clr (0x01, x) + 0087E7 93 [ 1] 560 ldw x, y + 0087E8 6F 01 [ 1] 561 clr (0x01, x) 562 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 781: RTC_TimeStruct->RTC_Seconds = 0; - 008B76 93 [ 1] 563 ldw x, y - 008B77 6F 02 [ 1] 564 clr (0x02, x) + 0087EA 93 [ 1] 563 ldw x, y + 0087EB 6F 02 [ 1] 564 clr (0x02, x) 565 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 782: } - 008B79 81 [ 4] 566 ret + 0087ED 81 [ 4] 566 ret 567 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 798: void RTC_GetTime(RTC_Format_TypeDef RTC_Format, 568 ; ----------------------------------------- 569 ; function RTC_GetTime 570 ; ----------------------------------------- - 008B7A 571 _RTC_GetTime: - 008B7A 52 06 [ 2] 572 sub sp, #6 - 008B7C 6B 06 [ 1] 573 ld (0x06, sp), a + 0087EE 571 _RTC_GetTime: + 0087EE 52 06 [ 2] 572 sub sp, #6 + 0087F0 6B 06 [ 1] 573 ld (0x06, sp), a 574 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 808: RTC_TimeStruct->RTC_Seconds = RTC->TR1; - 008B7E 90 93 [ 1] 575 ldw y, x - 008B80 5C [ 1] 576 incw x - 008B81 5C [ 1] 577 incw x - 008B82 1F 01 [ 2] 578 ldw (0x01, sp), x - 008B84 C6 51 40 [ 1] 579 ld a, 0x5140 - 008B87 1E 01 [ 2] 580 ldw x, (0x01, sp) - 008B89 F7 [ 1] 581 ld (x), a + 0087F2 90 93 [ 1] 575 ldw y, x + 0087F4 5C [ 1] 576 incw x + 0087F5 5C [ 1] 577 incw x + 0087F6 1F 01 [ 2] 578 ldw (0x01, sp), x + 0087F8 C6 51 40 [ 1] 579 ld a, 0x5140 + 0087FB 1E 01 [ 2] 580 ldw x, (0x01, sp) + 0087FD F7 [ 1] 581 ld (x), a 582 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 811: RTC_TimeStruct->RTC_Minutes = RTC->TR2; - 008B8A 93 [ 1] 583 ldw x, y - 008B8B 5C [ 1] 584 incw x - 008B8C 1F 03 [ 2] 585 ldw (0x03, sp), x - 008B8E C6 51 41 [ 1] 586 ld a, 0x5141 - 008B91 1E 03 [ 2] 587 ldw x, (0x03, sp) - 008B93 F7 [ 1] 588 ld (x), a + 0087FE 93 [ 1] 583 ldw x, y + 0087FF 5C [ 1] 584 incw x + 008800 1F 03 [ 2] 585 ldw (0x03, sp), x + 008802 C6 51 41 [ 1] 586 ld a, 0x5141 + 008805 1E 03 [ 2] 587 ldw x, (0x03, sp) + 008807 F7 [ 1] 588 ld (x), a 589 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 814: tmpreg = (uint8_t)RTC->TR3; - 008B94 C6 51 42 [ 1] 590 ld a, 0x5142 - 008B97 6B 05 [ 1] 591 ld (0x05, sp), a + 008808 C6 51 42 [ 1] 590 ld a, 0x5142 + 00880B 6B 05 [ 1] 591 ld (0x05, sp), a 592 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 817: (void) (RTC->DR3) ; - 008B99 C6 51 46 [ 1] 593 ld a, 0x5146 + 00880D C6 51 46 [ 1] 593 ld a, 0x5146 594 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 821: RTC_TimeStruct->RTC_Hours = (uint8_t)(tmpreg & (uint8_t)~(RTC_TR3_PM)); - 008B9C 93 [ 1] 595 ldw x, y - 008B9D 7B 05 [ 1] 596 ld a, (0x05, sp) - 008B9F A4 BF [ 1] 597 and a, #0xbf - 008BA1 F7 [ 1] 598 ld (x), a + 008810 93 [ 1] 595 ldw x, y + 008811 7B 05 [ 1] 596 ld a, (0x05, sp) + 008813 A4 BF [ 1] 597 and a, #0xbf + 008815 F7 [ 1] 598 ld (x), a 599 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 824: RTC_TimeStruct->RTC_H12 = (RTC_H12_TypeDef)(tmpreg & RTC_TR3_PM); - 008BA2 72 A9 00 03 [ 2] 600 addw y, #0x0003 - 008BA6 7B 05 [ 1] 601 ld a, (0x05, sp) - 008BA8 A4 40 [ 1] 602 and a, #0x40 - 008BAA 90 F7 [ 1] 603 ld (y), a + 008816 72 A9 00 03 [ 2] 600 addw y, #0x0003 + 00881A 7B 05 [ 1] 601 ld a, (0x05, sp) + 00881C A4 40 [ 1] 602 and a, #0x40 + 00881E 90 F7 [ 1] 603 ld (y), a 604 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 827: if (RTC_Format == RTC_Format_BIN) - 008BAC 0D 06 [ 1] 605 tnz (0x06, sp) - 008BAE 26 19 [ 1] 606 jrne 00103$ + 008820 0D 06 [ 1] 605 tnz (0x06, sp) + 008822 26 19 [ 1] 606 jrne 00103$ 607 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 830: RTC_TimeStruct->RTC_Hours = (uint8_t)Bcd2ToByte(RTC_TimeStruct->RTC_Hours); - 008BB0 F6 [ 1] 608 ld a, (x) - 008BB1 89 [ 2] 609 pushw x - 008BB2 CD 92 48 [ 4] 610 call _Bcd2ToByte - 008BB5 85 [ 2] 611 popw x - 008BB6 F7 [ 1] 612 ld (x), a + 008824 F6 [ 1] 608 ld a, (x) + 008825 89 [ 2] 609 pushw x + 008826 CD 8E BC [ 4] 610 call _Bcd2ToByte + 008829 85 [ 2] 611 popw x + 00882A F7 [ 1] 612 ld (x), a 613 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 831: RTC_TimeStruct->RTC_Minutes = (uint8_t)Bcd2ToByte(RTC_TimeStruct->RTC_Minutes); - 008BB7 1E 03 [ 2] 614 ldw x, (0x03, sp) - 008BB9 F6 [ 1] 615 ld a, (x) - 008BBA CD 92 48 [ 4] 616 call _Bcd2ToByte - 008BBD 1E 03 [ 2] 617 ldw x, (0x03, sp) - 008BBF F7 [ 1] 618 ld (x), a + 00882B 1E 03 [ 2] 614 ldw x, (0x03, sp) + 00882D F6 [ 1] 615 ld a, (x) + 00882E CD 8E BC [ 4] 616 call _Bcd2ToByte + 008831 1E 03 [ 2] 617 ldw x, (0x03, sp) + 008833 F7 [ 1] 618 ld (x), a 619 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 832: RTC_TimeStruct->RTC_Seconds = (uint8_t)Bcd2ToByte(RTC_TimeStruct->RTC_Seconds); - 008BC0 1E 01 [ 2] 620 ldw x, (0x01, sp) - 008BC2 F6 [ 1] 621 ld a, (x) - 008BC3 CD 92 48 [ 4] 622 call _Bcd2ToByte - 008BC6 1E 01 [ 2] 623 ldw x, (0x01, sp) - 008BC8 F7 [ 1] 624 ld (x), a - 008BC9 625 00103$: + 008834 1E 01 [ 2] 620 ldw x, (0x01, sp) + 008836 F6 [ 1] 621 ld a, (x) + 008837 CD 8E BC [ 4] 622 call _Bcd2ToByte + 00883A 1E 01 [ 2] 623 ldw x, (0x01, sp) + 00883C F7 [ 1] 624 ld (x), a + 00883D 625 00103$: 626 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 834: } - 008BC9 5B 06 [ 2] 627 addw sp, #6 - 008BCB 81 [ 4] 628 ret + 00883D 5B 06 [ 2] 627 addw sp, #6 + 00883F 81 [ 4] 628 ret 629 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 845: uint16_t RTC_GetSubSecond(void) 630 ; ----------------------------------------- 631 ; function RTC_GetSubSecond 632 ; ----------------------------------------- - 008BCC 633 _RTC_GetSubSecond: - 008BCC 89 [ 2] 634 pushw x + 008840 633 _RTC_GetSubSecond: + 008840 89 [ 2] 634 pushw x 635 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 851: ssrhreg = RTC->SSRH; - 008BCD C6 51 57 [ 1] 636 ld a, 0x5157 - 008BD0 95 [ 1] 637 ld xh, a + 008841 C6 51 57 [ 1] 636 ld a, 0x5157 + 008844 95 [ 1] 637 ld xh, a 638 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 852: ssrlreg = RTC->SSRL; - 008BD1 C6 51 58 [ 1] 639 ld a, 0x5158 - 008BD4 97 [ 1] 640 ld xl, a + 008845 C6 51 58 [ 1] 639 ld a, 0x5158 + 008848 97 [ 1] 640 ld xl, a 641 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 855: (void) (RTC->DR3); - 008BD5 C6 51 46 [ 1] 642 ld a, 0x5146 + 008849 C6 51 46 [ 1] 642 ld a, 0x5146 643 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 858: ssrreg = (uint16_t)((uint16_t)((uint16_t)ssrhreg << 8) | (uint16_t)(ssrlreg)); - 008BD8 0F 02 [ 1] 644 clr (0x02, sp) + 00884C 0F 02 [ 1] 644 clr (0x02, sp) 645 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 859: return (uint16_t)(ssrreg); 646 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 860: } - 008BDA 5B 02 [ 2] 647 addw sp, #2 - 008BDC 81 [ 4] 648 ret + 00884E 5B 02 [ 2] 647 addw sp, #2 + 008850 81 [ 4] 648 ret 649 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 876: ErrorStatus RTC_SetDate(RTC_Format_TypeDef RTC_Format, 650 ; ----------------------------------------- 651 ; function RTC_SetDate 652 ; ----------------------------------------- - 008BDD 653 _RTC_SetDate: - 008BDD 52 0A [ 2] 654 sub sp, #10 - 008BDF 6B 0A [ 1] 655 ld (0x0a, sp), a + 008851 653 _RTC_SetDate: + 008851 52 0A [ 2] 654 sub sp, #10 + 008853 6B 0A [ 1] 655 ld (0x0a, sp), a 656 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 881: if ((RTC_Format == RTC_Format_BIN) && ((RTC_DateStruct->RTC_Month & TEN_VALUE_BCD) == TEN_VALUE_BCD)) - 008BE1 1F 08 [ 2] 657 ldw (0x08, sp), x - 008BE3 5C [ 1] 658 incw x - 008BE4 1F 01 [ 2] 659 ldw (0x01, sp), x - 008BE6 0D 0A [ 1] 660 tnz (0x0a, sp) - 008BE8 26 11 [ 1] 661 jrne 00106$ - 008BEA 1E 01 [ 2] 662 ldw x, (0x01, sp) - 008BEC F6 [ 1] 663 ld a, (x) - 008BED 97 [ 1] 664 ld xl, a - 008BEE 43 [ 1] 665 cpl a - 008BEF A5 10 [ 1] 666 bcp a, #0x10 - 008BF1 26 08 [ 1] 667 jrne 00106$ + 008855 1F 08 [ 2] 657 ldw (0x08, sp), x + 008857 5C [ 1] 658 incw x + 008858 1F 01 [ 2] 659 ldw (0x01, sp), x + 00885A 0D 0A [ 1] 660 tnz (0x0a, sp) + 00885C 26 11 [ 1] 661 jrne 00106$ + 00885E 1E 01 [ 2] 662 ldw x, (0x01, sp) + 008860 F6 [ 1] 663 ld a, (x) + 008861 97 [ 1] 664 ld xl, a + 008862 43 [ 1] 665 cpl a + 008863 A5 10 [ 1] 666 bcp a, #0x10 + 008865 26 08 [ 1] 667 jrne 00106$ 668 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 883: RTC_DateStruct->RTC_Month = (RTC_Month_TypeDef)((RTC_DateStruct->RTC_Month & (uint8_t)~(TEN_VALUE_BCD)) + TEN_VALUE_BIN); - 008BF3 9F [ 1] 669 ld a, xl - 008BF4 A4 EF [ 1] 670 and a, #0xef - 008BF6 AB 0A [ 1] 671 add a, #0x0a - 008BF8 1E 01 [ 2] 672 ldw x, (0x01, sp) - 008BFA F7 [ 1] 673 ld (x), a + 008867 9F [ 1] 669 ld a, xl + 008868 A4 EF [ 1] 670 and a, #0xef + 00886A AB 0A [ 1] 671 add a, #0x0a + 00886C 1E 01 [ 2] 672 ldw x, (0x01, sp) + 00886E F7 [ 1] 673 ld (x), a 674 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 902: assert_param(IS_RTC_DATE_MAX(Bcd2ToByte((uint8_t)RTC_DateStruct->RTC_Date))); - 008BFB 675 00106$: + 00886F 675 00106$: 676 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 907: RTC->WPR = 0xCA; - 008BFB 35 CA 51 59 [ 1] 677 mov 0x5159+0, #0xca + 00886F 35 CA 51 59 [ 1] 677 mov 0x5159+0, #0xca 678 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 908: RTC->WPR = 0x53; - 008BFF 35 53 51 59 [ 1] 679 mov 0x5159+0, #0x53 + 008873 35 53 51 59 [ 1] 679 mov 0x5159+0, #0x53 680 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 911: if (RTC_EnterInitMode() == ERROR) - 008C03 CD 8A 47 [ 4] 681 call _RTC_EnterInitMode - 008C06 4D [ 1] 682 tnz a - 008C07 26 07 [ 1] 683 jrne 00117$ + 008877 CD 86 BB [ 4] 681 call _RTC_EnterInitMode + 00887A 4D [ 1] 682 tnz a + 00887B 26 07 [ 1] 683 jrne 00117$ 684 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 913: status = ERROR; - 008C09 4F [ 1] 685 clr a + 00887D 4F [ 1] 685 clr a 686 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 915: RTC->WPR = 0xFF; - 008C0A 35 FF 51 59 [ 1] 687 mov 0x5159+0, #0xff - 008C0E 20 71 [ 2] 688 jra 00118$ - 008C10 689 00117$: + 00887E 35 FF 51 59 [ 1] 687 mov 0x5159+0, #0xff + 008882 20 71 [ 2] 688 jra 00118$ + 008884 689 00117$: 690 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 919: (void)(RTC->TR1); - 008C10 C6 51 40 [ 1] 691 ld a, 0x5140 + 008884 C6 51 40 [ 1] 691 ld a, 0x5140 692 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 924: RTC->DR1 = (uint8_t)(RTC_DateStruct->RTC_Date); - 008C13 1E 08 [ 2] 693 ldw x, (0x08, sp) + 008887 1E 08 [ 2] 693 ldw x, (0x08, sp) 694 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 925: RTC->DR2 = (uint8_t)((RTC_DateStruct->RTC_Month) | (uint8_t)((RTC_DateStruct->RTC_WeekDay) << 5)); - 008C15 16 08 [ 2] 695 ldw y, (0x08, sp) - 008C17 17 03 [ 2] 696 ldw (0x03, sp), y + 008889 16 08 [ 2] 695 ldw y, (0x08, sp) + 00888B 17 03 [ 2] 696 ldw (0x03, sp), y 697 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 926: RTC->DR3 = (uint8_t)((RTC_DateStruct->RTC_Year)); - 008C19 16 08 [ 2] 698 ldw y, (0x08, sp) - 008C1B 72 A9 00 03 [ 2] 699 addw y, #0x0003 - 008C1F 17 05 [ 2] 700 ldw (0x05, sp), y + 00888D 16 08 [ 2] 698 ldw y, (0x08, sp) + 00888F 72 A9 00 03 [ 2] 699 addw y, #0x0003 + 008893 17 05 [ 2] 700 ldw (0x05, sp), y 701 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 924: RTC->DR1 = (uint8_t)(RTC_DateStruct->RTC_Date); - 008C21 E6 02 [ 1] 702 ld a, (0x2, x) + 008895 E6 02 [ 1] 702 ld a, (0x2, x) 703 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 922: if (RTC_Format != RTC_Format_BIN) - 008C23 0D 0A [ 1] 704 tnz (0x0a, sp) - 008C25 27 1C [ 1] 705 jreq 00108$ + 008897 0D 0A [ 1] 704 tnz (0x0a, sp) + 008899 27 1C [ 1] 705 jreq 00108$ 706 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 924: RTC->DR1 = (uint8_t)(RTC_DateStruct->RTC_Date); - 008C27 C7 51 44 [ 1] 707 ld 0x5144, a + 00889B C7 51 44 [ 1] 707 ld 0x5144, a 708 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 925: RTC->DR2 = (uint8_t)((RTC_DateStruct->RTC_Month) | (uint8_t)((RTC_DateStruct->RTC_WeekDay) << 5)); - 008C2A 1E 01 [ 2] 709 ldw x, (0x01, sp) - 008C2C F6 [ 1] 710 ld a, (x) - 008C2D 6B 07 [ 1] 711 ld (0x07, sp), a - 008C2F 1E 03 [ 2] 712 ldw x, (0x03, sp) - 008C31 F6 [ 1] 713 ld a, (x) - 008C32 4E [ 1] 714 swap a - 008C33 A4 F0 [ 1] 715 and a, #0xf0 - 008C35 48 [ 1] 716 sll a - 008C36 1A 07 [ 1] 717 or a, (0x07, sp) - 008C38 C7 51 45 [ 1] 718 ld 0x5145, a + 00889E 1E 01 [ 2] 709 ldw x, (0x01, sp) + 0088A0 F6 [ 1] 710 ld a, (x) + 0088A1 6B 07 [ 1] 711 ld (0x07, sp), a + 0088A3 1E 03 [ 2] 712 ldw x, (0x03, sp) + 0088A5 F6 [ 1] 713 ld a, (x) + 0088A6 4E [ 1] 714 swap a + 0088A7 A4 F0 [ 1] 715 and a, #0xf0 + 0088A9 48 [ 1] 716 sll a + 0088AA 1A 07 [ 1] 717 or a, (0x07, sp) + 0088AC C7 51 45 [ 1] 718 ld 0x5145, a 719 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 926: RTC->DR3 = (uint8_t)((RTC_DateStruct->RTC_Year)); - 008C3B 1E 05 [ 2] 720 ldw x, (0x05, sp) - 008C3D F6 [ 1] 721 ld a, (x) - 008C3E C7 51 46 [ 1] 722 ld 0x5146, a - 008C41 20 23 [ 2] 723 jra 00109$ - 008C43 724 00108$: + 0088AF 1E 05 [ 2] 720 ldw x, (0x05, sp) + 0088B1 F6 [ 1] 721 ld a, (x) + 0088B2 C7 51 46 [ 1] 722 ld 0x5146, a + 0088B5 20 23 [ 2] 723 jra 00109$ + 0088B7 724 00108$: 725 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 930: RTC->DR1 = (uint8_t)(ByteToBcd2 ((uint8_t)RTC_DateStruct->RTC_Date)); - 008C43 CD 92 35 [ 4] 726 call _ByteToBcd2 - 008C46 C7 51 44 [ 1] 727 ld 0x5144, a + 0088B7 CD 8E A9 [ 4] 726 call _ByteToBcd2 + 0088BA C7 51 44 [ 1] 727 ld 0x5144, a 728 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 931: RTC->DR2 = (uint8_t)((ByteToBcd2((uint8_t)RTC_DateStruct->RTC_Month)) | (uint8_t)((RTC_DateStruct->RTC_WeekDay) << 5)); - 008C49 1E 01 [ 2] 729 ldw x, (0x01, sp) - 008C4B F6 [ 1] 730 ld a, (x) - 008C4C CD 92 35 [ 4] 731 call _ByteToBcd2 - 008C4F 6B 07 [ 1] 732 ld (0x07, sp), a - 008C51 1E 03 [ 2] 733 ldw x, (0x03, sp) - 008C53 F6 [ 1] 734 ld a, (x) - 008C54 4E [ 1] 735 swap a - 008C55 A4 F0 [ 1] 736 and a, #0xf0 - 008C57 48 [ 1] 737 sll a - 008C58 1A 07 [ 1] 738 or a, (0x07, sp) - 008C5A C7 51 45 [ 1] 739 ld 0x5145, a + 0088BD 1E 01 [ 2] 729 ldw x, (0x01, sp) + 0088BF F6 [ 1] 730 ld a, (x) + 0088C0 CD 8E A9 [ 4] 731 call _ByteToBcd2 + 0088C3 6B 07 [ 1] 732 ld (0x07, sp), a + 0088C5 1E 03 [ 2] 733 ldw x, (0x03, sp) + 0088C7 F6 [ 1] 734 ld a, (x) + 0088C8 4E [ 1] 735 swap a + 0088C9 A4 F0 [ 1] 736 and a, #0xf0 + 0088CB 48 [ 1] 737 sll a + 0088CC 1A 07 [ 1] 738 or a, (0x07, sp) + 0088CE C7 51 45 [ 1] 739 ld 0x5145, a 740 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 932: RTC->DR3 = (uint8_t)(ByteToBcd2((uint8_t)RTC_DateStruct->RTC_Year)); - 008C5D 1E 05 [ 2] 741 ldw x, (0x05, sp) - 008C5F F6 [ 1] 742 ld a, (x) - 008C60 CD 92 35 [ 4] 743 call _ByteToBcd2 - 008C63 C7 51 46 [ 1] 744 ld 0x5146, a - 008C66 745 00109$: + 0088D1 1E 05 [ 2] 741 ldw x, (0x05, sp) + 0088D3 F6 [ 1] 742 ld a, (x) + 0088D4 CD 8E A9 [ 4] 743 call _ByteToBcd2 + 0088D7 C7 51 46 [ 1] 744 ld 0x5146, a + 0088DA 745 00109$: 746 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 936: RTC->ISR1 &= (uint8_t)~RTC_ISR1_INIT; - 008C66 72 1F 51 4C [ 1] 747 bres 0x514c, #7 + 0088DA 72 1F 51 4C [ 1] 747 bres 0x514c, #7 748 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 939: RTC->WPR = 0xFF; - 008C6A 35 FF 51 59 [ 1] 749 mov 0x5159+0, #0xff + 0088DE 35 FF 51 59 [ 1] 749 mov 0x5159+0, #0xff 750 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 942: if ((RTC->CR1 & RTC_CR1_BYPSHAD) == RESET) - 008C6E 72 08 51 48 0C [ 2] 751 btjt 0x5148, #4, 00114$ + 0088E2 72 08 51 48 0C [ 2] 751 btjt 0x5148, #4, 00114$ 752 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 944: if (RTC_WaitForSynchro() == ERROR) - 008C73 CD 8A 6D [ 4] 753 call _RTC_WaitForSynchro - 008C76 4D [ 1] 754 tnz a - 008C77 26 03 [ 1] 755 jrne 00111$ + 0088E7 CD 86 E1 [ 4] 753 call _RTC_WaitForSynchro + 0088EA 4D [ 1] 754 tnz a + 0088EB 26 03 [ 1] 755 jrne 00111$ 756 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 946: status = ERROR; - 008C79 4F [ 1] 757 clr a - 008C7A 20 05 [ 2] 758 jra 00118$ - 008C7C 759 00111$: + 0088ED 4F [ 1] 757 clr a + 0088EE 20 05 [ 2] 758 jra 00118$ + 0088F0 759 00111$: 760 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 950: status = SUCCESS; - 008C7C A6 01 [ 1] 761 ld a, #0x01 + 0088F0 A6 01 [ 1] 761 ld a, #0x01 762 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 955: status = SUCCESS; - 008C7E C5 763 .byte 0xc5 - 008C7F 764 00114$: - 008C7F A6 01 [ 1] 765 ld a, #0x01 - 008C81 766 00118$: + 0088F2 C5 763 .byte 0xc5 + 0088F3 764 00114$: + 0088F3 A6 01 [ 1] 765 ld a, #0x01 + 0088F5 766 00118$: 767 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 959: return (ErrorStatus)status; 768 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 960: } - 008C81 5B 0A [ 2] 769 addw sp, #10 - 008C83 81 [ 4] 770 ret + 0088F5 5B 0A [ 2] 769 addw sp, #10 + 0088F7 81 [ 4] 770 ret 771 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 968: void RTC_DateStructInit(RTC_DateTypeDef* RTC_DateStruct) 772 ; ----------------------------------------- 773 ; function RTC_DateStructInit 774 ; ----------------------------------------- - 008C84 775 _RTC_DateStructInit: - 008C84 51 [ 1] 776 exgw x, y + 0088F8 775 _RTC_DateStructInit: + 0088F8 51 [ 1] 776 exgw x, y 777 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 971: RTC_DateStruct->RTC_WeekDay = RTC_Weekday_Monday; - 008C85 A6 01 [ 1] 778 ld a, #0x01 - 008C87 90 F7 [ 1] 779 ld (y), a + 0088F9 A6 01 [ 1] 778 ld a, #0x01 + 0088FB 90 F7 [ 1] 779 ld (y), a 780 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 972: RTC_DateStruct->RTC_Date = 1; - 008C89 93 [ 1] 781 ldw x, y - 008C8A 5C [ 1] 782 incw x - 008C8B 5C [ 1] 783 incw x - 008C8C A6 01 [ 1] 784 ld a, #0x01 - 008C8E F7 [ 1] 785 ld (x), a + 0088FD 93 [ 1] 781 ldw x, y + 0088FE 5C [ 1] 782 incw x + 0088FF 5C [ 1] 783 incw x + 008900 A6 01 [ 1] 784 ld a, #0x01 + 008902 F7 [ 1] 785 ld (x), a 786 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 973: RTC_DateStruct->RTC_Month = RTC_Month_January; - 008C8F 93 [ 1] 787 ldw x, y - 008C90 5C [ 1] 788 incw x - 008C91 A6 01 [ 1] 789 ld a, #0x01 - 008C93 F7 [ 1] 790 ld (x), a + 008903 93 [ 1] 787 ldw x, y + 008904 5C [ 1] 788 incw x + 008905 A6 01 [ 1] 789 ld a, #0x01 + 008907 F7 [ 1] 790 ld (x), a 791 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 974: RTC_DateStruct->RTC_Year = 0; - 008C94 93 [ 1] 792 ldw x, y - 008C95 6F 03 [ 1] 793 clr (0x0003, x) + 008908 93 [ 1] 792 ldw x, y + 008909 6F 03 [ 1] 793 clr (0x0003, x) 794 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 975: } - 008C97 81 [ 4] 795 ret + 00890B 81 [ 4] 795 ret 796 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 988: void RTC_GetDate(RTC_Format_TypeDef RTC_Format, 797 ; ----------------------------------------- 798 ; function RTC_GetDate 799 ; ----------------------------------------- - 008C98 800 _RTC_GetDate: - 008C98 52 06 [ 2] 801 sub sp, #6 - 008C9A 6B 06 [ 1] 802 ld (0x06, sp), a - 008C9C 51 [ 1] 803 exgw x, y + 00890C 800 _RTC_GetDate: + 00890C 52 06 [ 2] 801 sub sp, #6 + 00890E 6B 06 [ 1] 802 ld (0x06, sp), a + 008910 51 [ 1] 803 exgw x, y 804 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 997: (void) (RTC->TR1) ; - 008C9D C6 51 40 [ 1] 805 ld a, 0x5140 + 008911 C6 51 40 [ 1] 805 ld a, 0x5140 806 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 998: RTC_DateStruct->RTC_Date = (uint8_t)(RTC->DR1); - 008CA0 93 [ 1] 807 ldw x, y - 008CA1 5C [ 1] 808 incw x - 008CA2 5C [ 1] 809 incw x - 008CA3 1F 01 [ 2] 810 ldw (0x01, sp), x - 008CA5 C6 51 44 [ 1] 811 ld a, 0x5144 - 008CA8 1E 01 [ 2] 812 ldw x, (0x01, sp) - 008CAA F7 [ 1] 813 ld (x), a + 008914 93 [ 1] 807 ldw x, y + 008915 5C [ 1] 808 incw x + 008916 5C [ 1] 809 incw x + 008917 1F 01 [ 2] 810 ldw (0x01, sp), x + 008919 C6 51 44 [ 1] 811 ld a, 0x5144 + 00891C 1E 01 [ 2] 812 ldw x, (0x01, sp) + 00891E F7 [ 1] 813 ld (x), a 814 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 999: tmpreg = (uint8_t)RTC->DR2; - 008CAB C6 51 45 [ 1] 815 ld a, 0x5145 - 008CAE 6B 03 [ 1] 816 ld (0x03, sp), a + 00891F C6 51 45 [ 1] 815 ld a, 0x5145 + 008922 6B 03 [ 1] 816 ld (0x03, sp), a 817 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1000: RTC_DateStruct->RTC_Year = (uint8_t)(RTC->DR3); - 008CB0 93 [ 1] 818 ldw x, y - 008CB1 1C 00 03 [ 2] 819 addw x, #0x0003 - 008CB4 1F 04 [ 2] 820 ldw (0x04, sp), x - 008CB6 C6 51 46 [ 1] 821 ld a, 0x5146 - 008CB9 1E 04 [ 2] 822 ldw x, (0x04, sp) - 008CBB F7 [ 1] 823 ld (x), a + 008924 93 [ 1] 818 ldw x, y + 008925 1C 00 03 [ 2] 819 addw x, #0x0003 + 008928 1F 04 [ 2] 820 ldw (0x04, sp), x + 00892A C6 51 46 [ 1] 821 ld a, 0x5146 + 00892D 1E 04 [ 2] 822 ldw x, (0x04, sp) + 00892F F7 [ 1] 823 ld (x), a 824 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1003: RTC_DateStruct->RTC_Month = (RTC_Month_TypeDef)(tmpreg & (uint8_t)(RTC_DR2_MT | RTC_DR2_MU)); - 008CBC 93 [ 1] 825 ldw x, y - 008CBD 5C [ 1] 826 incw x - 008CBE 7B 03 [ 1] 827 ld a, (0x03, sp) - 008CC0 A4 1F [ 1] 828 and a, #0x1f - 008CC2 F7 [ 1] 829 ld (x), a + 008930 93 [ 1] 825 ldw x, y + 008931 5C [ 1] 826 incw x + 008932 7B 03 [ 1] 827 ld a, (0x03, sp) + 008934 A4 1F [ 1] 828 and a, #0x1f + 008936 F7 [ 1] 829 ld (x), a 830 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1004: RTC_DateStruct->RTC_WeekDay = (RTC_Weekday_TypeDef)((uint8_t)((uint8_t)tmpreg & (uint8_t)(RTC_DR2_WDU)) >> (uint8_t)5); - 008CC3 7B 03 [ 1] 831 ld a, (0x03, sp) - 008CC5 A4 E0 [ 1] 832 and a, #0xe0 - 008CC7 4E [ 1] 833 swap a - 008CC8 A4 0F [ 1] 834 and a, #0x0f - 008CCA 44 [ 1] 835 srl a - 008CCB 90 F7 [ 1] 836 ld (y), a + 008937 7B 03 [ 1] 831 ld a, (0x03, sp) + 008939 A4 E0 [ 1] 832 and a, #0xe0 + 00893B 4E [ 1] 833 swap a + 00893C A4 0F [ 1] 834 and a, #0x0f + 00893E 44 [ 1] 835 srl a + 00893F 90 F7 [ 1] 836 ld (y), a 837 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1007: if (RTC_Format == RTC_Format_BIN) - 008CCD 0D 06 [ 1] 838 tnz (0x06, sp) - 008CCF 26 1D [ 1] 839 jrne 00103$ + 008941 0D 06 [ 1] 838 tnz (0x06, sp) + 008943 26 1D [ 1] 839 jrne 00103$ 840 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1010: RTC_DateStruct->RTC_Year = (uint8_t)Bcd2ToByte((uint8_t)RTC_DateStruct->RTC_Year); - 008CD1 16 04 [ 2] 841 ldw y, (0x04, sp) - 008CD3 90 F6 [ 1] 842 ld a, (y) - 008CD5 89 [ 2] 843 pushw x - 008CD6 CD 92 48 [ 4] 844 call _Bcd2ToByte - 008CD9 85 [ 2] 845 popw x - 008CDA 16 04 [ 2] 846 ldw y, (0x04, sp) - 008CDC 90 F7 [ 1] 847 ld (y), a + 008945 16 04 [ 2] 841 ldw y, (0x04, sp) + 008947 90 F6 [ 1] 842 ld a, (y) + 008949 89 [ 2] 843 pushw x + 00894A CD 8E BC [ 4] 844 call _Bcd2ToByte + 00894D 85 [ 2] 845 popw x + 00894E 16 04 [ 2] 846 ldw y, (0x04, sp) + 008950 90 F7 [ 1] 847 ld (y), a 848 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1011: RTC_DateStruct->RTC_Month = (RTC_Month_TypeDef)Bcd2ToByte((uint8_t)RTC_DateStruct->RTC_Month); - 008CDE F6 [ 1] 849 ld a, (x) - 008CDF 89 [ 2] 850 pushw x - 008CE0 CD 92 48 [ 4] 851 call _Bcd2ToByte - 008CE3 85 [ 2] 852 popw x - 008CE4 F7 [ 1] 853 ld (x), a + 008952 F6 [ 1] 849 ld a, (x) + 008953 89 [ 2] 850 pushw x + 008954 CD 8E BC [ 4] 851 call _Bcd2ToByte + 008957 85 [ 2] 852 popw x + 008958 F7 [ 1] 853 ld (x), a 854 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1012: RTC_DateStruct->RTC_Date = (uint8_t)(Bcd2ToByte((uint8_t)RTC_DateStruct->RTC_Date)); - 008CE5 1E 01 [ 2] 855 ldw x, (0x01, sp) - 008CE7 F6 [ 1] 856 ld a, (x) - 008CE8 CD 92 48 [ 4] 857 call _Bcd2ToByte - 008CEB 1E 01 [ 2] 858 ldw x, (0x01, sp) - 008CED F7 [ 1] 859 ld (x), a - 008CEE 860 00103$: + 008959 1E 01 [ 2] 855 ldw x, (0x01, sp) + 00895B F6 [ 1] 856 ld a, (x) + 00895C CD 8E BC [ 4] 857 call _Bcd2ToByte + 00895F 1E 01 [ 2] 858 ldw x, (0x01, sp) + 008961 F7 [ 1] 859 ld (x), a + 008962 860 00103$: 861 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1014: } - 008CEE 5B 06 [ 2] 862 addw sp, #6 - 008CF0 81 [ 4] 863 ret + 008962 5B 06 [ 2] 862 addw sp, #6 + 008964 81 [ 4] 863 ret 864 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1044: void RTC_SetAlarm(RTC_Format_TypeDef RTC_Format, 865 ; ----------------------------------------- 866 ; function RTC_SetAlarm 867 ; ----------------------------------------- - 008CF1 868 _RTC_SetAlarm: - 008CF1 52 11 [ 2] 869 sub sp, #17 - 008CF3 6B 11 [ 1] 870 ld (0x11, sp), a - 008CF5 51 [ 1] 871 exgw x, y + 008965 868 _RTC_SetAlarm: + 008965 52 11 [ 2] 869 sub sp, #17 + 008967 6B 11 [ 1] 870 ld (0x11, sp), a + 008969 51 [ 1] 871 exgw x, y 872 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1062: if ((RTC->CR1 & RTC_CR1_FMT) != RESET) - 008CF6 C6 51 48 [ 1] 873 ld a, 0x5148 + 00896A C6 51 48 [ 1] 873 ld a, 0x5148 874 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1094: if ((RTC_AlarmStruct->RTC_AlarmMask & RTC_AlarmMask_DateWeekDay) == RESET ) - 008CF9 93 [ 1] 875 ldw x, y - 008CFA 1C 00 04 [ 2] 876 addw x, #0x0004 - 008CFD 1F 05 [ 2] 877 ldw (0x05, sp), x + 00896D 93 [ 1] 875 ldw x, y + 00896E 1C 00 04 [ 2] 876 addw x, #0x0004 + 008971 1F 05 [ 2] 877 ldw (0x05, sp), x 878 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1108: RTC->WPR = 0xCA; - 008CFF 35 CA 51 59 [ 1] 879 mov 0x5159+0, #0xca + 008973 35 CA 51 59 [ 1] 879 mov 0x5159+0, #0xca 880 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1109: RTC->WPR = 0x53; - 008D03 35 53 51 59 [ 1] 881 mov 0x5159+0, #0x53 + 008977 35 53 51 59 [ 1] 881 mov 0x5159+0, #0x53 882 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1115: tmpreg1 = (uint8_t)((uint8_t)(RTC_AlarmStruct->RTC_AlarmTime.RTC_Seconds) | \ - 008D07 17 01 [ 2] 883 ldw (0x01, sp), y + 00897B 17 01 [ 2] 883 ldw (0x01, sp), y 884 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1118: tmpreg2 = (uint8_t)((uint8_t)(RTC_AlarmStruct->RTC_AlarmTime.RTC_Minutes) | \ - 008D09 93 [ 1] 885 ldw x, y - 008D0A 5C [ 1] 886 incw x - 008D0B 1F 03 [ 2] 887 ldw (0x03, sp), x + 00897D 93 [ 1] 885 ldw x, y + 00897E 5C [ 1] 886 incw x + 00897F 1F 03 [ 2] 887 ldw (0x03, sp), x 888 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1121: tmpreg3 = (uint8_t)((uint8_t)((uint8_t)(RTC_AlarmStruct->RTC_AlarmTime.RTC_Hours) | \ - 008D0D 17 07 [ 2] 889 ldw (0x07, sp), y - 008D0F 93 [ 1] 890 ldw x, y - 008D10 1C 00 03 [ 2] 891 addw x, #0x0003 - 008D13 1F 09 [ 2] 892 ldw (0x09, sp), x + 008981 17 07 [ 2] 889 ldw (0x07, sp), y + 008983 93 [ 1] 890 ldw x, y + 008984 1C 00 03 [ 2] 891 addw x, #0x0003 + 008987 1F 09 [ 2] 892 ldw (0x09, sp), x 893 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1125: tmpreg4 = (uint8_t)((uint8_t)((uint8_t)(RTC_AlarmStruct->RTC_AlarmDateWeekDay) | \ - 008D15 93 [ 1] 894 ldw x, y - 008D16 1C 00 06 [ 2] 895 addw x, #0x0006 - 008D19 1F 0B [ 2] 896 ldw (0x0b, sp), x - 008D1B 93 [ 1] 897 ldw x, y - 008D1C 1C 00 05 [ 2] 898 addw x, #0x0005 - 008D1F 1F 0D [ 2] 899 ldw (0x0d, sp), x + 008989 93 [ 1] 894 ldw x, y + 00898A 1C 00 06 [ 2] 895 addw x, #0x0006 + 00898D 1F 0B [ 2] 896 ldw (0x0b, sp), x + 00898F 93 [ 1] 897 ldw x, y + 008990 1C 00 05 [ 2] 898 addw x, #0x0005 + 008993 1F 0D [ 2] 899 ldw (0x0d, sp), x 900 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1115: tmpreg1 = (uint8_t)((uint8_t)(RTC_AlarmStruct->RTC_AlarmTime.RTC_Seconds) | \ - 008D21 1E 01 [ 2] 901 ldw x, (0x01, sp) - 008D23 E6 02 [ 1] 902 ld a, (0x2, x) - 008D25 6B 10 [ 1] 903 ld (0x10, sp), a + 008995 1E 01 [ 2] 901 ldw x, (0x01, sp) + 008997 E6 02 [ 1] 902 ld a, (0x2, x) + 008999 6B 10 [ 1] 903 ld (0x10, sp), a 904 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1113: if (RTC_Format != RTC_Format_BIN) - 008D27 0D 11 [ 1] 905 tnz (0x11, sp) - 008D29 27 47 [ 1] 906 jreq 00116$ + 00899B 0D 11 [ 1] 905 tnz (0x11, sp) + 00899D 27 47 [ 1] 906 jreq 00116$ 907 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1115: tmpreg1 = (uint8_t)((uint8_t)(RTC_AlarmStruct->RTC_AlarmTime.RTC_Seconds) | \ - 008D2B 1E 05 [ 2] 908 ldw x, (0x05, sp) - 008D2D F6 [ 1] 909 ld a, (x) - 008D2E 97 [ 1] 910 ld xl, a - 008D2F A4 80 [ 1] 911 and a, #0x80 - 008D31 1A 10 [ 1] 912 or a, (0x10, sp) - 008D33 6B 0F [ 1] 913 ld (0x0f, sp), a + 00899F 1E 05 [ 2] 908 ldw x, (0x05, sp) + 0089A1 F6 [ 1] 909 ld a, (x) + 0089A2 97 [ 1] 910 ld xl, a + 0089A3 A4 80 [ 1] 911 and a, #0x80 + 0089A5 1A 10 [ 1] 912 or a, (0x10, sp) + 0089A7 6B 0F [ 1] 913 ld (0x0f, sp), a 914 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1118: tmpreg2 = (uint8_t)((uint8_t)(RTC_AlarmStruct->RTC_AlarmTime.RTC_Minutes) | \ - 008D35 16 03 [ 2] 915 ldw y, (0x03, sp) - 008D37 90 F6 [ 1] 916 ld a, (y) - 008D39 6B 10 [ 1] 917 ld (0x10, sp), a - 008D3B 9F [ 1] 918 ld a, xl - 008D3C 48 [ 1] 919 sll a - 008D3D A4 80 [ 1] 920 and a, #0x80 - 008D3F 1A 10 [ 1] 921 or a, (0x10, sp) - 008D41 6B 10 [ 1] 922 ld (0x10, sp), a + 0089A9 16 03 [ 2] 915 ldw y, (0x03, sp) + 0089AB 90 F6 [ 1] 916 ld a, (y) + 0089AD 6B 10 [ 1] 917 ld (0x10, sp), a + 0089AF 9F [ 1] 918 ld a, xl + 0089B0 48 [ 1] 919 sll a + 0089B1 A4 80 [ 1] 920 and a, #0x80 + 0089B3 1A 10 [ 1] 921 or a, (0x10, sp) + 0089B5 6B 10 [ 1] 922 ld (0x10, sp), a 923 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1121: tmpreg3 = (uint8_t)((uint8_t)((uint8_t)(RTC_AlarmStruct->RTC_AlarmTime.RTC_Hours) | \ - 008D43 16 07 [ 2] 924 ldw y, (0x07, sp) - 008D45 90 F6 [ 1] 925 ld a, (y) - 008D47 6B 06 [ 1] 926 ld (0x06, sp), a - 008D49 16 09 [ 2] 927 ldw y, (0x09, sp) - 008D4B 90 F6 [ 1] 928 ld a, (y) - 008D4D 1A 06 [ 1] 929 or a, (0x06, sp) - 008D4F 6B 0A [ 1] 930 ld (0x0a, sp), a - 008D51 9F [ 1] 931 ld a, xl - 008D52 48 [ 1] 932 sll a - 008D53 48 [ 1] 933 sll a - 008D54 A4 80 [ 1] 934 and a, #0x80 - 008D56 1A 0A [ 1] 935 or a, (0x0a, sp) - 008D58 6B 0A [ 1] 936 ld (0x0a, sp), a + 0089B7 16 07 [ 2] 924 ldw y, (0x07, sp) + 0089B9 90 F6 [ 1] 925 ld a, (y) + 0089BB 6B 06 [ 1] 926 ld (0x06, sp), a + 0089BD 16 09 [ 2] 927 ldw y, (0x09, sp) + 0089BF 90 F6 [ 1] 928 ld a, (y) + 0089C1 1A 06 [ 1] 929 or a, (0x06, sp) + 0089C3 6B 0A [ 1] 930 ld (0x0a, sp), a + 0089C5 9F [ 1] 931 ld a, xl + 0089C6 48 [ 1] 932 sll a + 0089C7 48 [ 1] 933 sll a + 0089C8 A4 80 [ 1] 934 and a, #0x80 + 0089CA 1A 0A [ 1] 935 or a, (0x0a, sp) + 0089CC 6B 0A [ 1] 936 ld (0x0a, sp), a 937 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1125: tmpreg4 = (uint8_t)((uint8_t)((uint8_t)(RTC_AlarmStruct->RTC_AlarmDateWeekDay) | \ - 008D5A 16 0B [ 2] 938 ldw y, (0x0b, sp) - 008D5C 90 F6 [ 1] 939 ld a, (y) - 008D5E 6B 09 [ 1] 940 ld (0x09, sp), a - 008D60 16 0D [ 2] 941 ldw y, (0x0d, sp) - 008D62 90 F6 [ 1] 942 ld a, (y) - 008D64 1A 09 [ 1] 943 or a, (0x09, sp) - 008D66 6B 0E [ 1] 944 ld (0x0e, sp), a - 008D68 9F [ 1] 945 ld a, xl - 008D69 48 [ 1] 946 sll a - 008D6A 48 [ 1] 947 sll a - 008D6B 48 [ 1] 948 sll a - 008D6C A4 80 [ 1] 949 and a, #0x80 - 008D6E 1A 0E [ 1] 950 or a, (0x0e, sp) - 008D70 20 55 [ 2] 951 jra 00117$ - 008D72 952 00116$: + 0089CE 16 0B [ 2] 938 ldw y, (0x0b, sp) + 0089D0 90 F6 [ 1] 939 ld a, (y) + 0089D2 6B 09 [ 1] 940 ld (0x09, sp), a + 0089D4 16 0D [ 2] 941 ldw y, (0x0d, sp) + 0089D6 90 F6 [ 1] 942 ld a, (y) + 0089D8 1A 09 [ 1] 943 or a, (0x09, sp) + 0089DA 6B 0E [ 1] 944 ld (0x0e, sp), a + 0089DC 9F [ 1] 945 ld a, xl + 0089DD 48 [ 1] 946 sll a + 0089DE 48 [ 1] 947 sll a + 0089DF 48 [ 1] 948 sll a + 0089E0 A4 80 [ 1] 949 and a, #0x80 + 0089E2 1A 0E [ 1] 950 or a, (0x0e, sp) + 0089E4 20 55 [ 2] 951 jra 00117$ + 0089E6 952 00116$: 953 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1132: tmpreg1 = (uint8_t)((ByteToBcd2(RTC_AlarmStruct->RTC_AlarmTime.RTC_Seconds)) | \ - 008D72 7B 10 [ 1] 954 ld a, (0x10, sp) - 008D74 CD 92 35 [ 4] 955 call _ByteToBcd2 - 008D77 6B 10 [ 1] 956 ld (0x10, sp), a - 008D79 1E 05 [ 2] 957 ldw x, (0x05, sp) - 008D7B F6 [ 1] 958 ld a, (x) - 008D7C A4 80 [ 1] 959 and a, #0x80 - 008D7E 1A 10 [ 1] 960 or a, (0x10, sp) - 008D80 6B 0F [ 1] 961 ld (0x0f, sp), a + 0089E6 7B 10 [ 1] 954 ld a, (0x10, sp) + 0089E8 CD 8E A9 [ 4] 955 call _ByteToBcd2 + 0089EB 6B 10 [ 1] 956 ld (0x10, sp), a + 0089ED 1E 05 [ 2] 957 ldw x, (0x05, sp) + 0089EF F6 [ 1] 958 ld a, (x) + 0089F0 A4 80 [ 1] 959 and a, #0x80 + 0089F2 1A 10 [ 1] 960 or a, (0x10, sp) + 0089F4 6B 0F [ 1] 961 ld (0x0f, sp), a 962 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1135: tmpreg2 = (uint8_t)((ByteToBcd2(RTC_AlarmStruct->RTC_AlarmTime.RTC_Minutes)) | \ - 008D82 1E 03 [ 2] 963 ldw x, (0x03, sp) - 008D84 F6 [ 1] 964 ld a, (x) - 008D85 CD 92 35 [ 4] 965 call _ByteToBcd2 - 008D88 6B 10 [ 1] 966 ld (0x10, sp), a - 008D8A 1E 05 [ 2] 967 ldw x, (0x05, sp) - 008D8C F6 [ 1] 968 ld a, (x) - 008D8D 48 [ 1] 969 sll a - 008D8E A4 80 [ 1] 970 and a, #0x80 - 008D90 1A 10 [ 1] 971 or a, (0x10, sp) - 008D92 6B 10 [ 1] 972 ld (0x10, sp), a + 0089F6 1E 03 [ 2] 963 ldw x, (0x03, sp) + 0089F8 F6 [ 1] 964 ld a, (x) + 0089F9 CD 8E A9 [ 4] 965 call _ByteToBcd2 + 0089FC 6B 10 [ 1] 966 ld (0x10, sp), a + 0089FE 1E 05 [ 2] 967 ldw x, (0x05, sp) + 008A00 F6 [ 1] 968 ld a, (x) + 008A01 48 [ 1] 969 sll a + 008A02 A4 80 [ 1] 970 and a, #0x80 + 008A04 1A 10 [ 1] 971 or a, (0x10, sp) + 008A06 6B 10 [ 1] 972 ld (0x10, sp), a 973 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1138: tmpreg3 = (uint8_t)((uint8_t)((ByteToBcd2(RTC_AlarmStruct->RTC_AlarmTime.RTC_Hours)) | \ - 008D94 1E 07 [ 2] 974 ldw x, (0x07, sp) - 008D96 F6 [ 1] 975 ld a, (x) - 008D97 CD 92 35 [ 4] 976 call _ByteToBcd2 - 008D9A 6B 08 [ 1] 977 ld (0x08, sp), a - 008D9C 1E 09 [ 2] 978 ldw x, (0x09, sp) - 008D9E F6 [ 1] 979 ld a, (x) - 008D9F 1A 08 [ 1] 980 or a, (0x08, sp) - 008DA1 6B 0A [ 1] 981 ld (0x0a, sp), a - 008DA3 1E 05 [ 2] 982 ldw x, (0x05, sp) - 008DA5 F6 [ 1] 983 ld a, (x) - 008DA6 48 [ 1] 984 sll a - 008DA7 48 [ 1] 985 sll a - 008DA8 A4 80 [ 1] 986 and a, #0x80 - 008DAA 1A 0A [ 1] 987 or a, (0x0a, sp) - 008DAC 6B 0A [ 1] 988 ld (0x0a, sp), a + 008A08 1E 07 [ 2] 974 ldw x, (0x07, sp) + 008A0A F6 [ 1] 975 ld a, (x) + 008A0B CD 8E A9 [ 4] 976 call _ByteToBcd2 + 008A0E 6B 08 [ 1] 977 ld (0x08, sp), a + 008A10 1E 09 [ 2] 978 ldw x, (0x09, sp) + 008A12 F6 [ 1] 979 ld a, (x) + 008A13 1A 08 [ 1] 980 or a, (0x08, sp) + 008A15 6B 0A [ 1] 981 ld (0x0a, sp), a + 008A17 1E 05 [ 2] 982 ldw x, (0x05, sp) + 008A19 F6 [ 1] 983 ld a, (x) + 008A1A 48 [ 1] 984 sll a + 008A1B 48 [ 1] 985 sll a + 008A1C A4 80 [ 1] 986 and a, #0x80 + 008A1E 1A 0A [ 1] 987 or a, (0x0a, sp) + 008A20 6B 0A [ 1] 988 ld (0x0a, sp), a 989 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1142: tmpreg4 = (uint8_t)((uint8_t)((ByteToBcd2(RTC_AlarmStruct->RTC_AlarmDateWeekDay)) | \ - 008DAE 1E 0B [ 2] 990 ldw x, (0x0b, sp) - 008DB0 F6 [ 1] 991 ld a, (x) - 008DB1 CD 92 35 [ 4] 992 call _ByteToBcd2 - 008DB4 6B 0C [ 1] 993 ld (0x0c, sp), a - 008DB6 1E 0D [ 2] 994 ldw x, (0x0d, sp) - 008DB8 F6 [ 1] 995 ld a, (x) - 008DB9 1A 0C [ 1] 996 or a, (0x0c, sp) - 008DBB 6B 0E [ 1] 997 ld (0x0e, sp), a - 008DBD 1E 05 [ 2] 998 ldw x, (0x05, sp) - 008DBF F6 [ 1] 999 ld a, (x) - 008DC0 48 [ 1] 1000 sll a - 008DC1 48 [ 1] 1001 sll a - 008DC2 48 [ 1] 1002 sll a - 008DC3 A4 80 [ 1] 1003 and a, #0x80 - 008DC5 1A 0E [ 1] 1004 or a, (0x0e, sp) - 008DC7 1005 00117$: + 008A22 1E 0B [ 2] 990 ldw x, (0x0b, sp) + 008A24 F6 [ 1] 991 ld a, (x) + 008A25 CD 8E A9 [ 4] 992 call _ByteToBcd2 + 008A28 6B 0C [ 1] 993 ld (0x0c, sp), a + 008A2A 1E 0D [ 2] 994 ldw x, (0x0d, sp) + 008A2C F6 [ 1] 995 ld a, (x) + 008A2D 1A 0C [ 1] 996 or a, (0x0c, sp) + 008A2F 6B 0E [ 1] 997 ld (0x0e, sp), a + 008A31 1E 05 [ 2] 998 ldw x, (0x05, sp) + 008A33 F6 [ 1] 999 ld a, (x) + 008A34 48 [ 1] 1000 sll a + 008A35 48 [ 1] 1001 sll a + 008A36 48 [ 1] 1002 sll a + 008A37 A4 80 [ 1] 1003 and a, #0x80 + 008A39 1A 0E [ 1] 1004 or a, (0x0e, sp) + 008A3B 1005 00117$: 1006 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1148: RTC->ALRMAR1 = tmpreg1; - 008DC7 AE 51 5C [ 2] 1007 ldw x, #0x515c - 008DCA 88 [ 1] 1008 push a - 008DCB 7B 10 [ 1] 1009 ld a, (0x10, sp) - 008DCD F7 [ 1] 1010 ld (x), a - 008DCE 84 [ 1] 1011 pop a + 008A3B AE 51 5C [ 2] 1007 ldw x, #0x515c + 008A3E 88 [ 1] 1008 push a + 008A3F 7B 10 [ 1] 1009 ld a, (0x10, sp) + 008A41 F7 [ 1] 1010 ld (x), a + 008A42 84 [ 1] 1011 pop a 1012 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1149: RTC->ALRMAR2 = tmpreg2; - 008DCF AE 51 5D [ 2] 1013 ldw x, #0x515d - 008DD2 88 [ 1] 1014 push a - 008DD3 7B 11 [ 1] 1015 ld a, (0x11, sp) - 008DD5 F7 [ 1] 1016 ld (x), a - 008DD6 84 [ 1] 1017 pop a + 008A43 AE 51 5D [ 2] 1013 ldw x, #0x515d + 008A46 88 [ 1] 1014 push a + 008A47 7B 11 [ 1] 1015 ld a, (0x11, sp) + 008A49 F7 [ 1] 1016 ld (x), a + 008A4A 84 [ 1] 1017 pop a 1018 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1150: RTC->ALRMAR3 = tmpreg3; - 008DD7 AE 51 5E [ 2] 1019 ldw x, #0x515e - 008DDA 88 [ 1] 1020 push a - 008DDB 7B 0B [ 1] 1021 ld a, (0x0b, sp) - 008DDD F7 [ 1] 1022 ld (x), a - 008DDE 84 [ 1] 1023 pop a + 008A4B AE 51 5E [ 2] 1019 ldw x, #0x515e + 008A4E 88 [ 1] 1020 push a + 008A4F 7B 0B [ 1] 1021 ld a, (0x0b, sp) + 008A51 F7 [ 1] 1022 ld (x), a + 008A52 84 [ 1] 1023 pop a 1024 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1151: RTC->ALRMAR4 = tmpreg4; - 008DDF C7 51 5F [ 1] 1025 ld 0x515f, a + 008A53 C7 51 5F [ 1] 1025 ld 0x515f, a 1026 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1154: RTC->WPR = 0xFF; - 008DE2 35 FF 51 59 [ 1] 1027 mov 0x5159+0, #0xff + 008A56 35 FF 51 59 [ 1] 1027 mov 0x5159+0, #0xff 1028 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1155: } - 008DE6 5B 11 [ 2] 1029 addw sp, #17 - 008DE8 81 [ 4] 1030 ret + 008A5A 5B 11 [ 2] 1029 addw sp, #17 + 008A5C 81 [ 4] 1030 ret 1031 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1165: void RTC_AlarmStructInit(RTC_AlarmTypeDef* RTC_AlarmStruct) 1032 ; ----------------------------------------- 1033 ; function RTC_AlarmStructInit 1034 ; ----------------------------------------- - 008DE9 1035 _RTC_AlarmStructInit: + 008A5D 1035 _RTC_AlarmStructInit: 1036 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1168: RTC_AlarmStruct->RTC_AlarmTime.RTC_H12 = RTC_H12_AM; - 008DE9 90 93 [ 1] 1037 ldw y, x - 008DEB 6F 03 [ 1] 1038 clr (0x0003, x) + 008A5D 90 93 [ 1] 1037 ldw y, x + 008A5F 6F 03 [ 1] 1038 clr (0x0003, x) 1039 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1169: RTC_AlarmStruct->RTC_AlarmTime.RTC_Hours = 0; - 008DED 90 7F [ 1] 1040 clr (y) + 008A61 90 7F [ 1] 1040 clr (y) 1041 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1170: RTC_AlarmStruct->RTC_AlarmTime.RTC_Minutes = 0; - 008DEF 93 [ 1] 1042 ldw x, y - 008DF0 6F 01 [ 1] 1043 clr (0x01, x) + 008A63 93 [ 1] 1042 ldw x, y + 008A64 6F 01 [ 1] 1043 clr (0x01, x) 1044 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1171: RTC_AlarmStruct->RTC_AlarmTime.RTC_Seconds = 0; - 008DF2 93 [ 1] 1045 ldw x, y - 008DF3 6F 02 [ 1] 1046 clr (0x02, x) + 008A66 93 [ 1] 1045 ldw x, y + 008A67 6F 02 [ 1] 1046 clr (0x02, x) 1047 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1174: RTC_AlarmStruct->RTC_AlarmDateWeekDaySel = RTC_AlarmDateWeekDaySel_Date; - 008DF5 93 [ 1] 1048 ldw x, y - 008DF6 6F 05 [ 1] 1049 clr (0x0005, x) + 008A69 93 [ 1] 1048 ldw x, y + 008A6A 6F 05 [ 1] 1049 clr (0x0005, x) 1050 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1175: RTC_AlarmStruct->RTC_AlarmDateWeekDay = 1; - 008DF8 A6 01 [ 1] 1051 ld a, #0x01 - 008DFA 90 E7 06 [ 1] 1052 ld (0x0006, y), a + 008A6C A6 01 [ 1] 1051 ld a, #0x01 + 008A6E 90 E7 06 [ 1] 1052 ld (0x0006, y), a 1053 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1178: RTC_AlarmStruct->RTC_AlarmMask = RTC_AlarmMask_All; - 008DFD A6 F0 [ 1] 1054 ld a, #0xf0 - 008DFF 90 E7 04 [ 1] 1055 ld (0x0004, y), a + 008A71 A6 F0 [ 1] 1054 ld a, #0xf0 + 008A73 90 E7 04 [ 1] 1055 ld (0x0004, y), a 1056 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1179: } - 008E02 81 [ 4] 1057 ret + 008A76 81 [ 4] 1057 ret 1058 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1188: void RTC_GetAlarm(RTC_Format_TypeDef RTC_Format, 1059 ; ----------------------------------------- 1060 ; function RTC_GetAlarm 1061 ; ----------------------------------------- - 008E03 1062 _RTC_GetAlarm: - 008E03 52 0B [ 2] 1063 sub sp, #11 - 008E05 6B 0B [ 1] 1064 ld (0x0b, sp), a - 008E07 1F 09 [ 2] 1065 ldw (0x09, sp), x + 008A77 1062 _RTC_GetAlarm: + 008A77 52 0B [ 2] 1063 sub sp, #11 + 008A79 6B 0B [ 1] 1064 ld (0x0b, sp), a + 008A7B 1F 09 [ 2] 1065 ldw (0x09, sp), x 1066 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1201: tmpreg1 = (uint8_t)RTC->ALRMAR1; - 008E09 C6 51 5C [ 1] 1067 ld a, 0x515c - 008E0C 6B 08 [ 1] 1068 ld (0x08, sp), a + 008A7D C6 51 5C [ 1] 1067 ld a, 0x515c + 008A80 6B 08 [ 1] 1068 ld (0x08, sp), a 1069 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1202: tmpreg2 = (uint8_t)RTC->ALRMAR2; - 008E0E C6 51 5D [ 1] 1070 ld a, 0x515d - 008E11 6B 01 [ 1] 1071 ld (0x01, sp), a + 008A82 C6 51 5D [ 1] 1070 ld a, 0x515d + 008A85 6B 01 [ 1] 1071 ld (0x01, sp), a 1072 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1203: tmpreg3 = (uint8_t)RTC->ALRMAR3; - 008E13 C6 51 5E [ 1] 1073 ld a, 0x515e - 008E16 6B 02 [ 1] 1074 ld (0x02, sp), a + 008A87 C6 51 5E [ 1] 1073 ld a, 0x515e + 008A8A 6B 02 [ 1] 1074 ld (0x02, sp), a 1075 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1204: tmpreg4 = (uint8_t)RTC->ALRMAR4; - 008E18 C6 51 5F [ 1] 1076 ld a, 0x515f - 008E1B 6B 03 [ 1] 1077 ld (0x03, sp), a + 008A8C C6 51 5F [ 1] 1076 ld a, 0x515f + 008A8F 6B 03 [ 1] 1077 ld (0x03, sp), a 1078 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1207: RTC_AlarmStruct->RTC_AlarmTime.RTC_Seconds = (uint8_t)((uint8_t)tmpreg1 & (uint8_t)((uint8_t)RTC_ALRMAR1_ST | (uint8_t)RTC_ALRMAR1_SU)); - 008E1D 1E 09 [ 2] 1079 ldw x, (0x09, sp) - 008E1F 5C [ 1] 1080 incw x - 008E20 5C [ 1] 1081 incw x - 008E21 1F 04 [ 2] 1082 ldw (0x04, sp), x - 008E23 7B 08 [ 1] 1083 ld a, (0x08, sp) - 008E25 A4 7F [ 1] 1084 and a, #0x7f - 008E27 1E 04 [ 2] 1085 ldw x, (0x04, sp) - 008E29 F7 [ 1] 1086 ld (x), a + 008A91 1E 09 [ 2] 1079 ldw x, (0x09, sp) + 008A93 5C [ 1] 1080 incw x + 008A94 5C [ 1] 1081 incw x + 008A95 1F 04 [ 2] 1082 ldw (0x04, sp), x + 008A97 7B 08 [ 1] 1083 ld a, (0x08, sp) + 008A99 A4 7F [ 1] 1084 and a, #0x7f + 008A9B 1E 04 [ 2] 1085 ldw x, (0x04, sp) + 008A9D F7 [ 1] 1086 ld (x), a 1087 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1208: alarmmask = (uint8_t)(tmpreg1 & RTC_ALRMAR1_MSK1); - 008E2A 7B 08 [ 1] 1088 ld a, (0x08, sp) - 008E2C A4 80 [ 1] 1089 and a, #0x80 - 008E2E 6B 08 [ 1] 1090 ld (0x08, sp), a + 008A9E 7B 08 [ 1] 1088 ld a, (0x08, sp) + 008AA0 A4 80 [ 1] 1089 and a, #0x80 + 008AA2 6B 08 [ 1] 1090 ld (0x08, sp), a 1091 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1211: RTC_AlarmStruct->RTC_AlarmTime.RTC_Minutes = (uint8_t)((uint8_t)tmpreg2 & (uint8_t)((uint8_t)RTC_ALRMAR2_MNT | (uint8_t)RTC_ALRMAR2_MNU)); - 008E30 1E 09 [ 2] 1092 ldw x, (0x09, sp) - 008E32 5C [ 1] 1093 incw x - 008E33 1F 06 [ 2] 1094 ldw (0x06, sp), x - 008E35 7B 01 [ 1] 1095 ld a, (0x01, sp) - 008E37 A4 7F [ 1] 1096 and a, #0x7f - 008E39 1E 06 [ 2] 1097 ldw x, (0x06, sp) - 008E3B F7 [ 1] 1098 ld (x), a + 008AA4 1E 09 [ 2] 1092 ldw x, (0x09, sp) + 008AA6 5C [ 1] 1093 incw x + 008AA7 1F 06 [ 2] 1094 ldw (0x06, sp), x + 008AA9 7B 01 [ 1] 1095 ld a, (0x01, sp) + 008AAB A4 7F [ 1] 1096 and a, #0x7f + 008AAD 1E 06 [ 2] 1097 ldw x, (0x06, sp) + 008AAF F7 [ 1] 1098 ld (x), a 1099 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1212: alarmmask = (uint8_t)((alarmmask) | (uint8_t)((uint8_t)(tmpreg2 & RTC_ALRMAR2_MSK2) >> 1)); - 008E3C 7B 01 [ 1] 1100 ld a, (0x01, sp) - 008E3E A4 80 [ 1] 1101 and a, #0x80 - 008E40 44 [ 1] 1102 srl a - 008E41 1A 08 [ 1] 1103 or a, (0x08, sp) - 008E43 6B 08 [ 1] 1104 ld (0x08, sp), a + 008AB0 7B 01 [ 1] 1100 ld a, (0x01, sp) + 008AB2 A4 80 [ 1] 1101 and a, #0x80 + 008AB4 44 [ 1] 1102 srl a + 008AB5 1A 08 [ 1] 1103 or a, (0x08, sp) + 008AB7 6B 08 [ 1] 1104 ld (0x08, sp), a 1105 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1215: RTC_AlarmStruct->RTC_AlarmTime.RTC_Hours = (uint8_t)((uint8_t)tmpreg3 & (uint8_t)((uint8_t)RTC_ALRMAR3_HT | (uint8_t)RTC_ALRMAR3_HU)); - 008E45 16 09 [ 2] 1106 ldw y, (0x09, sp) - 008E47 7B 02 [ 1] 1107 ld a, (0x02, sp) - 008E49 A4 3F [ 1] 1108 and a, #0x3f - 008E4B 90 F7 [ 1] 1109 ld (y), a + 008AB9 16 09 [ 2] 1106 ldw y, (0x09, sp) + 008ABB 7B 02 [ 1] 1107 ld a, (0x02, sp) + 008ABD A4 3F [ 1] 1108 and a, #0x3f + 008ABF 90 F7 [ 1] 1109 ld (y), a 1110 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1216: RTC_AlarmStruct->RTC_AlarmTime.RTC_H12 = (RTC_H12_TypeDef)((uint8_t)tmpreg3 & (uint8_t)RTC_ALRMAR3_PM); - 008E4D 1E 09 [ 2] 1111 ldw x, (0x09, sp) - 008E4F 1C 00 03 [ 2] 1112 addw x, #0x0003 - 008E52 7B 02 [ 1] 1113 ld a, (0x02, sp) - 008E54 A4 40 [ 1] 1114 and a, #0x40 - 008E56 F7 [ 1] 1115 ld (x), a + 008AC1 1E 09 [ 2] 1111 ldw x, (0x09, sp) + 008AC3 1C 00 03 [ 2] 1112 addw x, #0x0003 + 008AC6 7B 02 [ 1] 1113 ld a, (0x02, sp) + 008AC8 A4 40 [ 1] 1114 and a, #0x40 + 008ACA F7 [ 1] 1115 ld (x), a 1116 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1217: alarmmask = (uint8_t)((alarmmask) | (uint8_t)((uint8_t)((uint8_t)tmpreg3 & (uint8_t)RTC_ALRMAR3_MSK3) >> 2)); - 008E57 7B 02 [ 1] 1117 ld a, (0x02, sp) - 008E59 A4 80 [ 1] 1118 and a, #0x80 - 008E5B 44 [ 1] 1119 srl a - 008E5C 44 [ 1] 1120 srl a - 008E5D 1A 08 [ 1] 1121 or a, (0x08, sp) - 008E5F 6B 08 [ 1] 1122 ld (0x08, sp), a + 008ACB 7B 02 [ 1] 1117 ld a, (0x02, sp) + 008ACD A4 80 [ 1] 1118 and a, #0x80 + 008ACF 44 [ 1] 1119 srl a + 008AD0 44 [ 1] 1120 srl a + 008AD1 1A 08 [ 1] 1121 or a, (0x08, sp) + 008AD3 6B 08 [ 1] 1122 ld (0x08, sp), a 1123 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1220: RTC_AlarmStruct->RTC_AlarmDateWeekDay = (uint8_t)((uint8_t)tmpreg4 & (uint8_t)((uint8_t)RTC_ALRMAR4_DT | (uint8_t)RTC_ALRMAR4_DU)); - 008E61 1E 09 [ 2] 1124 ldw x, (0x09, sp) - 008E63 1C 00 06 [ 2] 1125 addw x, #0x0006 - 008E66 1F 01 [ 2] 1126 ldw (0x01, sp), x - 008E68 7B 03 [ 1] 1127 ld a, (0x03, sp) - 008E6A A4 3F [ 1] 1128 and a, #0x3f - 008E6C 1E 01 [ 2] 1129 ldw x, (0x01, sp) - 008E6E F7 [ 1] 1130 ld (x), a + 008AD5 1E 09 [ 2] 1124 ldw x, (0x09, sp) + 008AD7 1C 00 06 [ 2] 1125 addw x, #0x0006 + 008ADA 1F 01 [ 2] 1126 ldw (0x01, sp), x + 008ADC 7B 03 [ 1] 1127 ld a, (0x03, sp) + 008ADE A4 3F [ 1] 1128 and a, #0x3f + 008AE0 1E 01 [ 2] 1129 ldw x, (0x01, sp) + 008AE2 F7 [ 1] 1130 ld (x), a 1131 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1221: RTC_AlarmStruct->RTC_AlarmDateWeekDaySel = (RTC_AlarmDateWeekDaySel_TypeDef)((uint8_t)tmpreg4 & (uint8_t)RTC_ALRMAR4_WDSEL); - 008E6F 1E 09 [ 2] 1132 ldw x, (0x09, sp) - 008E71 1C 00 05 [ 2] 1133 addw x, #0x0005 - 008E74 7B 03 [ 1] 1134 ld a, (0x03, sp) - 008E76 A4 40 [ 1] 1135 and a, #0x40 - 008E78 F7 [ 1] 1136 ld (x), a + 008AE3 1E 09 [ 2] 1132 ldw x, (0x09, sp) + 008AE5 1C 00 05 [ 2] 1133 addw x, #0x0005 + 008AE8 7B 03 [ 1] 1134 ld a, (0x03, sp) + 008AEA A4 40 [ 1] 1135 and a, #0x40 + 008AEC F7 [ 1] 1136 ld (x), a 1137 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1222: alarmmask = (uint8_t)((alarmmask) | (uint8_t)((uint8_t)((uint8_t)tmpreg4 & RTC_ALRMAR4_MSK4) >> 3)); - 008E79 7B 03 [ 1] 1138 ld a, (0x03, sp) - 008E7B A4 80 [ 1] 1139 and a, #0x80 - 008E7D 44 [ 1] 1140 srl a - 008E7E 44 [ 1] 1141 srl a - 008E7F 44 [ 1] 1142 srl a - 008E80 1A 08 [ 1] 1143 or a, (0x08, sp) + 008AED 7B 03 [ 1] 1138 ld a, (0x03, sp) + 008AEF A4 80 [ 1] 1139 and a, #0x80 + 008AF1 44 [ 1] 1140 srl a + 008AF2 44 [ 1] 1141 srl a + 008AF3 44 [ 1] 1142 srl a + 008AF4 1A 08 [ 1] 1143 or a, (0x08, sp) 1144 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1224: RTC_AlarmStruct->RTC_AlarmMask = alarmmask; - 008E82 1E 09 [ 2] 1145 ldw x, (0x09, sp) - 008E84 1C 00 04 [ 2] 1146 addw x, #0x0004 - 008E87 F7 [ 1] 1147 ld (x), a + 008AF6 1E 09 [ 2] 1145 ldw x, (0x09, sp) + 008AF8 1C 00 04 [ 2] 1146 addw x, #0x0004 + 008AFB F7 [ 1] 1147 ld (x), a 1148 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1226: if (RTC_Format == RTC_Format_BIN) - 008E88 0D 0B [ 1] 1149 tnz (0x0b, sp) - 008E8A 26 26 [ 1] 1150 jrne 00103$ + 008AFC 0D 0B [ 1] 1149 tnz (0x0b, sp) + 008AFE 26 26 [ 1] 1150 jrne 00103$ 1151 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1228: RTC_AlarmStruct->RTC_AlarmTime.RTC_Hours = Bcd2ToByte(RTC_AlarmStruct->RTC_AlarmTime.RTC_Hours); - 008E8C 90 F6 [ 1] 1152 ld a, (y) - 008E8E 90 89 [ 2] 1153 pushw y - 008E90 CD 92 48 [ 4] 1154 call _Bcd2ToByte - 008E93 90 85 [ 2] 1155 popw y - 008E95 90 F7 [ 1] 1156 ld (y), a + 008B00 90 F6 [ 1] 1152 ld a, (y) + 008B02 90 89 [ 2] 1153 pushw y + 008B04 CD 8E BC [ 4] 1154 call _Bcd2ToByte + 008B07 90 85 [ 2] 1155 popw y + 008B09 90 F7 [ 1] 1156 ld (y), a 1157 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1229: RTC_AlarmStruct->RTC_AlarmTime.RTC_Minutes = Bcd2ToByte(RTC_AlarmStruct->RTC_AlarmTime.RTC_Minutes); - 008E97 1E 06 [ 2] 1158 ldw x, (0x06, sp) - 008E99 F6 [ 1] 1159 ld a, (x) - 008E9A CD 92 48 [ 4] 1160 call _Bcd2ToByte - 008E9D 1E 06 [ 2] 1161 ldw x, (0x06, sp) - 008E9F F7 [ 1] 1162 ld (x), a + 008B0B 1E 06 [ 2] 1158 ldw x, (0x06, sp) + 008B0D F6 [ 1] 1159 ld a, (x) + 008B0E CD 8E BC [ 4] 1160 call _Bcd2ToByte + 008B11 1E 06 [ 2] 1161 ldw x, (0x06, sp) + 008B13 F7 [ 1] 1162 ld (x), a 1163 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1230: RTC_AlarmStruct->RTC_AlarmTime.RTC_Seconds = Bcd2ToByte(RTC_AlarmStruct->RTC_AlarmTime.RTC_Seconds); - 008EA0 1E 04 [ 2] 1164 ldw x, (0x04, sp) - 008EA2 F6 [ 1] 1165 ld a, (x) - 008EA3 CD 92 48 [ 4] 1166 call _Bcd2ToByte - 008EA6 1E 04 [ 2] 1167 ldw x, (0x04, sp) - 008EA8 F7 [ 1] 1168 ld (x), a + 008B14 1E 04 [ 2] 1164 ldw x, (0x04, sp) + 008B16 F6 [ 1] 1165 ld a, (x) + 008B17 CD 8E BC [ 4] 1166 call _Bcd2ToByte + 008B1A 1E 04 [ 2] 1167 ldw x, (0x04, sp) + 008B1C F7 [ 1] 1168 ld (x), a 1169 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1231: RTC_AlarmStruct->RTC_AlarmDateWeekDay = Bcd2ToByte(RTC_AlarmStruct->RTC_AlarmDateWeekDay); - 008EA9 1E 01 [ 2] 1170 ldw x, (0x01, sp) - 008EAB F6 [ 1] 1171 ld a, (x) - 008EAC CD 92 48 [ 4] 1172 call _Bcd2ToByte - 008EAF 1E 01 [ 2] 1173 ldw x, (0x01, sp) - 008EB1 F7 [ 1] 1174 ld (x), a - 008EB2 1175 00103$: + 008B1D 1E 01 [ 2] 1170 ldw x, (0x01, sp) + 008B1F F6 [ 1] 1171 ld a, (x) + 008B20 CD 8E BC [ 4] 1172 call _Bcd2ToByte + 008B23 1E 01 [ 2] 1173 ldw x, (0x01, sp) + 008B25 F7 [ 1] 1174 ld (x), a + 008B26 1175 00103$: 1176 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1233: } - 008EB2 5B 0B [ 2] 1177 addw sp, #11 - 008EB4 81 [ 4] 1178 ret + 008B26 5B 0B [ 2] 1177 addw sp, #11 + 008B28 81 [ 4] 1178 ret 1179 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1242: ErrorStatus RTC_AlarmCmd(FunctionalState NewState) 1180 ; ----------------------------------------- 1181 ; function RTC_AlarmCmd 1182 ; ----------------------------------------- - 008EB5 1183 _RTC_AlarmCmd: - 008EB5 52 03 [ 2] 1184 sub sp, #3 - 008EB7 6B 03 [ 1] 1185 ld (0x03, sp), a + 008B29 1183 _RTC_AlarmCmd: + 008B29 52 03 [ 2] 1184 sub sp, #3 + 008B2B 6B 03 [ 1] 1185 ld (0x03, sp), a 1186 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1244: __IO uint16_t alrawfcount = 0; - 008EB9 5F [ 1] 1187 clrw x - 008EBA 1F 01 [ 2] 1188 ldw (0x01, sp), x + 008B2D 5F [ 1] 1187 clrw x + 008B2E 1F 01 [ 2] 1188 ldw (0x01, sp), x 1189 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1252: RTC->WPR = 0xCA; - 008EBC 35 CA 51 59 [ 1] 1190 mov 0x5159+0, #0xca + 008B30 35 CA 51 59 [ 1] 1190 mov 0x5159+0, #0xca 1191 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1253: RTC->WPR = 0x53; - 008EC0 35 53 51 59 [ 1] 1192 mov 0x5159+0, #0x53 + 008B34 35 53 51 59 [ 1] 1192 mov 0x5159+0, #0x53 1193 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1258: RTC->CR2 |= (uint8_t)(RTC_CR2_ALRAE); - 008EC4 C6 51 49 [ 1] 1194 ld a, 0x5149 + 008B38 C6 51 49 [ 1] 1194 ld a, 0x5149 1195 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1256: if (NewState != DISABLE) - 008EC7 0D 03 [ 1] 1196 tnz (0x03, sp) - 008EC9 27 09 [ 1] 1197 jreq 00109$ + 008B3B 0D 03 [ 1] 1196 tnz (0x03, sp) + 008B3D 27 09 [ 1] 1197 jreq 00109$ 1198 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1258: RTC->CR2 |= (uint8_t)(RTC_CR2_ALRAE); - 008ECB AA 01 [ 1] 1199 or a, #0x01 - 008ECD C7 51 49 [ 1] 1200 ld 0x5149, a + 008B3F AA 01 [ 1] 1199 or a, #0x01 + 008B41 C7 51 49 [ 1] 1200 ld 0x5149, a 1201 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1259: status = SUCCESS; - 008ED0 A6 01 [ 1] 1202 ld a, #0x01 - 008ED2 20 22 [ 2] 1203 jra 00110$ - 008ED4 1204 00109$: + 008B44 A6 01 [ 1] 1202 ld a, #0x01 + 008B46 20 22 [ 2] 1203 jra 00110$ + 008B48 1204 00109$: 1205 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1263: RTC->CR2 &= (uint8_t)~(RTC_CR2_ALRAE) ; - 008ED4 A4 FE [ 1] 1206 and a, #0xfe - 008ED6 C7 51 49 [ 1] 1207 ld 0x5149, a + 008B48 A4 FE [ 1] 1206 and a, #0xfe + 008B4A C7 51 49 [ 1] 1207 ld 0x5149, a 1208 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1266: temp1 = (uint8_t)(RTC->ISR1 & RTC_ISR1_ALRAWF); - 008ED9 C6 51 4C [ 1] 1209 ld a, 0x514c - 008EDC A4 01 [ 1] 1210 and a, #0x01 + 008B4D C6 51 4C [ 1] 1209 ld a, 0x514c + 008B50 A4 01 [ 1] 1210 and a, #0x01 1211 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1267: while ((alrawfcount != ALRAWF_TIMEOUT) && (temp1 == RESET)) - 008EDE 1212 00102$: - 008EDE 1E 01 [ 2] 1213 ldw x, (0x01, sp) - 008EE0 5C [ 1] 1214 incw x - 008EE1 27 0A [ 1] 1215 jreq 00104$ - 008EE3 4D [ 1] 1216 tnz a - 008EE4 26 07 [ 1] 1217 jrne 00104$ + 008B52 1212 00102$: + 008B52 1E 01 [ 2] 1213 ldw x, (0x01, sp) + 008B54 5C [ 1] 1214 incw x + 008B55 27 0A [ 1] 1215 jreq 00104$ + 008B57 4D [ 1] 1216 tnz a + 008B58 26 07 [ 1] 1217 jrne 00104$ 1218 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1269: alrawfcount++; - 008EE6 1E 01 [ 2] 1219 ldw x, (0x01, sp) - 008EE8 5C [ 1] 1220 incw x - 008EE9 1F 01 [ 2] 1221 ldw (0x01, sp), x - 008EEB 20 F1 [ 2] 1222 jra 00102$ - 008EED 1223 00104$: + 008B5A 1E 01 [ 2] 1219 ldw x, (0x01, sp) + 008B5C 5C [ 1] 1220 incw x + 008B5D 1F 01 [ 2] 1221 ldw (0x01, sp), x + 008B5F 20 F1 [ 2] 1222 jra 00102$ + 008B61 1223 00104$: 1224 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1272: if ((RTC->ISR1 & RTC_ISR1_ALRAWF) == RESET) - 008EED 72 00 51 4C 02 [ 2] 1225 btjt 0x514c, #0, 00106$ + 008B61 72 00 51 4C 02 [ 2] 1225 btjt 0x514c, #0, 00106$ 1226 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1274: status = ERROR; - 008EF2 4F [ 1] 1227 clr a + 008B66 4F [ 1] 1227 clr a 1228 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1278: status = SUCCESS; - 008EF3 C5 1229 .byte 0xc5 - 008EF4 1230 00106$: - 008EF4 A6 01 [ 1] 1231 ld a, #0x01 - 008EF6 1232 00110$: + 008B67 C5 1229 .byte 0xc5 + 008B68 1230 00106$: + 008B68 A6 01 [ 1] 1231 ld a, #0x01 + 008B6A 1232 00110$: 1233 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1283: RTC->WPR = 0xFF; - 008EF6 35 FF 51 59 [ 1] 1234 mov 0x5159+0, #0xff + 008B6A 35 FF 51 59 [ 1] 1234 mov 0x5159+0, #0xff 1235 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1286: return (ErrorStatus)status; 1236 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1287: } - 008EFA 5B 03 [ 2] 1237 addw sp, #3 - 008EFC 81 [ 4] 1238 ret + 008B6E 5B 03 [ 2] 1237 addw sp, #3 + 008B70 81 [ 4] 1238 ret 1239 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1298: ErrorStatus RTC_AlarmSubSecondConfig(uint16_t RTC_AlarmSubSecondValue, 1240 ; ----------------------------------------- 1241 ; function RTC_AlarmSubSecondConfig 1242 ; ----------------------------------------- - 008EFD 1243 _RTC_AlarmSubSecondConfig: - 008EFD 89 [ 2] 1244 pushw x - 008EFE 6B 02 [ 1] 1245 ld (0x02, sp), a + 008B71 1243 _RTC_AlarmSubSecondConfig: + 008B71 89 [ 2] 1244 pushw x + 008B72 6B 02 [ 1] 1245 ld (0x02, sp), a 1246 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1309: RTC->WPR = 0xCA; - 008F00 35 CA 51 59 [ 1] 1247 mov 0x5159+0, #0xca + 008B74 35 CA 51 59 [ 1] 1247 mov 0x5159+0, #0xca 1248 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1310: RTC->WPR = 0x53; - 008F04 35 53 51 59 [ 1] 1249 mov 0x5159+0, #0x53 + 008B78 35 53 51 59 [ 1] 1249 mov 0x5159+0, #0x53 1250 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1313: if ((RTC->ISR1 & RTC_ISR1_INITF) == RESET) - 008F08 72 0C 51 4C 24 [ 2] 1251 btjt 0x514c, #6, 00102$ + 008B7C 72 0C 51 4C 24 [ 2] 1251 btjt 0x514c, #6, 00102$ 1252 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1316: alarmstatus = (uint8_t)(RTC->CR2 | RTC_CR2_ALRAE); - 008F0D C6 51 49 [ 1] 1253 ld a, 0x5149 - 008F10 AA 01 [ 1] 1254 or a, #0x01 - 008F12 6B 01 [ 1] 1255 ld (0x01, sp), a + 008B81 C6 51 49 [ 1] 1253 ld a, 0x5149 + 008B84 AA 01 [ 1] 1254 or a, #0x01 + 008B86 6B 01 [ 1] 1255 ld (0x01, sp), a 1256 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1319: RTC->CR2 &= (uint8_t)~(RTC_CR2_ALRAE); - 008F14 72 11 51 49 [ 1] 1257 bres 0x5149, #0 + 008B88 72 11 51 49 [ 1] 1257 bres 0x5149, #0 1258 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1322: RTC->ALRMASSRH = (uint8_t)(RTC_AlarmSubSecondValue >> 8); - 008F18 9E [ 1] 1259 ld a, xh - 008F19 C7 51 64 [ 1] 1260 ld 0x5164, a + 008B8C 9E [ 1] 1259 ld a, xh + 008B8D C7 51 64 [ 1] 1260 ld 0x5164, a 1261 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1323: RTC->ALRMASSRL = (uint8_t)(RTC_AlarmSubSecondValue); - 008F1C 9F [ 1] 1262 ld a, xl - 008F1D C7 51 65 [ 1] 1263 ld 0x5165, a + 008B90 9F [ 1] 1262 ld a, xl + 008B91 C7 51 65 [ 1] 1263 ld 0x5165, a 1264 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1324: RTC->ALRMASSMSKR = (uint8_t)RTC_AlarmSubSecondMask; - 008F20 AE 51 66 [ 2] 1265 ldw x, #0x5166 - 008F23 7B 02 [ 1] 1266 ld a, (0x02, sp) - 008F25 F7 [ 1] 1267 ld (x), a + 008B94 AE 51 66 [ 2] 1265 ldw x, #0x5166 + 008B97 7B 02 [ 1] 1266 ld a, (0x02, sp) + 008B99 F7 [ 1] 1267 ld (x), a 1268 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1327: RTC->CR2 |= alarmstatus; - 008F26 C6 51 49 [ 1] 1269 ld a, 0x5149 - 008F29 1A 01 [ 1] 1270 or a, (0x01, sp) - 008F2B C7 51 49 [ 1] 1271 ld 0x5149, a + 008B9A C6 51 49 [ 1] 1269 ld a, 0x5149 + 008B9D 1A 01 [ 1] 1270 or a, (0x01, sp) + 008B9F C7 51 49 [ 1] 1271 ld 0x5149, a 1272 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1329: status = SUCCESS; - 008F2E A6 01 [ 1] 1273 ld a, #0x01 + 008BA2 A6 01 [ 1] 1273 ld a, #0x01 1274 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1333: status = ERROR; - 008F30 21 1275 .byte 0x21 - 008F31 1276 00102$: - 008F31 4F [ 1] 1277 clr a - 008F32 1278 00103$: + 008BA4 21 1275 .byte 0x21 + 008BA5 1276 00102$: + 008BA5 4F [ 1] 1277 clr a + 008BA6 1278 00103$: 1279 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1337: RTC->WPR = 0xFF; - 008F32 35 FF 51 59 [ 1] 1280 mov 0x5159+0, #0xff + 008BA6 35 FF 51 59 [ 1] 1280 mov 0x5159+0, #0xff 1281 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1339: return (ErrorStatus)status; 1282 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1340: } - 008F36 85 [ 2] 1283 popw x - 008F37 81 [ 4] 1284 ret + 008BAA 85 [ 2] 1283 popw x + 008BAB 81 [ 4] 1284 ret 1285 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1369: void RTC_WakeUpClockConfig(RTC_WakeUpClock_TypeDef RTC_WakeUpClock) 1286 ; ----------------------------------------- 1287 ; function RTC_WakeUpClockConfig 1288 ; ----------------------------------------- - 008F38 1289 _RTC_WakeUpClockConfig: - 008F38 88 [ 1] 1290 push a - 008F39 6B 01 [ 1] 1291 ld (0x01, sp), a + 008BAC 1289 _RTC_WakeUpClockConfig: + 008BAC 88 [ 1] 1290 push a + 008BAD 6B 01 [ 1] 1291 ld (0x01, sp), a 1292 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1376: RTC->WPR = 0xCA; - 008F3B 35 CA 51 59 [ 1] 1293 mov 0x5159+0, #0xca + 008BAF 35 CA 51 59 [ 1] 1293 mov 0x5159+0, #0xca 1294 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1377: RTC->WPR = 0x53; - 008F3F 35 53 51 59 [ 1] 1295 mov 0x5159+0, #0x53 + 008BB3 35 53 51 59 [ 1] 1295 mov 0x5159+0, #0x53 1296 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1380: RTC->CR2 &= (uint8_t)~RTC_CR2_WUTE; - 008F43 72 15 51 49 [ 1] 1297 bres 0x5149, #2 + 008BB7 72 15 51 49 [ 1] 1297 bres 0x5149, #2 1298 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1383: RTC->CR1 &= (uint8_t)~RTC_CR1_WUCKSEL; - 008F47 C6 51 48 [ 1] 1299 ld a, 0x5148 - 008F4A A4 F8 [ 1] 1300 and a, #0xf8 - 008F4C C7 51 48 [ 1] 1301 ld 0x5148, a + 008BBB C6 51 48 [ 1] 1299 ld a, 0x5148 + 008BBE A4 F8 [ 1] 1300 and a, #0xf8 + 008BC0 C7 51 48 [ 1] 1301 ld 0x5148, a 1302 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1386: RTC->CR1 |= (uint8_t)RTC_WakeUpClock; - 008F4F C6 51 48 [ 1] 1303 ld a, 0x5148 - 008F52 1A 01 [ 1] 1304 or a, (0x01, sp) - 008F54 C7 51 48 [ 1] 1305 ld 0x5148, a + 008BC3 C6 51 48 [ 1] 1303 ld a, 0x5148 + 008BC6 1A 01 [ 1] 1304 or a, (0x01, sp) + 008BC8 C7 51 48 [ 1] 1305 ld 0x5148, a 1306 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1389: RTC->WPR = 0xFF; - 008F57 35 FF 51 59 [ 1] 1307 mov 0x5159+0, #0xff + 008BCB 35 FF 51 59 [ 1] 1307 mov 0x5159+0, #0xff 1308 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1390: } - 008F5B 84 [ 1] 1309 pop a - 008F5C 81 [ 4] 1310 ret + 008BCF 84 [ 1] 1309 pop a + 008BD0 81 [ 4] 1310 ret 1311 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1400: void RTC_SetWakeUpCounter(uint16_t RTC_WakeupCounter) 1312 ; ----------------------------------------- 1313 ; function RTC_SetWakeUpCounter 1314 ; ----------------------------------------- - 008F5D 1315 _RTC_SetWakeUpCounter: + 008BD1 1315 _RTC_SetWakeUpCounter: 1316 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1403: RTC->WPR = 0xCA; - 008F5D 35 CA 51 59 [ 1] 1317 mov 0x5159+0, #0xca + 008BD1 35 CA 51 59 [ 1] 1317 mov 0x5159+0, #0xca 1318 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1404: RTC->WPR = 0x53; - 008F61 35 53 51 59 [ 1] 1319 mov 0x5159+0, #0x53 + 008BD5 35 53 51 59 [ 1] 1319 mov 0x5159+0, #0x53 1320 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1408: RTC->WUTRH = (uint8_t)(RTC_WakeupCounter >> 8); - 008F65 9E [ 1] 1321 ld a, xh - 008F66 C7 51 54 [ 1] 1322 ld 0x5154, a + 008BD9 9E [ 1] 1321 ld a, xh + 008BDA C7 51 54 [ 1] 1322 ld 0x5154, a 1323 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1409: RTC->WUTRL = (uint8_t)(RTC_WakeupCounter); - 008F69 9F [ 1] 1324 ld a, xl - 008F6A C7 51 55 [ 1] 1325 ld 0x5155, a + 008BDD 9F [ 1] 1324 ld a, xl + 008BDE C7 51 55 [ 1] 1325 ld 0x5155, a 1326 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1412: RTC->WPR = 0xFF; - 008F6D 35 FF 51 59 [ 1] 1327 mov 0x5159+0, #0xff + 008BE1 35 FF 51 59 [ 1] 1327 mov 0x5159+0, #0xff 1328 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1413: } - 008F71 81 [ 4] 1329 ret + 008BE5 81 [ 4] 1329 ret 1330 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1420: uint16_t RTC_GetWakeUpCounter(void) 1331 ; ----------------------------------------- 1332 ; function RTC_GetWakeUpCounter 1333 ; ----------------------------------------- - 008F72 1334 _RTC_GetWakeUpCounter: - 008F72 89 [ 2] 1335 pushw x + 008BE6 1334 _RTC_GetWakeUpCounter: + 008BE6 89 [ 2] 1335 pushw x 1336 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1425: tmpreg = ((uint16_t)RTC->WUTRH) << 8; - 008F73 C6 51 54 [ 1] 1337 ld a, 0x5154 - 008F76 95 [ 1] 1338 ld xh, a - 008F77 0F 02 [ 1] 1339 clr (0x02, sp) + 008BE7 C6 51 54 [ 1] 1337 ld a, 0x5154 + 008BEA 95 [ 1] 1338 ld xh, a + 008BEB 0F 02 [ 1] 1339 clr (0x02, sp) 1340 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1426: tmpreg |= RTC->WUTRL; - 008F79 C6 51 55 [ 1] 1341 ld a, 0x5155 + 008BED C6 51 55 [ 1] 1341 ld a, 0x5155 1342 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1429: return (uint16_t)tmpreg; - 008F7C 97 [ 1] 1343 ld xl, a + 008BF0 97 [ 1] 1343 ld xl, a 1344 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1430: } - 008F7D 5B 02 [ 2] 1345 addw sp, #2 - 008F7F 81 [ 4] 1346 ret + 008BF1 5B 02 [ 2] 1345 addw sp, #2 + 008BF3 81 [ 4] 1346 ret 1347 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1440: ErrorStatus RTC_WakeUpCmd(FunctionalState NewState) 1348 ; ----------------------------------------- 1349 ; function RTC_WakeUpCmd 1350 ; ----------------------------------------- - 008F80 1351 _RTC_WakeUpCmd: - 008F80 88 [ 1] 1352 push a - 008F81 6B 01 [ 1] 1353 ld (0x01, sp), a + 008BF4 1351 _RTC_WakeUpCmd: + 008BF4 88 [ 1] 1352 push a + 008BF5 6B 01 [ 1] 1353 ld (0x01, sp), a 1354 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1449: RTC->WPR = 0xCA; - 008F83 35 CA 51 59 [ 1] 1355 mov 0x5159+0, #0xca + 008BF7 35 CA 51 59 [ 1] 1355 mov 0x5159+0, #0xca 1356 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1450: RTC->WPR = 0x53; - 008F87 35 53 51 59 [ 1] 1357 mov 0x5159+0, #0x53 + 008BFB 35 53 51 59 [ 1] 1357 mov 0x5159+0, #0x53 1358 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1455: RTC->CR2 |= (uint8_t)RTC_CR2_WUTE; - 008F8B C6 51 49 [ 1] 1359 ld a, 0x5149 + 008BFF C6 51 49 [ 1] 1359 ld a, 0x5149 1360 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1452: if (NewState != DISABLE) - 008F8E 0D 01 [ 1] 1361 tnz (0x01, sp) - 008F90 27 09 [ 1] 1362 jreq 00109$ + 008C02 0D 01 [ 1] 1361 tnz (0x01, sp) + 008C04 27 09 [ 1] 1362 jreq 00109$ 1363 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1455: RTC->CR2 |= (uint8_t)RTC_CR2_WUTE; - 008F92 AA 04 [ 1] 1364 or a, #0x04 - 008F94 C7 51 49 [ 1] 1365 ld 0x5149, a + 008C06 AA 04 [ 1] 1364 or a, #0x04 + 008C08 C7 51 49 [ 1] 1365 ld 0x5149, a 1366 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1457: status = SUCCESS; - 008F97 A6 01 [ 1] 1367 ld a, #0x01 - 008F99 20 1C [ 2] 1368 jra 00110$ - 008F9B 1369 00109$: + 008C0B A6 01 [ 1] 1367 ld a, #0x01 + 008C0D 20 1C [ 2] 1368 jra 00110$ + 008C0F 1369 00109$: 1370 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1462: RTC->CR2 &= (uint8_t)~RTC_CR2_WUTE; - 008F9B A4 FB [ 1] 1371 and a, #0xfb - 008F9D C7 51 49 [ 1] 1372 ld 0x5149, a + 008C0F A4 FB [ 1] 1371 and a, #0xfb + 008C11 C7 51 49 [ 1] 1372 ld 0x5149, a 1373 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1465: while (((RTC->ISR1 & RTC_ISR1_WUTWF) == RESET) && ( wutwfcount != WUTWF_TIMEOUT)) - 008FA0 5F [ 1] 1374 clrw x - 008FA1 1375 00102$: - 008FA1 72 04 51 4C 08 [ 2] 1376 btjt 0x514c, #2, 00104$ - 008FA6 A3 FF FF [ 2] 1377 cpw x, #0xffff - 008FA9 27 03 [ 1] 1378 jreq 00104$ + 008C14 5F [ 1] 1374 clrw x + 008C15 1375 00102$: + 008C15 72 04 51 4C 08 [ 2] 1376 btjt 0x514c, #2, 00104$ + 008C1A A3 FF FF [ 2] 1377 cpw x, #0xffff + 008C1D 27 03 [ 1] 1378 jreq 00104$ 1379 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1467: wutwfcount++; - 008FAB 5C [ 1] 1380 incw x - 008FAC 20 F3 [ 2] 1381 jra 00102$ - 008FAE 1382 00104$: + 008C1F 5C [ 1] 1380 incw x + 008C20 20 F3 [ 2] 1381 jra 00102$ + 008C22 1382 00104$: 1383 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1471: if ((RTC->ISR1 & RTC_ISR1_WUTWF) == RESET) - 008FAE 72 04 51 4C 02 [ 2] 1384 btjt 0x514c, #2, 00106$ + 008C22 72 04 51 4C 02 [ 2] 1384 btjt 0x514c, #2, 00106$ 1385 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1473: status = ERROR; - 008FB3 4F [ 1] 1386 clr a + 008C27 4F [ 1] 1386 clr a 1387 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1477: status = SUCCESS; - 008FB4 C5 1388 .byte 0xc5 - 008FB5 1389 00106$: - 008FB5 A6 01 [ 1] 1390 ld a, #0x01 - 008FB7 1391 00110$: + 008C28 C5 1388 .byte 0xc5 + 008C29 1389 00106$: + 008C29 A6 01 [ 1] 1390 ld a, #0x01 + 008C2B 1391 00110$: 1392 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1482: RTC->WPR = 0xFF; - 008FB7 35 FF 51 59 [ 1] 1393 mov 0x5159+0, #0xff + 008C2B 35 FF 51 59 [ 1] 1393 mov 0x5159+0, #0xff 1394 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1485: return (ErrorStatus)status; 1395 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1486: } - 008FBB 5B 01 [ 2] 1396 addw sp, #1 - 008FBD 81 [ 4] 1397 ret + 008C2F 5B 01 [ 2] 1396 addw sp, #1 + 008C31 81 [ 4] 1397 ret 1398 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1522: void RTC_DayLightSavingConfig(RTC_DayLightSaving_TypeDef RTC_DayLightSaving, 1399 ; ----------------------------------------- 1400 ; function RTC_DayLightSavingConfig 1401 ; ----------------------------------------- - 008FBE 1402 _RTC_DayLightSavingConfig: - 008FBE 88 [ 1] 1403 push a - 008FBF 97 [ 1] 1404 ld xl, a + 008C32 1402 _RTC_DayLightSavingConfig: + 008C32 88 [ 1] 1403 push a + 008C33 97 [ 1] 1404 ld xl, a 1405 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1530: RTC->WPR = 0xCA; - 008FC0 35 CA 51 59 [ 1] 1406 mov 0x5159+0, #0xca + 008C34 35 CA 51 59 [ 1] 1406 mov 0x5159+0, #0xca 1407 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1531: RTC->WPR = 0x53; - 008FC4 35 53 51 59 [ 1] 1408 mov 0x5159+0, #0x53 + 008C38 35 53 51 59 [ 1] 1408 mov 0x5159+0, #0x53 1409 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1534: RTC->CR3 &= (uint8_t)~(RTC_CR3_BCK); - 008FC8 C6 51 4A [ 1] 1410 ld a, 0x514a - 008FCB A4 FB [ 1] 1411 and a, #0xfb - 008FCD C7 51 4A [ 1] 1412 ld 0x514a, a + 008C3C C6 51 4A [ 1] 1410 ld a, 0x514a + 008C3F A4 FB [ 1] 1411 and a, #0xfb + 008C41 C7 51 4A [ 1] 1412 ld 0x514a, a 1413 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1537: RTC->CR3 |= (uint8_t)((uint8_t)RTC_DayLightSaving | (uint8_t)RTC_StoreOperation); - 008FD0 C6 51 4A [ 1] 1414 ld a, 0x514a - 008FD3 6B 01 [ 1] 1415 ld (0x01, sp), a - 008FD5 9F [ 1] 1416 ld a, xl - 008FD6 1A 04 [ 1] 1417 or a, (0x04, sp) - 008FD8 1A 01 [ 1] 1418 or a, (0x01, sp) - 008FDA C7 51 4A [ 1] 1419 ld 0x514a, a + 008C44 C6 51 4A [ 1] 1414 ld a, 0x514a + 008C47 6B 01 [ 1] 1415 ld (0x01, sp), a + 008C49 9F [ 1] 1416 ld a, xl + 008C4A 1A 04 [ 1] 1417 or a, (0x04, sp) + 008C4C 1A 01 [ 1] 1418 or a, (0x01, sp) + 008C4E C7 51 4A [ 1] 1419 ld 0x514a, a 1420 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1540: RTC->WPR = 0xFF; - 008FDD 35 FF 51 59 [ 1] 1421 mov 0x5159+0, #0xff + 008C51 35 FF 51 59 [ 1] 1421 mov 0x5159+0, #0xff 1422 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1541: } - 008FE1 84 [ 1] 1423 pop a - 008FE2 85 [ 2] 1424 popw x - 008FE3 84 [ 1] 1425 pop a - 008FE4 FC [ 2] 1426 jp (x) + 008C55 84 [ 1] 1423 pop a + 008C56 85 [ 2] 1424 popw x + 008C57 84 [ 1] 1425 pop a + 008C58 FC [ 2] 1426 jp (x) 1427 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1549: RTC_StoreOperation_TypeDef RTC_GetStoreOperation(void) 1428 ; ----------------------------------------- 1429 ; function RTC_GetStoreOperation 1430 ; ----------------------------------------- - 008FE5 1431 _RTC_GetStoreOperation: + 008C59 1431 _RTC_GetStoreOperation: 1432 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1552: return (RTC_StoreOperation_TypeDef)(RTC->CR3 & RTC_CR3_BCK); - 008FE5 C6 51 4A [ 1] 1433 ld a, 0x514a - 008FE8 A4 04 [ 1] 1434 and a, #0x04 + 008C59 C6 51 4A [ 1] 1433 ld a, 0x514a + 008C5C A4 04 [ 1] 1434 and a, #0x04 1435 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1553: } - 008FEA 81 [ 4] 1436 ret + 008C5E 81 [ 4] 1436 ret 1437 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1587: void RTC_OutputConfig(RTC_Output_TypeDef RTC_Output, 1438 ; ----------------------------------------- 1439 ; function RTC_OutputConfig 1440 ; ----------------------------------------- - 008FEB 1441 _RTC_OutputConfig: - 008FEB 88 [ 1] 1442 push a - 008FEC 97 [ 1] 1443 ld xl, a + 008C5F 1441 _RTC_OutputConfig: + 008C5F 88 [ 1] 1442 push a + 008C60 97 [ 1] 1443 ld xl, a 1444 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1595: RTC->WPR = 0xCA; - 008FED 35 CA 51 59 [ 1] 1445 mov 0x5159+0, #0xca + 008C61 35 CA 51 59 [ 1] 1445 mov 0x5159+0, #0xca 1446 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1596: RTC->WPR = 0x53; - 008FF1 35 53 51 59 [ 1] 1447 mov 0x5159+0, #0x53 + 008C65 35 53 51 59 [ 1] 1447 mov 0x5159+0, #0x53 1448 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1599: RTC->CR3 &= (uint8_t)~(RTC_CR3_OSEL | RTC_CR3_POL); - 008FF5 C6 51 4A [ 1] 1449 ld a, 0x514a - 008FF8 A4 8F [ 1] 1450 and a, #0x8f - 008FFA C7 51 4A [ 1] 1451 ld 0x514a, a + 008C69 C6 51 4A [ 1] 1449 ld a, 0x514a + 008C6C A4 8F [ 1] 1450 and a, #0x8f + 008C6E C7 51 4A [ 1] 1451 ld 0x514a, a 1452 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1602: RTC->CR3 |= (uint8_t)((uint8_t)RTC_Output | (uint8_t)RTC_OutputPolarity); - 008FFD C6 51 4A [ 1] 1453 ld a, 0x514a - 009000 6B 01 [ 1] 1454 ld (0x01, sp), a - 009002 9F [ 1] 1455 ld a, xl - 009003 1A 04 [ 1] 1456 or a, (0x04, sp) - 009005 1A 01 [ 1] 1457 or a, (0x01, sp) - 009007 C7 51 4A [ 1] 1458 ld 0x514a, a + 008C71 C6 51 4A [ 1] 1453 ld a, 0x514a + 008C74 6B 01 [ 1] 1454 ld (0x01, sp), a + 008C76 9F [ 1] 1455 ld a, xl + 008C77 1A 04 [ 1] 1456 or a, (0x04, sp) + 008C79 1A 01 [ 1] 1457 or a, (0x01, sp) + 008C7B C7 51 4A [ 1] 1458 ld 0x514a, a 1459 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1605: RTC->WPR = 0xFF; - 00900A 35 FF 51 59 [ 1] 1460 mov 0x5159+0, #0xff + 008C7E 35 FF 51 59 [ 1] 1460 mov 0x5159+0, #0xff 1461 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1606: } - 00900E 84 [ 1] 1462 pop a - 00900F 85 [ 2] 1463 popw x - 009010 84 [ 1] 1464 pop a - 009011 FC [ 2] 1465 jp (x) + 008C82 84 [ 1] 1462 pop a + 008C83 85 [ 2] 1463 popw x + 008C84 84 [ 1] 1464 pop a + 008C85 FC [ 2] 1465 jp (x) 1466 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1639: ErrorStatus RTC_SynchroShiftConfig(RTC_ShiftAdd1S_TypeDef RTC_ShiftAdd1S, 1467 ; ----------------------------------------- 1468 ; function RTC_SynchroShiftConfig 1469 ; ----------------------------------------- - 009012 1470 _RTC_SynchroShiftConfig: - 009012 88 [ 1] 1471 push a - 009013 6B 01 [ 1] 1472 ld (0x01, sp), a - 009015 51 [ 1] 1473 exgw x, y + 008C86 1470 _RTC_SynchroShiftConfig: + 008C86 88 [ 1] 1471 push a + 008C87 6B 01 [ 1] 1472 ld (0x01, sp), a + 008C89 51 [ 1] 1473 exgw x, y 1474 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1651: RTC->WPR = 0xCA; - 009016 35 CA 51 59 [ 1] 1475 mov 0x5159+0, #0xca + 008C8A 35 CA 51 59 [ 1] 1475 mov 0x5159+0, #0xca 1476 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1652: RTC->WPR = 0x53; - 00901A 35 53 51 59 [ 1] 1477 mov 0x5159+0, #0x53 + 008C8E 35 53 51 59 [ 1] 1477 mov 0x5159+0, #0x53 1478 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1655: if ((RTC->ISR1 & RTC_ISR1_SHPF) != RESET) - 00901E 72 07 51 4C 0E [ 2] 1479 btjf 0x514c, #3, 00106$ + 008C92 72 07 51 4C 0E [ 2] 1479 btjf 0x514c, #3, 00106$ 1480 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1658: while (((RTC->ISR1 & RTC_ISR1_SHPF) != RESET) && (shpfcount != SHPF_TIMEOUT)) - 009023 5F [ 1] 1481 clrw x - 009024 1482 00102$: - 009024 72 07 51 4C 08 [ 2] 1483 btjf 0x514c, #3, 00106$ - 009029 A3 FF FF [ 2] 1484 cpw x, #0xffff - 00902C 27 03 [ 1] 1485 jreq 00106$ + 008C97 5F [ 1] 1481 clrw x + 008C98 1482 00102$: + 008C98 72 07 51 4C 08 [ 2] 1483 btjf 0x514c, #3, 00106$ + 008C9D A3 FF FF [ 2] 1484 cpw x, #0xffff + 008CA0 27 03 [ 1] 1485 jreq 00106$ 1486 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1660: shpfcount++; - 00902E 5C [ 1] 1487 incw x - 00902F 20 F3 [ 2] 1488 jra 00102$ - 009031 1489 00106$: + 008CA2 5C [ 1] 1487 incw x + 008CA3 20 F3 [ 2] 1488 jra 00102$ + 008CA5 1489 00106$: 1490 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1665: if ((RTC->ISR1 & RTC_ISR1_SHPF) == RESET) - 009031 72 06 51 4C 0F [ 2] 1491 btjt 0x514c, #3, 00108$ + 008CA5 72 06 51 4C 0F [ 2] 1491 btjt 0x514c, #3, 00108$ 1492 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1668: shiftrhreg = (uint8_t)((uint8_t)(RTC_ShiftSubFS >> 8) | (uint8_t)(RTC_ShiftAdd1S)); - 009036 90 9E [ 1] 1493 ld a, yh - 009038 1A 01 [ 1] 1494 or a, (0x01, sp) + 008CAA 90 9E [ 1] 1493 ld a, yh + 008CAC 1A 01 [ 1] 1494 or a, (0x01, sp) 1495 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1669: RTC->SHIFTRH = (uint8_t)(shiftrhreg); - 00903A C7 51 5A [ 1] 1496 ld 0x515a, a + 008CAE C7 51 5A [ 1] 1496 ld 0x515a, a 1497 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1670: RTC->SHIFTRL = (uint8_t)(RTC_ShiftSubFS); - 00903D 90 9F [ 1] 1498 ld a, yl - 00903F C7 51 5B [ 1] 1499 ld 0x515b, a + 008CB1 90 9F [ 1] 1498 ld a, yl + 008CB3 C7 51 5B [ 1] 1499 ld 0x515b, a 1500 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1672: status = SUCCESS; - 009042 A6 01 [ 1] 1501 ld a, #0x01 + 008CB6 A6 01 [ 1] 1501 ld a, #0x01 1502 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1676: status = ERROR; - 009044 21 1503 .byte 0x21 - 009045 1504 00108$: - 009045 4F [ 1] 1505 clr a - 009046 1506 00109$: + 008CB8 21 1503 .byte 0x21 + 008CB9 1504 00108$: + 008CB9 4F [ 1] 1505 clr a + 008CBA 1506 00109$: 1507 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1680: RTC->WPR = 0xFF; - 009046 35 FF 51 59 [ 1] 1508 mov 0x5159+0, #0xff + 008CBA 35 FF 51 59 [ 1] 1508 mov 0x5159+0, #0xff 1509 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1682: return (ErrorStatus)(status); 1510 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1683: } - 00904A 5B 01 [ 2] 1511 addw sp, #1 - 00904C 81 [ 4] 1512 ret + 008CBE 5B 01 [ 2] 1511 addw sp, #1 + 008CC0 81 [ 4] 1512 ret 1513 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1718: ErrorStatus RTC_SmoothCalibConfig(RTC_SmoothCalibPeriod_TypeDef RTC_SmoothCalibPeriod, 1514 ; ----------------------------------------- 1515 ; function RTC_SmoothCalibConfig 1516 ; ----------------------------------------- - 00904D 1517 _RTC_SmoothCalibConfig: - 00904D 88 [ 1] 1518 push a - 00904E 90 97 [ 1] 1519 ld yl, a + 008CC1 1517 _RTC_SmoothCalibConfig: + 008CC1 88 [ 1] 1518 push a + 008CC2 90 97 [ 1] 1519 ld yl, a 1520 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1731: RTC->WPR = 0xCA; - 009050 35 CA 51 59 [ 1] 1521 mov 0x5159+0, #0xca + 008CC4 35 CA 51 59 [ 1] 1521 mov 0x5159+0, #0xca 1522 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1732: RTC->WPR = 0x53; - 009054 35 53 51 59 [ 1] 1523 mov 0x5159+0, #0x53 + 008CC8 35 53 51 59 [ 1] 1523 mov 0x5159+0, #0x53 1524 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1735: if ((RTC->ISR1 & RTC_ISR1_RECALPF) != RESET) - 009058 72 03 51 4C 0E [ 2] 1525 btjf 0x514c, #1, 00106$ + 008CCC 72 03 51 4C 0E [ 2] 1525 btjf 0x514c, #1, 00106$ 1526 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1738: while (((RTC->ISR1 & RTC_ISR1_RECALPF) != RESET) && (recalpfcount != RECALPF_TIMEOUT)) - 00905D 5F [ 1] 1527 clrw x - 00905E 1528 00102$: - 00905E 72 03 51 4C 08 [ 2] 1529 btjf 0x514c, #1, 00106$ - 009063 A3 FF FF [ 2] 1530 cpw x, #0xffff - 009066 27 03 [ 1] 1531 jreq 00106$ + 008CD1 5F [ 1] 1527 clrw x + 008CD2 1528 00102$: + 008CD2 72 03 51 4C 08 [ 2] 1529 btjf 0x514c, #1, 00106$ + 008CD7 A3 FF FF [ 2] 1530 cpw x, #0xffff + 008CDA 27 03 [ 1] 1531 jreq 00106$ 1532 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1740: recalpfcount++; - 009068 5C [ 1] 1533 incw x - 009069 20 F3 [ 2] 1534 jra 00102$ - 00906B 1535 00106$: + 008CDC 5C [ 1] 1533 incw x + 008CDD 20 F3 [ 2] 1534 jra 00102$ + 008CDF 1535 00106$: 1536 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1746: if ((RTC->ISR1 & RTC_ISR1_RECALPF) == RESET) - 00906B 72 02 51 4C 15 [ 2] 1537 btjt 0x514c, #1, 00108$ + 008CDF 72 02 51 4C 15 [ 2] 1537 btjt 0x514c, #1, 00108$ 1538 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1749: RTC->CALRH = (uint8_t)((uint8_t)((uint8_t)RTC_SmoothCalibPeriod | \ - 009070 90 9F [ 1] 1539 ld a, yl - 009072 1A 04 [ 1] 1540 or a, (0x04, sp) - 009074 6B 01 [ 1] 1541 ld (0x01, sp), a - 009076 7B 05 [ 1] 1542 ld a, (0x05, sp) - 009078 1A 01 [ 1] 1543 or a, (0x01, sp) - 00907A C7 51 6A [ 1] 1544 ld 0x516a, a + 008CE4 90 9F [ 1] 1539 ld a, yl + 008CE6 1A 04 [ 1] 1540 or a, (0x04, sp) + 008CE8 6B 01 [ 1] 1541 ld (0x01, sp), a + 008CEA 7B 05 [ 1] 1542 ld a, (0x05, sp) + 008CEC 1A 01 [ 1] 1543 or a, (0x01, sp) + 008CEE C7 51 6A [ 1] 1544 ld 0x516a, a 1545 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1752: RTC->CALRL = (uint8_t)(RTC_SmouthCalibMinusPulsesValue); - 00907D 7B 06 [ 1] 1546 ld a, (0x06, sp) - 00907F C7 51 6B [ 1] 1547 ld 0x516b, a + 008CF1 7B 06 [ 1] 1546 ld a, (0x06, sp) + 008CF3 C7 51 6B [ 1] 1547 ld 0x516b, a 1548 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1754: status = SUCCESS; - 009082 A6 01 [ 1] 1549 ld a, #0x01 + 008CF6 A6 01 [ 1] 1549 ld a, #0x01 1550 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1758: status = ERROR; - 009084 21 1551 .byte 0x21 - 009085 1552 00108$: - 009085 4F [ 1] 1553 clr a - 009086 1554 00109$: + 008CF8 21 1551 .byte 0x21 + 008CF9 1552 00108$: + 008CF9 4F [ 1] 1553 clr a + 008CFA 1554 00109$: 1555 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1762: RTC->WPR = 0xFF; - 009086 35 FF 51 59 [ 1] 1556 mov 0x5159+0, #0xff + 008CFA 35 FF 51 59 [ 1] 1556 mov 0x5159+0, #0xff 1557 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1764: return (ErrorStatus)(status); 1558 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1765: } - 00908A 1E 02 [ 2] 1559 ldw x, (2, sp) - 00908C 5B 06 [ 2] 1560 addw sp, #6 - 00908E FC [ 2] 1561 jp (x) + 008CFE 1E 02 [ 2] 1559 ldw x, (2, sp) + 008D00 5B 06 [ 2] 1560 addw sp, #6 + 008D02 FC [ 2] 1561 jp (x) 1562 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1790: void RTC_CalibOutputConfig(RTC_CalibOutput_TypeDef RTC_CalibOutput) 1563 ; ----------------------------------------- 1564 ; function RTC_CalibOutputConfig 1565 ; ----------------------------------------- - 00908F 1566 _RTC_CalibOutputConfig: - 00908F 88 [ 1] 1567 push a - 009090 6B 01 [ 1] 1568 ld (0x01, sp), a + 008D03 1566 _RTC_CalibOutputConfig: + 008D03 88 [ 1] 1567 push a + 008D04 6B 01 [ 1] 1568 ld (0x01, sp), a 1569 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1796: RTC->WPR = 0xCA; - 009092 35 CA 51 59 [ 1] 1570 mov 0x5159+0, #0xca + 008D06 35 CA 51 59 [ 1] 1570 mov 0x5159+0, #0xca 1571 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1797: RTC->WPR = 0x53; - 009096 35 53 51 59 [ 1] 1572 mov 0x5159+0, #0x53 + 008D0A 35 53 51 59 [ 1] 1572 mov 0x5159+0, #0x53 1573 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1802: RTC->CR3 |= (uint8_t)RTC_CR3_COSEL; - 00909A C6 51 4A [ 1] 1574 ld a, 0x514a + 008D0E C6 51 4A [ 1] 1574 ld a, 0x514a 1575 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1799: if (RTC_CalibOutput != RTC_CalibOutput_512Hz) - 00909D 0D 01 [ 1] 1576 tnz (0x01, sp) - 00909F 27 07 [ 1] 1577 jreq 00102$ + 008D11 0D 01 [ 1] 1576 tnz (0x01, sp) + 008D13 27 07 [ 1] 1577 jreq 00102$ 1578 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1802: RTC->CR3 |= (uint8_t)RTC_CR3_COSEL; - 0090A1 AA 08 [ 1] 1579 or a, #0x08 - 0090A3 C7 51 4A [ 1] 1580 ld 0x514a, a - 0090A6 20 05 [ 2] 1581 jra 00103$ - 0090A8 1582 00102$: + 008D15 AA 08 [ 1] 1579 or a, #0x08 + 008D17 C7 51 4A [ 1] 1580 ld 0x514a, a + 008D1A 20 05 [ 2] 1581 jra 00103$ + 008D1C 1582 00102$: 1583 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1807: RTC->CR3 &= (uint8_t)~RTC_CR3_COSEL; - 0090A8 A4 F7 [ 1] 1584 and a, #0xf7 - 0090AA C7 51 4A [ 1] 1585 ld 0x514a, a - 0090AD 1586 00103$: + 008D1C A4 F7 [ 1] 1584 and a, #0xf7 + 008D1E C7 51 4A [ 1] 1585 ld 0x514a, a + 008D21 1586 00103$: 1587 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1811: RTC->WPR = 0xFF; - 0090AD 35 FF 51 59 [ 1] 1588 mov 0x5159+0, #0xff + 008D21 35 FF 51 59 [ 1] 1588 mov 0x5159+0, #0xff 1589 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1812: } - 0090B1 84 [ 1] 1590 pop a - 0090B2 81 [ 4] 1591 ret + 008D25 84 [ 1] 1590 pop a + 008D26 81 [ 4] 1591 ret 1592 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1820: void RTC_CalibOutputCmd(FunctionalState NewState) 1593 ; ----------------------------------------- 1594 ; function RTC_CalibOutputCmd 1595 ; ----------------------------------------- - 0090B3 1596 _RTC_CalibOutputCmd: - 0090B3 88 [ 1] 1597 push a - 0090B4 6B 01 [ 1] 1598 ld (0x01, sp), a + 008D27 1596 _RTC_CalibOutputCmd: + 008D27 88 [ 1] 1597 push a + 008D28 6B 01 [ 1] 1598 ld (0x01, sp), a 1599 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1826: RTC->WPR = 0xCA; - 0090B6 35 CA 51 59 [ 1] 1600 mov 0x5159+0, #0xca + 008D2A 35 CA 51 59 [ 1] 1600 mov 0x5159+0, #0xca 1601 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1827: RTC->WPR = 0x53; - 0090BA 35 53 51 59 [ 1] 1602 mov 0x5159+0, #0x53 + 008D2E 35 53 51 59 [ 1] 1602 mov 0x5159+0, #0x53 1603 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1832: RTC->CR3 |= (uint8_t)RTC_CR3_COE; - 0090BE C6 51 4A [ 1] 1604 ld a, 0x514a + 008D32 C6 51 4A [ 1] 1604 ld a, 0x514a 1605 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1829: if (NewState != DISABLE) - 0090C1 0D 01 [ 1] 1606 tnz (0x01, sp) - 0090C3 27 07 [ 1] 1607 jreq 00102$ + 008D35 0D 01 [ 1] 1606 tnz (0x01, sp) + 008D37 27 07 [ 1] 1607 jreq 00102$ 1608 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1832: RTC->CR3 |= (uint8_t)RTC_CR3_COE; - 0090C5 AA 80 [ 1] 1609 or a, #0x80 - 0090C7 C7 51 4A [ 1] 1610 ld 0x514a, a - 0090CA 20 05 [ 2] 1611 jra 00103$ - 0090CC 1612 00102$: + 008D39 AA 80 [ 1] 1609 or a, #0x80 + 008D3B C7 51 4A [ 1] 1610 ld 0x514a, a + 008D3E 20 05 [ 2] 1611 jra 00103$ + 008D40 1612 00102$: 1613 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1837: RTC->CR3 &= (uint8_t)~RTC_CR3_COE; - 0090CC A4 7F [ 1] 1614 and a, #0x7f - 0090CE C7 51 4A [ 1] 1615 ld 0x514a, a - 0090D1 1616 00103$: + 008D40 A4 7F [ 1] 1614 and a, #0x7f + 008D42 C7 51 4A [ 1] 1615 ld 0x514a, a + 008D45 1616 00103$: 1617 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1841: RTC->WPR = 0xFF; - 0090D1 35 FF 51 59 [ 1] 1618 mov 0x5159+0, #0xff + 008D45 35 FF 51 59 [ 1] 1618 mov 0x5159+0, #0xff 1619 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1842: } - 0090D5 84 [ 1] 1620 pop a - 0090D6 81 [ 4] 1621 ret + 008D49 84 [ 1] 1620 pop a + 008D4A 81 [ 4] 1621 ret 1622 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1871: void RTC_TamperLevelConfig(RTC_Tamper_TypeDef RTC_Tamper, 1623 ; ----------------------------------------- 1624 ; function RTC_TamperLevelConfig 1625 ; ----------------------------------------- - 0090D7 1626 _RTC_TamperLevelConfig: - 0090D7 88 [ 1] 1627 push a - 0090D8 97 [ 1] 1628 ld xl, a + 008D4B 1626 _RTC_TamperLevelConfig: + 008D4B 88 [ 1] 1627 push a + 008D4C 97 [ 1] 1628 ld xl, a 1629 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1879: RTC->WPR = 0xCA; - 0090D9 35 CA 51 59 [ 1] 1630 mov 0x5159+0, #0xca + 008D4D 35 CA 51 59 [ 1] 1630 mov 0x5159+0, #0xca 1631 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1880: RTC->WPR = 0x53; - 0090DD 35 53 51 59 [ 1] 1632 mov 0x5159+0, #0x53 + 008D51 35 53 51 59 [ 1] 1632 mov 0x5159+0, #0x53 1633 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1885: RTC->TCR1 |= (uint8_t)(RTC_Tamper << 1); - 0090E1 C6 51 6C [ 1] 1634 ld a, 0x516c - 0090E4 6B 01 [ 1] 1635 ld (0x01, sp), a - 0090E6 9F [ 1] 1636 ld a, xl - 0090E7 48 [ 1] 1637 sll a + 008D55 C6 51 6C [ 1] 1634 ld a, 0x516c + 008D58 6B 01 [ 1] 1635 ld (0x01, sp), a + 008D5A 9F [ 1] 1636 ld a, xl + 008D5B 48 [ 1] 1637 sll a 1638 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1882: if (RTC_TamperLevel != RTC_TamperLevel_Low) - 0090E8 0D 04 [ 1] 1639 tnz (0x04, sp) - 0090EA 27 07 [ 1] 1640 jreq 00102$ + 008D5C 0D 04 [ 1] 1639 tnz (0x04, sp) + 008D5E 27 07 [ 1] 1640 jreq 00102$ 1641 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1885: RTC->TCR1 |= (uint8_t)(RTC_Tamper << 1); - 0090EC 1A 01 [ 1] 1642 or a, (0x01, sp) - 0090EE C7 51 6C [ 1] 1643 ld 0x516c, a - 0090F1 20 06 [ 2] 1644 jra 00103$ - 0090F3 1645 00102$: + 008D60 1A 01 [ 1] 1642 or a, (0x01, sp) + 008D62 C7 51 6C [ 1] 1643 ld 0x516c, a + 008D65 20 06 [ 2] 1644 jra 00103$ + 008D67 1645 00102$: 1646 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1890: RTC->TCR1 &= (uint8_t)~(uint8_t)(RTC_Tamper << 1); - 0090F3 43 [ 1] 1647 cpl a - 0090F4 14 01 [ 1] 1648 and a, (0x01, sp) - 0090F6 C7 51 6C [ 1] 1649 ld 0x516c, a - 0090F9 1650 00103$: + 008D67 43 [ 1] 1647 cpl a + 008D68 14 01 [ 1] 1648 and a, (0x01, sp) + 008D6A C7 51 6C [ 1] 1649 ld 0x516c, a + 008D6D 1650 00103$: 1651 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1894: RTC->WPR = 0xFF; - 0090F9 35 FF 51 59 [ 1] 1652 mov 0x5159+0, #0xff + 008D6D 35 FF 51 59 [ 1] 1652 mov 0x5159+0, #0xff 1653 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1895: } - 0090FD 84 [ 1] 1654 pop a - 0090FE 85 [ 2] 1655 popw x - 0090FF 84 [ 1] 1656 pop a - 009100 FC [ 2] 1657 jp (x) + 008D71 84 [ 1] 1654 pop a + 008D72 85 [ 2] 1655 popw x + 008D73 84 [ 1] 1656 pop a + 008D74 FC [ 2] 1657 jp (x) 1658 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1903: void RTC_TamperFilterConfig(RTC_TamperFilter_TypeDef RTC_TamperFilter) 1659 ; ----------------------------------------- 1660 ; function RTC_TamperFilterConfig 1661 ; ----------------------------------------- - 009101 1662 _RTC_TamperFilterConfig: - 009101 88 [ 1] 1663 push a - 009102 6B 01 [ 1] 1664 ld (0x01, sp), a + 008D75 1662 _RTC_TamperFilterConfig: + 008D75 88 [ 1] 1663 push a + 008D76 6B 01 [ 1] 1664 ld (0x01, sp), a 1665 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1910: RTC->WPR = 0xCA; - 009104 35 CA 51 59 [ 1] 1666 mov 0x5159+0, #0xca + 008D78 35 CA 51 59 [ 1] 1666 mov 0x5159+0, #0xca 1667 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1911: RTC->WPR = 0x53; - 009108 35 53 51 59 [ 1] 1668 mov 0x5159+0, #0x53 + 008D7C 35 53 51 59 [ 1] 1668 mov 0x5159+0, #0x53 1669 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1914: RTC->TCR2 &= (uint8_t)~(RTC_TCR2_TAMPFLT); - 00910C C6 51 6D [ 1] 1670 ld a, 0x516d - 00910F A4 E7 [ 1] 1671 and a, #0xe7 - 009111 C7 51 6D [ 1] 1672 ld 0x516d, a + 008D80 C6 51 6D [ 1] 1670 ld a, 0x516d + 008D83 A4 E7 [ 1] 1671 and a, #0xe7 + 008D85 C7 51 6D [ 1] 1672 ld 0x516d, a 1673 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1917: RTC->TCR2 |= (uint8_t)RTC_TamperFilter; - 009114 C6 51 6D [ 1] 1674 ld a, 0x516d - 009117 1A 01 [ 1] 1675 or a, (0x01, sp) - 009119 C7 51 6D [ 1] 1676 ld 0x516d, a + 008D88 C6 51 6D [ 1] 1674 ld a, 0x516d + 008D8B 1A 01 [ 1] 1675 or a, (0x01, sp) + 008D8D C7 51 6D [ 1] 1676 ld 0x516d, a 1677 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1920: RTC->WPR = 0xFF; - 00911C 35 FF 51 59 [ 1] 1678 mov 0x5159+0, #0xff + 008D90 35 FF 51 59 [ 1] 1678 mov 0x5159+0, #0xff 1679 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1922: } - 009120 84 [ 1] 1680 pop a - 009121 81 [ 4] 1681 ret + 008D94 84 [ 1] 1680 pop a + 008D95 81 [ 4] 1681 ret 1682 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1931: void RTC_TamperSamplingFreqConfig(RTC_TamperSamplingFreq_TypeDef RTC_TamperSamplingFreq) 1683 ; ----------------------------------------- 1684 ; function RTC_TamperSamplingFreqConfig 1685 ; ----------------------------------------- - 009122 1686 _RTC_TamperSamplingFreqConfig: - 009122 88 [ 1] 1687 push a - 009123 6B 01 [ 1] 1688 ld (0x01, sp), a + 008D96 1686 _RTC_TamperSamplingFreqConfig: + 008D96 88 [ 1] 1687 push a + 008D97 6B 01 [ 1] 1688 ld (0x01, sp), a 1689 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1937: RTC->WPR = 0xCA; - 009125 35 CA 51 59 [ 1] 1690 mov 0x5159+0, #0xca + 008D99 35 CA 51 59 [ 1] 1690 mov 0x5159+0, #0xca 1691 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1938: RTC->WPR = 0x53; - 009129 35 53 51 59 [ 1] 1692 mov 0x5159+0, #0x53 + 008D9D 35 53 51 59 [ 1] 1692 mov 0x5159+0, #0x53 1693 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1941: RTC->TCR2 &= (uint8_t)~(RTC_TCR2_TAMPFREQ); - 00912D C6 51 6D [ 1] 1694 ld a, 0x516d - 009130 A4 F8 [ 1] 1695 and a, #0xf8 - 009132 C7 51 6D [ 1] 1696 ld 0x516d, a + 008DA1 C6 51 6D [ 1] 1694 ld a, 0x516d + 008DA4 A4 F8 [ 1] 1695 and a, #0xf8 + 008DA6 C7 51 6D [ 1] 1696 ld 0x516d, a 1697 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1944: RTC->TCR2 |= (uint8_t)RTC_TamperSamplingFreq; - 009135 C6 51 6D [ 1] 1698 ld a, 0x516d - 009138 1A 01 [ 1] 1699 or a, (0x01, sp) - 00913A C7 51 6D [ 1] 1700 ld 0x516d, a + 008DA9 C6 51 6D [ 1] 1698 ld a, 0x516d + 008DAC 1A 01 [ 1] 1699 or a, (0x01, sp) + 008DAE C7 51 6D [ 1] 1700 ld 0x516d, a 1701 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1947: RTC->WPR = 0xFF; - 00913D 35 FF 51 59 [ 1] 1702 mov 0x5159+0, #0xff + 008DB1 35 FF 51 59 [ 1] 1702 mov 0x5159+0, #0xff 1703 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1948: } - 009141 84 [ 1] 1704 pop a - 009142 81 [ 4] 1705 ret + 008DB5 84 [ 1] 1704 pop a + 008DB6 81 [ 4] 1705 ret 1706 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1958: void RTC_TamperPinsPrechargeDuration(RTC_TamperPrechargeDuration_TypeDef RTC_TamperPrechargeDuration) 1707 ; ----------------------------------------- 1708 ; function RTC_TamperPinsPrechargeDuration 1709 ; ----------------------------------------- - 009143 1710 _RTC_TamperPinsPrechargeDuration: - 009143 88 [ 1] 1711 push a - 009144 6B 01 [ 1] 1712 ld (0x01, sp), a + 008DB7 1710 _RTC_TamperPinsPrechargeDuration: + 008DB7 88 [ 1] 1711 push a + 008DB8 6B 01 [ 1] 1712 ld (0x01, sp), a 1713 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1964: RTC->WPR = 0xCA; - 009146 35 CA 51 59 [ 1] 1714 mov 0x5159+0, #0xca + 008DBA 35 CA 51 59 [ 1] 1714 mov 0x5159+0, #0xca 1715 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1965: RTC->WPR = 0x53; - 00914A 35 53 51 59 [ 1] 1716 mov 0x5159+0, #0x53 + 008DBE 35 53 51 59 [ 1] 1716 mov 0x5159+0, #0x53 1717 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1968: RTC->TCR2 &= (uint8_t)~(RTC_TCR2_TAMPPUDIS | RTC_TCR2_TAMPPRCH); - 00914E C6 51 6D [ 1] 1718 ld a, 0x516d - 009151 A4 1F [ 1] 1719 and a, #0x1f - 009153 C7 51 6D [ 1] 1720 ld 0x516d, a + 008DC2 C6 51 6D [ 1] 1718 ld a, 0x516d + 008DC5 A4 1F [ 1] 1719 and a, #0x1f + 008DC7 C7 51 6D [ 1] 1720 ld 0x516d, a 1721 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1971: RTC->TCR2 |= (uint8_t)RTC_TamperPrechargeDuration; - 009156 C6 51 6D [ 1] 1722 ld a, 0x516d - 009159 1A 01 [ 1] 1723 or a, (0x01, sp) - 00915B C7 51 6D [ 1] 1724 ld 0x516d, a + 008DCA C6 51 6D [ 1] 1722 ld a, 0x516d + 008DCD 1A 01 [ 1] 1723 or a, (0x01, sp) + 008DCF C7 51 6D [ 1] 1724 ld 0x516d, a 1725 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1974: RTC->WPR = 0xFF; - 00915E 35 FF 51 59 [ 1] 1726 mov 0x5159+0, #0xff + 008DD2 35 FF 51 59 [ 1] 1726 mov 0x5159+0, #0xff 1727 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1975: } - 009162 84 [ 1] 1728 pop a - 009163 81 [ 4] 1729 ret + 008DD6 84 [ 1] 1728 pop a + 008DD7 81 [ 4] 1729 ret 1730 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1987: void RTC_TamperCmd(RTC_Tamper_TypeDef RTC_Tamper, 1731 ; ----------------------------------------- 1732 ; function RTC_TamperCmd 1733 ; ----------------------------------------- - 009164 1734 _RTC_TamperCmd: - 009164 88 [ 1] 1735 push a + 008DD8 1734 _RTC_TamperCmd: + 008DD8 88 [ 1] 1735 push a 1736 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1996: RTC->WPR = 0xCA; - 009165 35 CA 51 59 [ 1] 1737 mov 0x5159+0, #0xca + 008DD9 35 CA 51 59 [ 1] 1737 mov 0x5159+0, #0xca 1738 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 1997: RTC->WPR = 0x53; - 009169 35 53 51 59 [ 1] 1739 mov 0x5159+0, #0x53 + 008DDD 35 53 51 59 [ 1] 1739 mov 0x5159+0, #0x53 1740 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2003: RTC->TCR1 |= (uint8_t)RTC_Tamper; - 00916D AE 51 6C [ 2] 1741 ldw x, #0x516c - 009170 88 [ 1] 1742 push a - 009171 F6 [ 1] 1743 ld a, (x) - 009172 6B 02 [ 1] 1744 ld (0x02, sp), a - 009174 84 [ 1] 1745 pop a + 008DE1 AE 51 6C [ 2] 1741 ldw x, #0x516c + 008DE4 88 [ 1] 1742 push a + 008DE5 F6 [ 1] 1743 ld a, (x) + 008DE6 6B 02 [ 1] 1744 ld (0x02, sp), a + 008DE8 84 [ 1] 1745 pop a 1746 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2000: if (NewState != DISABLE) - 009175 0D 04 [ 1] 1747 tnz (0x04, sp) - 009177 27 07 [ 1] 1748 jreq 00102$ + 008DE9 0D 04 [ 1] 1747 tnz (0x04, sp) + 008DEB 27 07 [ 1] 1748 jreq 00102$ 1749 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2003: RTC->TCR1 |= (uint8_t)RTC_Tamper; - 009179 1A 01 [ 1] 1750 or a, (0x01, sp) - 00917B C7 51 6C [ 1] 1751 ld 0x516c, a - 00917E 20 06 [ 2] 1752 jra 00103$ - 009180 1753 00102$: + 008DED 1A 01 [ 1] 1750 or a, (0x01, sp) + 008DEF C7 51 6C [ 1] 1751 ld 0x516c, a + 008DF2 20 06 [ 2] 1752 jra 00103$ + 008DF4 1753 00102$: 1754 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2008: RTC->TCR1 &= (uint8_t)~RTC_Tamper; - 009180 43 [ 1] 1755 cpl a - 009181 14 01 [ 1] 1756 and a, (0x01, sp) - 009183 C7 51 6C [ 1] 1757 ld 0x516c, a - 009186 1758 00103$: + 008DF4 43 [ 1] 1755 cpl a + 008DF5 14 01 [ 1] 1756 and a, (0x01, sp) + 008DF7 C7 51 6C [ 1] 1757 ld 0x516c, a + 008DFA 1758 00103$: 1759 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2013: RTC->WPR = 0xFF; - 009186 35 FF 51 59 [ 1] 1760 mov 0x5159+0, #0xff + 008DFA 35 FF 51 59 [ 1] 1760 mov 0x5159+0, #0xff 1761 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2014: } - 00918A 84 [ 1] 1762 pop a - 00918B 85 [ 2] 1763 popw x - 00918C 84 [ 1] 1764 pop a - 00918D FC [ 2] 1765 jp (x) + 008DFE 84 [ 1] 1762 pop a + 008DFF 85 [ 2] 1763 popw x + 008E00 84 [ 1] 1764 pop a + 008E01 FC [ 2] 1765 jp (x) 1766 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2058: void RTC_ITConfig(RTC_IT_TypeDef RTC_IT, FunctionalState NewState) 1767 ; ----------------------------------------- 1768 ; function RTC_ITConfig 1769 ; ----------------------------------------- - 00918E 1770 _RTC_ITConfig: - 00918E 52 03 [ 2] 1771 sub sp, #3 - 009190 6B 03 [ 1] 1772 ld (0x03, sp), a + 008E02 1770 _RTC_ITConfig: + 008E02 52 03 [ 2] 1771 sub sp, #3 + 008E04 6B 03 [ 1] 1772 ld (0x03, sp), a 1773 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2065: RTC->WPR = 0xCA; - 009192 35 CA 51 59 [ 1] 1774 mov 0x5159+0, #0xca + 008E06 35 CA 51 59 [ 1] 1774 mov 0x5159+0, #0xca 1775 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2066: RTC->WPR = 0x53; - 009196 35 53 51 59 [ 1] 1776 mov 0x5159+0, #0x53 + 008E0A 35 53 51 59 [ 1] 1776 mov 0x5159+0, #0x53 1777 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2071: RTC->CR2 |= (uint8_t)((uint16_t)RTC_IT & (uint16_t)0x00F0); - 00919A C6 51 49 [ 1] 1778 ld a, 0x5149 - 00919D 6B 02 [ 1] 1779 ld (0x02, sp), a - 00919F 9F [ 1] 1780 ld a, xl - 0091A0 A4 F0 [ 1] 1781 and a, #0xf0 + 008E0E C6 51 49 [ 1] 1778 ld a, 0x5149 + 008E11 6B 02 [ 1] 1779 ld (0x02, sp), a + 008E13 9F [ 1] 1780 ld a, xl + 008E14 A4 F0 [ 1] 1781 and a, #0xf0 1782 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2072: RTC->TCR1 |= (uint8_t)((uint16_t)RTC_IT & RTC_TCR1_TAMPIE); - 0091A2 88 [ 1] 1783 push a - 0091A3 9F [ 1] 1784 ld a, xl - 0091A4 A4 01 [ 1] 1785 and a, #0x01 - 0091A6 6B 02 [ 1] 1786 ld (0x02, sp), a - 0091A8 84 [ 1] 1787 pop a + 008E16 88 [ 1] 1783 push a + 008E17 9F [ 1] 1784 ld a, xl + 008E18 A4 01 [ 1] 1785 and a, #0x01 + 008E1A 6B 02 [ 1] 1786 ld (0x02, sp), a + 008E1C 84 [ 1] 1787 pop a 1788 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2068: if (NewState != DISABLE) - 0091A9 0D 03 [ 1] 1789 tnz (0x03, sp) - 0091AB 27 0F [ 1] 1790 jreq 00102$ + 008E1D 0D 03 [ 1] 1789 tnz (0x03, sp) + 008E1F 27 0F [ 1] 1790 jreq 00102$ 1791 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2071: RTC->CR2 |= (uint8_t)((uint16_t)RTC_IT & (uint16_t)0x00F0); - 0091AD 1A 02 [ 1] 1792 or a, (0x02, sp) - 0091AF C7 51 49 [ 1] 1793 ld 0x5149, a + 008E21 1A 02 [ 1] 1792 or a, (0x02, sp) + 008E23 C7 51 49 [ 1] 1793 ld 0x5149, a 1794 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2072: RTC->TCR1 |= (uint8_t)((uint16_t)RTC_IT & RTC_TCR1_TAMPIE); - 0091B2 C6 51 6C [ 1] 1795 ld a, 0x516c - 0091B5 1A 01 [ 1] 1796 or a, (0x01, sp) - 0091B7 C7 51 6C [ 1] 1797 ld 0x516c, a - 0091BA 20 13 [ 2] 1798 jra 00103$ - 0091BC 1799 00102$: + 008E26 C6 51 6C [ 1] 1795 ld a, 0x516c + 008E29 1A 01 [ 1] 1796 or a, (0x01, sp) + 008E2B C7 51 6C [ 1] 1797 ld 0x516c, a + 008E2E 20 13 [ 2] 1798 jra 00103$ + 008E30 1799 00102$: 1800 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2077: RTC->CR2 &= (uint8_t)~(uint8_t)((uint16_t)RTC_IT & (uint16_t)0x00F0); - 0091BC 43 [ 1] 1801 cpl a - 0091BD 14 02 [ 1] 1802 and a, (0x02, sp) - 0091BF C7 51 49 [ 1] 1803 ld 0x5149, a + 008E30 43 [ 1] 1801 cpl a + 008E31 14 02 [ 1] 1802 and a, (0x02, sp) + 008E33 C7 51 49 [ 1] 1803 ld 0x5149, a 1804 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2078: RTC->TCR1 &= (uint8_t)~(uint8_t)((uint16_t)RTC_IT & (uint16_t)RTC_TCR1_TAMPIE); - 0091C2 C6 51 6C [ 1] 1805 ld a, 0x516c - 0091C5 6B 02 [ 1] 1806 ld (0x02, sp), a - 0091C7 7B 01 [ 1] 1807 ld a, (0x01, sp) - 0091C9 43 [ 1] 1808 cpl a - 0091CA 14 02 [ 1] 1809 and a, (0x02, sp) - 0091CC C7 51 6C [ 1] 1810 ld 0x516c, a - 0091CF 1811 00103$: + 008E36 C6 51 6C [ 1] 1805 ld a, 0x516c + 008E39 6B 02 [ 1] 1806 ld (0x02, sp), a + 008E3B 7B 01 [ 1] 1807 ld a, (0x01, sp) + 008E3D 43 [ 1] 1808 cpl a + 008E3E 14 02 [ 1] 1809 and a, (0x02, sp) + 008E40 C7 51 6C [ 1] 1810 ld 0x516c, a + 008E43 1811 00103$: 1812 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2082: RTC->WPR = 0xFF; - 0091CF 35 FF 51 59 [ 1] 1813 mov 0x5159+0, #0xff + 008E43 35 FF 51 59 [ 1] 1813 mov 0x5159+0, #0xff 1814 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2083: } - 0091D3 5B 03 [ 2] 1815 addw sp, #3 - 0091D5 81 [ 4] 1816 ret + 008E47 5B 03 [ 2] 1815 addw sp, #3 + 008E49 81 [ 4] 1816 ret 1817 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2090: FlagStatus RTC_GetFlagStatus(RTC_Flag_TypeDef RTC_FLAG) 1818 ; ----------------------------------------- 1819 ; function RTC_GetFlagStatus 1820 ; ----------------------------------------- - 0091D6 1821 _RTC_GetFlagStatus: - 0091D6 52 06 [ 2] 1822 sub sp, #6 + 008E4A 1821 _RTC_GetFlagStatus: + 008E4A 52 06 [ 2] 1822 sub sp, #6 1823 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2100: tmpreg2 = (uint16_t)((uint16_t)RTC->ISR1 << 8); - 0091D8 C6 51 4C [ 1] 1824 ld a, 0x514c - 0091DB 90 97 [ 1] 1825 ld yl, a - 0091DD 0F 02 [ 1] 1826 clr (0x02, sp) + 008E4C C6 51 4C [ 1] 1824 ld a, 0x514c + 008E4F 90 97 [ 1] 1825 ld yl, a + 008E51 0F 02 [ 1] 1826 clr (0x02, sp) 1827 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2101: tmpreg1 = (uint16_t)((uint16_t)((uint16_t)(RTC->ISR2)) | tmpreg2); - 0091DF C6 51 4D [ 1] 1828 ld a, 0x514d - 0091E2 0F 03 [ 1] 1829 clr (0x03, sp) - 0091E4 6B 06 [ 1] 1830 ld (0x06, sp), a - 0091E6 61 [ 1] 1831 exg a, yl - 0091E7 6B 05 [ 1] 1832 ld (0x05, sp), a - 0091E9 61 [ 1] 1833 exg a, yl + 008E53 C6 51 4D [ 1] 1828 ld a, 0x514d + 008E56 0F 03 [ 1] 1829 clr (0x03, sp) + 008E58 6B 06 [ 1] 1830 ld (0x06, sp), a + 008E5A 61 [ 1] 1831 exg a, yl + 008E5B 6B 05 [ 1] 1832 ld (0x05, sp), a + 008E5D 61 [ 1] 1833 exg a, yl 1834 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2104: if ((tmpreg1 & (uint16_t)RTC_FLAG) != RESET) - 0091EA 9F [ 1] 1835 ld a, xl - 0091EB 14 06 [ 1] 1836 and a, (0x06, sp) - 0091ED 02 [ 1] 1837 rlwa x - 0091EE 14 05 [ 1] 1838 and a, (0x05, sp) - 0091F0 95 [ 1] 1839 ld xh, a - 0091F1 5D [ 2] 1840 tnzw x - 0091F2 27 03 [ 1] 1841 jreq 00102$ + 008E5E 9F [ 1] 1835 ld a, xl + 008E5F 14 06 [ 1] 1836 and a, (0x06, sp) + 008E61 02 [ 1] 1837 rlwa x + 008E62 14 05 [ 1] 1838 and a, (0x05, sp) + 008E64 95 [ 1] 1839 ld xh, a + 008E65 5D [ 2] 1840 tnzw x + 008E66 27 03 [ 1] 1841 jreq 00102$ 1842 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2106: flagstatus = SET; - 0091F4 A6 01 [ 1] 1843 ld a, #0x01 + 008E68 A6 01 [ 1] 1843 ld a, #0x01 1844 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2110: flagstatus = RESET; - 0091F6 21 1845 .byte 0x21 - 0091F7 1846 00102$: - 0091F7 4F [ 1] 1847 clr a - 0091F8 1848 00103$: + 008E6A 21 1845 .byte 0x21 + 008E6B 1846 00102$: + 008E6B 4F [ 1] 1847 clr a + 008E6C 1848 00103$: 1849 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2112: return (FlagStatus)flagstatus; 1850 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2113: } - 0091F8 5B 06 [ 2] 1851 addw sp, #6 - 0091FA 81 [ 4] 1852 ret + 008E6C 5B 06 [ 2] 1851 addw sp, #6 + 008E6E 81 [ 4] 1852 ret 1853 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2122: void RTC_ClearFlag(RTC_Flag_TypeDef RTC_FLAG) 1854 ; ----------------------------------------- 1855 ; function RTC_ClearFlag 1856 ; ----------------------------------------- - 0091FB 1857 _RTC_ClearFlag: + 008E6F 1857 _RTC_ClearFlag: 1858 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2128: RTC->ISR2 = (uint8_t)~((uint8_t)RTC_FLAG) ; - 0091FB 9F [ 1] 1859 ld a, xl - 0091FC 43 [ 1] 1860 cpl a - 0091FD C7 51 4D [ 1] 1861 ld 0x514d, a + 008E6F 9F [ 1] 1859 ld a, xl + 008E70 43 [ 1] 1860 cpl a + 008E71 C7 51 4D [ 1] 1861 ld 0x514d, a 1862 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2129: RTC->ISR1 = (uint8_t)(((uint8_t)~(uint8_t)((uint16_t)RTC_FLAG >> (uint8_t)8)) & ((uint8_t)~(uint8_t)(RTC_ISR1_INIT))); - 009200 9E [ 1] 1863 ld a, xh - 009201 43 [ 1] 1864 cpl a - 009202 A4 7F [ 1] 1865 and a, #0x7f - 009204 C7 51 4C [ 1] 1866 ld 0x514c, a + 008E74 9E [ 1] 1863 ld a, xh + 008E75 43 [ 1] 1864 cpl a + 008E76 A4 7F [ 1] 1865 and a, #0x7f + 008E78 C7 51 4C [ 1] 1866 ld 0x514c, a 1867 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2130: } - 009207 81 [ 4] 1868 ret + 008E7B 81 [ 4] 1868 ret 1869 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2138: ITStatus RTC_GetITStatus(RTC_IT_TypeDef RTC_IT) 1870 ; ----------------------------------------- 1871 ; function RTC_GetITStatus 1872 ; ----------------------------------------- - 009208 1873 _RTC_GetITStatus: - 009208 88 [ 1] 1874 push a + 008E7C 1873 _RTC_GetITStatus: + 008E7C 88 [ 1] 1874 push a 1875 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2147: enablestatus = (uint8_t)(RTC->CR2 & (uint16_t)RTC_IT); - 009209 C6 51 49 [ 1] 1876 ld a, 0x5149 - 00920C 6B 01 [ 1] 1877 ld (0x01, sp), a - 00920E 9F [ 1] 1878 ld a, xl - 00920F 14 01 [ 1] 1879 and a, (0x01, sp) - 009211 6B 01 [ 1] 1880 ld (0x01, sp), a + 008E7D C6 51 49 [ 1] 1876 ld a, 0x5149 + 008E80 6B 01 [ 1] 1877 ld (0x01, sp), a + 008E82 9F [ 1] 1878 ld a, xl + 008E83 14 01 [ 1] 1879 and a, (0x01, sp) + 008E85 6B 01 [ 1] 1880 ld (0x01, sp), a 1881 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2150: tmpreg = (uint8_t)(RTC->ISR2 & (uint8_t)((uint16_t)RTC_IT >> 4)); - 009213 C6 51 4D [ 1] 1882 ld a, 0x514d - 009216 54 [ 2] 1883 srlw x - 009217 54 [ 2] 1884 srlw x - 009218 54 [ 2] 1885 srlw x - 009219 54 [ 2] 1886 srlw x - 00921A 89 [ 2] 1887 pushw x - 00921B 14 02 [ 1] 1888 and a, (2, sp) - 00921D 85 [ 2] 1889 popw x + 008E87 C6 51 4D [ 1] 1882 ld a, 0x514d + 008E8A 54 [ 2] 1883 srlw x + 008E8B 54 [ 2] 1884 srlw x + 008E8C 54 [ 2] 1885 srlw x + 008E8D 54 [ 2] 1886 srlw x + 008E8E 89 [ 2] 1887 pushw x + 008E8F 14 02 [ 1] 1888 and a, (2, sp) + 008E91 85 [ 2] 1889 popw x 1890 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2153: if ((enablestatus != (uint8_t)RESET) && (tmpreg != (uint8_t)RESET)) - 00921E 0D 01 [ 1] 1891 tnz (0x01, sp) - 009220 27 06 [ 1] 1892 jreq 00102$ - 009222 4D [ 1] 1893 tnz a - 009223 27 03 [ 1] 1894 jreq 00102$ + 008E92 0D 01 [ 1] 1891 tnz (0x01, sp) + 008E94 27 06 [ 1] 1892 jreq 00102$ + 008E96 4D [ 1] 1893 tnz a + 008E97 27 03 [ 1] 1894 jreq 00102$ 1895 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2155: itstatus = SET; - 009225 A6 01 [ 1] 1896 ld a, #0x01 + 008E99 A6 01 [ 1] 1896 ld a, #0x01 1897 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2159: itstatus = RESET; - 009227 21 1898 .byte 0x21 - 009228 1899 00102$: - 009228 4F [ 1] 1900 clr a - 009229 1901 00103$: + 008E9B 21 1898 .byte 0x21 + 008E9C 1899 00102$: + 008E9C 4F [ 1] 1900 clr a + 008E9D 1901 00103$: 1902 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2162: return (ITStatus)itstatus; 1903 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2163: } - 009229 5B 01 [ 2] 1904 addw sp, #1 - 00922B 81 [ 4] 1905 ret + 008E9D 5B 01 [ 2] 1904 addw sp, #1 + 008E9F 81 [ 4] 1905 ret 1906 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2172: void RTC_ClearITPendingBit(RTC_IT_TypeDef RTC_IT) 1907 ; ----------------------------------------- 1908 ; function RTC_ClearITPendingBit 1909 ; ----------------------------------------- - 00922C 1910 _RTC_ClearITPendingBit: + 008EA0 1910 _RTC_ClearITPendingBit: 1911 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2178: RTC->ISR2 = (uint8_t)~(uint8_t)((uint16_t)RTC_IT >> 4); - 00922C A6 10 [ 1] 1912 ld a, #0x10 - 00922E 62 [ 2] 1913 div x, a - 00922F 9F [ 1] 1914 ld a, xl - 009230 43 [ 1] 1915 cpl a - 009231 C7 51 4D [ 1] 1916 ld 0x514d, a + 008EA0 A6 10 [ 1] 1912 ld a, #0x10 + 008EA2 62 [ 2] 1913 div x, a + 008EA3 9F [ 1] 1914 ld a, xl + 008EA4 43 [ 1] 1915 cpl a + 008EA5 C7 51 4D [ 1] 1916 ld 0x514d, a 1917 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2179: } - 009234 81 [ 4] 1918 ret + 008EA8 81 [ 4] 1918 ret 1919 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2202: static uint8_t ByteToBcd2(uint8_t Value) 1920 ; ----------------------------------------- 1921 ; function ByteToBcd2 1922 ; ----------------------------------------- - 009235 1923 _ByteToBcd2: + 008EA9 1923 _ByteToBcd2: 1924 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2206: while (Value >= 10) - 009235 5F [ 1] 1925 clrw x - 009236 1926 00101$: - 009236 A1 0A [ 1] 1927 cp a, #0x0a - 009238 25 05 [ 1] 1928 jrc 00103$ + 008EA9 5F [ 1] 1925 clrw x + 008EAA 1926 00101$: + 008EAA A1 0A [ 1] 1927 cp a, #0x0a + 008EAC 25 05 [ 1] 1928 jrc 00103$ 1929 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2208: bcdhigh++; - 00923A 5C [ 1] 1930 incw x + 008EAE 5C [ 1] 1930 incw x 1931 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2209: Value -= 10; - 00923B A0 0A [ 1] 1932 sub a, #0x0a - 00923D 20 F7 [ 2] 1933 jra 00101$ - 00923F 1934 00103$: + 008EAF A0 0A [ 1] 1932 sub a, #0x0a + 008EB1 20 F7 [ 2] 1933 jra 00101$ + 008EB3 1934 00103$: 1935 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2212: return (uint8_t)((uint8_t)(bcdhigh << 4) | Value); - 00923F 58 [ 2] 1936 sllw x - 009240 58 [ 2] 1937 sllw x - 009241 58 [ 2] 1938 sllw x - 009242 58 [ 2] 1939 sllw x - 009243 89 [ 2] 1940 pushw x - 009244 1A 02 [ 1] 1941 or a, (2, sp) - 009246 85 [ 2] 1942 popw x + 008EB3 58 [ 2] 1936 sllw x + 008EB4 58 [ 2] 1937 sllw x + 008EB5 58 [ 2] 1938 sllw x + 008EB6 58 [ 2] 1939 sllw x + 008EB7 89 [ 2] 1940 pushw x + 008EB8 1A 02 [ 1] 1941 or a, (2, sp) + 008EBA 85 [ 2] 1942 popw x 1943 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2213: } - 009247 81 [ 4] 1944 ret + 008EBB 81 [ 4] 1944 ret 1945 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2220: static uint8_t Bcd2ToByte(uint8_t Value) 1946 ; ----------------------------------------- 1947 ; function Bcd2ToByte 1948 ; ----------------------------------------- - 009248 1949 _Bcd2ToByte: + 008EBC 1949 _Bcd2ToByte: 1950 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2224: tmp = (uint8_t)((uint8_t)((uint8_t)(Value & (uint8_t)0xF0) >> 4) * (uint8_t)10); - 009248 90 97 [ 1] 1951 ld yl, a - 00924A A4 F0 [ 1] 1952 and a, #0xf0 - 00924C 4E [ 1] 1953 swap a - 00924D A4 0F [ 1] 1954 and a, #0x0f - 00924F 97 [ 1] 1955 ld xl, a - 009250 A6 0A [ 1] 1956 ld a, #0x0a - 009252 42 [ 4] 1957 mul x, a + 008EBC 90 97 [ 1] 1951 ld yl, a + 008EBE A4 F0 [ 1] 1952 and a, #0xf0 + 008EC0 4E [ 1] 1953 swap a + 008EC1 A4 0F [ 1] 1954 and a, #0x0f + 008EC3 97 [ 1] 1955 ld xl, a + 008EC4 A6 0A [ 1] 1956 ld a, #0x0a + 008EC6 42 [ 4] 1957 mul x, a 1958 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2226: return (uint8_t)(tmp + (Value & (uint8_t)0x0F)); - 009253 90 9F [ 1] 1959 ld a, yl - 009255 A4 0F [ 1] 1960 and a, #0x0f - 009257 89 [ 2] 1961 pushw x - 009258 1B 02 [ 1] 1962 add a, (2, sp) - 00925A 85 [ 2] 1963 popw x + 008EC7 90 9F [ 1] 1959 ld a, yl + 008EC9 A4 0F [ 1] 1960 and a, #0x0f + 008ECB 89 [ 2] 1961 pushw x + 008ECC 1B 02 [ 1] 1962 add a, (2, sp) + 008ECE 85 [ 2] 1963 popw x 1964 ; ../inc/stm8l151x/src/stm8l15x_rtc.c: 2227: } - 00925B 81 [ 4] 1965 ret + 008ECF 81 [ 4] 1965 ret 1966 .area CODE 1967 .area CONST 1968 .area INITIALIZER diff --git a/firmware/STM8L15X_LD/stm8l15x_usart.rst b/firmware/STM8L15X_LD/stm8l15x_usart.rst index c28fd08..7d8b01e 100644 --- a/firmware/STM8L15X_LD/stm8l15x_usart.rst +++ b/firmware/STM8L15X_LD/stm8l15x_usart.rst @@ -74,825 +74,825 @@ 74 ; ----------------------------------------- 75 ; function USART_DeInit 76 ; ----------------------------------------- - 0081AD 77 _USART_DeInit: + 008204 77 _USART_DeInit: 78 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 154: (void) USARTx->DR; - 0081AD 90 93 [ 1] 79 ldw y, x - 0081AF E6 01 [ 1] 80 ld a, (0x1, x) + 008204 90 93 [ 1] 79 ldw y, x + 008206 E6 01 [ 1] 80 ld a, (0x1, x) 81 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 156: USARTx->BRR2 = USART_BRR2_RESET_VALUE; /* Set USART_BRR2 to reset value 0x00 */ - 0081B1 93 [ 1] 82 ldw x, y - 0081B2 6F 03 [ 1] 83 clr (0x0003, x) + 008208 93 [ 1] 82 ldw x, y + 008209 6F 03 [ 1] 83 clr (0x0003, x) 84 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 157: USARTx->BRR1 = USART_BRR1_RESET_VALUE; /* Set USART_BRR1 to reset value 0x00 */ - 0081B4 93 [ 1] 85 ldw x, y - 0081B5 6F 02 [ 1] 86 clr (0x02, x) + 00820B 93 [ 1] 85 ldw x, y + 00820C 6F 02 [ 1] 86 clr (0x02, x) 87 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 159: USARTx->CR1 = USART_CR1_RESET_VALUE; /* Set USART_CR1 to reset value 0x00 */ - 0081B7 93 [ 1] 88 ldw x, y - 0081B8 6F 04 [ 1] 89 clr (0x0004, x) + 00820E 93 [ 1] 88 ldw x, y + 00820F 6F 04 [ 1] 89 clr (0x0004, x) 90 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 160: USARTx->CR2 = USART_CR2_RESET_VALUE; /* Set USART_CR2 to reset value 0x00 */ - 0081BA 93 [ 1] 91 ldw x, y - 0081BB 6F 05 [ 1] 92 clr (0x0005, x) + 008211 93 [ 1] 91 ldw x, y + 008212 6F 05 [ 1] 92 clr (0x0005, x) 93 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 161: USARTx->CR3 = USART_CR3_RESET_VALUE; /* Set USART_CR3 to reset value 0x00 */ - 0081BD 93 [ 1] 94 ldw x, y - 0081BE 6F 06 [ 1] 95 clr (0x0006, x) + 008214 93 [ 1] 94 ldw x, y + 008215 6F 06 [ 1] 95 clr (0x0006, x) 96 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 162: USARTx->CR4 = USART_CR4_RESET_VALUE; /* Set USART_CR4 to reset value 0x00 */ - 0081C0 93 [ 1] 97 ldw x, y - 0081C1 6F 07 [ 1] 98 clr (0x0007, x) + 008217 93 [ 1] 97 ldw x, y + 008218 6F 07 [ 1] 98 clr (0x0007, x) 99 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 163: } - 0081C3 81 [ 4] 100 ret + 00821A 81 [ 4] 100 ret 101 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 192: void USART_Init(USART_TypeDef* USARTx, uint32_t BaudRate, USART_WordLength_TypeDef 102 ; ----------------------------------------- 103 ; function USART_Init 104 ; ----------------------------------------- - 0081C4 105 _USART_Init: - 0081C4 52 0B [ 2] 106 sub sp, #11 + 00821B 105 _USART_Init: + 00821B 52 0B [ 2] 106 sub sp, #11 107 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 210: USARTx->CR1 &= (uint8_t)(~(USART_CR1_PCEN | USART_CR1_PS | USART_CR1_M)); - 0081C6 1F 0A [ 2] 108 ldw (0x0a, sp), x - 0081C8 1C 00 04 [ 2] 109 addw x, #0x0004 - 0081CB F6 [ 1] 110 ld a, (x) - 0081CC A4 E9 [ 1] 111 and a, #0xe9 - 0081CE 6B 09 [ 1] 112 ld (0x09, sp), a - 0081D0 F7 [ 1] 113 ld (x), a + 00821D 1F 0A [ 2] 108 ldw (0x0a, sp), x + 00821F 1C 00 04 [ 2] 109 addw x, #0x0004 + 008222 F6 [ 1] 110 ld a, (x) + 008223 A4 E9 [ 1] 111 and a, #0xe9 + 008225 6B 09 [ 1] 112 ld (0x09, sp), a + 008227 F7 [ 1] 113 ld (x), a 114 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 213: USARTx->CR1 |= (uint8_t)((uint8_t)USART_WordLength | (uint8_t)USART_Parity); - 0081D1 7B 12 [ 1] 115 ld a, (0x12, sp) - 0081D3 1A 14 [ 1] 116 or a, (0x14, sp) - 0081D5 1A 09 [ 1] 117 or a, (0x09, sp) - 0081D7 F7 [ 1] 118 ld (x), a + 008228 7B 12 [ 1] 115 ld a, (0x12, sp) + 00822A 1A 14 [ 1] 116 or a, (0x14, sp) + 00822C 1A 09 [ 1] 117 or a, (0x09, sp) + 00822E F7 [ 1] 118 ld (x), a 119 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 216: USARTx->CR3 &= (uint8_t)(~USART_CR3_STOP); - 0081D8 1E 0A [ 2] 120 ldw x, (0x0a, sp) - 0081DA 1C 00 06 [ 2] 121 addw x, #0x0006 - 0081DD F6 [ 1] 122 ld a, (x) - 0081DE A4 CF [ 1] 123 and a, #0xcf - 0081E0 F7 [ 1] 124 ld (x), a + 00822F 1E 0A [ 2] 120 ldw x, (0x0a, sp) + 008231 1C 00 06 [ 2] 121 addw x, #0x0006 + 008234 F6 [ 1] 122 ld a, (x) + 008235 A4 CF [ 1] 123 and a, #0xcf + 008237 F7 [ 1] 124 ld (x), a 125 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 218: USARTx->CR3 |= (uint8_t)USART_StopBits; - 0081E1 1A 13 [ 1] 126 or a, (0x13, sp) - 0081E3 F7 [ 1] 127 ld (x), a + 008238 1A 13 [ 1] 126 or a, (0x13, sp) + 00823A F7 [ 1] 127 ld (x), a 128 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 221: USARTx->BRR1 &= (uint8_t)(~USART_BRR1_DIVM); - 0081E4 1E 0A [ 2] 129 ldw x, (0x0a, sp) - 0081E6 5C [ 1] 130 incw x - 0081E7 5C [ 1] 131 incw x - 0081E8 1F 01 [ 2] 132 ldw (0x01, sp), x - 0081EA F6 [ 1] 133 ld a, (x) - 0081EB 1E 01 [ 2] 134 ldw x, (0x01, sp) - 0081ED 7F [ 1] 135 clr (x) + 00823B 1E 0A [ 2] 129 ldw x, (0x0a, sp) + 00823D 5C [ 1] 130 incw x + 00823E 5C [ 1] 131 incw x + 00823F 1F 01 [ 2] 132 ldw (0x01, sp), x + 008241 F6 [ 1] 133 ld a, (x) + 008242 1E 01 [ 2] 134 ldw x, (0x01, sp) + 008244 7F [ 1] 135 clr (x) 136 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 223: USARTx->BRR2 &= (uint8_t)(~USART_BRR2_DIVM); - 0081EE 1E 0A [ 2] 137 ldw x, (0x0a, sp) - 0081F0 1C 00 03 [ 2] 138 addw x, #0x0003 - 0081F3 1F 03 [ 2] 139 ldw (0x03, sp), x - 0081F5 F6 [ 1] 140 ld a, (x) - 0081F6 A4 0F [ 1] 141 and a, #0x0f - 0081F8 1E 03 [ 2] 142 ldw x, (0x03, sp) - 0081FA F7 [ 1] 143 ld (x), a + 008245 1E 0A [ 2] 137 ldw x, (0x0a, sp) + 008247 1C 00 03 [ 2] 138 addw x, #0x0003 + 00824A 1F 03 [ 2] 139 ldw (0x03, sp), x + 00824C F6 [ 1] 140 ld a, (x) + 00824D A4 0F [ 1] 141 and a, #0x0f + 00824F 1E 03 [ 2] 142 ldw x, (0x03, sp) + 008251 F7 [ 1] 143 ld (x), a 144 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 225: USARTx->BRR2 &= (uint8_t)(~USART_BRR2_DIVF); - 0081FB 1E 03 [ 2] 145 ldw x, (0x03, sp) - 0081FD 7F [ 1] 146 clr (x) + 008252 1E 03 [ 2] 145 ldw x, (0x03, sp) + 008254 7F [ 1] 146 clr (x) 147 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 227: BaudRate_Mantissa = (uint32_t)(CLK_GetClockFreq() / BaudRate ); - 0081FE CD 85 D6 [ 4] 148 call _CLK_GetClockFreq - 008201 1F 08 [ 2] 149 ldw (0x08, sp), x - 008203 1E 10 [ 2] 150 ldw x, (0x10, sp) - 008205 89 [ 2] 151 pushw x - 008206 1E 10 [ 2] 152 ldw x, (0x10, sp) - 008208 89 [ 2] 153 pushw x - 008209 1E 0C [ 2] 154 ldw x, (0x0c, sp) - 00820B 89 [ 2] 155 pushw x - 00820C 90 89 [ 2] 156 pushw y + 008255 CD 86 2D [ 4] 148 call _CLK_GetClockFreq + 008258 1F 08 [ 2] 149 ldw (0x08, sp), x + 00825A 1E 10 [ 2] 150 ldw x, (0x10, sp) + 00825C 89 [ 2] 151 pushw x + 00825D 1E 10 [ 2] 152 ldw x, (0x10, sp) + 00825F 89 [ 2] 153 pushw x + 008260 1E 0C [ 2] 154 ldw x, (0x0c, sp) + 008262 89 [ 2] 155 pushw x + 008263 90 89 [ 2] 156 pushw y 157 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 229: USARTx->BRR2 = (uint8_t)((BaudRate_Mantissa >> (uint8_t)8) & (uint8_t)0xF0); - 00820E CD 92 5C [ 4] 158 call __divulong - 008211 5B 08 [ 2] 159 addw sp, #8 - 008213 17 05 [ 2] 160 ldw (0x05, sp), y - 008215 9E [ 1] 161 ld a, xh - 008216 A4 F0 [ 1] 162 and a, #0xf0 - 008218 6B 09 [ 1] 163 ld (0x09, sp), a - 00821A 16 03 [ 2] 164 ldw y, (0x03, sp) - 00821C 7B 09 [ 1] 165 ld a, (0x09, sp) - 00821E 90 F7 [ 1] 166 ld (y), a + 008265 CD 8A 2C [ 4] 158 call __divulong + 008268 5B 08 [ 2] 159 addw sp, #8 + 00826A 17 05 [ 2] 160 ldw (0x05, sp), y + 00826C 9E [ 1] 161 ld a, xh + 00826D A4 F0 [ 1] 162 and a, #0xf0 + 00826F 6B 09 [ 1] 163 ld (0x09, sp), a + 008271 16 03 [ 2] 164 ldw y, (0x03, sp) + 008273 7B 09 [ 1] 165 ld a, (0x09, sp) + 008275 90 F7 [ 1] 166 ld (y), a 167 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 231: USARTx->BRR2 |= (uint8_t)(BaudRate_Mantissa & (uint8_t)0x0F); - 008220 9F [ 1] 168 ld a, xl - 008221 A4 0F [ 1] 169 and a, #0x0f - 008223 1A 09 [ 1] 170 or a, (0x09, sp) - 008225 16 03 [ 2] 171 ldw y, (0x03, sp) - 008227 90 F7 [ 1] 172 ld (y), a + 008277 9F [ 1] 168 ld a, xl + 008278 A4 0F [ 1] 169 and a, #0x0f + 00827A 1A 09 [ 1] 170 or a, (0x09, sp) + 00827C 16 03 [ 2] 171 ldw y, (0x03, sp) + 00827E 90 F7 [ 1] 172 ld (y), a 173 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 233: USARTx->BRR1 = (uint8_t)(BaudRate_Mantissa >> (uint8_t)4); - 008229 A6 10 [ 1] 174 ld a, #0x10 - 00822B 62 [ 2] 175 div x, a - 00822C 9F [ 1] 176 ld a, xl - 00822D 1E 01 [ 2] 177 ldw x, (0x01, sp) - 00822F F7 [ 1] 178 ld (x), a + 008280 A6 10 [ 1] 174 ld a, #0x10 + 008282 62 [ 2] 175 div x, a + 008283 9F [ 1] 176 ld a, xl + 008284 1E 01 [ 2] 177 ldw x, (0x01, sp) + 008286 F7 [ 1] 178 ld (x), a 179 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 236: USARTx->CR2 &= (uint8_t)~(USART_CR2_TEN | USART_CR2_REN); - 008230 1E 0A [ 2] 180 ldw x, (0x0a, sp) - 008232 1C 00 05 [ 2] 181 addw x, #0x0005 - 008235 F6 [ 1] 182 ld a, (x) - 008236 A4 F3 [ 1] 183 and a, #0xf3 - 008238 F7 [ 1] 184 ld (x), a + 008287 1E 0A [ 2] 180 ldw x, (0x0a, sp) + 008289 1C 00 05 [ 2] 181 addw x, #0x0005 + 00828C F6 [ 1] 182 ld a, (x) + 00828D A4 F3 [ 1] 183 and a, #0xf3 + 00828F F7 [ 1] 184 ld (x), a 185 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 238: USARTx->CR2 |= (uint8_t)USART_Mode; - 008239 1A 15 [ 1] 186 or a, (0x15, sp) - 00823B F7 [ 1] 187 ld (x), a + 008290 1A 15 [ 1] 186 or a, (0x15, sp) + 008292 F7 [ 1] 187 ld (x), a 188 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 239: } - 00823C 1E 0C [ 2] 189 ldw x, (12, sp) - 00823E 5B 15 [ 2] 190 addw sp, #21 - 008240 FC [ 2] 191 jp (x) + 008293 1E 0C [ 2] 189 ldw x, (12, sp) + 008295 5B 15 [ 2] 190 addw sp, #21 + 008297 FC [ 2] 191 jp (x) 192 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 264: void USART_ClockInit(USART_TypeDef* USARTx, USART_Clock_TypeDef USART_Clock, 193 ; ----------------------------------------- 194 ; function USART_ClockInit 195 ; ----------------------------------------- - 008241 196 _USART_ClockInit: - 008241 52 05 [ 2] 197 sub sp, #5 - 008243 6B 05 [ 1] 198 ld (0x05, sp), a + 008298 196 _USART_ClockInit: + 008298 52 05 [ 2] 197 sub sp, #5 + 00829A 6B 05 [ 1] 198 ld (0x05, sp), a 199 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 275: USARTx->CR3 &= (uint8_t)~(USART_CR3_CPOL | USART_CR3_CPHA | USART_CR3_LBCL); - 008245 1C 00 06 [ 2] 200 addw x, #0x0006 - 008248 1F 01 [ 2] 201 ldw (0x01, sp), x - 00824A F6 [ 1] 202 ld a, (x) - 00824B A4 F8 [ 1] 203 and a, #0xf8 - 00824D 6B 03 [ 1] 204 ld (0x03, sp), a - 00824F 1E 01 [ 2] 205 ldw x, (0x01, sp) - 008251 7B 03 [ 1] 206 ld a, (0x03, sp) - 008253 F7 [ 1] 207 ld (x), a + 00829C 1C 00 06 [ 2] 200 addw x, #0x0006 + 00829F 1F 01 [ 2] 201 ldw (0x01, sp), x + 0082A1 F6 [ 1] 202 ld a, (x) + 0082A2 A4 F8 [ 1] 203 and a, #0xf8 + 0082A4 6B 03 [ 1] 204 ld (0x03, sp), a + 0082A6 1E 01 [ 2] 205 ldw x, (0x01, sp) + 0082A8 7B 03 [ 1] 206 ld a, (0x03, sp) + 0082AA F7 [ 1] 207 ld (x), a 208 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 277: USARTx->CR3 |= (uint8_t)((uint8_t)((uint8_t)(USART_CPOL | (uint8_t)USART_CPHA ) | USART_LastBit)); - 008254 7B 08 [ 1] 209 ld a, (0x08, sp) - 008256 1A 09 [ 1] 210 or a, (0x09, sp) - 008258 6B 04 [ 1] 211 ld (0x04, sp), a - 00825A 7B 0A [ 1] 212 ld a, (0x0a, sp) - 00825C 1A 04 [ 1] 213 or a, (0x04, sp) - 00825E 1A 03 [ 1] 214 or a, (0x03, sp) - 008260 1E 01 [ 2] 215 ldw x, (0x01, sp) - 008262 F7 [ 1] 216 ld (x), a + 0082AB 7B 08 [ 1] 209 ld a, (0x08, sp) + 0082AD 1A 09 [ 1] 210 or a, (0x09, sp) + 0082AF 6B 04 [ 1] 211 ld (0x04, sp), a + 0082B1 7B 0A [ 1] 212 ld a, (0x0a, sp) + 0082B3 1A 04 [ 1] 213 or a, (0x04, sp) + 0082B5 1A 03 [ 1] 214 or a, (0x03, sp) + 0082B7 1E 01 [ 2] 215 ldw x, (0x01, sp) + 0082B9 F7 [ 1] 216 ld (x), a 217 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 275: USARTx->CR3 &= (uint8_t)~(USART_CR3_CPOL | USART_CR3_CPHA | USART_CR3_LBCL); - 008263 1E 01 [ 2] 218 ldw x, (0x01, sp) - 008265 F6 [ 1] 219 ld a, (x) + 0082BA 1E 01 [ 2] 218 ldw x, (0x01, sp) + 0082BC F6 [ 1] 219 ld a, (x) 220 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 279: if (USART_Clock != USART_Clock_Disable) - 008266 0D 05 [ 1] 221 tnz (0x05, sp) - 008268 27 07 [ 1] 222 jreq 00102$ + 0082BD 0D 05 [ 1] 221 tnz (0x05, sp) + 0082BF 27 07 [ 1] 222 jreq 00102$ 223 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 281: USARTx->CR3 |= (uint8_t)(USART_CR3_CLKEN); /* Set the Clock Enable bit */ - 00826A AA 08 [ 1] 224 or a, #0x08 - 00826C 1E 01 [ 2] 225 ldw x, (0x01, sp) - 00826E F7 [ 1] 226 ld (x), a - 00826F 20 05 [ 2] 227 jra 00104$ - 008271 228 00102$: + 0082C1 AA 08 [ 1] 224 or a, #0x08 + 0082C3 1E 01 [ 2] 225 ldw x, (0x01, sp) + 0082C5 F7 [ 1] 226 ld (x), a + 0082C6 20 05 [ 2] 227 jra 00104$ + 0082C8 228 00102$: 229 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 285: USARTx->CR3 &= (uint8_t)(~USART_CR3_CLKEN); /* Clear the Clock Enable bit */ - 008271 A4 F7 [ 1] 230 and a, #0xf7 - 008273 1E 01 [ 2] 231 ldw x, (0x01, sp) - 008275 F7 [ 1] 232 ld (x), a - 008276 233 00104$: + 0082C8 A4 F7 [ 1] 230 and a, #0xf7 + 0082CA 1E 01 [ 2] 231 ldw x, (0x01, sp) + 0082CC F7 [ 1] 232 ld (x), a + 0082CD 233 00104$: 234 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 287: } - 008276 1E 06 [ 2] 235 ldw x, (6, sp) - 008278 5B 0A [ 2] 236 addw sp, #10 - 00827A FC [ 2] 237 jp (x) + 0082CD 1E 06 [ 2] 235 ldw x, (6, sp) + 0082CF 5B 0A [ 2] 236 addw sp, #10 + 0082D1 FC [ 2] 237 jp (x) 238 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 296: void USART_Cmd(USART_TypeDef* USARTx, FunctionalState NewState) 239 ; ----------------------------------------- 240 ; function USART_Cmd 241 ; ----------------------------------------- - 00827B 242 _USART_Cmd: - 00827B 88 [ 1] 243 push a - 00827C 6B 01 [ 1] 244 ld (0x01, sp), a + 0082D2 242 _USART_Cmd: + 0082D2 88 [ 1] 243 push a + 0082D3 6B 01 [ 1] 244 ld (0x01, sp), a 245 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 300: USARTx->CR1 &= (uint8_t)(~USART_CR1_USARTD); /**< USART Enable */ - 00827E 1C 00 04 [ 2] 246 addw x, #0x0004 - 008281 F6 [ 1] 247 ld a, (x) + 0082D5 1C 00 04 [ 2] 246 addw x, #0x0004 + 0082D8 F6 [ 1] 247 ld a, (x) 248 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 298: if (NewState != DISABLE) - 008282 0D 01 [ 1] 249 tnz (0x01, sp) - 008284 27 05 [ 1] 250 jreq 00102$ + 0082D9 0D 01 [ 1] 249 tnz (0x01, sp) + 0082DB 27 05 [ 1] 250 jreq 00102$ 251 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 300: USARTx->CR1 &= (uint8_t)(~USART_CR1_USARTD); /**< USART Enable */ - 008286 A4 DF [ 1] 252 and a, #0xdf - 008288 F7 [ 1] 253 ld (x), a - 008289 20 03 [ 2] 254 jra 00104$ - 00828B 255 00102$: + 0082DD A4 DF [ 1] 252 and a, #0xdf + 0082DF F7 [ 1] 253 ld (x), a + 0082E0 20 03 [ 2] 254 jra 00104$ + 0082E2 255 00102$: 256 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 304: USARTx->CR1 |= USART_CR1_USARTD; /**< USART Disable (for low power consumption) */ - 00828B AA 20 [ 1] 257 or a, #0x20 - 00828D F7 [ 1] 258 ld (x), a - 00828E 259 00104$: + 0082E2 AA 20 [ 1] 257 or a, #0x20 + 0082E4 F7 [ 1] 258 ld (x), a + 0082E5 259 00104$: 260 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 306: } - 00828E 84 [ 1] 261 pop a - 00828F 81 [ 4] 262 ret + 0082E5 84 [ 1] 261 pop a + 0082E6 81 [ 4] 262 ret 263 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 329: void USART_SetPrescaler(USART_TypeDef* USARTx, uint8_t USART_Prescaler) 264 ; ----------------------------------------- 265 ; function USART_SetPrescaler 266 ; ----------------------------------------- - 008290 267 _USART_SetPrescaler: + 0082E7 267 _USART_SetPrescaler: 268 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 332: USARTx->PSCR = USART_Prescaler; - 008290 1C 00 0A [ 2] 269 addw x, #0x000a - 008293 F7 [ 1] 270 ld (x), a + 0082E7 1C 00 0A [ 2] 269 addw x, #0x000a + 0082EA F7 [ 1] 270 ld (x), a 271 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 333: } - 008294 81 [ 4] 272 ret + 0082EB 81 [ 4] 272 ret 273 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 340: void USART_SendBreak(USART_TypeDef* USARTx) 274 ; ----------------------------------------- 275 ; function USART_SendBreak 276 ; ----------------------------------------- - 008295 277 _USART_SendBreak: + 0082EC 277 _USART_SendBreak: 278 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 342: USARTx->CR2 |= USART_CR2_SBK; - 008295 1C 00 05 [ 2] 279 addw x, #0x0005 - 008298 F6 [ 1] 280 ld a, (x) - 008299 AA 01 [ 1] 281 or a, #0x01 - 00829B F7 [ 1] 282 ld (x), a + 0082EC 1C 00 05 [ 2] 279 addw x, #0x0005 + 0082EF F6 [ 1] 280 ld a, (x) + 0082F0 AA 01 [ 1] 281 or a, #0x01 + 0082F2 F7 [ 1] 282 ld (x), a 283 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 343: } - 00829C 81 [ 4] 284 ret + 0082F3 81 [ 4] 284 ret 285 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 382: uint8_t USART_ReceiveData8(USART_TypeDef* USARTx) 286 ; ----------------------------------------- 287 ; function USART_ReceiveData8 288 ; ----------------------------------------- - 00829D 289 _USART_ReceiveData8: + 0082F4 289 _USART_ReceiveData8: 290 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 384: return USARTx->DR; - 00829D E6 01 [ 1] 291 ld a, (0x1, x) + 0082F4 E6 01 [ 1] 291 ld a, (0x1, x) 292 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 385: } - 00829F 81 [ 4] 293 ret + 0082F6 81 [ 4] 293 ret 294 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 392: uint16_t USART_ReceiveData9(USART_TypeDef* USARTx) 295 ; ----------------------------------------- 296 ; function USART_ReceiveData9 297 ; ----------------------------------------- - 0082A0 298 _USART_ReceiveData9: - 0082A0 89 [ 2] 299 pushw x + 0082F7 298 _USART_ReceiveData9: + 0082F7 89 [ 2] 299 pushw x 300 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 396: temp = ((uint16_t)(((uint16_t)((uint16_t)USARTx->CR1 & (uint16_t)USART_CR1_R8)) << 1)); - 0082A1 90 93 [ 1] 301 ldw y, x - 0082A3 E6 04 [ 1] 302 ld a, (0x4, x) - 0082A5 A4 80 [ 1] 303 and a, #0x80 - 0082A7 97 [ 1] 304 ld xl, a - 0082A8 4F [ 1] 305 clr a - 0082A9 95 [ 1] 306 ld xh, a - 0082AA 58 [ 2] 307 sllw x - 0082AB 1F 01 [ 2] 308 ldw (0x01, sp), x + 0082F8 90 93 [ 1] 301 ldw y, x + 0082FA E6 04 [ 1] 302 ld a, (0x4, x) + 0082FC A4 80 [ 1] 303 and a, #0x80 + 0082FE 97 [ 1] 304 ld xl, a + 0082FF 4F [ 1] 305 clr a + 008300 95 [ 1] 306 ld xh, a + 008301 58 [ 2] 307 sllw x + 008302 1F 01 [ 2] 308 ldw (0x01, sp), x 309 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 397: return (uint16_t)( ((uint16_t)((uint16_t)USARTx->DR) | temp) & ((uint16_t)0x01FF)); - 0082AD 90 E6 01 [ 1] 310 ld a, (0x1, y) - 0082B0 1A 02 [ 1] 311 or a, (0x02, sp) - 0082B2 97 [ 1] 312 ld xl, a - 0082B3 7B 01 [ 1] 313 ld a, (0x01, sp) - 0082B5 A4 01 [ 1] 314 and a, #0x01 - 0082B7 95 [ 1] 315 ld xh, a + 008304 90 E6 01 [ 1] 310 ld a, (0x1, y) + 008307 1A 02 [ 1] 311 or a, (0x02, sp) + 008309 97 [ 1] 312 ld xl, a + 00830A 7B 01 [ 1] 313 ld a, (0x01, sp) + 00830C A4 01 [ 1] 314 and a, #0x01 + 00830E 95 [ 1] 315 ld xh, a 316 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 398: } - 0082B8 5B 02 [ 2] 317 addw sp, #2 - 0082BA 81 [ 4] 318 ret + 00830F 5B 02 [ 2] 317 addw sp, #2 + 008311 81 [ 4] 318 ret 319 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 405: void USART_SendData8(USART_TypeDef* USARTx, uint8_t Data) 320 ; ----------------------------------------- 321 ; function USART_SendData8 322 ; ----------------------------------------- - 0082BB 323 _USART_SendData8: + 008312 323 _USART_SendData8: 324 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 408: USARTx->DR = Data; - 0082BB 5C [ 1] 325 incw x - 0082BC F7 [ 1] 326 ld (x), a + 008312 5C [ 1] 325 incw x + 008313 F7 [ 1] 326 ld (x), a 327 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 409: } - 0082BD 81 [ 4] 328 ret + 008314 81 [ 4] 328 ret 329 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 418: void USART_SendData9(USART_TypeDef* USARTx, uint16_t Data) 330 ; ----------------------------------------- 331 ; function USART_SendData9 332 ; ----------------------------------------- - 0082BE 333 _USART_SendData9: - 0082BE 52 03 [ 2] 334 sub sp, #3 + 008315 333 _USART_SendData9: + 008315 52 03 [ 2] 334 sub sp, #3 335 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 423: USARTx->CR1 &= ((uint8_t)~USART_CR1_T8); - 0082C0 1F 02 [ 2] 336 ldw (0x02, sp), x - 0082C2 1C 00 04 [ 2] 337 addw x, #0x0004 - 0082C5 F6 [ 1] 338 ld a, (x) - 0082C6 A4 BF [ 1] 339 and a, #0xbf - 0082C8 6B 01 [ 1] 340 ld (0x01, sp), a - 0082CA F7 [ 1] 341 ld (x), a + 008317 1F 02 [ 2] 336 ldw (0x02, sp), x + 008319 1C 00 04 [ 2] 337 addw x, #0x0004 + 00831C F6 [ 1] 338 ld a, (x) + 00831D A4 BF [ 1] 339 and a, #0xbf + 00831F 6B 01 [ 1] 340 ld (0x01, sp), a + 008321 F7 [ 1] 341 ld (x), a 342 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 426: USARTx->CR1 |= (uint8_t)(((uint8_t)(Data >> 2)) & USART_CR1_T8); - 0082CB 16 06 [ 2] 343 ldw y, (0x06, sp) - 0082CD 90 54 [ 2] 344 srlw y - 0082CF 90 54 [ 2] 345 srlw y - 0082D1 90 9F [ 1] 346 ld a, yl - 0082D3 A4 40 [ 1] 347 and a, #0x40 - 0082D5 1A 01 [ 1] 348 or a, (0x01, sp) - 0082D7 F7 [ 1] 349 ld (x), a + 008322 16 06 [ 2] 343 ldw y, (0x06, sp) + 008324 90 54 [ 2] 344 srlw y + 008326 90 54 [ 2] 345 srlw y + 008328 90 9F [ 1] 346 ld a, yl + 00832A A4 40 [ 1] 347 and a, #0x40 + 00832C 1A 01 [ 1] 348 or a, (0x01, sp) + 00832E F7 [ 1] 349 ld (x), a 350 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 429: USARTx->DR = (uint8_t)(Data); - 0082D8 1E 02 [ 2] 351 ldw x, (0x02, sp) - 0082DA 5C [ 1] 352 incw x - 0082DB 7B 07 [ 1] 353 ld a, (0x07, sp) - 0082DD F7 [ 1] 354 ld (x), a + 00832F 1E 02 [ 2] 351 ldw x, (0x02, sp) + 008331 5C [ 1] 352 incw x + 008332 7B 07 [ 1] 353 ld a, (0x07, sp) + 008334 F7 [ 1] 354 ld (x), a 355 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 430: } - 0082DE 1E 04 [ 2] 356 ldw x, (4, sp) - 0082E0 5B 07 [ 2] 357 addw sp, #7 - 0082E2 FC [ 2] 358 jp (x) + 008335 1E 04 [ 2] 356 ldw x, (4, sp) + 008337 5B 07 [ 2] 357 addw sp, #7 + 008339 FC [ 2] 358 jp (x) 359 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 473: void USART_ReceiverWakeUpCmd(USART_TypeDef* USARTx, FunctionalState NewState) 360 ; ----------------------------------------- 361 ; function USART_ReceiverWakeUpCmd 362 ; ----------------------------------------- - 0082E3 363 _USART_ReceiverWakeUpCmd: - 0082E3 88 [ 1] 364 push a - 0082E4 6B 01 [ 1] 365 ld (0x01, sp), a + 00833A 363 _USART_ReceiverWakeUpCmd: + 00833A 88 [ 1] 364 push a + 00833B 6B 01 [ 1] 365 ld (0x01, sp), a 366 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 480: USARTx->CR2 |= USART_CR2_RWU; - 0082E6 1C 00 05 [ 2] 367 addw x, #0x0005 - 0082E9 F6 [ 1] 368 ld a, (x) + 00833D 1C 00 05 [ 2] 367 addw x, #0x0005 + 008340 F6 [ 1] 368 ld a, (x) 369 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 477: if (NewState != DISABLE) - 0082EA 0D 01 [ 1] 370 tnz (0x01, sp) - 0082EC 27 05 [ 1] 371 jreq 00102$ + 008341 0D 01 [ 1] 370 tnz (0x01, sp) + 008343 27 05 [ 1] 371 jreq 00102$ 372 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 480: USARTx->CR2 |= USART_CR2_RWU; - 0082EE AA 02 [ 1] 373 or a, #0x02 - 0082F0 F7 [ 1] 374 ld (x), a - 0082F1 20 03 [ 2] 375 jra 00104$ - 0082F3 376 00102$: + 008345 AA 02 [ 1] 373 or a, #0x02 + 008347 F7 [ 1] 374 ld (x), a + 008348 20 03 [ 2] 375 jra 00104$ + 00834A 376 00102$: 377 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 485: USARTx->CR2 &= ((uint8_t)~USART_CR2_RWU); - 0082F3 A4 FD [ 1] 378 and a, #0xfd - 0082F5 F7 [ 1] 379 ld (x), a - 0082F6 380 00104$: + 00834A A4 FD [ 1] 378 and a, #0xfd + 00834C F7 [ 1] 379 ld (x), a + 00834D 380 00104$: 381 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 487: } - 0082F6 84 [ 1] 382 pop a - 0082F7 81 [ 4] 383 ret + 00834D 84 [ 1] 382 pop a + 00834E 81 [ 4] 383 ret 384 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 496: void USART_SetAddress(USART_TypeDef* USARTx, uint8_t USART_Address) 385 ; ----------------------------------------- 386 ; function USART_SetAddress 387 ; ----------------------------------------- - 0082F8 388 _USART_SetAddress: - 0082F8 88 [ 1] 389 push a - 0082F9 6B 01 [ 1] 390 ld (0x01, sp), a + 00834F 388 _USART_SetAddress: + 00834F 88 [ 1] 389 push a + 008350 6B 01 [ 1] 390 ld (0x01, sp), a 391 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 502: USARTx->CR4 &= ((uint8_t)~USART_CR4_ADD); - 0082FB 1C 00 07 [ 2] 392 addw x, #0x0007 - 0082FE F6 [ 1] 393 ld a, (x) - 0082FF A4 F0 [ 1] 394 and a, #0xf0 - 008301 F7 [ 1] 395 ld (x), a + 008352 1C 00 07 [ 2] 392 addw x, #0x0007 + 008355 F6 [ 1] 393 ld a, (x) + 008356 A4 F0 [ 1] 394 and a, #0xf0 + 008358 F7 [ 1] 395 ld (x), a 396 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 504: USARTx->CR4 |= USART_Address; - 008302 1A 01 [ 1] 397 or a, (0x01, sp) - 008304 F7 [ 1] 398 ld (x), a + 008359 1A 01 [ 1] 397 or a, (0x01, sp) + 00835B F7 [ 1] 398 ld (x), a 399 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 505: } - 008305 84 [ 1] 400 pop a - 008306 81 [ 4] 401 ret + 00835C 84 [ 1] 400 pop a + 00835D 81 [ 4] 401 ret 402 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 515: void USART_WakeUpConfig(USART_TypeDef* USARTx, USART_WakeUp_TypeDef USART_WakeUp) 403 ; ----------------------------------------- 404 ; function USART_WakeUpConfig 405 ; ----------------------------------------- - 008307 406 _USART_WakeUpConfig: - 008307 88 [ 1] 407 push a - 008308 6B 01 [ 1] 408 ld (0x01, sp), a + 00835E 406 _USART_WakeUpConfig: + 00835E 88 [ 1] 407 push a + 00835F 6B 01 [ 1] 408 ld (0x01, sp), a 409 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 519: USARTx->CR1 &= ((uint8_t)~USART_CR1_WAKE); - 00830A 1C 00 04 [ 2] 410 addw x, #0x0004 - 00830D F6 [ 1] 411 ld a, (x) - 00830E A4 F7 [ 1] 412 and a, #0xf7 - 008310 F7 [ 1] 413 ld (x), a + 008361 1C 00 04 [ 2] 410 addw x, #0x0004 + 008364 F6 [ 1] 411 ld a, (x) + 008365 A4 F7 [ 1] 412 and a, #0xf7 + 008367 F7 [ 1] 413 ld (x), a 414 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 520: USARTx->CR1 |= (uint8_t)USART_WakeUp; - 008311 1A 01 [ 1] 415 or a, (0x01, sp) - 008313 F7 [ 1] 416 ld (x), a + 008368 1A 01 [ 1] 415 or a, (0x01, sp) + 00836A F7 [ 1] 416 ld (x), a 417 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 521: } - 008314 84 [ 1] 418 pop a - 008315 81 [ 4] 419 ret + 00836B 84 [ 1] 418 pop a + 00836C 81 [ 4] 419 ret 420 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 566: void USART_HalfDuplexCmd(USART_TypeDef* USARTx, FunctionalState NewState) 421 ; ----------------------------------------- 422 ; function USART_HalfDuplexCmd 423 ; ----------------------------------------- - 008316 424 _USART_HalfDuplexCmd: - 008316 88 [ 1] 425 push a - 008317 6B 01 [ 1] 426 ld (0x01, sp), a + 00836D 424 _USART_HalfDuplexCmd: + 00836D 88 [ 1] 425 push a + 00836E 6B 01 [ 1] 426 ld (0x01, sp), a 427 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 572: USARTx->CR5 |= USART_CR5_HDSEL; /**< USART Half Duplex Enable */ - 008319 1C 00 08 [ 2] 428 addw x, #0x0008 - 00831C F6 [ 1] 429 ld a, (x) + 008370 1C 00 08 [ 2] 428 addw x, #0x0008 + 008373 F6 [ 1] 429 ld a, (x) 430 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 570: if (NewState != DISABLE) - 00831D 0D 01 [ 1] 431 tnz (0x01, sp) - 00831F 27 05 [ 1] 432 jreq 00102$ + 008374 0D 01 [ 1] 431 tnz (0x01, sp) + 008376 27 05 [ 1] 432 jreq 00102$ 433 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 572: USARTx->CR5 |= USART_CR5_HDSEL; /**< USART Half Duplex Enable */ - 008321 AA 08 [ 1] 434 or a, #0x08 - 008323 F7 [ 1] 435 ld (x), a - 008324 20 03 [ 2] 436 jra 00104$ - 008326 437 00102$: + 008378 AA 08 [ 1] 434 or a, #0x08 + 00837A F7 [ 1] 435 ld (x), a + 00837B 20 03 [ 2] 436 jra 00104$ + 00837D 437 00102$: 438 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 576: USARTx->CR5 &= (uint8_t)~USART_CR5_HDSEL; /**< USART Half Duplex Disable */ - 008326 A4 F7 [ 1] 439 and a, #0xf7 - 008328 F7 [ 1] 440 ld (x), a - 008329 441 00104$: + 00837D A4 F7 [ 1] 439 and a, #0xf7 + 00837F F7 [ 1] 440 ld (x), a + 008380 441 00104$: 442 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 578: } - 008329 84 [ 1] 443 pop a - 00832A 81 [ 4] 444 ret + 008380 84 [ 1] 443 pop a + 008381 81 [ 4] 444 ret 445 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 644: void USART_SmartCardCmd(USART_TypeDef* USARTx, FunctionalState NewState) 446 ; ----------------------------------------- 447 ; function USART_SmartCardCmd 448 ; ----------------------------------------- - 00832B 449 _USART_SmartCardCmd: - 00832B 88 [ 1] 450 push a - 00832C 6B 01 [ 1] 451 ld (0x01, sp), a + 008382 449 _USART_SmartCardCmd: + 008382 88 [ 1] 450 push a + 008383 6B 01 [ 1] 451 ld (0x01, sp), a 452 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 651: USARTx->CR5 |= USART_CR5_SCEN; - 00832E 1C 00 08 [ 2] 453 addw x, #0x0008 - 008331 F6 [ 1] 454 ld a, (x) + 008385 1C 00 08 [ 2] 453 addw x, #0x0008 + 008388 F6 [ 1] 454 ld a, (x) 455 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 648: if (NewState != DISABLE) - 008332 0D 01 [ 1] 456 tnz (0x01, sp) - 008334 27 05 [ 1] 457 jreq 00102$ + 008389 0D 01 [ 1] 456 tnz (0x01, sp) + 00838B 27 05 [ 1] 457 jreq 00102$ 458 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 651: USARTx->CR5 |= USART_CR5_SCEN; - 008336 AA 20 [ 1] 459 or a, #0x20 - 008338 F7 [ 1] 460 ld (x), a - 008339 20 03 [ 2] 461 jra 00104$ - 00833B 462 00102$: + 00838D AA 20 [ 1] 459 or a, #0x20 + 00838F F7 [ 1] 460 ld (x), a + 008390 20 03 [ 2] 461 jra 00104$ + 008392 462 00102$: 463 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 656: USARTx->CR5 &= ((uint8_t)(~USART_CR5_SCEN)); - 00833B A4 DF [ 1] 464 and a, #0xdf - 00833D F7 [ 1] 465 ld (x), a - 00833E 466 00104$: + 008392 A4 DF [ 1] 464 and a, #0xdf + 008394 F7 [ 1] 465 ld (x), a + 008395 466 00104$: 467 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 658: } - 00833E 84 [ 1] 468 pop a - 00833F 81 [ 4] 469 ret + 008395 84 [ 1] 468 pop a + 008396 81 [ 4] 469 ret 470 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 667: void USART_SmartCardNACKCmd(USART_TypeDef* USARTx, FunctionalState NewState) 471 ; ----------------------------------------- 472 ; function USART_SmartCardNACKCmd 473 ; ----------------------------------------- - 008340 474 _USART_SmartCardNACKCmd: - 008340 88 [ 1] 475 push a - 008341 6B 01 [ 1] 476 ld (0x01, sp), a + 008397 474 _USART_SmartCardNACKCmd: + 008397 88 [ 1] 475 push a + 008398 6B 01 [ 1] 476 ld (0x01, sp), a 477 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 674: USARTx->CR5 |= USART_CR5_NACK; - 008343 1C 00 08 [ 2] 478 addw x, #0x0008 - 008346 F6 [ 1] 479 ld a, (x) + 00839A 1C 00 08 [ 2] 478 addw x, #0x0008 + 00839D F6 [ 1] 479 ld a, (x) 480 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 671: if (NewState != DISABLE) - 008347 0D 01 [ 1] 481 tnz (0x01, sp) - 008349 27 05 [ 1] 482 jreq 00102$ + 00839E 0D 01 [ 1] 481 tnz (0x01, sp) + 0083A0 27 05 [ 1] 482 jreq 00102$ 483 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 674: USARTx->CR5 |= USART_CR5_NACK; - 00834B AA 10 [ 1] 484 or a, #0x10 - 00834D F7 [ 1] 485 ld (x), a - 00834E 20 03 [ 2] 486 jra 00104$ - 008350 487 00102$: + 0083A2 AA 10 [ 1] 484 or a, #0x10 + 0083A4 F7 [ 1] 485 ld (x), a + 0083A5 20 03 [ 2] 486 jra 00104$ + 0083A7 487 00102$: 488 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 679: USARTx->CR5 &= ((uint8_t)~(USART_CR5_NACK)); - 008350 A4 EF [ 1] 489 and a, #0xef - 008352 F7 [ 1] 490 ld (x), a - 008353 491 00104$: + 0083A7 A4 EF [ 1] 489 and a, #0xef + 0083A9 F7 [ 1] 490 ld (x), a + 0083AA 491 00104$: 492 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 681: } - 008353 84 [ 1] 493 pop a - 008354 81 [ 4] 494 ret + 0083AA 84 [ 1] 493 pop a + 0083AB 81 [ 4] 494 ret 495 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 690: void USART_SetGuardTime(USART_TypeDef* USARTx, uint8_t USART_GuardTime) 496 ; ----------------------------------------- 497 ; function USART_SetGuardTime 498 ; ----------------------------------------- - 008355 499 _USART_SetGuardTime: + 0083AC 499 _USART_SetGuardTime: 500 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 693: USARTx->GTR = USART_GuardTime; - 008355 1C 00 09 [ 2] 501 addw x, #0x0009 - 008358 F7 [ 1] 502 ld (x), a + 0083AC 1C 00 09 [ 2] 501 addw x, #0x0009 + 0083AF F7 [ 1] 502 ld (x), a 503 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 694: } - 008359 81 [ 4] 504 ret + 0083B0 81 [ 4] 504 ret 505 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 751: void USART_IrDAConfig(USART_TypeDef* USARTx, USART_IrDAMode_TypeDef USART_IrDAMode) 506 ; ----------------------------------------- 507 ; function USART_IrDAConfig 508 ; ----------------------------------------- - 00835A 509 _USART_IrDAConfig: - 00835A 88 [ 1] 510 push a - 00835B 6B 01 [ 1] 511 ld (0x01, sp), a + 0083B1 509 _USART_IrDAConfig: + 0083B1 88 [ 1] 510 push a + 0083B2 6B 01 [ 1] 511 ld (0x01, sp), a 512 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 757: USARTx->CR5 |= USART_CR5_IRLP; - 00835D 1C 00 08 [ 2] 513 addw x, #0x0008 - 008360 F6 [ 1] 514 ld a, (x) + 0083B4 1C 00 08 [ 2] 513 addw x, #0x0008 + 0083B7 F6 [ 1] 514 ld a, (x) 515 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 755: if (USART_IrDAMode != USART_IrDAMode_Normal) - 008361 0D 01 [ 1] 516 tnz (0x01, sp) - 008363 27 05 [ 1] 517 jreq 00102$ + 0083B8 0D 01 [ 1] 516 tnz (0x01, sp) + 0083BA 27 05 [ 1] 517 jreq 00102$ 518 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 757: USARTx->CR5 |= USART_CR5_IRLP; - 008365 AA 04 [ 1] 519 or a, #0x04 - 008367 F7 [ 1] 520 ld (x), a - 008368 20 03 [ 2] 521 jra 00104$ - 00836A 522 00102$: + 0083BC AA 04 [ 1] 519 or a, #0x04 + 0083BE F7 [ 1] 520 ld (x), a + 0083BF 20 03 [ 2] 521 jra 00104$ + 0083C1 522 00102$: 523 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 761: USARTx->CR5 &= ((uint8_t)~USART_CR5_IRLP); - 00836A A4 FB [ 1] 524 and a, #0xfb - 00836C F7 [ 1] 525 ld (x), a - 00836D 526 00104$: + 0083C1 A4 FB [ 1] 524 and a, #0xfb + 0083C3 F7 [ 1] 525 ld (x), a + 0083C4 526 00104$: 527 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 763: } - 00836D 84 [ 1] 528 pop a - 00836E 81 [ 4] 529 ret + 0083C4 84 [ 1] 528 pop a + 0083C5 81 [ 4] 529 ret 530 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 772: void USART_IrDACmd(USART_TypeDef* USARTx, FunctionalState NewState) 531 ; ----------------------------------------- 532 ; function USART_IrDACmd 533 ; ----------------------------------------- - 00836F 534 _USART_IrDACmd: - 00836F 88 [ 1] 535 push a - 008370 6B 01 [ 1] 536 ld (0x01, sp), a + 0083C6 534 _USART_IrDACmd: + 0083C6 88 [ 1] 535 push a + 0083C7 6B 01 [ 1] 536 ld (0x01, sp), a 537 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 781: USARTx->CR5 |= USART_CR5_IREN; - 008372 1C 00 08 [ 2] 538 addw x, #0x0008 - 008375 F6 [ 1] 539 ld a, (x) + 0083C9 1C 00 08 [ 2] 538 addw x, #0x0008 + 0083CC F6 [ 1] 539 ld a, (x) 540 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 778: if (NewState != DISABLE) - 008376 0D 01 [ 1] 541 tnz (0x01, sp) - 008378 27 05 [ 1] 542 jreq 00102$ + 0083CD 0D 01 [ 1] 541 tnz (0x01, sp) + 0083CF 27 05 [ 1] 542 jreq 00102$ 543 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 781: USARTx->CR5 |= USART_CR5_IREN; - 00837A AA 02 [ 1] 544 or a, #0x02 - 00837C F7 [ 1] 545 ld (x), a - 00837D 20 03 [ 2] 546 jra 00104$ - 00837F 547 00102$: + 0083D1 AA 02 [ 1] 544 or a, #0x02 + 0083D3 F7 [ 1] 545 ld (x), a + 0083D4 20 03 [ 2] 546 jra 00104$ + 0083D6 547 00102$: 548 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 786: USARTx->CR5 &= ((uint8_t)~USART_CR5_IREN); - 00837F A4 FD [ 1] 549 and a, #0xfd - 008381 F7 [ 1] 550 ld (x), a - 008382 551 00104$: + 0083D6 A4 FD [ 1] 549 and a, #0xfd + 0083D8 F7 [ 1] 550 ld (x), a + 0083D9 551 00104$: 552 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 788: } - 008382 84 [ 1] 553 pop a - 008383 81 [ 4] 554 ret + 0083D9 84 [ 1] 553 pop a + 0083DA 81 [ 4] 554 ret 555 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 818: void USART_DMACmd(USART_TypeDef* USARTx, USART_DMAReq_TypeDef USART_DMAReq, 556 ; ----------------------------------------- 557 ; function USART_DMACmd 558 ; ----------------------------------------- - 008384 559 _USART_DMACmd: - 008384 88 [ 1] 560 push a + 0083DB 559 _USART_DMACmd: + 0083DB 88 [ 1] 560 push a 561 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 829: USARTx->CR5 |= (uint8_t) USART_DMAReq; - 008385 1C 00 08 [ 2] 562 addw x, #0x0008 - 008388 88 [ 1] 563 push a - 008389 F6 [ 1] 564 ld a, (x) - 00838A 6B 02 [ 1] 565 ld (0x02, sp), a - 00838C 84 [ 1] 566 pop a + 0083DC 1C 00 08 [ 2] 562 addw x, #0x0008 + 0083DF 88 [ 1] 563 push a + 0083E0 F6 [ 1] 564 ld a, (x) + 0083E1 6B 02 [ 1] 565 ld (0x02, sp), a + 0083E3 84 [ 1] 566 pop a 567 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 825: if (NewState != DISABLE) - 00838D 0D 04 [ 1] 568 tnz (0x04, sp) - 00838F 27 05 [ 1] 569 jreq 00102$ + 0083E4 0D 04 [ 1] 568 tnz (0x04, sp) + 0083E6 27 05 [ 1] 569 jreq 00102$ 570 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 829: USARTx->CR5 |= (uint8_t) USART_DMAReq; - 008391 1A 01 [ 1] 571 or a, (0x01, sp) - 008393 F7 [ 1] 572 ld (x), a - 008394 20 04 [ 2] 573 jra 00104$ - 008396 574 00102$: + 0083E8 1A 01 [ 1] 571 or a, (0x01, sp) + 0083EA F7 [ 1] 572 ld (x), a + 0083EB 20 04 [ 2] 573 jra 00104$ + 0083ED 574 00102$: 575 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 835: USARTx->CR5 &= (uint8_t)~USART_DMAReq; - 008396 43 [ 1] 576 cpl a - 008397 14 01 [ 1] 577 and a, (0x01, sp) - 008399 F7 [ 1] 578 ld (x), a - 00839A 579 00104$: + 0083ED 43 [ 1] 576 cpl a + 0083EE 14 01 [ 1] 577 and a, (0x01, sp) + 0083F0 F7 [ 1] 578 ld (x), a + 0083F1 579 00104$: 580 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 837: } - 00839A 84 [ 1] 581 pop a - 00839B 85 [ 2] 582 popw x - 00839C 84 [ 1] 583 pop a - 00839D FC [ 2] 584 jp (x) + 0083F1 84 [ 1] 581 pop a + 0083F2 85 [ 2] 582 popw x + 0083F3 84 [ 1] 583 pop a + 0083F4 FC [ 2] 584 jp (x) 585 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 939: void USART_ITConfig(USART_TypeDef* USARTx, USART_IT_TypeDef USART_IT, FunctionalState NewState) 586 ; ----------------------------------------- 587 ; function USART_ITConfig 588 ; ----------------------------------------- - 00839E 589 _USART_ITConfig: - 00839E 52 09 [ 2] 590 sub sp, #9 - 0083A0 1F 08 [ 2] 591 ldw (0x08, sp), x + 0083F5 589 _USART_ITConfig: + 0083F5 52 09 [ 2] 590 sub sp, #9 + 0083F7 1F 08 [ 2] 591 ldw (0x08, sp), x 592 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 946: usartreg = (uint8_t)((uint16_t)USART_IT >> 0x08); - 0083A2 1E 0C [ 2] 593 ldw x, (0x0c, sp) + 0083F9 1E 0C [ 2] 593 ldw x, (0x0c, sp) 594 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 948: itpos = (uint8_t)((uint8_t)1 << (uint8_t)((uint8_t)USART_IT & (uint8_t)0x0F)); - 0083A4 7B 0D [ 1] 595 ld a, (0x0d, sp) - 0083A6 A4 0F [ 1] 596 and a, #0x0f - 0083A8 88 [ 1] 597 push a - 0083A9 A6 01 [ 1] 598 ld a, #0x01 - 0083AB 6B 08 [ 1] 599 ld (0x08, sp), a - 0083AD 84 [ 1] 600 pop a - 0083AE 4D [ 1] 601 tnz a - 0083AF 27 05 [ 1] 602 jreq 00154$ - 0083B1 603 00153$: - 0083B1 08 07 [ 1] 604 sll (0x07, sp) - 0083B3 4A [ 1] 605 dec a - 0083B4 26 FB [ 1] 606 jrne 00153$ - 0083B6 607 00154$: + 0083FB 7B 0D [ 1] 595 ld a, (0x0d, sp) + 0083FD A4 0F [ 1] 596 and a, #0x0f + 0083FF 88 [ 1] 597 push a + 008400 A6 01 [ 1] 598 ld a, #0x01 + 008402 6B 08 [ 1] 599 ld (0x08, sp), a + 008404 84 [ 1] 600 pop a + 008405 4D [ 1] 601 tnz a + 008406 27 05 [ 1] 602 jreq 00154$ + 008408 603 00153$: + 008408 08 07 [ 1] 604 sll (0x07, sp) + 00840A 4A [ 1] 605 dec a + 00840B 26 FB [ 1] 606 jrne 00153$ + 00840D 607 00154$: 608 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 953: if (usartreg == 0x01) - 0083B6 9E [ 1] 609 ld a, xh - 0083B7 4A [ 1] 610 dec a - 0083B8 26 05 [ 1] 611 jrne 00156$ - 0083BA A6 01 [ 1] 612 ld a, #0x01 - 0083BC 6B 01 [ 1] 613 ld (0x01, sp), a - 0083BE C5 614 .byte 0xc5 - 0083BF 615 00156$: - 0083BF 0F 01 [ 1] 616 clr (0x01, sp) - 0083C1 617 00157$: + 00840D 9E [ 1] 609 ld a, xh + 00840E 4A [ 1] 610 dec a + 00840F 26 05 [ 1] 611 jrne 00156$ + 008411 A6 01 [ 1] 612 ld a, #0x01 + 008413 6B 01 [ 1] 613 ld (0x01, sp), a + 008415 C5 614 .byte 0xc5 + 008416 615 00156$: + 008416 0F 01 [ 1] 616 clr (0x01, sp) + 008418 617 00157$: 618 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 955: USARTx->CR1 |= itpos; - 0083C1 16 08 [ 2] 619 ldw y, (0x08, sp) - 0083C3 72 A9 00 04 [ 2] 620 addw y, #0x0004 - 0083C7 17 02 [ 2] 621 ldw (0x02, sp), y + 008418 16 08 [ 2] 619 ldw y, (0x08, sp) + 00841A 72 A9 00 04 [ 2] 620 addw y, #0x0004 + 00841E 17 02 [ 2] 621 ldw (0x02, sp), y 622 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 957: else if (usartreg == 0x05) - 0083C9 9E [ 1] 623 ld a, xh - 0083CA A0 05 [ 1] 624 sub a, #0x05 - 0083CC 26 04 [ 1] 625 jrne 00159$ - 0083CE 4C [ 1] 626 inc a - 0083CF 6B 04 [ 1] 627 ld (0x04, sp), a - 0083D1 C5 628 .byte 0xc5 - 0083D2 629 00159$: - 0083D2 0F 04 [ 1] 630 clr (0x04, sp) - 0083D4 631 00160$: + 008420 9E [ 1] 623 ld a, xh + 008421 A0 05 [ 1] 624 sub a, #0x05 + 008423 26 04 [ 1] 625 jrne 00159$ + 008425 4C [ 1] 626 inc a + 008426 6B 04 [ 1] 627 ld (0x04, sp), a + 008428 C5 628 .byte 0xc5 + 008429 629 00159$: + 008429 0F 04 [ 1] 630 clr (0x04, sp) + 00842B 631 00160$: 632 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 959: USARTx->CR5 |= itpos; - 0083D4 1E 08 [ 2] 633 ldw x, (0x08, sp) - 0083D6 1C 00 08 [ 2] 634 addw x, #0x0008 - 0083D9 1F 05 [ 2] 635 ldw (0x05, sp), x + 00842B 1E 08 [ 2] 633 ldw x, (0x08, sp) + 00842D 1C 00 08 [ 2] 634 addw x, #0x0008 + 008430 1F 05 [ 2] 635 ldw (0x05, sp), x 636 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 964: USARTx->CR2 |= itpos; - 0083DB 1E 08 [ 2] 637 ldw x, (0x08, sp) - 0083DD 1C 00 05 [ 2] 638 addw x, #0x0005 + 008432 1E 08 [ 2] 637 ldw x, (0x08, sp) + 008434 1C 00 05 [ 2] 638 addw x, #0x0005 639 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 950: if (NewState != DISABLE) - 0083E0 0D 0E [ 1] 640 tnz (0x0e, sp) - 0083E2 27 22 [ 1] 641 jreq 00114$ + 008437 0D 0E [ 1] 640 tnz (0x0e, sp) + 008439 27 22 [ 1] 641 jreq 00114$ 642 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 953: if (usartreg == 0x01) - 0083E4 0D 01 [ 1] 643 tnz (0x01, sp) - 0083E6 27 0A [ 1] 644 jreq 00105$ + 00843B 0D 01 [ 1] 643 tnz (0x01, sp) + 00843D 27 0A [ 1] 644 jreq 00105$ 645 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 955: USARTx->CR1 |= itpos; - 0083E8 1E 02 [ 2] 646 ldw x, (0x02, sp) - 0083EA F6 [ 1] 647 ld a, (x) - 0083EB 1A 07 [ 1] 648 or a, (0x07, sp) - 0083ED 1E 02 [ 2] 649 ldw x, (0x02, sp) - 0083EF F7 [ 1] 650 ld (x), a - 0083F0 20 36 [ 2] 651 jra 00116$ - 0083F2 652 00105$: + 00843F 1E 02 [ 2] 646 ldw x, (0x02, sp) + 008441 F6 [ 1] 647 ld a, (x) + 008442 1A 07 [ 1] 648 or a, (0x07, sp) + 008444 1E 02 [ 2] 649 ldw x, (0x02, sp) + 008446 F7 [ 1] 650 ld (x), a + 008447 20 36 [ 2] 651 jra 00116$ + 008449 652 00105$: 653 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 957: else if (usartreg == 0x05) - 0083F2 0D 04 [ 1] 654 tnz (0x04, sp) - 0083F4 27 0A [ 1] 655 jreq 00102$ + 008449 0D 04 [ 1] 654 tnz (0x04, sp) + 00844B 27 0A [ 1] 655 jreq 00102$ 656 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 959: USARTx->CR5 |= itpos; - 0083F6 1E 05 [ 2] 657 ldw x, (0x05, sp) - 0083F8 F6 [ 1] 658 ld a, (x) - 0083F9 1A 07 [ 1] 659 or a, (0x07, sp) - 0083FB 1E 05 [ 2] 660 ldw x, (0x05, sp) - 0083FD F7 [ 1] 661 ld (x), a - 0083FE 20 28 [ 2] 662 jra 00116$ - 008400 663 00102$: + 00844D 1E 05 [ 2] 657 ldw x, (0x05, sp) + 00844F F6 [ 1] 658 ld a, (x) + 008450 1A 07 [ 1] 659 or a, (0x07, sp) + 008452 1E 05 [ 2] 660 ldw x, (0x05, sp) + 008454 F7 [ 1] 661 ld (x), a + 008455 20 28 [ 2] 662 jra 00116$ + 008457 663 00102$: 664 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 964: USARTx->CR2 |= itpos; - 008400 F6 [ 1] 665 ld a, (x) - 008401 1A 07 [ 1] 666 or a, (0x07, sp) - 008403 F7 [ 1] 667 ld (x), a - 008404 20 22 [ 2] 668 jra 00116$ - 008406 669 00114$: + 008457 F6 [ 1] 665 ld a, (x) + 008458 1A 07 [ 1] 666 or a, (0x07, sp) + 00845A F7 [ 1] 667 ld (x), a + 00845B 20 22 [ 2] 668 jra 00116$ + 00845D 669 00114$: 670 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 972: USARTx->CR1 &= (uint8_t)(~itpos); - 008406 03 07 [ 1] 671 cpl (0x07, sp) + 00845D 03 07 [ 1] 671 cpl (0x07, sp) 672 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 970: if (usartreg == 0x01) - 008408 0D 01 [ 1] 673 tnz (0x01, sp) - 00840A 27 0A [ 1] 674 jreq 00111$ + 00845F 0D 01 [ 1] 673 tnz (0x01, sp) + 008461 27 0A [ 1] 674 jreq 00111$ 675 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 972: USARTx->CR1 &= (uint8_t)(~itpos); - 00840C 1E 02 [ 2] 676 ldw x, (0x02, sp) - 00840E F6 [ 1] 677 ld a, (x) - 00840F 14 07 [ 1] 678 and a, (0x07, sp) - 008411 1E 02 [ 2] 679 ldw x, (0x02, sp) - 008413 F7 [ 1] 680 ld (x), a - 008414 20 12 [ 2] 681 jra 00116$ - 008416 682 00111$: + 008463 1E 02 [ 2] 676 ldw x, (0x02, sp) + 008465 F6 [ 1] 677 ld a, (x) + 008466 14 07 [ 1] 678 and a, (0x07, sp) + 008468 1E 02 [ 2] 679 ldw x, (0x02, sp) + 00846A F7 [ 1] 680 ld (x), a + 00846B 20 12 [ 2] 681 jra 00116$ + 00846D 682 00111$: 683 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 974: else if (usartreg == 0x05) - 008416 0D 04 [ 1] 684 tnz (0x04, sp) - 008418 27 0A [ 1] 685 jreq 00108$ + 00846D 0D 04 [ 1] 684 tnz (0x04, sp) + 00846F 27 0A [ 1] 685 jreq 00108$ 686 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 976: USARTx->CR5 &= (uint8_t)(~itpos); - 00841A 1E 05 [ 2] 687 ldw x, (0x05, sp) - 00841C F6 [ 1] 688 ld a, (x) - 00841D 14 07 [ 1] 689 and a, (0x07, sp) - 00841F 1E 05 [ 2] 690 ldw x, (0x05, sp) - 008421 F7 [ 1] 691 ld (x), a - 008422 20 04 [ 2] 692 jra 00116$ - 008424 693 00108$: + 008471 1E 05 [ 2] 687 ldw x, (0x05, sp) + 008473 F6 [ 1] 688 ld a, (x) + 008474 14 07 [ 1] 689 and a, (0x07, sp) + 008476 1E 05 [ 2] 690 ldw x, (0x05, sp) + 008478 F7 [ 1] 691 ld (x), a + 008479 20 04 [ 2] 692 jra 00116$ + 00847B 693 00108$: 694 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 981: USARTx->CR2 &= (uint8_t)(~itpos); - 008424 F6 [ 1] 695 ld a, (x) - 008425 14 07 [ 1] 696 and a, (0x07, sp) - 008427 F7 [ 1] 697 ld (x), a - 008428 698 00116$: + 00847B F6 [ 1] 695 ld a, (x) + 00847C 14 07 [ 1] 696 and a, (0x07, sp) + 00847E F7 [ 1] 697 ld (x), a + 00847F 698 00116$: 699 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 984: } - 008428 1E 0A [ 2] 700 ldw x, (10, sp) - 00842A 5B 0E [ 2] 701 addw sp, #14 - 00842C FC [ 2] 702 jp (x) + 00847F 1E 0A [ 2] 700 ldw x, (10, sp) + 008481 5B 0E [ 2] 701 addw sp, #14 + 008483 FC [ 2] 702 jp (x) 703 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 1002: FlagStatus USART_GetFlagStatus(USART_TypeDef* USARTx, USART_FLAG_TypeDef USART_FLAG) 704 ; ----------------------------------------- 705 ; function USART_GetFlagStatus 706 ; ----------------------------------------- - 00842D 707 _USART_GetFlagStatus: - 00842D 88 [ 1] 708 push a + 008484 707 _USART_GetFlagStatus: + 008484 88 [ 1] 708 push a 709 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 1009: if (USART_FLAG == USART_FLAG_SBK) - 00842E 16 04 [ 2] 710 ldw y, (0x04, sp) + 008485 16 04 [ 2] 710 ldw y, (0x04, sp) 711 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 1011: if ((USARTx->CR2 & (uint8_t)USART_FLAG) != (uint8_t)0x00) - 008430 7B 05 [ 1] 712 ld a, (0x05, sp) - 008432 6B 01 [ 1] 713 ld (0x01, sp), a + 008487 7B 05 [ 1] 712 ld a, (0x05, sp) + 008489 6B 01 [ 1] 713 ld (0x01, sp), a 714 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 1009: if (USART_FLAG == USART_FLAG_SBK) - 008434 90 A3 01 01 [ 2] 715 cpw y, #0x0101 - 008438 26 0D [ 1] 716 jrne 00108$ + 00848B 90 A3 01 01 [ 2] 715 cpw y, #0x0101 + 00848F 26 0D [ 1] 716 jrne 00108$ 717 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 1011: if ((USARTx->CR2 & (uint8_t)USART_FLAG) != (uint8_t)0x00) - 00843A E6 05 [ 1] 718 ld a, (0x5, x) - 00843C 14 01 [ 1] 719 and a, (0x01, sp) - 00843E 27 04 [ 1] 720 jreq 00102$ + 008491 E6 05 [ 1] 718 ld a, (0x5, x) + 008493 14 01 [ 1] 719 and a, (0x01, sp) + 008495 27 04 [ 1] 720 jreq 00102$ 721 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 1014: status = SET; - 008440 A6 01 [ 1] 722 ld a, #0x01 - 008442 20 0C [ 2] 723 jra 00109$ - 008444 724 00102$: + 008497 A6 01 [ 1] 722 ld a, #0x01 + 008499 20 0C [ 2] 723 jra 00109$ + 00849B 724 00102$: 725 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 1019: status = RESET; - 008444 4F [ 1] 726 clr a - 008445 20 09 [ 2] 727 jra 00109$ - 008447 728 00108$: + 00849B 4F [ 1] 726 clr a + 00849C 20 09 [ 2] 727 jra 00109$ + 00849E 728 00108$: 729 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 1024: if ((USARTx->SR & (uint8_t)USART_FLAG) != (uint8_t)0x00) - 008447 F6 [ 1] 730 ld a, (x) - 008448 14 01 [ 1] 731 and a, (0x01, sp) - 00844A 27 03 [ 1] 732 jreq 00105$ + 00849E F6 [ 1] 730 ld a, (x) + 00849F 14 01 [ 1] 731 and a, (0x01, sp) + 0084A1 27 03 [ 1] 732 jreq 00105$ 733 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 1027: status = SET; - 00844C A6 01 [ 1] 734 ld a, #0x01 + 0084A3 A6 01 [ 1] 734 ld a, #0x01 735 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 1032: status = RESET; - 00844E 21 736 .byte 0x21 - 00844F 737 00105$: - 00844F 4F [ 1] 738 clr a - 008450 739 00109$: + 0084A5 21 736 .byte 0x21 + 0084A6 737 00105$: + 0084A6 4F [ 1] 738 clr a + 0084A7 739 00109$: 740 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 1036: return status; 741 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 1037: } - 008450 1E 02 [ 2] 742 ldw x, (2, sp) - 008452 5B 05 [ 2] 743 addw sp, #5 - 008454 FC [ 2] 744 jp (x) + 0084A7 1E 02 [ 2] 742 ldw x, (2, sp) + 0084A9 5B 05 [ 2] 743 addw sp, #5 + 0084AB FC [ 2] 744 jp (x) 745 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 1060: void USART_ClearFlag(USART_TypeDef* USARTx, USART_FLAG_TypeDef USART_FLAG) 746 ; ----------------------------------------- 747 ; function USART_ClearFlag 748 ; ----------------------------------------- - 008455 749 _USART_ClearFlag: + 0084AC 749 _USART_ClearFlag: 750 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 1065: USARTx->SR = (uint8_t)((uint16_t)~((uint16_t)USART_FLAG)); - 008455 16 03 [ 2] 751 ldw y, (0x03, sp) - 008457 90 53 [ 2] 752 cplw y - 008459 90 9F [ 1] 753 ld a, yl - 00845B F7 [ 1] 754 ld (x), a + 0084AC 16 03 [ 2] 751 ldw y, (0x03, sp) + 0084AE 90 53 [ 2] 752 cplw y + 0084B0 90 9F [ 1] 753 ld a, yl + 0084B2 F7 [ 1] 754 ld (x), a 755 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 1066: } - 00845C 1E 01 [ 2] 756 ldw x, (1, sp) - 00845E 5B 04 [ 2] 757 addw sp, #4 - 008460 FC [ 2] 758 jp (x) + 0084B3 1E 01 [ 2] 756 ldw x, (1, sp) + 0084B5 5B 04 [ 2] 757 addw sp, #4 + 0084B7 FC [ 2] 758 jp (x) 759 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 1083: ITStatus USART_GetITStatus(USART_TypeDef* USARTx, USART_IT_TypeDef USART_IT) 760 ; ----------------------------------------- 761 ; function USART_GetITStatus 762 ; ----------------------------------------- - 008461 763 _USART_GetITStatus: - 008461 52 09 [ 2] 764 sub sp, #9 - 008463 1F 08 [ 2] 765 ldw (0x08, sp), x + 0084B8 763 _USART_GetITStatus: + 0084B8 52 09 [ 2] 764 sub sp, #9 + 0084BA 1F 08 [ 2] 765 ldw (0x08, sp), x 766 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 1096: itpos = (uint8_t)((uint8_t)1 << (uint8_t)((uint8_t)USART_IT & (uint8_t)0x0F)); - 008465 7B 0D [ 1] 767 ld a, (0x0d, sp) - 008467 97 [ 1] 768 ld xl, a - 008468 A4 0F [ 1] 769 and a, #0x0f - 00846A 88 [ 1] 770 push a - 00846B A6 01 [ 1] 771 ld a, #0x01 - 00846D 6B 04 [ 1] 772 ld (0x04, sp), a - 00846F 84 [ 1] 773 pop a - 008470 4D [ 1] 774 tnz a - 008471 27 05 [ 1] 775 jreq 00179$ - 008473 776 00178$: - 008473 08 03 [ 1] 777 sll (0x03, sp) - 008475 4A [ 1] 778 dec a - 008476 26 FB [ 1] 779 jrne 00178$ - 008478 780 00179$: + 0084BC 7B 0D [ 1] 767 ld a, (0x0d, sp) + 0084BE 97 [ 1] 768 ld xl, a + 0084BF A4 0F [ 1] 769 and a, #0x0f + 0084C1 88 [ 1] 770 push a + 0084C2 A6 01 [ 1] 771 ld a, #0x01 + 0084C4 6B 04 [ 1] 772 ld (0x04, sp), a + 0084C6 84 [ 1] 773 pop a + 0084C7 4D [ 1] 774 tnz a + 0084C8 27 05 [ 1] 775 jreq 00179$ + 0084CA 776 00178$: + 0084CA 08 03 [ 1] 777 sll (0x03, sp) + 0084CC 4A [ 1] 778 dec a + 0084CD 26 FB [ 1] 779 jrne 00178$ + 0084CF 780 00179$: 781 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 1098: itmask1 = (uint8_t)((uint8_t)USART_IT >> (uint8_t)4); - 008478 9F [ 1] 782 ld a, xl - 008479 4E [ 1] 783 swap a - 00847A A4 0F [ 1] 784 and a, #0x0f + 0084CF 9F [ 1] 782 ld a, xl + 0084D0 4E [ 1] 783 swap a + 0084D1 A4 0F [ 1] 784 and a, #0x0f 785 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 1100: itmask2 = (uint8_t)((uint8_t)1 << itmask1); - 00847C 88 [ 1] 786 push a - 00847D A6 01 [ 1] 787 ld a, #0x01 - 00847F 6B 08 [ 1] 788 ld (0x08, sp), a - 008481 84 [ 1] 789 pop a - 008482 4D [ 1] 790 tnz a - 008483 27 05 [ 1] 791 jreq 00181$ - 008485 792 00180$: - 008485 08 07 [ 1] 793 sll (0x07, sp) - 008487 4A [ 1] 794 dec a - 008488 26 FB [ 1] 795 jrne 00180$ - 00848A 796 00181$: + 0084D3 88 [ 1] 786 push a + 0084D4 A6 01 [ 1] 787 ld a, #0x01 + 0084D6 6B 08 [ 1] 788 ld (0x08, sp), a + 0084D8 84 [ 1] 789 pop a + 0084D9 4D [ 1] 790 tnz a + 0084DA 27 05 [ 1] 791 jreq 00181$ + 0084DC 792 00180$: + 0084DC 08 07 [ 1] 793 sll (0x07, sp) + 0084DE 4A [ 1] 794 dec a + 0084DF 26 FB [ 1] 795 jrne 00180$ + 0084E1 796 00181$: 797 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 1103: if (USART_IT == USART_IT_PE) - 00848A 16 0C [ 2] 798 ldw y, (0x0c, sp) - 00848C 17 01 [ 2] 799 ldw (0x01, sp), y + 0084E1 16 0C [ 2] 798 ldw y, (0x0c, sp) + 0084E3 17 01 [ 2] 799 ldw (0x01, sp), y 800 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 1109: if (((USARTx->SR & itpos) != (uint8_t)0x00) && enablestatus) - 00848E 16 08 [ 2] 801 ldw y, (0x08, sp) - 008490 17 04 [ 2] 802 ldw (0x04, sp), y + 0084E5 16 08 [ 2] 801 ldw y, (0x08, sp) + 0084E7 17 04 [ 2] 802 ldw (0x04, sp), y 803 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 1103: if (USART_IT == USART_IT_PE) - 008492 1E 01 [ 2] 804 ldw x, (0x01, sp) - 008494 A3 01 00 [ 2] 805 cpw x, #0x0100 - 008497 26 1D [ 1] 806 jrne 00118$ + 0084E9 1E 01 [ 2] 804 ldw x, (0x01, sp) + 0084EB A3 01 00 [ 2] 805 cpw x, #0x0100 + 0084EE 26 1D [ 1] 806 jrne 00118$ 807 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 1106: enablestatus = (uint8_t)((uint8_t)USARTx->CR1 & itmask2); - 008499 16 08 [ 2] 808 ldw y, (0x08, sp) - 00849B 17 01 [ 2] 809 ldw (0x01, sp), y - 00849D 93 [ 1] 810 ldw x, y - 00849E E6 04 [ 1] 811 ld a, (0x4, x) - 0084A0 14 07 [ 1] 812 and a, (0x07, sp) - 0084A2 6B 07 [ 1] 813 ld (0x07, sp), a + 0084F0 16 08 [ 2] 808 ldw y, (0x08, sp) + 0084F2 17 01 [ 2] 809 ldw (0x01, sp), y + 0084F4 93 [ 1] 810 ldw x, y + 0084F5 E6 04 [ 1] 811 ld a, (0x4, x) + 0084F7 14 07 [ 1] 812 and a, (0x07, sp) + 0084F9 6B 07 [ 1] 813 ld (0x07, sp), a 814 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 1109: if (((USARTx->SR & itpos) != (uint8_t)0x00) && enablestatus) - 0084A4 1E 04 [ 2] 815 ldw x, (0x04, sp) - 0084A6 F6 [ 1] 816 ld a, (x) - 0084A7 14 03 [ 1] 817 and a, (0x03, sp) - 0084A9 27 08 [ 1] 818 jreq 00102$ - 0084AB 0D 07 [ 1] 819 tnz (0x07, sp) - 0084AD 27 04 [ 1] 820 jreq 00102$ + 0084FB 1E 04 [ 2] 815 ldw x, (0x04, sp) + 0084FD F6 [ 1] 816 ld a, (x) + 0084FE 14 03 [ 1] 817 and a, (0x03, sp) + 008500 27 08 [ 1] 818 jreq 00102$ + 008502 0D 07 [ 1] 819 tnz (0x07, sp) + 008504 27 04 [ 1] 820 jreq 00102$ 821 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 1112: pendingbitstatus = SET; - 0084AF A6 01 [ 1] 822 ld a, #0x01 - 0084B1 20 41 [ 2] 823 jra 00119$ - 0084B3 824 00102$: + 008506 A6 01 [ 1] 822 ld a, #0x01 + 008508 20 41 [ 2] 823 jra 00119$ + 00850A 824 00102$: 825 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 1117: pendingbitstatus = RESET; - 0084B3 4F [ 1] 826 clr a - 0084B4 20 3E [ 2] 827 jra 00119$ - 0084B6 828 00118$: + 00850A 4F [ 1] 826 clr a + 00850B 20 3E [ 2] 827 jra 00119$ + 00850D 828 00118$: 829 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 1124: enablestatus = (uint8_t)((uint8_t)USARTx->CR2 & itmask2); - 0084B6 1E 08 [ 2] 830 ldw x, (0x08, sp) - 0084B8 E6 05 [ 1] 831 ld a, (0x5, x) - 0084BA 14 07 [ 1] 832 and a, (0x07, sp) + 00850D 1E 08 [ 2] 830 ldw x, (0x08, sp) + 00850F E6 05 [ 1] 831 ld a, (0x5, x) + 008511 14 07 [ 1] 832 and a, (0x07, sp) 833 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 1121: else if (USART_IT == USART_IT_OR) - 0084BC 1E 01 [ 2] 834 ldw x, (0x01, sp) - 0084BE A3 02 35 [ 2] 835 cpw x, #0x0235 - 0084C1 26 20 [ 1] 836 jrne 00115$ + 008513 1E 01 [ 2] 834 ldw x, (0x01, sp) + 008515 A3 02 35 [ 2] 835 cpw x, #0x0235 + 008518 26 20 [ 1] 836 jrne 00115$ 837 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 1124: enablestatus = (uint8_t)((uint8_t)USARTx->CR2 & itmask2); - 0084C3 6B 06 [ 1] 838 ld (0x06, sp), a + 00851A 6B 06 [ 1] 838 ld (0x06, sp), a 839 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 1127: temp = (uint8_t)(USARTx->CR5 & USART_CR5_EIE); - 0084C5 1E 08 [ 2] 840 ldw x, (0x08, sp) - 0084C7 E6 08 [ 1] 841 ld a, (0x8, x) - 0084C9 A4 01 [ 1] 842 and a, #0x01 - 0084CB 6B 07 [ 1] 843 ld (0x07, sp), a + 00851C 1E 08 [ 2] 840 ldw x, (0x08, sp) + 00851E E6 08 [ 1] 841 ld a, (0x8, x) + 008520 A4 01 [ 1] 842 and a, #0x01 + 008522 6B 07 [ 1] 843 ld (0x07, sp), a 844 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 1129: if (( (USARTx->SR & itpos) != 0x00) && ((enablestatus || temp))) - 0084CD 1E 04 [ 2] 845 ldw x, (0x04, sp) - 0084CF F6 [ 1] 846 ld a, (x) - 0084D0 14 03 [ 1] 847 and a, (0x03, sp) - 0084D2 27 0C [ 1] 848 jreq 00106$ - 0084D4 0D 06 [ 1] 849 tnz (0x06, sp) - 0084D6 26 04 [ 1] 850 jrne 00105$ - 0084D8 0D 07 [ 1] 851 tnz (0x07, sp) - 0084DA 27 04 [ 1] 852 jreq 00106$ - 0084DC 853 00105$: + 008524 1E 04 [ 2] 845 ldw x, (0x04, sp) + 008526 F6 [ 1] 846 ld a, (x) + 008527 14 03 [ 1] 847 and a, (0x03, sp) + 008529 27 0C [ 1] 848 jreq 00106$ + 00852B 0D 06 [ 1] 849 tnz (0x06, sp) + 00852D 26 04 [ 1] 850 jrne 00105$ + 00852F 0D 07 [ 1] 851 tnz (0x07, sp) + 008531 27 04 [ 1] 852 jreq 00106$ + 008533 853 00105$: 854 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 1132: pendingbitstatus = SET; - 0084DC A6 01 [ 1] 855 ld a, #0x01 - 0084DE 20 14 [ 2] 856 jra 00119$ - 0084E0 857 00106$: + 008533 A6 01 [ 1] 855 ld a, #0x01 + 008535 20 14 [ 2] 856 jra 00119$ + 008537 857 00106$: 858 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 1137: pendingbitstatus = RESET; - 0084E0 4F [ 1] 859 clr a - 0084E1 20 11 [ 2] 860 jra 00119$ - 0084E3 861 00115$: + 008537 4F [ 1] 859 clr a + 008538 20 11 [ 2] 860 jra 00119$ + 00853A 861 00115$: 862 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 1144: enablestatus = (uint8_t)((uint8_t)USARTx->CR2 & itmask2); - 0084E3 6B 07 [ 1] 863 ld (0x07, sp), a + 00853A 6B 07 [ 1] 863 ld (0x07, sp), a 864 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 1146: if (((USARTx->SR & itpos) != (uint8_t)0x00) && enablestatus) - 0084E5 1E 04 [ 2] 865 ldw x, (0x04, sp) - 0084E7 F6 [ 1] 866 ld a, (x) - 0084E8 14 03 [ 1] 867 and a, (0x03, sp) - 0084EA 27 07 [ 1] 868 jreq 00111$ - 0084EC 0D 07 [ 1] 869 tnz (0x07, sp) - 0084EE 27 03 [ 1] 870 jreq 00111$ + 00853C 1E 04 [ 2] 865 ldw x, (0x04, sp) + 00853E F6 [ 1] 866 ld a, (x) + 00853F 14 03 [ 1] 867 and a, (0x03, sp) + 008541 27 07 [ 1] 868 jreq 00111$ + 008543 0D 07 [ 1] 869 tnz (0x07, sp) + 008545 27 03 [ 1] 870 jreq 00111$ 871 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 1149: pendingbitstatus = SET; - 0084F0 A6 01 [ 1] 872 ld a, #0x01 + 008547 A6 01 [ 1] 872 ld a, #0x01 873 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 1154: pendingbitstatus = RESET; - 0084F2 21 874 .byte 0x21 - 0084F3 875 00111$: - 0084F3 4F [ 1] 876 clr a - 0084F4 877 00119$: + 008549 21 874 .byte 0x21 + 00854A 875 00111$: + 00854A 4F [ 1] 876 clr a + 00854B 877 00119$: 878 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 1159: return pendingbitstatus; 879 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 1160: } - 0084F4 1E 0A [ 2] 880 ldw x, (10, sp) - 0084F6 5B 0D [ 2] 881 addw sp, #13 - 0084F8 FC [ 2] 882 jp (x) + 00854B 1E 0A [ 2] 880 ldw x, (10, sp) + 00854D 5B 0D [ 2] 881 addw sp, #13 + 00854F FC [ 2] 882 jp (x) 883 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 1183: void USART_ClearITPendingBit(USART_TypeDef* USARTx, USART_IT_TypeDef USART_IT) 884 ; ----------------------------------------- 885 ; function USART_ClearITPendingBit 886 ; ----------------------------------------- - 0084F9 887 _USART_ClearITPendingBit: + 008550 887 _USART_ClearITPendingBit: 888 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 1188: USARTx->SR &= (uint8_t)(~USART_SR_TC); - 0084F9 F6 [ 1] 889 ld a, (x) - 0084FA A4 BF [ 1] 890 and a, #0xbf - 0084FC F7 [ 1] 891 ld (x), a + 008550 F6 [ 1] 889 ld a, (x) + 008551 A4 BF [ 1] 890 and a, #0xbf + 008553 F7 [ 1] 891 ld (x), a 892 ; ../inc/stm8l151x/src/stm8l15x_usart.c: 1189: } - 0084FD 1E 01 [ 2] 893 ldw x, (1, sp) - 0084FF 5B 04 [ 2] 894 addw sp, #4 - 008501 FC [ 2] 895 jp (x) + 008554 1E 01 [ 2] 893 ldw x, (1, sp) + 008556 5B 04 [ 2] 894 addw sp, #4 + 008558 FC [ 2] 895 jp (x) 896 .area CODE 897 .area CONST 898 .area INITIALIZER diff --git a/firmware/inc/stm8l15x_conf.h b/firmware/inc/stm8l15x_conf.h index 418bf1b..3b3406e 100644 --- a/firmware/inc/stm8l15x_conf.h +++ b/firmware/inc/stm8l15x_conf.h @@ -45,7 +45,7 @@ #include "stm8l15x_gpio.h" // #include "stm8l15x_i2c.h" // #include "stm8l15x_irtim.h" -// #include "stm8l15x_itc.h" +#include "stm8l15x_itc.h" // #include "stm8l15x_iwdg.h" // #include "stm8l15x_lcd.h" // #include "stm8l15x_pwr.h" diff --git a/firmware/src/main.c b/firmware/src/main.c index 41b4ad9..c62338a 100644 --- a/firmware/src/main.c +++ b/firmware/src/main.c @@ -6,81 +6,88 @@ /* Private typedef -----------------------------------------------------------*/ /* Private define ------------------------------------------------------------*/ /* Private macro -------------------------------------------------------------*/ -#define Led_Init GPIO_Init(GPIOC, GPIO_Pin_4, GPIO_Mode_Out_PP_Low_Slow) -#define Led_ON GPIO_SetBits(GPIOC, GPIO_Pin_4) -#define Led_OFF GPIO_ResetBits(GPIOC, GPIO_Pin_4) -#define Led_TOG GPIO_ToggleBits(GPIOC, GPIO_Pin_4) + +// #define Led1_Init GPIO_Init(GPIOC, GPIO_Pin_4, GPIO_Mode_Out_PP_Low_Fast) +// #define Led1_ON GPIO_SetBits(GPIOC, GPIO_Pin_4) +// #define Led1_OFF GPIO_ResetBits(GPIOC, GPIO_Pin_4) + +#define Led2_Init GPIO_Init(GPIOB, GPIO_Pin_2, GPIO_Mode_Out_PP_Low_Fast) +#define Led2_ON GPIO_SetBits(GPIOB, GPIO_Pin_2) +#define Led2_OFF GPIO_ResetBits(GPIOB, GPIO_Pin_2) + +#define Mono_Init GPIO_Init(GPIOB, GPIO_Pin_0, GPIO_Mode_Out_PP_High_Slow) +#define Mono_OFF GPIO_SetBits(GPIOB, GPIO_Pin_0) +#define Mono_ON GPIO_ResetBits(GPIOB, GPIO_Pin_0) + /* Private variables ---------------------------------------------------------*/ /* Private function prototypes -----------------------------------------------*/ static void CLK_Config(void); -static void USART_Config(void); -static void putchar(uint8_t Data); -static void print(const char*); -static void println(const char*); -static void blink(uint16_t); -// static ErrorStatus RTC_Config(void); +static void PWR_Config(void); +static void blink2(); /* Private functions ---------------------------------------------------------*/ - void main(void) { - // CLK_Config(); - Led_Init; - blink(1); - // USART_Config(); - // println("Hello"); - while (1); + GPIO_Init(GPIOC, GPIO_Pin_0, GPIO_Mode_Out_PP_Low_Fast); + + // Led1_Init; + // Led1_ON; + CLK_Config(); + PWR_Config(); + Led2_Init; + Mono_Init; + blink2(); + // Led1_OFF; + + + CLK_RTCClockConfig(CLK_RTCCLKSource_LSE, CLK_RTCCLKDiv_1); + CLK_PeripheralClockConfig(CLK_Peripheral_RTC, ENABLE); + // RTC_RatioCmd(ENABLE); + + RTC_WakeUpCmd(DISABLE); + RTC_WakeUpClockConfig(RTC_WakeUpClock_RTCCLK_Div2); + RTC_SetWakeUpCounter(250); + RTC_WakeUpCmd(ENABLE); + + RTC_ITConfig(RTC_IT_WUT, ENABLE); + + enableInterrupts(); + while (1){ + blink2(); + halt(); + } +} + +static void PWR_Config(void){ + PWR->CSR1 = PWR_CSR1_PVDIF; + PWR->CSR2 = PWR_CSR2_RESET_VALUE; + PWR->CSR2 |= PWR_CSR2_ULP; + PWR->CSR2 |= PWR_CSR2_FWU; } static void CLK_Config(void) { - /* Select LSE as system clock source */ CLK_SYSCLKSourceSwitchCmd(ENABLE); - CLK_SYSCLKSourceConfig(CLK_SYSCLKSource_LSE); - /* system clock prescaler: 1*/ + CLK_SYSCLKSourceConfig(CLK_SYSCLKSource_LSI); CLK_SYSCLKDivConfig(CLK_SYSCLKDiv_1); - while (CLK_GetSYSCLKSource() != CLK_SYSCLKSource_LSE); + while (CLK_GetSYSCLKSource() != CLK_SYSCLKSource_LSI); } -static void blink(uint16_t repeats) { - for (uint16_t i = 0; i <= repeats; i++) { - Led_ON; - for (uint16_t j = 0; j <= 4000; j++) {nop();} - Led_OFF; - for (uint16_t j = 0; j <= 4000; j++) {nop();} - } +// static void blink1(uint32_t time) { +// Led1_ON; +// for (uint16_t j = 0; j <= time; j++) {nop();} +// Led1_OFF; +// } + +// static void blink1_alt() { +// Led1_ON; +// Led1_OFF; +// } + +static void blink2() { + Mono_ON; + Led2_ON; + Led2_OFF; + Mono_OFF; } -// static void putchar(uint8_t Data) { -// while (!(USART1->SR & USART_FLAG_TXE)); -// USART1->DR = Data; -// } - -// static void print(const char* s){ -// while (*s) { -// putchar(*s++); -// } -// } - -// static void println(const char* s){ -// print(s); -// putchar('\n'); -// } - -// static void USART_Config(void) -// { -// // remap USART1 to pins 5/6 (PA2/3) (TX/RX) -// SYSCFG->RMPCR1 &= ~(0b11 << 4); -// SYSCFG->RMPCR1 |= (0b01 << 4); - -// GPIO_Init(GPIOA, GPIO_Pin_2, GPIO_Mode_Out_PP_High_Fast); -// GPIO_Init(GPIOA, GPIO_Pin_3, GPIO_Mode_In_FL_No_IT); - -// CLK_PeripheralClockConfig(CLK_Peripheral_USART1, ENABLE); - -// USART_Init(USART1, (uint32_t)9600, -// USART_WordLength_8b, USART_StopBits_1, -// USART_Parity_No, USART_Mode_Tx); -// USART_Cmd(USART1, ENABLE); -// } - /************************ (C) suuppl *****END OF FILE****/ diff --git a/firmware/src/stm8l15x_it.c b/firmware/src/stm8l15x_it.c index 0cb9054..255d6da 100644 --- a/firmware/src/stm8l15x_it.c +++ b/firmware/src/stm8l15x_it.c @@ -110,6 +110,8 @@ INTERRUPT_HANDLER(DMA1_CHANNEL2_3_IRQHandler,3) */ INTERRUPT_HANDLER(RTC_CSSLSE_IRQHandler,4) { + RTC_ClearITPendingBit(RTC_IT_WUT); + /* In order to detect unexpected events during development, it is recommended to set a breakpoint on the following instruction. */