diff --git a/PlaygroundYoupi/.metadata/.log b/PlaygroundYoupi/.metadata/.log index 7cd6b59..c0e3679 100644 --- a/PlaygroundYoupi/.metadata/.log +++ b/PlaygroundYoupi/.metadata/.log @@ -391,3 +391,225 @@ java.lang.Exception: The project description file (.project) for 'L476_ats_blink !ENTRY org.eclipse.cdt.core 1 0 2020-11-17 09:17:55.325 !MESSAGE Indexed 'RealOne' (28 sources, 118 headers) in 5.04 sec: 10,966 declarations; 53,931 references; 3 unresolved inclusions; 29 syntax errors; 171 unresolved names (0.26%) + +!ENTRY com.st.stm32cube.ide.mcu.debug.stlink 4 4 2020-11-17 10:27:45.878 +!MESSAGE ST-LINK GDB server failed to start (exit code = 4) + +!ENTRY org.eclipse.cdt.dsf.gdb 4 5012 2020-11-17 10:27:45.903 +!MESSAGE Error in final launch sequence: + +Failed to start GDB server +!STACK 1 +org.eclipse.core.runtime.CoreException: Failed to start GDB server + at org.eclipse.cdt.dsf.concurrent.Query.get(Query.java:112) + at org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate.launchDebugSession(GdbLaunchDelegate.java:242) + at org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate.launchDebugger(GdbLaunchDelegate.java:106) + at org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate.launch(GdbLaunchDelegate.java:94) + at com.st.stm32cube.ide.mcu.debug.launch.DSFDelegate.launch(DSFDelegate.java:297) + at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:860) + at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:719) + at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1017) + at org.eclipse.debug.internal.ui.DebugUIPlugin$2.run(DebugUIPlugin.java:1220) + at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63) +Caused by: org.eclipse.core.runtime.CoreException: Error in initializing ST-LINK device. +Reason: (4) No device found on target. + at com.st.stm32cube.ide.mcu.debug.stlink.StLinkDebugHardware.verifyServer(StLinkDebugHardware.java:1685) + at com.st.stm32cube.ide.mcu.debug.launch.export.HardwareDebugUtil.startServer(HardwareDebugUtil.java:159) + at com.st.stm32cube.ide.mcu.debug.launch.export.HardwareDebugUtil.startServer(HardwareDebugUtil.java:79) + at com.st.stm32cube.ide.mcu.debug.launch.LaunchSequenceUtil.stepStartGDBServer(LaunchSequenceUtil.java:226) + at com.st.stm32cube.ide.mcu.debug.launch.GDBExtendedJtagDSFFinalLaunchSequence_7_12.stepStartGDBServer(GDBExtendedJtagDSFFinalLaunchSequence_7_12.java:100) + at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) + at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.lang.reflect.Method.invoke(Method.java:498) + at org.eclipse.cdt.dsf.concurrent.ReflectionSequence$ReflectionStep.execute(ReflectionSequence.java:160) + at org.eclipse.cdt.dsf.concurrent.Sequence.executeStep(Sequence.java:475) + at org.eclipse.cdt.dsf.concurrent.Sequence.access$2(Sequence.java:390) + at org.eclipse.cdt.dsf.concurrent.Sequence$2.handleSuccess(Sequence.java:437) + at org.eclipse.cdt.dsf.concurrent.RequestMonitor.handleCompleted(RequestMonitor.java:391) + at org.eclipse.cdt.dsf.concurrent.RequestMonitor$2.run(RequestMonitor.java:317) + at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) + at java.util.concurrent.FutureTask.run(FutureTask.java:266) + at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) + at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) + at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) + at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) + at java.lang.Thread.run(Thread.java:748) +!SUBENTRY 1 com.st.stm32cube.ide.mcu.debug.launch 4 0 2020-11-17 10:27:45.903 +!MESSAGE Failed to start GDB server +!STACK 1 +org.eclipse.core.runtime.CoreException: Error in initializing ST-LINK device. +Reason: (4) No device found on target. + at com.st.stm32cube.ide.mcu.debug.stlink.StLinkDebugHardware.verifyServer(StLinkDebugHardware.java:1685) + at com.st.stm32cube.ide.mcu.debug.launch.export.HardwareDebugUtil.startServer(HardwareDebugUtil.java:159) + at com.st.stm32cube.ide.mcu.debug.launch.export.HardwareDebugUtil.startServer(HardwareDebugUtil.java:79) + at com.st.stm32cube.ide.mcu.debug.launch.LaunchSequenceUtil.stepStartGDBServer(LaunchSequenceUtil.java:226) + at com.st.stm32cube.ide.mcu.debug.launch.GDBExtendedJtagDSFFinalLaunchSequence_7_12.stepStartGDBServer(GDBExtendedJtagDSFFinalLaunchSequence_7_12.java:100) + at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) + at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.lang.reflect.Method.invoke(Method.java:498) + at org.eclipse.cdt.dsf.concurrent.ReflectionSequence$ReflectionStep.execute(ReflectionSequence.java:160) + at org.eclipse.cdt.dsf.concurrent.Sequence.executeStep(Sequence.java:475) + at org.eclipse.cdt.dsf.concurrent.Sequence.access$2(Sequence.java:390) + at org.eclipse.cdt.dsf.concurrent.Sequence$2.handleSuccess(Sequence.java:437) + at org.eclipse.cdt.dsf.concurrent.RequestMonitor.handleCompleted(RequestMonitor.java:391) + at org.eclipse.cdt.dsf.concurrent.RequestMonitor$2.run(RequestMonitor.java:317) + at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) + at java.util.concurrent.FutureTask.run(FutureTask.java:266) + at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) + at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) + at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) + at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) + at java.lang.Thread.run(Thread.java:748) +!SUBENTRY 2 com.st.stm32cube.ide.mcu.debug.stlink 4 0 2020-11-17 10:27:45.904 +!MESSAGE Error in initializing ST-LINK device. +Reason: (4) No device found on target. + +!ENTRY com.st.stm32cube.ide.mcu.debug.stlink 4 4 2020-11-17 10:28:10.382 +!MESSAGE ST-LINK GDB server failed to start (exit code = 4) + +!ENTRY org.eclipse.cdt.dsf.gdb 4 5012 2020-11-17 10:28:10.412 +!MESSAGE Error in final launch sequence: + +Failed to start GDB server +!STACK 1 +org.eclipse.core.runtime.CoreException: Failed to start GDB server + at org.eclipse.cdt.dsf.concurrent.Query.get(Query.java:112) + at org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate.launchDebugSession(GdbLaunchDelegate.java:242) + at org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate.launchDebugger(GdbLaunchDelegate.java:106) + at org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate.launch(GdbLaunchDelegate.java:94) + at com.st.stm32cube.ide.mcu.debug.launch.DSFDelegate.launch(DSFDelegate.java:297) + at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:860) + at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:719) + at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1017) + at org.eclipse.debug.internal.ui.DebugUIPlugin$2.run(DebugUIPlugin.java:1220) + at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63) +Caused by: org.eclipse.core.runtime.CoreException: Error in initializing ST-LINK device. +Reason: (4) No device found on target. + at com.st.stm32cube.ide.mcu.debug.stlink.StLinkDebugHardware.verifyServer(StLinkDebugHardware.java:1685) + at com.st.stm32cube.ide.mcu.debug.launch.export.HardwareDebugUtil.startServer(HardwareDebugUtil.java:159) + at com.st.stm32cube.ide.mcu.debug.launch.export.HardwareDebugUtil.startServer(HardwareDebugUtil.java:79) + at com.st.stm32cube.ide.mcu.debug.launch.LaunchSequenceUtil.stepStartGDBServer(LaunchSequenceUtil.java:226) + at com.st.stm32cube.ide.mcu.debug.launch.GDBExtendedJtagDSFFinalLaunchSequence_7_12.stepStartGDBServer(GDBExtendedJtagDSFFinalLaunchSequence_7_12.java:100) + at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) + at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.lang.reflect.Method.invoke(Method.java:498) + at org.eclipse.cdt.dsf.concurrent.ReflectionSequence$ReflectionStep.execute(ReflectionSequence.java:160) + at org.eclipse.cdt.dsf.concurrent.Sequence.executeStep(Sequence.java:475) + at org.eclipse.cdt.dsf.concurrent.Sequence.access$2(Sequence.java:390) + at org.eclipse.cdt.dsf.concurrent.Sequence$2.handleSuccess(Sequence.java:437) + at org.eclipse.cdt.dsf.concurrent.RequestMonitor.handleCompleted(RequestMonitor.java:391) + at org.eclipse.cdt.dsf.concurrent.RequestMonitor$2.run(RequestMonitor.java:317) + at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) + at java.util.concurrent.FutureTask.run(FutureTask.java:266) + at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) + at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) + at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) + at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) + at java.lang.Thread.run(Thread.java:748) +!SUBENTRY 1 com.st.stm32cube.ide.mcu.debug.launch 4 0 2020-11-17 10:28:10.412 +!MESSAGE Failed to start GDB server +!STACK 1 +org.eclipse.core.runtime.CoreException: Error in initializing ST-LINK device. +Reason: (4) No device found on target. + at com.st.stm32cube.ide.mcu.debug.stlink.StLinkDebugHardware.verifyServer(StLinkDebugHardware.java:1685) + at com.st.stm32cube.ide.mcu.debug.launch.export.HardwareDebugUtil.startServer(HardwareDebugUtil.java:159) + at com.st.stm32cube.ide.mcu.debug.launch.export.HardwareDebugUtil.startServer(HardwareDebugUtil.java:79) + at com.st.stm32cube.ide.mcu.debug.launch.LaunchSequenceUtil.stepStartGDBServer(LaunchSequenceUtil.java:226) + at com.st.stm32cube.ide.mcu.debug.launch.GDBExtendedJtagDSFFinalLaunchSequence_7_12.stepStartGDBServer(GDBExtendedJtagDSFFinalLaunchSequence_7_12.java:100) + at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) + at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.lang.reflect.Method.invoke(Method.java:498) + at org.eclipse.cdt.dsf.concurrent.ReflectionSequence$ReflectionStep.execute(ReflectionSequence.java:160) + at org.eclipse.cdt.dsf.concurrent.Sequence.executeStep(Sequence.java:475) + at org.eclipse.cdt.dsf.concurrent.Sequence.access$2(Sequence.java:390) + at org.eclipse.cdt.dsf.concurrent.Sequence$2.handleSuccess(Sequence.java:437) + at org.eclipse.cdt.dsf.concurrent.RequestMonitor.handleCompleted(RequestMonitor.java:391) + at org.eclipse.cdt.dsf.concurrent.RequestMonitor$2.run(RequestMonitor.java:317) + at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) + at java.util.concurrent.FutureTask.run(FutureTask.java:266) + at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) + at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) + at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) + at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) + at java.lang.Thread.run(Thread.java:748) +!SUBENTRY 2 com.st.stm32cube.ide.mcu.debug.stlink 4 0 2020-11-17 10:28:10.413 +!MESSAGE Error in initializing ST-LINK device. +Reason: (4) No device found on target. + +!ENTRY com.st.stm32cube.ide.mcu.debug.stlink 4 4 2020-11-17 10:28:24.113 +!MESSAGE ST-LINK GDB server failed to start (exit code = 4) + +!ENTRY org.eclipse.cdt.dsf.gdb 4 5012 2020-11-17 10:28:24.145 +!MESSAGE Error in final launch sequence: + +Failed to start GDB server +!STACK 1 +org.eclipse.core.runtime.CoreException: Failed to start GDB server + at org.eclipse.cdt.dsf.concurrent.Query.get(Query.java:112) + at org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate.launchDebugSession(GdbLaunchDelegate.java:242) + at org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate.launchDebugger(GdbLaunchDelegate.java:106) + at org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate.launch(GdbLaunchDelegate.java:94) + at com.st.stm32cube.ide.mcu.debug.launch.DSFDelegate.launch(DSFDelegate.java:297) + at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:860) + at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:719) + at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1017) + at org.eclipse.debug.internal.ui.DebugUIPlugin$2.run(DebugUIPlugin.java:1220) + at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63) +Caused by: org.eclipse.core.runtime.CoreException: Error in initializing ST-LINK device. +Reason: (4) No device found on target. + at com.st.stm32cube.ide.mcu.debug.stlink.StLinkDebugHardware.verifyServer(StLinkDebugHardware.java:1685) + at com.st.stm32cube.ide.mcu.debug.launch.export.HardwareDebugUtil.startServer(HardwareDebugUtil.java:159) + at com.st.stm32cube.ide.mcu.debug.launch.export.HardwareDebugUtil.startServer(HardwareDebugUtil.java:79) + at com.st.stm32cube.ide.mcu.debug.launch.LaunchSequenceUtil.stepStartGDBServer(LaunchSequenceUtil.java:226) + at com.st.stm32cube.ide.mcu.debug.launch.GDBExtendedJtagDSFFinalLaunchSequence_7_12.stepStartGDBServer(GDBExtendedJtagDSFFinalLaunchSequence_7_12.java:100) + at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) + at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.lang.reflect.Method.invoke(Method.java:498) + at org.eclipse.cdt.dsf.concurrent.ReflectionSequence$ReflectionStep.execute(ReflectionSequence.java:160) + at org.eclipse.cdt.dsf.concurrent.Sequence.executeStep(Sequence.java:475) + at org.eclipse.cdt.dsf.concurrent.Sequence.access$2(Sequence.java:390) + at org.eclipse.cdt.dsf.concurrent.Sequence$2.handleSuccess(Sequence.java:437) + at org.eclipse.cdt.dsf.concurrent.RequestMonitor.handleCompleted(RequestMonitor.java:391) + at org.eclipse.cdt.dsf.concurrent.RequestMonitor$2.run(RequestMonitor.java:317) + at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) + at java.util.concurrent.FutureTask.run(FutureTask.java:266) + at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) + at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) + at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) + at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) + at java.lang.Thread.run(Thread.java:748) +!SUBENTRY 1 com.st.stm32cube.ide.mcu.debug.launch 4 0 2020-11-17 10:28:24.145 +!MESSAGE Failed to start GDB server +!STACK 1 +org.eclipse.core.runtime.CoreException: Error in initializing ST-LINK device. +Reason: (4) No device found on target. + at com.st.stm32cube.ide.mcu.debug.stlink.StLinkDebugHardware.verifyServer(StLinkDebugHardware.java:1685) + at com.st.stm32cube.ide.mcu.debug.launch.export.HardwareDebugUtil.startServer(HardwareDebugUtil.java:159) + at com.st.stm32cube.ide.mcu.debug.launch.export.HardwareDebugUtil.startServer(HardwareDebugUtil.java:79) + at com.st.stm32cube.ide.mcu.debug.launch.LaunchSequenceUtil.stepStartGDBServer(LaunchSequenceUtil.java:226) + at com.st.stm32cube.ide.mcu.debug.launch.GDBExtendedJtagDSFFinalLaunchSequence_7_12.stepStartGDBServer(GDBExtendedJtagDSFFinalLaunchSequence_7_12.java:100) + at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) + at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.lang.reflect.Method.invoke(Method.java:498) + at org.eclipse.cdt.dsf.concurrent.ReflectionSequence$ReflectionStep.execute(ReflectionSequence.java:160) + at org.eclipse.cdt.dsf.concurrent.Sequence.executeStep(Sequence.java:475) + at org.eclipse.cdt.dsf.concurrent.Sequence.access$2(Sequence.java:390) + at org.eclipse.cdt.dsf.concurrent.Sequence$2.handleSuccess(Sequence.java:437) + at org.eclipse.cdt.dsf.concurrent.RequestMonitor.handleCompleted(RequestMonitor.java:391) + at org.eclipse.cdt.dsf.concurrent.RequestMonitor$2.run(RequestMonitor.java:317) + at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) + at java.util.concurrent.FutureTask.run(FutureTask.java:266) + at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) + at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) + at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) + at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) + at java.lang.Thread.run(Thread.java:748) +!SUBENTRY 2 com.st.stm32cube.ide.mcu.debug.stlink 4 0 2020-11-17 10:28:24.145 +!MESSAGE Error in initializing ST-LINK device. +Reason: (4) No device found on target. diff --git a/PlaygroundYoupi/.metadata/.plugins/com.st.stm32cube.ide.mcu.livewatch/params.dat b/PlaygroundYoupi/.metadata/.plugins/com.st.stm32cube.ide.mcu.livewatch/params.dat index e69de29..92f80e6 100644 --- a/PlaygroundYoupi/.metadata/.plugins/com.st.stm32cube.ide.mcu.livewatch/params.dat +++ b/PlaygroundYoupi/.metadata/.plugins/com.st.stm32cube.ide.mcu.livewatch/params.dat @@ -0,0 +1 @@ +NUMBER_FORMAT=0 diff --git a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.cdt.core/.log b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.cdt.core/.log index d74b85a..ce74b49 100644 --- a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.cdt.core/.log +++ b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.cdt.core/.log @@ -1,2 +1,3 @@ *** SESSION Nov 05, 2020 10:46:36.34 ------------------------------------------- *** SESSION Nov 16, 2020 08:11:47.28 ------------------------------------------- +*** SESSION Nov 17, 2020 08:14:51.13 ------------------------------------------- diff --git a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.cdt.core/RealOne.1605601070222.pdom b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.cdt.core/RealOne.1605601070222.pdom index af9742f..a5b84a0 100644 Binary files a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.cdt.core/RealOne.1605601070222.pdom and b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.cdt.core/RealOne.1605601070222.pdom differ diff --git a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.cdt.dsf.ui/dialog_settings.xml b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.cdt.dsf.ui/dialog_settings.xml new file mode 100644 index 0000000..1feea7b --- /dev/null +++ b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.cdt.dsf.ui/dialog_settings.xml @@ -0,0 +1,9 @@ + +
+
+ + + + +
+
diff --git a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.cdt.ui/RealOne.build.log b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.cdt.ui/RealOne.build.log index ea10d6e..46cf1b1 100644 --- a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.cdt.ui/RealOne.build.log +++ b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.cdt.ui/RealOne.build.log @@ -1,10 +1,10 @@ -09:25:41 **** Incremental Build of configuration Debug for project RealOne **** +10:38:01 **** Incremental Build of configuration Debug for project RealOne **** make -j8 all arm-none-eabi-size RealOne.elf text data bss dec hex filename - 3632 24 1576 5232 1470 RealOne.elf + 3988 20 1572 5580 15cc RealOne.elf Finished building: default.size.stdout -09:25:41 Build Finished. 0 errors, 0 warnings. (took 325ms) +10:38:01 Build Finished. 0 errors, 0 warnings. (took 315ms) diff --git a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.cdt.ui/dialog_settings.xml b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.cdt.ui/dialog_settings.xml index 8c1e61e..ae4e422 100644 --- a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.cdt.ui/dialog_settings.xml +++ b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.cdt.ui/dialog_settings.xml @@ -8,4 +8,6 @@ +
+
diff --git a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.cdt.ui/global-build.log b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.cdt.ui/global-build.log index f6dd6f1..1aea643 100644 --- a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.cdt.ui/global-build.log +++ b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.cdt.ui/global-build.log @@ -154,3 +154,614 @@ arm-none-eabi-size RealOne.elf 3632 24 1576 5232 1470 RealOne.elf Finished building: default.size.stdout +09:28:07 **** Incremental Build of configuration Debug for project RealOne **** +make -j8 all +arm-none-eabi-gcc "../Core/Src/main.c" -mcpu=cortex-m4 -std=gnu11 -g3 '-DHSE_VALUE=8000000' '-DMSI_VALUE=4000000' '-DLSI_VALUE=32000' '-DHSE_STARTUP_TIMEOUT=100' '-DHSI_VALUE=16000000' -DDEBUG '-DLSE_STARTUP_TIMEOUT=5000' '-DLSE_VALUE=32768' '-DDATA_CACHE_ENABLE=1' -DUSE_HAL_DRIVER '-DVDD_VALUE=3300' '-DINSTRUCTION_CACHE_ENABLE=1' '-DEXTERNALSAI2_CLOCK_VALUE=2097000' -DSTM32L476xx -DUSE_FULL_LL_DRIVER '-DEXTERNALSAI1_CLOCK_VALUE=2097000' '-DPREFETCH_ENABLE=0' -c -I../Core/Inc -I../Drivers/STM32L4xx_HAL_Driver/Inc -I../Drivers/CMSIS/Device/ST/STM32L4xx/Include -I../Drivers/CMSIS/Include -I../Drivers/STM32L4xx_HAL_Driver/Inc/Legacy -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"Core/Src/main.d" -MT"Core/Src/main.o" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "Core/Src/main.o" +In file included from ../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.h:30:0, + from ../Core/Inc/main.h:31, + from ../Core/Src/main.c:8: +../Core/Inc/stm32l4xx_hal_conf.h:183:0: warning: "VDD_VALUE" redefined + #define VDD_VALUE 3300U /*!< Value of VDD in mv */ + +:0:0: note: this is the location of the previous definition +In file included from ../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.h:30:0, + from ../Core/Inc/main.h:31, + from ../Core/Src/main.c:8: +../Core/Inc/stm32l4xx_hal_conf.h:186:0: warning: "PREFETCH_ENABLE" redefined + #define PREFETCH_ENABLE 0U + +:0:0: note: this is the location of the previous definition +In file included from ../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.h:30:0, + from ../Core/Inc/main.h:31, + from ../Core/Src/main.c:8: +../Core/Inc/stm32l4xx_hal_conf.h:187:0: warning: "INSTRUCTION_CACHE_ENABLE" redefined + #define INSTRUCTION_CACHE_ENABLE 1U + +:0:0: note: this is the location of the previous definition +In file included from ../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.h:30:0, + from ../Core/Inc/main.h:31, + from ../Core/Src/main.c:8: +../Core/Inc/stm32l4xx_hal_conf.h:188:0: warning: "DATA_CACHE_ENABLE" redefined + #define DATA_CACHE_ENABLE 1U + +:0:0: note: this is the location of the previous definition +arm-none-eabi-gcc -o "RealOne.elf" @"objects.list" -mcpu=cortex-m4 -T"C:\Users\camer\Desktop\LoPoSo\RealOne\STM32L476RGTX_FLASH.ld" --specs=nosys.specs -Wl,-Map="RealOne.map" -Wl,--gc-sections -static --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -Wl,--start-group -lc -lm -Wl,--end-group +Finished building target: RealOne.elf + +arm-none-eabi-objdump -h -S RealOne.elf > "RealOne.list" +arm-none-eabi-objcopy -O binary RealOne.elf "RealOne.bin" +arm-none-eabi-size RealOne.elf + text data bss dec hex filename + 3820 20 1572 5412 1524 RealOne.elf +Finished building: default.size.stdout + +Finished building: RealOne.bin +Finished building: RealOne.list + + +09:30:04 **** Incremental Build of configuration Debug for project RealOne **** +make -j8 all +arm-none-eabi-size RealOne.elf + text data bss dec hex filename + 3820 20 1572 5412 1524 RealOne.elf +Finished building: default.size.stdout + +09:33:28 **** Incremental Build of configuration Debug for project RealOne **** +make -j8 all +arm-none-eabi-gcc "../Core/Src/main.c" -mcpu=cortex-m4 -std=gnu11 -g3 '-DHSE_VALUE=8000000' '-DMSI_VALUE=4000000' '-DLSI_VALUE=32000' '-DHSE_STARTUP_TIMEOUT=100' '-DHSI_VALUE=16000000' -DDEBUG '-DLSE_STARTUP_TIMEOUT=5000' '-DLSE_VALUE=32768' '-DDATA_CACHE_ENABLE=1' -DUSE_HAL_DRIVER '-DVDD_VALUE=3300' '-DINSTRUCTION_CACHE_ENABLE=1' '-DEXTERNALSAI2_CLOCK_VALUE=2097000' -DSTM32L476xx -DUSE_FULL_LL_DRIVER '-DEXTERNALSAI1_CLOCK_VALUE=2097000' '-DPREFETCH_ENABLE=0' -c -I../Core/Inc -I../Drivers/STM32L4xx_HAL_Driver/Inc -I../Drivers/CMSIS/Device/ST/STM32L4xx/Include -I../Drivers/CMSIS/Include -I../Drivers/STM32L4xx_HAL_Driver/Inc/Legacy -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"Core/Src/main.d" -MT"Core/Src/main.o" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "Core/Src/main.o" +In file included from ../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.h:30:0, + from ../Core/Inc/main.h:31, + from ../Core/Src/main.c:8: +../Core/Inc/stm32l4xx_hal_conf.h:183:0: warning: "VDD_VALUE" redefined + #define VDD_VALUE 3300U /*!< Value of VDD in mv */ + +:0:0: note: this is the location of the previous definition +In file included from ../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.h:30:0, + from ../Core/Inc/main.h:31, + from ../Core/Src/main.c:8: +../Core/Inc/stm32l4xx_hal_conf.h:186:0: warning: "PREFETCH_ENABLE" redefined + #define PREFETCH_ENABLE 0U + +:0:0: note: this is the location of the previous definition +In file included from ../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.h:30:0, + from ../Core/Inc/main.h:31, + from ../Core/Src/main.c:8: +../Core/Inc/stm32l4xx_hal_conf.h:187:0: warning: "INSTRUCTION_CACHE_ENABLE" redefined + #define INSTRUCTION_CACHE_ENABLE 1U + +:0:0: note: this is the location of the previous definition +In file included from ../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.h:30:0, + from ../Core/Inc/main.h:31, + from ../Core/Src/main.c:8: +../Core/Inc/stm32l4xx_hal_conf.h:188:0: warning: "DATA_CACHE_ENABLE" redefined + #define DATA_CACHE_ENABLE 1U + +:0:0: note: this is the location of the previous definition +../Core/Src/main.c: In function 'main': +../Core/Src/main.c:215:1: error: expected declaration or statement at end of input + } + ^ +At top level: +../Core/Src/main.c:172:6: warning: 'SystemClock_Config_80M' defined but not used [-Wunused-function] + void SystemClock_Config_80M(void) + ^~~~~~~~~~~~~~~~~~~~~~ +../Core/Src/main.c:107:6: warning: 'SystemClock_Config_24M_LSE' defined but not used [-Wunused-function] + void SystemClock_Config_24M_LSE(void) + ^~~~~~~~~~~~~~~~~~~~~~~~~~ +make: *** [Core/Src/subdir.mk:38: Core/Src/main.o] Error 1 +"make -j8 all" terminated with exit code 2. Build might be incomplete. +09:35:25 **** Incremental Build of configuration Debug for project RealOne **** +make -j8 all +arm-none-eabi-gcc "../Core/Src/main.c" -mcpu=cortex-m4 -std=gnu11 -g3 '-DHSE_VALUE=8000000' '-DMSI_VALUE=4000000' '-DLSI_VALUE=32000' '-DHSE_STARTUP_TIMEOUT=100' '-DHSI_VALUE=16000000' -DDEBUG '-DLSE_STARTUP_TIMEOUT=5000' '-DLSE_VALUE=32768' '-DDATA_CACHE_ENABLE=1' -DUSE_HAL_DRIVER '-DVDD_VALUE=3300' '-DINSTRUCTION_CACHE_ENABLE=1' '-DEXTERNALSAI2_CLOCK_VALUE=2097000' -DSTM32L476xx -DUSE_FULL_LL_DRIVER '-DEXTERNALSAI1_CLOCK_VALUE=2097000' '-DPREFETCH_ENABLE=0' -c -I../Core/Inc -I../Drivers/STM32L4xx_HAL_Driver/Inc -I../Drivers/CMSIS/Device/ST/STM32L4xx/Include -I../Drivers/CMSIS/Include -I../Drivers/STM32L4xx_HAL_Driver/Inc/Legacy -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"Core/Src/main.d" -MT"Core/Src/main.o" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "Core/Src/main.o" +In file included from ../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.h:30:0, + from ../Core/Inc/main.h:31, + from ../Core/Src/main.c:8: +../Core/Inc/stm32l4xx_hal_conf.h:183:0: warning: "VDD_VALUE" redefined + #define VDD_VALUE 3300U /*!< Value of VDD in mv */ + +:0:0: note: this is the location of the previous definition +In file included from ../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.h:30:0, + from ../Core/Inc/main.h:31, + from ../Core/Src/main.c:8: +../Core/Inc/stm32l4xx_hal_conf.h:186:0: warning: "PREFETCH_ENABLE" redefined + #define PREFETCH_ENABLE 0U + +:0:0: note: this is the location of the previous definition +In file included from ../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.h:30:0, + from ../Core/Inc/main.h:31, + from ../Core/Src/main.c:8: +../Core/Inc/stm32l4xx_hal_conf.h:187:0: warning: "INSTRUCTION_CACHE_ENABLE" redefined + #define INSTRUCTION_CACHE_ENABLE 1U + +:0:0: note: this is the location of the previous definition +In file included from ../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.h:30:0, + from ../Core/Inc/main.h:31, + from ../Core/Src/main.c:8: +../Core/Inc/stm32l4xx_hal_conf.h:188:0: warning: "DATA_CACHE_ENABLE" redefined + #define DATA_CACHE_ENABLE 1U + +:0:0: note: this is the location of the previous definition +../Core/Src/main.c: In function 'main': +../Core/Src/main.c:215:1: error: expected declaration or statement at end of input + } + ^ +At top level: +../Core/Src/main.c:172:6: warning: 'SystemClock_Config_80M' defined but not used [-Wunused-function] + void SystemClock_Config_80M(void) + ^~~~~~~~~~~~~~~~~~~~~~ +../Core/Src/main.c:107:6: warning: 'SystemClock_Config_24M_LSE' defined but not used [-Wunused-function] + void SystemClock_Config_24M_LSE(void) + ^~~~~~~~~~~~~~~~~~~~~~~~~~ +make: *** [Core/Src/subdir.mk:38: Core/Src/main.o] Error 1 +"make -j8 all" terminated with exit code 2. Build might be incomplete. +09:39:04 **** Incremental Build of configuration Debug for project RealOne **** +make -j8 all +arm-none-eabi-gcc "../Core/Src/main.c" -mcpu=cortex-m4 -std=gnu11 -g3 '-DHSE_VALUE=8000000' '-DMSI_VALUE=4000000' '-DLSI_VALUE=32000' '-DHSE_STARTUP_TIMEOUT=100' '-DHSI_VALUE=16000000' -DDEBUG '-DLSE_STARTUP_TIMEOUT=5000' '-DLSE_VALUE=32768' '-DDATA_CACHE_ENABLE=1' -DUSE_HAL_DRIVER '-DVDD_VALUE=3300' '-DINSTRUCTION_CACHE_ENABLE=1' '-DEXTERNALSAI2_CLOCK_VALUE=2097000' -DSTM32L476xx -DUSE_FULL_LL_DRIVER '-DEXTERNALSAI1_CLOCK_VALUE=2097000' '-DPREFETCH_ENABLE=0' -c -I../Core/Inc -I../Drivers/STM32L4xx_HAL_Driver/Inc -I../Drivers/CMSIS/Device/ST/STM32L4xx/Include -I../Drivers/CMSIS/Include -I../Drivers/STM32L4xx_HAL_Driver/Inc/Legacy -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"Core/Src/main.d" -MT"Core/Src/main.o" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "Core/Src/main.o" +In file included from ../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.h:30:0, + from ../Core/Inc/main.h:31, + from ../Core/Src/main.c:8: +../Core/Inc/stm32l4xx_hal_conf.h:183:0: warning: "VDD_VALUE" redefined + #define VDD_VALUE 3300U /*!< Value of VDD in mv */ + +:0:0: note: this is the location of the previous definition +In file included from ../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.h:30:0, + from ../Core/Inc/main.h:31, + from ../Core/Src/main.c:8: +../Core/Inc/stm32l4xx_hal_conf.h:186:0: warning: "PREFETCH_ENABLE" redefined + #define PREFETCH_ENABLE 0U + +:0:0: note: this is the location of the previous definition +In file included from ../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.h:30:0, + from ../Core/Inc/main.h:31, + from ../Core/Src/main.c:8: +../Core/Inc/stm32l4xx_hal_conf.h:187:0: warning: "INSTRUCTION_CACHE_ENABLE" redefined + #define INSTRUCTION_CACHE_ENABLE 1U + +:0:0: note: this is the location of the previous definition +In file included from ../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.h:30:0, + from ../Core/Inc/main.h:31, + from ../Core/Src/main.c:8: +../Core/Inc/stm32l4xx_hal_conf.h:188:0: warning: "DATA_CACHE_ENABLE" redefined + #define DATA_CACHE_ENABLE 1U + +:0:0: note: this is the location of the previous definition +arm-none-eabi-gcc -o "RealOne.elf" @"objects.list" -mcpu=cortex-m4 -T"C:\Users\camer\Desktop\LoPoSo\RealOne\STM32L476RGTX_FLASH.ld" --specs=nosys.specs -Wl,-Map="RealOne.map" -Wl,--gc-sections -static --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -Wl,--start-group -lc -lm -Wl,--end-group +Finished building target: RealOne.elf + +arm-none-eabi-objdump -h -S RealOne.elf > "RealOne.list" +arm-none-eabi-objcopy -O binary RealOne.elf "RealOne.bin" +arm-none-eabi-size RealOne.elf + text data bss dec hex filename + 3780 20 1572 5372 14fc RealOne.elf +Finished building: default.size.stdout + +Finished building: RealOne.bin + +Finished building: RealOne.list + +09:39:09 **** Incremental Build of configuration Debug for project RealOne **** +make -j8 all +arm-none-eabi-size RealOne.elf + text data bss dec hex filename + 3780 20 1572 5372 14fc RealOne.elf +Finished building: default.size.stdout + +09:44:36 **** Incremental Build of configuration Debug for project RealOne **** +make -j8 all +arm-none-eabi-gcc "../Core/Src/main.c" -mcpu=cortex-m4 -std=gnu11 -g3 '-DHSE_VALUE=8000000' '-DMSI_VALUE=4000000' '-DLSI_VALUE=32000' '-DHSE_STARTUP_TIMEOUT=100' '-DHSI_VALUE=16000000' -DDEBUG '-DLSE_STARTUP_TIMEOUT=5000' '-DLSE_VALUE=32768' '-DDATA_CACHE_ENABLE=1' -DUSE_HAL_DRIVER '-DVDD_VALUE=3300' '-DINSTRUCTION_CACHE_ENABLE=1' '-DEXTERNALSAI2_CLOCK_VALUE=2097000' -DSTM32L476xx -DUSE_FULL_LL_DRIVER '-DEXTERNALSAI1_CLOCK_VALUE=2097000' '-DPREFETCH_ENABLE=0' -c -I../Core/Inc -I../Drivers/STM32L4xx_HAL_Driver/Inc -I../Drivers/CMSIS/Device/ST/STM32L4xx/Include -I../Drivers/CMSIS/Include -I../Drivers/STM32L4xx_HAL_Driver/Inc/Legacy -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"Core/Src/main.d" -MT"Core/Src/main.o" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "Core/Src/main.o" +In file included from ../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.h:30:0, + from ../Core/Inc/main.h:31, + from ../Core/Src/main.c:8: +../Core/Inc/stm32l4xx_hal_conf.h:183:0: warning: "VDD_VALUE" redefined + #define VDD_VALUE 3300U /*!< Value of VDD in mv */ + +:0:0: note: this is the location of the previous definition +In file included from ../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.h:30:0, + from ../Core/Inc/main.h:31, + from ../Core/Src/main.c:8: +../Core/Inc/stm32l4xx_hal_conf.h:186:0: warning: "PREFETCH_ENABLE" redefined + #define PREFETCH_ENABLE 0U + +:0:0: note: this is the location of the previous definition +In file included from ../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.h:30:0, + from ../Core/Inc/main.h:31, + from ../Core/Src/main.c:8: +../Core/Inc/stm32l4xx_hal_conf.h:187:0: warning: "INSTRUCTION_CACHE_ENABLE" redefined + #define INSTRUCTION_CACHE_ENABLE 1U + +:0:0: note: this is the location of the previous definition +In file included from ../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.h:30:0, + from ../Core/Inc/main.h:31, + from ../Core/Src/main.c:8: +../Core/Inc/stm32l4xx_hal_conf.h:188:0: warning: "DATA_CACHE_ENABLE" redefined + #define DATA_CACHE_ENABLE 1U + +:0:0: note: this is the location of the previous definition +arm-none-eabi-gcc -o "RealOne.elf" @"objects.list" -mcpu=cortex-m4 -T"C:\Users\camer\Desktop\LoPoSo\RealOne\STM32L476RGTX_FLASH.ld" --specs=nosys.specs -Wl,-Map="RealOne.map" -Wl,--gc-sections -static --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -Wl,--start-group -lc -lm -Wl,--end-group +Finished building target: RealOne.elf + +arm-none-eabi-objdump -h -S RealOne.elf > "RealOne.list" +arm-none-eabi-objcopy -O binary RealOne.elf "RealOne.bin" +arm-none-eabi-size RealOne.elf + text data bss dec hex filename + 3780 20 1572 5372 14fc RealOne.elf +Finished building: default.size.stdout + +Finished building: RealOne.bin +Finished building: RealOne.list + + +09:44:41 **** Incremental Build of configuration Debug for project RealOne **** +make -j8 all +arm-none-eabi-size RealOne.elf + text data bss dec hex filename + 3780 20 1572 5372 14fc RealOne.elf +Finished building: default.size.stdout + +09:47:38 **** Incremental Build of configuration Debug for project RealOne **** +make -j8 all +arm-none-eabi-size RealOne.elf + text data bss dec hex filename + 3780 20 1572 5372 14fc RealOne.elf +Finished building: default.size.stdout + +09:49:56 **** Incremental Build of configuration Debug for project RealOne **** +make -j8 all +arm-none-eabi-gcc "../Core/Src/main.c" -mcpu=cortex-m4 -std=gnu11 -g3 '-DHSE_VALUE=8000000' '-DMSI_VALUE=4000000' '-DLSI_VALUE=32000' '-DHSE_STARTUP_TIMEOUT=100' '-DHSI_VALUE=16000000' -DDEBUG '-DLSE_STARTUP_TIMEOUT=5000' '-DLSE_VALUE=32768' '-DDATA_CACHE_ENABLE=1' -DUSE_HAL_DRIVER '-DVDD_VALUE=3300' '-DINSTRUCTION_CACHE_ENABLE=1' '-DEXTERNALSAI2_CLOCK_VALUE=2097000' -DSTM32L476xx -DUSE_FULL_LL_DRIVER '-DEXTERNALSAI1_CLOCK_VALUE=2097000' '-DPREFETCH_ENABLE=0' -c -I../Core/Inc -I../Drivers/STM32L4xx_HAL_Driver/Inc -I../Drivers/CMSIS/Device/ST/STM32L4xx/Include -I../Drivers/CMSIS/Include -I../Drivers/STM32L4xx_HAL_Driver/Inc/Legacy -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"Core/Src/main.d" -MT"Core/Src/main.o" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "Core/Src/main.o" +In file included from ../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.h:30:0, + from ../Core/Inc/main.h:31, + from ../Core/Src/main.c:8: +../Core/Inc/stm32l4xx_hal_conf.h:183:0: warning: "VDD_VALUE" redefined + #define VDD_VALUE 3300U /*!< Value of VDD in mv */ + +:0:0: note: this is the location of the previous definition +In file included from ../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.h:30:0, + from ../Core/Inc/main.h:31, + from ../Core/Src/main.c:8: +../Core/Inc/stm32l4xx_hal_conf.h:186:0: warning: "PREFETCH_ENABLE" redefined + #define PREFETCH_ENABLE 0U + +:0:0: note: this is the location of the previous definition +In file included from ../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.h:30:0, + from ../Core/Inc/main.h:31, + from ../Core/Src/main.c:8: +../Core/Inc/stm32l4xx_hal_conf.h:187:0: warning: "INSTRUCTION_CACHE_ENABLE" redefined + #define INSTRUCTION_CACHE_ENABLE 1U + +:0:0: note: this is the location of the previous definition +In file included from ../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.h:30:0, + from ../Core/Inc/main.h:31, + from ../Core/Src/main.c:8: +../Core/Inc/stm32l4xx_hal_conf.h:188:0: warning: "DATA_CACHE_ENABLE" redefined + #define DATA_CACHE_ENABLE 1U + +:0:0: note: this is the location of the previous definition +arm-none-eabi-gcc -o "RealOne.elf" @"objects.list" -mcpu=cortex-m4 -T"C:\Users\camer\Desktop\LoPoSo\RealOne\STM32L476RGTX_FLASH.ld" --specs=nosys.specs -Wl,-Map="RealOne.map" -Wl,--gc-sections -static --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -Wl,--start-group -lc -lm -Wl,--end-group +Finished building target: RealOne.elf + +arm-none-eabi-objdump -h -S RealOne.elf > "RealOne.list" +arm-none-eabi-objcopy -O binary RealOne.elf "RealOne.bin" +arm-none-eabi-size RealOne.elf + text data bss dec hex filename + 3796 20 1572 5388 150c RealOne.elf +Finished building: default.size.stdout + +Finished building: RealOne.bin +Finished building: RealOne.list + + +09:51:43 **** Incremental Build of configuration Debug for project RealOne **** +make -j8 all +arm-none-eabi-size RealOne.elf + text data bss dec hex filename + 3796 20 1572 5388 150c RealOne.elf +Finished building: default.size.stdout + +09:52:52 **** Incremental Build of configuration Debug for project RealOne **** +make -j8 all +arm-none-eabi-size RealOne.elf + text data bss dec hex filename + 3796 20 1572 5388 150c RealOne.elf +Finished building: default.size.stdout + +09:56:36 **** Incremental Build of configuration Debug for project RealOne **** +make -j8 all +arm-none-eabi-gcc "../Core/Src/main.c" -mcpu=cortex-m4 -std=gnu11 -g3 '-DHSE_VALUE=8000000' '-DMSI_VALUE=4000000' '-DLSI_VALUE=32000' '-DHSE_STARTUP_TIMEOUT=100' '-DHSI_VALUE=16000000' -DDEBUG '-DLSE_STARTUP_TIMEOUT=5000' '-DLSE_VALUE=32768' '-DDATA_CACHE_ENABLE=1' -DUSE_HAL_DRIVER '-DVDD_VALUE=3300' '-DINSTRUCTION_CACHE_ENABLE=1' '-DEXTERNALSAI2_CLOCK_VALUE=2097000' -DSTM32L476xx -DUSE_FULL_LL_DRIVER '-DEXTERNALSAI1_CLOCK_VALUE=2097000' '-DPREFETCH_ENABLE=0' -c -I../Core/Inc -I../Drivers/STM32L4xx_HAL_Driver/Inc -I../Drivers/CMSIS/Device/ST/STM32L4xx/Include -I../Drivers/CMSIS/Include -I../Drivers/STM32L4xx_HAL_Driver/Inc/Legacy -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"Core/Src/main.d" -MT"Core/Src/main.o" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "Core/Src/main.o" +In file included from ../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.h:30:0, + from ../Core/Inc/main.h:31, + from ../Core/Src/main.c:8: +../Core/Inc/stm32l4xx_hal_conf.h:183:0: warning: "VDD_VALUE" redefined + #define VDD_VALUE 3300U /*!< Value of VDD in mv */ + +:0:0: note: this is the location of the previous definition +In file included from ../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.h:30:0, + from ../Core/Inc/main.h:31, + from ../Core/Src/main.c:8: +../Core/Inc/stm32l4xx_hal_conf.h:186:0: warning: "PREFETCH_ENABLE" redefined + #define PREFETCH_ENABLE 0U + +:0:0: note: this is the location of the previous definition +In file included from ../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.h:30:0, + from ../Core/Inc/main.h:31, + from ../Core/Src/main.c:8: +../Core/Inc/stm32l4xx_hal_conf.h:187:0: warning: "INSTRUCTION_CACHE_ENABLE" redefined + #define INSTRUCTION_CACHE_ENABLE 1U + +:0:0: note: this is the location of the previous definition +In file included from ../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.h:30:0, + from ../Core/Inc/main.h:31, + from ../Core/Src/main.c:8: +../Core/Inc/stm32l4xx_hal_conf.h:188:0: warning: "DATA_CACHE_ENABLE" redefined + #define DATA_CACHE_ENABLE 1U + +:0:0: note: this is the location of the previous definition +arm-none-eabi-gcc -o "RealOne.elf" @"objects.list" -mcpu=cortex-m4 -T"C:\Users\camer\Desktop\LoPoSo\RealOne\STM32L476RGTX_FLASH.ld" --specs=nosys.specs -Wl,-Map="RealOne.map" -Wl,--gc-sections -static --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -Wl,--start-group -lc -lm -Wl,--end-group +Finished building target: RealOne.elf + +arm-none-eabi-objdump -h -S RealOne.elf > "RealOne.list" +arm-none-eabi-objcopy -O binary RealOne.elf "RealOne.bin" +arm-none-eabi-size RealOne.elf + text data bss dec hex filename + 3756 20 1572 5348 14e4 RealOne.elf +Finished building: default.size.stdout + +Finished building: RealOne.bin +Finished building: RealOne.list + + +09:57:22 **** Incremental Build of configuration Debug for project RealOne **** +make -j8 all +arm-none-eabi-size RealOne.elf + text data bss dec hex filename + 3756 20 1572 5348 14e4 RealOne.elf +Finished building: default.size.stdout + +10:08:48 **** Incremental Build of configuration Debug for project RealOne **** +make -j8 all +arm-none-eabi-gcc "../Core/Src/main.c" -mcpu=cortex-m4 -std=gnu11 -g3 '-DHSE_VALUE=8000000' '-DMSI_VALUE=4000000' '-DLSI_VALUE=32000' '-DHSE_STARTUP_TIMEOUT=100' '-DHSI_VALUE=16000000' -DDEBUG '-DLSE_STARTUP_TIMEOUT=5000' '-DLSE_VALUE=32768' '-DDATA_CACHE_ENABLE=1' -DUSE_HAL_DRIVER '-DVDD_VALUE=3300' '-DINSTRUCTION_CACHE_ENABLE=1' '-DEXTERNALSAI2_CLOCK_VALUE=2097000' -DSTM32L476xx -DUSE_FULL_LL_DRIVER '-DEXTERNALSAI1_CLOCK_VALUE=2097000' '-DPREFETCH_ENABLE=0' -c -I../Core/Inc -I../Drivers/STM32L4xx_HAL_Driver/Inc -I../Drivers/CMSIS/Device/ST/STM32L4xx/Include -I../Drivers/CMSIS/Include -I../Drivers/STM32L4xx_HAL_Driver/Inc/Legacy -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"Core/Src/main.d" -MT"Core/Src/main.o" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "Core/Src/main.o" +In file included from ../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.h:30:0, + from ../Core/Inc/main.h:31, + from ../Core/Src/main.c:8: +../Core/Inc/stm32l4xx_hal_conf.h:183:0: warning: "VDD_VALUE" redefined + #define VDD_VALUE 3300U /*!< Value of VDD in mv */ + +:0:0: note: this is the location of the previous definition +In file included from ../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.h:30:0, + from ../Core/Inc/main.h:31, + from ../Core/Src/main.c:8: +../Core/Inc/stm32l4xx_hal_conf.h:186:0: warning: "PREFETCH_ENABLE" redefined + #define PREFETCH_ENABLE 0U + +:0:0: note: this is the location of the previous definition +In file included from ../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.h:30:0, + from ../Core/Inc/main.h:31, + from ../Core/Src/main.c:8: +../Core/Inc/stm32l4xx_hal_conf.h:187:0: warning: "INSTRUCTION_CACHE_ENABLE" redefined + #define INSTRUCTION_CACHE_ENABLE 1U + +:0:0: note: this is the location of the previous definition +In file included from ../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.h:30:0, + from ../Core/Inc/main.h:31, + from ../Core/Src/main.c:8: +../Core/Inc/stm32l4xx_hal_conf.h:188:0: warning: "DATA_CACHE_ENABLE" redefined + #define DATA_CACHE_ENABLE 1U + +:0:0: note: this is the location of the previous definition +arm-none-eabi-gcc -o "RealOne.elf" @"objects.list" -mcpu=cortex-m4 -T"C:\Users\camer\Desktop\LoPoSo\RealOne\STM32L476RGTX_FLASH.ld" --specs=nosys.specs -Wl,-Map="RealOne.map" -Wl,--gc-sections -static --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -Wl,--start-group -lc -lm -Wl,--end-group +Finished building target: RealOne.elf + +arm-none-eabi-objdump -h -S RealOne.elf > "RealOne.list" +arm-none-eabi-objcopy -O binary RealOne.elf "RealOne.bin" +arm-none-eabi-size RealOne.elf + text data bss dec hex filename + 3748 20 1572 5340 14dc RealOne.elf +Finished building: default.size.stdout + +Finished building: RealOne.bin +Finished building: RealOne.list + + +10:08:57 **** Incremental Build of configuration Debug for project RealOne **** +make -j8 all +arm-none-eabi-size RealOne.elf + text data bss dec hex filename + 3748 20 1572 5340 14dc RealOne.elf +Finished building: default.size.stdout + +10:09:39 **** Incremental Build of configuration Debug for project RealOne **** +make -j8 all +arm-none-eabi-size RealOne.elf + text data bss dec hex filename + 3748 20 1572 5340 14dc RealOne.elf +Finished building: default.size.stdout + +10:26:55 **** Incremental Build of configuration Debug for project RealOne **** +make -j8 all +arm-none-eabi-gcc "../Core/Src/main.c" -mcpu=cortex-m4 -std=gnu11 -g3 '-DHSE_VALUE=8000000' '-DMSI_VALUE=4000000' '-DLSI_VALUE=32000' '-DHSE_STARTUP_TIMEOUT=100' '-DHSI_VALUE=16000000' -DDEBUG '-DLSE_STARTUP_TIMEOUT=5000' '-DLSE_VALUE=32768' '-DDATA_CACHE_ENABLE=1' -DUSE_HAL_DRIVER '-DVDD_VALUE=3300' '-DINSTRUCTION_CACHE_ENABLE=1' '-DEXTERNALSAI2_CLOCK_VALUE=2097000' -DSTM32L476xx -DUSE_FULL_LL_DRIVER '-DEXTERNALSAI1_CLOCK_VALUE=2097000' '-DPREFETCH_ENABLE=0' -c -I../Core/Inc -I../Drivers/STM32L4xx_HAL_Driver/Inc -I../Drivers/CMSIS/Device/ST/STM32L4xx/Include -I../Drivers/CMSIS/Include -I../Drivers/STM32L4xx_HAL_Driver/Inc/Legacy -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"Core/Src/main.d" -MT"Core/Src/main.o" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "Core/Src/main.o" +arm-none-eabi-gcc "../Core/Src/stm32l4xx_hal_msp.c" -mcpu=cortex-m4 -std=gnu11 -g3 '-DHSE_VALUE=8000000' '-DMSI_VALUE=4000000' '-DLSI_VALUE=32000' '-DHSE_STARTUP_TIMEOUT=100' '-DHSI_VALUE=16000000' -DDEBUG '-DLSE_STARTUP_TIMEOUT=5000' '-DLSE_VALUE=32768' '-DDATA_CACHE_ENABLE=1' -DUSE_HAL_DRIVER '-DVDD_VALUE=3300' '-DINSTRUCTION_CACHE_ENABLE=1' '-DEXTERNALSAI2_CLOCK_VALUE=2097000' -DSTM32L476xx -DUSE_FULL_LL_DRIVER '-DEXTERNALSAI1_CLOCK_VALUE=2097000' '-DPREFETCH_ENABLE=0' -c -I../Core/Inc -I../Drivers/STM32L4xx_HAL_Driver/Inc -I../Drivers/CMSIS/Device/ST/STM32L4xx/Include -I../Drivers/CMSIS/Include -I../Drivers/STM32L4xx_HAL_Driver/Inc/Legacy -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"Core/Src/stm32l4xx_hal_msp.d" -MT"Core/Src/stm32l4xx_hal_msp.o" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "Core/Src/stm32l4xx_hal_msp.o" +arm-none-eabi-gcc "../Core/Src/stm32l4xx_it.c" -mcpu=cortex-m4 -std=gnu11 -g3 '-DHSE_VALUE=8000000' '-DMSI_VALUE=4000000' '-DLSI_VALUE=32000' '-DHSE_STARTUP_TIMEOUT=100' '-DHSI_VALUE=16000000' -DDEBUG '-DLSE_STARTUP_TIMEOUT=5000' '-DLSE_VALUE=32768' '-DDATA_CACHE_ENABLE=1' -DUSE_HAL_DRIVER '-DVDD_VALUE=3300' '-DINSTRUCTION_CACHE_ENABLE=1' '-DEXTERNALSAI2_CLOCK_VALUE=2097000' -DSTM32L476xx -DUSE_FULL_LL_DRIVER '-DEXTERNALSAI1_CLOCK_VALUE=2097000' '-DPREFETCH_ENABLE=0' -c -I../Core/Inc -I../Drivers/STM32L4xx_HAL_Driver/Inc -I../Drivers/CMSIS/Device/ST/STM32L4xx/Include -I../Drivers/CMSIS/Include -I../Drivers/STM32L4xx_HAL_Driver/Inc/Legacy -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"Core/Src/stm32l4xx_it.d" -MT"Core/Src/stm32l4xx_it.o" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "Core/Src/stm32l4xx_it.o" +In file included from ../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.h:30:0, + from ../Core/Inc/main.h:31, + from ../Core/Src/main.c:8: +../Core/Inc/stm32l4xx_hal_conf.h:183:0: warning: "VDD_VALUE" redefined + #define VDD_VALUE 3300U /*!< Value of VDD in mv */ + +:0:0: note: this is the location of the previous definition +In file included from ../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.h:30:0, + from ../Core/Inc/main.h:31, + from ../Core/Src/main.c:8: +../Core/Inc/stm32l4xx_hal_conf.h:186:0: warning: "PREFETCH_ENABLE" redefined + #define PREFETCH_ENABLE 0U + +:0:0: note: this is the location of the previous definition +In file included from ../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.h:30:0, + from ../Core/Inc/main.h:31, + from ../Core/Src/main.c:8: +../Core/Inc/stm32l4xx_hal_conf.h:187:0: warning: "INSTRUCTION_CACHE_ENABLE" redefined + #define INSTRUCTION_CACHE_ENABLE 1U + +In file included from ../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.h:30:0, + from ../Core/Inc/main.h:31, + from ../Core/Src/stm32l4xx_hal_msp.c:23: +../Core/Inc/stm32l4xx_hal_conf.h:183:0: warning: "VDD_VALUE" redefined + #define VDD_VALUE 3300U /*!< Value of VDD in mv */ + +In file included from ../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.h:30:0, + from ../Core/Inc/main.h:31, + from ../Core/Src/stm32l4xx_it.c:22: +../Core/Inc/stm32l4xx_hal_conf.h:183:0: warning: "VDD_VALUE" redefined + #define VDD_VALUE 3300U /*!< Value of VDD in mv */ + +:0:0: note: this is the location of the previous definition +:0:0: note: this is the location of the previous definition +:0:0: note: this is the location of the previous definition +In file included from ../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.h:30:0, + from ../Core/Inc/main.h:31, + from ../Core/Src/main.c:8: +../Core/Inc/stm32l4xx_hal_conf.h:188:0: warning: "DATA_CACHE_ENABLE" redefined + #define DATA_CACHE_ENABLE 1U + +In file included from ../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.h:30:0, + from ../Core/Inc/main.h:31, + from ../Core/Src/stm32l4xx_hal_msp.c:23: +../Core/Inc/stm32l4xx_hal_conf.h:186:0: warning: "PREFETCH_ENABLE" redefined + #define PREFETCH_ENABLE 0U + +:0:0: note: this is the location of the previous definition +In file included from ../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.h:30:0, + from ../Core/Inc/main.h:31, + from ../Core/Src/stm32l4xx_it.c:22: +../Core/Inc/stm32l4xx_hal_conf.h:186:0: warning: "PREFETCH_ENABLE" redefined + #define PREFETCH_ENABLE 0U + +:0:0: note: this is the location of the previous definition +:0:0: note: this is the location of the previous definition +In file included from ../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.h:30:0, + from ../Core/Inc/main.h:31, + from ../Core/Src/stm32l4xx_hal_msp.c:23: +../Core/Inc/stm32l4xx_hal_conf.h:187:0: warning: "INSTRUCTION_CACHE_ENABLE" redefined + #define INSTRUCTION_CACHE_ENABLE 1U + +:0:0: note: this is the location of the previous definition +In file included from ../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.h:30:0, + from ../Core/Inc/main.h:31, + from ../Core/Src/stm32l4xx_it.c:22: +../Core/Inc/stm32l4xx_hal_conf.h:187:0: warning: "INSTRUCTION_CACHE_ENABLE" redefined + #define INSTRUCTION_CACHE_ENABLE 1U + +:0:0: note: this is the location of the previous definition +In file included from ../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.h:30:0, + from ../Core/Inc/main.h:31, + from ../Core/Src/stm32l4xx_it.c:22: +../Core/Inc/stm32l4xx_hal_conf.h:188:0: warning: "DATA_CACHE_ENABLE" redefined + #define DATA_CACHE_ENABLE 1U + +In file included from ../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.h:30:0, + from ../Core/Inc/main.h:31, + from ../Core/Src/stm32l4xx_hal_msp.c:23: +../Core/Inc/stm32l4xx_hal_conf.h:188:0: warning: "DATA_CACHE_ENABLE" redefined + #define DATA_CACHE_ENABLE 1U + +:0:0: note: this is the location of the previous definition +:0:0: note: this is the location of the previous definition +arm-none-eabi-gcc -o "RealOne.elf" @"objects.list" -mcpu=cortex-m4 -T"C:\Users\camer\Desktop\LoPoSo\RealOne\STM32L476RGTX_FLASH.ld" --specs=nosys.specs -Wl,-Map="RealOne.map" -Wl,--gc-sections -static --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -Wl,--start-group -lc -lm -Wl,--end-group +Finished building target: RealOne.elf + +arm-none-eabi-objdump -h -S RealOne.elf > "RealOne.list" +arm-none-eabi-objcopy -O binary RealOne.elf "RealOne.bin" +arm-none-eabi-size RealOne.elf + text data bss dec hex filename + 3976 20 1572 5568 15c0 RealOne.elf +Finished building: default.size.stdout + +Finished building: RealOne.bin + +Finished building: RealOne.list + +10:27:43 **** Incremental Build of configuration Debug for project RealOne **** +make -j8 all +arm-none-eabi-size RealOne.elf + text data bss dec hex filename + 3976 20 1572 5568 15c0 RealOne.elf +Finished building: default.size.stdout + +10:28:07 **** Incremental Build of configuration Debug for project RealOne **** +make -j8 all +arm-none-eabi-size RealOne.elf + text data bss dec hex filename + 3976 20 1572 5568 15c0 RealOne.elf +Finished building: default.size.stdout + +10:28:17 **** Incremental Build of configuration Debug for project RealOne **** +make -j8 all +arm-none-eabi-size RealOne.elf + text data bss dec hex filename + 3976 20 1572 5568 15c0 RealOne.elf +Finished building: default.size.stdout + +10:28:21 **** Incremental Build of configuration Debug for project RealOne **** +make -j8 all +arm-none-eabi-size RealOne.elf + text data bss dec hex filename + 3976 20 1572 5568 15c0 RealOne.elf +Finished building: default.size.stdout + +10:28:38 **** Incremental Build of configuration Debug for project RealOne **** +make -j8 all +arm-none-eabi-size RealOne.elf + text data bss dec hex filename + 3976 20 1572 5568 15c0 RealOne.elf +Finished building: default.size.stdout + +10:34:31 **** Incremental Build of configuration Debug for project RealOne **** +make -j8 all +arm-none-eabi-gcc "../Core/Src/main.c" -mcpu=cortex-m4 -std=gnu11 -g3 '-DHSE_VALUE=8000000' '-DMSI_VALUE=4000000' '-DLSI_VALUE=32000' '-DHSE_STARTUP_TIMEOUT=100' '-DHSI_VALUE=16000000' -DDEBUG '-DLSE_STARTUP_TIMEOUT=5000' '-DLSE_VALUE=32768' '-DDATA_CACHE_ENABLE=1' -DUSE_HAL_DRIVER '-DVDD_VALUE=3300' '-DINSTRUCTION_CACHE_ENABLE=1' '-DEXTERNALSAI2_CLOCK_VALUE=2097000' -DSTM32L476xx -DUSE_FULL_LL_DRIVER '-DEXTERNALSAI1_CLOCK_VALUE=2097000' '-DPREFETCH_ENABLE=0' -c -I../Core/Inc -I../Drivers/STM32L4xx_HAL_Driver/Inc -I../Drivers/CMSIS/Device/ST/STM32L4xx/Include -I../Drivers/CMSIS/Include -I../Drivers/STM32L4xx_HAL_Driver/Inc/Legacy -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"Core/Src/main.d" -MT"Core/Src/main.o" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "Core/Src/main.o" +In file included from ../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.h:30:0, + from ../Core/Inc/main.h:31, + from ../Core/Src/main.c:8: +../Core/Inc/stm32l4xx_hal_conf.h:183:0: warning: "VDD_VALUE" redefined + #define VDD_VALUE 3300U /*!< Value of VDD in mv */ + +:0:0: note: this is the location of the previous definition +In file included from ../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.h:30:0, + from ../Core/Inc/main.h:31, + from ../Core/Src/main.c:8: +../Core/Inc/stm32l4xx_hal_conf.h:186:0: warning: "PREFETCH_ENABLE" redefined + #define PREFETCH_ENABLE 0U + +:0:0: note: this is the location of the previous definition +In file included from ../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.h:30:0, + from ../Core/Inc/main.h:31, + from ../Core/Src/main.c:8: +../Core/Inc/stm32l4xx_hal_conf.h:187:0: warning: "INSTRUCTION_CACHE_ENABLE" redefined + #define INSTRUCTION_CACHE_ENABLE 1U + +:0:0: note: this is the location of the previous definition +In file included from ../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.h:30:0, + from ../Core/Inc/main.h:31, + from ../Core/Src/main.c:8: +../Core/Inc/stm32l4xx_hal_conf.h:188:0: warning: "DATA_CACHE_ENABLE" redefined + #define DATA_CACHE_ENABLE 1U + +:0:0: note: this is the location of the previous definition +arm-none-eabi-gcc -o "RealOne.elf" @"objects.list" -mcpu=cortex-m4 -T"C:\Users\camer\Desktop\LoPoSo\RealOne\STM32L476RGTX_FLASH.ld" --specs=nosys.specs -Wl,-Map="RealOne.map" -Wl,--gc-sections -static --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -Wl,--start-group -lc -lm -Wl,--end-group +Finished building target: RealOne.elf + +arm-none-eabi-objdump -h -S RealOne.elf > "RealOne.list" +arm-none-eabi-objcopy -O binary RealOne.elf "RealOne.bin" +arm-none-eabi-size RealOne.elf + text data bss dec hex filename + 3988 20 1572 5580 15cc RealOne.elf +Finished building: default.size.stdout + +Finished building: RealOne.bin +Finished building: RealOne.list + + +10:38:01 **** Incremental Build of configuration Debug for project RealOne **** +make -j8 all +arm-none-eabi-size RealOne.elf + text data bss dec hex filename + 3988 20 1572 5580 15cc RealOne.elf +Finished building: default.size.stdout + diff --git a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/1/3046896fea27001b16eaee4b2dec2d39 b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/1/3046896fea27001b16eaee4b2dec2d39 deleted file mode 100644 index 34f1106..0000000 --- a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/1/3046896fea27001b16eaee4b2dec2d39 +++ /dev/null @@ -1,143 +0,0 @@ -/* Project L476_ats_blink for STM32L476 mounted on Nucleo board: - * the user LED (mounted on pin PA-5) is flashed every second for 50 ms. - * The time base is provided by Systick (1000 ticks per second). - * The clock configuration is the default one (Sysclk = 80 MHz, derived from MSI and PLL). - */ - -/* Includes ------------------------------------------------------------------*/ -#include "main.h" -// #if defined(USE_FULL_ASSERT) -// #include "stm32_assert.h" -// #endif /* USE_FULL_ASSERT */ - -#include "gpio.h" - -// systick interrupt handler -volatile uint32_t msTicks = 0; -volatile uint8_t expe = 2; -volatile uint8_t blue_mode = 0; - -void SysTick_Handler() -{ - if ( BLUE_BUTTON() ){ - blue_mode = 1 ; - } - - msTicks++; /* See startup file startup_LPC17xx.s for SysTick vector */ - if (msTicks == 5){ - LED_GREEN(0); - }else if(msTicks >= 200){ - msTicks = 0; - LED_GREEN(1); - } - if(expe == 2){ - CLK_TOGGLE(); - } -} - -// -//void SystemClock_Config(void); - -int main(void) -{ -/* Configure the system clock */ -SystemClock_Config(); - -// config GPIO -GPIO_init(); - -// init systick timer (tick period at 1 ms) -LL_Init1msTick( SystemCoreClock ); -LL_SYSTICK_EnableIT(); - -//Setup Sleep mode -LL_LPM_EnableSleep(); -//LL_LPM_EnableSleepOnExit(); - -while (1) { - if (blue_mode){ - switch(expe){ - case 1: - __WFI(); - break; - case 2: - break; - } - } - -// else { -// LED_GREEN(0); -// LL_mDelay(950); -// LED_GREEN(1); -// LL_mDelay(50); -// } - } -} - -/** -/** - * @brief System Clock Configuration - * @retval None - * 24Mhz + RTC + LSE - */ -void SystemClock_Config(void) -{ - LL_FLASH_SetLatency(LL_FLASH_LATENCY_1); - while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_1) - { - } - LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1); - LL_RCC_MSI_Enable(); - - /* Wait till MSI is ready */ - while(LL_RCC_MSI_IsReady() != 1) - { - - } - - LL_RCC_LSE_Enable(); - - /* Wait till LSE is ready */ - while(LL_RCC_LSE_IsReady() != 1) - { - - } - LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE); - LL_RCC_EnableRTC(); - - LL_RCC_MSI_EnableRangeSelection(); - LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6); - LL_RCC_MSI_SetCalibTrimming(0); - LL_RCC_MSI_EnablePLLMode(); - LL_PWR_EnableBkUpAccess(); - LL_RCC_ForceBackupDomainReset(); - LL_RCC_ReleaseBackupDomainReset(); - LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW); - - LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4); - LL_RCC_PLL_EnableDomain_SYS(); - LL_RCC_PLL_Enable(); - - /* Wait till PLL is ready */ - while(LL_RCC_PLL_IsReady() != 1) - { - - } - LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL); - - /* Wait till System clock is ready */ - while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL) - { - - } - LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1); - LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1); - LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1); - LL_SetSystemCoreClock(24000000); - - /* Update the time base */ - if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK) - { -// Error_Handler(); - } -} diff --git a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/b7/f039bb8fac28001b1d0af99b6389052e b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/1a/d055de90af28001b1d0af99b6389052e similarity index 95% rename from PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/b7/f039bb8fac28001b1d0af99b6389052e rename to PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/1a/d055de90af28001b1d0af99b6389052e index 86d444f..781726d 100644 --- a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/b7/f039bb8fac28001b1d0af99b6389052e +++ b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/1a/d055de90af28001b1d0af99b6389052e @@ -108,6 +108,7 @@ while (1) { */ void SystemClock_Config_24M_LSE(void) { + LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR ); LL_FLASH_SetLatency(LL_FLASH_LATENCY_1); while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_1) { @@ -121,24 +122,25 @@ void SystemClock_Config_24M_LSE(void) } - LL_RCC_LSE_Enable(); - - /* Wait till LSE is ready */ - while(LL_RCC_LSE_IsReady() != 1) - { - - } - LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE); - LL_RCC_EnableRTC(); + LL_PWR_EnableBkUpAccess(); + LL_RCC_ForceBackupDomainReset(); + LL_RCC_ReleaseBackupDomainReset(); + LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW); LL_RCC_MSI_EnableRangeSelection(); LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6); LL_RCC_MSI_SetCalibTrimming(0); // LL_RCC_MSI_EnablePLLMode(); - LL_PWR_EnableBkUpAccess(); - LL_RCC_ForceBackupDomainReset(); - LL_RCC_ReleaseBackupDomainReset(); - LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW); + + LL_RCC_LSE_Enable(); + + /* Wait till LSE is ready */ + while(LL_RCC_LSE_IsReady() != 1) + { + + } + LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE); + LL_RCC_EnableRTC(); LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4); LL_RCC_PLL_EnableDomain_SYS(); diff --git a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/2/108d5b5baa28001b1d0af99b6389052e b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/2/108d5b5baa28001b1d0af99b6389052e deleted file mode 100644 index e48dd9f..0000000 --- a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/2/108d5b5baa28001b1d0af99b6389052e +++ /dev/null @@ -1,219 +0,0 @@ -/* Project L476_ats_blink for STM32L476 mounted on Nucleo board: - * the user LED (mounted on pin PA-5) is flashed every second for 50 ms. - * The time base is provided by Systick (1000 ticks per second). - * The clock configuration is the default one (Sysclk = 80 MHz, derived from MSI and PLL). - */ - -/* Includes ------------------------------------------------------------------*/ -#include "main.h" -// #if defined(USE_FULL_ASSERT) -// #include "stm32_assert.h" -// #endif /* USE_FULL_ASSERT */ - -#include "gpio.h" - -// systick interrupt handler -volatile uint32_t msTicks = 0; -volatile uint8_t expe = 0; -volatile uint8_t blue_mode = 0; - -void SysTick_Handler() -{ - if ( BLUE_BUTTON() ){ - blue_mode = 1 ; - } - - msTicks++; /* See startup file startup_LPC17xx.s for SysTick vector */ - if (msTicks == 5 * expe){ - LED_GREEN(0); - }else if(msTicks >= 200){ - msTicks = 0; - LED_GREEN(1); - } - if(expe == 2){ - CLK_TOGGLE(); - } -} - - - - -int main(void) -{ - if (RCC->BDCR & RCC_BDCR_LSEON) { - LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR ); - LL_PWR_EnableBkUpAccess(); - - //expe = register RTC - expe = RTC->BKP0R; - if (expe == 0){ - expe = 1; - RTC->BKP0R = expe; - }else if (expe != 0 && BLUE_BUTTON()){ - expe ++; - RTC->BKP0R = expe; - } - }else{ - - } - - - - switch(expe){ - case 1: - /* Configure the system clock */ - SystemClock_Config_80M(); - break; - case 2: - /* Configure the system clock */ - SystemClock_Config_24M_LSE(); - break; - } - - - - -// config GPIO -GPIO_init(); - -// init systick timer (tick period at 1 ms) -LL_Init1msTick( SystemCoreClock ); -LL_SYSTICK_EnableIT(); - -//Setup Sleep mode -LL_LPM_EnableSleep(); -//LL_LPM_EnableSleepOnExit(); - -while (1) { - if (blue_mode){ - switch(expe){ - case 1: - __WFI(); - break; - case 2: - LL_RCC_MSI_EnablePLLMode(); - break; - } - - } - } -} - -void Init_LSE(void){ - LL_RCC_LSE_Enable(); - - /* Wait till LSE is ready */ - while(LL_RCC_LSE_IsReady() != 1) - { - - } - LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE); - LL_RCC_EnableRTC(); - LL_PWR_EnableBkUpAccess(); - LL_RCC_ForceBackupDomainReset(); - LL_RCC_ReleaseBackupDomainReset(); - LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW); -} - -/** - * @brief System Clock Configuration - * @retval None - * 24Mhz + RTC + LSE - */ -void SystemClock_Config_24M_LSE(void) -{ - LL_FLASH_SetLatency(LL_FLASH_LATENCY_1); - while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_1) - { - } - LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1); - LL_RCC_MSI_Enable(); - - /* Wait till MSI is ready */ - while(LL_RCC_MSI_IsReady() != 1) - { - - } - - - - LL_RCC_MSI_EnableRangeSelection(); - LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6); - LL_RCC_MSI_SetCalibTrimming(0); -// LL_RCC_MSI_EnablePLLMode(); - - - - LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4); - LL_RCC_PLL_EnableDomain_SYS(); - LL_RCC_PLL_Enable(); - - /* Wait till PLL is ready */ - while(LL_RCC_PLL_IsReady() != 1) - { - - } - LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL); - - /* Wait till System clock is ready */ - while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL) - { - - } - LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1); - LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1); - LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1); - LL_SetSystemCoreClock(24000000); - - /* Update the time base */ - if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK) - { -// Error_Handler(); - } -} - - -void SystemClock_Config_80M(void) -{ - LL_FLASH_SetLatency(LL_FLASH_LATENCY_4); - while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_4) - { - } - LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1); - LL_RCC_MSI_Enable(); - - /* Wait till MSI is ready */ - while(LL_RCC_MSI_IsReady() != 1) - { - - } - LL_RCC_MSI_EnableRangeSelection(); - LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6); - LL_RCC_MSI_SetCalibTrimming(0); - LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 40, LL_RCC_PLLR_DIV_2); - LL_RCC_PLL_EnableDomain_SYS(); - LL_RCC_PLL_Enable(); - - /* Wait till PLL is ready */ - while(LL_RCC_PLL_IsReady() != 1) - { - - } - LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL); - - /* Wait till System clock is ready */ - while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL) - { - - } - LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1); - LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1); - LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1); - LL_SetSystemCoreClock(80000000); - - /* Update the time base */ - if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK) - { -// Error_Handler(); - } -} diff --git a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/2/70561a18ab28001b1d0af99b6389052e b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/2/70561a18ab28001b1d0af99b6389052e deleted file mode 100644 index ff0ee5d..0000000 --- a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/2/70561a18ab28001b1d0af99b6389052e +++ /dev/null @@ -1,214 +0,0 @@ -/* Project L476_ats_blink for STM32L476 mounted on Nucleo board: - * the user LED (mounted on pin PA-5) is flashed every second for 50 ms. - * The time base is provided by Systick (1000 ticks per second). - * The clock configuration is the default one (Sysclk = 80 MHz, derived from MSI and PLL). - */ - -/* Includes ------------------------------------------------------------------*/ -#include "main.h" -// #if defined(USE_FULL_ASSERT) -// #include "stm32_assert.h" -// #endif /* USE_FULL_ASSERT */ - -#include "gpio.h" - -// systick interrupt handler -volatile uint32_t msTicks = 0; -volatile uint8_t expe = 0; -volatile uint8_t blue_mode = 0; - -void SysTick_Handler() -{ - if ( BLUE_BUTTON() ){ - blue_mode = 1 ; - } - - msTicks++; /* See startup file startup_LPC17xx.s for SysTick vector */ - if (msTicks == 5 * expe){ - LED_GREEN(0); - }else if(msTicks >= 200){ - msTicks = 0; - LED_GREEN(1); - } - if(expe == 2){ - CLK_TOGGLE(); - } -} - - - - -int main(void) -{ - if (RCC->BDCR & RCC_BDCR_LSEON) { - LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR ); - LL_PWR_EnableBkUpAccess(); - - //expe = register RTC - expe = RTC->BKP0R; - if (expe == 0){ - expe = 1; - RTC->BKP0R = expe; - }else if (expe != 0 && BLUE_BUTTON()){ - expe ++; - RTC->BKP0R = expe; - } - }else{ - SystemClock_Config_24M_LSE(); - expe = 1; - LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR ); - LL_PWR_EnableBkUpAccess(); - RTC->BKP0R = expe; - } - LL_PWR_DisableBkUpAccess(); - - - switch(expe){ - case 1: - /* Configure the system clock */ - SystemClock_Config_80M(); - break; - case 2: - /* Configure the system clock */ - SystemClock_Config_24M_LSE(); - break; - } - - - - -// config GPIO -GPIO_init(); - -// init systick timer (tick period at 1 ms) -LL_Init1msTick( SystemCoreClock ); -LL_SYSTICK_EnableIT(); - -//Setup Sleep mode -LL_LPM_EnableSleep(); -//LL_LPM_EnableSleepOnExit(); - -while (1) { - if (blue_mode){ - switch(expe){ - case 1: - __WFI(); - break; - case 2: - LL_RCC_MSI_EnablePLLMode(); - break; - } - - } - } -} - -/** - * @brief System Clock Configuration - * @retval None - * 24Mhz + RTC + LSE - */ -void SystemClock_Config_24_LSE(void) -{ - LL_FLASH_SetLatency(LL_FLASH_LATENCY_1); - while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_1) - { - } - LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1); - LL_RCC_MSI_Enable(); - - /* Wait till MSI is ready */ - while(LL_RCC_MSI_IsReady() != 1) - { - - } - LL_RCC_MSI_EnablePLLMode(); - LL_RCC_MSI_EnableRangeSelection(); - LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6); - LL_RCC_MSI_SetCalibTrimming(0); - LL_PWR_EnableBkUpAccess(); - LL_RCC_ForceBackupDomainReset(); - LL_RCC_ReleaseBackupDomainReset(); - LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW); - LL_RCC_LSE_Enable(); - - /* Wait till LSE is ready */ - while(LL_RCC_LSE_IsReady() != 1) - { - - } - LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE); - LL_RCC_EnableRTC(); - LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4); - LL_RCC_PLL_EnableDomain_SYS(); - LL_RCC_PLL_Enable(); - - /* Wait till PLL is ready */ - while(LL_RCC_PLL_IsReady() != 1) - { - - } - LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL); - - /* Wait till System clock is ready */ - while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL) - { - - } - LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1); - LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1); - LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1); - LL_SetSystemCoreClock(24000000); - - /* Update the time base */ - if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK) - { - Error_Handler(); - } -} - - -void SystemClock_Config_80M(void) -{ - LL_FLASH_SetLatency(LL_FLASH_LATENCY_4); - while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_4) - { - } - LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1); - LL_RCC_MSI_Enable(); - - /* Wait till MSI is ready */ - while(LL_RCC_MSI_IsReady() != 1) - { - - } - LL_RCC_MSI_EnableRangeSelection(); - LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6); - LL_RCC_MSI_SetCalibTrimming(0); - LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 40, LL_RCC_PLLR_DIV_2); - LL_RCC_PLL_EnableDomain_SYS(); - LL_RCC_PLL_Enable(); - - /* Wait till PLL is ready */ - while(LL_RCC_PLL_IsReady() != 1) - { - - } - LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL); - - /* Wait till System clock is ready */ - while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL) - { - - } - LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1); - LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1); - LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1); - LL_SetSystemCoreClock(80000000); - - /* Update the time base */ - if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK) - { -// Error_Handler(); - } -} diff --git a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/22/d0fdc915ab28001b1d0af99b6389052e b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/22/d0fdc915ab28001b1d0af99b6389052e deleted file mode 100644 index ca4366d..0000000 --- a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/22/d0fdc915ab28001b1d0af99b6389052e +++ /dev/null @@ -1,214 +0,0 @@ -/* Project L476_ats_blink for STM32L476 mounted on Nucleo board: - * the user LED (mounted on pin PA-5) is flashed every second for 50 ms. - * The time base is provided by Systick (1000 ticks per second). - * The clock configuration is the default one (Sysclk = 80 MHz, derived from MSI and PLL). - */ - -/* Includes ------------------------------------------------------------------*/ -#include "main.h" -// #if defined(USE_FULL_ASSERT) -// #include "stm32_assert.h" -// #endif /* USE_FULL_ASSERT */ - -#include "gpio.h" - -// systick interrupt handler -volatile uint32_t msTicks = 0; -volatile uint8_t expe = 0; -volatile uint8_t blue_mode = 0; - -void SysTick_Handler() -{ - if ( BLUE_BUTTON() ){ - blue_mode = 1 ; - } - - msTicks++; /* See startup file startup_LPC17xx.s for SysTick vector */ - if (msTicks == 5 * expe){ - LED_GREEN(0); - }else if(msTicks >= 200){ - msTicks = 0; - LED_GREEN(1); - } - if(expe == 2){ - CLK_TOGGLE(); - } -} - - - - -int main(void) -{ - if (RCC->BDCR & RCC_BDCR_LSEON) { - LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR ); - LL_PWR_EnableBkUpAccess(); - - //expe = register RTC - expe = RTC->BKP0R; - if (expe == 0){ - expe = 1; - RTC->BKP0R = expe; - }else if (expe != 0 && BLUE_BUTTON()){ - expe ++; - RTC->BKP0R = expe; - } - }else{ - SystemClock_Config_24M_LSE(); - expe = 1; - LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR ); - LL_PWR_EnableBkUpAccess(); - RTC->BKP0R = expe; - } - LL_PWR_DisableBkUpAccess(); - - - switch(expe){ - case 1: - /* Configure the system clock */ - SystemClock_Config_80M(); - break; - case 2: - /* Configure the system clock */ - SystemClock_Config_24M_LSE(); - break; - } - - - - -// config GPIO -GPIO_init(); - -// init systick timer (tick period at 1 ms) -LL_Init1msTick( SystemCoreClock ); -LL_SYSTICK_EnableIT(); - -//Setup Sleep mode -LL_LPM_EnableSleep(); -//LL_LPM_EnableSleepOnExit(); - -while (1) { - if (blue_mode){ - switch(expe){ - case 1: - __WFI(); - break; - case 2: - LL_RCC_MSI_EnablePLLMode(); - break; - } - - } - } -} - -/** - * @brief System Clock Configuration - * @retval None - * 24Mhz + RTC + LSE - */ -void SystemClock_Config(void) -{ - LL_FLASH_SetLatency(LL_FLASH_LATENCY_1); - while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_1) - { - } - LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1); - LL_RCC_MSI_Enable(); - - /* Wait till MSI is ready */ - while(LL_RCC_MSI_IsReady() != 1) - { - - } - LL_RCC_MSI_EnablePLLMode(); - LL_RCC_MSI_EnableRangeSelection(); - LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6); - LL_RCC_MSI_SetCalibTrimming(0); - LL_PWR_EnableBkUpAccess(); - LL_RCC_ForceBackupDomainReset(); - LL_RCC_ReleaseBackupDomainReset(); - LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW); - LL_RCC_LSE_Enable(); - - /* Wait till LSE is ready */ - while(LL_RCC_LSE_IsReady() != 1) - { - - } - LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE); - LL_RCC_EnableRTC(); - LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4); - LL_RCC_PLL_EnableDomain_SYS(); - LL_RCC_PLL_Enable(); - - /* Wait till PLL is ready */ - while(LL_RCC_PLL_IsReady() != 1) - { - - } - LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL); - - /* Wait till System clock is ready */ - while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL) - { - - } - LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1); - LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1); - LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1); - LL_SetSystemCoreClock(24000000); - - /* Update the time base */ - if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK) - { - Error_Handler(); - } -} - - -void SystemClock_Config_80M(void) -{ - LL_FLASH_SetLatency(LL_FLASH_LATENCY_4); - while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_4) - { - } - LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1); - LL_RCC_MSI_Enable(); - - /* Wait till MSI is ready */ - while(LL_RCC_MSI_IsReady() != 1) - { - - } - LL_RCC_MSI_EnableRangeSelection(); - LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6); - LL_RCC_MSI_SetCalibTrimming(0); - LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 40, LL_RCC_PLLR_DIV_2); - LL_RCC_PLL_EnableDomain_SYS(); - LL_RCC_PLL_Enable(); - - /* Wait till PLL is ready */ - while(LL_RCC_PLL_IsReady() != 1) - { - - } - LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL); - - /* Wait till System clock is ready */ - while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL) - { - - } - LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1); - LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1); - LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1); - LL_SetSystemCoreClock(80000000); - - /* Update the time base */ - if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK) - { -// Error_Handler(); - } -} diff --git a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/23/e0a2021eab28001b1d0af99b6389052e b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/23/e0a2021eab28001b1d0af99b6389052e deleted file mode 100644 index da33fd1..0000000 --- a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/23/e0a2021eab28001b1d0af99b6389052e +++ /dev/null @@ -1,214 +0,0 @@ -/* Project L476_ats_blink for STM32L476 mounted on Nucleo board: - * the user LED (mounted on pin PA-5) is flashed every second for 50 ms. - * The time base is provided by Systick (1000 ticks per second). - * The clock configuration is the default one (Sysclk = 80 MHz, derived from MSI and PLL). - */ - -/* Includes ------------------------------------------------------------------*/ -#include "main.h" -// #if defined(USE_FULL_ASSERT) -// #include "stm32_assert.h" -// #endif /* USE_FULL_ASSERT */ - -#include "gpio.h" - -// systick interrupt handler -volatile uint32_t msTicks = 0; -volatile uint8_t expe = 0; -volatile uint8_t blue_mode = 0; - -void SysTick_Handler() -{ - if ( BLUE_BUTTON() ){ - blue_mode = 1 ; - } - - msTicks++; /* See startup file startup_LPC17xx.s for SysTick vector */ - if (msTicks == 5 * expe){ - LED_GREEN(0); - }else if(msTicks >= 200){ - msTicks = 0; - LED_GREEN(1); - } - if(expe == 2){ - CLK_TOGGLE(); - } -} - - - - -int main(void) -{ - if (RCC->BDCR & RCC_BDCR_LSEON) { - LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR ); - LL_PWR_EnableBkUpAccess(); - - //expe = register RTC - expe = RTC->BKP0R; - if (expe == 0){ - expe = 1; - RTC->BKP0R = expe; - }else if (expe != 0 && BLUE_BUTTON()){ - expe ++; - RTC->BKP0R = expe; - } - }else{ - SystemClock_Config_24M_LSE(); - expe = 1; - LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR ); - LL_PWR_EnableBkUpAccess(); - RTC->BKP0R = expe; - } - LL_PWR_DisableBkUpAccess(); - - - switch(expe){ - case 1: - /* Configure the system clock */ - SystemClock_Config_80M(); - break; - case 2: - /* Configure the system clock */ - SystemClock_Config_24M_LSE(); - break; - } - - - - -// config GPIO -GPIO_init(); - -// init systick timer (tick period at 1 ms) -LL_Init1msTick( SystemCoreClock ); -LL_SYSTICK_EnableIT(); - -//Setup Sleep mode -LL_LPM_EnableSleep(); -//LL_LPM_EnableSleepOnExit(); - -while (1) { - if (blue_mode){ - switch(expe){ - case 1: - __WFI(); - break; - case 2: - LL_RCC_MSI_EnablePLLMode(); - break; - } - - } - } -} - -/** - * @brief System Clock Configuration - * @retval None - * 24Mhz + RTC + LSE - */ -void SystemClock_Config_24M_LSE(void) -{ - LL_FLASH_SetLatency(LL_FLASH_LATENCY_1); - while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_1) - { - } - LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1); - LL_RCC_MSI_Enable(); - - /* Wait till MSI is ready */ - while(LL_RCC_MSI_IsReady() != 1) - { - - } - LL_RCC_MSI_EnablePLLMode(); - LL_RCC_MSI_EnableRangeSelection(); - LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6); - LL_RCC_MSI_SetCalibTrimming(0); - LL_PWR_EnableBkUpAccess(); - LL_RCC_ForceBackupDomainReset(); - LL_RCC_ReleaseBackupDomainReset(); - LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW); - LL_RCC_LSE_Enable(); - - /* Wait till LSE is ready */ - while(LL_RCC_LSE_IsReady() != 1) - { - - } - LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE); - LL_RCC_EnableRTC(); - LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4); - LL_RCC_PLL_EnableDomain_SYS(); - LL_RCC_PLL_Enable(); - - /* Wait till PLL is ready */ - while(LL_RCC_PLL_IsReady() != 1) - { - - } - LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL); - - /* Wait till System clock is ready */ - while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL) - { - - } - LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1); - LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1); - LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1); - LL_SetSystemCoreClock(24000000); - - /* Update the time base */ - if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK) - { - Error_Handler(); - } -} - - -void SystemClock_Config_80M(void) -{ - LL_FLASH_SetLatency(LL_FLASH_LATENCY_4); - while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_4) - { - } - LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1); - LL_RCC_MSI_Enable(); - - /* Wait till MSI is ready */ - while(LL_RCC_MSI_IsReady() != 1) - { - - } - LL_RCC_MSI_EnableRangeSelection(); - LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6); - LL_RCC_MSI_SetCalibTrimming(0); - LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 40, LL_RCC_PLLR_DIV_2); - LL_RCC_PLL_EnableDomain_SYS(); - LL_RCC_PLL_Enable(); - - /* Wait till PLL is ready */ - while(LL_RCC_PLL_IsReady() != 1) - { - - } - LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL); - - /* Wait till System clock is ready */ - while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL) - { - - } - LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1); - LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1); - LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1); - LL_SetSystemCoreClock(80000000); - - /* Update the time base */ - if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK) - { -// Error_Handler(); - } -} diff --git a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/2a/0054ead6e427001b16eaee4b2dec2d39 b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/2a/0054ead6e427001b16eaee4b2dec2d39 deleted file mode 100644 index 5a08506..0000000 --- a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/2a/0054ead6e427001b16eaee4b2dec2d39 +++ /dev/null @@ -1,117 +0,0 @@ -/* Project L476_ats_blink for STM32L476 mounted on Nucleo board: - * the user LED (mounted on pin PA-5) is flashed every second for 50 ms. - * The time base is provided by Systick (1000 ticks per second). - * The clock configuration is the default one (Sysclk = 80 MHz, derived from MSI and PLL). - */ - -/* Includes ------------------------------------------------------------------*/ -#include "stm32l4xx_ll_bus.h" -#include "stm32l4xx_ll_rcc.h" -#include "stm32l4xx_ll_system.h" -#include "stm32l4xx_ll_utils.h" -#include "stm32l4xx_ll_gpio.h" -#include "stm32l4xx_ll_cortex.h" -// #if defined(USE_FULL_ASSERT) -// #include "stm32_assert.h" -// #endif /* USE_FULL_ASSERT */ - -#include "gpio.h" - -// systick interrupt handler -volatile uint32_t msTicks = 0; -volatile uint8_t expe = 0; -volatile uint8_t blue_mode = 0; - -void SysTick_Handler() -{ - if ( BLUE_BUTTON() ){ - blue_mode = 1 ; - } - - msTicks++; /* See startup file startup_LPC17xx.s for SysTick vector */ - if (msTicks == 5){ - LED_GREEN(0); - }else if(msTicks >= 200){ - msTicks = 0; - LED_GREEN(1); - } - CLK_TOGGLE(); -} - -// -//void SystemClock_Config(void); - -int main(void) -{ -/* Configure the system clock */ -SystemClock_Config(); - -// config GPIO -GPIO_init(); - -// init systick timer (tick period at 1 ms) -LL_Init1msTick( SystemCoreClock ); -LL_SYSTICK_EnableIT(); - -//Setup Sleep mode -LL_LPM_EnableSleep(); -//LL_LPM_EnableSleepOnExit(); - -while (1) { - if (blue_mode){ - __WFI(); - } - -// else { -// LED_GREEN(0); -// LL_mDelay(950); -// LED_GREEN(1); -// LL_mDelay(50); -// } - } -} - -/** - * @brief System Clock Configuration - * The system Clock is configured as follows : - * System Clock source = PLL (MSI) - * SYSCLK(Hz) = 80000000 - * HCLK(Hz) = 80000000 - * AHB Prescaler = 1 - * APB1 Prescaler = 1 - * APB2 Prescaler = 1 - * MSI Frequency(Hz) = 4000000 - * PLL_M = 1 - * PLL_N = 40 - * PLL_R = 2 - * Flash Latency(WS) = 4 - * @param None - * @retval None - */ -void SystemClock_Config(void) { -/* MSI configuration and activation */ -LL_FLASH_SetLatency(LL_FLASH_LATENCY_4); -LL_RCC_MSI_Enable(); -while (LL_RCC_MSI_IsReady() != 1) - { }; - -/* Main PLL configuration and activation */ -LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 40, LL_RCC_PLLR_DIV_2); -LL_RCC_PLL_Enable(); -LL_RCC_PLL_EnableDomain_SYS(); -while(LL_RCC_PLL_IsReady() != 1) - { }; - -/* Sysclk activation on the main PLL */ -LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1); -LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL); -while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL) - { }; - -/* Set APB1 & APB2 prescaler*/ -LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1); -LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1); - -/* Update the global variable called SystemCoreClock */ -SystemCoreClockUpdate(); -} diff --git a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/2d/f00ed0eae527001b16eaee4b2dec2d39 b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/2d/f00ed0eae527001b16eaee4b2dec2d39 deleted file mode 100644 index 86d24d7..0000000 --- a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/2d/f00ed0eae527001b16eaee4b2dec2d39 +++ /dev/null @@ -1,132 +0,0 @@ -/* Project L476_ats_blink for STM32L476 mounted on Nucleo board: - * the user LED (mounted on pin PA-5) is flashed every second for 50 ms. - * The time base is provided by Systick (1000 ticks per second). - * The clock configuration is the default one (Sysclk = 80 MHz, derived from MSI and PLL). - */ - -/* Includes ------------------------------------------------------------------*/ -#include "main.h" -// #if defined(USE_FULL_ASSERT) -// #include "stm32_assert.h" -// #endif /* USE_FULL_ASSERT */ - -#include "gpio.h" - -// systick interrupt handler -volatile uint32_t msTicks = 0; -volatile uint8_t expe = 0; -volatile uint8_t blue_mode = 0; - -void SysTick_Handler() -{ - if ( BLUE_BUTTON() ){ - blue_mode = 1 ; - } - - msTicks++; /* See startup file startup_LPC17xx.s for SysTick vector */ - if (msTicks == 5){ - LED_GREEN(0); - }else if(msTicks >= 200){ - msTicks = 0; - LED_GREEN(1); - } - CLK_TOGGLE(); -} - -// -//void SystemClock_Config(void); - -int main(void) -{ -/* Configure the system clock */ -SystemClock_Config(); - -// config GPIO -GPIO_init(); - -// init systick timer (tick period at 1 ms) -LL_Init1msTick( SystemCoreClock ); -LL_SYSTICK_EnableIT(); - -//Setup Sleep mode -LL_LPM_EnableSleep(); -//LL_LPM_EnableSleepOnExit(); - -while (1) { - if (blue_mode){ - __WFI(); - } - -// else { -// LED_GREEN(0); -// LL_mDelay(950); -// LED_GREEN(1); -// LL_mDelay(50); -// } - } -} - -/** -/** - * @brief System Clock Configuration - * @retval None - * 24Mhz + RTC + LSE - */ -void SystemClock_Config(void) -{ - LL_FLASH_SetLatency(LL_FLASH_LATENCY_1); - while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_1) - { - } - LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1); - LL_RCC_MSI_Enable(); - - /* Wait till MSI is ready */ - while(LL_RCC_MSI_IsReady() != 1) - { - - } - LL_RCC_MSI_EnablePLLMode(); - LL_RCC_MSI_EnableRangeSelection(); - LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6); - LL_RCC_MSI_SetCalibTrimming(0); - LL_PWR_EnableBkUpAccess(); - LL_RCC_ForceBackupDomainReset(); - LL_RCC_ReleaseBackupDomainReset(); - LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW); - LL_RCC_LSE_Enable(); - - /* Wait till LSE is ready */ - while(LL_RCC_LSE_IsReady() != 1) - { - - } - LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE); - LL_RCC_EnableRTC(); - LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4); - LL_RCC_PLL_EnableDomain_SYS(); - LL_RCC_PLL_Enable(); - - /* Wait till PLL is ready */ - while(LL_RCC_PLL_IsReady() != 1) - { - - } - LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL); - - /* Wait till System clock is ready */ - while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL) - { - - } - LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1); - LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1); - LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1); - LL_SetSystemCoreClock(24000000); - - /* Update the time base */ - if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK) - { - Error_Handler(); - } -} diff --git a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/3/f0a41473ec27001b16eaee4b2dec2d39 b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/3/f0a41473ec27001b16eaee4b2dec2d39 deleted file mode 100644 index dc267cb..0000000 --- a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/3/f0a41473ec27001b16eaee4b2dec2d39 +++ /dev/null @@ -1,142 +0,0 @@ -/* Project L476_ats_blink for STM32L476 mounted on Nucleo board: - * the user LED (mounted on pin PA-5) is flashed every second for 50 ms. - * The time base is provided by Systick (1000 ticks per second). - * The clock configuration is the default one (Sysclk = 80 MHz, derived from MSI and PLL). - */ - -/* Includes ------------------------------------------------------------------*/ -#include "main.h" -// #if defined(USE_FULL_ASSERT) -// #include "stm32_assert.h" -// #endif /* USE_FULL_ASSERT */ - -#include "gpio.h" - -// systick interrupt handler -volatile uint32_t msTicks = 0; -volatile uint8_t expe = 2; -volatile uint8_t blue_mode = 0; - -void SysTick_Handler() -{ - if ( BLUE_BUTTON() ){ - blue_mode = 1 ; - } - - msTicks++; /* See startup file startup_LPC17xx.s for SysTick vector */ - if (msTicks == 5){ - LED_GREEN(0); - }else if(msTicks >= 200){ - msTicks = 0; - LED_GREEN(1); - } - if(expe == 2){ - CLK_TOGGLE(); - } -} - - -void SystemClock_Config(void); - -int main(void) -{ -/* Configure the system clock */ -SystemClock_Config(); - -// config GPIO -GPIO_init(); - -// init systick timer (tick period at 1 ms) -LL_Init1msTick( SystemCoreClock ); -LL_SYSTICK_EnableIT(); - -//Setup Sleep mode -LL_LPM_EnableSleep(); -//LL_LPM_EnableSleepOnExit(); - -while (1) { - if (blue_mode){ - switch(expe){ - case 1: - __WFI(); - break; - case 2: - break; - } - } - -// else { -// LED_GREEN(0); -// LL_mDelay(950); -// LED_GREEN(1); -// LL_mDelay(50); -// } - } -} - -/** - * @brief System Clock Configuration - * @retval None - * 24Mhz + RTC + LSE - */ -void SystemClock_Config(void) -{ - LL_FLASH_SetLatency(LL_FLASH_LATENCY_1); - while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_1) - { - } - LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1); - LL_RCC_MSI_Enable(); - - /* Wait till MSI is ready */ - while(LL_RCC_MSI_IsReady() != 1) - { - - } - - LL_RCC_LSE_Enable(); - - /* Wait till LSE is ready */ - while(LL_RCC_LSE_IsReady() != 1) - { - - } - LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE); - LL_RCC_EnableRTC(); - - LL_RCC_MSI_EnableRangeSelection(); - LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6); - LL_RCC_MSI_SetCalibTrimming(0); - LL_RCC_MSI_EnablePLLMode(); - LL_PWR_EnableBkUpAccess(); - LL_RCC_ForceBackupDomainReset(); - LL_RCC_ReleaseBackupDomainReset(); - LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW); - - LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4); - LL_RCC_PLL_EnableDomain_SYS(); - LL_RCC_PLL_Enable(); - - /* Wait till PLL is ready */ - while(LL_RCC_PLL_IsReady() != 1) - { - - } - LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL); - - /* Wait till System clock is ready */ - while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL) - { - - } - LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1); - LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1); - LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1); - LL_SetSystemCoreClock(24000000); - - /* Update the time base */ - if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK) - { -// Error_Handler(); - } -} diff --git a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/36/d0c2f257ea27001b16eaee4b2dec2d39 b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/36/d0c2f257ea27001b16eaee4b2dec2d39 deleted file mode 100644 index e541f0f..0000000 --- a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/36/d0c2f257ea27001b16eaee4b2dec2d39 +++ /dev/null @@ -1,132 +0,0 @@ -/* Project L476_ats_blink for STM32L476 mounted on Nucleo board: - * the user LED (mounted on pin PA-5) is flashed every second for 50 ms. - * The time base is provided by Systick (1000 ticks per second). - * The clock configuration is the default one (Sysclk = 80 MHz, derived from MSI and PLL). - */ - -/* Includes ------------------------------------------------------------------*/ -#include "main.h" -// #if defined(USE_FULL_ASSERT) -// #include "stm32_assert.h" -// #endif /* USE_FULL_ASSERT */ - -#include "gpio.h" - -// systick interrupt handler -volatile uint32_t msTicks = 0; -volatile uint8_t expe = 0; -volatile uint8_t blue_mode = 0; - -void SysTick_Handler() -{ - if ( BLUE_BUTTON() ){ - blue_mode = 1 ; - } - - msTicks++; /* See startup file startup_LPC17xx.s for SysTick vector */ - if (msTicks == 5){ - LED_GREEN(0); - }else if(msTicks >= 200){ - msTicks = 0; - LED_GREEN(1); - } - CLK_TOGGLE(); -} - -// -//void SystemClock_Config(void); - -int main(void) -{ -/* Configure the system clock */ -SystemClock_Config(); - -// config GPIO -GPIO_init(); - -// init systick timer (tick period at 1 ms) -LL_Init1msTick( SystemCoreClock ); -LL_SYSTICK_EnableIT(); - -//Setup Sleep mode -LL_LPM_EnableSleep(); -//LL_LPM_EnableSleepOnExit(); - -while (1) { - if (blue_mode){ - __WFI(); - } - -// else { -// LED_GREEN(0); -// LL_mDelay(950); -// LED_GREEN(1); -// LL_mDelay(50); -// } - } -} - -/** -/** - * @brief System Clock Configuration - * @retval None - * 24Mhz + RTC + LSE - */ -void SystemClock_Config(void) -{ - LL_FLASH_SetLatency(LL_FLASH_LATENCY_1); - while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_1) - { - } - LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1); - LL_RCC_MSI_Enable(); - - /* Wait till MSI is ready */ - while(LL_RCC_MSI_IsReady() != 1) - { - - } - LL_RCC_MSI_EnablePLLMode(); - LL_RCC_MSI_EnableRangeSelection(); - LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6); - LL_RCC_MSI_SetCalibTrimming(0); - LL_PWR_EnableBkUpAccess(); - LL_RCC_ForceBackupDomainReset(); - LL_RCC_ReleaseBackupDomainReset(); - LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW); - LL_RCC_LSE_Enable(); - - /* Wait till LSE is ready */ - while(LL_RCC_LSE_IsReady() != 1) - { - - } - LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE); - LL_RCC_EnableRTC(); - LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4); - LL_RCC_PLL_EnableDomain_SYS(); - LL_RCC_PLL_Enable(); - - /* Wait till PLL is ready */ - while(LL_RCC_PLL_IsReady() != 1) - { - - } - LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL); - - /* Wait till System clock is ready */ - while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL) - { - - } - LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1); - LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1); - LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1); - LL_SetSystemCoreClock(24000000); - - /* Update the time base */ - if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK) - { -// Error_Handler(); - } -} diff --git a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/38/90d6b9feac28001b1d0af99b6389052e b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/38/90d6b9feac28001b1d0af99b6389052e deleted file mode 100644 index fca2107..0000000 --- a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/38/90d6b9feac28001b1d0af99b6389052e +++ /dev/null @@ -1,215 +0,0 @@ -/* Project L476_ats_blink for STM32L476 mounted on Nucleo board: - * the user LED (mounted on pin PA-5) is flashed every second for 50 ms. - * The time base is provided by Systick (1000 ticks per second). - * The clock configuration is the default one (Sysclk = 80 MHz, derived from MSI and PLL). - */ - -/* Includes ------------------------------------------------------------------*/ -#include "main.h" -// #if defined(USE_FULL_ASSERT) -// #include "stm32_assert.h" -// #endif /* USE_FULL_ASSERT */ - -#include "gpio.h" - -// systick interrupt handler -volatile uint32_t msTicks = 0; -volatile uint8_t expe = 1; -volatile uint8_t blue_mode = 0; - -void SysTick_Handler() -{ - if ( BLUE_BUTTON() ){ - blue_mode = 1 ; - } - - msTicks++; /* See startup file startup_LPC17xx.s for SysTick vector */ - if (msTicks == 5){ - LED_GREEN(0); - }else if(msTicks >= 200){ - msTicks = 0; - LED_GREEN(1); - } - if(expe == 2){ - CLK_TOGGLE(); - } -} - - - - -int main(void) -{ -// if (RCC->BDCR & RCC_BDCR_LSEON) { -// LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR ); -// LL_PWR_EnableBkUpAccess(); -// -// //expe = register RTC -// expe = RTC->BKP0R; -// if (expe == 0){ -// expe = 1; -// RTC->BKP0R = expe; -// }else if (expe != 0 && BLUE_BUTTON()){ -// expe ++; -// RTC->BKP0R = expe; -// } -// }else{ -// SystemClock_Config_24M_LSE(); -// expe = 1; -// LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR ); -// LL_PWR_EnableBkUpAccess(); -// RTC->BKP0R = expe; -// } -// LL_PWR_DisableBkUpAccess(); - switch(expe){ - case 1: - /* Configure the system clock */ - SystemClock_Config_80M(); - break; - case 2: - /* Configure the system clock */ - SystemClock_Config_24M_LSE(); - break; - } - - - - -// config GPIO -GPIO_init(); - -// init systick timer (tick period at 1 ms) -LL_Init1msTick( SystemCoreClock ); -LL_SYSTICK_EnableIT(); - -//Setup Sleep mode -LL_LPM_EnableSleep(); -//LL_LPM_EnableSleepOnExit(); - -while (1) { - if (blue_mode){ - switch(expe){ - case 1: - __WFI(); - break; - case 2: - LL_RCC_MSI_EnablePLLMode(); - break; - } - - } - } -} - -/** - * @brief System Clock Configuration - * @retval None - * 24Mhz + RTC + LSE - */ -void SystemClock_Config_24M_LSE(void) -{ - LL_FLASH_SetLatency(LL_FLASH_LATENCY_1); - while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_1) - { - } - LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1); - LL_RCC_MSI_Enable(); - - /* Wait till MSI is ready */ - while(LL_RCC_MSI_IsReady() != 1) - { - - } - - LL_RCC_LSE_Enable(); - - /* Wait till LSE is ready */ - while(LL_RCC_LSE_IsReady() != 1) - { - - } - LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE); - LL_RCC_EnableRTC(); - - LL_RCC_MSI_EnableRangeSelection(); - LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6); - LL_RCC_MSI_SetCalibTrimming(0); -// LL_RCC_MSI_EnablePLLMode(); - LL_PWR_EnableBkUpAccess(); - LL_RCC_ForceBackupDomainReset(); - LL_RCC_ReleaseBackupDomainReset(); - LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW); - - LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4); - LL_RCC_PLL_EnableDomain_SYS(); - LL_RCC_PLL_Enable(); - - /* Wait till PLL is ready */ - while(LL_RCC_PLL_IsReady() != 1) - { - - } - LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL); - - /* Wait till System clock is ready */ - while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL) - { - - } - LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1); - LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1); - LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1); - LL_SetSystemCoreClock(24000000); - - /* Update the time base */ - if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK) - { -// Error_Handler(); - } -} - - -void SystemClock_Config_80M(void) -{ - LL_FLASH_SetLatency(LL_FLASH_LATENCY_4); - while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_4) - { - } - LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1); - LL_RCC_MSI_Enable(); - - /* Wait till MSI is ready */ - while(LL_RCC_MSI_IsReady() != 1) - { - - } - LL_RCC_MSI_EnableRangeSelection(); - LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6); - LL_RCC_MSI_SetCalibTrimming(0); - LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 40, LL_RCC_PLLR_DIV_2); - LL_RCC_PLL_EnableDomain_SYS(); - LL_RCC_PLL_Enable(); - - /* Wait till PLL is ready */ - while(LL_RCC_PLL_IsReady() != 1) - { - - } - LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL); - - /* Wait till System clock is ready */ - while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL) - { - - } - LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1); - LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1); - LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1); - LL_SetSystemCoreClock(80000000); - - /* Update the time base */ - if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK) - { -// Error_Handler(); - } -} diff --git a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/3b/c0a8101fb128001b1d0af99b6389052e b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/3b/c0a8101fb128001b1d0af99b6389052e new file mode 100644 index 0000000..04e57e1 --- /dev/null +++ b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/3b/c0a8101fb128001b1d0af99b6389052e @@ -0,0 +1,215 @@ +/* Project L476_ats_blink for STM32L476 mounted on Nucleo board: + * the user LED (mounted on pin PA-5) is flashed every second for 50 ms. + * The time base is provided by Systick (1000 ticks per second). + * The clock configuration is the default one (Sysclk = 80 MHz, derived from MSI and PLL). + */ + +/* Includes ------------------------------------------------------------------*/ +#include "main.h" +// #if defined(USE_FULL_ASSERT) +// #include "stm32_assert.h" +// #endif /* USE_FULL_ASSERT */ + +#include "gpio.h" + +// systick interrupt handler +volatile uint32_t msTicks = 0; +volatile uint8_t expe = 0; +volatile uint8_t blue_mode = 0; + +void SysTick_Handler() +{ + if ( BLUE_BUTTON() ){ + blue_mode = 1 ; + } + + msTicks++; /* See startup file startup_LPC17xx.s for SysTick vector */ + if (msTicks == 5 * expe){ + LED_GREEN(0); + }else if(msTicks >= 200){ + msTicks = 0; + LED_GREEN(1); + } + if(expe == 2){ + CLK_TOGGLE(); + } +} + + + + +int main(void) +{ + if (RCC->BDCR & RCC_BDCR_LSEON) { + LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR ); + LL_PWR_EnableBkUpAccess(); + + //expe = register RTC + expe = RTC->BKP0R; + + if (BLUE_BUTTON()){ + expe ++; + RTC->BKP0R = expe; + } + }else{ + SystemClock_Config_24M_LSE(); + expe = 1; + LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR ); + LL_PWR_EnableBkUpAccess(); + RTC->BKP0R = expe; + } + LL_PWR_DisableBkUpAccess(); + switch(expe){ + case 1: + /* Configure the system clock */ + SystemClock_Config_80M(); + break; + case 2: + /* Configure the system clock */ + SystemClock_Config_24M_LSE(); + break; + } + + + + + // config GPIO + GPIO_init(); + + // init systick timer (tick period at 1 ms) + LL_Init1msTick( SystemCoreClock ); + LL_SYSTICK_EnableIT(); + + //Setup Sleep mode + LL_LPM_EnableSleep(); + //LL_LPM_EnableSleepOnExit(); + + while (1) { + if (blue_mode){ + switch(expe){ + case 1: + __WFI(); + break; + case 2: + LL_RCC_MSI_EnablePLLMode(); + break; + } + + } + } +} + +/** + * @brief System Clock Configuration + * @retval None + * 24Mhz + RTC + LSE + */ +void SystemClock_Config_24M_LSE(void) +{ + LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR ); + LL_FLASH_SetLatency(LL_FLASH_LATENCY_1); + while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_1) + { + } + LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1); + LL_RCC_MSI_Enable(); + + /* Wait till MSI is ready */ + while(LL_RCC_MSI_IsReady() != 1) + { + + } + + LL_PWR_EnableBkUpAccess(); + LL_RCC_ForceBackupDomainReset(); + LL_RCC_ReleaseBackupDomainReset(); + LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW); + + LL_RCC_MSI_EnableRangeSelection(); + LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6); + LL_RCC_MSI_SetCalibTrimming(0); + // LL_RCC_MSI_EnablePLLMode(); + + LL_RCC_LSE_Enable(); + + /* Wait till LSE is ready */ + while(LL_RCC_LSE_IsReady() != 1) + { + + } + LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE); + LL_RCC_EnableRTC(); + + LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4); + LL_RCC_PLL_EnableDomain_SYS(); + LL_RCC_PLL_Enable(); + + /* Wait till PLL is ready */ + while(LL_RCC_PLL_IsReady() != 1) + { + + } + LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL); + + /* Wait till System clock is ready */ + while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL) + { + + } + LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1); + LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1); + LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1); + LL_SetSystemCoreClock(24000000); + + /* Update the time base */ + if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK) + { + // Error_Handler(); + } +} + + +void SystemClock_Config_80M(void) +{ + LL_FLASH_SetLatency(LL_FLASH_LATENCY_4); + while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_4) + { + } + LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1); + LL_RCC_MSI_Enable(); + + /* Wait till MSI is ready */ + while(LL_RCC_MSI_IsReady() != 1) + { + + } + LL_RCC_MSI_EnableRangeSelection(); + LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6); + LL_RCC_MSI_SetCalibTrimming(0); + LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 40, LL_RCC_PLLR_DIV_2); + LL_RCC_PLL_EnableDomain_SYS(); + LL_RCC_PLL_Enable(); + + /* Wait till PLL is ready */ + while(LL_RCC_PLL_IsReady() != 1) + { + + } + LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL); + + /* Wait till System clock is ready */ + while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL) + { + + } + LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1); + LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1); + LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1); + LL_SetSystemCoreClock(80000000); + + /* Update the time base */ + if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK) + { + // Error_Handler(); + } +} diff --git a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/57/7067ce86a928001b1d0af99b6389052e b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/57/7067ce86a928001b1d0af99b6389052e deleted file mode 100644 index ffe6fd9..0000000 --- a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/57/7067ce86a928001b1d0af99b6389052e +++ /dev/null @@ -1,203 +0,0 @@ -/* Project L476_ats_blink for STM32L476 mounted on Nucleo board: - * the user LED (mounted on pin PA-5) is flashed every second for 50 ms. - * The time base is provided by Systick (1000 ticks per second). - * The clock configuration is the default one (Sysclk = 80 MHz, derived from MSI and PLL). - */ - -/* Includes ------------------------------------------------------------------*/ -#include "main.h" -// #if defined(USE_FULL_ASSERT) -// #include "stm32_assert.h" -// #endif /* USE_FULL_ASSERT */ - -#include "gpio.h" - -// systick interrupt handler -volatile uint32_t msTicks = 0; -volatile uint8_t expe = 0; -volatile uint8_t blue_mode = 0; - -void SysTick_Handler() -{ - if ( BLUE_BUTTON() ){ - blue_mode = 1 ; - } - - msTicks++; /* See startup file startup_LPC17xx.s for SysTick vector */ - if (msTicks == 5 * expe){ - LED_GREEN(0); - }else if(msTicks >= 200){ - msTicks = 0; - LED_GREEN(1); - } - if(expe == 2){ - CLK_TOGGLE(); - } -} - - - - -int main(void) -{ - //expe = register RTC - if (expe == 0){ - expe = 1; - //save RTC - }else if (expe != 0 && BLUE_BUTTON()){ - expe ++; - //save RTC - } - - switch(expe){ - case 1: - /* Configure the system clock */ - SystemClock_Config_80M(); - break; - case 2: - /* Configure the system clock */ - SystemClock_Config_24M_LSE(); - break; - } - - - - -// config GPIO -GPIO_init(); - -// init systick timer (tick period at 1 ms) -LL_Init1msTick( SystemCoreClock ); -LL_SYSTICK_EnableIT(); - -//Setup Sleep mode -LL_LPM_EnableSleep(); -//LL_LPM_EnableSleepOnExit(); - -while (1) { - if (blue_mode){ - switch(expe){ - case 1: - __WFI(); - break; - case 2: - LL_RCC_MSI_EnablePLLMode(); - break; - } - - } - } -} - -/** - * @brief System Clock Configuration - * @retval None - * 24Mhz + RTC + LSE - */ -void SystemClock_Config_24M_LSE(void) -{ - LL_FLASH_SetLatency(LL_FLASH_LATENCY_1); - while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_1) - { - } - LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1); - LL_RCC_MSI_Enable(); - - /* Wait till MSI is ready */ - while(LL_RCC_MSI_IsReady() != 1) - { - - } - - LL_RCC_LSE_Enable(); - - /* Wait till LSE is ready */ - while(LL_RCC_LSE_IsReady() != 1) - { - - } - LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE); - LL_RCC_EnableRTC(); - - LL_RCC_MSI_EnableRangeSelection(); - LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6); - LL_RCC_MSI_SetCalibTrimming(0); -// LL_RCC_MSI_EnablePLLMode(); - LL_PWR_EnableBkUpAccess(); - LL_RCC_ForceBackupDomainReset(); - LL_RCC_ReleaseBackupDomainReset(); - LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW); - - LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4); - LL_RCC_PLL_EnableDomain_SYS(); - LL_RCC_PLL_Enable(); - - /* Wait till PLL is ready */ - while(LL_RCC_PLL_IsReady() != 1) - { - - } - LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL); - - /* Wait till System clock is ready */ - while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL) - { - - } - LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1); - LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1); - LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1); - LL_SetSystemCoreClock(24000000); - - /* Update the time base */ - if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK) - { -// Error_Handler(); - } -} - - -void SystemClock_Config_80M(void) -{ - LL_FLASH_SetLatency(LL_FLASH_LATENCY_4); - while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_4) - { - } - LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1); - LL_RCC_MSI_Enable(); - - /* Wait till MSI is ready */ - while(LL_RCC_MSI_IsReady() != 1) - { - - } - LL_RCC_MSI_EnableRangeSelection(); - LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6); - LL_RCC_MSI_SetCalibTrimming(0); - LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 40, LL_RCC_PLLR_DIV_2); - LL_RCC_PLL_EnableDomain_SYS(); - LL_RCC_PLL_Enable(); - - /* Wait till PLL is ready */ - while(LL_RCC_PLL_IsReady() != 1) - { - - } - LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL); - - /* Wait till System clock is ready */ - while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL) - { - - } - LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1); - LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1); - LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1); - LL_SetSystemCoreClock(80000000); - - /* Update the time base */ - if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK) - { -// Error_Handler(); - } -} diff --git a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/59/70f0c7a5e527001b16eaee4b2dec2d39 b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/59/70f0c7a5e527001b16eaee4b2dec2d39 deleted file mode 100644 index 780d0d3..0000000 --- a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/59/70f0c7a5e527001b16eaee4b2dec2d39 +++ /dev/null @@ -1,137 +0,0 @@ -/* Project L476_ats_blink for STM32L476 mounted on Nucleo board: - * the user LED (mounted on pin PA-5) is flashed every second for 50 ms. - * The time base is provided by Systick (1000 ticks per second). - * The clock configuration is the default one (Sysclk = 80 MHz, derived from MSI and PLL). - */ - -/* Includes ------------------------------------------------------------------*/ -#include "stm32l4xx_ll_bus.h" -#include "stm32l4xx_ll_rcc.h" -#include "stm32l4xx_ll_system.h" -#include "stm32l4xx_ll_utils.h" -#include "stm32l4xx_ll_gpio.h" -#include "stm32l4xx_ll_cortex.h" -// #if defined(USE_FULL_ASSERT) -// #include "stm32_assert.h" -// #endif /* USE_FULL_ASSERT */ - -#include "gpio.h" - -// systick interrupt handler -volatile uint32_t msTicks = 0; -volatile uint8_t expe = 0; -volatile uint8_t blue_mode = 0; - -void SysTick_Handler() -{ - if ( BLUE_BUTTON() ){ - blue_mode = 1 ; - } - - msTicks++; /* See startup file startup_LPC17xx.s for SysTick vector */ - if (msTicks == 5){ - LED_GREEN(0); - }else if(msTicks >= 200){ - msTicks = 0; - LED_GREEN(1); - } - CLK_TOGGLE(); -} - -// -//void SystemClock_Config(void); - -int main(void) -{ -/* Configure the system clock */ -SystemClock_Config(); - -// config GPIO -GPIO_init(); - -// init systick timer (tick period at 1 ms) -LL_Init1msTick( SystemCoreClock ); -LL_SYSTICK_EnableIT(); - -//Setup Sleep mode -LL_LPM_EnableSleep(); -//LL_LPM_EnableSleepOnExit(); - -while (1) { - if (blue_mode){ - __WFI(); - } - -// else { -// LED_GREEN(0); -// LL_mDelay(950); -// LED_GREEN(1); -// LL_mDelay(50); -// } - } -} - -/** -/** - * @brief System Clock Configuration - * @retval None - * 24Mhz + RTC + LSE - */ -void SystemClock_Config(void) -{ - LL_FLASH_SetLatency(LL_FLASH_LATENCY_1); - while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_1) - { - } - LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1); - LL_RCC_MSI_Enable(); - - /* Wait till MSI is ready */ - while(LL_RCC_MSI_IsReady() != 1) - { - - } - LL_RCC_MSI_EnablePLLMode(); - LL_RCC_MSI_EnableRangeSelection(); - LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6); - LL_RCC_MSI_SetCalibTrimming(0); - LL_PWR_EnableBkUpAccess(); - LL_RCC_ForceBackupDomainReset(); - LL_RCC_ReleaseBackupDomainReset(); - LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW); - LL_RCC_LSE_Enable(); - - /* Wait till LSE is ready */ - while(LL_RCC_LSE_IsReady() != 1) - { - - } - LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE); - LL_RCC_EnableRTC(); - LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4); - LL_RCC_PLL_EnableDomain_SYS(); - LL_RCC_PLL_Enable(); - - /* Wait till PLL is ready */ - while(LL_RCC_PLL_IsReady() != 1) - { - - } - LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL); - - /* Wait till System clock is ready */ - while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL) - { - - } - LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1); - LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1); - LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1); - LL_SetSystemCoreClock(24000000); - - /* Update the time base */ - if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK) - { - Error_Handler(); - } -} diff --git a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/6a/701013b2a928001b1d0af99b6389052e b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/6a/701013b2a928001b1d0af99b6389052e deleted file mode 100644 index 2902365..0000000 --- a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/6a/701013b2a928001b1d0af99b6389052e +++ /dev/null @@ -1,219 +0,0 @@ -/* Project L476_ats_blink for STM32L476 mounted on Nucleo board: - * the user LED (mounted on pin PA-5) is flashed every second for 50 ms. - * The time base is provided by Systick (1000 ticks per second). - * The clock configuration is the default one (Sysclk = 80 MHz, derived from MSI and PLL). - */ - -/* Includes ------------------------------------------------------------------*/ -#include "main.h" -// #if defined(USE_FULL_ASSERT) -// #include "stm32_assert.h" -// #endif /* USE_FULL_ASSERT */ - -#include "gpio.h" - -// systick interrupt handler -volatile uint32_t msTicks = 0; -volatile uint8_t expe = 0; -volatile uint8_t blue_mode = 0; - -void SysTick_Handler() -{ - if ( BLUE_BUTTON() ){ - blue_mode = 1 ; - } - - msTicks++; /* See startup file startup_LPC17xx.s for SysTick vector */ - if (msTicks == 5 * expe){ - LED_GREEN(0); - }else if(msTicks >= 200){ - msTicks = 0; - LED_GREEN(1); - } - if(expe == 2){ - CLK_TOGGLE(); - } -} - - - - -int main(void) -{ - if (RCC->BDCR & RCC_BDCR_LSEON) { - LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR ); - LL_PWR_EnableBkUpAccess(); - - //expe = register RTC - expe = RTC_BKP0R; - if (expe == 0){ - expe = 1; - RTC_BKP0R = expe; - }else if (expe != 0 && BLUE_BUTTON()){ - expe ++; - RTC_BKP0R = expe; - } - }else{ - - } - - - - switch(expe){ - case 1: - /* Configure the system clock */ - SystemClock_Config_80M(); - break; - case 2: - /* Configure the system clock */ - SystemClock_Config_24M_LSE(); - break; - } - - - - -// config GPIO -GPIO_init(); - -// init systick timer (tick period at 1 ms) -LL_Init1msTick( SystemCoreClock ); -LL_SYSTICK_EnableIT(); - -//Setup Sleep mode -LL_LPM_EnableSleep(); -//LL_LPM_EnableSleepOnExit(); - -while (1) { - if (blue_mode){ - switch(expe){ - case 1: - __WFI(); - break; - case 2: - LL_RCC_MSI_EnablePLLMode(); - break; - } - - } - } -} - -void Init_LSE(void){ - LL_RCC_LSE_Enable(); - - /* Wait till LSE is ready */ - while(LL_RCC_LSE_IsReady() != 1) - { - - } - LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE); - LL_RCC_EnableRTC(); - LL_PWR_EnableBkUpAccess(); - LL_RCC_ForceBackupDomainReset(); - LL_RCC_ReleaseBackupDomainReset(); - LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW); -} - -/** - * @brief System Clock Configuration - * @retval None - * 24Mhz + RTC + LSE - */ -void SystemClock_Config_24M_LSE(void) -{ - LL_FLASH_SetLatency(LL_FLASH_LATENCY_1); - while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_1) - { - } - LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1); - LL_RCC_MSI_Enable(); - - /* Wait till MSI is ready */ - while(LL_RCC_MSI_IsReady() != 1) - { - - } - - - - LL_RCC_MSI_EnableRangeSelection(); - LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6); - LL_RCC_MSI_SetCalibTrimming(0); -// LL_RCC_MSI_EnablePLLMode(); - - - - LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4); - LL_RCC_PLL_EnableDomain_SYS(); - LL_RCC_PLL_Enable(); - - /* Wait till PLL is ready */ - while(LL_RCC_PLL_IsReady() != 1) - { - - } - LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL); - - /* Wait till System clock is ready */ - while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL) - { - - } - LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1); - LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1); - LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1); - LL_SetSystemCoreClock(24000000); - - /* Update the time base */ - if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK) - { -// Error_Handler(); - } -} - - -void SystemClock_Config_80M(void) -{ - LL_FLASH_SetLatency(LL_FLASH_LATENCY_4); - while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_4) - { - } - LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1); - LL_RCC_MSI_Enable(); - - /* Wait till MSI is ready */ - while(LL_RCC_MSI_IsReady() != 1) - { - - } - LL_RCC_MSI_EnableRangeSelection(); - LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6); - LL_RCC_MSI_SetCalibTrimming(0); - LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 40, LL_RCC_PLLR_DIV_2); - LL_RCC_PLL_EnableDomain_SYS(); - LL_RCC_PLL_Enable(); - - /* Wait till PLL is ready */ - while(LL_RCC_PLL_IsReady() != 1) - { - - } - LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL); - - /* Wait till System clock is ready */ - while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL) - { - - } - LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1); - LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1); - LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1); - LL_SetSystemCoreClock(80000000); - - /* Update the time base */ - if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK) - { -// Error_Handler(); - } -} diff --git a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/6d/70f34093ea27001b16eaee4b2dec2d39 b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/6d/70f34093ea27001b16eaee4b2dec2d39 deleted file mode 100644 index 460e791..0000000 --- a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/6d/70f34093ea27001b16eaee4b2dec2d39 +++ /dev/null @@ -1,81 +0,0 @@ -/* USER CODE BEGIN Header */ -/** - ****************************************************************************** - * @file : main.h - * @brief : Header for main.c file. - * This file contains the common defines of the application. - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2020 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ -/* USER CODE END Header */ - -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __MAIN_H -#define __MAIN_H - -#ifdef __cplusplus -extern "C" { -#endif - -/* Includes ------------------------------------------------------------------*/ -#include "stm32l4xx_hal.h" -#include "stm32l4xx_ll_crs.h" -#include "stm32l4xx_ll_rcc.h" -#include "stm32l4xx_ll_bus.h" -#include "stm32l4xx_ll_system.h" -#include "stm32l4xx_ll_exti.h" -#include "stm32l4xx_ll_cortex.h" -#include "stm32l4xx_ll_utils.h" -#include "stm32l4xx_ll_pwr.h" -#include "stm32l4xx_ll_dma.h" -#include "stm32l4xx_ll_gpio.h" - -/* Private includes ----------------------------------------------------------*/ -/* USER CODE BEGIN Includes */ - -/* USER CODE END Includes */ - -/* Exported types ------------------------------------------------------------*/ -/* USER CODE BEGIN ET */ - -/* USER CODE END ET */ - -/* Exported constants --------------------------------------------------------*/ -/* USER CODE BEGIN EC */ - -/* USER CODE END EC */ - -/* Exported macro ------------------------------------------------------------*/ -/* USER CODE BEGIN EM */ - -/* USER CODE END EM */ - -/* Exported functions prototypes ---------------------------------------------*/ -void Error_Handler(void); - -/* USER CODE BEGIN EFP */ - -/* USER CODE END EFP */ - -/* Private defines -----------------------------------------------------------*/ -/* USER CODE BEGIN Private defines */ - -/* USER CODE END Private defines */ - -#ifdef __cplusplus -} -#endif - -#endif /* __MAIN_H */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/7b/e06807a1ea27001b16eaee4b2dec2d39 b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/7b/e06807a1ea27001b16eaee4b2dec2d39 deleted file mode 100644 index ffe9917..0000000 --- a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/7b/e06807a1ea27001b16eaee4b2dec2d39 +++ /dev/null @@ -1,81 +0,0 @@ -/* USER CODE BEGIN Header */ -/** - ****************************************************************************** - * @file : main.h - * @brief : Header for main.c file. - * This file contains the common defines of the application. - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2020 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ -/* USER CODE END Header */ - -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __MAIN_H -#define __MAIN_H - -#ifdef __cplusplus -extern "C" { -#endif - -/* Includes ------------------------------------------------------------------*/ -#include "stm32l4xx_hal.h" -#include "stm32l4xx_ll_crs.h" -#include "stm32l4xx_ll_rcc.h" -#include "stm32l4xx_ll_bus.h" -#include "stm32l4xx_ll_system.h" -#include "stm32l4xx_ll_exti.h" -#include "stm32l4xx_ll_cortex.h" -#include "stm32l4xx_ll_utils.h" -#include "stm32l4xx_ll_pwr.h" -#include "stm32l4xx_ll_dma.h" -#include "stm32l4xx_ll_gpio.h" - -/* Private includes ----------------------------------------------------------*/ -/* USER CODE BEGIN Includes */ -#include "gpio.h" -/* USER CODE END Includes */ - -/* Exported types ------------------------------------------------------------*/ -/* USER CODE BEGIN ET */ - -/* USER CODE END ET */ - -/* Exported constants --------------------------------------------------------*/ -/* USER CODE BEGIN EC */ - -/* USER CODE END EC */ - -/* Exported macro ------------------------------------------------------------*/ -/* USER CODE BEGIN EM */ - -/* USER CODE END EM */ - -/* Exported functions prototypes ---------------------------------------------*/ -void Error_Handler(void); - -/* USER CODE BEGIN EFP */ - -/* USER CODE END EFP */ - -/* Private defines -----------------------------------------------------------*/ -/* USER CODE BEGIN Private defines */ - -/* USER CODE END Private defines */ - -#ifdef __cplusplus -} -#endif - -#endif /* __MAIN_H */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/8/a07bb5aeab28001b1d0af99b6389052e b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/8/a07bb5aeab28001b1d0af99b6389052e deleted file mode 100644 index ca56a69..0000000 --- a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/8/a07bb5aeab28001b1d0af99b6389052e +++ /dev/null @@ -1,221 +0,0 @@ -/* Project L476_ats_blink for STM32L476 mounted on Nucleo board: - * the user LED (mounted on pin PA-5) is flashed every second for 50 ms. - * The time base is provided by Systick (1000 ticks per second). - * The clock configuration is the default one (Sysclk = 80 MHz, derived from MSI and PLL). - */ - -/* Includes ------------------------------------------------------------------*/ -#include "main.h" -// #if defined(USE_FULL_ASSERT) -// #include "stm32_assert.h" -// #endif /* USE_FULL_ASSERT */ - -#include "gpio.h" - -// systick interrupt handler -volatile uint32_t msTicks = 0; -volatile uint8_t expe = 0; -volatile uint8_t blue_mode = 0; - -void SysTick_Handler() -{ - if ( BLUE_BUTTON() ){ - blue_mode = 1 ; - } - - msTicks++; /* See startup file startup_LPC17xx.s for SysTick vector */ - if (msTicks == 5 * expe){ - LED_GREEN(0); - }else if(msTicks >= 200){ - msTicks = 0; - LED_GREEN(1); - } - if(expe == 2){ - CLK_TOGGLE(); - } -} - - - - -int main(void) -{ - if (RCC->BDCR & RCC_BDCR_LSEON) { - LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR ); - LL_PWR_EnableBkUpAccess(); - - //expe = register RTC - expe = RTC->BKP0R; - if (expe == 0){ - expe = 1; - RTC->BKP0R = expe; - }else if (expe != 0 && BLUE_BUTTON()){ - expe ++; - RTC->BKP0R = expe; - } - }else{ - Init_LSE(); - expe = 1; - LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR ); - LL_PWR_EnableBkUpAccess(); - RTC->BKP0R = expe; - } - LL_PWR_DisableBkUpAccess(); - - - switch(expe){ - case 1: - /* Configure the system clock */ - SystemClock_Config_80M(); - break; - case 2: - /* Configure the system clock */ - SystemClock_Config_24M_LSE(); - break; - } - - - - -// config GPIO -GPIO_init(); - -// init systick timer (tick period at 1 ms) -LL_Init1msTick( SystemCoreClock ); -LL_SYSTICK_EnableIT(); - -//Setup Sleep mode -LL_LPM_EnableSleep(); -//LL_LPM_EnableSleepOnExit(); - -while (1) { - if (blue_mode){ - switch(expe){ - case 1: - __WFI(); - break; - case 2: - LL_RCC_MSI_EnablePLLMode(); - break; - } - - } - } -} - - - -/** - * @brief System Clock Configuration - * @retval None - * 24Mhz + RTC + LSE - */ -void SystemClock_Config_24M_LSE(void) -{ - LL_FLASH_SetLatency(LL_FLASH_LATENCY_1); - while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_1) - { - } - LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1); - LL_RCC_MSI_Enable(); - - /* Wait till MSI is ready */ - while(LL_RCC_MSI_IsReady() != 1) - { - - } - - LL_RCC_LSE_Enable(); - - /* Wait till LSE is ready */ - while(LL_RCC_LSE_IsReady() != 1) - { - - } - LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE); - LL_RCC_EnableRTC(); - - LL_RCC_MSI_EnableRangeSelection(); - LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6); - LL_RCC_MSI_SetCalibTrimming(0); -// LL_RCC_MSI_EnablePLLMode(); - - LL_PWR_EnableBkUpAccess(); -LL_RCC_ForceBackupDomainReset(); -LL_RCC_ReleaseBackupDomainReset(); -LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW); - - - LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4); - LL_RCC_PLL_EnableDomain_SYS(); - LL_RCC_PLL_Enable(); - - /* Wait till PLL is ready */ - while(LL_RCC_PLL_IsReady() != 1) - { - - } - LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL); - - /* Wait till System clock is ready */ - while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL) - { - - } - LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1); - LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1); - LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1); - LL_SetSystemCoreClock(24000000); - - /* Update the time base */ - if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK) - { -// Error_Handler(); - } -} - - -void SystemClock_Config_80M(void) -{ - LL_FLASH_SetLatency(LL_FLASH_LATENCY_4); - while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_4) - { - } - LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1); - LL_RCC_MSI_Enable(); - - /* Wait till MSI is ready */ - while(LL_RCC_MSI_IsReady() != 1) - { - - } - LL_RCC_MSI_EnableRangeSelection(); - LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6); - LL_RCC_MSI_SetCalibTrimming(0); - LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 40, LL_RCC_PLLR_DIV_2); - LL_RCC_PLL_EnableDomain_SYS(); - LL_RCC_PLL_Enable(); - - /* Wait till PLL is ready */ - while(LL_RCC_PLL_IsReady() != 1) - { - - } - LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL); - - /* Wait till System clock is ready */ - while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL) - { - - } - LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1); - LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1); - LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1); - LL_SetSystemCoreClock(80000000); - - /* Update the time base */ - if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK) - { -// Error_Handler(); - } -} diff --git a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/8a/90398905ab28001b1d0af99b6389052e b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/8a/90398905ab28001b1d0af99b6389052e deleted file mode 100644 index bddfd23..0000000 --- a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/8a/90398905ab28001b1d0af99b6389052e +++ /dev/null @@ -1,223 +0,0 @@ -/* Project L476_ats_blink for STM32L476 mounted on Nucleo board: - * the user LED (mounted on pin PA-5) is flashed every second for 50 ms. - * The time base is provided by Systick (1000 ticks per second). - * The clock configuration is the default one (Sysclk = 80 MHz, derived from MSI and PLL). - */ - -/* Includes ------------------------------------------------------------------*/ -#include "main.h" -// #if defined(USE_FULL_ASSERT) -// #include "stm32_assert.h" -// #endif /* USE_FULL_ASSERT */ - -#include "gpio.h" - -// systick interrupt handler -volatile uint32_t msTicks = 0; -volatile uint8_t expe = 0; -volatile uint8_t blue_mode = 0; - -void SysTick_Handler() -{ - if ( BLUE_BUTTON() ){ - blue_mode = 1 ; - } - - msTicks++; /* See startup file startup_LPC17xx.s for SysTick vector */ - if (msTicks == 5 * expe){ - LED_GREEN(0); - }else if(msTicks >= 200){ - msTicks = 0; - LED_GREEN(1); - } - if(expe == 2){ - CLK_TOGGLE(); - } -} - - - - -int main(void) -{ - if (RCC->BDCR & RCC_BDCR_LSEON) { - LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR ); - LL_PWR_EnableBkUpAccess(); - - //expe = register RTC - expe = RTC->BKP0R; - if (expe == 0){ - expe = 1; - RTC->BKP0R = expe; - }else if (expe != 0 && BLUE_BUTTON()){ - expe ++; - RTC->BKP0R = expe; - } - }else{ - Init_LSE(); - expe = 1; - LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR ); - LL_PWR_EnableBkUpAccess(); - RTC->BKP0R = expe; - } - LL_PWR_DisableBkUpAccess(); - - - switch(expe){ - case 1: - /* Configure the system clock */ - SystemClock_Config_80M(); - break; - case 2: - /* Configure the system clock */ - SystemClock_Config_24M_LSE(); - break; - } - - - - -// config GPIO -GPIO_init(); - -// init systick timer (tick period at 1 ms) -LL_Init1msTick( SystemCoreClock ); -LL_SYSTICK_EnableIT(); - -//Setup Sleep mode -LL_LPM_EnableSleep(); -//LL_LPM_EnableSleepOnExit(); - -while (1) { - if (blue_mode){ - switch(expe){ - case 1: - __WFI(); - break; - case 2: - LL_RCC_MSI_EnablePLLMode(); - break; - } - - } - } -} - -void Init_LSE(void){ - LL_RCC_LSE_Enable(); - - /* Wait till LSE is ready */ - while(LL_RCC_LSE_IsReady() != 1) - { - - } - LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE); - LL_RCC_EnableRTC(); - LL_PWR_EnableBkUpAccess(); - LL_RCC_ForceBackupDomainReset(); - LL_RCC_ReleaseBackupDomainReset(); - LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW); -} - -/** - * @brief System Clock Configuration - * @retval None - * 24Mhz + RTC + LSE - */ -void SystemClock_Config_24M_LSE(void) -{ - LL_FLASH_SetLatency(LL_FLASH_LATENCY_1); - while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_1) - { - } - LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1); - LL_RCC_MSI_Enable(); - - /* Wait till MSI is ready */ - while(LL_RCC_MSI_IsReady() != 1) - { - - } - - - - LL_RCC_MSI_EnableRangeSelection(); - LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6); - LL_RCC_MSI_SetCalibTrimming(0); -// LL_RCC_MSI_EnablePLLMode(); - - - - LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4); - LL_RCC_PLL_EnableDomain_SYS(); - LL_RCC_PLL_Enable(); - - /* Wait till PLL is ready */ - while(LL_RCC_PLL_IsReady() != 1) - { - - } - LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL); - - /* Wait till System clock is ready */ - while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL) - { - - } - LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1); - LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1); - LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1); - LL_SetSystemCoreClock(24000000); - - /* Update the time base */ - if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK) - { -// Error_Handler(); - } -} - - -void SystemClock_Config_80M(void) -{ - LL_FLASH_SetLatency(LL_FLASH_LATENCY_4); - while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_4) - { - } - LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1); - LL_RCC_MSI_Enable(); - - /* Wait till MSI is ready */ - while(LL_RCC_MSI_IsReady() != 1) - { - - } - LL_RCC_MSI_EnableRangeSelection(); - LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6); - LL_RCC_MSI_SetCalibTrimming(0); - LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 40, LL_RCC_PLLR_DIV_2); - LL_RCC_PLL_EnableDomain_SYS(); - LL_RCC_PLL_Enable(); - - /* Wait till PLL is ready */ - while(LL_RCC_PLL_IsReady() != 1) - { - - } - LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL); - - /* Wait till System clock is ready */ - while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL) - { - - } - LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1); - LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1); - LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1); - LL_SetSystemCoreClock(80000000); - - /* Update the time base */ - if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK) - { -// Error_Handler(); - } -} diff --git a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/8e/90249d01a628001b1d0af99b6389052e b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/8e/90249d01a628001b1d0af99b6389052e deleted file mode 100644 index 6dc16a9..0000000 --- a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/8e/90249d01a628001b1d0af99b6389052e +++ /dev/null @@ -1,203 +0,0 @@ -/* Project L476_ats_blink for STM32L476 mounted on Nucleo board: - * the user LED (mounted on pin PA-5) is flashed every second for 50 ms. - * The time base is provided by Systick (1000 ticks per second). - * The clock configuration is the default one (Sysclk = 80 MHz, derived from MSI and PLL). - */ - -/* Includes ------------------------------------------------------------------*/ -#include "main.h" -// #if defined(USE_FULL_ASSERT) -// #include "stm32_assert.h" -// #endif /* USE_FULL_ASSERT */ - -#include "gpio.h" - -// systick interrupt handler -volatile uint32_t msTicks = 0; -volatile uint8_t expe = 0; -volatile uint8_t blue_mode = 0; - -void SysTick_Handler() -{ - if ( BLUE_BUTTON() ){ - blue_mode = 1 ; - } - - msTicks++; /* See startup file startup_LPC17xx.s for SysTick vector */ - if (msTicks == 5 * expe){ - LED_GREEN(0); - }else if(msTicks >= 200){ - msTicks = 0; - LED_GREEN(1); - } - if(expe == 2){ - CLK_TOGGLE(); - } -} - - - - -int main(void) -{ - //expe = register RTC - if (expe == 0){ - expe = 1; - //save RTC - }else if (expe /= 0 && BLUE_BUTTON()){ - expe ++; - //save RTC - } - - switch(expe){ - case 1: - /* Configure the system clock */ - SystemClock_Config_80M(); - break; - case 2: - /* Configure the system clock */ - SystemClock_Config_24M_LSE(); - break; - } - - - - -// config GPIO -GPIO_init(); - -// init systick timer (tick period at 1 ms) -LL_Init1msTick( SystemCoreClock ); -LL_SYSTICK_EnableIT(); - -//Setup Sleep mode -LL_LPM_EnableSleep(); -//LL_LPM_EnableSleepOnExit(); - -while (1) { - if (blue_mode){ - switch(expe){ - case 1: - __WFI(); - break; - case 2: - LL_RCC_MSI_EnablePLLMode(); - break; - } - - } - } -} - -/** - * @brief System Clock Configuration - * @retval None - * 24Mhz + RTC + LSE - */ -void SystemClock_Config_24M_LSE(void) -{ - LL_FLASH_SetLatency(LL_FLASH_LATENCY_1); - while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_1) - { - } - LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1); - LL_RCC_MSI_Enable(); - - /* Wait till MSI is ready */ - while(LL_RCC_MSI_IsReady() != 1) - { - - } - - LL_RCC_LSE_Enable(); - - /* Wait till LSE is ready */ - while(LL_RCC_LSE_IsReady() != 1) - { - - } - LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE); - LL_RCC_EnableRTC(); - - LL_RCC_MSI_EnableRangeSelection(); - LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6); - LL_RCC_MSI_SetCalibTrimming(0); -// LL_RCC_MSI_EnablePLLMode(); - LL_PWR_EnableBkUpAccess(); - LL_RCC_ForceBackupDomainReset(); - LL_RCC_ReleaseBackupDomainReset(); - LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW); - - LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4); - LL_RCC_PLL_EnableDomain_SYS(); - LL_RCC_PLL_Enable(); - - /* Wait till PLL is ready */ - while(LL_RCC_PLL_IsReady() != 1) - { - - } - LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL); - - /* Wait till System clock is ready */ - while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL) - { - - } - LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1); - LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1); - LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1); - LL_SetSystemCoreClock(24000000); - - /* Update the time base */ - if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK) - { -// Error_Handler(); - } -} - - -void SystemClock_Config_80M(void) -{ - LL_FLASH_SetLatency(LL_FLASH_LATENCY_4); - while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_4) - { - } - LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1); - LL_RCC_MSI_Enable(); - - /* Wait till MSI is ready */ - while(LL_RCC_MSI_IsReady() != 1) - { - - } - LL_RCC_MSI_EnableRangeSelection(); - LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6); - LL_RCC_MSI_SetCalibTrimming(0); - LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 40, LL_RCC_PLLR_DIV_2); - LL_RCC_PLL_EnableDomain_SYS(); - LL_RCC_PLL_Enable(); - - /* Wait till PLL is ready */ - while(LL_RCC_PLL_IsReady() != 1) - { - - } - LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL); - - /* Wait till System clock is ready */ - while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL) - { - - } - LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1); - LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1); - LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1); - LL_SetSystemCoreClock(80000000); - - /* Update the time base */ - if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK) - { - Error_Handler(); - } -} diff --git a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/a1/e0477108b728001b1d0af99b6389052e b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/a1/e0477108b728001b1d0af99b6389052e new file mode 100644 index 0000000..90ce987 --- /dev/null +++ b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/a1/e0477108b728001b1d0af99b6389052e @@ -0,0 +1,221 @@ +/* Project L476_ats_blink for STM32L476 mounted on Nucleo board: + * the user LED (mounted on pin PA-5) is flashed every second for 50 ms. + * The time base is provided by Systick (1000 ticks per second). + * The clock configuration is the default one (Sysclk = 80 MHz, derived from MSI and PLL). + */ + +/* Includes ------------------------------------------------------------------*/ +#include "main.h" +// #if defined(USE_FULL_ASSERT) +// #include "stm32_assert.h" +// #endif /* USE_FULL_ASSERT */ + +#include "gpio.h" + +// systick interrupt handler +volatile uint32_t msTicks = 0; +volatile uint8_t expe = 0; +volatile uint8_t blue_mode = 0; + +void SysTick_Handler() +{ + if ( BLUE_BUTTON() ){ + blue_mode = 1 ; + } + + msTicks++; /* See startup file startup_LPC17xx.s for SysTick vector */ + if (msTicks == 5 * expe){ + LED_GREEN(0); + }else if(msTicks >= 200){ + msTicks = 0; + LED_GREEN(1); + } + if(expe == 2){ + CLK_TOGGLE(); + } +} + + + + +int main(void) +{ + + + // config GPIO + GPIO_init(); + +// if (RCC->BDCR & RCC_BDCR_LSEON) { + LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR ); + LL_PWR_EnableBkUpAccess(); + + //expe = register RTC + expe = RTC->BKP0R; + if (expe == 0) { + SystemClock_Config_24M_LSE(); + expe = 1; + LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR ); + LL_PWR_EnableBkUpAccess(); + RTC->BKP0R = expe; + } + + if (BLUE_BUTTON()){ + + expe ++; + + if (expe > 2) expe = 1; + RTC->BKP0R = expe; + } +// }else{ + +// } + LL_PWR_DisableBkUpAccess(); + switch(expe){ + case 1: + /* Configure the system clock */ + SystemClock_Config_80M(); + break; + case 2: + /* Configure the system clock */ + SystemClock_Config_24M_LSE(); + break; + } + + + // init systick timer (tick period at 1 ms) + LL_Init1msTick( SystemCoreClock ); + LL_SYSTICK_EnableIT(); + + //Setup Sleep mode + LL_LPM_EnableSleep(); + //LL_LPM_EnableSleepOnExit(); + + while (1) { + if (blue_mode){ + switch(expe){ + case 1: + __WFI(); + break; + case 2: + LL_RCC_MSI_EnablePLLMode(); + break; + } + + } + } +} + +/** + * @brief System Clock Configuration + * @retval None + * 24Mhz + RTC + LSE + */ +void SystemClock_Config_24M_LSE(void) +{ + LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR ); + LL_FLASH_SetLatency(LL_FLASH_LATENCY_1); + while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_1) + { + } + LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1); + LL_RCC_MSI_Enable(); + + /* Wait till MSI is ready */ + while(LL_RCC_MSI_IsReady() != 1) + { + + } + + LL_PWR_EnableBkUpAccess(); +// LL_RCC_ForceBackupDomainReset(); + LL_RCC_ReleaseBackupDomainReset(); + LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW); + + LL_RCC_MSI_EnableRangeSelection(); + LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6); + LL_RCC_MSI_SetCalibTrimming(0); + // LL_RCC_MSI_EnablePLLMode(); + + LL_RCC_LSE_Enable(); + + /* Wait till LSE is ready */ + while(LL_RCC_LSE_IsReady() != 1) + { + + } + LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE); + LL_RCC_EnableRTC(); + + LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4); + LL_RCC_PLL_EnableDomain_SYS(); + LL_RCC_PLL_Enable(); + + /* Wait till PLL is ready */ + while(LL_RCC_PLL_IsReady() != 1) + { + + } + LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL); + + /* Wait till System clock is ready */ + while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL) + { + + } + LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1); + LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1); + LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1); + LL_SetSystemCoreClock(24000000); + + /* Update the time base */ + if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK) + { + // Error_Handler(); + } +} + + +void SystemClock_Config_80M(void) +{ + LL_FLASH_SetLatency(LL_FLASH_LATENCY_4); + while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_4) + { + } + LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1); + LL_RCC_MSI_Enable(); + + /* Wait till MSI is ready */ + while(LL_RCC_MSI_IsReady() != 1) + { + + } + LL_RCC_MSI_EnableRangeSelection(); + LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6); + LL_RCC_MSI_SetCalibTrimming(0); + LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 40, LL_RCC_PLLR_DIV_2); + LL_RCC_PLL_EnableDomain_SYS(); + LL_RCC_PLL_Enable(); + + /* Wait till PLL is ready */ + while(LL_RCC_PLL_IsReady() != 1) + { + + } + LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL); + + /* Wait till System clock is ready */ + while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL) + { + + } + LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1); + LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1); + LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1); + LL_SetSystemCoreClock(80000000); + + /* Update the time base */ + if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK) + { + // Error_Handler(); + } +} diff --git a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/a4/501cb0d7a528001b1d0af99b6389052e b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/a4/501cb0d7a528001b1d0af99b6389052e deleted file mode 100644 index cc36d3b..0000000 --- a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/a4/501cb0d7a528001b1d0af99b6389052e +++ /dev/null @@ -1,204 +0,0 @@ -/* Project L476_ats_blink for STM32L476 mounted on Nucleo board: - * the user LED (mounted on pin PA-5) is flashed every second for 50 ms. - * The time base is provided by Systick (1000 ticks per second). - * The clock configuration is the default one (Sysclk = 80 MHz, derived from MSI and PLL). - */ - -/* Includes ------------------------------------------------------------------*/ -#include "main.h" -// #if defined(USE_FULL_ASSERT) -// #include "stm32_assert.h" -// #endif /* USE_FULL_ASSERT */ - -#include "gpio.h" - -// systick interrupt handler -volatile uint32_t msTicks = 0; -volatile uint8_t expe = 0; -volatile uint8_t blue_mode = 0; - -void SysTick_Handler() -{ - if ( BLUE_BUTTON() ){ - blue_mode = 1 ; - } - - msTicks++; /* See startup file startup_LPC17xx.s for SysTick vector */ - if (msTicks == 5){ - LED_GREEN(0); - }else if(msTicks >= 200){ - msTicks = 0; - LED_GREEN(1); - } - if(expe == 2){ - CLK_TOGGLE(); - } -} - - - - -int main(void) -{ - - //expe = register RTC - if (expe == 0){ - expe = 1; - //save RTC - }else if (expe /= 0 && BLUE_BUTTON()){ - expe ++; - //save RTC - } - - switch(expe){ - case 1: - /* Configure the system clock */ - SystemClock_Config_80M(); - break; - case 2: - /* Configure the system clock */ - SystemClock_Config_24M_LSE(); - break; - } - - - - -// config GPIO -GPIO_init(); - -// init systick timer (tick period at 1 ms) -LL_Init1msTick( SystemCoreClock ); -LL_SYSTICK_EnableIT(); - -//Setup Sleep mode -LL_LPM_EnableSleep(); -//LL_LPM_EnableSleepOnExit(); - -while (1) { - if (blue_mode){ - switch(expe){ - case 1: - __WFI(); - break; - case 2: - LL_RCC_MSI_EnablePLLMode(); - break; - } - - } - } -} - -/** - * @brief System Clock Configuration - * @retval None - * 24Mhz + RTC + LSE - */ -void SystemClock_Config_24M_LSE(void) -{ - LL_FLASH_SetLatency(LL_FLASH_LATENCY_1); - while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_1) - { - } - LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1); - LL_RCC_MSI_Enable(); - - /* Wait till MSI is ready */ - while(LL_RCC_MSI_IsReady() != 1) - { - - } - - LL_RCC_LSE_Enable(); - - /* Wait till LSE is ready */ - while(LL_RCC_LSE_IsReady() != 1) - { - - } - LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE); - LL_RCC_EnableRTC(); - - LL_RCC_MSI_EnableRangeSelection(); - LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6); - LL_RCC_MSI_SetCalibTrimming(0); -// LL_RCC_MSI_EnablePLLMode(); - LL_PWR_EnableBkUpAccess(); - LL_RCC_ForceBackupDomainReset(); - LL_RCC_ReleaseBackupDomainReset(); - LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW); - - LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4); - LL_RCC_PLL_EnableDomain_SYS(); - LL_RCC_PLL_Enable(); - - /* Wait till PLL is ready */ - while(LL_RCC_PLL_IsReady() != 1) - { - - } - LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL); - - /* Wait till System clock is ready */ - while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL) - { - - } - LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1); - LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1); - LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1); - LL_SetSystemCoreClock(24000000); - - /* Update the time base */ - if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK) - { -// Error_Handler(); - } -} - - -void SystemClock_Config_80M(void) -{ - LL_FLASH_SetLatency(LL_FLASH_LATENCY_4); - while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_4) - { - } - LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1); - LL_RCC_MSI_Enable(); - - /* Wait till MSI is ready */ - while(LL_RCC_MSI_IsReady() != 1) - { - - } - LL_RCC_MSI_EnableRangeSelection(); - LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6); - LL_RCC_MSI_SetCalibTrimming(0); - LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 40, LL_RCC_PLLR_DIV_2); - LL_RCC_PLL_EnableDomain_SYS(); - LL_RCC_PLL_Enable(); - - /* Wait till PLL is ready */ - while(LL_RCC_PLL_IsReady() != 1) - { - - } - LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL); - - /* Wait till System clock is ready */ - while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL) - { - - } - LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1); - LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1); - LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1); - LL_SetSystemCoreClock(80000000); - - /* Update the time base */ - if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK) - { - Error_Handler(); - } -} diff --git a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/af/40857dccb228001b1d0af99b6389052e b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/af/40857dccb228001b1d0af99b6389052e new file mode 100644 index 0000000..dc9f671 --- /dev/null +++ b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/af/40857dccb228001b1d0af99b6389052e @@ -0,0 +1,218 @@ +/* Project L476_ats_blink for STM32L476 mounted on Nucleo board: + * the user LED (mounted on pin PA-5) is flashed every second for 50 ms. + * The time base is provided by Systick (1000 ticks per second). + * The clock configuration is the default one (Sysclk = 80 MHz, derived from MSI and PLL). + */ + +/* Includes ------------------------------------------------------------------*/ +#include "main.h" +// #if defined(USE_FULL_ASSERT) +// #include "stm32_assert.h" +// #endif /* USE_FULL_ASSERT */ + +#include "gpio.h" + +// systick interrupt handler +volatile uint32_t msTicks = 0; +volatile uint8_t expe = 0; +volatile uint8_t blue_mode = 0; + +void SysTick_Handler() +{ + if ( BLUE_BUTTON() ){ + blue_mode = 1 ; + } + + msTicks++; /* See startup file startup_LPC17xx.s for SysTick vector */ + if (msTicks == 5 * expe){ + LED_GREEN(0); + }else if(msTicks >= 200){ + msTicks = 0; + LED_GREEN(1); + } + if(expe == 2){ + CLK_TOGGLE(); + } +} + + + + +int main(void) +{ + + + // config GPIO + GPIO_init(); + + if (RCC->BDCR & RCC_BDCR_LSEON) { + LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR ); + LL_PWR_EnableBkUpAccess(); + + //expe = register RTC + expe = RTC->BKP0R; + + if (BLUE_BUTTON()){ + + expe ++; + + if (expe > 2) expe = 1; + RTC->BKP0R = expe; + } + }else{ + SystemClock_Config_24M_LSE(); + expe = 1; + LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR ); + LL_PWR_EnableBkUpAccess(); + RTC->BKP0R = expe; + } + LL_PWR_DisableBkUpAccess(); + switch(expe){ + case 1: + /* Configure the system clock */ + SystemClock_Config_80M(); + break; + case 2: + /* Configure the system clock */ + SystemClock_Config_24M_LSE(); + break; + } + + + // init systick timer (tick period at 1 ms) + LL_Init1msTick( SystemCoreClock ); + LL_SYSTICK_EnableIT(); + + //Setup Sleep mode + LL_LPM_EnableSleep(); + //LL_LPM_EnableSleepOnExit(); + + while (1) { + if (blue_mode){ + switch(expe){ + case 1: + __WFI(); + break; + case 2: + LL_RCC_MSI_EnablePLLMode(); + break; + } + + } + } +} + +/** + * @brief System Clock Configuration + * @retval None + * 24Mhz + RTC + LSE + */ +void SystemClock_Config_24M_LSE(void) +{ + LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR ); + LL_FLASH_SetLatency(LL_FLASH_LATENCY_1); + while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_1) + { + } + LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1); + LL_RCC_MSI_Enable(); + + /* Wait till MSI is ready */ + while(LL_RCC_MSI_IsReady() != 1) + { + + } + + LL_PWR_EnableBkUpAccess(); + LL_RCC_ForceBackupDomainReset(); + LL_RCC_ReleaseBackupDomainReset(); + LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW); + + LL_RCC_MSI_EnableRangeSelection(); + LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6); + LL_RCC_MSI_SetCalibTrimming(0); + // LL_RCC_MSI_EnablePLLMode(); + + LL_RCC_LSE_Enable(); + + /* Wait till LSE is ready */ + while(LL_RCC_LSE_IsReady() != 1) + { + + } + LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE); + LL_RCC_EnableRTC(); + + LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4); + LL_RCC_PLL_EnableDomain_SYS(); + LL_RCC_PLL_Enable(); + + /* Wait till PLL is ready */ + while(LL_RCC_PLL_IsReady() != 1) + { + + } + LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL); + + /* Wait till System clock is ready */ + while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL) + { + + } + LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1); + LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1); + LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1); + LL_SetSystemCoreClock(24000000); + + /* Update the time base */ + if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK) + { + // Error_Handler(); + } +} + + +void SystemClock_Config_80M(void) +{ + LL_FLASH_SetLatency(LL_FLASH_LATENCY_4); + while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_4) + { + } + LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1); + LL_RCC_MSI_Enable(); + + /* Wait till MSI is ready */ + while(LL_RCC_MSI_IsReady() != 1) + { + + } + LL_RCC_MSI_EnableRangeSelection(); + LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6); + LL_RCC_MSI_SetCalibTrimming(0); + LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 40, LL_RCC_PLLR_DIV_2); + LL_RCC_PLL_EnableDomain_SYS(); + LL_RCC_PLL_Enable(); + + /* Wait till PLL is ready */ + while(LL_RCC_PLL_IsReady() != 1) + { + + } + LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL); + + /* Wait till System clock is ready */ + while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL) + { + + } + LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1); + LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1); + LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1); + LL_SetSystemCoreClock(80000000); + + /* Update the time base */ + if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK) + { + // Error_Handler(); + } +} diff --git a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/b/d024d9ddb128001b1d0af99b6389052e b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/b/d024d9ddb128001b1d0af99b6389052e new file mode 100644 index 0000000..b72ad9d --- /dev/null +++ b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/b/d024d9ddb128001b1d0af99b6389052e @@ -0,0 +1,215 @@ +/* Project L476_ats_blink for STM32L476 mounted on Nucleo board: + * the user LED (mounted on pin PA-5) is flashed every second for 50 ms. + * The time base is provided by Systick (1000 ticks per second). + * The clock configuration is the default one (Sysclk = 80 MHz, derived from MSI and PLL). + */ + +/* Includes ------------------------------------------------------------------*/ +#include "main.h" +// #if defined(USE_FULL_ASSERT) +// #include "stm32_assert.h" +// #endif /* USE_FULL_ASSERT */ + +#include "gpio.h" + +// systick interrupt handler +volatile uint32_t msTicks = 0; +volatile uint8_t expe = 0; +volatile uint8_t blue_mode = 0; + +void SysTick_Handler() +{ + if ( BLUE_BUTTON() ){ + blue_mode = 1 ; + } + + msTicks++; /* See startup file startup_LPC17xx.s for SysTick vector */ + if (msTicks == 5 * expe){ + LED_GREEN(0); + }else if(msTicks >= 200){ + msTicks = 0; + LED_GREEN(1); + } + if(expe == 2){ + CLK_TOGGLE(); + } +} + + + + +int main(void) +{ + + + // config GPIO + GPIO_init(); + + if (RCC->BDCR & RCC_BDCR_LSEON) { + LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR ); + LL_PWR_EnableBkUpAccess(); + + //expe = register RTC + expe = RTC->BKP0R; + + if (BLUE_BUTTON()){ + expe ++; + RTC->BKP0R = expe; + } + }else{ + SystemClock_Config_24M_LSE(); + expe = 1; + LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR ); + LL_PWR_EnableBkUpAccess(); + RTC->BKP0R = expe; + } + LL_PWR_DisableBkUpAccess(); + switch(expe){ + case 1: + /* Configure the system clock */ + SystemClock_Config_80M(); + break; + case 2: + /* Configure the system clock */ + SystemClock_Config_24M_LSE(); + break; + } + + + // init systick timer (tick period at 1 ms) + LL_Init1msTick( SystemCoreClock ); + LL_SYSTICK_EnableIT(); + + //Setup Sleep mode + LL_LPM_EnableSleep(); + //LL_LPM_EnableSleepOnExit(); + + while (1) { + if (blue_mode){ + switch(expe){ + case 1: + __WFI(); + break; + case 2: + LL_RCC_MSI_EnablePLLMode(); + break; + } + + } + } +} + +/** + * @brief System Clock Configuration + * @retval None + * 24Mhz + RTC + LSE + */ +void SystemClock_Config_24M_LSE(void) +{ + LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR ); + LL_FLASH_SetLatency(LL_FLASH_LATENCY_1); + while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_1) + { + } + LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1); + LL_RCC_MSI_Enable(); + + /* Wait till MSI is ready */ + while(LL_RCC_MSI_IsReady() != 1) + { + + } + + LL_PWR_EnableBkUpAccess(); + LL_RCC_ForceBackupDomainReset(); + LL_RCC_ReleaseBackupDomainReset(); + LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW); + + LL_RCC_MSI_EnableRangeSelection(); + LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6); + LL_RCC_MSI_SetCalibTrimming(0); + // LL_RCC_MSI_EnablePLLMode(); + + LL_RCC_LSE_Enable(); + + /* Wait till LSE is ready */ + while(LL_RCC_LSE_IsReady() != 1) + { + + } + LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE); + LL_RCC_EnableRTC(); + + LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4); + LL_RCC_PLL_EnableDomain_SYS(); + LL_RCC_PLL_Enable(); + + /* Wait till PLL is ready */ + while(LL_RCC_PLL_IsReady() != 1) + { + + } + LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL); + + /* Wait till System clock is ready */ + while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL) + { + + } + LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1); + LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1); + LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1); + LL_SetSystemCoreClock(24000000); + + /* Update the time base */ + if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK) + { + // Error_Handler(); + } +} + + +void SystemClock_Config_80M(void) +{ + LL_FLASH_SetLatency(LL_FLASH_LATENCY_4); + while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_4) + { + } + LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1); + LL_RCC_MSI_Enable(); + + /* Wait till MSI is ready */ + while(LL_RCC_MSI_IsReady() != 1) + { + + } + LL_RCC_MSI_EnableRangeSelection(); + LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6); + LL_RCC_MSI_SetCalibTrimming(0); + LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 40, LL_RCC_PLLR_DIV_2); + LL_RCC_PLL_EnableDomain_SYS(); + LL_RCC_PLL_Enable(); + + /* Wait till PLL is ready */ + while(LL_RCC_PLL_IsReady() != 1) + { + + } + LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL); + + /* Wait till System clock is ready */ + while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL) + { + + } + LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1); + LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1); + LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1); + LL_SetSystemCoreClock(80000000); + + /* Update the time base */ + if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK) + { + // Error_Handler(); + } +} diff --git a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/b0/10ac80b5fd27001b16eaee4b2dec2d39 b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/b0/10ac80b5fd27001b16eaee4b2dec2d39 deleted file mode 100644 index 834b3d8..0000000 --- a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/b0/10ac80b5fd27001b16eaee4b2dec2d39 +++ /dev/null @@ -1,204 +0,0 @@ -/* Project L476_ats_blink for STM32L476 mounted on Nucleo board: - * the user LED (mounted on pin PA-5) is flashed every second for 50 ms. - * The time base is provided by Systick (1000 ticks per second). - * The clock configuration is the default one (Sysclk = 80 MHz, derived from MSI and PLL). - */ - -/* Includes ------------------------------------------------------------------*/ -#include "main.h" -// #if defined(USE_FULL_ASSERT) -// #include "stm32_assert.h" -// #endif /* USE_FULL_ASSERT */ - -#include "gpio.h" - -// systick interrupt handler -volatile uint32_t msTicks = 0; -volatile uint8_t expe = 0; -volatile uint8_t blue_mode = 0; - -void SysTick_Handler() -{ - if ( BLUE_BUTTON() ){ - blue_mode = 1 ; - } - - msTicks++; /* See startup file startup_LPC17xx.s for SysTick vector */ - if (msTicks == 5){ - LED_GREEN(0); - }else if(msTicks >= 200){ - msTicks = 0; - LED_GREEN(1); - } - if(expe == 2){ - CLK_TOGGLE(); - } -} - - - - -int main(void) -{ - //expe = registre RTC - //if expe == 0 => expe = 1 storer dans RTC - //if expe /= 0 and BLUE_BUTTON() expe ++ and save RTC - switch(expe){ - case 1: - /* Configure the system clock */ - SystemClock_Config_80M(); - break; - case 2: - /* Configure the system clock */ - SystemClock_Config_24M_LSE(); - break; - } - - - - -// config GPIO -GPIO_init(); - -// init systick timer (tick period at 1 ms) -LL_Init1msTick( SystemCoreClock ); -LL_SYSTICK_EnableIT(); - -//Setup Sleep mode -LL_LPM_EnableSleep(); -//LL_LPM_EnableSleepOnExit(); - -while (1) { - if (blue_mode){ - switch(expe){ - case 1: - __WFI(); - break; - case 2: - LL_RCC_MSI_EnablePLLMode(); - break; - } - - } - -// else { -// LED_GREEN(0); -// LL_mDelay(950); -// LED_GREEN(1); -// LL_mDelay(50); -// } - } -} - -/** - * @brief System Clock Configuration - * @retval None - * 24Mhz + RTC + LSE - */ -void SystemClock_Config_24M_LSE(void) -{ - LL_FLASH_SetLatency(LL_FLASH_LATENCY_1); - while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_1) - { - } - LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1); - LL_RCC_MSI_Enable(); - - /* Wait till MSI is ready */ - while(LL_RCC_MSI_IsReady() != 1) - { - - } - - LL_RCC_LSE_Enable(); - - /* Wait till LSE is ready */ - while(LL_RCC_LSE_IsReady() != 1) - { - - } - LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE); - LL_RCC_EnableRTC(); - - LL_RCC_MSI_EnableRangeSelection(); - LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6); - LL_RCC_MSI_SetCalibTrimming(0); -// LL_RCC_MSI_EnablePLLMode(); - LL_PWR_EnableBkUpAccess(); - LL_RCC_ForceBackupDomainReset(); - LL_RCC_ReleaseBackupDomainReset(); - LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW); - - LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4); - LL_RCC_PLL_EnableDomain_SYS(); - LL_RCC_PLL_Enable(); - - /* Wait till PLL is ready */ - while(LL_RCC_PLL_IsReady() != 1) - { - - } - LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL); - - /* Wait till System clock is ready */ - while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL) - { - - } - LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1); - LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1); - LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1); - LL_SetSystemCoreClock(24000000); - - /* Update the time base */ - if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK) - { -// Error_Handler(); - } -} - - -void SystemClock_Config_80M(void) -{ - LL_FLASH_SetLatency(LL_FLASH_LATENCY_4); - while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_4) - { - } - LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1); - LL_RCC_MSI_Enable(); - - /* Wait till MSI is ready */ - while(LL_RCC_MSI_IsReady() != 1) - { - - } - LL_RCC_MSI_EnableRangeSelection(); - LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6); - LL_RCC_MSI_SetCalibTrimming(0); - LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 40, LL_RCC_PLLR_DIV_2); - LL_RCC_PLL_EnableDomain_SYS(); - LL_RCC_PLL_Enable(); - - /* Wait till PLL is ready */ - while(LL_RCC_PLL_IsReady() != 1) - { - - } - LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL); - - /* Wait till System clock is ready */ - while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL) - { - - } - LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1); - LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1); - LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1); - LL_SetSystemCoreClock(80000000); - - /* Update the time base */ - if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK) - { - Error_Handler(); - } -} diff --git a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/b2/40e9aef5ef27001b16eaee4b2dec2d39 b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/b2/40e9aef5ef27001b16eaee4b2dec2d39 deleted file mode 100644 index 7b3040b..0000000 --- a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/b2/40e9aef5ef27001b16eaee4b2dec2d39 +++ /dev/null @@ -1,81 +0,0 @@ -/* USER CODE BEGIN Header */ -/** - ****************************************************************************** - * @file : main.h - * @brief : Header for main.c file. - * This file contains the common defines of the application. - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2020 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ -/* USER CODE END Header */ - -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __MAIN_H -#define __MAIN_H - -#ifdef __cplusplus -extern "C" { -#endif - -/* Includes ------------------------------------------------------------------*/ -#include "stm32l4xx_hal.h" -#include "stm32l4xx_ll_crs.h" -#include "stm32l4xx_ll_rcc.h" -#include "stm32l4xx_ll_bus.h" -#include "stm32l4xx_ll_system.h" -#include "stm32l4xx_ll_exti.h" -#include "stm32l4xx_ll_cortex.h" -#include "stm32l4xx_ll_utils.h" -#include "stm32l4xx_ll_pwr.h" -#include "stm32l4xx_ll_dma.h" -#include "stm32l4xx_ll_gpio.h" - -/* Private includes ----------------------------------------------------------*/ -/* USER CODE BEGIN Includes */ -#include "../Src/gpio.h" -/* USER CODE END Includes */ - -/* Exported types ------------------------------------------------------------*/ -/* USER CODE BEGIN ET */ - -/* USER CODE END ET */ - -/* Exported constants --------------------------------------------------------*/ -/* USER CODE BEGIN EC */ - -/* USER CODE END EC */ - -/* Exported macro ------------------------------------------------------------*/ -/* USER CODE BEGIN EM */ - -/* USER CODE END EM */ - -/* Exported functions prototypes ---------------------------------------------*/ -void Error_Handler(void); - -/* USER CODE BEGIN EFP */ - -/* USER CODE END EFP */ - -/* Private defines -----------------------------------------------------------*/ -/* USER CODE BEGIN Private defines */ - -/* USER CODE END Private defines */ - -#ifdef __cplusplus -} -#endif - -#endif /* __MAIN_H */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/c0/a0303f18b828001b1d0af99b6389052e b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/c0/a0303f18b828001b1d0af99b6389052e new file mode 100644 index 0000000..17e32e2 --- /dev/null +++ b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/c0/a0303f18b828001b1d0af99b6389052e @@ -0,0 +1,292 @@ +/* Project L476_ats_blink for STM32L476 mounted on Nucleo board: + * the user LED (mounted on pin PA-5) is flashed every second for 50 ms. + * The time base is provided by Systick (1000 ticks per second). + * The clock configuration is the default one (Sysclk = 80 MHz, derived from MSI and PLL). + */ + +/* Includes ------------------------------------------------------------------*/ +#include "main.h" +// #if defined(USE_FULL_ASSERT) +// #include "stm32_assert.h" +// #endif /* USE_FULL_ASSERT */ + +#include "gpio.h" + +// systick interrupt handler +volatile uint32_t msTicks = 0; +volatile uint8_t expe = 0; +volatile uint8_t blue_mode = 0; + +void SysTick_Handler() +{ + if ( BLUE_BUTTON() ){ + blue_mode = 1 ; + } + + msTicks++; /* See startup file startup_LPC17xx.s for SysTick vector */ + if (msTicks == 5 * expe){ + LED_GREEN(0); + }else if(msTicks >= 200){ + msTicks = 0; + LED_GREEN(1); + } + if(expe == 2){ + CLK_TOGGLE(); + } +} + + + + +int main(void) +{ + + + // config GPIO + GPIO_init(); + +// if (RCC->BDCR & RCC_BDCR_LSEON) { + LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR ); + LL_PWR_EnableBkUpAccess(); + + //expe = register RTC + expe = RTC->BKP0R; + if (expe == 0) { + SystemClock_Config_24M_LSE(); + expe = 1; + LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR ); + LL_PWR_EnableBkUpAccess(); + RTC->BKP0R = expe; + } + + if (BLUE_BUTTON()){ + + expe ++; + + if (expe > 4) expe = 1; + RTC->BKP0R = expe; + } +// }else{ + +// } + LL_PWR_DisableBkUpAccess(); + switch(expe){ + case 1: + /* Configure the system clock */ + SystemClock_Config_80M(); + break; + case 2: + /* Configure the system clock */ + SystemClock_Config_24M_LSE(); + break; + default: //case 3 to 8 + SystemClock_Config_24M_LSE_FL3_VS2(); + break; + } + + + // init systick timer (tick period at 1 ms) + LL_Init1msTick( SystemCoreClock ); + LL_SYSTICK_EnableIT(); + + //Setup Sleep mode + LL_LPM_EnableSleep(); + //LL_LPM_EnableSleepOnExit(); + + while (1) { + if (blue_mode){ + switch(expe){ + case 1: + case 3: + __WFI(); + break; + + case 2: + case 4: + LL_RCC_MSI_EnablePLLMode(); + break; + + + } + + } + } +} + +void SystemClock_Config_24M_LSE_FL3_VS2(void){ + LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR ); + LL_FLASH_SetLatency(LL_FLASH_LATENCY_3); + while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_3) + { + } + LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE2); + LL_RCC_MSI_Enable(); + + /* Wait till MSI is ready */ + while(LL_RCC_MSI_IsReady() != 1) + { + + } + + LL_PWR_EnableBkUpAccess(); +// LL_RCC_ForceBackupDomainReset(); + LL_RCC_ReleaseBackupDomainReset(); + LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW); + + LL_RCC_MSI_EnableRangeSelection(); + LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6); + LL_RCC_MSI_SetCalibTrimming(0); + // LL_RCC_MSI_EnablePLLMode(); + + LL_RCC_LSE_Enable(); + + /* Wait till LSE is ready */ + while(LL_RCC_LSE_IsReady() != 1) + { + + } + LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE); + LL_RCC_EnableRTC(); + + LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4); + LL_RCC_PLL_EnableDomain_SYS(); + LL_RCC_PLL_Enable(); + + /* Wait till PLL is ready */ + while(LL_RCC_PLL_IsReady() != 1) + { + + } + LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL); + + /* Wait till System clock is ready */ + while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL) + { + + } + LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1); + LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1); + LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1); + LL_SetSystemCoreClock(24000000); + + /* Update the time base */ + if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK) + { + // Error_Handler(); + } +} + +/** + * @brief System Clock Configuration + * @retval None + * 24Mhz + RTC + LSE + */ +void SystemClock_Config_24M_LSE(void) +{ + LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR ); + LL_FLASH_SetLatency(LL_FLASH_LATENCY_1); + while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_1) + { + } + LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1); + LL_RCC_MSI_Enable(); + + /* Wait till MSI is ready */ + while(LL_RCC_MSI_IsReady() != 1) + { + + } + + LL_PWR_EnableBkUpAccess(); +// LL_RCC_ForceBackupDomainReset(); + LL_RCC_ReleaseBackupDomainReset(); + LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW); + + LL_RCC_MSI_EnableRangeSelection(); + LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6); + LL_RCC_MSI_SetCalibTrimming(0); + // LL_RCC_MSI_EnablePLLMode(); + + LL_RCC_LSE_Enable(); + + /* Wait till LSE is ready */ + while(LL_RCC_LSE_IsReady() != 1) + { + + } + LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE); + LL_RCC_EnableRTC(); + + LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4); + LL_RCC_PLL_EnableDomain_SYS(); + LL_RCC_PLL_Enable(); + + /* Wait till PLL is ready */ + while(LL_RCC_PLL_IsReady() != 1) + { + + } + LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL); + + /* Wait till System clock is ready */ + while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL) + { + + } + LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1); + LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1); + LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1); + LL_SetSystemCoreClock(24000000); + + /* Update the time base */ + if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK) + { + // Error_Handler(); + } +} + + +void SystemClock_Config_80M(void) +{ + LL_FLASH_SetLatency(LL_FLASH_LATENCY_4); + while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_4) + { + } + LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1); + LL_RCC_MSI_Enable(); + + /* Wait till MSI is ready */ + while(LL_RCC_MSI_IsReady() != 1) + { + + } + LL_RCC_MSI_EnableRangeSelection(); + LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6); + LL_RCC_MSI_SetCalibTrimming(0); + LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 40, LL_RCC_PLLR_DIV_2); + LL_RCC_PLL_EnableDomain_SYS(); + LL_RCC_PLL_Enable(); + + /* Wait till PLL is ready */ + while(LL_RCC_PLL_IsReady() != 1) + { + + } + LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL); + + /* Wait till System clock is ready */ + while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL) + { + + } + LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1); + LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1); + LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1); + LL_SetSystemCoreClock(80000000); + + /* Update the time base */ + if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK) + { + // Error_Handler(); + } +} diff --git a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/84/101c0ea0ab28001b1d0af99b6389052e b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/c2/90b22559b028001b1d0af99b6389052e similarity index 93% rename from PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/84/101c0ea0ab28001b1d0af99b6389052e rename to PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/c2/90b22559b028001b1d0af99b6389052e index 04669ae..b5fc670 100644 --- a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/84/101c0ea0ab28001b1d0af99b6389052e +++ b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/c2/90b22559b028001b1d0af99b6389052e @@ -46,13 +46,11 @@ int main(void) //expe = register RTC expe = RTC->BKP0R; - if (expe == 0){ - expe = 1; - RTC->BKP0R = expe; - }else if (expe != 0 && BLUE_BUTTON()){ - expe ++; - RTC->BKP0R = expe; - } + + if (BLUE_BUTTON()){ + expe ++; + RTC->BKP0R = expe; + }else{ SystemClock_Config_24M_LSE(); expe = 1; @@ -61,8 +59,6 @@ int main(void) RTC->BKP0R = expe; } LL_PWR_DisableBkUpAccess(); - - switch(expe){ case 1: /* Configure the system clock */ @@ -110,6 +106,7 @@ while (1) { */ void SystemClock_Config_24M_LSE(void) { + LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR ); LL_FLASH_SetLatency(LL_FLASH_LATENCY_1); while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_1) { @@ -122,23 +119,27 @@ void SystemClock_Config_24M_LSE(void) { } - LL_RCC_MSI_EnablePLLMode(); - LL_RCC_MSI_EnableRangeSelection(); - LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6); - LL_RCC_MSI_SetCalibTrimming(0); + LL_PWR_EnableBkUpAccess(); LL_RCC_ForceBackupDomainReset(); LL_RCC_ReleaseBackupDomainReset(); LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW); + + LL_RCC_MSI_EnableRangeSelection(); + LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6); + LL_RCC_MSI_SetCalibTrimming(0); +// LL_RCC_MSI_EnablePLLMode(); + LL_RCC_LSE_Enable(); - /* Wait till LSE is ready */ - while(LL_RCC_LSE_IsReady() != 1) - { + /* Wait till LSE is ready */ + while(LL_RCC_LSE_IsReady() != 1) + { + + } + LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE); + LL_RCC_EnableRTC(); - } - LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE); - LL_RCC_EnableRTC(); LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4); LL_RCC_PLL_EnableDomain_SYS(); LL_RCC_PLL_Enable(); diff --git a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/49/d01119a2ac28001b1d0af99b6389052e b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/cb/b0b0c2d1ae28001b1d0af99b6389052e similarity index 94% rename from PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/49/d01119a2ac28001b1d0af99b6389052e rename to PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/cb/b0b0c2d1ae28001b1d0af99b6389052e index 016c459..920491a 100644 --- a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/49/d01119a2ac28001b1d0af99b6389052e +++ b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/cb/b0b0c2d1ae28001b1d0af99b6389052e @@ -14,7 +14,7 @@ // systick interrupt handler volatile uint32_t msTicks = 0; -volatile uint8_t expe = 1; +volatile uint8_t expe = 2; volatile uint8_t blue_mode = 0; void SysTick_Handler() @@ -108,6 +108,7 @@ while (1) { */ void SystemClock_Config_24M_LSE(void) { + LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR ); LL_FLASH_SetLatency(LL_FLASH_LATENCY_1); while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_1) { @@ -121,24 +122,25 @@ void SystemClock_Config_24M_LSE(void) } - LL_RCC_LSE_Enable(); - - /* Wait till LSE is ready */ - while(LL_RCC_LSE_IsReady() != 1) - { - - } - LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE); - LL_RCC_EnableRTC(); + LL_PWR_EnableBkUpAccess(); + LL_RCC_ForceBackupDomainReset(); + LL_RCC_ReleaseBackupDomainReset(); + LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW); LL_RCC_MSI_EnableRangeSelection(); LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6); LL_RCC_MSI_SetCalibTrimming(0); // LL_RCC_MSI_EnablePLLMode(); - LL_PWR_EnableBkUpAccess(); - LL_RCC_ForceBackupDomainReset(); - LL_RCC_ReleaseBackupDomainReset(); - LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW); + + LL_RCC_LSE_Enable(); + + /* Wait till LSE is ready */ + while(LL_RCC_LSE_IsReady() != 1) + { + + } + LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE); + LL_RCC_EnableRTC(); LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4); LL_RCC_PLL_EnableDomain_SYS(); diff --git a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/d7/207b7812a628001b1d0af99b6389052e b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/d7/207b7812a628001b1d0af99b6389052e deleted file mode 100644 index 17a3902..0000000 --- a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/d7/207b7812a628001b1d0af99b6389052e +++ /dev/null @@ -1,203 +0,0 @@ -/* Project L476_ats_blink for STM32L476 mounted on Nucleo board: - * the user LED (mounted on pin PA-5) is flashed every second for 50 ms. - * The time base is provided by Systick (1000 ticks per second). - * The clock configuration is the default one (Sysclk = 80 MHz, derived from MSI and PLL). - */ - -/* Includes ------------------------------------------------------------------*/ -#include "main.h" -// #if defined(USE_FULL_ASSERT) -// #include "stm32_assert.h" -// #endif /* USE_FULL_ASSERT */ - -#include "gpio.h" - -// systick interrupt handler -volatile uint32_t msTicks = 0; -volatile uint8_t expe = 0; -volatile uint8_t blue_mode = 0; - -void SysTick_Handler() -{ - if ( BLUE_BUTTON() ){ - blue_mode = 1 ; - } - - msTicks++; /* See startup file startup_LPC17xx.s for SysTick vector */ - if (msTicks == 5 * expe){ - LED_GREEN(0); - }else if(msTicks >= 200){ - msTicks = 0; - LED_GREEN(1); - } - if(expe == 2){ - CLK_TOGGLE(); - } -} - - - - -int main(void) -{ - //expe = register RTC - if (expe == 0){ - expe = 1; - //save RTC - }else if (expe /= 0 && BLUE_BUTTON()){ - expe ++; - //save RTC - } - - switch(expe){ - case 1: - /* Configure the system clock */ - SystemClock_Config_80M(); - break; - case 2: - /* Configure the system clock */ - SystemClock_Config_24M_LSE(); - break; - } - - - - -// config GPIO -GPIO_init(); - -// init systick timer (tick period at 1 ms) -LL_Init1msTick( SystemCoreClock ); -LL_SYSTICK_EnableIT(); - -//Setup Sleep mode -LL_LPM_EnableSleep(); -//LL_LPM_EnableSleepOnExit(); - -while (1) { - if (blue_mode){ - switch(expe){ - case 1: - __WFI(); - break; - case 2: - LL_RCC_MSI_EnablePLLMode(); - break; - } - - } - } -} - -/** - * @brief System Clock Configuration - * @retval None - * 24Mhz + RTC + LSE - */ -void SystemClock_Config_24M_LSE(void) -{ - LL_FLASH_SetLatency(LL_FLASH_LATENCY_1); - while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_1) - { - } - LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1); - LL_RCC_MSI_Enable(); - - /* Wait till MSI is ready */ - while(LL_RCC_MSI_IsReady() != 1) - { - - } - - LL_RCC_LSE_Enable(); - - /* Wait till LSE is ready */ - while(LL_RCC_LSE_IsReady() != 1) - { - - } - LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE); - LL_RCC_EnableRTC(); - - LL_RCC_MSI_EnableRangeSelection(); - LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6); - LL_RCC_MSI_SetCalibTrimming(0); -// LL_RCC_MSI_EnablePLLMode(); - LL_PWR_EnableBkUpAccess(); - LL_RCC_ForceBackupDomainReset(); - LL_RCC_ReleaseBackupDomainReset(); - LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW); - - LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4); - LL_RCC_PLL_EnableDomain_SYS(); - LL_RCC_PLL_Enable(); - - /* Wait till PLL is ready */ - while(LL_RCC_PLL_IsReady() != 1) - { - - } - LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL); - - /* Wait till System clock is ready */ - while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL) - { - - } - LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1); - LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1); - LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1); - LL_SetSystemCoreClock(24000000); - - /* Update the time base */ - if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK) - { -// Error_Handler(); - } -} - - -void SystemClock_Config_80M(void) -{ - LL_FLASH_SetLatency(LL_FLASH_LATENCY_4); - while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_4) - { - } - LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1); - LL_RCC_MSI_Enable(); - - /* Wait till MSI is ready */ - while(LL_RCC_MSI_IsReady() != 1) - { - - } - LL_RCC_MSI_EnableRangeSelection(); - LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6); - LL_RCC_MSI_SetCalibTrimming(0); - LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 40, LL_RCC_PLLR_DIV_2); - LL_RCC_PLL_EnableDomain_SYS(); - LL_RCC_PLL_Enable(); - - /* Wait till PLL is ready */ - while(LL_RCC_PLL_IsReady() != 1) - { - - } - LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL); - - /* Wait till System clock is ready */ - while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL) - { - - } - LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1); - LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1); - LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1); - LL_SetSystemCoreClock(80000000); - - /* Update the time base */ - if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK) - { -// Error_Handler(); - } -} diff --git a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/e/601375d0f027001b16eaee4b2dec2d39 b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/e/601375d0f027001b16eaee4b2dec2d39 deleted file mode 100644 index 6488620..0000000 --- a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/e/601375d0f027001b16eaee4b2dec2d39 +++ /dev/null @@ -1,143 +0,0 @@ -/* Project L476_ats_blink for STM32L476 mounted on Nucleo board: - * the user LED (mounted on pin PA-5) is flashed every second for 50 ms. - * The time base is provided by Systick (1000 ticks per second). - * The clock configuration is the default one (Sysclk = 80 MHz, derived from MSI and PLL). - */ - -/* Includes ------------------------------------------------------------------*/ -#include "main.h" -// #if defined(USE_FULL_ASSERT) -// #include "stm32_assert.h" -// #endif /* USE_FULL_ASSERT */ - -#include "gpio.h" - -// systick interrupt handler -volatile uint32_t msTicks = 0; -volatile uint8_t expe = 2; -volatile uint8_t blue_mode = 0; - -void SysTick_Handler() -{ - if ( BLUE_BUTTON() ){ - blue_mode = 1 ; - } - - msTicks++; /* See startup file startup_LPC17xx.s for SysTick vector */ - if (msTicks == 5){ - LED_GREEN(0); - }else if(msTicks >= 200){ - msTicks = 0; - LED_GREEN(1); - } - if(expe == 2){ - CLK_TOGGLE(); - } -} - - -void SystemClock_Config(void); - -int main(void) -{ -/* Configure the system clock */ -SystemClock_Config(); - -// config GPIO -GPIO_init(); - -// init systick timer (tick period at 1 ms) -LL_Init1msTick( SystemCoreClock ); -LL_SYSTICK_EnableIT(); - -//Setup Sleep mode -LL_LPM_EnableSleep(); -//LL_LPM_EnableSleepOnExit(); - -while (1) { - if (blue_mode){ - switch(expe){ - case 1: - __WFI(); - break; - case 2: - LL_RCC_MSI_EnablePLLMode(); - break; - } - } - -// else { -// LED_GREEN(0); -// LL_mDelay(950); -// LED_GREEN(1); -// LL_mDelay(50); -// } - } -} - -/** - * @brief System Clock Configuration - * @retval None - * 24Mhz + RTC + LSE - */ -void SystemClock_Config(void) -{ - LL_FLASH_SetLatency(LL_FLASH_LATENCY_1); - while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_1) - { - } - LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1); - LL_RCC_MSI_Enable(); - - /* Wait till MSI is ready */ - while(LL_RCC_MSI_IsReady() != 1) - { - - } - - LL_RCC_LSE_Enable(); - - /* Wait till LSE is ready */ - while(LL_RCC_LSE_IsReady() != 1) - { - - } - LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE); - LL_RCC_EnableRTC(); - - LL_RCC_MSI_EnableRangeSelection(); - LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6); - LL_RCC_MSI_SetCalibTrimming(0); -// LL_RCC_MSI_EnablePLLMode(); - LL_PWR_EnableBkUpAccess(); - LL_RCC_ForceBackupDomainReset(); - LL_RCC_ReleaseBackupDomainReset(); - LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW); - - LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4); - LL_RCC_PLL_EnableDomain_SYS(); - LL_RCC_PLL_Enable(); - - /* Wait till PLL is ready */ - while(LL_RCC_PLL_IsReady() != 1) - { - - } - LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL); - - /* Wait till System clock is ready */ - while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL) - { - - } - LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1); - LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1); - LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1); - LL_SetSystemCoreClock(24000000); - - /* Update the time base */ - if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK) - { -// Error_Handler(); - } -} diff --git a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/e0/60ce4bc9e327001b16eaee4b2dec2d39 b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/e0/60ce4bc9e327001b16eaee4b2dec2d39 deleted file mode 100644 index 26fbcf6..0000000 --- a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/e0/60ce4bc9e327001b16eaee4b2dec2d39 +++ /dev/null @@ -1,252 +0,0 @@ -/* USER CODE BEGIN Header */ -/** - ****************************************************************************** - * @file : main.c - * @brief : Main program body - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2020 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ -/* USER CODE END Header */ -/* Includes ------------------------------------------------------------------*/ -#include "main.h" - -/* Private includes ----------------------------------------------------------*/ -/* USER CODE BEGIN Includes */ - -/* USER CODE END Includes */ - -/* Private typedef -----------------------------------------------------------*/ -/* USER CODE BEGIN PTD */ - -/* USER CODE END PTD */ - -/* Private define ------------------------------------------------------------*/ -/* USER CODE BEGIN PD */ -/* USER CODE END PD */ - -/* Private macro -------------------------------------------------------------*/ -/* USER CODE BEGIN PM */ - -/* USER CODE END PM */ - -/* Private variables ---------------------------------------------------------*/ -RTC_HandleTypeDef hrtc; - -/* USER CODE BEGIN PV */ - -/* USER CODE END PV */ - -/* Private function prototypes -----------------------------------------------*/ -void SystemClock_Config(void); -static void MX_GPIO_Init(void); -static void MX_RTC_Init(void); -/* USER CODE BEGIN PFP */ - -/* USER CODE END PFP */ - -/* Private user code ---------------------------------------------------------*/ -/* USER CODE BEGIN 0 */ - -/* USER CODE END 0 */ - -/** - * @brief The application entry point. - * @retval int - */ -int main(void) -{ - /* USER CODE BEGIN 1 */ - - /* USER CODE END 1 */ - - /* MCU Configuration--------------------------------------------------------*/ - - /* Reset of all peripherals, Initializes the Flash interface and the Systick. */ - HAL_Init(); - - /* USER CODE BEGIN Init */ - - /* USER CODE END Init */ - - /* Configure the system clock */ - SystemClock_Config(); - - /* USER CODE BEGIN SysInit */ - - /* USER CODE END SysInit */ - - /* Initialize all configured peripherals */ - MX_GPIO_Init(); - MX_RTC_Init(); - /* USER CODE BEGIN 2 */ - - /* USER CODE END 2 */ - - /* Infinite loop */ - /* USER CODE BEGIN WHILE */ - while (1) - { - /* USER CODE END WHILE */ - - /* USER CODE BEGIN 3 */ - } - /* USER CODE END 3 */ -} - -/** - * @brief System Clock Configuration - * @retval None - */ -void SystemClock_Config(void) -{ - LL_FLASH_SetLatency(LL_FLASH_LATENCY_1); - while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_1) - { - } - LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1); - LL_RCC_MSI_Enable(); - - /* Wait till MSI is ready */ - while(LL_RCC_MSI_IsReady() != 1) - { - - } - LL_RCC_MSI_EnablePLLMode(); - LL_RCC_MSI_EnableRangeSelection(); - LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6); - LL_RCC_MSI_SetCalibTrimming(0); - LL_PWR_EnableBkUpAccess(); - LL_RCC_ForceBackupDomainReset(); - LL_RCC_ReleaseBackupDomainReset(); - LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW); - LL_RCC_LSE_Enable(); - - /* Wait till LSE is ready */ - while(LL_RCC_LSE_IsReady() != 1) - { - - } - LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE); - LL_RCC_EnableRTC(); - LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4); - LL_RCC_PLL_EnableDomain_SYS(); - LL_RCC_PLL_Enable(); - - /* Wait till PLL is ready */ - while(LL_RCC_PLL_IsReady() != 1) - { - - } - LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL); - - /* Wait till System clock is ready */ - while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL) - { - - } - LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1); - LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1); - LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1); - LL_SetSystemCoreClock(24000000); - - /* Update the time base */ - if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK) - { - Error_Handler(); - } -} - -/** - * @brief RTC Initialization Function - * @param None - * @retval None - */ -static void MX_RTC_Init(void) -{ - - /* USER CODE BEGIN RTC_Init 0 */ - - /* USER CODE END RTC_Init 0 */ - - /* USER CODE BEGIN RTC_Init 1 */ - - /* USER CODE END RTC_Init 1 */ - /** Initialize RTC Only - */ - hrtc.Instance = RTC; - hrtc.Init.HourFormat = RTC_HOURFORMAT_24; - hrtc.Init.AsynchPrediv = 127; - hrtc.Init.SynchPrediv = 255; - hrtc.Init.OutPut = RTC_OUTPUT_DISABLE; - hrtc.Init.OutPutRemap = RTC_OUTPUT_REMAP_NONE; - hrtc.Init.OutPutPolarity = RTC_OUTPUT_POLARITY_HIGH; - hrtc.Init.OutPutType = RTC_OUTPUT_TYPE_OPENDRAIN; - if (HAL_RTC_Init(&hrtc) != HAL_OK) - { - Error_Handler(); - } - /* USER CODE BEGIN RTC_Init 2 */ - - /* USER CODE END RTC_Init 2 */ - -} - -/** - * @brief GPIO Initialization Function - * @param None - * @retval None - */ -static void MX_GPIO_Init(void) -{ - - /* GPIO Ports Clock Enable */ - __HAL_RCC_GPIOC_CLK_ENABLE(); - __HAL_RCC_GPIOA_CLK_ENABLE(); - __HAL_RCC_GPIOB_CLK_ENABLE(); - -} - -/* USER CODE BEGIN 4 */ - -/* USER CODE END 4 */ - -/** - * @brief This function is executed in case of error occurrence. - * @retval None - */ -void Error_Handler(void) -{ - /* USER CODE BEGIN Error_Handler_Debug */ - /* User can add his own implementation to report the HAL error return state */ - - /* USER CODE END Error_Handler_Debug */ -} - -#ifdef USE_FULL_ASSERT -/** - * @brief Reports the name of the source file and the source line number - * where the assert_param error has occurred. - * @param file: pointer to the source file name - * @param line: assert_param error line source number - * @retval None - */ -void assert_failed(uint8_t *file, uint32_t line) -{ - /* USER CODE BEGIN 6 */ - /* User can add his own implementation to report the file name and line number, - tex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */ - /* USER CODE END 6 */ -} -#endif /* USE_FULL_ASSERT */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/e8/80ffd086a928001b1d0af99b6389052e b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/e5/102e7408b728001b1d0af99b6389052e similarity index 99% rename from PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/e8/80ffd086a928001b1d0af99b6389052e rename to PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/e5/102e7408b728001b1d0af99b6389052e index ec873ae..dd8d8eb 100644 --- a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/e8/80ffd086a928001b1d0af99b6389052e +++ b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/e5/102e7408b728001b1d0af99b6389052e @@ -64,6 +64,7 @@ extern "C" { void Error_Handler(void); void SystemClock_Config_24M_LSE(void); void SystemClock_Config_80M(void); +void Init_LSE(void); /* USER CODE BEGIN EFP */ /* USER CODE END EFP */ diff --git a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/ec/10da326cac28001b1d0af99b6389052e b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/ec/10da326cac28001b1d0af99b6389052e deleted file mode 100644 index c69704a..0000000 --- a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/ec/10da326cac28001b1d0af99b6389052e +++ /dev/null @@ -1,221 +0,0 @@ -/* Project L476_ats_blink for STM32L476 mounted on Nucleo board: - * the user LED (mounted on pin PA-5) is flashed every second for 50 ms. - * The time base is provided by Systick (1000 ticks per second). - * The clock configuration is the default one (Sysclk = 80 MHz, derived from MSI and PLL). - */ - -/* Includes ------------------------------------------------------------------*/ -#include "main.h" -// #if defined(USE_FULL_ASSERT) -// #include "stm32_assert.h" -// #endif /* USE_FULL_ASSERT */ - -#include "gpio.h" - -// systick interrupt handler -volatile uint32_t msTicks = 0; -volatile uint8_t expe = 0; -volatile uint8_t blue_mode = 0; - -void SysTick_Handler() -{ - if ( BLUE_BUTTON() ){ - blue_mode = 1 ; - } - - msTicks++; /* See startup file startup_LPC17xx.s for SysTick vector */ - if (msTicks == 5 * expe){ - LED_GREEN(0); - }else if(msTicks >= 200){ - msTicks = 0; - LED_GREEN(1); - } - if(expe == 2){ - CLK_TOGGLE(); - } -} - - - - -int main(void) -{ - if (RCC->BDCR & RCC_BDCR_LSEON) { - LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR ); - LL_PWR_EnableBkUpAccess(); - - //expe = register RTC - expe = RTC->BKP0R; - if (expe == 0){ - expe = 1; - RTC->BKP0R = expe; - }else if (expe != 0 && BLUE_BUTTON()){ - expe ++; - RTC->BKP0R = expe; - } - }else{ - SystemClock_Config_24M_LSE(); - expe = 1; - LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR ); - LL_PWR_EnableBkUpAccess(); - RTC->BKP0R = expe; - } - LL_PWR_DisableBkUpAccess(); - - - switch(expe){ - case 1: - /* Configure the system clock */ - SystemClock_Config_80M(); - break; - case 2: - /* Configure the system clock */ - SystemClock_Config_24M_LSE(); - break; - } - - - - -// config GPIO -GPIO_init(); - -// init systick timer (tick period at 1 ms) -LL_Init1msTick( SystemCoreClock ); -LL_SYSTICK_EnableIT(); - -//Setup Sleep mode -LL_LPM_EnableSleep(); -//LL_LPM_EnableSleepOnExit(); - -while (1) { - if (blue_mode){ - switch(expe){ - case 1: - __WFI(); - break; - case 2: - LL_RCC_MSI_EnablePLLMode(); - break; - } - - } - } -} - - - -/** - * @brief System Clock Configuration - * @retval None - * 24Mhz + RTC + LSE - */ -void SystemClock_Config_24M_LSE(void) -{ - LL_FLASH_SetLatency(LL_FLASH_LATENCY_1); - while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_1) - { - } - LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1); - LL_RCC_MSI_Enable(); - - /* Wait till MSI is ready */ - while(LL_RCC_MSI_IsReady() != 1) - { - - } - - LL_RCC_LSE_Enable(); - - /* Wait till LSE is ready */ - while(LL_RCC_LSE_IsReady() != 1) - { - - } - LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE); - LL_RCC_EnableRTC(); - - LL_RCC_MSI_EnableRangeSelection(); - LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6); - LL_RCC_MSI_SetCalibTrimming(0); -// LL_RCC_MSI_EnablePLLMode(); - - LL_PWR_EnableBkUpAccess(); -LL_RCC_ForceBackupDomainReset(); -LL_RCC_ReleaseBackupDomainReset(); -LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW); - - - LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4); - LL_RCC_PLL_EnableDomain_SYS(); - LL_RCC_PLL_Enable(); - - /* Wait till PLL is ready */ - while(LL_RCC_PLL_IsReady() != 1) - { - - } - LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL); - - /* Wait till System clock is ready */ - while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL) - { - - } - LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1); - LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1); - LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1); - LL_SetSystemCoreClock(24000000); - - /* Update the time base */ - if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK) - { -// Error_Handler(); - } -} - - -void SystemClock_Config_80M(void) -{ - LL_FLASH_SetLatency(LL_FLASH_LATENCY_4); - while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_4) - { - } - LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1); - LL_RCC_MSI_Enable(); - - /* Wait till MSI is ready */ - while(LL_RCC_MSI_IsReady() != 1) - { - - } - LL_RCC_MSI_EnableRangeSelection(); - LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6); - LL_RCC_MSI_SetCalibTrimming(0); - LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 40, LL_RCC_PLLR_DIV_2); - LL_RCC_PLL_EnableDomain_SYS(); - LL_RCC_PLL_Enable(); - - /* Wait till PLL is ready */ - while(LL_RCC_PLL_IsReady() != 1) - { - - } - LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL); - - /* Wait till System clock is ready */ - while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL) - { - - } - LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1); - LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1); - LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1); - LL_SetSystemCoreClock(80000000); - - /* Update the time base */ - if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK) - { -// Error_Handler(); - } -} diff --git a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/f9/e0ef14e4ea27001b16eaee4b2dec2d39 b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/f9/e0ef14e4ea27001b16eaee4b2dec2d39 deleted file mode 100644 index 84de6df..0000000 --- a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/f9/e0ef14e4ea27001b16eaee4b2dec2d39 +++ /dev/null @@ -1,143 +0,0 @@ -/* Project L476_ats_blink for STM32L476 mounted on Nucleo board: - * the user LED (mounted on pin PA-5) is flashed every second for 50 ms. - * The time base is provided by Systick (1000 ticks per second). - * The clock configuration is the default one (Sysclk = 80 MHz, derived from MSI and PLL). - */ - -/* Includes ------------------------------------------------------------------*/ -#include "main.h" -// #if defined(USE_FULL_ASSERT) -// #include "stm32_assert.h" -// #endif /* USE_FULL_ASSERT */ - -#include "gpio.h" - -// systick interrupt handler -volatile uint32_t msTicks = 0; -volatile uint8_t expe = 2; -volatile uint8_t blue_mode = 0; - -void SysTick_Handler() -{ - if ( BLUE_BUTTON() ){ - blue_mode = 1 ; - } - - msTicks++; /* See startup file startup_LPC17xx.s for SysTick vector */ - if (msTicks == 5){ - LED_GREEN(0); - }else if(msTicks >= 200){ - msTicks = 0; - LED_GREEN(1); - } - if(expe == 2){ - CLK_TOGGLE(); - } -} - - -void SystemClock_Config(void); - -int main(void) -{ -/* Configure the system clock */ -SystemClock_Config(); - -// config GPIO -GPIO_init(); - -// init systick timer (tick period at 1 ms) -LL_Init1msTick( SystemCoreClock ); -LL_SYSTICK_EnableIT(); - -//Setup Sleep mode -LL_LPM_EnableSleep(); -//LL_LPM_EnableSleepOnExit(); - -while (1) { - if (blue_mode){ - switch(expe){ - case 1: - __WFI(); - break; - case 2: - break; - } - } - -// else { -// LED_GREEN(0); -// LL_mDelay(950); -// LED_GREEN(1); -// LL_mDelay(50); -// } - } -} - -/** -/** - * @brief System Clock Configuration - * @retval None - * 24Mhz + RTC + LSE - */ -void SystemClock_Config(void) -{ - LL_FLASH_SetLatency(LL_FLASH_LATENCY_1); - while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_1) - { - } - LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1); - LL_RCC_MSI_Enable(); - - /* Wait till MSI is ready */ - while(LL_RCC_MSI_IsReady() != 1) - { - - } - - LL_RCC_LSE_Enable(); - - /* Wait till LSE is ready */ - while(LL_RCC_LSE_IsReady() != 1) - { - - } - LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE); - LL_RCC_EnableRTC(); - - LL_RCC_MSI_EnableRangeSelection(); - LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6); - LL_RCC_MSI_SetCalibTrimming(0); - LL_RCC_MSI_EnablePLLMode(); - LL_PWR_EnableBkUpAccess(); - LL_RCC_ForceBackupDomainReset(); - LL_RCC_ReleaseBackupDomainReset(); - LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW); - - LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4); - LL_RCC_PLL_EnableDomain_SYS(); - LL_RCC_PLL_Enable(); - - /* Wait till PLL is ready */ - while(LL_RCC_PLL_IsReady() != 1) - { - - } - LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL); - - /* Wait till System clock is ready */ - while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL) - { - - } - LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1); - LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1); - LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1); - LL_SetSystemCoreClock(24000000); - - /* Update the time base */ - if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK) - { -// Error_Handler(); - } -} diff --git a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/fd/00deef80b428001b1d0af99b6389052e b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/fd/00deef80b428001b1d0af99b6389052e new file mode 100644 index 0000000..9572880 --- /dev/null +++ b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/fd/00deef80b428001b1d0af99b6389052e @@ -0,0 +1,218 @@ +/* Project L476_ats_blink for STM32L476 mounted on Nucleo board: + * the user LED (mounted on pin PA-5) is flashed every second for 50 ms. + * The time base is provided by Systick (1000 ticks per second). + * The clock configuration is the default one (Sysclk = 80 MHz, derived from MSI and PLL). + */ + +/* Includes ------------------------------------------------------------------*/ +#include "main.h" +// #if defined(USE_FULL_ASSERT) +// #include "stm32_assert.h" +// #endif /* USE_FULL_ASSERT */ + +#include "gpio.h" + +// systick interrupt handler +volatile uint32_t msTicks = 0; +volatile uint8_t expe = 0; +volatile uint8_t blue_mode = 0; + +void SysTick_Handler() +{ + if ( BLUE_BUTTON() ){ + blue_mode = 1 ; + } + + msTicks++; /* See startup file startup_LPC17xx.s for SysTick vector */ + if (msTicks == 5 * expe){ + LED_GREEN(0); + }else if(msTicks >= 200){ + msTicks = 0; + LED_GREEN(1); + } + if(expe == 2){ + CLK_TOGGLE(); + } +} + + + + +int main(void) +{ + + + // config GPIO + GPIO_init(); + + if (RCC->BDCR & RCC_BDCR_LSEON) { + LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR ); + LL_PWR_EnableBkUpAccess(); + + //expe = register RTC + expe = RTC->BKP0R; + + if (BLUE_BUTTON()){ + + expe ++; + + if (expe > 2) expe = 1; + RTC->BKP0R = expe; + } + }else{ + SystemClock_Config_24M_LSE(); + expe = 1; + LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR ); + LL_PWR_EnableBkUpAccess(); + RTC->BKP0R = expe; + } + LL_PWR_DisableBkUpAccess(); + switch(expe){ + case 1: + /* Configure the system clock */ + SystemClock_Config_80M(); + break; + case 2: + /* Configure the system clock */ + SystemClock_Config_24M_LSE(); + break; + } + + + // init systick timer (tick period at 1 ms) + LL_Init1msTick( SystemCoreClock ); + LL_SYSTICK_EnableIT(); + + //Setup Sleep mode + LL_LPM_EnableSleep(); + //LL_LPM_EnableSleepOnExit(); + + while (1) { + if (blue_mode){ + switch(expe){ + case 1: + __WFI(); + break; + case 2: + LL_RCC_MSI_EnablePLLMode(); + break; + } + + } + } +} + +/** + * @brief System Clock Configuration + * @retval None + * 24Mhz + RTC + LSE + */ +void SystemClock_Config_24M_LSE(void) +{ + LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR ); + LL_FLASH_SetLatency(LL_FLASH_LATENCY_1); + while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_1) + { + } + LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1); + LL_RCC_MSI_Enable(); + + /* Wait till MSI is ready */ + while(LL_RCC_MSI_IsReady() != 1) + { + + } + + LL_PWR_EnableBkUpAccess(); +// LL_RCC_ForceBackupDomainReset(); + LL_RCC_ReleaseBackupDomainReset(); + LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW); + + LL_RCC_MSI_EnableRangeSelection(); + LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6); + LL_RCC_MSI_SetCalibTrimming(0); + // LL_RCC_MSI_EnablePLLMode(); + + LL_RCC_LSE_Enable(); + + /* Wait till LSE is ready */ + while(LL_RCC_LSE_IsReady() != 1) + { + + } + LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE); + LL_RCC_EnableRTC(); + + LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4); + LL_RCC_PLL_EnableDomain_SYS(); + LL_RCC_PLL_Enable(); + + /* Wait till PLL is ready */ + while(LL_RCC_PLL_IsReady() != 1) + { + + } + LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL); + + /* Wait till System clock is ready */ + while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL) + { + + } + LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1); + LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1); + LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1); + LL_SetSystemCoreClock(24000000); + + /* Update the time base */ + if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK) + { + // Error_Handler(); + } +} + + +void SystemClock_Config_80M(void) +{ + LL_FLASH_SetLatency(LL_FLASH_LATENCY_4); + while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_4) + { + } + LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1); + LL_RCC_MSI_Enable(); + + /* Wait till MSI is ready */ + while(LL_RCC_MSI_IsReady() != 1) + { + + } + LL_RCC_MSI_EnableRangeSelection(); + LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6); + LL_RCC_MSI_SetCalibTrimming(0); + LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 40, LL_RCC_PLLR_DIV_2); + LL_RCC_PLL_EnableDomain_SYS(); + LL_RCC_PLL_Enable(); + + /* Wait till PLL is ready */ + while(LL_RCC_PLL_IsReady() != 1) + { + + } + LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL); + + /* Wait till System clock is ready */ + while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL) + { + + } + LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1); + LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1); + LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1); + LL_SetSystemCoreClock(80000000); + + /* Update the time base */ + if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK) + { + // Error_Handler(); + } +} diff --git a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.projects/RealOne/.indexes/bf/be/history.index b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.projects/RealOne/.indexes/bf/be/history.index new file mode 100644 index 0000000..8a48e01 Binary files /dev/null and b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.projects/RealOne/.indexes/bf/be/history.index differ diff --git a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.projects/RealOne/.indexes/bf/be/properties.index b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.projects/RealOne/.indexes/bf/be/properties.index new file mode 100644 index 0000000..8276adf Binary files /dev/null and b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.projects/RealOne/.indexes/bf/be/properties.index differ diff --git a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.projects/RealOne/.indexes/bf/c4/history.index b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.projects/RealOne/.indexes/bf/c4/history.index new file mode 100644 index 0000000..5349561 Binary files /dev/null and b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.projects/RealOne/.indexes/bf/c4/history.index differ diff --git a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.projects/RealOne/.indexes/d5/0/be/properties.index b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.projects/RealOne/.indexes/d5/0/be/properties.index new file mode 100644 index 0000000..417b19b Binary files /dev/null and b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.projects/RealOne/.indexes/d5/0/be/properties.index differ diff --git a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.projects/RealOne/.indexes/d5/13/76/61/53/78/properties.index b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.projects/RealOne/.indexes/d5/13/76/61/53/78/properties.index new file mode 100644 index 0000000..b2a832e Binary files /dev/null and b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.projects/RealOne/.indexes/d5/13/76/61/53/78/properties.index differ diff --git a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.projects/RealOne/.markers b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.projects/RealOne/.markers new file mode 100644 index 0000000..c1eca44 Binary files /dev/null and b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.projects/RealOne/.markers differ diff --git a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.projects/RealOne/.markers.snap b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.projects/RealOne/.markers.snap deleted file mode 100644 index 041af17..0000000 Binary files a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.projects/RealOne/.markers.snap and /dev/null differ diff --git a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.projects/RealOne/.syncinfo.snap b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.projects/RealOne/.syncinfo.snap deleted file mode 100644 index 91d6c54..0000000 Binary files a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.projects/RealOne/.syncinfo.snap and /dev/null differ diff --git a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.projects/RemoteSystemsTempFiles/.markers.snap b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.projects/RemoteSystemsTempFiles/.markers.snap deleted file mode 100644 index 7e9499e..0000000 Binary files a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.projects/RemoteSystemsTempFiles/.markers.snap and /dev/null differ diff --git a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.projects/RemoteSystemsTempFiles/.syncinfo.snap b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.projects/RemoteSystemsTempFiles/.syncinfo.snap deleted file mode 100644 index 7e9499e..0000000 Binary files a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.projects/RemoteSystemsTempFiles/.syncinfo.snap and /dev/null differ diff --git a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.root/.markers.snap b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.root/.markers.snap deleted file mode 100644 index 7e9499e..0000000 Binary files a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.root/.markers.snap and /dev/null differ diff --git a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.root/2.tree b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.root/2.tree deleted file mode 100644 index cee79ab..0000000 Binary files a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.root/2.tree and /dev/null differ diff --git a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/2.snap b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.root/3.tree similarity index 54% rename from PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/2.snap rename to PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.root/3.tree index 76129fc..54e77b2 100644 Binary files a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/2.snap and b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.root/3.tree differ diff --git a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources index cfef3f9..0646ac1 100644 Binary files a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources and b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources differ diff --git a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.cdt.debug.ui.prefs b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.cdt.debug.ui.prefs new file mode 100644 index 0000000..c03690a --- /dev/null +++ b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.cdt.debug.ui.prefs @@ -0,0 +1,7 @@ +columnOrderKeyEXE=0,1,2,3,4,5 +columnOrderKeySF=0,1,2,3,4,5 +columnSortDirectionKeyEXE=128 +columnSortDirectionKeySF=128 +eclipse.preferences.version=1 +visibleColumnsKeyEXE=1,1,1,0,0,0 +visibleColumnsKeySF=1,1,0,0,0,0 diff --git a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.debug.core.prefs b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.debug.core.prefs index f27b60b..77207d9 100644 --- a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.debug.core.prefs +++ b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.debug.core.prefs @@ -4,4 +4,4 @@ //org.eclipse.debug.core.PREFERRED_DELEGATES/org.eclipse.cdt.launch.postmortemLaunchType=org.eclipse.cdt.dsf.gdb.launch.coreCLaunch,debug,; //org.eclipse.debug.core.PREFERRED_DELEGATES/org.eclipse.cdt.launch.remoteApplicationLaunchType=org.eclipse.rse.remotecdt.dsf.debug,debug,; eclipse.preferences.version=1 -prefWatchExpressions=\r\n\r\n +prefWatchExpressions=\r\n\r\n\r\n\r\n\r\n\r\n diff --git a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.debug.ui.prefs b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.debug.ui.prefs index 97640c0..ece0b02 100644 --- a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.debug.ui.prefs +++ b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.debug.ui.prefs @@ -2,5 +2,7 @@ eclipse.preferences.version=1 org.eclipse.debug.ui.MemoryView.orientation=0 org.eclipse.debug.ui.PREF_LAUNCH_PERSPECTIVES=\r\n\r\n org.eclipse.debug.ui.user_view_bindings=\r\n\r\n\r\n\r\n\r\n\r\n +pref_state_memento.org.eclipse.debug.ui.ExpressionView=\r\n\r\n\r\n\r\n\r\njava.lang.String\r\n\r\n\r\n\r\n +pref_state_memento.org.eclipse.debug.ui.VariableView=\r\n\r\n\r\n\r\n\r\n\r\n preferredDetailPanes=NumberFormatPane\:NumberFormatPane|DefaultDetailPane\:DefaultDetailPane| preferredTargets=org.eclipse.cdt.debug.ui.toggleCBreakpointTarget,org.eclipse.cdt.debug.ui.toggleCDynamicPrintfTarget\:org.eclipse.cdt.debug.ui.toggleCBreakpointTarget| diff --git a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi index 3183e72..c611f30 100644 --- a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi +++ b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi @@ -1,9 +1,9 @@ - - + + activeSchemeId:org.eclipse.ui.defaultAcceleratorConfiguration ModelMigrationProcessor.001 - + @@ -12,9 +12,9 @@ topLevel shellMaximized - - - + + + persp.actionSet:com.st.stm32cube.ide.mcu.informationcenter.actionSet3 persp.actionSet:org.eclipse.ui.cheatsheets.actionSet @@ -70,68 +70,68 @@ persp.viewSC:com.st.stm32cube.ide.mcu.buildanalyzer.view persp.viewSC:com.st.stm32cube.ide.mcu.stackanalyzer.stackanalyzer.view persp.viewSC:com.st.stm32cube.ide.mcu.sfrview - - - + + + View categoryTag:General - + View categoryTag:C/C++ - + View categoryTag:General - + View categoryTag:General - - - - - + + + + + View categoryTag:General - + View categoryTag:General - + View categoryTag:Make - - - + + + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - - + + View categoryTag:C/C++ - + View categoryTag:C/C++ @@ -140,7 +140,7 @@ - + persp.actionSet:com.st.stm32cube.ide.mcu.informationcenter.actionSet3 persp.actionSet:org.eclipse.ui.cheatsheets.actionSet @@ -157,20 +157,20 @@ persp.actionSet:org.eclipse.debug.ui.launchActionSet persp.newWizSC:com.st.stm32cube.common.projectcreation.ui.stm32projectwizard persp.newWizSC:com.st.stm32cube.common.projectcreation.ui.stm32projectfromiocwizard - - - + + + View categoryTag:General active - - - - - - + + + + + + View categoryTag:Device Configuration Tool @@ -179,7 +179,7 @@ - + persp.actionSet:com.st.stm32cube.ide.mcu.informationcenter.actionSet3 persp.actionSet:org.eclipse.ui.cheatsheets.actionSet @@ -226,116 +226,116 @@ persp.viewSC:com.st.stm32cube.ide.mcu.livewatch.LiveExpressionsView persp.viewSC:com.st.stm32cube.ide.mcu.faultanalyzer.view persp.viewSC:com.st.stm32cube.ide.mcu.sfrview - - - + + + org.eclipse.e4.primaryNavigationStack - + View categoryTag:Debug - + View categoryTag:General - - + + View categoryTag:Debug - - - - + + + + org.eclipse.e4.secondaryNavigationStack - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug - + Debug - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug @@ -344,1922 +344,1953 @@ - - + + View categoryTag:Help - + View categoryTag:General - + View categoryTag:Help - + View categoryTag:Help - + View categoryTag:General - + ViewMenu menuContribution:menu - + - + View categoryTag:Help - - + + org.eclipse.e4.primaryDataStack EditorStack active - - + + Editor removeOnHide org.eclipse.cdt.ui.editor.CEditor active + activeOnClose - - + + Editor removeOnHide org.eclipse.cdt.ui.editor.asm.AsmEditor + + + Editor + removeOnHide + org.eclipse.cdt.ui.editor.CEditor + + + + Editor + removeOnHide + org.eclipse.cdt.ui.editor.CEditor + + + + Editor + removeOnHide + org.eclipse.cdt.ui.editor.CEditor + + + + Editor + removeOnHide + org.eclipse.cdt.ui.editor.CEditor + + + + Editor + removeOnHide + org.eclipse.cdt.ui.editor.CEditor + + + + Editor + removeOnHide + org.eclipse.cdt.ui.editor.CEditor + - + View categoryTag:General - + ViewMenu menuContribution:menu - + - + View categoryTag:C/C++ - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + ViewMenu menuContribution:menu - + - + View categoryTag:General - + ViewMenu menuContribution:menu - + - + View categoryTag:General - + ViewMenu menuContribution:menu - + - + View categoryTag:General - + ViewMenu menuContribution:menu - + - + View categoryTag:General - + ViewMenu menuContribution:menu - + - + View categoryTag:General - + View categoryTag:Make - + ViewMenu menuContribution:menu - + - + View categoryTag:C/C++ - + ViewMenu menuContribution:menu - + - + View categoryTag:C/C++ - + ViewMenu menuContribution:menu - + - + View categoryTag:Device Configuration Tool - + View categoryTag:Debug - + ViewMenu menuContribution:menu - + - + View categoryTag:Debug - + ViewMenu menuContribution:menu - + - + View categoryTag:General - + View categoryTag:Debug - + ViewMenu menuContribution:menu - + - + View categoryTag:Debug - + ViewMenu menuContribution:menu - + - + View categoryTag:Debug - + ViewMenu menuContribution:menu - + - + View categoryTag:General - + View categoryTag:Debug - + View categoryTag:Debug - + ViewMenu menuContribution:menu - + - + View categoryTag:Debug - + ViewMenu menuContribution:menu - + - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug - + ViewMenu menuContribution:menu - + - + View categoryTag:Debug - + ViewMenu menuContribution:menu - + - + View categoryTag:Debug - + ViewMenu menuContribution:menu - + - + View categoryTag:Debug - + ViewMenu menuContribution:menu - + - - + + toolbarSeparator - + - + Draggable - + - + toolbarSeparator - + - + Draggable - + toolbarSeparator - + - + Draggable - + Draggable - + Draggable - + Draggable - + toolbarSeparator - + - + Draggable - + - - Draggable - - - Draggable - - + toolbarSeparator - + - + toolbarSeparator - + - + Draggable - + stretch SHOW_RESTORE_MENU - + Draggable HIDEABLE SHOW_RESTORE_MENU - - + + stretch - + Draggable - + Draggable - - + + TrimStack Draggable - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + - - - - - - - + + + + + + + - - + + - - - - + + + + - - - + + + - - - - - + + + + + - - + + - - + + - - - - - - - - - - + + + + + + + + + + - - + + - - - - - - + + + + + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + platform:win32 - - - - - - + + + + + + - - - - - - - - - - + + + + + + + + + + - - - - - - - + + + + + + + - - - + + + - - - + + + - - - - - - + + + + + + - - - - - - - + + + + + + + - - - - + + + + - - - + + + - - + + platform:win32 - - - - - - + + + + + + - - - - + + + + - - + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + - - + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Editor removeOnHide - + View categoryTag:Device Configuration Tool - + View categoryTag:C/C++ - + View categoryTag:SWV - + View categoryTag:SWV - + View categoryTag:SWV - + View categoryTag:SWV - + View categoryTag:SWV - + View categoryTag:SWV - + View categoryTag:SWV - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:C/C++ - + View categoryTag:C/C++ - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Make - + View categoryTag:C/C++ - + View categoryTag:C/C++ - + View categoryTag:C/C++ - + View categoryTag:C/C++ - + View categoryTag:C/C++ - + View categoryTag:General - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Help - + View categoryTag:Connections - + View categoryTag:Remote Systems - + View categoryTag:Remote Systems - + View categoryTag:Remote Systems - + View categoryTag:Remote Systems - + View categoryTag:Remote Systems - + View categoryTag:Remote Systems - + View categoryTag:Remote Systems - + View categoryTag:General - + View categoryTag:General - + View categoryTag:Team - + View categoryTag:Team - + View categoryTag:General - + View categoryTag:General - + View categoryTag:Help - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - - + + glue move_after:PerspectiveSpacer SHOW_RESTORE_MENU - + move_after:Spacer Glue HIDEABLE SHOW_RESTORE_MENU - + glue move_after:SearchField SHOW_RESTORE_MENU - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - + + + - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + - - - - + + + + - - - - - - - + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + + - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + - - - - + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - + + + - - + + - - - - - + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.search/dialog_settings.xml b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.search/dialog_settings.xml new file mode 100644 index 0000000..f44eb4b --- /dev/null +++ b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.search/dialog_settings.xml @@ -0,0 +1,28 @@ + +
+
+ +
+
+ + + + + + + + + + +
+
+ +
+
+ + + + + +
+
diff --git a/PlaygroundYoupi/.metadata/.plugins/org.eclipse.ui.workbench.texteditor/dialog_settings.xml b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.ui.workbench.texteditor/dialog_settings.xml new file mode 100644 index 0000000..0b4c833 --- /dev/null +++ b/PlaygroundYoupi/.metadata/.plugins/org.eclipse.ui.workbench.texteditor/dialog_settings.xml @@ -0,0 +1,23 @@ + +
+
+ + + + + + + + + + + +
+
+ + + + + +
+
diff --git a/RealOne/Core/Inc/main.h b/RealOne/Core/Inc/main.h index dd8d8eb..0543848 100644 --- a/RealOne/Core/Inc/main.h +++ b/RealOne/Core/Inc/main.h @@ -63,6 +63,7 @@ extern "C" { /* Exported functions prototypes ---------------------------------------------*/ void Error_Handler(void); void SystemClock_Config_24M_LSE(void); +void SystemClock_Config_24M_LSE_FL3_VS2(void); void SystemClock_Config_80M(void); void Init_LSE(void); /* USER CODE BEGIN EFP */ diff --git a/RealOne/Core/Src/main.c b/RealOne/Core/Src/main.c index 920491a..7f70e86 100644 --- a/RealOne/Core/Src/main.c +++ b/RealOne/Core/Src/main.c @@ -14,25 +14,25 @@ // systick interrupt handler volatile uint32_t msTicks = 0; -volatile uint8_t expe = 2; +volatile uint8_t expe = 0; volatile uint8_t blue_mode = 0; void SysTick_Handler() { - if ( BLUE_BUTTON() ){ - blue_mode = 1 ; - } + if ( BLUE_BUTTON() ){ + blue_mode = 1 ; + } - msTicks++; /* See startup file startup_LPC17xx.s for SysTick vector */ - if (msTicks == 5 * expe){ - LED_GREEN(0); - }else if(msTicks >= 200){ - msTicks = 0; - LED_GREEN(1); - } - if(expe == 2){ - CLK_TOGGLE(); - } + msTicks++; /* See startup file startup_LPC17xx.s for SysTick vector */ + if (msTicks == 5 * expe){ + LED_GREEN(0); + }else if(msTicks >= 200){ + msTicks = 0; + LED_GREEN(1); + } + if(expe == 2 || expe == 4){ + CLK_TOGGLE(); + } } @@ -40,178 +40,253 @@ void SysTick_Handler() int main(void) { + + + // config GPIO + GPIO_init(); + // if (RCC->BDCR & RCC_BDCR_LSEON) { -// LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR ); -// LL_PWR_EnableBkUpAccess(); -// -// //expe = register RTC -// expe = RTC->BKP0R; -// if (expe == 0){ -// expe = 1; -// RTC->BKP0R = expe; -// }else if (expe != 0 && BLUE_BUTTON()){ -// expe ++; -// RTC->BKP0R = expe; -// } + LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR ); + LL_PWR_EnableBkUpAccess(); + + //expe = register RTC + expe = RTC->BKP0R; + if (expe == 0) { + SystemClock_Config_24M_LSE(); + expe = 1; + LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR ); + LL_PWR_EnableBkUpAccess(); + RTC->BKP0R = expe; + } + + if (BLUE_BUTTON()){ + + expe ++; + + if (expe > 4) expe = 1; + RTC->BKP0R = expe; + } // }else{ -// SystemClock_Config_24M_LSE(); -// expe = 1; -// LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR ); -// LL_PWR_EnableBkUpAccess(); -// RTC->BKP0R = expe; + // } -// LL_PWR_DisableBkUpAccess(); + LL_PWR_DisableBkUpAccess(); switch(expe){ + case 1: + /* Configure the system clock */ + SystemClock_Config_80M(); + break; + case 2: + /* Configure the system clock */ + SystemClock_Config_24M_LSE(); + break; + default: //case 3 to 8 + SystemClock_Config_24M_LSE_FL3_VS2(); + break; + } + + + // init systick timer (tick period at 1 ms) + LL_Init1msTick( SystemCoreClock ); + LL_SYSTICK_EnableIT(); + + //Setup Sleep mode + LL_LPM_EnableSleep(); + //LL_LPM_EnableSleepOnExit(); + + while (1) { + if (blue_mode){ + switch(expe){ case 1: - /* Configure the system clock */ - SystemClock_Config_80M(); + case 3: + __WFI(); break; + case 2: - /* Configure the system clock */ - SystemClock_Config_24M_LSE(); + case 4: + LL_RCC_MSI_EnablePLLMode(); break; + + } - - - -// config GPIO -GPIO_init(); - -// init systick timer (tick period at 1 ms) -LL_Init1msTick( SystemCoreClock ); -LL_SYSTICK_EnableIT(); - -//Setup Sleep mode -LL_LPM_EnableSleep(); -//LL_LPM_EnableSleepOnExit(); - -while (1) { - if (blue_mode){ - switch(expe){ - case 1: - __WFI(); - break; - case 2: - LL_RCC_MSI_EnablePLLMode(); - break; - } - } } } +void SystemClock_Config_24M_LSE_FL3_VS2(void){ + LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR ); + LL_FLASH_SetLatency(LL_FLASH_LATENCY_3); + while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_3) + { + } + LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE2); + LL_RCC_MSI_Enable(); + + /* Wait till MSI is ready */ + while(LL_RCC_MSI_IsReady() != 1) + { + + } + + LL_PWR_EnableBkUpAccess(); +// LL_RCC_ForceBackupDomainReset(); + LL_RCC_ReleaseBackupDomainReset(); + LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW); + + LL_RCC_MSI_EnableRangeSelection(); + LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6); + LL_RCC_MSI_SetCalibTrimming(0); + // LL_RCC_MSI_EnablePLLMode(); + + LL_RCC_LSE_Enable(); + + /* Wait till LSE is ready */ + while(LL_RCC_LSE_IsReady() != 1) + { + + } + LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE); + LL_RCC_EnableRTC(); + + LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4); + LL_RCC_PLL_EnableDomain_SYS(); + LL_RCC_PLL_Enable(); + + /* Wait till PLL is ready */ + while(LL_RCC_PLL_IsReady() != 1) + { + + } + LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL); + + /* Wait till System clock is ready */ + while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL) + { + + } + LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1); + LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1); + LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1); + LL_SetSystemCoreClock(24000000); + + /* Update the time base */ + if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK) + { + // Error_Handler(); + } +} + /** - * @brief System Clock Configuration - * @retval None - * 24Mhz + RTC + LSE - */ + * @brief System Clock Configuration + * @retval None + * 24Mhz + RTC + LSE + */ void SystemClock_Config_24M_LSE(void) { - LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR ); - LL_FLASH_SetLatency(LL_FLASH_LATENCY_1); - while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_1) - { - } - LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1); - LL_RCC_MSI_Enable(); + LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR ); + LL_FLASH_SetLatency(LL_FLASH_LATENCY_1); + while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_1) + { + } + LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1); + LL_RCC_MSI_Enable(); - /* Wait till MSI is ready */ - while(LL_RCC_MSI_IsReady() != 1) - { + /* Wait till MSI is ready */ + while(LL_RCC_MSI_IsReady() != 1) + { - } + } - LL_PWR_EnableBkUpAccess(); - LL_RCC_ForceBackupDomainReset(); - LL_RCC_ReleaseBackupDomainReset(); - LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW); + LL_PWR_EnableBkUpAccess(); +// LL_RCC_ForceBackupDomainReset(); + LL_RCC_ReleaseBackupDomainReset(); + LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW); - LL_RCC_MSI_EnableRangeSelection(); - LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6); - LL_RCC_MSI_SetCalibTrimming(0); -// LL_RCC_MSI_EnablePLLMode(); + LL_RCC_MSI_EnableRangeSelection(); + LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6); + LL_RCC_MSI_SetCalibTrimming(0); + // LL_RCC_MSI_EnablePLLMode(); - LL_RCC_LSE_Enable(); + LL_RCC_LSE_Enable(); - /* Wait till LSE is ready */ - while(LL_RCC_LSE_IsReady() != 1) - { + /* Wait till LSE is ready */ + while(LL_RCC_LSE_IsReady() != 1) + { - } - LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE); - LL_RCC_EnableRTC(); + } + LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE); + LL_RCC_EnableRTC(); - LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4); - LL_RCC_PLL_EnableDomain_SYS(); - LL_RCC_PLL_Enable(); + LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4); + LL_RCC_PLL_EnableDomain_SYS(); + LL_RCC_PLL_Enable(); - /* Wait till PLL is ready */ - while(LL_RCC_PLL_IsReady() != 1) - { + /* Wait till PLL is ready */ + while(LL_RCC_PLL_IsReady() != 1) + { - } - LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL); + } + LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL); - /* Wait till System clock is ready */ - while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL) - { + /* Wait till System clock is ready */ + while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL) + { - } - LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1); - LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1); - LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1); - LL_SetSystemCoreClock(24000000); + } + LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1); + LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1); + LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1); + LL_SetSystemCoreClock(24000000); - /* Update the time base */ - if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK) - { -// Error_Handler(); - } + /* Update the time base */ + if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK) + { + // Error_Handler(); + } } void SystemClock_Config_80M(void) { - LL_FLASH_SetLatency(LL_FLASH_LATENCY_4); - while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_4) - { - } - LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1); - LL_RCC_MSI_Enable(); + LL_FLASH_SetLatency(LL_FLASH_LATENCY_4); + while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_4) + { + } + LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1); + LL_RCC_MSI_Enable(); - /* Wait till MSI is ready */ - while(LL_RCC_MSI_IsReady() != 1) - { + /* Wait till MSI is ready */ + while(LL_RCC_MSI_IsReady() != 1) + { - } - LL_RCC_MSI_EnableRangeSelection(); - LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6); - LL_RCC_MSI_SetCalibTrimming(0); - LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 40, LL_RCC_PLLR_DIV_2); - LL_RCC_PLL_EnableDomain_SYS(); - LL_RCC_PLL_Enable(); + } + LL_RCC_MSI_EnableRangeSelection(); + LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6); + LL_RCC_MSI_SetCalibTrimming(0); + LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 40, LL_RCC_PLLR_DIV_2); + LL_RCC_PLL_EnableDomain_SYS(); + LL_RCC_PLL_Enable(); - /* Wait till PLL is ready */ - while(LL_RCC_PLL_IsReady() != 1) - { + /* Wait till PLL is ready */ + while(LL_RCC_PLL_IsReady() != 1) + { - } - LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL); + } + LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL); - /* Wait till System clock is ready */ - while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL) - { + /* Wait till System clock is ready */ + while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL) + { - } - LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1); - LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1); - LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1); - LL_SetSystemCoreClock(80000000); + } + LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1); + LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1); + LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1); + LL_SetSystemCoreClock(80000000); - /* Update the time base */ - if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK) - { -// Error_Handler(); - } + /* Update the time base */ + if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK) + { + // Error_Handler(); + } } diff --git a/RealOne/Debug/Core/Src/main.o b/RealOne/Debug/Core/Src/main.o index 8699874..e721792 100644 Binary files a/RealOne/Debug/Core/Src/main.o and b/RealOne/Debug/Core/Src/main.o differ diff --git a/RealOne/Debug/Core/Src/main.su b/RealOne/Debug/Core/Src/main.su index 0812aa8..7c719f4 100644 --- a/RealOne/Debug/Core/Src/main.su +++ b/RealOne/Debug/Core/Src/main.su @@ -14,7 +14,6 @@ stm32l4xx_ll_rcc.h:2792:22:LL_RCC_SetAPB1Prescaler 16 static stm32l4xx_ll_rcc.h:2808:22:LL_RCC_SetAPB2Prescaler 16 static stm32l4xx_ll_rcc.h:3650:22:LL_RCC_SetRTCClockSource 16 static stm32l4xx_ll_rcc.h:3674:22:LL_RCC_EnableRTC 4 static -stm32l4xx_ll_rcc.h:3704:22:LL_RCC_ForceBackupDomainReset 4 static stm32l4xx_ll_rcc.h:3714:22:LL_RCC_ReleaseBackupDomainReset 4 static stm32l4xx_ll_rcc.h:3733:22:LL_RCC_PLL_Enable 4 static stm32l4xx_ll_rcc.h:3754:26:LL_RCC_PLL_IsReady 4 static @@ -27,7 +26,9 @@ stm32l4xx_ll_cortex.h:272:22:LL_SYSTICK_EnableIT 4 static stm32l4xx_ll_cortex.h:310:22:LL_LPM_EnableSleep 4 static stm32l4xx_ll_pwr.h:344:22:LL_PWR_SetRegulVoltageScaling 16 static stm32l4xx_ll_pwr.h:398:22:LL_PWR_EnableBkUpAccess 4 static +stm32l4xx_ll_pwr.h:408:22:LL_PWR_DisableBkUpAccess 4 static main.c:20:6:SysTick_Handler 8 static main.c:41:5:main 8 static,ignoring_inline_asm -main.c:109:6:SystemClock_Config_24M_LSE 8 static -main.c:174:6:SystemClock_Config_80M 8 static +main.c:116:6:SystemClock_Config_24M_LSE_FL3_VS2 8 static +main.c:184:6:SystemClock_Config_24M_LSE 8 static +main.c:249:6:SystemClock_Config_80M 8 static diff --git a/RealOne/Debug/RealOne.bin b/RealOne/Debug/RealOne.bin index 30688f4..4b588c9 100644 Binary files a/RealOne/Debug/RealOne.bin and b/RealOne/Debug/RealOne.bin differ diff --git a/RealOne/Debug/RealOne.elf b/RealOne/Debug/RealOne.elf index f1f6932..5a6ac84 100644 Binary files a/RealOne/Debug/RealOne.elf and b/RealOne/Debug/RealOne.elf differ diff --git a/RealOne/Debug/RealOne.list b/RealOne/Debug/RealOne.list index 6c12435..ac97c0c 100644 --- a/RealOne/Debug/RealOne.list +++ b/RealOne/Debug/RealOne.list @@ -5,45 +5,45 @@ Sections: Idx Name Size VMA LMA File off Algn 0 .isr_vector 00000188 08000000 08000000 00010000 2**0 CONTENTS, ALLOC, LOAD, READONLY, DATA - 1 .text 00000ca8 08000188 08000188 00010188 2**2 + 1 .text 00000e0c 08000188 08000188 00010188 2**2 CONTENTS, ALLOC, LOAD, READONLY, CODE - 2 .rodata 00000000 08000e30 08000e30 00020010 2**0 + 2 .rodata 00000000 08000f94 08000f94 0002000c 2**0 CONTENTS, ALLOC, LOAD, DATA - 3 .ARM.extab 00000000 08000e30 08000e30 00020010 2**0 + 3 .ARM.extab 00000000 08000f94 08000f94 0002000c 2**0 CONTENTS - 4 .ARM 00000000 08000e30 08000e30 00020010 2**0 + 4 .ARM 00000000 08000f94 08000f94 0002000c 2**0 CONTENTS - 5 .preinit_array 00000000 08000e30 08000e30 00020010 2**0 + 5 .preinit_array 00000000 08000f94 08000f94 0002000c 2**0 CONTENTS, ALLOC, LOAD, DATA - 6 .init_array 00000004 08000e30 08000e30 00010e30 2**2 + 6 .init_array 00000004 08000f94 08000f94 00010f94 2**2 CONTENTS, ALLOC, LOAD, DATA - 7 .fini_array 00000004 08000e34 08000e34 00010e34 2**2 + 7 .fini_array 00000004 08000f98 08000f98 00010f98 2**2 CONTENTS, ALLOC, LOAD, DATA - 8 .data 00000010 20000000 08000e38 00020000 2**2 + 8 .data 0000000c 20000000 08000f9c 00020000 2**2 CONTENTS, ALLOC, LOAD, DATA - 9 .bss 00000024 20000010 08000e48 00020010 2**2 + 9 .bss 00000024 2000000c 08000fa8 0002000c 2**2 ALLOC - 10 ._user_heap_stack 00000604 20000034 08000e48 00020034 2**0 + 10 ._user_heap_stack 00000600 20000030 08000fa8 00020030 2**0 ALLOC - 11 .ARM.attributes 00000030 00000000 00000000 00020010 2**0 + 11 .ARM.attributes 00000030 00000000 00000000 0002000c 2**0 CONTENTS, READONLY - 12 .debug_info 00004920 00000000 00000000 00020040 2**0 + 12 .debug_info 00004be7 00000000 00000000 0002003c 2**0 CONTENTS, READONLY, DEBUGGING - 13 .debug_abbrev 00000d51 00000000 00000000 00024960 2**0 + 13 .debug_abbrev 00000d51 00000000 00000000 00024c23 2**0 CONTENTS, READONLY, DEBUGGING - 14 .debug_aranges 000005b8 00000000 00000000 000256b8 2**3 + 14 .debug_aranges 000005c0 00000000 00000000 00025978 2**3 CONTENTS, READONLY, DEBUGGING - 15 .debug_ranges 00000540 00000000 00000000 00025c70 2**3 + 15 .debug_ranges 00000548 00000000 00000000 00025f38 2**3 CONTENTS, READONLY, DEBUGGING - 16 .debug_macro 00026337 00000000 00000000 000261b0 2**0 + 16 .debug_macro 00026337 00000000 00000000 00026480 2**0 CONTENTS, READONLY, DEBUGGING - 17 .debug_line 000040e6 00000000 00000000 0004c4e7 2**0 + 17 .debug_line 00004155 00000000 00000000 0004c7b7 2**0 CONTENTS, READONLY, DEBUGGING - 18 .debug_str 000ee792 00000000 00000000 000505cd 2**0 + 18 .debug_str 000ee8e8 00000000 00000000 0005090c 2**0 CONTENTS, READONLY, DEBUGGING - 19 .comment 0000007b 00000000 00000000 0013ed5f 2**0 + 19 .comment 0000007b 00000000 00000000 0013f1f4 2**0 CONTENTS, READONLY - 20 .debug_frame 000015c0 00000000 00000000 0013eddc 2**2 + 20 .debug_frame 000015dc 00000000 00000000 0013f270 2**2 CONTENTS, READONLY, DEBUGGING Disassembly of section .text: @@ -60,9 +60,9 @@ Disassembly of section .text: 800019a: 2301 movs r3, #1 800019c: 7023 strb r3, [r4, #0] 800019e: bd10 pop {r4, pc} - 80001a0: 20000010 .word 0x20000010 + 80001a0: 2000000c .word 0x2000000c 80001a4: 00000000 .word 0x00000000 - 80001a8: 08000e18 .word 0x08000e18 + 80001a8: 08000f7c .word 0x08000f7c 080001ac : 80001ac: b508 push {r3, lr} @@ -73,8 +73,8 @@ Disassembly of section .text: 80001b6: f3af 8000 nop.w 80001ba: bd08 pop {r3, pc} 80001bc: 00000000 .word 0x00000000 - 80001c0: 20000014 .word 0x20000014 - 80001c4: 08000e18 .word 0x08000e18 + 80001c0: 20000010 .word 0x20000010 + 80001c4: 08000f7c .word 0x08000f7c 080001c8 : * @@ -863,20 +863,20 @@ __STATIC_INLINE void LL_RCC_EnableRTC(void) 800063e: bf00 nop 8000640: 40021000 .word 0x40021000 -08000644 : - * @brief Force the Backup domain reset - * @rmtoll BDCR BDRST LL_RCC_ForceBackupDomainReset +08000644 : + * @brief Release the Backup domain reset + * @rmtoll BDCR BDRST LL_RCC_ReleaseBackupDomainReset * @retval None */ -__STATIC_INLINE void LL_RCC_ForceBackupDomainReset(void) +__STATIC_INLINE void LL_RCC_ReleaseBackupDomainReset(void) { 8000644: b480 push {r7} 8000646: af00 add r7, sp, #0 - SET_BIT(RCC->BDCR, RCC_BDCR_BDRST); - 8000648: 4b06 ldr r3, [pc, #24] ; (8000664 ) + CLEAR_BIT(RCC->BDCR, RCC_BDCR_BDRST); + 8000648: 4b06 ldr r3, [pc, #24] ; (8000664 ) 800064a: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90 - 800064e: 4a05 ldr r2, [pc, #20] ; (8000664 ) - 8000650: f443 3380 orr.w r3, r3, #65536 ; 0x10000 + 800064e: 4a05 ldr r2, [pc, #20] ; (8000664 ) + 8000650: f423 3380 bic.w r3, r3, #65536 ; 0x10000 8000654: f8c2 3090 str.w r3, [r2, #144] ; 0x90 } 8000658: bf00 nop @@ -886,1522 +886,1751 @@ __STATIC_INLINE void LL_RCC_ForceBackupDomainReset(void) 8000662: bf00 nop 8000664: 40021000 .word 0x40021000 -08000668 : - * @brief Release the Backup domain reset - * @rmtoll BDCR BDRST LL_RCC_ReleaseBackupDomainReset - * @retval None - */ -__STATIC_INLINE void LL_RCC_ReleaseBackupDomainReset(void) -{ - 8000668: b480 push {r7} - 800066a: af00 add r7, sp, #0 - CLEAR_BIT(RCC->BDCR, RCC_BDCR_BDRST); - 800066c: 4b06 ldr r3, [pc, #24] ; (8000688 ) - 800066e: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90 - 8000672: 4a05 ldr r2, [pc, #20] ; (8000688 ) - 8000674: f423 3380 bic.w r3, r3, #65536 ; 0x10000 - 8000678: f8c2 3090 str.w r3, [r2, #144] ; 0x90 -} - 800067c: bf00 nop - 800067e: 46bd mov sp, r7 - 8000680: f85d 7b04 ldr.w r7, [sp], #4 - 8000684: 4770 bx lr - 8000686: bf00 nop - 8000688: 40021000 .word 0x40021000 - -0800068c : +08000668 : * @brief Enable PLL * @rmtoll CR PLLON LL_RCC_PLL_Enable * @retval None */ __STATIC_INLINE void LL_RCC_PLL_Enable(void) { - 800068c: b480 push {r7} - 800068e: af00 add r7, sp, #0 + 8000668: b480 push {r7} + 800066a: af00 add r7, sp, #0 SET_BIT(RCC->CR, RCC_CR_PLLON); - 8000690: 4b05 ldr r3, [pc, #20] ; (80006a8 ) - 8000692: 681b ldr r3, [r3, #0] - 8000694: 4a04 ldr r2, [pc, #16] ; (80006a8 ) - 8000696: f043 7380 orr.w r3, r3, #16777216 ; 0x1000000 - 800069a: 6013 str r3, [r2, #0] + 800066c: 4b05 ldr r3, [pc, #20] ; (8000684 ) + 800066e: 681b ldr r3, [r3, #0] + 8000670: 4a04 ldr r2, [pc, #16] ; (8000684 ) + 8000672: f043 7380 orr.w r3, r3, #16777216 ; 0x1000000 + 8000676: 6013 str r3, [r2, #0] } - 800069c: bf00 nop - 800069e: 46bd mov sp, r7 - 80006a0: f85d 7b04 ldr.w r7, [sp], #4 - 80006a4: 4770 bx lr - 80006a6: bf00 nop - 80006a8: 40021000 .word 0x40021000 + 8000678: bf00 nop + 800067a: 46bd mov sp, r7 + 800067c: f85d 7b04 ldr.w r7, [sp], #4 + 8000680: 4770 bx lr + 8000682: bf00 nop + 8000684: 40021000 .word 0x40021000 -080006ac : +08000688 : * @brief Check if PLL Ready * @rmtoll CR PLLRDY LL_RCC_PLL_IsReady * @retval State of bit (1 or 0). */ __STATIC_INLINE uint32_t LL_RCC_PLL_IsReady(void) { - 80006ac: b480 push {r7} - 80006ae: af00 add r7, sp, #0 + 8000688: b480 push {r7} + 800068a: af00 add r7, sp, #0 return ((READ_BIT(RCC->CR, RCC_CR_PLLRDY) == RCC_CR_PLLRDY) ? 1UL : 0UL); - 80006b0: 4b07 ldr r3, [pc, #28] ; (80006d0 ) - 80006b2: 681b ldr r3, [r3, #0] - 80006b4: f003 7300 and.w r3, r3, #33554432 ; 0x2000000 - 80006b8: f1b3 7f00 cmp.w r3, #33554432 ; 0x2000000 - 80006bc: d101 bne.n 80006c2 - 80006be: 2301 movs r3, #1 - 80006c0: e000 b.n 80006c4 - 80006c2: 2300 movs r3, #0 + 800068c: 4b07 ldr r3, [pc, #28] ; (80006ac ) + 800068e: 681b ldr r3, [r3, #0] + 8000690: f003 7300 and.w r3, r3, #33554432 ; 0x2000000 + 8000694: f1b3 7f00 cmp.w r3, #33554432 ; 0x2000000 + 8000698: d101 bne.n 800069e + 800069a: 2301 movs r3, #1 + 800069c: e000 b.n 80006a0 + 800069e: 2300 movs r3, #0 } - 80006c4: 4618 mov r0, r3 - 80006c6: 46bd mov sp, r7 - 80006c8: f85d 7b04 ldr.w r7, [sp], #4 - 80006cc: 4770 bx lr - 80006ce: bf00 nop - 80006d0: 40021000 .word 0x40021000 + 80006a0: 4618 mov r0, r3 + 80006a2: 46bd mov sp, r7 + 80006a4: f85d 7b04 ldr.w r7, [sp], #4 + 80006a8: 4770 bx lr + 80006aa: bf00 nop + 80006ac: 40021000 .word 0x40021000 -080006d4 : +080006b0 : * @arg @ref LL_RCC_PLLR_DIV_6 * @arg @ref LL_RCC_PLLR_DIV_8 * @retval None */ __STATIC_INLINE void LL_RCC_PLL_ConfigDomain_SYS(uint32_t Source, uint32_t PLLM, uint32_t PLLN, uint32_t PLLR) { - 80006d4: b480 push {r7} - 80006d6: b085 sub sp, #20 - 80006d8: af00 add r7, sp, #0 - 80006da: 60f8 str r0, [r7, #12] - 80006dc: 60b9 str r1, [r7, #8] - 80006de: 607a str r2, [r7, #4] - 80006e0: 603b str r3, [r7, #0] + 80006b0: b480 push {r7} + 80006b2: b085 sub sp, #20 + 80006b4: af00 add r7, sp, #0 + 80006b6: 60f8 str r0, [r7, #12] + 80006b8: 60b9 str r1, [r7, #8] + 80006ba: 607a str r2, [r7, #4] + 80006bc: 603b str r3, [r7, #0] MODIFY_REG(RCC->PLLCFGR, RCC_PLLCFGR_PLLSRC | RCC_PLLCFGR_PLLM | RCC_PLLCFGR_PLLN | RCC_PLLCFGR_PLLR, - 80006e2: 4b0a ldr r3, [pc, #40] ; (800070c ) - 80006e4: 68da ldr r2, [r3, #12] - 80006e6: 4b0a ldr r3, [pc, #40] ; (8000710 ) - 80006e8: 4013 ands r3, r2 - 80006ea: 68f9 ldr r1, [r7, #12] - 80006ec: 68ba ldr r2, [r7, #8] - 80006ee: 4311 orrs r1, r2 - 80006f0: 687a ldr r2, [r7, #4] - 80006f2: 0212 lsls r2, r2, #8 - 80006f4: 4311 orrs r1, r2 - 80006f6: 683a ldr r2, [r7, #0] - 80006f8: 430a orrs r2, r1 - 80006fa: 4904 ldr r1, [pc, #16] ; (800070c ) - 80006fc: 4313 orrs r3, r2 - 80006fe: 60cb str r3, [r1, #12] + 80006be: 4b0a ldr r3, [pc, #40] ; (80006e8 ) + 80006c0: 68da ldr r2, [r3, #12] + 80006c2: 4b0a ldr r3, [pc, #40] ; (80006ec ) + 80006c4: 4013 ands r3, r2 + 80006c6: 68f9 ldr r1, [r7, #12] + 80006c8: 68ba ldr r2, [r7, #8] + 80006ca: 4311 orrs r1, r2 + 80006cc: 687a ldr r2, [r7, #4] + 80006ce: 0212 lsls r2, r2, #8 + 80006d0: 4311 orrs r1, r2 + 80006d2: 683a ldr r2, [r7, #0] + 80006d4: 430a orrs r2, r1 + 80006d6: 4904 ldr r1, [pc, #16] ; (80006e8 ) + 80006d8: 4313 orrs r3, r2 + 80006da: 60cb str r3, [r1, #12] Source | PLLM | (PLLN << RCC_PLLCFGR_PLLN_Pos) | PLLR); } - 8000700: bf00 nop - 8000702: 3714 adds r7, #20 - 8000704: 46bd mov sp, r7 - 8000706: f85d 7b04 ldr.w r7, [sp], #4 - 800070a: 4770 bx lr - 800070c: 40021000 .word 0x40021000 - 8000710: f9ff808c .word 0xf9ff808c + 80006dc: bf00 nop + 80006de: 3714 adds r7, #20 + 80006e0: 46bd mov sp, r7 + 80006e2: f85d 7b04 ldr.w r7, [sp], #4 + 80006e6: 4770 bx lr + 80006e8: 40021000 .word 0x40021000 + 80006ec: f9ff808c .word 0xf9ff808c -08000714 : +080006f0 : * @brief Enable PLL output mapped on SYSCLK domain * @rmtoll PLLCFGR PLLREN LL_RCC_PLL_EnableDomain_SYS * @retval None */ __STATIC_INLINE void LL_RCC_PLL_EnableDomain_SYS(void) { - 8000714: b480 push {r7} - 8000716: af00 add r7, sp, #0 + 80006f0: b480 push {r7} + 80006f2: af00 add r7, sp, #0 SET_BIT(RCC->PLLCFGR, RCC_PLLCFGR_PLLREN); - 8000718: 4b05 ldr r3, [pc, #20] ; (8000730 ) - 800071a: 68db ldr r3, [r3, #12] - 800071c: 4a04 ldr r2, [pc, #16] ; (8000730 ) - 800071e: f043 7380 orr.w r3, r3, #16777216 ; 0x1000000 - 8000722: 60d3 str r3, [r2, #12] + 80006f4: 4b05 ldr r3, [pc, #20] ; (800070c ) + 80006f6: 68db ldr r3, [r3, #12] + 80006f8: 4a04 ldr r2, [pc, #16] ; (800070c ) + 80006fa: f043 7380 orr.w r3, r3, #16777216 ; 0x1000000 + 80006fe: 60d3 str r3, [r2, #12] } - 8000724: bf00 nop - 8000726: 46bd mov sp, r7 - 8000728: f85d 7b04 ldr.w r7, [sp], #4 - 800072c: 4770 bx lr - 800072e: bf00 nop - 8000730: 40021000 .word 0x40021000 + 8000700: bf00 nop + 8000702: 46bd mov sp, r7 + 8000704: f85d 7b04 ldr.w r7, [sp], #4 + 8000708: 4770 bx lr + 800070a: bf00 nop + 800070c: 40021000 .word 0x40021000 -08000734 : +08000710 : * * (*) value not defined in all devices. * @retval None */ __STATIC_INLINE void LL_APB1_GRP1_EnableClock(uint32_t Periphs) { - 8000734: b480 push {r7} - 8000736: b085 sub sp, #20 - 8000738: af00 add r7, sp, #0 - 800073a: 6078 str r0, [r7, #4] + 8000710: b480 push {r7} + 8000712: b085 sub sp, #20 + 8000714: af00 add r7, sp, #0 + 8000716: 6078 str r0, [r7, #4] __IO uint32_t tmpreg; SET_BIT(RCC->APB1ENR1, Periphs); - 800073c: 4b08 ldr r3, [pc, #32] ; (8000760 ) - 800073e: 6d9a ldr r2, [r3, #88] ; 0x58 - 8000740: 4907 ldr r1, [pc, #28] ; (8000760 ) - 8000742: 687b ldr r3, [r7, #4] - 8000744: 4313 orrs r3, r2 - 8000746: 658b str r3, [r1, #88] ; 0x58 + 8000718: 4b08 ldr r3, [pc, #32] ; (800073c ) + 800071a: 6d9a ldr r2, [r3, #88] ; 0x58 + 800071c: 4907 ldr r1, [pc, #28] ; (800073c ) + 800071e: 687b ldr r3, [r7, #4] + 8000720: 4313 orrs r3, r2 + 8000722: 658b str r3, [r1, #88] ; 0x58 /* Delay after an RCC peripheral clock enabling */ tmpreg = READ_BIT(RCC->APB1ENR1, Periphs); - 8000748: 4b05 ldr r3, [pc, #20] ; (8000760 ) - 800074a: 6d9a ldr r2, [r3, #88] ; 0x58 - 800074c: 687b ldr r3, [r7, #4] - 800074e: 4013 ands r3, r2 - 8000750: 60fb str r3, [r7, #12] + 8000724: 4b05 ldr r3, [pc, #20] ; (800073c ) + 8000726: 6d9a ldr r2, [r3, #88] ; 0x58 + 8000728: 687b ldr r3, [r7, #4] + 800072a: 4013 ands r3, r2 + 800072c: 60fb str r3, [r7, #12] (void)tmpreg; - 8000752: 68fb ldr r3, [r7, #12] + 800072e: 68fb ldr r3, [r7, #12] } - 8000754: bf00 nop - 8000756: 3714 adds r7, #20 - 8000758: 46bd mov sp, r7 - 800075a: f85d 7b04 ldr.w r7, [sp], #4 - 800075e: 4770 bx lr - 8000760: 40021000 .word 0x40021000 + 8000730: bf00 nop + 8000732: 3714 adds r7, #20 + 8000734: 46bd mov sp, r7 + 8000736: f85d 7b04 ldr.w r7, [sp], #4 + 800073a: 4770 bx lr + 800073c: 40021000 .word 0x40021000 -08000764 : +08000740 : * * (*) value not defined in all devices. * @retval None */ __STATIC_INLINE void LL_FLASH_SetLatency(uint32_t Latency) { - 8000764: b480 push {r7} - 8000766: b083 sub sp, #12 - 8000768: af00 add r7, sp, #0 - 800076a: 6078 str r0, [r7, #4] + 8000740: b480 push {r7} + 8000742: b083 sub sp, #12 + 8000744: af00 add r7, sp, #0 + 8000746: 6078 str r0, [r7, #4] MODIFY_REG(FLASH->ACR, FLASH_ACR_LATENCY, Latency); - 800076c: 4b06 ldr r3, [pc, #24] ; (8000788 ) - 800076e: 681b ldr r3, [r3, #0] - 8000770: f023 0207 bic.w r2, r3, #7 - 8000774: 4904 ldr r1, [pc, #16] ; (8000788 ) - 8000776: 687b ldr r3, [r7, #4] - 8000778: 4313 orrs r3, r2 - 800077a: 600b str r3, [r1, #0] + 8000748: 4b06 ldr r3, [pc, #24] ; (8000764 ) + 800074a: 681b ldr r3, [r3, #0] + 800074c: f023 0207 bic.w r2, r3, #7 + 8000750: 4904 ldr r1, [pc, #16] ; (8000764 ) + 8000752: 687b ldr r3, [r7, #4] + 8000754: 4313 orrs r3, r2 + 8000756: 600b str r3, [r1, #0] } - 800077c: bf00 nop - 800077e: 370c adds r7, #12 - 8000780: 46bd mov sp, r7 - 8000782: f85d 7b04 ldr.w r7, [sp], #4 - 8000786: 4770 bx lr - 8000788: 40022000 .word 0x40022000 + 8000758: bf00 nop + 800075a: 370c adds r7, #12 + 800075c: 46bd mov sp, r7 + 800075e: f85d 7b04 ldr.w r7, [sp], #4 + 8000762: 4770 bx lr + 8000764: 40022000 .word 0x40022000 -0800078c : +08000768 : * @arg @ref LL_FLASH_LATENCY_15 (*) * * (*) value not defined in all devices. */ __STATIC_INLINE uint32_t LL_FLASH_GetLatency(void) { - 800078c: b480 push {r7} - 800078e: af00 add r7, sp, #0 + 8000768: b480 push {r7} + 800076a: af00 add r7, sp, #0 return (uint32_t)(READ_BIT(FLASH->ACR, FLASH_ACR_LATENCY)); - 8000790: 4b04 ldr r3, [pc, #16] ; (80007a4 ) - 8000792: 681b ldr r3, [r3, #0] - 8000794: f003 0307 and.w r3, r3, #7 + 800076c: 4b04 ldr r3, [pc, #16] ; (8000780 ) + 800076e: 681b ldr r3, [r3, #0] + 8000770: f003 0307 and.w r3, r3, #7 } - 8000798: 4618 mov r0, r3 - 800079a: 46bd mov sp, r7 - 800079c: f85d 7b04 ldr.w r7, [sp], #4 - 80007a0: 4770 bx lr - 80007a2: bf00 nop - 80007a4: 40022000 .word 0x40022000 + 8000774: 4618 mov r0, r3 + 8000776: 46bd mov sp, r7 + 8000778: f85d 7b04 ldr.w r7, [sp], #4 + 800077c: 4770 bx lr + 800077e: bf00 nop + 8000780: 40022000 .word 0x40022000 -080007a8 : +08000784 : * @brief Enable SysTick exception request * @rmtoll STK_CTRL TICKINT LL_SYSTICK_EnableIT * @retval None */ __STATIC_INLINE void LL_SYSTICK_EnableIT(void) { - 80007a8: b480 push {r7} - 80007aa: af00 add r7, sp, #0 + 8000784: b480 push {r7} + 8000786: af00 add r7, sp, #0 SET_BIT(SysTick->CTRL, SysTick_CTRL_TICKINT_Msk); - 80007ac: 4b05 ldr r3, [pc, #20] ; (80007c4 ) - 80007ae: 681b ldr r3, [r3, #0] - 80007b0: 4a04 ldr r2, [pc, #16] ; (80007c4 ) - 80007b2: f043 0302 orr.w r3, r3, #2 - 80007b6: 6013 str r3, [r2, #0] + 8000788: 4b05 ldr r3, [pc, #20] ; (80007a0 ) + 800078a: 681b ldr r3, [r3, #0] + 800078c: 4a04 ldr r2, [pc, #16] ; (80007a0 ) + 800078e: f043 0302 orr.w r3, r3, #2 + 8000792: 6013 str r3, [r2, #0] } - 80007b8: bf00 nop - 80007ba: 46bd mov sp, r7 - 80007bc: f85d 7b04 ldr.w r7, [sp], #4 - 80007c0: 4770 bx lr - 80007c2: bf00 nop - 80007c4: e000e010 .word 0xe000e010 + 8000794: bf00 nop + 8000796: 46bd mov sp, r7 + 8000798: f85d 7b04 ldr.w r7, [sp], #4 + 800079c: 4770 bx lr + 800079e: bf00 nop + 80007a0: e000e010 .word 0xe000e010 -080007c8 : +080007a4 : * @brief Processor uses sleep as its low power mode * @rmtoll SCB_SCR SLEEPDEEP LL_LPM_EnableSleep * @retval None */ __STATIC_INLINE void LL_LPM_EnableSleep(void) { - 80007c8: b480 push {r7} - 80007ca: af00 add r7, sp, #0 + 80007a4: b480 push {r7} + 80007a6: af00 add r7, sp, #0 /* Clear SLEEPDEEP bit of Cortex System Control Register */ CLEAR_BIT(SCB->SCR, ((uint32_t)SCB_SCR_SLEEPDEEP_Msk)); - 80007cc: 4b05 ldr r3, [pc, #20] ; (80007e4 ) - 80007ce: 691b ldr r3, [r3, #16] - 80007d0: 4a04 ldr r2, [pc, #16] ; (80007e4 ) - 80007d2: f023 0304 bic.w r3, r3, #4 - 80007d6: 6113 str r3, [r2, #16] + 80007a8: 4b05 ldr r3, [pc, #20] ; (80007c0 ) + 80007aa: 691b ldr r3, [r3, #16] + 80007ac: 4a04 ldr r2, [pc, #16] ; (80007c0 ) + 80007ae: f023 0304 bic.w r3, r3, #4 + 80007b2: 6113 str r3, [r2, #16] } - 80007d8: bf00 nop - 80007da: 46bd mov sp, r7 - 80007dc: f85d 7b04 ldr.w r7, [sp], #4 - 80007e0: 4770 bx lr - 80007e2: bf00 nop - 80007e4: e000ed00 .word 0xe000ed00 + 80007b4: bf00 nop + 80007b6: 46bd mov sp, r7 + 80007b8: f85d 7b04 ldr.w r7, [sp], #4 + 80007bc: 4770 bx lr + 80007be: bf00 nop + 80007c0: e000ed00 .word 0xe000ed00 -080007e8 : +080007c4 : * @arg @ref LL_PWR_REGU_VOLTAGE_SCALE1 * @arg @ref LL_PWR_REGU_VOLTAGE_SCALE2 * @retval None */ __STATIC_INLINE void LL_PWR_SetRegulVoltageScaling(uint32_t VoltageScaling) { - 80007e8: b480 push {r7} - 80007ea: b083 sub sp, #12 - 80007ec: af00 add r7, sp, #0 - 80007ee: 6078 str r0, [r7, #4] + 80007c4: b480 push {r7} + 80007c6: b083 sub sp, #12 + 80007c8: af00 add r7, sp, #0 + 80007ca: 6078 str r0, [r7, #4] MODIFY_REG(PWR->CR1, PWR_CR1_VOS, VoltageScaling); - 80007f0: 4b06 ldr r3, [pc, #24] ; (800080c ) - 80007f2: 681b ldr r3, [r3, #0] - 80007f4: f423 62c0 bic.w r2, r3, #1536 ; 0x600 - 80007f8: 4904 ldr r1, [pc, #16] ; (800080c ) - 80007fa: 687b ldr r3, [r7, #4] - 80007fc: 4313 orrs r3, r2 - 80007fe: 600b str r3, [r1, #0] + 80007cc: 4b06 ldr r3, [pc, #24] ; (80007e8 ) + 80007ce: 681b ldr r3, [r3, #0] + 80007d0: f423 62c0 bic.w r2, r3, #1536 ; 0x600 + 80007d4: 4904 ldr r1, [pc, #16] ; (80007e8 ) + 80007d6: 687b ldr r3, [r7, #4] + 80007d8: 4313 orrs r3, r2 + 80007da: 600b str r3, [r1, #0] } - 8000800: bf00 nop - 8000802: 370c adds r7, #12 - 8000804: 46bd mov sp, r7 - 8000806: f85d 7b04 ldr.w r7, [sp], #4 - 800080a: 4770 bx lr - 800080c: 40007000 .word 0x40007000 + 80007dc: bf00 nop + 80007de: 370c adds r7, #12 + 80007e0: 46bd mov sp, r7 + 80007e2: f85d 7b04 ldr.w r7, [sp], #4 + 80007e6: 4770 bx lr + 80007e8: 40007000 .word 0x40007000 -08000810 : +080007ec : * @brief Enable access to the backup domain * @rmtoll CR1 DBP LL_PWR_EnableBkUpAccess * @retval None */ __STATIC_INLINE void LL_PWR_EnableBkUpAccess(void) { - 8000810: b480 push {r7} - 8000812: af00 add r7, sp, #0 + 80007ec: b480 push {r7} + 80007ee: af00 add r7, sp, #0 SET_BIT(PWR->CR1, PWR_CR1_DBP); - 8000814: 4b05 ldr r3, [pc, #20] ; (800082c ) - 8000816: 681b ldr r3, [r3, #0] - 8000818: 4a04 ldr r2, [pc, #16] ; (800082c ) - 800081a: f443 7380 orr.w r3, r3, #256 ; 0x100 - 800081e: 6013 str r3, [r2, #0] + 80007f0: 4b05 ldr r3, [pc, #20] ; (8000808 ) + 80007f2: 681b ldr r3, [r3, #0] + 80007f4: 4a04 ldr r2, [pc, #16] ; (8000808 ) + 80007f6: f443 7380 orr.w r3, r3, #256 ; 0x100 + 80007fa: 6013 str r3, [r2, #0] } - 8000820: bf00 nop - 8000822: 46bd mov sp, r7 - 8000824: f85d 7b04 ldr.w r7, [sp], #4 - 8000828: 4770 bx lr - 800082a: bf00 nop - 800082c: 40007000 .word 0x40007000 + 80007fc: bf00 nop + 80007fe: 46bd mov sp, r7 + 8000800: f85d 7b04 ldr.w r7, [sp], #4 + 8000804: 4770 bx lr + 8000806: bf00 nop + 8000808: 40007000 .word 0x40007000 -08000830 : +0800080c : + * @brief Disable access to the backup domain + * @rmtoll CR1 DBP LL_PWR_DisableBkUpAccess + * @retval None + */ +__STATIC_INLINE void LL_PWR_DisableBkUpAccess(void) +{ + 800080c: b480 push {r7} + 800080e: af00 add r7, sp, #0 + CLEAR_BIT(PWR->CR1, PWR_CR1_DBP); + 8000810: 4b05 ldr r3, [pc, #20] ; (8000828 ) + 8000812: 681b ldr r3, [r3, #0] + 8000814: 4a04 ldr r2, [pc, #16] ; (8000828 ) + 8000816: f423 7380 bic.w r3, r3, #256 ; 0x100 + 800081a: 6013 str r3, [r2, #0] +} + 800081c: bf00 nop + 800081e: 46bd mov sp, r7 + 8000820: f85d 7b04 ldr.w r7, [sp], #4 + 8000824: 4770 bx lr + 8000826: bf00 nop + 8000828: 40007000 .word 0x40007000 + +0800082c : volatile uint32_t msTicks = 0; -volatile uint8_t expe = 2; +volatile uint8_t expe = 0; volatile uint8_t blue_mode = 0; void SysTick_Handler() { - 8000830: b580 push {r7, lr} - 8000832: af00 add r7, sp, #0 - if ( BLUE_BUTTON() ){ - 8000834: f7ff fdc6 bl 80003c4 - 8000838: 4603 mov r3, r0 - 800083a: 2b00 cmp r3, #0 - 800083c: d002 beq.n 8000844 - blue_mode = 1 ; - 800083e: 4b15 ldr r3, [pc, #84] ; (8000894 ) - 8000840: 2201 movs r2, #1 - 8000842: 701a strb r2, [r3, #0] - } + 800082c: b580 push {r7, lr} + 800082e: af00 add r7, sp, #0 + if ( BLUE_BUTTON() ){ + 8000830: f7ff fdc8 bl 80003c4 + 8000834: 4603 mov r3, r0 + 8000836: 2b00 cmp r3, #0 + 8000838: d002 beq.n 8000840 + blue_mode = 1 ; + 800083a: 4b18 ldr r3, [pc, #96] ; (800089c ) + 800083c: 2201 movs r2, #1 + 800083e: 701a strb r2, [r3, #0] + } - msTicks++; /* See startup file startup_LPC17xx.s for SysTick vector */ - 8000844: 4b14 ldr r3, [pc, #80] ; (8000898 ) - 8000846: 681b ldr r3, [r3, #0] - 8000848: 3301 adds r3, #1 - 800084a: 4a13 ldr r2, [pc, #76] ; (8000898 ) - 800084c: 6013 str r3, [r2, #0] - if (msTicks == 5 * expe){ - 800084e: 4b13 ldr r3, [pc, #76] ; (800089c ) - 8000850: 781b ldrb r3, [r3, #0] - 8000852: b2db uxtb r3, r3 - 8000854: 461a mov r2, r3 - 8000856: 4613 mov r3, r2 - 8000858: 009b lsls r3, r3, #2 - 800085a: 4413 add r3, r2 - 800085c: 461a mov r2, r3 - 800085e: 4b0e ldr r3, [pc, #56] ; (8000898 ) - 8000860: 681b ldr r3, [r3, #0] - 8000862: 429a cmp r2, r3 - 8000864: d103 bne.n 800086e - LED_GREEN(0); - 8000866: 2000 movs r0, #0 - 8000868: f7ff fd96 bl 8000398 - 800086c: e009 b.n 8000882 - }else if(msTicks >= 200){ - 800086e: 4b0a ldr r3, [pc, #40] ; (8000898 ) - 8000870: 681b ldr r3, [r3, #0] - 8000872: 2bc7 cmp r3, #199 ; 0xc7 - 8000874: d905 bls.n 8000882 - msTicks = 0; - 8000876: 4b08 ldr r3, [pc, #32] ; (8000898 ) - 8000878: 2200 movs r2, #0 - 800087a: 601a str r2, [r3, #0] - LED_GREEN(1); - 800087c: 2001 movs r0, #1 - 800087e: f7ff fd8b bl 8000398 - } - if(expe == 2){ - 8000882: 4b06 ldr r3, [pc, #24] ; (800089c ) - 8000884: 781b ldrb r3, [r3, #0] - 8000886: b2db uxtb r3, r3 - 8000888: 2b02 cmp r3, #2 - 800088a: d101 bne.n 8000890 - CLK_TOGGLE(); - 800088c: f7ff fd78 bl 8000380 - } + msTicks++; /* See startup file startup_LPC17xx.s for SysTick vector */ + 8000840: 4b17 ldr r3, [pc, #92] ; (80008a0 ) + 8000842: 681b ldr r3, [r3, #0] + 8000844: 3301 adds r3, #1 + 8000846: 4a16 ldr r2, [pc, #88] ; (80008a0 ) + 8000848: 6013 str r3, [r2, #0] + if (msTicks == 5 * expe){ + 800084a: 4b16 ldr r3, [pc, #88] ; (80008a4 ) + 800084c: 781b ldrb r3, [r3, #0] + 800084e: b2db uxtb r3, r3 + 8000850: 461a mov r2, r3 + 8000852: 4613 mov r3, r2 + 8000854: 009b lsls r3, r3, #2 + 8000856: 4413 add r3, r2 + 8000858: 461a mov r2, r3 + 800085a: 4b11 ldr r3, [pc, #68] ; (80008a0 ) + 800085c: 681b ldr r3, [r3, #0] + 800085e: 429a cmp r2, r3 + 8000860: d103 bne.n 800086a + LED_GREEN(0); + 8000862: 2000 movs r0, #0 + 8000864: f7ff fd98 bl 8000398 + 8000868: e009 b.n 800087e + }else if(msTicks >= 200){ + 800086a: 4b0d ldr r3, [pc, #52] ; (80008a0 ) + 800086c: 681b ldr r3, [r3, #0] + 800086e: 2bc7 cmp r3, #199 ; 0xc7 + 8000870: d905 bls.n 800087e + msTicks = 0; + 8000872: 4b0b ldr r3, [pc, #44] ; (80008a0 ) + 8000874: 2200 movs r2, #0 + 8000876: 601a str r2, [r3, #0] + LED_GREEN(1); + 8000878: 2001 movs r0, #1 + 800087a: f7ff fd8d bl 8000398 + } + if(expe == 2 || expe == 4){ + 800087e: 4b09 ldr r3, [pc, #36] ; (80008a4 ) + 8000880: 781b ldrb r3, [r3, #0] + 8000882: b2db uxtb r3, r3 + 8000884: 2b02 cmp r3, #2 + 8000886: d004 beq.n 8000892 + 8000888: 4b06 ldr r3, [pc, #24] ; (80008a4 ) + 800088a: 781b ldrb r3, [r3, #0] + 800088c: b2db uxtb r3, r3 + 800088e: 2b04 cmp r3, #4 + 8000890: d101 bne.n 8000896 + CLK_TOGGLE(); + 8000892: f7ff fd75 bl 8000380 + } } - 8000890: bf00 nop - 8000892: bd80 pop {r7, pc} - 8000894: 20000030 .word 0x20000030 - 8000898: 2000002c .word 0x2000002c - 800089c: 20000000 .word 0x20000000 + 8000896: bf00 nop + 8000898: bd80 pop {r7, pc} + 800089a: bf00 nop + 800089c: 2000002d .word 0x2000002d + 80008a0: 20000028 .word 0x20000028 + 80008a4: 2000002c .word 0x2000002c -080008a0
: +080008a8
: int main(void) { - 80008a0: b580 push {r7, lr} - 80008a2: af00 add r7, sp, #0 -// LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR ); -// LL_PWR_EnableBkUpAccess(); -// RTC->BKP0R = expe; + 80008a8: b580 push {r7, lr} + 80008aa: af00 add r7, sp, #0 + + + // config GPIO + GPIO_init(); + 80008ac: f7ff fd44 bl 8000338 + +// if (RCC->BDCR & RCC_BDCR_LSEON) { + LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR ); + 80008b0: f04f 5080 mov.w r0, #268435456 ; 0x10000000 + 80008b4: f7ff ff2c bl 8000710 + LL_PWR_EnableBkUpAccess(); + 80008b8: f7ff ff98 bl 80007ec + + //expe = register RTC + expe = RTC->BKP0R; + 80008bc: 4b35 ldr r3, [pc, #212] ; (8000994 ) + 80008be: 6d1b ldr r3, [r3, #80] ; 0x50 + 80008c0: b2da uxtb r2, r3 + 80008c2: 4b35 ldr r3, [pc, #212] ; (8000998 ) + 80008c4: 701a strb r2, [r3, #0] + if (expe == 0) { + 80008c6: 4b34 ldr r3, [pc, #208] ; (8000998 ) + 80008c8: 781b ldrb r3, [r3, #0] + 80008ca: b2db uxtb r3, r3 + 80008cc: 2b00 cmp r3, #0 + 80008ce: d10f bne.n 80008f0 + SystemClock_Config_24M_LSE(); + 80008d0: f000 f8ce bl 8000a70 + expe = 1; + 80008d4: 4b30 ldr r3, [pc, #192] ; (8000998 ) + 80008d6: 2201 movs r2, #1 + 80008d8: 701a strb r2, [r3, #0] + LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR ); + 80008da: f04f 5080 mov.w r0, #268435456 ; 0x10000000 + 80008de: f7ff ff17 bl 8000710 + LL_PWR_EnableBkUpAccess(); + 80008e2: f7ff ff83 bl 80007ec + RTC->BKP0R = expe; + 80008e6: 4b2c ldr r3, [pc, #176] ; (8000998 ) + 80008e8: 781b ldrb r3, [r3, #0] + 80008ea: b2da uxtb r2, r3 + 80008ec: 4b29 ldr r3, [pc, #164] ; (8000994 ) + 80008ee: 651a str r2, [r3, #80] ; 0x50 + } + + if (BLUE_BUTTON()){ + 80008f0: f7ff fd68 bl 80003c4 + 80008f4: 4603 mov r3, r0 + 80008f6: 2b00 cmp r3, #0 + 80008f8: d013 beq.n 8000922 + + expe ++; + 80008fa: 4b27 ldr r3, [pc, #156] ; (8000998 ) + 80008fc: 781b ldrb r3, [r3, #0] + 80008fe: b2db uxtb r3, r3 + 8000900: 3301 adds r3, #1 + 8000902: b2da uxtb r2, r3 + 8000904: 4b24 ldr r3, [pc, #144] ; (8000998 ) + 8000906: 701a strb r2, [r3, #0] + + if (expe > 4) expe = 1; + 8000908: 4b23 ldr r3, [pc, #140] ; (8000998 ) + 800090a: 781b ldrb r3, [r3, #0] + 800090c: b2db uxtb r3, r3 + 800090e: 2b04 cmp r3, #4 + 8000910: d902 bls.n 8000918 + 8000912: 4b21 ldr r3, [pc, #132] ; (8000998 ) + 8000914: 2201 movs r2, #1 + 8000916: 701a strb r2, [r3, #0] + RTC->BKP0R = expe; + 8000918: 4b1f ldr r3, [pc, #124] ; (8000998 ) + 800091a: 781b ldrb r3, [r3, #0] + 800091c: b2da uxtb r2, r3 + 800091e: 4b1d ldr r3, [pc, #116] ; (8000994 ) + 8000920: 651a str r2, [r3, #80] ; 0x50 + } +// }else{ + // } -// LL_PWR_DisableBkUpAccess(); + LL_PWR_DisableBkUpAccess(); + 8000922: f7ff ff73 bl 800080c switch(expe){ - 80008a4: 4b15 ldr r3, [pc, #84] ; (80008fc ) - 80008a6: 781b ldrb r3, [r3, #0] - 80008a8: b2db uxtb r3, r3 - 80008aa: 2b01 cmp r3, #1 - 80008ac: d002 beq.n 80008b4 - 80008ae: 2b02 cmp r3, #2 - 80008b0: d003 beq.n 80008ba - 80008b2: e005 b.n 80008c0 + 8000926: 4b1c ldr r3, [pc, #112] ; (8000998 ) + 8000928: 781b ldrb r3, [r3, #0] + 800092a: b2db uxtb r3, r3 + 800092c: 2b01 cmp r3, #1 + 800092e: d002 beq.n 8000936 + 8000930: 2b02 cmp r3, #2 + 8000932: d003 beq.n 800093c + 8000934: e005 b.n 8000942 + case 1: + /* Configure the system clock */ + SystemClock_Config_80M(); + 8000936: f000 f901 bl 8000b3c + break; + 800093a: e005 b.n 8000948 + case 2: + /* Configure the system clock */ + SystemClock_Config_24M_LSE(); + 800093c: f000 f898 bl 8000a70 + break; + 8000940: e002 b.n 8000948 + default: //case 3 to 8 + SystemClock_Config_24M_LSE_FL3_VS2(); + 8000942: f000 f82f bl 80009a4 + break; + 8000946: bf00 nop + } + + + // init systick timer (tick period at 1 ms) + LL_Init1msTick( SystemCoreClock ); + 8000948: 4b14 ldr r3, [pc, #80] ; (800099c ) + 800094a: 681b ldr r3, [r3, #0] + 800094c: 4618 mov r0, r3 + 800094e: f000 fad5 bl 8000efc + LL_SYSTICK_EnableIT(); + 8000952: f7ff ff17 bl 8000784 + + //Setup Sleep mode + LL_LPM_EnableSleep(); + 8000956: f7ff ff25 bl 80007a4 + //LL_LPM_EnableSleepOnExit(); + + while (1) { + if (blue_mode){ + 800095a: 4b11 ldr r3, [pc, #68] ; (80009a0 ) + 800095c: 781b ldrb r3, [r3, #0] + 800095e: b2db uxtb r3, r3 + 8000960: 2b00 cmp r3, #0 + 8000962: d0fa beq.n 800095a + switch(expe){ + 8000964: 4b0c ldr r3, [pc, #48] ; (8000998 ) + 8000966: 781b ldrb r3, [r3, #0] + 8000968: b2db uxtb r3, r3 + 800096a: 3b01 subs r3, #1 + 800096c: 2b03 cmp r3, #3 + 800096e: d8f4 bhi.n 800095a + 8000970: a201 add r2, pc, #4 ; (adr r2, 8000978 ) + 8000972: f852 f023 ldr.w pc, [r2, r3, lsl #2] + 8000976: bf00 nop + 8000978: 08000989 .word 0x08000989 + 800097c: 0800098d .word 0x0800098d + 8000980: 08000989 .word 0x08000989 + 8000984: 0800098d .word 0x0800098d case 1: - /* Configure the system clock */ - SystemClock_Config_80M(); - 80008b4: f000 f890 bl 80009d8 + case 3: + __WFI(); + 8000988: bf30 wfi break; - 80008b8: e002 b.n 80008c0 + 800098a: e002 b.n 8000992 + case 2: - /* Configure the system clock */ - SystemClock_Config_24M_LSE(); - 80008ba: f000 f825 bl 8000908 + case 4: + LL_RCC_MSI_EnablePLLMode(); + 800098c: f7ff fd8a bl 80004a4 break; - 80008be: bf00 nop + 8000990: bf00 nop + if (blue_mode){ + 8000992: e7e2 b.n 800095a + 8000994: 40002800 .word 0x40002800 + 8000998: 2000002c .word 0x2000002c + 800099c: 20000000 .word 0x20000000 + 80009a0: 2000002d .word 0x2000002d +080009a4 : - - -// config GPIO -GPIO_init(); - 80008c0: f7ff fd3a bl 8000338 - -// init systick timer (tick period at 1 ms) -LL_Init1msTick( SystemCoreClock ); - 80008c4: 4b0e ldr r3, [pc, #56] ; (8000900 ) - 80008c6: 681b ldr r3, [r3, #0] - 80008c8: 4618 mov r0, r3 - 80008ca: f000 fa65 bl 8000d98 -LL_SYSTICK_EnableIT(); - 80008ce: f7ff ff6b bl 80007a8 - -//Setup Sleep mode -LL_LPM_EnableSleep(); - 80008d2: f7ff ff79 bl 80007c8 -//LL_LPM_EnableSleepOnExit(); - -while (1) { - if (blue_mode){ - 80008d6: 4b0b ldr r3, [pc, #44] ; (8000904 ) - 80008d8: 781b ldrb r3, [r3, #0] - 80008da: b2db uxtb r3, r3 - 80008dc: 2b00 cmp r3, #0 - 80008de: d0fa beq.n 80008d6 - switch(expe){ - 80008e0: 4b06 ldr r3, [pc, #24] ; (80008fc ) - 80008e2: 781b ldrb r3, [r3, #0] - 80008e4: b2db uxtb r3, r3 - 80008e6: 2b01 cmp r3, #1 - 80008e8: d002 beq.n 80008f0 - 80008ea: 2b02 cmp r3, #2 - 80008ec: d002 beq.n 80008f4 - 80008ee: e004 b.n 80008fa - case 1: - __WFI(); - 80008f0: bf30 wfi - break; - 80008f2: e002 b.n 80008fa - case 2: - LL_RCC_MSI_EnablePLLMode(); - 80008f4: f7ff fdd6 bl 80004a4 - break; - 80008f8: bf00 nop - if (blue_mode){ - 80008fa: e7ec b.n 80008d6 - 80008fc: 20000000 .word 0x20000000 - 8000900: 20000004 .word 0x20000004 - 8000904: 20000030 .word 0x20000030 - -08000908 : - * @brief System Clock Configuration - * @retval None - * 24Mhz + RTC + LSE - */ -void SystemClock_Config_24M_LSE(void) -{ - 8000908: b580 push {r7, lr} - 800090a: af00 add r7, sp, #0 - LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR ); - 800090c: f04f 5080 mov.w r0, #268435456 ; 0x10000000 - 8000910: f7ff ff10 bl 8000734 - LL_FLASH_SetLatency(LL_FLASH_LATENCY_1); - 8000914: 2001 movs r0, #1 - 8000916: f7ff ff25 bl 8000764 - while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_1) - 800091a: bf00 nop - 800091c: f7ff ff36 bl 800078c - 8000920: 4603 mov r3, r0 - 8000922: 2b01 cmp r3, #1 - 8000924: d1fa bne.n 800091c - { - } - LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1); - 8000926: f44f 7000 mov.w r0, #512 ; 0x200 - 800092a: f7ff ff5d bl 80007e8 - LL_RCC_MSI_Enable(); - 800092e: f7ff fd97 bl 8000460 - - /* Wait till MSI is ready */ - while(LL_RCC_MSI_IsReady() != 1) - 8000932: bf00 nop - 8000934: f7ff fda4 bl 8000480 - 8000938: 4603 mov r3, r0 - 800093a: 2b01 cmp r3, #1 - 800093c: d1fa bne.n 8000934 - { - - } - - LL_PWR_EnableBkUpAccess(); - 800093e: f7ff ff67 bl 8000810 - LL_RCC_ForceBackupDomainReset(); - 8000942: f7ff fe7f bl 8000644 - LL_RCC_ReleaseBackupDomainReset(); - 8000946: f7ff fe8f bl 8000668 - LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW); - 800094a: 2000 movs r0, #0 - 800094c: f7ff fd5e bl 800040c - - LL_RCC_MSI_EnableRangeSelection(); - 8000950: f7ff fdb8 bl 80004c4 - LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6); - 8000954: 2060 movs r0, #96 ; 0x60 - 8000956: f7ff fdc5 bl 80004e4 - LL_RCC_MSI_SetCalibTrimming(0); - 800095a: 2000 movs r0, #0 - 800095c: f7ff fdd6 bl 800050c -// LL_RCC_MSI_EnablePLLMode(); - - LL_RCC_LSE_Enable(); - 8000960: f7ff fd42 bl 80003e8 - - /* Wait till LSE is ready */ - while(LL_RCC_LSE_IsReady() != 1) - 8000964: bf00 nop - 8000966: f7ff fd67 bl 8000438 - 800096a: 4603 mov r3, r0 - 800096c: 2b01 cmp r3, #1 - 800096e: d1fa bne.n 8000966 - { - - } - LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE); - 8000970: f44f 7080 mov.w r0, #256 ; 0x100 - 8000974: f7ff fe3e bl 80005f4 - LL_RCC_EnableRTC(); - 8000978: f7ff fe52 bl 8000620 - - LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4); - 800097c: f04f 7300 mov.w r3, #33554432 ; 0x2000000 - 8000980: 2218 movs r2, #24 - 8000982: 2100 movs r1, #0 - 8000984: 2001 movs r0, #1 - 8000986: f7ff fea5 bl 80006d4 - LL_RCC_PLL_EnableDomain_SYS(); - 800098a: f7ff fec3 bl 8000714 - LL_RCC_PLL_Enable(); - 800098e: f7ff fe7d bl 800068c - - /* Wait till PLL is ready */ - while(LL_RCC_PLL_IsReady() != 1) - 8000992: bf00 nop - 8000994: f7ff fe8a bl 80006ac - 8000998: 4603 mov r3, r0 - 800099a: 2b01 cmp r3, #1 - 800099c: d1fa bne.n 8000994 - { - - } - LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL); - 800099e: 2003 movs r0, #3 - 80009a0: f7ff fdca bl 8000538 - - /* Wait till System clock is ready */ - while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL) - 80009a4: bf00 nop - 80009a6: f7ff fddb bl 8000560 - 80009aa: 4603 mov r3, r0 - 80009ac: 2b0c cmp r3, #12 - 80009ae: d1fa bne.n 80009a6 - { - - } - LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1); - 80009b0: 2000 movs r0, #0 - 80009b2: f7ff fde3 bl 800057c - LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1); - 80009b6: 2000 movs r0, #0 - 80009b8: f7ff fdf4 bl 80005a4 - LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1); - 80009bc: 2000 movs r0, #0 - 80009be: f7ff fe05 bl 80005cc - LL_SetSystemCoreClock(24000000); - 80009c2: 4804 ldr r0, [pc, #16] ; (80009d4 ) - 80009c4: f000 f9f4 bl 8000db0 - - /* Update the time base */ - if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK) - 80009c8: 2000 movs r0, #0 - 80009ca: f000 f8d9 bl 8000b80 - { -// Error_Handler(); - } + } + } } + +void SystemClock_Config_24M_LSE_FL3_VS2(void){ + 80009a4: b580 push {r7, lr} + 80009a6: af00 add r7, sp, #0 + LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR ); + 80009a8: f04f 5080 mov.w r0, #268435456 ; 0x10000000 + 80009ac: f7ff feb0 bl 8000710 + LL_FLASH_SetLatency(LL_FLASH_LATENCY_3); + 80009b0: 2003 movs r0, #3 + 80009b2: f7ff fec5 bl 8000740 + while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_3) + 80009b6: bf00 nop + 80009b8: f7ff fed6 bl 8000768 + 80009bc: 4603 mov r3, r0 + 80009be: 2b03 cmp r3, #3 + 80009c0: d1fa bne.n 80009b8 + { + } + LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE2); + 80009c2: f44f 6080 mov.w r0, #1024 ; 0x400 + 80009c6: f7ff fefd bl 80007c4 + LL_RCC_MSI_Enable(); + 80009ca: f7ff fd49 bl 8000460 + + /* Wait till MSI is ready */ + while(LL_RCC_MSI_IsReady() != 1) 80009ce: bf00 nop - 80009d0: bd80 pop {r7, pc} - 80009d2: bf00 nop - 80009d4: 016e3600 .word 0x016e3600 + 80009d0: f7ff fd56 bl 8000480 + 80009d4: 4603 mov r3, r0 + 80009d6: 2b01 cmp r3, #1 + 80009d8: d1fa bne.n 80009d0 + { -080009d8 : + } + LL_PWR_EnableBkUpAccess(); + 80009da: f7ff ff07 bl 80007ec +// LL_RCC_ForceBackupDomainReset(); + LL_RCC_ReleaseBackupDomainReset(); + 80009de: f7ff fe31 bl 8000644 + LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW); + 80009e2: 2000 movs r0, #0 + 80009e4: f7ff fd12 bl 800040c -void SystemClock_Config_80M(void) -{ - 80009d8: b580 push {r7, lr} - 80009da: af00 add r7, sp, #0 - LL_FLASH_SetLatency(LL_FLASH_LATENCY_4); - 80009dc: 2004 movs r0, #4 - 80009de: f7ff fec1 bl 8000764 - while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_4) - 80009e2: bf00 nop - 80009e4: f7ff fed2 bl 800078c - 80009e8: 4603 mov r3, r0 - 80009ea: 2b04 cmp r3, #4 - 80009ec: d1fa bne.n 80009e4 - { - } - LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1); - 80009ee: f44f 7000 mov.w r0, #512 ; 0x200 - 80009f2: f7ff fef9 bl 80007e8 - LL_RCC_MSI_Enable(); - 80009f6: f7ff fd33 bl 8000460 + LL_RCC_MSI_EnableRangeSelection(); + 80009e8: f7ff fd6c bl 80004c4 + LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6); + 80009ec: 2060 movs r0, #96 ; 0x60 + 80009ee: f7ff fd79 bl 80004e4 + LL_RCC_MSI_SetCalibTrimming(0); + 80009f2: 2000 movs r0, #0 + 80009f4: f7ff fd8a bl 800050c + // LL_RCC_MSI_EnablePLLMode(); - /* Wait till MSI is ready */ - while(LL_RCC_MSI_IsReady() != 1) - 80009fa: bf00 nop - 80009fc: f7ff fd40 bl 8000480 - 8000a00: 4603 mov r3, r0 - 8000a02: 2b01 cmp r3, #1 - 8000a04: d1fa bne.n 80009fc - { + LL_RCC_LSE_Enable(); + 80009f8: f7ff fcf6 bl 80003e8 - } - LL_RCC_MSI_EnableRangeSelection(); - 8000a06: f7ff fd5d bl 80004c4 - LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6); - 8000a0a: 2060 movs r0, #96 ; 0x60 - 8000a0c: f7ff fd6a bl 80004e4 - LL_RCC_MSI_SetCalibTrimming(0); - 8000a10: 2000 movs r0, #0 - 8000a12: f7ff fd7b bl 800050c - LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 40, LL_RCC_PLLR_DIV_2); - 8000a16: 2300 movs r3, #0 - 8000a18: 2228 movs r2, #40 ; 0x28 + /* Wait till LSE is ready */ + while(LL_RCC_LSE_IsReady() != 1) + 80009fc: bf00 nop + 80009fe: f7ff fd1b bl 8000438 + 8000a02: 4603 mov r3, r0 + 8000a04: 2b01 cmp r3, #1 + 8000a06: d1fa bne.n 80009fe + { + + } + LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE); + 8000a08: f44f 7080 mov.w r0, #256 ; 0x100 + 8000a0c: f7ff fdf2 bl 80005f4 + LL_RCC_EnableRTC(); + 8000a10: f7ff fe06 bl 8000620 + + LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4); + 8000a14: f04f 7300 mov.w r3, #33554432 ; 0x2000000 + 8000a18: 2218 movs r2, #24 8000a1a: 2100 movs r1, #0 8000a1c: 2001 movs r0, #1 - 8000a1e: f7ff fe59 bl 80006d4 - LL_RCC_PLL_EnableDomain_SYS(); - 8000a22: f7ff fe77 bl 8000714 - LL_RCC_PLL_Enable(); - 8000a26: f7ff fe31 bl 800068c + 8000a1e: f7ff fe47 bl 80006b0 + LL_RCC_PLL_EnableDomain_SYS(); + 8000a22: f7ff fe65 bl 80006f0 + LL_RCC_PLL_Enable(); + 8000a26: f7ff fe1f bl 8000668 - /* Wait till PLL is ready */ - while(LL_RCC_PLL_IsReady() != 1) + /* Wait till PLL is ready */ + while(LL_RCC_PLL_IsReady() != 1) 8000a2a: bf00 nop - 8000a2c: f7ff fe3e bl 80006ac + 8000a2c: f7ff fe2c bl 8000688 8000a30: 4603 mov r3, r0 8000a32: 2b01 cmp r3, #1 - 8000a34: d1fa bne.n 8000a2c - { + 8000a34: d1fa bne.n 8000a2c + { - } - LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL); + } + LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL); 8000a36: 2003 movs r0, #3 8000a38: f7ff fd7e bl 8000538 - /* Wait till System clock is ready */ - while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL) + /* Wait till System clock is ready */ + while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL) 8000a3c: bf00 nop 8000a3e: f7ff fd8f bl 8000560 8000a42: 4603 mov r3, r0 8000a44: 2b0c cmp r3, #12 - 8000a46: d1fa bne.n 8000a3e - { + 8000a46: d1fa bne.n 8000a3e + { - } - LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1); + } + LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1); 8000a48: 2000 movs r0, #0 8000a4a: f7ff fd97 bl 800057c - LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1); + LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1); 8000a4e: 2000 movs r0, #0 8000a50: f7ff fda8 bl 80005a4 - LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1); + LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1); 8000a54: 2000 movs r0, #0 8000a56: f7ff fdb9 bl 80005cc - LL_SetSystemCoreClock(80000000); - 8000a5a: 4804 ldr r0, [pc, #16] ; (8000a6c ) - 8000a5c: f000 f9a8 bl 8000db0 + LL_SetSystemCoreClock(24000000); + 8000a5a: 4804 ldr r0, [pc, #16] ; (8000a6c ) + 8000a5c: f000 fa5a bl 8000f14 - /* Update the time base */ - if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK) + /* Update the time base */ + if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK) 8000a60: 2000 movs r0, #0 - 8000a62: f000 f88d bl 8000b80 - { -// Error_Handler(); - } + 8000a62: f000 f93f bl 8000ce4 + { + // Error_Handler(); + } } 8000a66: bf00 nop 8000a68: bd80 pop {r7, pc} 8000a6a: bf00 nop - 8000a6c: 04c4b400 .word 0x04c4b400 + 8000a6c: 016e3600 .word 0x016e3600 -08000a70 : +08000a70 : + * @brief System Clock Configuration + * @retval None + * 24Mhz + RTC + LSE + */ +void SystemClock_Config_24M_LSE(void) +{ + 8000a70: b580 push {r7, lr} + 8000a72: af00 add r7, sp, #0 + LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR ); + 8000a74: f04f 5080 mov.w r0, #268435456 ; 0x10000000 + 8000a78: f7ff fe4a bl 8000710 + LL_FLASH_SetLatency(LL_FLASH_LATENCY_1); + 8000a7c: 2001 movs r0, #1 + 8000a7e: f7ff fe5f bl 8000740 + while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_1) + 8000a82: bf00 nop + 8000a84: f7ff fe70 bl 8000768 + 8000a88: 4603 mov r3, r0 + 8000a8a: 2b01 cmp r3, #1 + 8000a8c: d1fa bne.n 8000a84 + { + } + LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1); + 8000a8e: f44f 7000 mov.w r0, #512 ; 0x200 + 8000a92: f7ff fe97 bl 80007c4 + LL_RCC_MSI_Enable(); + 8000a96: f7ff fce3 bl 8000460 + + /* Wait till MSI is ready */ + while(LL_RCC_MSI_IsReady() != 1) + 8000a9a: bf00 nop + 8000a9c: f7ff fcf0 bl 8000480 + 8000aa0: 4603 mov r3, r0 + 8000aa2: 2b01 cmp r3, #1 + 8000aa4: d1fa bne.n 8000a9c + { + + } + + LL_PWR_EnableBkUpAccess(); + 8000aa6: f7ff fea1 bl 80007ec +// LL_RCC_ForceBackupDomainReset(); + LL_RCC_ReleaseBackupDomainReset(); + 8000aaa: f7ff fdcb bl 8000644 + LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW); + 8000aae: 2000 movs r0, #0 + 8000ab0: f7ff fcac bl 800040c + + LL_RCC_MSI_EnableRangeSelection(); + 8000ab4: f7ff fd06 bl 80004c4 + LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6); + 8000ab8: 2060 movs r0, #96 ; 0x60 + 8000aba: f7ff fd13 bl 80004e4 + LL_RCC_MSI_SetCalibTrimming(0); + 8000abe: 2000 movs r0, #0 + 8000ac0: f7ff fd24 bl 800050c + // LL_RCC_MSI_EnablePLLMode(); + + LL_RCC_LSE_Enable(); + 8000ac4: f7ff fc90 bl 80003e8 + + /* Wait till LSE is ready */ + while(LL_RCC_LSE_IsReady() != 1) + 8000ac8: bf00 nop + 8000aca: f7ff fcb5 bl 8000438 + 8000ace: 4603 mov r3, r0 + 8000ad0: 2b01 cmp r3, #1 + 8000ad2: d1fa bne.n 8000aca + { + + } + LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE); + 8000ad4: f44f 7080 mov.w r0, #256 ; 0x100 + 8000ad8: f7ff fd8c bl 80005f4 + LL_RCC_EnableRTC(); + 8000adc: f7ff fda0 bl 8000620 + + LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4); + 8000ae0: f04f 7300 mov.w r3, #33554432 ; 0x2000000 + 8000ae4: 2218 movs r2, #24 + 8000ae6: 2100 movs r1, #0 + 8000ae8: 2001 movs r0, #1 + 8000aea: f7ff fde1 bl 80006b0 + LL_RCC_PLL_EnableDomain_SYS(); + 8000aee: f7ff fdff bl 80006f0 + LL_RCC_PLL_Enable(); + 8000af2: f7ff fdb9 bl 8000668 + + /* Wait till PLL is ready */ + while(LL_RCC_PLL_IsReady() != 1) + 8000af6: bf00 nop + 8000af8: f7ff fdc6 bl 8000688 + 8000afc: 4603 mov r3, r0 + 8000afe: 2b01 cmp r3, #1 + 8000b00: d1fa bne.n 8000af8 + { + + } + LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL); + 8000b02: 2003 movs r0, #3 + 8000b04: f7ff fd18 bl 8000538 + + /* Wait till System clock is ready */ + while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL) + 8000b08: bf00 nop + 8000b0a: f7ff fd29 bl 8000560 + 8000b0e: 4603 mov r3, r0 + 8000b10: 2b0c cmp r3, #12 + 8000b12: d1fa bne.n 8000b0a + { + + } + LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1); + 8000b14: 2000 movs r0, #0 + 8000b16: f7ff fd31 bl 800057c + LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1); + 8000b1a: 2000 movs r0, #0 + 8000b1c: f7ff fd42 bl 80005a4 + LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1); + 8000b20: 2000 movs r0, #0 + 8000b22: f7ff fd53 bl 80005cc + LL_SetSystemCoreClock(24000000); + 8000b26: 4804 ldr r0, [pc, #16] ; (8000b38 ) + 8000b28: f000 f9f4 bl 8000f14 + + /* Update the time base */ + if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK) + 8000b2c: 2000 movs r0, #0 + 8000b2e: f000 f8d9 bl 8000ce4 + { + // Error_Handler(); + } +} + 8000b32: bf00 nop + 8000b34: bd80 pop {r7, pc} + 8000b36: bf00 nop + 8000b38: 016e3600 .word 0x016e3600 + +08000b3c : + + +void SystemClock_Config_80M(void) +{ + 8000b3c: b580 push {r7, lr} + 8000b3e: af00 add r7, sp, #0 + LL_FLASH_SetLatency(LL_FLASH_LATENCY_4); + 8000b40: 2004 movs r0, #4 + 8000b42: f7ff fdfd bl 8000740 + while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_4) + 8000b46: bf00 nop + 8000b48: f7ff fe0e bl 8000768 + 8000b4c: 4603 mov r3, r0 + 8000b4e: 2b04 cmp r3, #4 + 8000b50: d1fa bne.n 8000b48 + { + } + LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1); + 8000b52: f44f 7000 mov.w r0, #512 ; 0x200 + 8000b56: f7ff fe35 bl 80007c4 + LL_RCC_MSI_Enable(); + 8000b5a: f7ff fc81 bl 8000460 + + /* Wait till MSI is ready */ + while(LL_RCC_MSI_IsReady() != 1) + 8000b5e: bf00 nop + 8000b60: f7ff fc8e bl 8000480 + 8000b64: 4603 mov r3, r0 + 8000b66: 2b01 cmp r3, #1 + 8000b68: d1fa bne.n 8000b60 + { + + } + LL_RCC_MSI_EnableRangeSelection(); + 8000b6a: f7ff fcab bl 80004c4 + LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6); + 8000b6e: 2060 movs r0, #96 ; 0x60 + 8000b70: f7ff fcb8 bl 80004e4 + LL_RCC_MSI_SetCalibTrimming(0); + 8000b74: 2000 movs r0, #0 + 8000b76: f7ff fcc9 bl 800050c + LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 40, LL_RCC_PLLR_DIV_2); + 8000b7a: 2300 movs r3, #0 + 8000b7c: 2228 movs r2, #40 ; 0x28 + 8000b7e: 2100 movs r1, #0 + 8000b80: 2001 movs r0, #1 + 8000b82: f7ff fd95 bl 80006b0 + LL_RCC_PLL_EnableDomain_SYS(); + 8000b86: f7ff fdb3 bl 80006f0 + LL_RCC_PLL_Enable(); + 8000b8a: f7ff fd6d bl 8000668 + + /* Wait till PLL is ready */ + while(LL_RCC_PLL_IsReady() != 1) + 8000b8e: bf00 nop + 8000b90: f7ff fd7a bl 8000688 + 8000b94: 4603 mov r3, r0 + 8000b96: 2b01 cmp r3, #1 + 8000b98: d1fa bne.n 8000b90 + { + + } + LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL); + 8000b9a: 2003 movs r0, #3 + 8000b9c: f7ff fccc bl 8000538 + + /* Wait till System clock is ready */ + while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL) + 8000ba0: bf00 nop + 8000ba2: f7ff fcdd bl 8000560 + 8000ba6: 4603 mov r3, r0 + 8000ba8: 2b0c cmp r3, #12 + 8000baa: d1fa bne.n 8000ba2 + { + + } + LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1); + 8000bac: 2000 movs r0, #0 + 8000bae: f7ff fce5 bl 800057c + LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1); + 8000bb2: 2000 movs r0, #0 + 8000bb4: f7ff fcf6 bl 80005a4 + LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1); + 8000bb8: 2000 movs r0, #0 + 8000bba: f7ff fd07 bl 80005cc + LL_SetSystemCoreClock(80000000); + 8000bbe: 4804 ldr r0, [pc, #16] ; (8000bd0 ) + 8000bc0: f000 f9a8 bl 8000f14 + + /* Update the time base */ + if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK) + 8000bc4: 2000 movs r0, #0 + 8000bc6: f000 f88d bl 8000ce4 + { + // Error_Handler(); + } +} + 8000bca: bf00 nop + 8000bcc: bd80 pop {r7, pc} + 8000bce: bf00 nop + 8000bd0: 04c4b400 .word 0x04c4b400 + +08000bd4 : /******************************************************************************/ /** * @brief This function handles Non maskable interrupt. */ void NMI_Handler(void) { - 8000a70: b480 push {r7} - 8000a72: af00 add r7, sp, #0 + 8000bd4: b480 push {r7} + 8000bd6: af00 add r7, sp, #0 /* USER CODE END NonMaskableInt_IRQn 0 */ /* USER CODE BEGIN NonMaskableInt_IRQn 1 */ /* USER CODE END NonMaskableInt_IRQn 1 */ } - 8000a74: bf00 nop - 8000a76: 46bd mov sp, r7 - 8000a78: f85d 7b04 ldr.w r7, [sp], #4 - 8000a7c: 4770 bx lr + 8000bd8: bf00 nop + 8000bda: 46bd mov sp, r7 + 8000bdc: f85d 7b04 ldr.w r7, [sp], #4 + 8000be0: 4770 bx lr -08000a7e : +08000be2 : /** * @brief This function handles Hard fault interrupt. */ void HardFault_Handler(void) { - 8000a7e: b480 push {r7} - 8000a80: af00 add r7, sp, #0 + 8000be2: b480 push {r7} + 8000be4: af00 add r7, sp, #0 /* USER CODE BEGIN HardFault_IRQn 0 */ /* USER CODE END HardFault_IRQn 0 */ while (1) - 8000a82: e7fe b.n 8000a82 + 8000be6: e7fe b.n 8000be6 -08000a84 : +08000be8 : /** * @brief This function handles Memory management fault. */ void MemManage_Handler(void) { - 8000a84: b480 push {r7} - 8000a86: af00 add r7, sp, #0 + 8000be8: b480 push {r7} + 8000bea: af00 add r7, sp, #0 /* USER CODE BEGIN MemoryManagement_IRQn 0 */ /* USER CODE END MemoryManagement_IRQn 0 */ while (1) - 8000a88: e7fe b.n 8000a88 + 8000bec: e7fe b.n 8000bec -08000a8a : +08000bee : /** * @brief This function handles Prefetch fault, memory access fault. */ void BusFault_Handler(void) { - 8000a8a: b480 push {r7} - 8000a8c: af00 add r7, sp, #0 + 8000bee: b480 push {r7} + 8000bf0: af00 add r7, sp, #0 /* USER CODE BEGIN BusFault_IRQn 0 */ /* USER CODE END BusFault_IRQn 0 */ while (1) - 8000a8e: e7fe b.n 8000a8e + 8000bf2: e7fe b.n 8000bf2 -08000a90 : +08000bf4 : /** * @brief This function handles Undefined instruction or illegal state. */ void UsageFault_Handler(void) { - 8000a90: b480 push {r7} - 8000a92: af00 add r7, sp, #0 + 8000bf4: b480 push {r7} + 8000bf6: af00 add r7, sp, #0 /* USER CODE BEGIN UsageFault_IRQn 0 */ /* USER CODE END UsageFault_IRQn 0 */ while (1) - 8000a94: e7fe b.n 8000a94 + 8000bf8: e7fe b.n 8000bf8 -08000a96 : +08000bfa : /** * @brief This function handles System service call via SWI instruction. */ void SVC_Handler(void) { - 8000a96: b480 push {r7} - 8000a98: af00 add r7, sp, #0 + 8000bfa: b480 push {r7} + 8000bfc: af00 add r7, sp, #0 /* USER CODE END SVCall_IRQn 0 */ /* USER CODE BEGIN SVCall_IRQn 1 */ /* USER CODE END SVCall_IRQn 1 */ } - 8000a9a: bf00 nop - 8000a9c: 46bd mov sp, r7 - 8000a9e: f85d 7b04 ldr.w r7, [sp], #4 - 8000aa2: 4770 bx lr + 8000bfe: bf00 nop + 8000c00: 46bd mov sp, r7 + 8000c02: f85d 7b04 ldr.w r7, [sp], #4 + 8000c06: 4770 bx lr -08000aa4 : +08000c08 : /** * @brief This function handles Debug monitor. */ void DebugMon_Handler(void) { - 8000aa4: b480 push {r7} - 8000aa6: af00 add r7, sp, #0 + 8000c08: b480 push {r7} + 8000c0a: af00 add r7, sp, #0 /* USER CODE END DebugMonitor_IRQn 0 */ /* USER CODE BEGIN DebugMonitor_IRQn 1 */ /* USER CODE END DebugMonitor_IRQn 1 */ } - 8000aa8: bf00 nop - 8000aaa: 46bd mov sp, r7 - 8000aac: f85d 7b04 ldr.w r7, [sp], #4 - 8000ab0: 4770 bx lr + 8000c0c: bf00 nop + 8000c0e: 46bd mov sp, r7 + 8000c10: f85d 7b04 ldr.w r7, [sp], #4 + 8000c14: 4770 bx lr -08000ab2 : +08000c16 : /** * @brief This function handles Pendable request for system service. */ void PendSV_Handler(void) { - 8000ab2: b480 push {r7} - 8000ab4: af00 add r7, sp, #0 + 8000c16: b480 push {r7} + 8000c18: af00 add r7, sp, #0 /* USER CODE END PendSV_IRQn 0 */ /* USER CODE BEGIN PendSV_IRQn 1 */ /* USER CODE END PendSV_IRQn 1 */ } - 8000ab6: bf00 nop - 8000ab8: 46bd mov sp, r7 - 8000aba: f85d 7b04 ldr.w r7, [sp], #4 - 8000abe: 4770 bx lr + 8000c1a: bf00 nop + 8000c1c: 46bd mov sp, r7 + 8000c1e: f85d 7b04 ldr.w r7, [sp], #4 + 8000c22: 4770 bx lr -08000ac0 : +08000c24 : * @param None * @retval None */ void SystemInit(void) { - 8000ac0: b480 push {r7} - 8000ac2: af00 add r7, sp, #0 + 8000c24: b480 push {r7} + 8000c26: af00 add r7, sp, #0 /* FPU settings ------------------------------------------------------------*/ #if (__FPU_PRESENT == 1) && (__FPU_USED == 1) SCB->CPACR |= ((3UL << 10*2)|(3UL << 11*2)); /* set CP10 and CP11 Full Access */ - 8000ac4: 4b17 ldr r3, [pc, #92] ; (8000b24 ) - 8000ac6: f8d3 3088 ldr.w r3, [r3, #136] ; 0x88 - 8000aca: 4a16 ldr r2, [pc, #88] ; (8000b24 ) - 8000acc: f443 0370 orr.w r3, r3, #15728640 ; 0xf00000 - 8000ad0: f8c2 3088 str.w r3, [r2, #136] ; 0x88 + 8000c28: 4b17 ldr r3, [pc, #92] ; (8000c88 ) + 8000c2a: f8d3 3088 ldr.w r3, [r3, #136] ; 0x88 + 8000c2e: 4a16 ldr r2, [pc, #88] ; (8000c88 ) + 8000c30: f443 0370 orr.w r3, r3, #15728640 ; 0xf00000 + 8000c34: f8c2 3088 str.w r3, [r2, #136] ; 0x88 #endif /* Reset the RCC clock configuration to the default reset state ------------*/ /* Set MSION bit */ RCC->CR |= RCC_CR_MSION; - 8000ad4: 4b14 ldr r3, [pc, #80] ; (8000b28 ) - 8000ad6: 681b ldr r3, [r3, #0] - 8000ad8: 4a13 ldr r2, [pc, #76] ; (8000b28 ) - 8000ada: f043 0301 orr.w r3, r3, #1 - 8000ade: 6013 str r3, [r2, #0] + 8000c38: 4b14 ldr r3, [pc, #80] ; (8000c8c ) + 8000c3a: 681b ldr r3, [r3, #0] + 8000c3c: 4a13 ldr r2, [pc, #76] ; (8000c8c ) + 8000c3e: f043 0301 orr.w r3, r3, #1 + 8000c42: 6013 str r3, [r2, #0] /* Reset CFGR register */ RCC->CFGR = 0x00000000U; - 8000ae0: 4b11 ldr r3, [pc, #68] ; (8000b28 ) - 8000ae2: 2200 movs r2, #0 - 8000ae4: 609a str r2, [r3, #8] + 8000c44: 4b11 ldr r3, [pc, #68] ; (8000c8c ) + 8000c46: 2200 movs r2, #0 + 8000c48: 609a str r2, [r3, #8] /* Reset HSEON, CSSON , HSION, and PLLON bits */ RCC->CR &= 0xEAF6FFFFU; - 8000ae6: 4b10 ldr r3, [pc, #64] ; (8000b28 ) - 8000ae8: 681b ldr r3, [r3, #0] - 8000aea: 4a0f ldr r2, [pc, #60] ; (8000b28 ) - 8000aec: f023 53a8 bic.w r3, r3, #352321536 ; 0x15000000 - 8000af0: f423 2310 bic.w r3, r3, #589824 ; 0x90000 - 8000af4: 6013 str r3, [r2, #0] + 8000c4a: 4b10 ldr r3, [pc, #64] ; (8000c8c ) + 8000c4c: 681b ldr r3, [r3, #0] + 8000c4e: 4a0f ldr r2, [pc, #60] ; (8000c8c ) + 8000c50: f023 53a8 bic.w r3, r3, #352321536 ; 0x15000000 + 8000c54: f423 2310 bic.w r3, r3, #589824 ; 0x90000 + 8000c58: 6013 str r3, [r2, #0] /* Reset PLLCFGR register */ RCC->PLLCFGR = 0x00001000U; - 8000af6: 4b0c ldr r3, [pc, #48] ; (8000b28 ) - 8000af8: f44f 5280 mov.w r2, #4096 ; 0x1000 - 8000afc: 60da str r2, [r3, #12] + 8000c5a: 4b0c ldr r3, [pc, #48] ; (8000c8c ) + 8000c5c: f44f 5280 mov.w r2, #4096 ; 0x1000 + 8000c60: 60da str r2, [r3, #12] /* Reset HSEBYP bit */ RCC->CR &= 0xFFFBFFFFU; - 8000afe: 4b0a ldr r3, [pc, #40] ; (8000b28 ) - 8000b00: 681b ldr r3, [r3, #0] - 8000b02: 4a09 ldr r2, [pc, #36] ; (8000b28 ) - 8000b04: f423 2380 bic.w r3, r3, #262144 ; 0x40000 - 8000b08: 6013 str r3, [r2, #0] + 8000c62: 4b0a ldr r3, [pc, #40] ; (8000c8c ) + 8000c64: 681b ldr r3, [r3, #0] + 8000c66: 4a09 ldr r2, [pc, #36] ; (8000c8c ) + 8000c68: f423 2380 bic.w r3, r3, #262144 ; 0x40000 + 8000c6c: 6013 str r3, [r2, #0] /* Disable all interrupts */ RCC->CIER = 0x00000000U; - 8000b0a: 4b07 ldr r3, [pc, #28] ; (8000b28 ) - 8000b0c: 2200 movs r2, #0 - 8000b0e: 619a str r2, [r3, #24] + 8000c6e: 4b07 ldr r3, [pc, #28] ; (8000c8c ) + 8000c70: 2200 movs r2, #0 + 8000c72: 619a str r2, [r3, #24] /* Configure the Vector Table location add offset address ------------------*/ #ifdef VECT_TAB_SRAM SCB->VTOR = SRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */ #else SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH */ - 8000b10: 4b04 ldr r3, [pc, #16] ; (8000b24 ) - 8000b12: f04f 6200 mov.w r2, #134217728 ; 0x8000000 - 8000b16: 609a str r2, [r3, #8] + 8000c74: 4b04 ldr r3, [pc, #16] ; (8000c88 ) + 8000c76: f04f 6200 mov.w r2, #134217728 ; 0x8000000 + 8000c7a: 609a str r2, [r3, #8] #endif } - 8000b18: bf00 nop - 8000b1a: 46bd mov sp, r7 - 8000b1c: f85d 7b04 ldr.w r7, [sp], #4 - 8000b20: 4770 bx lr - 8000b22: bf00 nop - 8000b24: e000ed00 .word 0xe000ed00 - 8000b28: 40021000 .word 0x40021000 + 8000c7c: bf00 nop + 8000c7e: 46bd mov sp, r7 + 8000c80: f85d 7b04 ldr.w r7, [sp], #4 + 8000c84: 4770 bx lr + 8000c86: bf00 nop + 8000c88: e000ed00 .word 0xe000ed00 + 8000c8c: 40021000 .word 0x40021000 -08000b2c : +08000c90 : .section .text.Reset_Handler .weak Reset_Handler .type Reset_Handler, %function Reset_Handler: ldr sp, =_estack /* Set stack pointer */ - 8000b2c: f8df d034 ldr.w sp, [pc, #52] ; 8000b64 + 8000c90: f8df d034 ldr.w sp, [pc, #52] ; 8000cc8 /* Call the clock system initialization function.*/ bl SystemInit - 8000b30: f7ff ffc6 bl 8000ac0 + 8000c94: f7ff ffc6 bl 8000c24 /* Copy the data segment initializers from flash to SRAM */ movs r1, #0 - 8000b34: 2100 movs r1, #0 + 8000c98: 2100 movs r1, #0 b LoopCopyDataInit - 8000b36: e003 b.n 8000b40 + 8000c9a: e003 b.n 8000ca4 -08000b38 : +08000c9c : CopyDataInit: ldr r3, =_sidata - 8000b38: 4b0b ldr r3, [pc, #44] ; (8000b68 ) + 8000c9c: 4b0b ldr r3, [pc, #44] ; (8000ccc ) ldr r3, [r3, r1] - 8000b3a: 585b ldr r3, [r3, r1] + 8000c9e: 585b ldr r3, [r3, r1] str r3, [r0, r1] - 8000b3c: 5043 str r3, [r0, r1] + 8000ca0: 5043 str r3, [r0, r1] adds r1, r1, #4 - 8000b3e: 3104 adds r1, #4 + 8000ca2: 3104 adds r1, #4 -08000b40 : +08000ca4 : LoopCopyDataInit: ldr r0, =_sdata - 8000b40: 480a ldr r0, [pc, #40] ; (8000b6c ) + 8000ca4: 480a ldr r0, [pc, #40] ; (8000cd0 ) ldr r3, =_edata - 8000b42: 4b0b ldr r3, [pc, #44] ; (8000b70 ) + 8000ca6: 4b0b ldr r3, [pc, #44] ; (8000cd4 ) adds r2, r0, r1 - 8000b44: 1842 adds r2, r0, r1 + 8000ca8: 1842 adds r2, r0, r1 cmp r2, r3 - 8000b46: 429a cmp r2, r3 + 8000caa: 429a cmp r2, r3 bcc CopyDataInit - 8000b48: d3f6 bcc.n 8000b38 + 8000cac: d3f6 bcc.n 8000c9c ldr r2, =_sbss - 8000b4a: 4a0a ldr r2, [pc, #40] ; (8000b74 ) + 8000cae: 4a0a ldr r2, [pc, #40] ; (8000cd8 ) b LoopFillZerobss - 8000b4c: e002 b.n 8000b54 + 8000cb0: e002 b.n 8000cb8 -08000b4e : +08000cb2 : /* Zero fill the bss segment. */ FillZerobss: movs r3, #0 - 8000b4e: 2300 movs r3, #0 + 8000cb2: 2300 movs r3, #0 str r3, [r2], #4 - 8000b50: f842 3b04 str.w r3, [r2], #4 + 8000cb4: f842 3b04 str.w r3, [r2], #4 -08000b54 : +08000cb8 : LoopFillZerobss: ldr r3, = _ebss - 8000b54: 4b08 ldr r3, [pc, #32] ; (8000b78 ) + 8000cb8: 4b08 ldr r3, [pc, #32] ; (8000cdc ) cmp r2, r3 - 8000b56: 429a cmp r2, r3 + 8000cba: 429a cmp r2, r3 bcc FillZerobss - 8000b58: d3f9 bcc.n 8000b4e + 8000cbc: d3f9 bcc.n 8000cb2 /* Call static constructors */ bl __libc_init_array - 8000b5a: f000 f939 bl 8000dd0 <__libc_init_array> + 8000cbe: f000 f939 bl 8000f34 <__libc_init_array> /* Call the application's entry point.*/ bl main - 8000b5e: f7ff fe9f bl 80008a0
+ 8000cc2: f7ff fdf1 bl 80008a8
-08000b62 : +08000cc6 : LoopForever: b LoopForever - 8000b62: e7fe b.n 8000b62 + 8000cc6: e7fe b.n 8000cc6 ldr sp, =_estack /* Set stack pointer */ - 8000b64: 20018000 .word 0x20018000 + 8000cc8: 20018000 .word 0x20018000 ldr r3, =_sidata - 8000b68: 08000e38 .word 0x08000e38 + 8000ccc: 08000f9c .word 0x08000f9c ldr r0, =_sdata - 8000b6c: 20000000 .word 0x20000000 + 8000cd0: 20000000 .word 0x20000000 ldr r3, =_edata - 8000b70: 20000010 .word 0x20000010 + 8000cd4: 2000000c .word 0x2000000c ldr r2, =_sbss - 8000b74: 20000010 .word 0x20000010 + 8000cd8: 2000000c .word 0x2000000c ldr r3, = _ebss - 8000b78: 20000034 .word 0x20000034 + 8000cdc: 20000030 .word 0x20000030 -08000b7c : +08000ce0 : * @retval : None */ .section .text.Default_Handler,"ax",%progbits Default_Handler: Infinite_Loop: b Infinite_Loop - 8000b7c: e7fe b.n 8000b7c + 8000ce0: e7fe b.n 8000ce0 ... -08000b80 : +08000ce4 : * implementation in user file. * @param TickPriority Tick interrupt priority. * @retval HAL status */ __weak HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority) { - 8000b80: b580 push {r7, lr} - 8000b82: b084 sub sp, #16 - 8000b84: af00 add r7, sp, #0 - 8000b86: 6078 str r0, [r7, #4] + 8000ce4: b580 push {r7, lr} + 8000ce6: b084 sub sp, #16 + 8000ce8: af00 add r7, sp, #0 + 8000cea: 6078 str r0, [r7, #4] HAL_StatusTypeDef status = HAL_OK; - 8000b88: 2300 movs r3, #0 - 8000b8a: 73fb strb r3, [r7, #15] + 8000cec: 2300 movs r3, #0 + 8000cee: 73fb strb r3, [r7, #15] /* Check uwTickFreq for MisraC 2012 (even if uwTickFreq is a enum type that doesn't take the value zero)*/ if ((uint32_t)uwTickFreq != 0U) - 8000b8c: 4b17 ldr r3, [pc, #92] ; (8000bec ) - 8000b8e: 781b ldrb r3, [r3, #0] - 8000b90: 2b00 cmp r3, #0 - 8000b92: d023 beq.n 8000bdc + 8000cf0: 4b17 ldr r3, [pc, #92] ; (8000d50 ) + 8000cf2: 781b ldrb r3, [r3, #0] + 8000cf4: 2b00 cmp r3, #0 + 8000cf6: d023 beq.n 8000d40 { /*Configure the SysTick to have interrupt in 1ms time basis*/ if (HAL_SYSTICK_Config(SystemCoreClock / (1000U / (uint32_t)uwTickFreq)) == 0U) - 8000b94: 4b16 ldr r3, [pc, #88] ; (8000bf0 ) - 8000b96: 681a ldr r2, [r3, #0] - 8000b98: 4b14 ldr r3, [pc, #80] ; (8000bec ) - 8000b9a: 781b ldrb r3, [r3, #0] - 8000b9c: 4619 mov r1, r3 - 8000b9e: f44f 737a mov.w r3, #1000 ; 0x3e8 - 8000ba2: fbb3 f3f1 udiv r3, r3, r1 - 8000ba6: fbb2 f3f3 udiv r3, r2, r3 - 8000baa: 4618 mov r0, r3 - 8000bac: f000 f8ce bl 8000d4c - 8000bb0: 4603 mov r3, r0 - 8000bb2: 2b00 cmp r3, #0 - 8000bb4: d10f bne.n 8000bd6 + 8000cf8: 4b16 ldr r3, [pc, #88] ; (8000d54 ) + 8000cfa: 681a ldr r2, [r3, #0] + 8000cfc: 4b14 ldr r3, [pc, #80] ; (8000d50 ) + 8000cfe: 781b ldrb r3, [r3, #0] + 8000d00: 4619 mov r1, r3 + 8000d02: f44f 737a mov.w r3, #1000 ; 0x3e8 + 8000d06: fbb3 f3f1 udiv r3, r3, r1 + 8000d0a: fbb2 f3f3 udiv r3, r2, r3 + 8000d0e: 4618 mov r0, r3 + 8000d10: f000 f8ce bl 8000eb0 + 8000d14: 4603 mov r3, r0 + 8000d16: 2b00 cmp r3, #0 + 8000d18: d10f bne.n 8000d3a { /* Configure the SysTick IRQ priority */ if (TickPriority < (1UL << __NVIC_PRIO_BITS)) - 8000bb6: 687b ldr r3, [r7, #4] - 8000bb8: 2b0f cmp r3, #15 - 8000bba: d809 bhi.n 8000bd0 + 8000d1a: 687b ldr r3, [r7, #4] + 8000d1c: 2b0f cmp r3, #15 + 8000d1e: d809 bhi.n 8000d34 { HAL_NVIC_SetPriority(SysTick_IRQn, TickPriority, 0U); - 8000bbc: 2200 movs r2, #0 - 8000bbe: 6879 ldr r1, [r7, #4] - 8000bc0: f04f 30ff mov.w r0, #4294967295 - 8000bc4: f000 f8a6 bl 8000d14 + 8000d20: 2200 movs r2, #0 + 8000d22: 6879 ldr r1, [r7, #4] + 8000d24: f04f 30ff mov.w r0, #4294967295 + 8000d28: f000 f8a6 bl 8000e78 uwTickPrio = TickPriority; - 8000bc8: 4a0a ldr r2, [pc, #40] ; (8000bf4 ) - 8000bca: 687b ldr r3, [r7, #4] - 8000bcc: 6013 str r3, [r2, #0] - 8000bce: e007 b.n 8000be0 + 8000d2c: 4a0a ldr r2, [pc, #40] ; (8000d58 ) + 8000d2e: 687b ldr r3, [r7, #4] + 8000d30: 6013 str r3, [r2, #0] + 8000d32: e007 b.n 8000d44 } else { status = HAL_ERROR; - 8000bd0: 2301 movs r3, #1 - 8000bd2: 73fb strb r3, [r7, #15] - 8000bd4: e004 b.n 8000be0 + 8000d34: 2301 movs r3, #1 + 8000d36: 73fb strb r3, [r7, #15] + 8000d38: e004 b.n 8000d44 } } else { status = HAL_ERROR; - 8000bd6: 2301 movs r3, #1 - 8000bd8: 73fb strb r3, [r7, #15] - 8000bda: e001 b.n 8000be0 + 8000d3a: 2301 movs r3, #1 + 8000d3c: 73fb strb r3, [r7, #15] + 8000d3e: e001 b.n 8000d44 } } else { status = HAL_ERROR; - 8000bdc: 2301 movs r3, #1 - 8000bde: 73fb strb r3, [r7, #15] + 8000d40: 2301 movs r3, #1 + 8000d42: 73fb strb r3, [r7, #15] } /* Return function status */ return status; - 8000be0: 7bfb ldrb r3, [r7, #15] + 8000d44: 7bfb ldrb r3, [r7, #15] } - 8000be2: 4618 mov r0, r3 - 8000be4: 3710 adds r7, #16 - 8000be6: 46bd mov sp, r7 - 8000be8: bd80 pop {r7, pc} - 8000bea: bf00 nop - 8000bec: 2000000c .word 0x2000000c - 8000bf0: 20000004 .word 0x20000004 - 8000bf4: 20000008 .word 0x20000008 + 8000d46: 4618 mov r0, r3 + 8000d48: 3710 adds r7, #16 + 8000d4a: 46bd mov sp, r7 + 8000d4c: bd80 pop {r7, pc} + 8000d4e: bf00 nop + 8000d50: 20000008 .word 0x20000008 + 8000d54: 20000000 .word 0x20000000 + 8000d58: 20000004 .word 0x20000004 -08000bf8 <__NVIC_GetPriorityGrouping>: +08000d5c <__NVIC_GetPriorityGrouping>: \brief Get Priority Grouping \details Reads the priority grouping field from the NVIC Interrupt Controller. \return Priority grouping field (SCB->AIRCR [10:8] PRIGROUP field). */ __STATIC_INLINE uint32_t __NVIC_GetPriorityGrouping(void) { - 8000bf8: b480 push {r7} - 8000bfa: af00 add r7, sp, #0 + 8000d5c: b480 push {r7} + 8000d5e: af00 add r7, sp, #0 return ((uint32_t)((SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) >> SCB_AIRCR_PRIGROUP_Pos)); - 8000bfc: 4b04 ldr r3, [pc, #16] ; (8000c10 <__NVIC_GetPriorityGrouping+0x18>) - 8000bfe: 68db ldr r3, [r3, #12] - 8000c00: 0a1b lsrs r3, r3, #8 - 8000c02: f003 0307 and.w r3, r3, #7 + 8000d60: 4b04 ldr r3, [pc, #16] ; (8000d74 <__NVIC_GetPriorityGrouping+0x18>) + 8000d62: 68db ldr r3, [r3, #12] + 8000d64: 0a1b lsrs r3, r3, #8 + 8000d66: f003 0307 and.w r3, r3, #7 } - 8000c06: 4618 mov r0, r3 - 8000c08: 46bd mov sp, r7 - 8000c0a: f85d 7b04 ldr.w r7, [sp], #4 - 8000c0e: 4770 bx lr - 8000c10: e000ed00 .word 0xe000ed00 + 8000d6a: 4618 mov r0, r3 + 8000d6c: 46bd mov sp, r7 + 8000d6e: f85d 7b04 ldr.w r7, [sp], #4 + 8000d72: 4770 bx lr + 8000d74: e000ed00 .word 0xe000ed00 -08000c14 <__NVIC_SetPriority>: +08000d78 <__NVIC_SetPriority>: \param [in] IRQn Interrupt number. \param [in] priority Priority to set. \note The priority cannot be set for every processor exception. */ __STATIC_INLINE void __NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority) { - 8000c14: b480 push {r7} - 8000c16: b083 sub sp, #12 - 8000c18: af00 add r7, sp, #0 - 8000c1a: 4603 mov r3, r0 - 8000c1c: 6039 str r1, [r7, #0] - 8000c1e: 71fb strb r3, [r7, #7] + 8000d78: b480 push {r7} + 8000d7a: b083 sub sp, #12 + 8000d7c: af00 add r7, sp, #0 + 8000d7e: 4603 mov r3, r0 + 8000d80: 6039 str r1, [r7, #0] + 8000d82: 71fb strb r3, [r7, #7] if ((int32_t)(IRQn) >= 0) - 8000c20: f997 3007 ldrsb.w r3, [r7, #7] - 8000c24: 2b00 cmp r3, #0 - 8000c26: db0a blt.n 8000c3e <__NVIC_SetPriority+0x2a> + 8000d84: f997 3007 ldrsb.w r3, [r7, #7] + 8000d88: 2b00 cmp r3, #0 + 8000d8a: db0a blt.n 8000da2 <__NVIC_SetPriority+0x2a> { NVIC->IP[((uint32_t)IRQn)] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); - 8000c28: 683b ldr r3, [r7, #0] - 8000c2a: b2da uxtb r2, r3 - 8000c2c: 490c ldr r1, [pc, #48] ; (8000c60 <__NVIC_SetPriority+0x4c>) - 8000c2e: f997 3007 ldrsb.w r3, [r7, #7] - 8000c32: 0112 lsls r2, r2, #4 - 8000c34: b2d2 uxtb r2, r2 - 8000c36: 440b add r3, r1 - 8000c38: f883 2300 strb.w r2, [r3, #768] ; 0x300 + 8000d8c: 683b ldr r3, [r7, #0] + 8000d8e: b2da uxtb r2, r3 + 8000d90: 490c ldr r1, [pc, #48] ; (8000dc4 <__NVIC_SetPriority+0x4c>) + 8000d92: f997 3007 ldrsb.w r3, [r7, #7] + 8000d96: 0112 lsls r2, r2, #4 + 8000d98: b2d2 uxtb r2, r2 + 8000d9a: 440b add r3, r1 + 8000d9c: f883 2300 strb.w r2, [r3, #768] ; 0x300 } else { SCB->SHP[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); } } - 8000c3c: e00a b.n 8000c54 <__NVIC_SetPriority+0x40> + 8000da0: e00a b.n 8000db8 <__NVIC_SetPriority+0x40> SCB->SHP[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); - 8000c3e: 683b ldr r3, [r7, #0] - 8000c40: b2da uxtb r2, r3 - 8000c42: 4908 ldr r1, [pc, #32] ; (8000c64 <__NVIC_SetPriority+0x50>) - 8000c44: 79fb ldrb r3, [r7, #7] - 8000c46: f003 030f and.w r3, r3, #15 - 8000c4a: 3b04 subs r3, #4 - 8000c4c: 0112 lsls r2, r2, #4 - 8000c4e: b2d2 uxtb r2, r2 - 8000c50: 440b add r3, r1 - 8000c52: 761a strb r2, [r3, #24] + 8000da2: 683b ldr r3, [r7, #0] + 8000da4: b2da uxtb r2, r3 + 8000da6: 4908 ldr r1, [pc, #32] ; (8000dc8 <__NVIC_SetPriority+0x50>) + 8000da8: 79fb ldrb r3, [r7, #7] + 8000daa: f003 030f and.w r3, r3, #15 + 8000dae: 3b04 subs r3, #4 + 8000db0: 0112 lsls r2, r2, #4 + 8000db2: b2d2 uxtb r2, r2 + 8000db4: 440b add r3, r1 + 8000db6: 761a strb r2, [r3, #24] } - 8000c54: bf00 nop - 8000c56: 370c adds r7, #12 - 8000c58: 46bd mov sp, r7 - 8000c5a: f85d 7b04 ldr.w r7, [sp], #4 - 8000c5e: 4770 bx lr - 8000c60: e000e100 .word 0xe000e100 - 8000c64: e000ed00 .word 0xe000ed00 + 8000db8: bf00 nop + 8000dba: 370c adds r7, #12 + 8000dbc: 46bd mov sp, r7 + 8000dbe: f85d 7b04 ldr.w r7, [sp], #4 + 8000dc2: 4770 bx lr + 8000dc4: e000e100 .word 0xe000e100 + 8000dc8: e000ed00 .word 0xe000ed00 -08000c68 : +08000dcc : \param [in] PreemptPriority Preemptive priority value (starting from 0). \param [in] SubPriority Subpriority value (starting from 0). \return Encoded priority. Value can be used in the function \ref NVIC_SetPriority(). */ __STATIC_INLINE uint32_t NVIC_EncodePriority (uint32_t PriorityGroup, uint32_t PreemptPriority, uint32_t SubPriority) { - 8000c68: b480 push {r7} - 8000c6a: b089 sub sp, #36 ; 0x24 - 8000c6c: af00 add r7, sp, #0 - 8000c6e: 60f8 str r0, [r7, #12] - 8000c70: 60b9 str r1, [r7, #8] - 8000c72: 607a str r2, [r7, #4] + 8000dcc: b480 push {r7} + 8000dce: b089 sub sp, #36 ; 0x24 + 8000dd0: af00 add r7, sp, #0 + 8000dd2: 60f8 str r0, [r7, #12] + 8000dd4: 60b9 str r1, [r7, #8] + 8000dd6: 607a str r2, [r7, #4] uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ - 8000c74: 68fb ldr r3, [r7, #12] - 8000c76: f003 0307 and.w r3, r3, #7 - 8000c7a: 61fb str r3, [r7, #28] + 8000dd8: 68fb ldr r3, [r7, #12] + 8000dda: f003 0307 and.w r3, r3, #7 + 8000dde: 61fb str r3, [r7, #28] uint32_t PreemptPriorityBits; uint32_t SubPriorityBits; PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); - 8000c7c: 69fb ldr r3, [r7, #28] - 8000c7e: f1c3 0307 rsb r3, r3, #7 - 8000c82: 2b04 cmp r3, #4 - 8000c84: bf28 it cs - 8000c86: 2304 movcs r3, #4 - 8000c88: 61bb str r3, [r7, #24] + 8000de0: 69fb ldr r3, [r7, #28] + 8000de2: f1c3 0307 rsb r3, r3, #7 + 8000de6: 2b04 cmp r3, #4 + 8000de8: bf28 it cs + 8000dea: 2304 movcs r3, #4 + 8000dec: 61bb str r3, [r7, #24] SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); - 8000c8a: 69fb ldr r3, [r7, #28] - 8000c8c: 3304 adds r3, #4 - 8000c8e: 2b06 cmp r3, #6 - 8000c90: d902 bls.n 8000c98 - 8000c92: 69fb ldr r3, [r7, #28] - 8000c94: 3b03 subs r3, #3 - 8000c96: e000 b.n 8000c9a - 8000c98: 2300 movs r3, #0 - 8000c9a: 617b str r3, [r7, #20] + 8000dee: 69fb ldr r3, [r7, #28] + 8000df0: 3304 adds r3, #4 + 8000df2: 2b06 cmp r3, #6 + 8000df4: d902 bls.n 8000dfc + 8000df6: 69fb ldr r3, [r7, #28] + 8000df8: 3b03 subs r3, #3 + 8000dfa: e000 b.n 8000dfe + 8000dfc: 2300 movs r3, #0 + 8000dfe: 617b str r3, [r7, #20] return ( ((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) | - 8000c9c: f04f 32ff mov.w r2, #4294967295 - 8000ca0: 69bb ldr r3, [r7, #24] - 8000ca2: fa02 f303 lsl.w r3, r2, r3 - 8000ca6: 43da mvns r2, r3 - 8000ca8: 68bb ldr r3, [r7, #8] - 8000caa: 401a ands r2, r3 - 8000cac: 697b ldr r3, [r7, #20] - 8000cae: 409a lsls r2, r3 + 8000e00: f04f 32ff mov.w r2, #4294967295 + 8000e04: 69bb ldr r3, [r7, #24] + 8000e06: fa02 f303 lsl.w r3, r2, r3 + 8000e0a: 43da mvns r2, r3 + 8000e0c: 68bb ldr r3, [r7, #8] + 8000e0e: 401a ands r2, r3 + 8000e10: 697b ldr r3, [r7, #20] + 8000e12: 409a lsls r2, r3 ((SubPriority & (uint32_t)((1UL << (SubPriorityBits )) - 1UL))) - 8000cb0: f04f 31ff mov.w r1, #4294967295 - 8000cb4: 697b ldr r3, [r7, #20] - 8000cb6: fa01 f303 lsl.w r3, r1, r3 - 8000cba: 43d9 mvns r1, r3 - 8000cbc: 687b ldr r3, [r7, #4] - 8000cbe: 400b ands r3, r1 + 8000e14: f04f 31ff mov.w r1, #4294967295 + 8000e18: 697b ldr r3, [r7, #20] + 8000e1a: fa01 f303 lsl.w r3, r1, r3 + 8000e1e: 43d9 mvns r1, r3 + 8000e20: 687b ldr r3, [r7, #4] + 8000e22: 400b ands r3, r1 ((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) | - 8000cc0: 4313 orrs r3, r2 + 8000e24: 4313 orrs r3, r2 ); } - 8000cc2: 4618 mov r0, r3 - 8000cc4: 3724 adds r7, #36 ; 0x24 - 8000cc6: 46bd mov sp, r7 - 8000cc8: f85d 7b04 ldr.w r7, [sp], #4 - 8000ccc: 4770 bx lr + 8000e26: 4618 mov r0, r3 + 8000e28: 3724 adds r7, #36 ; 0x24 + 8000e2a: 46bd mov sp, r7 + 8000e2c: f85d 7b04 ldr.w r7, [sp], #4 + 8000e30: 4770 bx lr ... -08000cd0 : +08000e34 : \note When the variable __Vendor_SysTickConfig is set to 1, then the function SysTick_Config is not included. In this case, the file device.h must contain a vendor-specific implementation of this function. */ __STATIC_INLINE uint32_t SysTick_Config(uint32_t ticks) { - 8000cd0: b580 push {r7, lr} - 8000cd2: b082 sub sp, #8 - 8000cd4: af00 add r7, sp, #0 - 8000cd6: 6078 str r0, [r7, #4] + 8000e34: b580 push {r7, lr} + 8000e36: b082 sub sp, #8 + 8000e38: af00 add r7, sp, #0 + 8000e3a: 6078 str r0, [r7, #4] if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk) - 8000cd8: 687b ldr r3, [r7, #4] - 8000cda: 3b01 subs r3, #1 - 8000cdc: f1b3 7f80 cmp.w r3, #16777216 ; 0x1000000 - 8000ce0: d301 bcc.n 8000ce6 + 8000e3c: 687b ldr r3, [r7, #4] + 8000e3e: 3b01 subs r3, #1 + 8000e40: f1b3 7f80 cmp.w r3, #16777216 ; 0x1000000 + 8000e44: d301 bcc.n 8000e4a { return (1UL); /* Reload value impossible */ - 8000ce2: 2301 movs r3, #1 - 8000ce4: e00f b.n 8000d06 + 8000e46: 2301 movs r3, #1 + 8000e48: e00f b.n 8000e6a } SysTick->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */ - 8000ce6: 4a0a ldr r2, [pc, #40] ; (8000d10 ) - 8000ce8: 687b ldr r3, [r7, #4] - 8000cea: 3b01 subs r3, #1 - 8000cec: 6053 str r3, [r2, #4] + 8000e4a: 4a0a ldr r2, [pc, #40] ; (8000e74 ) + 8000e4c: 687b ldr r3, [r7, #4] + 8000e4e: 3b01 subs r3, #1 + 8000e50: 6053 str r3, [r2, #4] NVIC_SetPriority (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */ - 8000cee: 210f movs r1, #15 - 8000cf0: f04f 30ff mov.w r0, #4294967295 - 8000cf4: f7ff ff8e bl 8000c14 <__NVIC_SetPriority> + 8000e52: 210f movs r1, #15 + 8000e54: f04f 30ff mov.w r0, #4294967295 + 8000e58: f7ff ff8e bl 8000d78 <__NVIC_SetPriority> SysTick->VAL = 0UL; /* Load the SysTick Counter Value */ - 8000cf8: 4b05 ldr r3, [pc, #20] ; (8000d10 ) - 8000cfa: 2200 movs r2, #0 - 8000cfc: 609a str r2, [r3, #8] + 8000e5c: 4b05 ldr r3, [pc, #20] ; (8000e74 ) + 8000e5e: 2200 movs r2, #0 + 8000e60: 609a str r2, [r3, #8] SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk | - 8000cfe: 4b04 ldr r3, [pc, #16] ; (8000d10 ) - 8000d00: 2207 movs r2, #7 - 8000d02: 601a str r2, [r3, #0] + 8000e62: 4b04 ldr r3, [pc, #16] ; (8000e74 ) + 8000e64: 2207 movs r2, #7 + 8000e66: 601a str r2, [r3, #0] SysTick_CTRL_TICKINT_Msk | SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */ return (0UL); /* Function successful */ - 8000d04: 2300 movs r3, #0 + 8000e68: 2300 movs r3, #0 } - 8000d06: 4618 mov r0, r3 - 8000d08: 3708 adds r7, #8 - 8000d0a: 46bd mov sp, r7 - 8000d0c: bd80 pop {r7, pc} - 8000d0e: bf00 nop - 8000d10: e000e010 .word 0xe000e010 + 8000e6a: 4618 mov r0, r3 + 8000e6c: 3708 adds r7, #8 + 8000e6e: 46bd mov sp, r7 + 8000e70: bd80 pop {r7, pc} + 8000e72: bf00 nop + 8000e74: e000e010 .word 0xe000e010 -08000d14 : +08000e78 : * This parameter can be a value between 0 and 15 * A lower priority value indicates a higher priority. * @retval None */ void HAL_NVIC_SetPriority(IRQn_Type IRQn, uint32_t PreemptPriority, uint32_t SubPriority) { - 8000d14: b580 push {r7, lr} - 8000d16: b086 sub sp, #24 - 8000d18: af00 add r7, sp, #0 - 8000d1a: 4603 mov r3, r0 - 8000d1c: 60b9 str r1, [r7, #8] - 8000d1e: 607a str r2, [r7, #4] - 8000d20: 73fb strb r3, [r7, #15] + 8000e78: b580 push {r7, lr} + 8000e7a: b086 sub sp, #24 + 8000e7c: af00 add r7, sp, #0 + 8000e7e: 4603 mov r3, r0 + 8000e80: 60b9 str r1, [r7, #8] + 8000e82: 607a str r2, [r7, #4] + 8000e84: 73fb strb r3, [r7, #15] uint32_t prioritygroup = 0x00; - 8000d22: 2300 movs r3, #0 - 8000d24: 617b str r3, [r7, #20] + 8000e86: 2300 movs r3, #0 + 8000e88: 617b str r3, [r7, #20] /* Check the parameters */ assert_param(IS_NVIC_SUB_PRIORITY(SubPriority)); assert_param(IS_NVIC_PREEMPTION_PRIORITY(PreemptPriority)); prioritygroup = NVIC_GetPriorityGrouping(); - 8000d26: f7ff ff67 bl 8000bf8 <__NVIC_GetPriorityGrouping> - 8000d2a: 6178 str r0, [r7, #20] + 8000e8a: f7ff ff67 bl 8000d5c <__NVIC_GetPriorityGrouping> + 8000e8e: 6178 str r0, [r7, #20] NVIC_SetPriority(IRQn, NVIC_EncodePriority(prioritygroup, PreemptPriority, SubPriority)); - 8000d2c: 687a ldr r2, [r7, #4] - 8000d2e: 68b9 ldr r1, [r7, #8] - 8000d30: 6978 ldr r0, [r7, #20] - 8000d32: f7ff ff99 bl 8000c68 - 8000d36: 4602 mov r2, r0 - 8000d38: f997 300f ldrsb.w r3, [r7, #15] - 8000d3c: 4611 mov r1, r2 - 8000d3e: 4618 mov r0, r3 - 8000d40: f7ff ff68 bl 8000c14 <__NVIC_SetPriority> + 8000e90: 687a ldr r2, [r7, #4] + 8000e92: 68b9 ldr r1, [r7, #8] + 8000e94: 6978 ldr r0, [r7, #20] + 8000e96: f7ff ff99 bl 8000dcc + 8000e9a: 4602 mov r2, r0 + 8000e9c: f997 300f ldrsb.w r3, [r7, #15] + 8000ea0: 4611 mov r1, r2 + 8000ea2: 4618 mov r0, r3 + 8000ea4: f7ff ff68 bl 8000d78 <__NVIC_SetPriority> } - 8000d44: bf00 nop - 8000d46: 3718 adds r7, #24 - 8000d48: 46bd mov sp, r7 - 8000d4a: bd80 pop {r7, pc} + 8000ea8: bf00 nop + 8000eaa: 3718 adds r7, #24 + 8000eac: 46bd mov sp, r7 + 8000eae: bd80 pop {r7, pc} -08000d4c : +08000eb0 : * @param TicksNumb: Specifies the ticks Number of ticks between two interrupts. * @retval status: - 0 Function succeeded. * - 1 Function failed. */ uint32_t HAL_SYSTICK_Config(uint32_t TicksNumb) { - 8000d4c: b580 push {r7, lr} - 8000d4e: b082 sub sp, #8 - 8000d50: af00 add r7, sp, #0 - 8000d52: 6078 str r0, [r7, #4] + 8000eb0: b580 push {r7, lr} + 8000eb2: b082 sub sp, #8 + 8000eb4: af00 add r7, sp, #0 + 8000eb6: 6078 str r0, [r7, #4] return SysTick_Config(TicksNumb); - 8000d54: 6878 ldr r0, [r7, #4] - 8000d56: f7ff ffbb bl 8000cd0 - 8000d5a: 4603 mov r3, r0 + 8000eb8: 6878 ldr r0, [r7, #4] + 8000eba: f7ff ffbb bl 8000e34 + 8000ebe: 4603 mov r3, r0 } - 8000d5c: 4618 mov r0, r3 - 8000d5e: 3708 adds r7, #8 - 8000d60: 46bd mov sp, r7 - 8000d62: bd80 pop {r7, pc} + 8000ec0: 4618 mov r0, r3 + 8000ec2: 3708 adds r7, #8 + 8000ec4: 46bd mov sp, r7 + 8000ec6: bd80 pop {r7, pc} -08000d64 : +08000ec8 : * configuration by calling this function, for a delay use rather osDelay RTOS service. * @param Ticks Number of ticks * @retval None */ __STATIC_INLINE void LL_InitTick(uint32_t HCLKFrequency, uint32_t Ticks) { - 8000d64: b480 push {r7} - 8000d66: b083 sub sp, #12 - 8000d68: af00 add r7, sp, #0 - 8000d6a: 6078 str r0, [r7, #4] - 8000d6c: 6039 str r1, [r7, #0] + 8000ec8: b480 push {r7} + 8000eca: b083 sub sp, #12 + 8000ecc: af00 add r7, sp, #0 + 8000ece: 6078 str r0, [r7, #4] + 8000ed0: 6039 str r1, [r7, #0] /* Configure the SysTick to have interrupt in 1ms time base */ SysTick->LOAD = (uint32_t)((HCLKFrequency / Ticks) - 1UL); /* set reload register */ - 8000d6e: 687a ldr r2, [r7, #4] - 8000d70: 683b ldr r3, [r7, #0] - 8000d72: fbb2 f3f3 udiv r3, r2, r3 - 8000d76: 4a07 ldr r2, [pc, #28] ; (8000d94 ) - 8000d78: 3b01 subs r3, #1 - 8000d7a: 6053 str r3, [r2, #4] + 8000ed2: 687a ldr r2, [r7, #4] + 8000ed4: 683b ldr r3, [r7, #0] + 8000ed6: fbb2 f3f3 udiv r3, r2, r3 + 8000eda: 4a07 ldr r2, [pc, #28] ; (8000ef8 ) + 8000edc: 3b01 subs r3, #1 + 8000ede: 6053 str r3, [r2, #4] SysTick->VAL = 0UL; /* Load the SysTick Counter Value */ - 8000d7c: 4b05 ldr r3, [pc, #20] ; (8000d94 ) - 8000d7e: 2200 movs r2, #0 - 8000d80: 609a str r2, [r3, #8] + 8000ee0: 4b05 ldr r3, [pc, #20] ; (8000ef8 ) + 8000ee2: 2200 movs r2, #0 + 8000ee4: 609a str r2, [r3, #8] SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk | - 8000d82: 4b04 ldr r3, [pc, #16] ; (8000d94 ) - 8000d84: 2205 movs r2, #5 - 8000d86: 601a str r2, [r3, #0] + 8000ee6: 4b04 ldr r3, [pc, #16] ; (8000ef8 ) + 8000ee8: 2205 movs r2, #5 + 8000eea: 601a str r2, [r3, #0] SysTick_CTRL_ENABLE_Msk; /* Enable the Systick Timer */ } - 8000d88: bf00 nop - 8000d8a: 370c adds r7, #12 - 8000d8c: 46bd mov sp, r7 - 8000d8e: f85d 7b04 ldr.w r7, [sp], #4 - 8000d92: 4770 bx lr - 8000d94: e000e010 .word 0xe000e010 + 8000eec: bf00 nop + 8000eee: 370c adds r7, #12 + 8000ef0: 46bd mov sp, r7 + 8000ef2: f85d 7b04 ldr.w r7, [sp], #4 + 8000ef6: 4770 bx lr + 8000ef8: e000e010 .word 0xe000e010 -08000d98 : +08000efc : * @param HCLKFrequency HCLK frequency in Hz * @note HCLK frequency can be calculated thanks to RCC helper macro or function @ref LL_RCC_GetSystemClocksFreq * @retval None */ void LL_Init1msTick(uint32_t HCLKFrequency) { - 8000d98: b580 push {r7, lr} - 8000d9a: b082 sub sp, #8 - 8000d9c: af00 add r7, sp, #0 - 8000d9e: 6078 str r0, [r7, #4] + 8000efc: b580 push {r7, lr} + 8000efe: b082 sub sp, #8 + 8000f00: af00 add r7, sp, #0 + 8000f02: 6078 str r0, [r7, #4] /* Use frequency provided in argument */ LL_InitTick(HCLKFrequency, 100U); - 8000da0: 2164 movs r1, #100 ; 0x64 - 8000da2: 6878 ldr r0, [r7, #4] - 8000da4: f7ff ffde bl 8000d64 + 8000f04: 2164 movs r1, #100 ; 0x64 + 8000f06: 6878 ldr r0, [r7, #4] + 8000f08: f7ff ffde bl 8000ec8 } - 8000da8: bf00 nop - 8000daa: 3708 adds r7, #8 - 8000dac: 46bd mov sp, r7 - 8000dae: bd80 pop {r7, pc} + 8000f0c: bf00 nop + 8000f0e: 3708 adds r7, #8 + 8000f10: 46bd mov sp, r7 + 8000f12: bd80 pop {r7, pc} -08000db0 : +08000f14 : * @note Variable can be calculated also through SystemCoreClockUpdate function. * @param HCLKFrequency HCLK frequency in Hz (can be calculated thanks to RCC helper macro) * @retval None */ void LL_SetSystemCoreClock(uint32_t HCLKFrequency) { - 8000db0: b480 push {r7} - 8000db2: b083 sub sp, #12 - 8000db4: af00 add r7, sp, #0 - 8000db6: 6078 str r0, [r7, #4] + 8000f14: b480 push {r7} + 8000f16: b083 sub sp, #12 + 8000f18: af00 add r7, sp, #0 + 8000f1a: 6078 str r0, [r7, #4] /* HCLK clock frequency */ SystemCoreClock = HCLKFrequency; - 8000db8: 4a04 ldr r2, [pc, #16] ; (8000dcc ) - 8000dba: 687b ldr r3, [r7, #4] - 8000dbc: 6013 str r3, [r2, #0] + 8000f1c: 4a04 ldr r2, [pc, #16] ; (8000f30 ) + 8000f1e: 687b ldr r3, [r7, #4] + 8000f20: 6013 str r3, [r2, #0] } - 8000dbe: bf00 nop - 8000dc0: 370c adds r7, #12 - 8000dc2: 46bd mov sp, r7 - 8000dc4: f85d 7b04 ldr.w r7, [sp], #4 - 8000dc8: 4770 bx lr - 8000dca: bf00 nop - 8000dcc: 20000004 .word 0x20000004 + 8000f22: bf00 nop + 8000f24: 370c adds r7, #12 + 8000f26: 46bd mov sp, r7 + 8000f28: f85d 7b04 ldr.w r7, [sp], #4 + 8000f2c: 4770 bx lr + 8000f2e: bf00 nop + 8000f30: 20000000 .word 0x20000000 -08000dd0 <__libc_init_array>: - 8000dd0: b570 push {r4, r5, r6, lr} - 8000dd2: 4e0d ldr r6, [pc, #52] ; (8000e08 <__libc_init_array+0x38>) - 8000dd4: 4c0d ldr r4, [pc, #52] ; (8000e0c <__libc_init_array+0x3c>) - 8000dd6: 1ba4 subs r4, r4, r6 - 8000dd8: 10a4 asrs r4, r4, #2 - 8000dda: 2500 movs r5, #0 - 8000ddc: 42a5 cmp r5, r4 - 8000dde: d109 bne.n 8000df4 <__libc_init_array+0x24> - 8000de0: 4e0b ldr r6, [pc, #44] ; (8000e10 <__libc_init_array+0x40>) - 8000de2: 4c0c ldr r4, [pc, #48] ; (8000e14 <__libc_init_array+0x44>) - 8000de4: f000 f818 bl 8000e18 <_init> - 8000de8: 1ba4 subs r4, r4, r6 - 8000dea: 10a4 asrs r4, r4, #2 - 8000dec: 2500 movs r5, #0 - 8000dee: 42a5 cmp r5, r4 - 8000df0: d105 bne.n 8000dfe <__libc_init_array+0x2e> - 8000df2: bd70 pop {r4, r5, r6, pc} - 8000df4: f856 3025 ldr.w r3, [r6, r5, lsl #2] - 8000df8: 4798 blx r3 - 8000dfa: 3501 adds r5, #1 - 8000dfc: e7ee b.n 8000ddc <__libc_init_array+0xc> - 8000dfe: f856 3025 ldr.w r3, [r6, r5, lsl #2] - 8000e02: 4798 blx r3 - 8000e04: 3501 adds r5, #1 - 8000e06: e7f2 b.n 8000dee <__libc_init_array+0x1e> - 8000e08: 08000e30 .word 0x08000e30 - 8000e0c: 08000e30 .word 0x08000e30 - 8000e10: 08000e30 .word 0x08000e30 - 8000e14: 08000e34 .word 0x08000e34 +08000f34 <__libc_init_array>: + 8000f34: b570 push {r4, r5, r6, lr} + 8000f36: 4e0d ldr r6, [pc, #52] ; (8000f6c <__libc_init_array+0x38>) + 8000f38: 4c0d ldr r4, [pc, #52] ; (8000f70 <__libc_init_array+0x3c>) + 8000f3a: 1ba4 subs r4, r4, r6 + 8000f3c: 10a4 asrs r4, r4, #2 + 8000f3e: 2500 movs r5, #0 + 8000f40: 42a5 cmp r5, r4 + 8000f42: d109 bne.n 8000f58 <__libc_init_array+0x24> + 8000f44: 4e0b ldr r6, [pc, #44] ; (8000f74 <__libc_init_array+0x40>) + 8000f46: 4c0c ldr r4, [pc, #48] ; (8000f78 <__libc_init_array+0x44>) + 8000f48: f000 f818 bl 8000f7c <_init> + 8000f4c: 1ba4 subs r4, r4, r6 + 8000f4e: 10a4 asrs r4, r4, #2 + 8000f50: 2500 movs r5, #0 + 8000f52: 42a5 cmp r5, r4 + 8000f54: d105 bne.n 8000f62 <__libc_init_array+0x2e> + 8000f56: bd70 pop {r4, r5, r6, pc} + 8000f58: f856 3025 ldr.w r3, [r6, r5, lsl #2] + 8000f5c: 4798 blx r3 + 8000f5e: 3501 adds r5, #1 + 8000f60: e7ee b.n 8000f40 <__libc_init_array+0xc> + 8000f62: f856 3025 ldr.w r3, [r6, r5, lsl #2] + 8000f66: 4798 blx r3 + 8000f68: 3501 adds r5, #1 + 8000f6a: e7f2 b.n 8000f52 <__libc_init_array+0x1e> + 8000f6c: 08000f94 .word 0x08000f94 + 8000f70: 08000f94 .word 0x08000f94 + 8000f74: 08000f94 .word 0x08000f94 + 8000f78: 08000f98 .word 0x08000f98 -08000e18 <_init>: - 8000e18: b5f8 push {r3, r4, r5, r6, r7, lr} - 8000e1a: bf00 nop - 8000e1c: bcf8 pop {r3, r4, r5, r6, r7} - 8000e1e: bc08 pop {r3} - 8000e20: 469e mov lr, r3 - 8000e22: 4770 bx lr +08000f7c <_init>: + 8000f7c: b5f8 push {r3, r4, r5, r6, r7, lr} + 8000f7e: bf00 nop + 8000f80: bcf8 pop {r3, r4, r5, r6, r7} + 8000f82: bc08 pop {r3} + 8000f84: 469e mov lr, r3 + 8000f86: 4770 bx lr -08000e24 <_fini>: - 8000e24: b5f8 push {r3, r4, r5, r6, r7, lr} - 8000e26: bf00 nop - 8000e28: bcf8 pop {r3, r4, r5, r6, r7} - 8000e2a: bc08 pop {r3} - 8000e2c: 469e mov lr, r3 - 8000e2e: 4770 bx lr +08000f88 <_fini>: + 8000f88: b5f8 push {r3, r4, r5, r6, r7, lr} + 8000f8a: bf00 nop + 8000f8c: bcf8 pop {r3, r4, r5, r6, r7} + 8000f8e: bc08 pop {r3} + 8000f90: 469e mov lr, r3 + 8000f92: 4770 bx lr diff --git a/RealOne/Debug/RealOne.map b/RealOne/Debug/RealOne.map index eef8c46..a2f198b 100644 --- a/RealOne/Debug/RealOne.map +++ b/RealOne/Debug/RealOne.map @@ -3456,7 +3456,7 @@ LOAD c:/st/stm32cubeide_1.4.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.exte 0x0000000008000000 g_pfnVectors 0x0000000008000188 . = ALIGN (0x4) -.text 0x0000000008000188 0xca8 +.text 0x0000000008000188 0xe0c 0x0000000008000188 . = ALIGN (0x4) *(.text) .text 0x0000000008000188 0x40 c:/st/stm32cubeide_1.4.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crtbegin.o @@ -3520,313 +3520,314 @@ LOAD c:/st/stm32cubeide_1.4.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.exte 0x00000000080005f4 0x2c Core/Src/main.o .text.LL_RCC_EnableRTC 0x0000000008000620 0x24 Core/Src/main.o - .text.LL_RCC_ForceBackupDomainReset - 0x0000000008000644 0x24 Core/Src/main.o .text.LL_RCC_ReleaseBackupDomainReset - 0x0000000008000668 0x24 Core/Src/main.o + 0x0000000008000644 0x24 Core/Src/main.o .text.LL_RCC_PLL_Enable - 0x000000000800068c 0x20 Core/Src/main.o + 0x0000000008000668 0x20 Core/Src/main.o .text.LL_RCC_PLL_IsReady - 0x00000000080006ac 0x28 Core/Src/main.o + 0x0000000008000688 0x28 Core/Src/main.o .text.LL_RCC_PLL_ConfigDomain_SYS - 0x00000000080006d4 0x40 Core/Src/main.o + 0x00000000080006b0 0x40 Core/Src/main.o .text.LL_RCC_PLL_EnableDomain_SYS - 0x0000000008000714 0x20 Core/Src/main.o + 0x00000000080006f0 0x20 Core/Src/main.o .text.LL_APB1_GRP1_EnableClock - 0x0000000008000734 0x30 Core/Src/main.o + 0x0000000008000710 0x30 Core/Src/main.o .text.LL_FLASH_SetLatency - 0x0000000008000764 0x28 Core/Src/main.o + 0x0000000008000740 0x28 Core/Src/main.o .text.LL_FLASH_GetLatency - 0x000000000800078c 0x1c Core/Src/main.o + 0x0000000008000768 0x1c Core/Src/main.o .text.LL_SYSTICK_EnableIT - 0x00000000080007a8 0x20 Core/Src/main.o + 0x0000000008000784 0x20 Core/Src/main.o .text.LL_LPM_EnableSleep - 0x00000000080007c8 0x20 Core/Src/main.o + 0x00000000080007a4 0x20 Core/Src/main.o .text.LL_PWR_SetRegulVoltageScaling - 0x00000000080007e8 0x28 Core/Src/main.o + 0x00000000080007c4 0x28 Core/Src/main.o .text.LL_PWR_EnableBkUpAccess - 0x0000000008000810 0x20 Core/Src/main.o + 0x00000000080007ec 0x20 Core/Src/main.o + .text.LL_PWR_DisableBkUpAccess + 0x000000000800080c 0x20 Core/Src/main.o .text.SysTick_Handler - 0x0000000008000830 0x70 Core/Src/main.o - 0x0000000008000830 SysTick_Handler - .text.main 0x00000000080008a0 0x68 Core/Src/main.o - 0x00000000080008a0 main + 0x000000000800082c 0x7c Core/Src/main.o + 0x000000000800082c SysTick_Handler + .text.main 0x00000000080008a8 0xfc Core/Src/main.o + 0x00000000080008a8 main + .text.SystemClock_Config_24M_LSE_FL3_VS2 + 0x00000000080009a4 0xcc Core/Src/main.o + 0x00000000080009a4 SystemClock_Config_24M_LSE_FL3_VS2 .text.SystemClock_Config_24M_LSE - 0x0000000008000908 0xd0 Core/Src/main.o - 0x0000000008000908 SystemClock_Config_24M_LSE + 0x0000000008000a70 0xcc Core/Src/main.o + 0x0000000008000a70 SystemClock_Config_24M_LSE .text.SystemClock_Config_80M - 0x00000000080009d8 0x98 Core/Src/main.o - 0x00000000080009d8 SystemClock_Config_80M + 0x0000000008000b3c 0x98 Core/Src/main.o + 0x0000000008000b3c SystemClock_Config_80M .text.NMI_Handler - 0x0000000008000a70 0xe Core/Src/stm32l4xx_it.o - 0x0000000008000a70 NMI_Handler + 0x0000000008000bd4 0xe Core/Src/stm32l4xx_it.o + 0x0000000008000bd4 NMI_Handler .text.HardFault_Handler - 0x0000000008000a7e 0x6 Core/Src/stm32l4xx_it.o - 0x0000000008000a7e HardFault_Handler + 0x0000000008000be2 0x6 Core/Src/stm32l4xx_it.o + 0x0000000008000be2 HardFault_Handler .text.MemManage_Handler - 0x0000000008000a84 0x6 Core/Src/stm32l4xx_it.o - 0x0000000008000a84 MemManage_Handler + 0x0000000008000be8 0x6 Core/Src/stm32l4xx_it.o + 0x0000000008000be8 MemManage_Handler .text.BusFault_Handler - 0x0000000008000a8a 0x6 Core/Src/stm32l4xx_it.o - 0x0000000008000a8a BusFault_Handler + 0x0000000008000bee 0x6 Core/Src/stm32l4xx_it.o + 0x0000000008000bee BusFault_Handler .text.UsageFault_Handler - 0x0000000008000a90 0x6 Core/Src/stm32l4xx_it.o - 0x0000000008000a90 UsageFault_Handler + 0x0000000008000bf4 0x6 Core/Src/stm32l4xx_it.o + 0x0000000008000bf4 UsageFault_Handler .text.SVC_Handler - 0x0000000008000a96 0xe Core/Src/stm32l4xx_it.o - 0x0000000008000a96 SVC_Handler + 0x0000000008000bfa 0xe Core/Src/stm32l4xx_it.o + 0x0000000008000bfa SVC_Handler .text.DebugMon_Handler - 0x0000000008000aa4 0xe Core/Src/stm32l4xx_it.o - 0x0000000008000aa4 DebugMon_Handler + 0x0000000008000c08 0xe Core/Src/stm32l4xx_it.o + 0x0000000008000c08 DebugMon_Handler .text.PendSV_Handler - 0x0000000008000ab2 0xe Core/Src/stm32l4xx_it.o - 0x0000000008000ab2 PendSV_Handler + 0x0000000008000c16 0xe Core/Src/stm32l4xx_it.o + 0x0000000008000c16 PendSV_Handler .text.SystemInit - 0x0000000008000ac0 0x6c Core/Src/system_stm32l4xx.o - 0x0000000008000ac0 SystemInit + 0x0000000008000c24 0x6c Core/Src/system_stm32l4xx.o + 0x0000000008000c24 SystemInit .text.Reset_Handler - 0x0000000008000b2c 0x50 Core/Startup/startup_stm32l476rgtx.o - 0x0000000008000b2c Reset_Handler + 0x0000000008000c90 0x50 Core/Startup/startup_stm32l476rgtx.o + 0x0000000008000c90 Reset_Handler .text.Default_Handler - 0x0000000008000b7c 0x2 Core/Startup/startup_stm32l476rgtx.o - 0x0000000008000b7c RTC_Alarm_IRQHandler - 0x0000000008000b7c EXTI2_IRQHandler - 0x0000000008000b7c TIM8_TRG_COM_IRQHandler - 0x0000000008000b7c TIM8_CC_IRQHandler - 0x0000000008000b7c TIM1_CC_IRQHandler - 0x0000000008000b7c TSC_IRQHandler - 0x0000000008000b7c TAMP_STAMP_IRQHandler - 0x0000000008000b7c EXTI3_IRQHandler - 0x0000000008000b7c LPTIM2_IRQHandler - 0x0000000008000b7c DFSDM1_FLT1_IRQHandler - 0x0000000008000b7c I2C3_ER_IRQHandler - 0x0000000008000b7c DFSDM1_FLT2_IRQHandler - 0x0000000008000b7c EXTI0_IRQHandler - 0x0000000008000b7c I2C2_EV_IRQHandler - 0x0000000008000b7c CAN1_RX0_IRQHandler - 0x0000000008000b7c FPU_IRQHandler - 0x0000000008000b7c TIM1_UP_TIM16_IRQHandler - 0x0000000008000b7c ADC1_2_IRQHandler - 0x0000000008000b7c SPI1_IRQHandler - 0x0000000008000b7c TIM6_DAC_IRQHandler - 0x0000000008000b7c TIM8_UP_IRQHandler - 0x0000000008000b7c DMA2_Channel2_IRQHandler - 0x0000000008000b7c DMA1_Channel4_IRQHandler - 0x0000000008000b7c SAI2_IRQHandler - 0x0000000008000b7c DFSDM1_FLT3_IRQHandler - 0x0000000008000b7c USART3_IRQHandler - 0x0000000008000b7c DMA1_Channel7_IRQHandler - 0x0000000008000b7c CAN1_RX1_IRQHandler - 0x0000000008000b7c LCD_IRQHandler - 0x0000000008000b7c UART5_IRQHandler - 0x0000000008000b7c ADC3_IRQHandler - 0x0000000008000b7c TIM4_IRQHandler - 0x0000000008000b7c DMA2_Channel1_IRQHandler - 0x0000000008000b7c QUADSPI_IRQHandler - 0x0000000008000b7c I2C1_EV_IRQHandler - 0x0000000008000b7c DMA1_Channel6_IRQHandler - 0x0000000008000b7c UART4_IRQHandler - 0x0000000008000b7c DMA2_Channel4_IRQHandler - 0x0000000008000b7c TIM3_IRQHandler - 0x0000000008000b7c RCC_IRQHandler - 0x0000000008000b7c DMA1_Channel1_IRQHandler - 0x0000000008000b7c Default_Handler - 0x0000000008000b7c DMA2_Channel7_IRQHandler - 0x0000000008000b7c EXTI15_10_IRQHandler - 0x0000000008000b7c TIM7_IRQHandler - 0x0000000008000b7c SDMMC1_IRQHandler - 0x0000000008000b7c TIM5_IRQHandler - 0x0000000008000b7c I2C3_EV_IRQHandler - 0x0000000008000b7c EXTI9_5_IRQHandler - 0x0000000008000b7c RTC_WKUP_IRQHandler - 0x0000000008000b7c PVD_PVM_IRQHandler - 0x0000000008000b7c SPI2_IRQHandler - 0x0000000008000b7c CAN1_TX_IRQHandler - 0x0000000008000b7c DMA2_Channel5_IRQHandler - 0x0000000008000b7c DMA1_Channel5_IRQHandler - 0x0000000008000b7c EXTI4_IRQHandler - 0x0000000008000b7c RNG_IRQHandler - 0x0000000008000b7c TIM1_TRG_COM_TIM17_IRQHandler - 0x0000000008000b7c DMA1_Channel3_IRQHandler - 0x0000000008000b7c COMP_IRQHandler - 0x0000000008000b7c WWDG_IRQHandler - 0x0000000008000b7c LPUART1_IRQHandler - 0x0000000008000b7c DMA2_Channel6_IRQHandler - 0x0000000008000b7c TIM2_IRQHandler - 0x0000000008000b7c EXTI1_IRQHandler - 0x0000000008000b7c USART2_IRQHandler - 0x0000000008000b7c DFSDM1_FLT0_IRQHandler - 0x0000000008000b7c I2C2_ER_IRQHandler - 0x0000000008000b7c DMA1_Channel2_IRQHandler - 0x0000000008000b7c TIM8_BRK_IRQHandler - 0x0000000008000b7c CAN1_SCE_IRQHandler - 0x0000000008000b7c FLASH_IRQHandler - 0x0000000008000b7c USART1_IRQHandler - 0x0000000008000b7c OTG_FS_IRQHandler - 0x0000000008000b7c SPI3_IRQHandler - 0x0000000008000b7c I2C1_ER_IRQHandler - 0x0000000008000b7c FMC_IRQHandler - 0x0000000008000b7c SWPMI1_IRQHandler - 0x0000000008000b7c LPTIM1_IRQHandler - 0x0000000008000b7c SAI1_IRQHandler - 0x0000000008000b7c DMA2_Channel3_IRQHandler - 0x0000000008000b7c TIM1_BRK_TIM15_IRQHandler - *fill* 0x0000000008000b7e 0x2 + 0x0000000008000ce0 0x2 Core/Startup/startup_stm32l476rgtx.o + 0x0000000008000ce0 RTC_Alarm_IRQHandler + 0x0000000008000ce0 EXTI2_IRQHandler + 0x0000000008000ce0 TIM8_TRG_COM_IRQHandler + 0x0000000008000ce0 TIM8_CC_IRQHandler + 0x0000000008000ce0 TIM1_CC_IRQHandler + 0x0000000008000ce0 TSC_IRQHandler + 0x0000000008000ce0 TAMP_STAMP_IRQHandler + 0x0000000008000ce0 EXTI3_IRQHandler + 0x0000000008000ce0 LPTIM2_IRQHandler + 0x0000000008000ce0 DFSDM1_FLT1_IRQHandler + 0x0000000008000ce0 I2C3_ER_IRQHandler + 0x0000000008000ce0 DFSDM1_FLT2_IRQHandler + 0x0000000008000ce0 EXTI0_IRQHandler + 0x0000000008000ce0 I2C2_EV_IRQHandler + 0x0000000008000ce0 CAN1_RX0_IRQHandler + 0x0000000008000ce0 FPU_IRQHandler + 0x0000000008000ce0 TIM1_UP_TIM16_IRQHandler + 0x0000000008000ce0 ADC1_2_IRQHandler + 0x0000000008000ce0 SPI1_IRQHandler + 0x0000000008000ce0 TIM6_DAC_IRQHandler + 0x0000000008000ce0 TIM8_UP_IRQHandler + 0x0000000008000ce0 DMA2_Channel2_IRQHandler + 0x0000000008000ce0 DMA1_Channel4_IRQHandler + 0x0000000008000ce0 SAI2_IRQHandler + 0x0000000008000ce0 DFSDM1_FLT3_IRQHandler + 0x0000000008000ce0 USART3_IRQHandler + 0x0000000008000ce0 DMA1_Channel7_IRQHandler + 0x0000000008000ce0 CAN1_RX1_IRQHandler + 0x0000000008000ce0 LCD_IRQHandler + 0x0000000008000ce0 UART5_IRQHandler + 0x0000000008000ce0 ADC3_IRQHandler + 0x0000000008000ce0 TIM4_IRQHandler + 0x0000000008000ce0 DMA2_Channel1_IRQHandler + 0x0000000008000ce0 QUADSPI_IRQHandler + 0x0000000008000ce0 I2C1_EV_IRQHandler + 0x0000000008000ce0 DMA1_Channel6_IRQHandler + 0x0000000008000ce0 UART4_IRQHandler + 0x0000000008000ce0 DMA2_Channel4_IRQHandler + 0x0000000008000ce0 TIM3_IRQHandler + 0x0000000008000ce0 RCC_IRQHandler + 0x0000000008000ce0 DMA1_Channel1_IRQHandler + 0x0000000008000ce0 Default_Handler + 0x0000000008000ce0 DMA2_Channel7_IRQHandler + 0x0000000008000ce0 EXTI15_10_IRQHandler + 0x0000000008000ce0 TIM7_IRQHandler + 0x0000000008000ce0 SDMMC1_IRQHandler + 0x0000000008000ce0 TIM5_IRQHandler + 0x0000000008000ce0 I2C3_EV_IRQHandler + 0x0000000008000ce0 EXTI9_5_IRQHandler + 0x0000000008000ce0 RTC_WKUP_IRQHandler + 0x0000000008000ce0 PVD_PVM_IRQHandler + 0x0000000008000ce0 SPI2_IRQHandler + 0x0000000008000ce0 CAN1_TX_IRQHandler + 0x0000000008000ce0 DMA2_Channel5_IRQHandler + 0x0000000008000ce0 DMA1_Channel5_IRQHandler + 0x0000000008000ce0 EXTI4_IRQHandler + 0x0000000008000ce0 RNG_IRQHandler + 0x0000000008000ce0 TIM1_TRG_COM_TIM17_IRQHandler + 0x0000000008000ce0 DMA1_Channel3_IRQHandler + 0x0000000008000ce0 COMP_IRQHandler + 0x0000000008000ce0 WWDG_IRQHandler + 0x0000000008000ce0 LPUART1_IRQHandler + 0x0000000008000ce0 DMA2_Channel6_IRQHandler + 0x0000000008000ce0 TIM2_IRQHandler + 0x0000000008000ce0 EXTI1_IRQHandler + 0x0000000008000ce0 USART2_IRQHandler + 0x0000000008000ce0 DFSDM1_FLT0_IRQHandler + 0x0000000008000ce0 I2C2_ER_IRQHandler + 0x0000000008000ce0 DMA1_Channel2_IRQHandler + 0x0000000008000ce0 TIM8_BRK_IRQHandler + 0x0000000008000ce0 CAN1_SCE_IRQHandler + 0x0000000008000ce0 FLASH_IRQHandler + 0x0000000008000ce0 USART1_IRQHandler + 0x0000000008000ce0 OTG_FS_IRQHandler + 0x0000000008000ce0 SPI3_IRQHandler + 0x0000000008000ce0 I2C1_ER_IRQHandler + 0x0000000008000ce0 FMC_IRQHandler + 0x0000000008000ce0 SWPMI1_IRQHandler + 0x0000000008000ce0 LPTIM1_IRQHandler + 0x0000000008000ce0 SAI1_IRQHandler + 0x0000000008000ce0 DMA2_Channel3_IRQHandler + 0x0000000008000ce0 TIM1_BRK_TIM15_IRQHandler + *fill* 0x0000000008000ce2 0x2 .text.HAL_InitTick - 0x0000000008000b80 0x78 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.o - 0x0000000008000b80 HAL_InitTick + 0x0000000008000ce4 0x78 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.o + 0x0000000008000ce4 HAL_InitTick .text.__NVIC_GetPriorityGrouping - 0x0000000008000bf8 0x1c Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.o + 0x0000000008000d5c 0x1c Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.o .text.__NVIC_SetPriority - 0x0000000008000c14 0x54 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.o + 0x0000000008000d78 0x54 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.o .text.NVIC_EncodePriority - 0x0000000008000c68 0x66 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.o - *fill* 0x0000000008000cce 0x2 + 0x0000000008000dcc 0x66 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.o + *fill* 0x0000000008000e32 0x2 .text.SysTick_Config - 0x0000000008000cd0 0x44 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.o + 0x0000000008000e34 0x44 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.o .text.HAL_NVIC_SetPriority - 0x0000000008000d14 0x38 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.o - 0x0000000008000d14 HAL_NVIC_SetPriority + 0x0000000008000e78 0x38 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.o + 0x0000000008000e78 HAL_NVIC_SetPriority .text.HAL_SYSTICK_Config - 0x0000000008000d4c 0x18 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.o - 0x0000000008000d4c HAL_SYSTICK_Config + 0x0000000008000eb0 0x18 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.o + 0x0000000008000eb0 HAL_SYSTICK_Config .text.LL_InitTick - 0x0000000008000d64 0x34 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_utils.o + 0x0000000008000ec8 0x34 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_utils.o .text.LL_Init1msTick - 0x0000000008000d98 0x18 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_utils.o - 0x0000000008000d98 LL_Init1msTick + 0x0000000008000efc 0x18 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_utils.o + 0x0000000008000efc LL_Init1msTick .text.LL_SetSystemCoreClock - 0x0000000008000db0 0x20 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_utils.o - 0x0000000008000db0 LL_SetSystemCoreClock + 0x0000000008000f14 0x20 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_utils.o + 0x0000000008000f14 LL_SetSystemCoreClock .text.__libc_init_array - 0x0000000008000dd0 0x48 c:/st/stm32cubeide_1.4.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard\libc_nano.a(lib_a-init.o) - 0x0000000008000dd0 __libc_init_array + 0x0000000008000f34 0x48 c:/st/stm32cubeide_1.4.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard\libc_nano.a(lib_a-init.o) + 0x0000000008000f34 __libc_init_array *(.glue_7) - .glue_7 0x0000000008000e18 0x0 linker stubs + .glue_7 0x0000000008000f7c 0x0 linker stubs *(.glue_7t) - .glue_7t 0x0000000008000e18 0x0 linker stubs + .glue_7t 0x0000000008000f7c 0x0 linker stubs *(.eh_frame) - .eh_frame 0x0000000008000e18 0x0 c:/st/stm32cubeide_1.4.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crtbegin.o + .eh_frame 0x0000000008000f7c 0x0 c:/st/stm32cubeide_1.4.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crtbegin.o *(.init) - .init 0x0000000008000e18 0x4 c:/st/stm32cubeide_1.4.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crti.o - 0x0000000008000e18 _init - .init 0x0000000008000e1c 0x8 c:/st/stm32cubeide_1.4.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crtn.o + .init 0x0000000008000f7c 0x4 c:/st/stm32cubeide_1.4.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crti.o + 0x0000000008000f7c _init + .init 0x0000000008000f80 0x8 c:/st/stm32cubeide_1.4.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crtn.o *(.fini) - .fini 0x0000000008000e24 0x4 c:/st/stm32cubeide_1.4.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crti.o - 0x0000000008000e24 _fini - .fini 0x0000000008000e28 0x8 c:/st/stm32cubeide_1.4.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crtn.o - 0x0000000008000e30 . = ALIGN (0x4) - 0x0000000008000e30 _etext = . + .fini 0x0000000008000f88 0x4 c:/st/stm32cubeide_1.4.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crti.o + 0x0000000008000f88 _fini + .fini 0x0000000008000f8c 0x8 c:/st/stm32cubeide_1.4.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crtn.o + 0x0000000008000f94 . = ALIGN (0x4) + 0x0000000008000f94 _etext = . -.vfp11_veneer 0x0000000008000e30 0x0 - .vfp11_veneer 0x0000000008000e30 0x0 linker stubs +.vfp11_veneer 0x0000000008000f94 0x0 + .vfp11_veneer 0x0000000008000f94 0x0 linker stubs -.v4_bx 0x0000000008000e30 0x0 - .v4_bx 0x0000000008000e30 0x0 linker stubs +.v4_bx 0x0000000008000f94 0x0 + .v4_bx 0x0000000008000f94 0x0 linker stubs -.iplt 0x0000000008000e30 0x0 - .iplt 0x0000000008000e30 0x0 c:/st/stm32cubeide_1.4.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crtbegin.o +.iplt 0x0000000008000f94 0x0 + .iplt 0x0000000008000f94 0x0 c:/st/stm32cubeide_1.4.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crtbegin.o -.rel.dyn 0x0000000008000e30 0x0 - .rel.iplt 0x0000000008000e30 0x0 c:/st/stm32cubeide_1.4.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crtbegin.o +.rel.dyn 0x0000000008000f94 0x0 + .rel.iplt 0x0000000008000f94 0x0 c:/st/stm32cubeide_1.4.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crtbegin.o -.rodata 0x0000000008000e30 0x0 - 0x0000000008000e30 . = ALIGN (0x4) +.rodata 0x0000000008000f94 0x0 + 0x0000000008000f94 . = ALIGN (0x4) *(.rodata) *(.rodata*) - 0x0000000008000e30 . = ALIGN (0x4) + 0x0000000008000f94 . = ALIGN (0x4) -.ARM.extab 0x0000000008000e30 0x0 - 0x0000000008000e30 . = ALIGN (0x4) +.ARM.extab 0x0000000008000f94 0x0 + 0x0000000008000f94 . = ALIGN (0x4) *(.ARM.extab* .gnu.linkonce.armextab.*) - 0x0000000008000e30 . = ALIGN (0x4) + 0x0000000008000f94 . = ALIGN (0x4) -.ARM 0x0000000008000e30 0x0 - 0x0000000008000e30 . = ALIGN (0x4) - 0x0000000008000e30 __exidx_start = . +.ARM 0x0000000008000f94 0x0 + 0x0000000008000f94 . = ALIGN (0x4) + 0x0000000008000f94 __exidx_start = . *(.ARM.exidx*) - 0x0000000008000e30 __exidx_end = . - 0x0000000008000e30 . = ALIGN (0x4) + 0x0000000008000f94 __exidx_end = . + 0x0000000008000f94 . = ALIGN (0x4) -.preinit_array 0x0000000008000e30 0x0 - 0x0000000008000e30 . = ALIGN (0x4) - 0x0000000008000e30 PROVIDE (__preinit_array_start = .) +.preinit_array 0x0000000008000f94 0x0 + 0x0000000008000f94 . = ALIGN (0x4) + 0x0000000008000f94 PROVIDE (__preinit_array_start = .) *(.preinit_array*) - 0x0000000008000e30 PROVIDE (__preinit_array_end = .) - 0x0000000008000e30 . = ALIGN (0x4) + 0x0000000008000f94 PROVIDE (__preinit_array_end = .) + 0x0000000008000f94 . = ALIGN (0x4) -.init_array 0x0000000008000e30 0x4 - 0x0000000008000e30 . = ALIGN (0x4) - 0x0000000008000e30 PROVIDE (__init_array_start = .) +.init_array 0x0000000008000f94 0x4 + 0x0000000008000f94 . = ALIGN (0x4) + 0x0000000008000f94 PROVIDE (__init_array_start = .) *(SORT_BY_NAME(.init_array.*)) *(.init_array*) - .init_array 0x0000000008000e30 0x4 c:/st/stm32cubeide_1.4.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crtbegin.o - 0x0000000008000e34 PROVIDE (__init_array_end = .) - 0x0000000008000e34 . = ALIGN (0x4) + .init_array 0x0000000008000f94 0x4 c:/st/stm32cubeide_1.4.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crtbegin.o + 0x0000000008000f98 PROVIDE (__init_array_end = .) + 0x0000000008000f98 . = ALIGN (0x4) -.fini_array 0x0000000008000e34 0x4 - 0x0000000008000e34 . = ALIGN (0x4) +.fini_array 0x0000000008000f98 0x4 + 0x0000000008000f98 . = ALIGN (0x4) [!provide] PROVIDE (__fini_array_start = .) *(SORT_BY_NAME(.fini_array.*)) *(.fini_array*) - .fini_array 0x0000000008000e34 0x4 c:/st/stm32cubeide_1.4.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crtbegin.o + .fini_array 0x0000000008000f98 0x4 c:/st/stm32cubeide_1.4.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crtbegin.o [!provide] PROVIDE (__fini_array_end = .) - 0x0000000008000e38 . = ALIGN (0x4) - 0x0000000008000e38 _sidata = LOADADDR (.data) + 0x0000000008000f9c . = ALIGN (0x4) + 0x0000000008000f9c _sidata = LOADADDR (.data) -.data 0x0000000020000000 0x10 load address 0x0000000008000e38 +.data 0x0000000020000000 0xc load address 0x0000000008000f9c 0x0000000020000000 . = ALIGN (0x4) 0x0000000020000000 _sdata = . *(.data) *(.data*) - .data.expe 0x0000000020000000 0x1 Core/Src/main.o - 0x0000000020000000 expe - *fill* 0x0000000020000001 0x3 .data.SystemCoreClock - 0x0000000020000004 0x4 Core/Src/system_stm32l4xx.o - 0x0000000020000004 SystemCoreClock + 0x0000000020000000 0x4 Core/Src/system_stm32l4xx.o + 0x0000000020000000 SystemCoreClock .data.uwTickPrio - 0x0000000020000008 0x4 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.o - 0x0000000020000008 uwTickPrio + 0x0000000020000004 0x4 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.o + 0x0000000020000004 uwTickPrio .data.uwTickFreq - 0x000000002000000c 0x1 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.o - 0x000000002000000c uwTickFreq - 0x0000000020000010 . = ALIGN (0x4) - *fill* 0x000000002000000d 0x3 - 0x0000000020000010 _edata = . + 0x0000000020000008 0x1 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.o + 0x0000000020000008 uwTickFreq + 0x000000002000000c . = ALIGN (0x4) + *fill* 0x0000000020000009 0x3 + 0x000000002000000c _edata = . -.igot.plt 0x0000000020000010 0x0 load address 0x0000000008000e48 - .igot.plt 0x0000000020000010 0x0 c:/st/stm32cubeide_1.4.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crtbegin.o - 0x0000000020000010 . = ALIGN (0x4) +.igot.plt 0x000000002000000c 0x0 load address 0x0000000008000fa8 + .igot.plt 0x000000002000000c 0x0 c:/st/stm32cubeide_1.4.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crtbegin.o + 0x000000002000000c . = ALIGN (0x4) -.bss 0x0000000020000010 0x24 load address 0x0000000008000e48 - 0x0000000020000010 _sbss = . - 0x0000000020000010 __bss_start__ = _sbss +.bss 0x000000002000000c 0x24 load address 0x0000000008000fa8 + 0x000000002000000c _sbss = . + 0x000000002000000c __bss_start__ = _sbss *(.bss) - .bss 0x0000000020000010 0x1c c:/st/stm32cubeide_1.4.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crtbegin.o + .bss 0x000000002000000c 0x1c c:/st/stm32cubeide_1.4.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crtbegin.o *(.bss*) - .bss.msTicks 0x000000002000002c 0x4 Core/Src/main.o - 0x000000002000002c msTicks + .bss.msTicks 0x0000000020000028 0x4 Core/Src/main.o + 0x0000000020000028 msTicks + .bss.expe 0x000000002000002c 0x1 Core/Src/main.o + 0x000000002000002c expe .bss.blue_mode - 0x0000000020000030 0x1 Core/Src/main.o - 0x0000000020000030 blue_mode + 0x000000002000002d 0x1 Core/Src/main.o + 0x000000002000002d blue_mode *(COMMON) - 0x0000000020000034 . = ALIGN (0x4) - *fill* 0x0000000020000031 0x3 - 0x0000000020000034 _ebss = . - 0x0000000020000034 __bss_end__ = _ebss + 0x0000000020000030 . = ALIGN (0x4) + *fill* 0x000000002000002e 0x2 + 0x0000000020000030 _ebss = . + 0x0000000020000030 __bss_end__ = _ebss ._user_heap_stack - 0x0000000020000034 0x604 load address 0x0000000008000e48 - 0x0000000020000038 . = ALIGN (0x8) - *fill* 0x0000000020000034 0x4 + 0x0000000020000030 0x600 load address 0x0000000008000fa8 + 0x0000000020000030 . = ALIGN (0x8) [!provide] PROVIDE (end = .) - 0x0000000020000038 PROVIDE (_end = .) - 0x0000000020000238 . = (. + _Min_Heap_Size) - *fill* 0x0000000020000038 0x200 - 0x0000000020000638 . = (. + _Min_Stack_Size) - *fill* 0x0000000020000238 0x400 - 0x0000000020000638 . = ALIGN (0x8) + 0x0000000020000030 PROVIDE (_end = .) + 0x0000000020000230 . = (. + _Min_Heap_Size) + *fill* 0x0000000020000030 0x200 + 0x0000000020000630 . = (. + _Min_Stack_Size) + *fill* 0x0000000020000230 0x400 + 0x0000000020000630 . = ALIGN (0x8) /DISCARD/ libc.a(*) @@ -3862,15 +3863,15 @@ LOAD c:/st/stm32cubeide_1.4.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.exte 0x000000000000023a 0x22 c:/st/stm32cubeide_1.4.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crtn.o OUTPUT(RealOne.elf elf32-littlearm) -.debug_info 0x0000000000000000 0x4920 +.debug_info 0x0000000000000000 0x4be7 .debug_info 0x0000000000000000 0x84a Core/Src/gpio.o - .debug_info 0x000000000000084a 0xd0e Core/Src/main.o - .debug_info 0x0000000000001558 0x35e Core/Src/stm32l4xx_it.o - .debug_info 0x00000000000018b6 0x727 Core/Src/system_stm32l4xx.o - .debug_info 0x0000000000001fdd 0x22 Core/Startup/startup_stm32l476rgtx.o - .debug_info 0x0000000000001fff 0xc20 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.o - .debug_info 0x0000000000002c1f 0xf6d Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.o - .debug_info 0x0000000000003b8c 0xd94 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_utils.o + .debug_info 0x000000000000084a 0xfd5 Core/Src/main.o + .debug_info 0x000000000000181f 0x35e Core/Src/stm32l4xx_it.o + .debug_info 0x0000000000001b7d 0x727 Core/Src/system_stm32l4xx.o + .debug_info 0x00000000000022a4 0x22 Core/Startup/startup_stm32l476rgtx.o + .debug_info 0x00000000000022c6 0xc20 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.o + .debug_info 0x0000000000002ee6 0xf6d Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.o + .debug_info 0x0000000000003e53 0xd94 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_utils.o .debug_abbrev 0x0000000000000000 0xd51 .debug_abbrev 0x0000000000000000 0x233 Core/Src/gpio.o @@ -3882,33 +3883,33 @@ OUTPUT(RealOne.elf elf32-littlearm) .debug_abbrev 0x000000000000081f 0x2fa Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.o .debug_abbrev 0x0000000000000b19 0x238 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_utils.o -.debug_aranges 0x0000000000000000 0x5b8 +.debug_aranges 0x0000000000000000 0x5c0 .debug_aranges 0x0000000000000000 0x70 Core/Src/gpio.o .debug_aranges - 0x0000000000000070 0x120 Core/Src/main.o + 0x0000000000000070 0x128 Core/Src/main.o .debug_aranges - 0x0000000000000190 0x58 Core/Src/stm32l4xx_it.o + 0x0000000000000198 0x58 Core/Src/stm32l4xx_it.o .debug_aranges - 0x00000000000001e8 0x28 Core/Src/system_stm32l4xx.o + 0x00000000000001f0 0x28 Core/Src/system_stm32l4xx.o .debug_aranges - 0x0000000000000210 0x28 Core/Startup/startup_stm32l476rgtx.o + 0x0000000000000218 0x28 Core/Startup/startup_stm32l476rgtx.o .debug_aranges - 0x0000000000000238 0x130 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.o + 0x0000000000000240 0x130 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.o .debug_aranges - 0x0000000000000368 0x118 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.o + 0x0000000000000370 0x118 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.o .debug_aranges - 0x0000000000000480 0x138 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_utils.o + 0x0000000000000488 0x138 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_utils.o -.debug_ranges 0x0000000000000000 0x540 +.debug_ranges 0x0000000000000000 0x548 .debug_ranges 0x0000000000000000 0x60 Core/Src/gpio.o - .debug_ranges 0x0000000000000060 0x110 Core/Src/main.o - .debug_ranges 0x0000000000000170 0x48 Core/Src/stm32l4xx_it.o - .debug_ranges 0x00000000000001b8 0x18 Core/Src/system_stm32l4xx.o - .debug_ranges 0x00000000000001d0 0x20 Core/Startup/startup_stm32l476rgtx.o - .debug_ranges 0x00000000000001f0 0x120 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.o - .debug_ranges 0x0000000000000310 0x108 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.o - .debug_ranges 0x0000000000000418 0x128 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_utils.o + .debug_ranges 0x0000000000000060 0x118 Core/Src/main.o + .debug_ranges 0x0000000000000178 0x48 Core/Src/stm32l4xx_it.o + .debug_ranges 0x00000000000001c0 0x18 Core/Src/system_stm32l4xx.o + .debug_ranges 0x00000000000001d8 0x20 Core/Startup/startup_stm32l476rgtx.o + .debug_ranges 0x00000000000001f8 0x120 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.o + .debug_ranges 0x0000000000000318 0x108 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.o + .debug_ranges 0x0000000000000420 0x128 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_utils.o .debug_macro 0x0000000000000000 0x26337 .debug_macro 0x0000000000000000 0x204 Core/Src/gpio.o @@ -3968,32 +3969,32 @@ OUTPUT(RealOne.elf elf32-littlearm) .debug_macro 0x0000000000025ffb 0x29b Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_utils.o .debug_macro 0x0000000000026296 0xa1 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_utils.o -.debug_line 0x0000000000000000 0x40e6 +.debug_line 0x0000000000000000 0x4155 .debug_line 0x0000000000000000 0x7e6 Core/Src/gpio.o - .debug_line 0x00000000000007e6 0xacc Core/Src/main.o - .debug_line 0x00000000000012b2 0x855 Core/Src/stm32l4xx_it.o - .debug_line 0x0000000000001b07 0x6eb Core/Src/system_stm32l4xx.o - .debug_line 0x00000000000021f2 0x87 Core/Startup/startup_stm32l476rgtx.o - .debug_line 0x0000000000002279 0x961 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.o - .debug_line 0x0000000000002bda 0x9e9 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.o - .debug_line 0x00000000000035c3 0xb23 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_utils.o + .debug_line 0x00000000000007e6 0xb3b Core/Src/main.o + .debug_line 0x0000000000001321 0x855 Core/Src/stm32l4xx_it.o + .debug_line 0x0000000000001b76 0x6eb Core/Src/system_stm32l4xx.o + .debug_line 0x0000000000002261 0x87 Core/Startup/startup_stm32l476rgtx.o + .debug_line 0x00000000000022e8 0x961 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.o + .debug_line 0x0000000000002c49 0x9e9 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.o + .debug_line 0x0000000000003632 0xb23 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_utils.o -.debug_str 0x0000000000000000 0xee792 +.debug_str 0x0000000000000000 0xee8e8 .debug_str 0x0000000000000000 0xe3d91 Core/Src/gpio.o 0xe4dab (size before relaxing) - .debug_str 0x00000000000e3d91 0x8d43 Core/Src/main.o - 0xed98d (size before relaxing) - .debug_str 0x00000000000ecad4 0xad Core/Src/stm32l4xx_it.o + .debug_str 0x00000000000e3d91 0x8e99 Core/Src/main.o + 0xedae3 (size before relaxing) + .debug_str 0x00000000000ecc2a 0xad Core/Src/stm32l4xx_it.o 0xed404 (size before relaxing) - .debug_str 0x00000000000ecb81 0x79 Core/Src/system_stm32l4xx.o + .debug_str 0x00000000000eccd7 0x79 Core/Src/system_stm32l4xx.o 0xe3959 (size before relaxing) - .debug_str 0x00000000000ecbfa 0x36 Core/Startup/startup_stm32l476rgtx.o + .debug_str 0x00000000000ecd50 0x36 Core/Startup/startup_stm32l476rgtx.o 0x62 (size before relaxing) - .debug_str 0x00000000000ecc30 0x9fa Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.o + .debug_str 0x00000000000ecd86 0x9fa Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.o 0xe443d (size before relaxing) - .debug_str 0x00000000000ed62a 0x3a6 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.o + .debug_str 0x00000000000ed780 0x3a6 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.o 0xe41ad (size before relaxing) - .debug_str 0x00000000000ed9d0 0xdc2 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_utils.o + .debug_str 0x00000000000edb26 0xdc2 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_utils.o 0xea58d (size before relaxing) .comment 0x0000000000000000 0x7b @@ -4006,12 +4007,12 @@ OUTPUT(RealOne.elf elf32-littlearm) .comment 0x000000000000007b 0x7c Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.o .comment 0x000000000000007b 0x7c Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_utils.o -.debug_frame 0x0000000000000000 0x15c0 +.debug_frame 0x0000000000000000 0x15dc .debug_frame 0x0000000000000000 0x1a0 Core/Src/gpio.o - .debug_frame 0x00000000000001a0 0x480 Core/Src/main.o - .debug_frame 0x0000000000000620 0xf0 Core/Src/stm32l4xx_it.o - .debug_frame 0x0000000000000710 0x58 Core/Src/system_stm32l4xx.o - .debug_frame 0x0000000000000768 0x498 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.o - .debug_frame 0x0000000000000c00 0x498 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.o - .debug_frame 0x0000000000001098 0x4fc Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_utils.o - .debug_frame 0x0000000000001594 0x2c c:/st/stm32cubeide_1.4.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard\libc_nano.a(lib_a-init.o) + .debug_frame 0x00000000000001a0 0x49c Core/Src/main.o + .debug_frame 0x000000000000063c 0xf0 Core/Src/stm32l4xx_it.o + .debug_frame 0x000000000000072c 0x58 Core/Src/system_stm32l4xx.o + .debug_frame 0x0000000000000784 0x498 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.o + .debug_frame 0x0000000000000c1c 0x498 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.o + .debug_frame 0x00000000000010b4 0x4fc Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_utils.o + .debug_frame 0x00000000000015b0 0x2c c:/st/stm32cubeide_1.4.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard\libc_nano.a(lib_a-init.o)