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
-
+