Merge branch 'master' of https://git.etud.insa-toulouse.fr/bourlot/LoPoSo
This commit is contained in:
commit
1fd098a067
72 changed files with 5390 additions and 7322 deletions
|
@ -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
|
!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%)
|
!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.
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
NUMBER_FORMAT=0
|
|
@ -1,2 +1,3 @@
|
||||||
*** SESSION Nov 05, 2020 10:46:36.34 -------------------------------------------
|
*** SESSION Nov 05, 2020 10:46:36.34 -------------------------------------------
|
||||||
*** SESSION Nov 16, 2020 08:11:47.28 -------------------------------------------
|
*** SESSION Nov 16, 2020 08:11:47.28 -------------------------------------------
|
||||||
|
*** SESSION Nov 17, 2020 08:14:51.13 -------------------------------------------
|
||||||
|
|
Binary file not shown.
|
@ -0,0 +1,9 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<section name="Workbench">
|
||||||
|
<section name="org.eclipse.cdt.dsf.debug.internal.ui.ExpressionInformationControlCreator$ExpressionInformationControl">
|
||||||
|
<item key="WIDTH" value="816"/>
|
||||||
|
<item key="HEIGHT" value="297"/>
|
||||||
|
<item key="SashWeightTree" value="200"/>
|
||||||
|
<item key="SashWeightDetails" value="200"/>
|
||||||
|
</section>
|
||||||
|
</section>
|
|
@ -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
|
make -j8 all
|
||||||
arm-none-eabi-size RealOne.elf
|
arm-none-eabi-size RealOne.elf
|
||||||
text data bss dec hex filename
|
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
|
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)
|
||||||
|
|
||||||
|
|
|
@ -8,4 +8,6 @@
|
||||||
<item key="size.width" value="586"/>
|
<item key="size.width" value="586"/>
|
||||||
<item key="size.height" value="180"/>
|
<item key="size.height" value="180"/>
|
||||||
</section>
|
</section>
|
||||||
|
<section name="PDOMSearchPage">
|
||||||
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -154,3 +154,614 @@ arm-none-eabi-size RealOne.elf
|
||||||
3632 24 1576 5232 1470 RealOne.elf
|
3632 24 1576 5232 1470 RealOne.elf
|
||||||
Finished building: default.size.stdout
|
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 */
|
||||||
|
|
||||||
|
<command-line>: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
|
||||||
|
|
||||||
|
<command-line>: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
|
||||||
|
|
||||||
|
<command-line>: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
|
||||||
|
|
||||||
|
<command-line>: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 */
|
||||||
|
|
||||||
|
<command-line>: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
|
||||||
|
|
||||||
|
<command-line>: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
|
||||||
|
|
||||||
|
<command-line>: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
|
||||||
|
|
||||||
|
<command-line>: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 */
|
||||||
|
|
||||||
|
<command-line>: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
|
||||||
|
|
||||||
|
<command-line>: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
|
||||||
|
|
||||||
|
<command-line>: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
|
||||||
|
|
||||||
|
<command-line>: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 */
|
||||||
|
|
||||||
|
<command-line>: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
|
||||||
|
|
||||||
|
<command-line>: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
|
||||||
|
|
||||||
|
<command-line>: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
|
||||||
|
|
||||||
|
<command-line>: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 */
|
||||||
|
|
||||||
|
<command-line>: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
|
||||||
|
|
||||||
|
<command-line>: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
|
||||||
|
|
||||||
|
<command-line>: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
|
||||||
|
|
||||||
|
<command-line>: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 */
|
||||||
|
|
||||||
|
<command-line>: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
|
||||||
|
|
||||||
|
<command-line>: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
|
||||||
|
|
||||||
|
<command-line>: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
|
||||||
|
|
||||||
|
<command-line>: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 */
|
||||||
|
|
||||||
|
<command-line>: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
|
||||||
|
|
||||||
|
<command-line>: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
|
||||||
|
|
||||||
|
<command-line>: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
|
||||||
|
|
||||||
|
<command-line>: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 */
|
||||||
|
|
||||||
|
<command-line>: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
|
||||||
|
|
||||||
|
<command-line>: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
|
||||||
|
|
||||||
|
<command-line>: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
|
||||||
|
|
||||||
|
<command-line>: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 */
|
||||||
|
|
||||||
|
<command-line>: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
|
||||||
|
|
||||||
|
<command-line>: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 */
|
||||||
|
|
||||||
|
<command-line>:0:0: note: this is the location of the previous definition
|
||||||
|
<command-line>:0:0: note: this is the location of the previous definition
|
||||||
|
<command-line>: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
|
||||||
|
|
||||||
|
<command-line>: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
|
||||||
|
|
||||||
|
<command-line>:0:0: note: this is the location of the previous definition
|
||||||
|
<command-line>: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
|
||||||
|
|
||||||
|
<command-line>: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
|
||||||
|
|
||||||
|
<command-line>: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
|
||||||
|
|
||||||
|
<command-line>:0:0: note: this is the location of the previous definition
|
||||||
|
<command-line>: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 */
|
||||||
|
|
||||||
|
<command-line>: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
|
||||||
|
|
||||||
|
<command-line>: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
|
||||||
|
|
||||||
|
<command-line>: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
|
||||||
|
|
||||||
|
<command-line>: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
|
||||||
|
|
||||||
|
|
|
@ -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();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -108,6 +108,7 @@ while (1) {
|
||||||
*/
|
*/
|
||||||
void SystemClock_Config_24M_LSE(void)
|
void SystemClock_Config_24M_LSE(void)
|
||||||
{
|
{
|
||||||
|
LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
|
||||||
LL_FLASH_SetLatency(LL_FLASH_LATENCY_1);
|
LL_FLASH_SetLatency(LL_FLASH_LATENCY_1);
|
||||||
while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_1)
|
while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_1)
|
||||||
{
|
{
|
||||||
|
@ -121,6 +122,16 @@ void SystemClock_Config_24M_LSE(void)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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();
|
LL_RCC_LSE_Enable();
|
||||||
|
|
||||||
/* Wait till LSE is ready */
|
/* Wait till LSE is ready */
|
||||||
|
@ -131,15 +142,6 @@ void SystemClock_Config_24M_LSE(void)
|
||||||
LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE);
|
LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE);
|
||||||
LL_RCC_EnableRTC();
|
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_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_EnableDomain_SYS();
|
||||||
LL_RCC_PLL_Enable();
|
LL_RCC_PLL_Enable();
|
|
@ -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();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -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();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -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();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -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();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -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();
|
|
||||||
}
|
|
|
@ -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();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -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();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -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();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -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();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -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();
|
||||||
|
}
|
||||||
|
}
|
|
@ -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();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -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();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -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();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -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
|
|
||||||
*
|
|
||||||
* <h2><center>© Copyright (c) 2020 STMicroelectronics.
|
|
||||||
* All rights reserved.</center></h2>
|
|
||||||
*
|
|
||||||
* 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****/
|
|
|
@ -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
|
|
||||||
*
|
|
||||||
* <h2><center>© Copyright (c) 2020 STMicroelectronics.
|
|
||||||
* All rights reserved.</center></h2>
|
|
||||||
*
|
|
||||||
* 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****/
|
|
|
@ -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();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -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();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -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();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -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();
|
||||||
|
}
|
||||||
|
}
|
|
@ -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();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -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();
|
||||||
|
}
|
||||||
|
}
|
|
@ -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();
|
||||||
|
}
|
||||||
|
}
|
|
@ -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();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -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
|
|
||||||
*
|
|
||||||
* <h2><center>© Copyright (c) 2020 STMicroelectronics.
|
|
||||||
* All rights reserved.</center></h2>
|
|
||||||
*
|
|
||||||
* 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****/
|
|
|
@ -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();
|
||||||
|
}
|
||||||
|
}
|
|
@ -46,13 +46,11 @@ int main(void)
|
||||||
|
|
||||||
//expe = register RTC
|
//expe = register RTC
|
||||||
expe = RTC->BKP0R;
|
expe = RTC->BKP0R;
|
||||||
if (expe == 0){
|
|
||||||
expe = 1;
|
if (BLUE_BUTTON()){
|
||||||
RTC->BKP0R = expe;
|
|
||||||
}else if (expe != 0 && BLUE_BUTTON()){
|
|
||||||
expe ++;
|
expe ++;
|
||||||
RTC->BKP0R = expe;
|
RTC->BKP0R = expe;
|
||||||
}
|
|
||||||
}else{
|
}else{
|
||||||
SystemClock_Config_24M_LSE();
|
SystemClock_Config_24M_LSE();
|
||||||
expe = 1;
|
expe = 1;
|
||||||
|
@ -61,8 +59,6 @@ int main(void)
|
||||||
RTC->BKP0R = expe;
|
RTC->BKP0R = expe;
|
||||||
}
|
}
|
||||||
LL_PWR_DisableBkUpAccess();
|
LL_PWR_DisableBkUpAccess();
|
||||||
|
|
||||||
|
|
||||||
switch(expe){
|
switch(expe){
|
||||||
case 1:
|
case 1:
|
||||||
/* Configure the system clock */
|
/* Configure the system clock */
|
||||||
|
@ -110,6 +106,7 @@ while (1) {
|
||||||
*/
|
*/
|
||||||
void SystemClock_Config_24M_LSE(void)
|
void SystemClock_Config_24M_LSE(void)
|
||||||
{
|
{
|
||||||
|
LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
|
||||||
LL_FLASH_SetLatency(LL_FLASH_LATENCY_1);
|
LL_FLASH_SetLatency(LL_FLASH_LATENCY_1);
|
||||||
while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_1)
|
while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_1)
|
||||||
{
|
{
|
||||||
|
@ -122,14 +119,17 @@ 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_PWR_EnableBkUpAccess();
|
||||||
LL_RCC_ForceBackupDomainReset();
|
LL_RCC_ForceBackupDomainReset();
|
||||||
LL_RCC_ReleaseBackupDomainReset();
|
LL_RCC_ReleaseBackupDomainReset();
|
||||||
LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW);
|
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();
|
LL_RCC_LSE_Enable();
|
||||||
|
|
||||||
/* Wait till LSE is ready */
|
/* Wait till LSE is ready */
|
||||||
|
@ -139,6 +139,7 @@ void SystemClock_Config_24M_LSE(void)
|
||||||
}
|
}
|
||||||
LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE);
|
LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE);
|
||||||
LL_RCC_EnableRTC();
|
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_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_EnableDomain_SYS();
|
||||||
LL_RCC_PLL_Enable();
|
LL_RCC_PLL_Enable();
|
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
// systick interrupt handler
|
// systick interrupt handler
|
||||||
volatile uint32_t msTicks = 0;
|
volatile uint32_t msTicks = 0;
|
||||||
volatile uint8_t expe = 1;
|
volatile uint8_t expe = 2;
|
||||||
volatile uint8_t blue_mode = 0;
|
volatile uint8_t blue_mode = 0;
|
||||||
|
|
||||||
void SysTick_Handler()
|
void SysTick_Handler()
|
||||||
|
@ -108,6 +108,7 @@ while (1) {
|
||||||
*/
|
*/
|
||||||
void SystemClock_Config_24M_LSE(void)
|
void SystemClock_Config_24M_LSE(void)
|
||||||
{
|
{
|
||||||
|
LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
|
||||||
LL_FLASH_SetLatency(LL_FLASH_LATENCY_1);
|
LL_FLASH_SetLatency(LL_FLASH_LATENCY_1);
|
||||||
while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_1)
|
while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_1)
|
||||||
{
|
{
|
||||||
|
@ -121,6 +122,16 @@ void SystemClock_Config_24M_LSE(void)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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();
|
LL_RCC_LSE_Enable();
|
||||||
|
|
||||||
/* Wait till LSE is ready */
|
/* Wait till LSE is ready */
|
||||||
|
@ -131,15 +142,6 @@ void SystemClock_Config_24M_LSE(void)
|
||||||
LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE);
|
LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE);
|
||||||
LL_RCC_EnableRTC();
|
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_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_EnableDomain_SYS();
|
||||||
LL_RCC_PLL_Enable();
|
LL_RCC_PLL_Enable();
|
|
@ -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();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -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();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,252 +0,0 @@
|
||||||
/* USER CODE BEGIN Header */
|
|
||||||
/**
|
|
||||||
******************************************************************************
|
|
||||||
* @file : main.c
|
|
||||||
* @brief : Main program body
|
|
||||||
******************************************************************************
|
|
||||||
* @attention
|
|
||||||
*
|
|
||||||
* <h2><center>© Copyright (c) 2020 STMicroelectronics.
|
|
||||||
* All rights reserved.</center></h2>
|
|
||||||
*
|
|
||||||
* 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****/
|
|
|
@ -64,6 +64,7 @@ extern "C" {
|
||||||
void Error_Handler(void);
|
void Error_Handler(void);
|
||||||
void SystemClock_Config_24M_LSE(void);
|
void SystemClock_Config_24M_LSE(void);
|
||||||
void SystemClock_Config_80M(void);
|
void SystemClock_Config_80M(void);
|
||||||
|
void Init_LSE(void);
|
||||||
/* USER CODE BEGIN EFP */
|
/* USER CODE BEGIN EFP */
|
||||||
|
|
||||||
/* USER CODE END EFP */
|
/* USER CODE END EFP */
|
|
@ -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();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -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();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -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();
|
||||||
|
}
|
||||||
|
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -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
|
|
@ -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.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,;
|
//org.eclipse.debug.core.PREFERRED_DELEGATES/org.eclipse.cdt.launch.remoteApplicationLaunchType=org.eclipse.rse.remotecdt.dsf.debug,debug,;
|
||||||
eclipse.preferences.version=1
|
eclipse.preferences.version=1
|
||||||
prefWatchExpressions=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?>\r\n<watchExpressions/>\r\n
|
prefWatchExpressions=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?>\r\n<watchExpressions>\r\n<expression enabled\="true" text\="expe"/>\r\n<expression enabled\="true" text\="blue_mode"/>\r\n<expression enabled\="true" text\="RTC->BKP0R"/>\r\n</watchExpressions>\r\n
|
||||||
|
|
|
@ -2,5 +2,7 @@ eclipse.preferences.version=1
|
||||||
org.eclipse.debug.ui.MemoryView.orientation=0
|
org.eclipse.debug.ui.MemoryView.orientation=0
|
||||||
org.eclipse.debug.ui.PREF_LAUNCH_PERSPECTIVES=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?>\r\n<launchPerspectives/>\r\n
|
org.eclipse.debug.ui.PREF_LAUNCH_PERSPECTIVES=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?>\r\n<launchPerspectives/>\r\n
|
||||||
org.eclipse.debug.ui.user_view_bindings=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?>\r\n<viewBindings>\r\n<view id\="org.eclipse.debug.ui.ExpressionView">\r\n<perspective id\="org.eclipse.debug.ui.DebugPerspective" userAction\="opened"/>\r\n</view>\r\n</viewBindings>\r\n
|
org.eclipse.debug.ui.user_view_bindings=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?>\r\n<viewBindings>\r\n<view id\="org.eclipse.debug.ui.ExpressionView">\r\n<perspective id\="org.eclipse.debug.ui.DebugPerspective" userAction\="opened"/>\r\n</view>\r\n</viewBindings>\r\n
|
||||||
|
pref_state_memento.org.eclipse.debug.ui.ExpressionView=<?xml version\="1.0" encoding\="UTF-8"?>\r\n<VariablesViewMemento org.eclipse.debug.ui.SASH_DETAILS_PART\="315" org.eclipse.debug.ui.SASH_VIEW_PART\="684">\r\n<PRESENTATION_CONTEXT_PROPERTIES IMemento.internal.id\="org.eclipse.debug.ui.ExpressionView">\r\n<INTEGER IMemento.internal.id\="initialChildCountLimitForCollections" INTEGER\="100"/>\r\n<PERSISTABLE IMemento.internal.id\="org.eclipse.cdt.dsf.ui.elementFormatPersistable" PERSISTABLE\="org.eclipse.cdt.dsf.ui.simpleMapPersistableFactory">\r\n<type>java.lang.String</type>\r\n</PERSISTABLE>\r\n<BOOLEAN BOOLEAN\="true" IMemento.internal.id\="PRESENTATION_SHOW_LOGICAL_STRUCTURES"/>\r\n</PRESENTATION_CONTEXT_PROPERTIES>\r\n</VariablesViewMemento>
|
||||||
|
pref_state_memento.org.eclipse.debug.ui.VariableView=<?xml version\="1.0" encoding\="UTF-8"?>\r\n<VariablesViewMemento org.eclipse.debug.ui.SASH_DETAILS_PART\="315" org.eclipse.debug.ui.SASH_VIEW_PART\="684">\r\n<PRESENTATION_CONTEXT_PROPERTIES IMemento.internal.id\="org.eclipse.debug.ui.VariableView">\r\n<INTEGER IMemento.internal.id\="initialChildCountLimitForCollections" INTEGER\="100"/>\r\n<BOOLEAN BOOLEAN\="true" IMemento.internal.id\="PRESENTATION_SHOW_LOGICAL_STRUCTURES"/>\r\n</PRESENTATION_CONTEXT_PROPERTIES>\r\n</VariablesViewMemento>
|
||||||
preferredDetailPanes=NumberFormatPane\:NumberFormatPane|DefaultDetailPane\:DefaultDetailPane|
|
preferredDetailPanes=NumberFormatPane\:NumberFormatPane|DefaultDetailPane\:DefaultDetailPane|
|
||||||
preferredTargets=org.eclipse.cdt.debug.ui.toggleCBreakpointTarget,org.eclipse.cdt.debug.ui.toggleCDynamicPrintfTarget\:org.eclipse.cdt.debug.ui.toggleCBreakpointTarget|
|
preferredTargets=org.eclipse.cdt.debug.ui.toggleCBreakpointTarget,org.eclipse.cdt.debug.ui.toggleCDynamicPrintfTarget\:org.eclipse.cdt.debug.ui.toggleCBreakpointTarget|
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,28 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<section name="Workbench">
|
||||||
|
<section name="SearchDialog">
|
||||||
|
<item key="PREVIOUS_PAGE" value="org.eclipse.cdt.ui.pdomSearchPage"/>
|
||||||
|
</section>
|
||||||
|
<section name="Search">
|
||||||
|
<list key="Search.processedPageIds">
|
||||||
|
<item value="org.eclipse.rse.internal.files.ui.search.searchPage"/>
|
||||||
|
<item value="org.eclipse.search.internal.ui.text.TextSearchPage"/>
|
||||||
|
<item value="org.eclipse.cdt.ui.pdomSearchPage"/>
|
||||||
|
</list>
|
||||||
|
<list key="Search.enabledPageIds">
|
||||||
|
<item value="org.eclipse.rse.internal.files.ui.search.searchPage"/>
|
||||||
|
<item value="org.eclipse.search.internal.ui.text.TextSearchPage"/>
|
||||||
|
<item value="org.eclipse.cdt.ui.pdomSearchPage"/>
|
||||||
|
</list>
|
||||||
|
</section>
|
||||||
|
<section name="SearchDialog.ScopePart">
|
||||||
|
<item key="scope" value="0"/>
|
||||||
|
</section>
|
||||||
|
<section name="DialogBounds_SearchDialog">
|
||||||
|
<item key="DIALOG_X_ORIGIN" value="635"/>
|
||||||
|
<item key="DIALOG_Y_ORIGIN" value="174"/>
|
||||||
|
<item key="DIALOG_WIDTH" value="669"/>
|
||||||
|
<item key="DIALOG_HEIGHT" value="525"/>
|
||||||
|
<item key="DIALOG_FONT_NAME" value="1|Segoe UI|9.0|0|WINDOWS|1|-15|0|0|0|400|0|0|0|1|0|0|0|0|Segoe UI"/>
|
||||||
|
</section>
|
||||||
|
</section>
|
|
@ -0,0 +1,23 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<section name="Workbench">
|
||||||
|
<section name="org.eclipse.ui.texteditor.FindReplaceDialog">
|
||||||
|
<item key="selection" value="RCC_BDCR_LSEON"/>
|
||||||
|
<item key="wrap" value="true"/>
|
||||||
|
<item key="casesensitive" value="false"/>
|
||||||
|
<item key="wholeword" value="false"/>
|
||||||
|
<item key="incremental" value="false"/>
|
||||||
|
<item key="isRegEx" value="false"/>
|
||||||
|
<list key="findhistory">
|
||||||
|
<item value="RCC_BDCR_LSEON"/>
|
||||||
|
</list>
|
||||||
|
<list key="replacehistory">
|
||||||
|
</list>
|
||||||
|
</section>
|
||||||
|
<section name="org.eclipse.ui.texteditor.FindReplaceDialog_dialogBounds">
|
||||||
|
<item key="DIALOG_X_ORIGIN" value="1152"/>
|
||||||
|
<item key="DIALOG_Y_ORIGIN" value="189"/>
|
||||||
|
<item key="DIALOG_WIDTH" value="336"/>
|
||||||
|
<item key="DIALOG_HEIGHT" value="454"/>
|
||||||
|
<item key="DIALOG_FONT_NAME" value="1|Segoe UI|9.0|0|WINDOWS|1|-15|0|0|0|400|0|0|0|1|0|0|0|0|Segoe UI"/>
|
||||||
|
</section>
|
||||||
|
</section>
|
|
@ -63,6 +63,7 @@ extern "C" {
|
||||||
/* Exported functions prototypes ---------------------------------------------*/
|
/* Exported functions prototypes ---------------------------------------------*/
|
||||||
void Error_Handler(void);
|
void Error_Handler(void);
|
||||||
void SystemClock_Config_24M_LSE(void);
|
void SystemClock_Config_24M_LSE(void);
|
||||||
|
void SystemClock_Config_24M_LSE_FL3_VS2(void);
|
||||||
void SystemClock_Config_80M(void);
|
void SystemClock_Config_80M(void);
|
||||||
void Init_LSE(void);
|
void Init_LSE(void);
|
||||||
/* USER CODE BEGIN EFP */
|
/* USER CODE BEGIN EFP */
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
// systick interrupt handler
|
// systick interrupt handler
|
||||||
volatile uint32_t msTicks = 0;
|
volatile uint32_t msTicks = 0;
|
||||||
volatile uint8_t expe = 2;
|
volatile uint8_t expe = 0;
|
||||||
volatile uint8_t blue_mode = 0;
|
volatile uint8_t blue_mode = 0;
|
||||||
|
|
||||||
void SysTick_Handler()
|
void SysTick_Handler()
|
||||||
|
@ -30,7 +30,7 @@ void SysTick_Handler()
|
||||||
msTicks = 0;
|
msTicks = 0;
|
||||||
LED_GREEN(1);
|
LED_GREEN(1);
|
||||||
}
|
}
|
||||||
if(expe == 2){
|
if(expe == 2 || expe == 4){
|
||||||
CLK_TOGGLE();
|
CLK_TOGGLE();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -40,27 +40,36 @@ void SysTick_Handler()
|
||||||
|
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
// config GPIO
|
||||||
|
GPIO_init();
|
||||||
|
|
||||||
// if (RCC->BDCR & RCC_BDCR_LSEON) {
|
// if (RCC->BDCR & RCC_BDCR_LSEON) {
|
||||||
// LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
|
LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
|
||||||
// LL_PWR_EnableBkUpAccess();
|
LL_PWR_EnableBkUpAccess();
|
||||||
//
|
|
||||||
// //expe = register RTC
|
//expe = register RTC
|
||||||
// expe = RTC->BKP0R;
|
expe = RTC->BKP0R;
|
||||||
// if (expe == 0){
|
if (expe == 0) {
|
||||||
// expe = 1;
|
SystemClock_Config_24M_LSE();
|
||||||
// RTC->BKP0R = expe;
|
expe = 1;
|
||||||
// }else if (expe != 0 && BLUE_BUTTON()){
|
LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
|
||||||
// expe ++;
|
LL_PWR_EnableBkUpAccess();
|
||||||
// RTC->BKP0R = expe;
|
RTC->BKP0R = expe;
|
||||||
// }
|
}
|
||||||
|
|
||||||
|
if (BLUE_BUTTON()){
|
||||||
|
|
||||||
|
expe ++;
|
||||||
|
|
||||||
|
if (expe > 4) expe = 1;
|
||||||
|
RTC->BKP0R = expe;
|
||||||
|
}
|
||||||
// }else{
|
// }else{
|
||||||
// SystemClock_Config_24M_LSE();
|
|
||||||
// expe = 1;
|
|
||||||
// LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
|
|
||||||
// LL_PWR_EnableBkUpAccess();
|
|
||||||
// RTC->BKP0R = expe;
|
|
||||||
// }
|
// }
|
||||||
// LL_PWR_DisableBkUpAccess();
|
LL_PWR_DisableBkUpAccess();
|
||||||
switch(expe){
|
switch(expe){
|
||||||
case 1:
|
case 1:
|
||||||
/* Configure the system clock */
|
/* Configure the system clock */
|
||||||
|
@ -70,50 +79,47 @@ int main(void)
|
||||||
/* Configure the system clock */
|
/* Configure the system clock */
|
||||||
SystemClock_Config_24M_LSE();
|
SystemClock_Config_24M_LSE();
|
||||||
break;
|
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();
|
||||||
|
|
||||||
// config GPIO
|
while (1) {
|
||||||
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){
|
if (blue_mode){
|
||||||
switch(expe){
|
switch(expe){
|
||||||
case 1:
|
case 1:
|
||||||
|
case 3:
|
||||||
__WFI();
|
__WFI();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
|
case 4:
|
||||||
LL_RCC_MSI_EnablePLLMode();
|
LL_RCC_MSI_EnablePLLMode();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
void SystemClock_Config_24M_LSE_FL3_VS2(void){
|
||||||
* @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_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
|
||||||
LL_FLASH_SetLatency(LL_FLASH_LATENCY_1);
|
LL_FLASH_SetLatency(LL_FLASH_LATENCY_3);
|
||||||
while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_1)
|
while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_3)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1);
|
LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE2);
|
||||||
LL_RCC_MSI_Enable();
|
LL_RCC_MSI_Enable();
|
||||||
|
|
||||||
/* Wait till MSI is ready */
|
/* Wait till MSI is ready */
|
||||||
|
@ -123,14 +129,14 @@ void SystemClock_Config_24M_LSE(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
LL_PWR_EnableBkUpAccess();
|
LL_PWR_EnableBkUpAccess();
|
||||||
LL_RCC_ForceBackupDomainReset();
|
// LL_RCC_ForceBackupDomainReset();
|
||||||
LL_RCC_ReleaseBackupDomainReset();
|
LL_RCC_ReleaseBackupDomainReset();
|
||||||
LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW);
|
LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW);
|
||||||
|
|
||||||
LL_RCC_MSI_EnableRangeSelection();
|
LL_RCC_MSI_EnableRangeSelection();
|
||||||
LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6);
|
LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6);
|
||||||
LL_RCC_MSI_SetCalibTrimming(0);
|
LL_RCC_MSI_SetCalibTrimming(0);
|
||||||
// LL_RCC_MSI_EnablePLLMode();
|
// LL_RCC_MSI_EnablePLLMode();
|
||||||
|
|
||||||
LL_RCC_LSE_Enable();
|
LL_RCC_LSE_Enable();
|
||||||
|
|
||||||
|
@ -166,7 +172,76 @@ void SystemClock_Config_24M_LSE(void)
|
||||||
/* Update the time base */
|
/* Update the time base */
|
||||||
if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK)
|
if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK)
|
||||||
{
|
{
|
||||||
// Error_Handler();
|
// 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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -212,6 +287,6 @@ void SystemClock_Config_80M(void)
|
||||||
/* Update the time base */
|
/* Update the time base */
|
||||||
if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK)
|
if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK)
|
||||||
{
|
{
|
||||||
// Error_Handler();
|
// Error_Handler();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
|
@ -14,7 +14,6 @@ stm32l4xx_ll_rcc.h:2792:22:LL_RCC_SetAPB1Prescaler 16 static
|
||||||
stm32l4xx_ll_rcc.h:2808:22:LL_RCC_SetAPB2Prescaler 16 static
|
stm32l4xx_ll_rcc.h:2808:22:LL_RCC_SetAPB2Prescaler 16 static
|
||||||
stm32l4xx_ll_rcc.h:3650:22:LL_RCC_SetRTCClockSource 16 static
|
stm32l4xx_ll_rcc.h:3650:22:LL_RCC_SetRTCClockSource 16 static
|
||||||
stm32l4xx_ll_rcc.h:3674:22:LL_RCC_EnableRTC 4 static
|
stm32l4xx_ll_rcc.h:3674:22:LL_RCC_EnableRTC 4 static
|
||||||
stm32l4xx_ll_rcc.h:3704:22:LL_RCC_ForceBackupDomainReset 4 static
|
|
||||||
stm32l4xx_ll_rcc.h:3714:22:LL_RCC_ReleaseBackupDomainReset 4 static
|
stm32l4xx_ll_rcc.h:3714:22:LL_RCC_ReleaseBackupDomainReset 4 static
|
||||||
stm32l4xx_ll_rcc.h:3733:22:LL_RCC_PLL_Enable 4 static
|
stm32l4xx_ll_rcc.h:3733:22:LL_RCC_PLL_Enable 4 static
|
||||||
stm32l4xx_ll_rcc.h:3754:26:LL_RCC_PLL_IsReady 4 static
|
stm32l4xx_ll_rcc.h:3754:26:LL_RCC_PLL_IsReady 4 static
|
||||||
|
@ -27,7 +26,9 @@ stm32l4xx_ll_cortex.h:272:22:LL_SYSTICK_EnableIT 4 static
|
||||||
stm32l4xx_ll_cortex.h:310:22:LL_LPM_EnableSleep 4 static
|
stm32l4xx_ll_cortex.h:310:22:LL_LPM_EnableSleep 4 static
|
||||||
stm32l4xx_ll_pwr.h:344:22:LL_PWR_SetRegulVoltageScaling 16 static
|
stm32l4xx_ll_pwr.h:344:22:LL_PWR_SetRegulVoltageScaling 16 static
|
||||||
stm32l4xx_ll_pwr.h:398:22:LL_PWR_EnableBkUpAccess 4 static
|
stm32l4xx_ll_pwr.h:398:22:LL_PWR_EnableBkUpAccess 4 static
|
||||||
|
stm32l4xx_ll_pwr.h:408:22:LL_PWR_DisableBkUpAccess 4 static
|
||||||
main.c:20:6:SysTick_Handler 8 static
|
main.c:20:6:SysTick_Handler 8 static
|
||||||
main.c:41:5:main 8 static,ignoring_inline_asm
|
main.c:41:5:main 8 static,ignoring_inline_asm
|
||||||
main.c:109:6:SystemClock_Config_24M_LSE 8 static
|
main.c:116:6:SystemClock_Config_24M_LSE_FL3_VS2 8 static
|
||||||
main.c:174:6:SystemClock_Config_80M 8 static
|
main.c:184:6:SystemClock_Config_24M_LSE 8 static
|
||||||
|
main.c:249:6:SystemClock_Config_80M 8 static
|
||||||
|
|
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load diff
|
@ -3456,7 +3456,7 @@ LOAD c:/st/stm32cubeide_1.4.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.exte
|
||||||
0x0000000008000000 g_pfnVectors
|
0x0000000008000000 g_pfnVectors
|
||||||
0x0000000008000188 . = ALIGN (0x4)
|
0x0000000008000188 . = ALIGN (0x4)
|
||||||
|
|
||||||
.text 0x0000000008000188 0xca8
|
.text 0x0000000008000188 0xe0c
|
||||||
0x0000000008000188 . = ALIGN (0x4)
|
0x0000000008000188 . = ALIGN (0x4)
|
||||||
*(.text)
|
*(.text)
|
||||||
.text 0x0000000008000188 0x40 c:/st/stm32cubeide_1.4.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crtbegin.o
|
.text 0x0000000008000188 0x40 c:/st/stm32cubeide_1.4.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crtbegin.o
|
||||||
|
@ -3520,313 +3520,314 @@ LOAD c:/st/stm32cubeide_1.4.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.exte
|
||||||
0x00000000080005f4 0x2c Core/Src/main.o
|
0x00000000080005f4 0x2c Core/Src/main.o
|
||||||
.text.LL_RCC_EnableRTC
|
.text.LL_RCC_EnableRTC
|
||||||
0x0000000008000620 0x24 Core/Src/main.o
|
0x0000000008000620 0x24 Core/Src/main.o
|
||||||
.text.LL_RCC_ForceBackupDomainReset
|
|
||||||
0x0000000008000644 0x24 Core/Src/main.o
|
|
||||||
.text.LL_RCC_ReleaseBackupDomainReset
|
.text.LL_RCC_ReleaseBackupDomainReset
|
||||||
0x0000000008000668 0x24 Core/Src/main.o
|
0x0000000008000644 0x24 Core/Src/main.o
|
||||||
.text.LL_RCC_PLL_Enable
|
.text.LL_RCC_PLL_Enable
|
||||||
0x000000000800068c 0x20 Core/Src/main.o
|
0x0000000008000668 0x20 Core/Src/main.o
|
||||||
.text.LL_RCC_PLL_IsReady
|
.text.LL_RCC_PLL_IsReady
|
||||||
0x00000000080006ac 0x28 Core/Src/main.o
|
0x0000000008000688 0x28 Core/Src/main.o
|
||||||
.text.LL_RCC_PLL_ConfigDomain_SYS
|
.text.LL_RCC_PLL_ConfigDomain_SYS
|
||||||
0x00000000080006d4 0x40 Core/Src/main.o
|
0x00000000080006b0 0x40 Core/Src/main.o
|
||||||
.text.LL_RCC_PLL_EnableDomain_SYS
|
.text.LL_RCC_PLL_EnableDomain_SYS
|
||||||
0x0000000008000714 0x20 Core/Src/main.o
|
0x00000000080006f0 0x20 Core/Src/main.o
|
||||||
.text.LL_APB1_GRP1_EnableClock
|
.text.LL_APB1_GRP1_EnableClock
|
||||||
0x0000000008000734 0x30 Core/Src/main.o
|
0x0000000008000710 0x30 Core/Src/main.o
|
||||||
.text.LL_FLASH_SetLatency
|
.text.LL_FLASH_SetLatency
|
||||||
0x0000000008000764 0x28 Core/Src/main.o
|
0x0000000008000740 0x28 Core/Src/main.o
|
||||||
.text.LL_FLASH_GetLatency
|
.text.LL_FLASH_GetLatency
|
||||||
0x000000000800078c 0x1c Core/Src/main.o
|
0x0000000008000768 0x1c Core/Src/main.o
|
||||||
.text.LL_SYSTICK_EnableIT
|
.text.LL_SYSTICK_EnableIT
|
||||||
0x00000000080007a8 0x20 Core/Src/main.o
|
0x0000000008000784 0x20 Core/Src/main.o
|
||||||
.text.LL_LPM_EnableSleep
|
.text.LL_LPM_EnableSleep
|
||||||
0x00000000080007c8 0x20 Core/Src/main.o
|
0x00000000080007a4 0x20 Core/Src/main.o
|
||||||
.text.LL_PWR_SetRegulVoltageScaling
|
.text.LL_PWR_SetRegulVoltageScaling
|
||||||
0x00000000080007e8 0x28 Core/Src/main.o
|
0x00000000080007c4 0x28 Core/Src/main.o
|
||||||
.text.LL_PWR_EnableBkUpAccess
|
.text.LL_PWR_EnableBkUpAccess
|
||||||
0x0000000008000810 0x20 Core/Src/main.o
|
0x00000000080007ec 0x20 Core/Src/main.o
|
||||||
|
.text.LL_PWR_DisableBkUpAccess
|
||||||
|
0x000000000800080c 0x20 Core/Src/main.o
|
||||||
.text.SysTick_Handler
|
.text.SysTick_Handler
|
||||||
0x0000000008000830 0x70 Core/Src/main.o
|
0x000000000800082c 0x7c Core/Src/main.o
|
||||||
0x0000000008000830 SysTick_Handler
|
0x000000000800082c SysTick_Handler
|
||||||
.text.main 0x00000000080008a0 0x68 Core/Src/main.o
|
.text.main 0x00000000080008a8 0xfc Core/Src/main.o
|
||||||
0x00000000080008a0 main
|
0x00000000080008a8 main
|
||||||
|
.text.SystemClock_Config_24M_LSE_FL3_VS2
|
||||||
|
0x00000000080009a4 0xcc Core/Src/main.o
|
||||||
|
0x00000000080009a4 SystemClock_Config_24M_LSE_FL3_VS2
|
||||||
.text.SystemClock_Config_24M_LSE
|
.text.SystemClock_Config_24M_LSE
|
||||||
0x0000000008000908 0xd0 Core/Src/main.o
|
0x0000000008000a70 0xcc Core/Src/main.o
|
||||||
0x0000000008000908 SystemClock_Config_24M_LSE
|
0x0000000008000a70 SystemClock_Config_24M_LSE
|
||||||
.text.SystemClock_Config_80M
|
.text.SystemClock_Config_80M
|
||||||
0x00000000080009d8 0x98 Core/Src/main.o
|
0x0000000008000b3c 0x98 Core/Src/main.o
|
||||||
0x00000000080009d8 SystemClock_Config_80M
|
0x0000000008000b3c SystemClock_Config_80M
|
||||||
.text.NMI_Handler
|
.text.NMI_Handler
|
||||||
0x0000000008000a70 0xe Core/Src/stm32l4xx_it.o
|
0x0000000008000bd4 0xe Core/Src/stm32l4xx_it.o
|
||||||
0x0000000008000a70 NMI_Handler
|
0x0000000008000bd4 NMI_Handler
|
||||||
.text.HardFault_Handler
|
.text.HardFault_Handler
|
||||||
0x0000000008000a7e 0x6 Core/Src/stm32l4xx_it.o
|
0x0000000008000be2 0x6 Core/Src/stm32l4xx_it.o
|
||||||
0x0000000008000a7e HardFault_Handler
|
0x0000000008000be2 HardFault_Handler
|
||||||
.text.MemManage_Handler
|
.text.MemManage_Handler
|
||||||
0x0000000008000a84 0x6 Core/Src/stm32l4xx_it.o
|
0x0000000008000be8 0x6 Core/Src/stm32l4xx_it.o
|
||||||
0x0000000008000a84 MemManage_Handler
|
0x0000000008000be8 MemManage_Handler
|
||||||
.text.BusFault_Handler
|
.text.BusFault_Handler
|
||||||
0x0000000008000a8a 0x6 Core/Src/stm32l4xx_it.o
|
0x0000000008000bee 0x6 Core/Src/stm32l4xx_it.o
|
||||||
0x0000000008000a8a BusFault_Handler
|
0x0000000008000bee BusFault_Handler
|
||||||
.text.UsageFault_Handler
|
.text.UsageFault_Handler
|
||||||
0x0000000008000a90 0x6 Core/Src/stm32l4xx_it.o
|
0x0000000008000bf4 0x6 Core/Src/stm32l4xx_it.o
|
||||||
0x0000000008000a90 UsageFault_Handler
|
0x0000000008000bf4 UsageFault_Handler
|
||||||
.text.SVC_Handler
|
.text.SVC_Handler
|
||||||
0x0000000008000a96 0xe Core/Src/stm32l4xx_it.o
|
0x0000000008000bfa 0xe Core/Src/stm32l4xx_it.o
|
||||||
0x0000000008000a96 SVC_Handler
|
0x0000000008000bfa SVC_Handler
|
||||||
.text.DebugMon_Handler
|
.text.DebugMon_Handler
|
||||||
0x0000000008000aa4 0xe Core/Src/stm32l4xx_it.o
|
0x0000000008000c08 0xe Core/Src/stm32l4xx_it.o
|
||||||
0x0000000008000aa4 DebugMon_Handler
|
0x0000000008000c08 DebugMon_Handler
|
||||||
.text.PendSV_Handler
|
.text.PendSV_Handler
|
||||||
0x0000000008000ab2 0xe Core/Src/stm32l4xx_it.o
|
0x0000000008000c16 0xe Core/Src/stm32l4xx_it.o
|
||||||
0x0000000008000ab2 PendSV_Handler
|
0x0000000008000c16 PendSV_Handler
|
||||||
.text.SystemInit
|
.text.SystemInit
|
||||||
0x0000000008000ac0 0x6c Core/Src/system_stm32l4xx.o
|
0x0000000008000c24 0x6c Core/Src/system_stm32l4xx.o
|
||||||
0x0000000008000ac0 SystemInit
|
0x0000000008000c24 SystemInit
|
||||||
.text.Reset_Handler
|
.text.Reset_Handler
|
||||||
0x0000000008000b2c 0x50 Core/Startup/startup_stm32l476rgtx.o
|
0x0000000008000c90 0x50 Core/Startup/startup_stm32l476rgtx.o
|
||||||
0x0000000008000b2c Reset_Handler
|
0x0000000008000c90 Reset_Handler
|
||||||
.text.Default_Handler
|
.text.Default_Handler
|
||||||
0x0000000008000b7c 0x2 Core/Startup/startup_stm32l476rgtx.o
|
0x0000000008000ce0 0x2 Core/Startup/startup_stm32l476rgtx.o
|
||||||
0x0000000008000b7c RTC_Alarm_IRQHandler
|
0x0000000008000ce0 RTC_Alarm_IRQHandler
|
||||||
0x0000000008000b7c EXTI2_IRQHandler
|
0x0000000008000ce0 EXTI2_IRQHandler
|
||||||
0x0000000008000b7c TIM8_TRG_COM_IRQHandler
|
0x0000000008000ce0 TIM8_TRG_COM_IRQHandler
|
||||||
0x0000000008000b7c TIM8_CC_IRQHandler
|
0x0000000008000ce0 TIM8_CC_IRQHandler
|
||||||
0x0000000008000b7c TIM1_CC_IRQHandler
|
0x0000000008000ce0 TIM1_CC_IRQHandler
|
||||||
0x0000000008000b7c TSC_IRQHandler
|
0x0000000008000ce0 TSC_IRQHandler
|
||||||
0x0000000008000b7c TAMP_STAMP_IRQHandler
|
0x0000000008000ce0 TAMP_STAMP_IRQHandler
|
||||||
0x0000000008000b7c EXTI3_IRQHandler
|
0x0000000008000ce0 EXTI3_IRQHandler
|
||||||
0x0000000008000b7c LPTIM2_IRQHandler
|
0x0000000008000ce0 LPTIM2_IRQHandler
|
||||||
0x0000000008000b7c DFSDM1_FLT1_IRQHandler
|
0x0000000008000ce0 DFSDM1_FLT1_IRQHandler
|
||||||
0x0000000008000b7c I2C3_ER_IRQHandler
|
0x0000000008000ce0 I2C3_ER_IRQHandler
|
||||||
0x0000000008000b7c DFSDM1_FLT2_IRQHandler
|
0x0000000008000ce0 DFSDM1_FLT2_IRQHandler
|
||||||
0x0000000008000b7c EXTI0_IRQHandler
|
0x0000000008000ce0 EXTI0_IRQHandler
|
||||||
0x0000000008000b7c I2C2_EV_IRQHandler
|
0x0000000008000ce0 I2C2_EV_IRQHandler
|
||||||
0x0000000008000b7c CAN1_RX0_IRQHandler
|
0x0000000008000ce0 CAN1_RX0_IRQHandler
|
||||||
0x0000000008000b7c FPU_IRQHandler
|
0x0000000008000ce0 FPU_IRQHandler
|
||||||
0x0000000008000b7c TIM1_UP_TIM16_IRQHandler
|
0x0000000008000ce0 TIM1_UP_TIM16_IRQHandler
|
||||||
0x0000000008000b7c ADC1_2_IRQHandler
|
0x0000000008000ce0 ADC1_2_IRQHandler
|
||||||
0x0000000008000b7c SPI1_IRQHandler
|
0x0000000008000ce0 SPI1_IRQHandler
|
||||||
0x0000000008000b7c TIM6_DAC_IRQHandler
|
0x0000000008000ce0 TIM6_DAC_IRQHandler
|
||||||
0x0000000008000b7c TIM8_UP_IRQHandler
|
0x0000000008000ce0 TIM8_UP_IRQHandler
|
||||||
0x0000000008000b7c DMA2_Channel2_IRQHandler
|
0x0000000008000ce0 DMA2_Channel2_IRQHandler
|
||||||
0x0000000008000b7c DMA1_Channel4_IRQHandler
|
0x0000000008000ce0 DMA1_Channel4_IRQHandler
|
||||||
0x0000000008000b7c SAI2_IRQHandler
|
0x0000000008000ce0 SAI2_IRQHandler
|
||||||
0x0000000008000b7c DFSDM1_FLT3_IRQHandler
|
0x0000000008000ce0 DFSDM1_FLT3_IRQHandler
|
||||||
0x0000000008000b7c USART3_IRQHandler
|
0x0000000008000ce0 USART3_IRQHandler
|
||||||
0x0000000008000b7c DMA1_Channel7_IRQHandler
|
0x0000000008000ce0 DMA1_Channel7_IRQHandler
|
||||||
0x0000000008000b7c CAN1_RX1_IRQHandler
|
0x0000000008000ce0 CAN1_RX1_IRQHandler
|
||||||
0x0000000008000b7c LCD_IRQHandler
|
0x0000000008000ce0 LCD_IRQHandler
|
||||||
0x0000000008000b7c UART5_IRQHandler
|
0x0000000008000ce0 UART5_IRQHandler
|
||||||
0x0000000008000b7c ADC3_IRQHandler
|
0x0000000008000ce0 ADC3_IRQHandler
|
||||||
0x0000000008000b7c TIM4_IRQHandler
|
0x0000000008000ce0 TIM4_IRQHandler
|
||||||
0x0000000008000b7c DMA2_Channel1_IRQHandler
|
0x0000000008000ce0 DMA2_Channel1_IRQHandler
|
||||||
0x0000000008000b7c QUADSPI_IRQHandler
|
0x0000000008000ce0 QUADSPI_IRQHandler
|
||||||
0x0000000008000b7c I2C1_EV_IRQHandler
|
0x0000000008000ce0 I2C1_EV_IRQHandler
|
||||||
0x0000000008000b7c DMA1_Channel6_IRQHandler
|
0x0000000008000ce0 DMA1_Channel6_IRQHandler
|
||||||
0x0000000008000b7c UART4_IRQHandler
|
0x0000000008000ce0 UART4_IRQHandler
|
||||||
0x0000000008000b7c DMA2_Channel4_IRQHandler
|
0x0000000008000ce0 DMA2_Channel4_IRQHandler
|
||||||
0x0000000008000b7c TIM3_IRQHandler
|
0x0000000008000ce0 TIM3_IRQHandler
|
||||||
0x0000000008000b7c RCC_IRQHandler
|
0x0000000008000ce0 RCC_IRQHandler
|
||||||
0x0000000008000b7c DMA1_Channel1_IRQHandler
|
0x0000000008000ce0 DMA1_Channel1_IRQHandler
|
||||||
0x0000000008000b7c Default_Handler
|
0x0000000008000ce0 Default_Handler
|
||||||
0x0000000008000b7c DMA2_Channel7_IRQHandler
|
0x0000000008000ce0 DMA2_Channel7_IRQHandler
|
||||||
0x0000000008000b7c EXTI15_10_IRQHandler
|
0x0000000008000ce0 EXTI15_10_IRQHandler
|
||||||
0x0000000008000b7c TIM7_IRQHandler
|
0x0000000008000ce0 TIM7_IRQHandler
|
||||||
0x0000000008000b7c SDMMC1_IRQHandler
|
0x0000000008000ce0 SDMMC1_IRQHandler
|
||||||
0x0000000008000b7c TIM5_IRQHandler
|
0x0000000008000ce0 TIM5_IRQHandler
|
||||||
0x0000000008000b7c I2C3_EV_IRQHandler
|
0x0000000008000ce0 I2C3_EV_IRQHandler
|
||||||
0x0000000008000b7c EXTI9_5_IRQHandler
|
0x0000000008000ce0 EXTI9_5_IRQHandler
|
||||||
0x0000000008000b7c RTC_WKUP_IRQHandler
|
0x0000000008000ce0 RTC_WKUP_IRQHandler
|
||||||
0x0000000008000b7c PVD_PVM_IRQHandler
|
0x0000000008000ce0 PVD_PVM_IRQHandler
|
||||||
0x0000000008000b7c SPI2_IRQHandler
|
0x0000000008000ce0 SPI2_IRQHandler
|
||||||
0x0000000008000b7c CAN1_TX_IRQHandler
|
0x0000000008000ce0 CAN1_TX_IRQHandler
|
||||||
0x0000000008000b7c DMA2_Channel5_IRQHandler
|
0x0000000008000ce0 DMA2_Channel5_IRQHandler
|
||||||
0x0000000008000b7c DMA1_Channel5_IRQHandler
|
0x0000000008000ce0 DMA1_Channel5_IRQHandler
|
||||||
0x0000000008000b7c EXTI4_IRQHandler
|
0x0000000008000ce0 EXTI4_IRQHandler
|
||||||
0x0000000008000b7c RNG_IRQHandler
|
0x0000000008000ce0 RNG_IRQHandler
|
||||||
0x0000000008000b7c TIM1_TRG_COM_TIM17_IRQHandler
|
0x0000000008000ce0 TIM1_TRG_COM_TIM17_IRQHandler
|
||||||
0x0000000008000b7c DMA1_Channel3_IRQHandler
|
0x0000000008000ce0 DMA1_Channel3_IRQHandler
|
||||||
0x0000000008000b7c COMP_IRQHandler
|
0x0000000008000ce0 COMP_IRQHandler
|
||||||
0x0000000008000b7c WWDG_IRQHandler
|
0x0000000008000ce0 WWDG_IRQHandler
|
||||||
0x0000000008000b7c LPUART1_IRQHandler
|
0x0000000008000ce0 LPUART1_IRQHandler
|
||||||
0x0000000008000b7c DMA2_Channel6_IRQHandler
|
0x0000000008000ce0 DMA2_Channel6_IRQHandler
|
||||||
0x0000000008000b7c TIM2_IRQHandler
|
0x0000000008000ce0 TIM2_IRQHandler
|
||||||
0x0000000008000b7c EXTI1_IRQHandler
|
0x0000000008000ce0 EXTI1_IRQHandler
|
||||||
0x0000000008000b7c USART2_IRQHandler
|
0x0000000008000ce0 USART2_IRQHandler
|
||||||
0x0000000008000b7c DFSDM1_FLT0_IRQHandler
|
0x0000000008000ce0 DFSDM1_FLT0_IRQHandler
|
||||||
0x0000000008000b7c I2C2_ER_IRQHandler
|
0x0000000008000ce0 I2C2_ER_IRQHandler
|
||||||
0x0000000008000b7c DMA1_Channel2_IRQHandler
|
0x0000000008000ce0 DMA1_Channel2_IRQHandler
|
||||||
0x0000000008000b7c TIM8_BRK_IRQHandler
|
0x0000000008000ce0 TIM8_BRK_IRQHandler
|
||||||
0x0000000008000b7c CAN1_SCE_IRQHandler
|
0x0000000008000ce0 CAN1_SCE_IRQHandler
|
||||||
0x0000000008000b7c FLASH_IRQHandler
|
0x0000000008000ce0 FLASH_IRQHandler
|
||||||
0x0000000008000b7c USART1_IRQHandler
|
0x0000000008000ce0 USART1_IRQHandler
|
||||||
0x0000000008000b7c OTG_FS_IRQHandler
|
0x0000000008000ce0 OTG_FS_IRQHandler
|
||||||
0x0000000008000b7c SPI3_IRQHandler
|
0x0000000008000ce0 SPI3_IRQHandler
|
||||||
0x0000000008000b7c I2C1_ER_IRQHandler
|
0x0000000008000ce0 I2C1_ER_IRQHandler
|
||||||
0x0000000008000b7c FMC_IRQHandler
|
0x0000000008000ce0 FMC_IRQHandler
|
||||||
0x0000000008000b7c SWPMI1_IRQHandler
|
0x0000000008000ce0 SWPMI1_IRQHandler
|
||||||
0x0000000008000b7c LPTIM1_IRQHandler
|
0x0000000008000ce0 LPTIM1_IRQHandler
|
||||||
0x0000000008000b7c SAI1_IRQHandler
|
0x0000000008000ce0 SAI1_IRQHandler
|
||||||
0x0000000008000b7c DMA2_Channel3_IRQHandler
|
0x0000000008000ce0 DMA2_Channel3_IRQHandler
|
||||||
0x0000000008000b7c TIM1_BRK_TIM15_IRQHandler
|
0x0000000008000ce0 TIM1_BRK_TIM15_IRQHandler
|
||||||
*fill* 0x0000000008000b7e 0x2
|
*fill* 0x0000000008000ce2 0x2
|
||||||
.text.HAL_InitTick
|
.text.HAL_InitTick
|
||||||
0x0000000008000b80 0x78 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.o
|
0x0000000008000ce4 0x78 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.o
|
||||||
0x0000000008000b80 HAL_InitTick
|
0x0000000008000ce4 HAL_InitTick
|
||||||
.text.__NVIC_GetPriorityGrouping
|
.text.__NVIC_GetPriorityGrouping
|
||||||
0x0000000008000bf8 0x1c Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.o
|
0x0000000008000d5c 0x1c Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.o
|
||||||
.text.__NVIC_SetPriority
|
.text.__NVIC_SetPriority
|
||||||
0x0000000008000c14 0x54 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.o
|
0x0000000008000d78 0x54 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.o
|
||||||
.text.NVIC_EncodePriority
|
.text.NVIC_EncodePriority
|
||||||
0x0000000008000c68 0x66 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.o
|
0x0000000008000dcc 0x66 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.o
|
||||||
*fill* 0x0000000008000cce 0x2
|
*fill* 0x0000000008000e32 0x2
|
||||||
.text.SysTick_Config
|
.text.SysTick_Config
|
||||||
0x0000000008000cd0 0x44 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.o
|
0x0000000008000e34 0x44 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.o
|
||||||
.text.HAL_NVIC_SetPriority
|
.text.HAL_NVIC_SetPriority
|
||||||
0x0000000008000d14 0x38 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.o
|
0x0000000008000e78 0x38 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.o
|
||||||
0x0000000008000d14 HAL_NVIC_SetPriority
|
0x0000000008000e78 HAL_NVIC_SetPriority
|
||||||
.text.HAL_SYSTICK_Config
|
.text.HAL_SYSTICK_Config
|
||||||
0x0000000008000d4c 0x18 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.o
|
0x0000000008000eb0 0x18 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.o
|
||||||
0x0000000008000d4c HAL_SYSTICK_Config
|
0x0000000008000eb0 HAL_SYSTICK_Config
|
||||||
.text.LL_InitTick
|
.text.LL_InitTick
|
||||||
0x0000000008000d64 0x34 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_utils.o
|
0x0000000008000ec8 0x34 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_utils.o
|
||||||
.text.LL_Init1msTick
|
.text.LL_Init1msTick
|
||||||
0x0000000008000d98 0x18 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_utils.o
|
0x0000000008000efc 0x18 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_utils.o
|
||||||
0x0000000008000d98 LL_Init1msTick
|
0x0000000008000efc LL_Init1msTick
|
||||||
.text.LL_SetSystemCoreClock
|
.text.LL_SetSystemCoreClock
|
||||||
0x0000000008000db0 0x20 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_utils.o
|
0x0000000008000f14 0x20 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_utils.o
|
||||||
0x0000000008000db0 LL_SetSystemCoreClock
|
0x0000000008000f14 LL_SetSystemCoreClock
|
||||||
.text.__libc_init_array
|
.text.__libc_init_array
|
||||||
0x0000000008000dd0 0x48 c:/st/stm32cubeide_1.4.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard\libc_nano.a(lib_a-init.o)
|
0x0000000008000f34 0x48 c:/st/stm32cubeide_1.4.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard\libc_nano.a(lib_a-init.o)
|
||||||
0x0000000008000dd0 __libc_init_array
|
0x0000000008000f34 __libc_init_array
|
||||||
*(.glue_7)
|
*(.glue_7)
|
||||||
.glue_7 0x0000000008000e18 0x0 linker stubs
|
.glue_7 0x0000000008000f7c 0x0 linker stubs
|
||||||
*(.glue_7t)
|
*(.glue_7t)
|
||||||
.glue_7t 0x0000000008000e18 0x0 linker stubs
|
.glue_7t 0x0000000008000f7c 0x0 linker stubs
|
||||||
*(.eh_frame)
|
*(.eh_frame)
|
||||||
.eh_frame 0x0000000008000e18 0x0 c:/st/stm32cubeide_1.4.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crtbegin.o
|
.eh_frame 0x0000000008000f7c 0x0 c:/st/stm32cubeide_1.4.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crtbegin.o
|
||||||
*(.init)
|
*(.init)
|
||||||
.init 0x0000000008000e18 0x4 c:/st/stm32cubeide_1.4.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crti.o
|
.init 0x0000000008000f7c 0x4 c:/st/stm32cubeide_1.4.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crti.o
|
||||||
0x0000000008000e18 _init
|
0x0000000008000f7c _init
|
||||||
.init 0x0000000008000e1c 0x8 c:/st/stm32cubeide_1.4.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crtn.o
|
.init 0x0000000008000f80 0x8 c:/st/stm32cubeide_1.4.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crtn.o
|
||||||
*(.fini)
|
*(.fini)
|
||||||
.fini 0x0000000008000e24 0x4 c:/st/stm32cubeide_1.4.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crti.o
|
.fini 0x0000000008000f88 0x4 c:/st/stm32cubeide_1.4.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crti.o
|
||||||
0x0000000008000e24 _fini
|
0x0000000008000f88 _fini
|
||||||
.fini 0x0000000008000e28 0x8 c:/st/stm32cubeide_1.4.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crtn.o
|
.fini 0x0000000008000f8c 0x8 c:/st/stm32cubeide_1.4.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crtn.o
|
||||||
0x0000000008000e30 . = ALIGN (0x4)
|
0x0000000008000f94 . = ALIGN (0x4)
|
||||||
0x0000000008000e30 _etext = .
|
0x0000000008000f94 _etext = .
|
||||||
|
|
||||||
.vfp11_veneer 0x0000000008000e30 0x0
|
.vfp11_veneer 0x0000000008000f94 0x0
|
||||||
.vfp11_veneer 0x0000000008000e30 0x0 linker stubs
|
.vfp11_veneer 0x0000000008000f94 0x0 linker stubs
|
||||||
|
|
||||||
.v4_bx 0x0000000008000e30 0x0
|
.v4_bx 0x0000000008000f94 0x0
|
||||||
.v4_bx 0x0000000008000e30 0x0 linker stubs
|
.v4_bx 0x0000000008000f94 0x0 linker stubs
|
||||||
|
|
||||||
.iplt 0x0000000008000e30 0x0
|
.iplt 0x0000000008000f94 0x0
|
||||||
.iplt 0x0000000008000e30 0x0 c:/st/stm32cubeide_1.4.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crtbegin.o
|
.iplt 0x0000000008000f94 0x0 c:/st/stm32cubeide_1.4.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crtbegin.o
|
||||||
|
|
||||||
.rel.dyn 0x0000000008000e30 0x0
|
.rel.dyn 0x0000000008000f94 0x0
|
||||||
.rel.iplt 0x0000000008000e30 0x0 c:/st/stm32cubeide_1.4.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crtbegin.o
|
.rel.iplt 0x0000000008000f94 0x0 c:/st/stm32cubeide_1.4.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crtbegin.o
|
||||||
|
|
||||||
.rodata 0x0000000008000e30 0x0
|
.rodata 0x0000000008000f94 0x0
|
||||||
0x0000000008000e30 . = ALIGN (0x4)
|
0x0000000008000f94 . = ALIGN (0x4)
|
||||||
*(.rodata)
|
*(.rodata)
|
||||||
*(.rodata*)
|
*(.rodata*)
|
||||||
0x0000000008000e30 . = ALIGN (0x4)
|
0x0000000008000f94 . = ALIGN (0x4)
|
||||||
|
|
||||||
.ARM.extab 0x0000000008000e30 0x0
|
.ARM.extab 0x0000000008000f94 0x0
|
||||||
0x0000000008000e30 . = ALIGN (0x4)
|
0x0000000008000f94 . = ALIGN (0x4)
|
||||||
*(.ARM.extab* .gnu.linkonce.armextab.*)
|
*(.ARM.extab* .gnu.linkonce.armextab.*)
|
||||||
0x0000000008000e30 . = ALIGN (0x4)
|
0x0000000008000f94 . = ALIGN (0x4)
|
||||||
|
|
||||||
.ARM 0x0000000008000e30 0x0
|
.ARM 0x0000000008000f94 0x0
|
||||||
0x0000000008000e30 . = ALIGN (0x4)
|
0x0000000008000f94 . = ALIGN (0x4)
|
||||||
0x0000000008000e30 __exidx_start = .
|
0x0000000008000f94 __exidx_start = .
|
||||||
*(.ARM.exidx*)
|
*(.ARM.exidx*)
|
||||||
0x0000000008000e30 __exidx_end = .
|
0x0000000008000f94 __exidx_end = .
|
||||||
0x0000000008000e30 . = ALIGN (0x4)
|
0x0000000008000f94 . = ALIGN (0x4)
|
||||||
|
|
||||||
.preinit_array 0x0000000008000e30 0x0
|
.preinit_array 0x0000000008000f94 0x0
|
||||||
0x0000000008000e30 . = ALIGN (0x4)
|
0x0000000008000f94 . = ALIGN (0x4)
|
||||||
0x0000000008000e30 PROVIDE (__preinit_array_start = .)
|
0x0000000008000f94 PROVIDE (__preinit_array_start = .)
|
||||||
*(.preinit_array*)
|
*(.preinit_array*)
|
||||||
0x0000000008000e30 PROVIDE (__preinit_array_end = .)
|
0x0000000008000f94 PROVIDE (__preinit_array_end = .)
|
||||||
0x0000000008000e30 . = ALIGN (0x4)
|
0x0000000008000f94 . = ALIGN (0x4)
|
||||||
|
|
||||||
.init_array 0x0000000008000e30 0x4
|
.init_array 0x0000000008000f94 0x4
|
||||||
0x0000000008000e30 . = ALIGN (0x4)
|
0x0000000008000f94 . = ALIGN (0x4)
|
||||||
0x0000000008000e30 PROVIDE (__init_array_start = .)
|
0x0000000008000f94 PROVIDE (__init_array_start = .)
|
||||||
*(SORT_BY_NAME(.init_array.*))
|
*(SORT_BY_NAME(.init_array.*))
|
||||||
*(.init_array*)
|
*(.init_array*)
|
||||||
.init_array 0x0000000008000e30 0x4 c:/st/stm32cubeide_1.4.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crtbegin.o
|
.init_array 0x0000000008000f94 0x4 c:/st/stm32cubeide_1.4.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crtbegin.o
|
||||||
0x0000000008000e34 PROVIDE (__init_array_end = .)
|
0x0000000008000f98 PROVIDE (__init_array_end = .)
|
||||||
0x0000000008000e34 . = ALIGN (0x4)
|
0x0000000008000f98 . = ALIGN (0x4)
|
||||||
|
|
||||||
.fini_array 0x0000000008000e34 0x4
|
.fini_array 0x0000000008000f98 0x4
|
||||||
0x0000000008000e34 . = ALIGN (0x4)
|
0x0000000008000f98 . = ALIGN (0x4)
|
||||||
[!provide] PROVIDE (__fini_array_start = .)
|
[!provide] PROVIDE (__fini_array_start = .)
|
||||||
*(SORT_BY_NAME(.fini_array.*))
|
*(SORT_BY_NAME(.fini_array.*))
|
||||||
*(.fini_array*)
|
*(.fini_array*)
|
||||||
.fini_array 0x0000000008000e34 0x4 c:/st/stm32cubeide_1.4.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crtbegin.o
|
.fini_array 0x0000000008000f98 0x4 c:/st/stm32cubeide_1.4.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crtbegin.o
|
||||||
[!provide] PROVIDE (__fini_array_end = .)
|
[!provide] PROVIDE (__fini_array_end = .)
|
||||||
0x0000000008000e38 . = ALIGN (0x4)
|
0x0000000008000f9c . = ALIGN (0x4)
|
||||||
0x0000000008000e38 _sidata = LOADADDR (.data)
|
0x0000000008000f9c _sidata = LOADADDR (.data)
|
||||||
|
|
||||||
.data 0x0000000020000000 0x10 load address 0x0000000008000e38
|
.data 0x0000000020000000 0xc load address 0x0000000008000f9c
|
||||||
0x0000000020000000 . = ALIGN (0x4)
|
0x0000000020000000 . = ALIGN (0x4)
|
||||||
0x0000000020000000 _sdata = .
|
0x0000000020000000 _sdata = .
|
||||||
*(.data)
|
*(.data)
|
||||||
*(.data*)
|
*(.data*)
|
||||||
.data.expe 0x0000000020000000 0x1 Core/Src/main.o
|
|
||||||
0x0000000020000000 expe
|
|
||||||
*fill* 0x0000000020000001 0x3
|
|
||||||
.data.SystemCoreClock
|
.data.SystemCoreClock
|
||||||
0x0000000020000004 0x4 Core/Src/system_stm32l4xx.o
|
0x0000000020000000 0x4 Core/Src/system_stm32l4xx.o
|
||||||
0x0000000020000004 SystemCoreClock
|
0x0000000020000000 SystemCoreClock
|
||||||
.data.uwTickPrio
|
.data.uwTickPrio
|
||||||
0x0000000020000008 0x4 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.o
|
0x0000000020000004 0x4 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.o
|
||||||
0x0000000020000008 uwTickPrio
|
0x0000000020000004 uwTickPrio
|
||||||
.data.uwTickFreq
|
.data.uwTickFreq
|
||||||
0x000000002000000c 0x1 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.o
|
0x0000000020000008 0x1 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.o
|
||||||
0x000000002000000c uwTickFreq
|
0x0000000020000008 uwTickFreq
|
||||||
0x0000000020000010 . = ALIGN (0x4)
|
0x000000002000000c . = ALIGN (0x4)
|
||||||
*fill* 0x000000002000000d 0x3
|
*fill* 0x0000000020000009 0x3
|
||||||
0x0000000020000010 _edata = .
|
0x000000002000000c _edata = .
|
||||||
|
|
||||||
.igot.plt 0x0000000020000010 0x0 load address 0x0000000008000e48
|
.igot.plt 0x000000002000000c 0x0 load address 0x0000000008000fa8
|
||||||
.igot.plt 0x0000000020000010 0x0 c:/st/stm32cubeide_1.4.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crtbegin.o
|
.igot.plt 0x000000002000000c 0x0 c:/st/stm32cubeide_1.4.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crtbegin.o
|
||||||
0x0000000020000010 . = ALIGN (0x4)
|
0x000000002000000c . = ALIGN (0x4)
|
||||||
|
|
||||||
.bss 0x0000000020000010 0x24 load address 0x0000000008000e48
|
.bss 0x000000002000000c 0x24 load address 0x0000000008000fa8
|
||||||
0x0000000020000010 _sbss = .
|
0x000000002000000c _sbss = .
|
||||||
0x0000000020000010 __bss_start__ = _sbss
|
0x000000002000000c __bss_start__ = _sbss
|
||||||
*(.bss)
|
*(.bss)
|
||||||
.bss 0x0000000020000010 0x1c c:/st/stm32cubeide_1.4.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crtbegin.o
|
.bss 0x000000002000000c 0x1c c:/st/stm32cubeide_1.4.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crtbegin.o
|
||||||
*(.bss*)
|
*(.bss*)
|
||||||
.bss.msTicks 0x000000002000002c 0x4 Core/Src/main.o
|
.bss.msTicks 0x0000000020000028 0x4 Core/Src/main.o
|
||||||
0x000000002000002c msTicks
|
0x0000000020000028 msTicks
|
||||||
|
.bss.expe 0x000000002000002c 0x1 Core/Src/main.o
|
||||||
|
0x000000002000002c expe
|
||||||
.bss.blue_mode
|
.bss.blue_mode
|
||||||
0x0000000020000030 0x1 Core/Src/main.o
|
0x000000002000002d 0x1 Core/Src/main.o
|
||||||
0x0000000020000030 blue_mode
|
0x000000002000002d blue_mode
|
||||||
*(COMMON)
|
*(COMMON)
|
||||||
0x0000000020000034 . = ALIGN (0x4)
|
0x0000000020000030 . = ALIGN (0x4)
|
||||||
*fill* 0x0000000020000031 0x3
|
*fill* 0x000000002000002e 0x2
|
||||||
0x0000000020000034 _ebss = .
|
0x0000000020000030 _ebss = .
|
||||||
0x0000000020000034 __bss_end__ = _ebss
|
0x0000000020000030 __bss_end__ = _ebss
|
||||||
|
|
||||||
._user_heap_stack
|
._user_heap_stack
|
||||||
0x0000000020000034 0x604 load address 0x0000000008000e48
|
0x0000000020000030 0x600 load address 0x0000000008000fa8
|
||||||
0x0000000020000038 . = ALIGN (0x8)
|
0x0000000020000030 . = ALIGN (0x8)
|
||||||
*fill* 0x0000000020000034 0x4
|
|
||||||
[!provide] PROVIDE (end = .)
|
[!provide] PROVIDE (end = .)
|
||||||
0x0000000020000038 PROVIDE (_end = .)
|
0x0000000020000030 PROVIDE (_end = .)
|
||||||
0x0000000020000238 . = (. + _Min_Heap_Size)
|
0x0000000020000230 . = (. + _Min_Heap_Size)
|
||||||
*fill* 0x0000000020000038 0x200
|
*fill* 0x0000000020000030 0x200
|
||||||
0x0000000020000638 . = (. + _Min_Stack_Size)
|
0x0000000020000630 . = (. + _Min_Stack_Size)
|
||||||
*fill* 0x0000000020000238 0x400
|
*fill* 0x0000000020000230 0x400
|
||||||
0x0000000020000638 . = ALIGN (0x8)
|
0x0000000020000630 . = ALIGN (0x8)
|
||||||
|
|
||||||
/DISCARD/
|
/DISCARD/
|
||||||
libc.a(*)
|
libc.a(*)
|
||||||
|
@ -3862,15 +3863,15 @@ LOAD c:/st/stm32cubeide_1.4.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.exte
|
||||||
0x000000000000023a 0x22 c:/st/stm32cubeide_1.4.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crtn.o
|
0x000000000000023a 0x22 c:/st/stm32cubeide_1.4.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crtn.o
|
||||||
OUTPUT(RealOne.elf elf32-littlearm)
|
OUTPUT(RealOne.elf elf32-littlearm)
|
||||||
|
|
||||||
.debug_info 0x0000000000000000 0x4920
|
.debug_info 0x0000000000000000 0x4be7
|
||||||
.debug_info 0x0000000000000000 0x84a Core/Src/gpio.o
|
.debug_info 0x0000000000000000 0x84a Core/Src/gpio.o
|
||||||
.debug_info 0x000000000000084a 0xd0e Core/Src/main.o
|
.debug_info 0x000000000000084a 0xfd5 Core/Src/main.o
|
||||||
.debug_info 0x0000000000001558 0x35e Core/Src/stm32l4xx_it.o
|
.debug_info 0x000000000000181f 0x35e Core/Src/stm32l4xx_it.o
|
||||||
.debug_info 0x00000000000018b6 0x727 Core/Src/system_stm32l4xx.o
|
.debug_info 0x0000000000001b7d 0x727 Core/Src/system_stm32l4xx.o
|
||||||
.debug_info 0x0000000000001fdd 0x22 Core/Startup/startup_stm32l476rgtx.o
|
.debug_info 0x00000000000022a4 0x22 Core/Startup/startup_stm32l476rgtx.o
|
||||||
.debug_info 0x0000000000001fff 0xc20 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.o
|
.debug_info 0x00000000000022c6 0xc20 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.o
|
||||||
.debug_info 0x0000000000002c1f 0xf6d Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.o
|
.debug_info 0x0000000000002ee6 0xf6d Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.o
|
||||||
.debug_info 0x0000000000003b8c 0xd94 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_utils.o
|
.debug_info 0x0000000000003e53 0xd94 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_utils.o
|
||||||
|
|
||||||
.debug_abbrev 0x0000000000000000 0xd51
|
.debug_abbrev 0x0000000000000000 0xd51
|
||||||
.debug_abbrev 0x0000000000000000 0x233 Core/Src/gpio.o
|
.debug_abbrev 0x0000000000000000 0x233 Core/Src/gpio.o
|
||||||
|
@ -3882,33 +3883,33 @@ OUTPUT(RealOne.elf elf32-littlearm)
|
||||||
.debug_abbrev 0x000000000000081f 0x2fa Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.o
|
.debug_abbrev 0x000000000000081f 0x2fa Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.o
|
||||||
.debug_abbrev 0x0000000000000b19 0x238 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_utils.o
|
.debug_abbrev 0x0000000000000b19 0x238 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_utils.o
|
||||||
|
|
||||||
.debug_aranges 0x0000000000000000 0x5b8
|
.debug_aranges 0x0000000000000000 0x5c0
|
||||||
.debug_aranges
|
.debug_aranges
|
||||||
0x0000000000000000 0x70 Core/Src/gpio.o
|
0x0000000000000000 0x70 Core/Src/gpio.o
|
||||||
.debug_aranges
|
.debug_aranges
|
||||||
0x0000000000000070 0x120 Core/Src/main.o
|
0x0000000000000070 0x128 Core/Src/main.o
|
||||||
.debug_aranges
|
.debug_aranges
|
||||||
0x0000000000000190 0x58 Core/Src/stm32l4xx_it.o
|
0x0000000000000198 0x58 Core/Src/stm32l4xx_it.o
|
||||||
.debug_aranges
|
.debug_aranges
|
||||||
0x00000000000001e8 0x28 Core/Src/system_stm32l4xx.o
|
0x00000000000001f0 0x28 Core/Src/system_stm32l4xx.o
|
||||||
.debug_aranges
|
.debug_aranges
|
||||||
0x0000000000000210 0x28 Core/Startup/startup_stm32l476rgtx.o
|
0x0000000000000218 0x28 Core/Startup/startup_stm32l476rgtx.o
|
||||||
.debug_aranges
|
.debug_aranges
|
||||||
0x0000000000000238 0x130 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.o
|
0x0000000000000240 0x130 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.o
|
||||||
.debug_aranges
|
.debug_aranges
|
||||||
0x0000000000000368 0x118 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.o
|
0x0000000000000370 0x118 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.o
|
||||||
.debug_aranges
|
.debug_aranges
|
||||||
0x0000000000000480 0x138 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_utils.o
|
0x0000000000000488 0x138 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_utils.o
|
||||||
|
|
||||||
.debug_ranges 0x0000000000000000 0x540
|
.debug_ranges 0x0000000000000000 0x548
|
||||||
.debug_ranges 0x0000000000000000 0x60 Core/Src/gpio.o
|
.debug_ranges 0x0000000000000000 0x60 Core/Src/gpio.o
|
||||||
.debug_ranges 0x0000000000000060 0x110 Core/Src/main.o
|
.debug_ranges 0x0000000000000060 0x118 Core/Src/main.o
|
||||||
.debug_ranges 0x0000000000000170 0x48 Core/Src/stm32l4xx_it.o
|
.debug_ranges 0x0000000000000178 0x48 Core/Src/stm32l4xx_it.o
|
||||||
.debug_ranges 0x00000000000001b8 0x18 Core/Src/system_stm32l4xx.o
|
.debug_ranges 0x00000000000001c0 0x18 Core/Src/system_stm32l4xx.o
|
||||||
.debug_ranges 0x00000000000001d0 0x20 Core/Startup/startup_stm32l476rgtx.o
|
.debug_ranges 0x00000000000001d8 0x20 Core/Startup/startup_stm32l476rgtx.o
|
||||||
.debug_ranges 0x00000000000001f0 0x120 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.o
|
.debug_ranges 0x00000000000001f8 0x120 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.o
|
||||||
.debug_ranges 0x0000000000000310 0x108 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.o
|
.debug_ranges 0x0000000000000318 0x108 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.o
|
||||||
.debug_ranges 0x0000000000000418 0x128 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_utils.o
|
.debug_ranges 0x0000000000000420 0x128 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_utils.o
|
||||||
|
|
||||||
.debug_macro 0x0000000000000000 0x26337
|
.debug_macro 0x0000000000000000 0x26337
|
||||||
.debug_macro 0x0000000000000000 0x204 Core/Src/gpio.o
|
.debug_macro 0x0000000000000000 0x204 Core/Src/gpio.o
|
||||||
|
@ -3968,32 +3969,32 @@ OUTPUT(RealOne.elf elf32-littlearm)
|
||||||
.debug_macro 0x0000000000025ffb 0x29b Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_utils.o
|
.debug_macro 0x0000000000025ffb 0x29b Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_utils.o
|
||||||
.debug_macro 0x0000000000026296 0xa1 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_utils.o
|
.debug_macro 0x0000000000026296 0xa1 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_utils.o
|
||||||
|
|
||||||
.debug_line 0x0000000000000000 0x40e6
|
.debug_line 0x0000000000000000 0x4155
|
||||||
.debug_line 0x0000000000000000 0x7e6 Core/Src/gpio.o
|
.debug_line 0x0000000000000000 0x7e6 Core/Src/gpio.o
|
||||||
.debug_line 0x00000000000007e6 0xacc Core/Src/main.o
|
.debug_line 0x00000000000007e6 0xb3b Core/Src/main.o
|
||||||
.debug_line 0x00000000000012b2 0x855 Core/Src/stm32l4xx_it.o
|
.debug_line 0x0000000000001321 0x855 Core/Src/stm32l4xx_it.o
|
||||||
.debug_line 0x0000000000001b07 0x6eb Core/Src/system_stm32l4xx.o
|
.debug_line 0x0000000000001b76 0x6eb Core/Src/system_stm32l4xx.o
|
||||||
.debug_line 0x00000000000021f2 0x87 Core/Startup/startup_stm32l476rgtx.o
|
.debug_line 0x0000000000002261 0x87 Core/Startup/startup_stm32l476rgtx.o
|
||||||
.debug_line 0x0000000000002279 0x961 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.o
|
.debug_line 0x00000000000022e8 0x961 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.o
|
||||||
.debug_line 0x0000000000002bda 0x9e9 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.o
|
.debug_line 0x0000000000002c49 0x9e9 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.o
|
||||||
.debug_line 0x00000000000035c3 0xb23 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_utils.o
|
.debug_line 0x0000000000003632 0xb23 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_utils.o
|
||||||
|
|
||||||
.debug_str 0x0000000000000000 0xee792
|
.debug_str 0x0000000000000000 0xee8e8
|
||||||
.debug_str 0x0000000000000000 0xe3d91 Core/Src/gpio.o
|
.debug_str 0x0000000000000000 0xe3d91 Core/Src/gpio.o
|
||||||
0xe4dab (size before relaxing)
|
0xe4dab (size before relaxing)
|
||||||
.debug_str 0x00000000000e3d91 0x8d43 Core/Src/main.o
|
.debug_str 0x00000000000e3d91 0x8e99 Core/Src/main.o
|
||||||
0xed98d (size before relaxing)
|
0xedae3 (size before relaxing)
|
||||||
.debug_str 0x00000000000ecad4 0xad Core/Src/stm32l4xx_it.o
|
.debug_str 0x00000000000ecc2a 0xad Core/Src/stm32l4xx_it.o
|
||||||
0xed404 (size before relaxing)
|
0xed404 (size before relaxing)
|
||||||
.debug_str 0x00000000000ecb81 0x79 Core/Src/system_stm32l4xx.o
|
.debug_str 0x00000000000eccd7 0x79 Core/Src/system_stm32l4xx.o
|
||||||
0xe3959 (size before relaxing)
|
0xe3959 (size before relaxing)
|
||||||
.debug_str 0x00000000000ecbfa 0x36 Core/Startup/startup_stm32l476rgtx.o
|
.debug_str 0x00000000000ecd50 0x36 Core/Startup/startup_stm32l476rgtx.o
|
||||||
0x62 (size before relaxing)
|
0x62 (size before relaxing)
|
||||||
.debug_str 0x00000000000ecc30 0x9fa Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.o
|
.debug_str 0x00000000000ecd86 0x9fa Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.o
|
||||||
0xe443d (size before relaxing)
|
0xe443d (size before relaxing)
|
||||||
.debug_str 0x00000000000ed62a 0x3a6 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.o
|
.debug_str 0x00000000000ed780 0x3a6 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.o
|
||||||
0xe41ad (size before relaxing)
|
0xe41ad (size before relaxing)
|
||||||
.debug_str 0x00000000000ed9d0 0xdc2 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_utils.o
|
.debug_str 0x00000000000edb26 0xdc2 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_utils.o
|
||||||
0xea58d (size before relaxing)
|
0xea58d (size before relaxing)
|
||||||
|
|
||||||
.comment 0x0000000000000000 0x7b
|
.comment 0x0000000000000000 0x7b
|
||||||
|
@ -4006,12 +4007,12 @@ OUTPUT(RealOne.elf elf32-littlearm)
|
||||||
.comment 0x000000000000007b 0x7c Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.o
|
.comment 0x000000000000007b 0x7c Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.o
|
||||||
.comment 0x000000000000007b 0x7c Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_utils.o
|
.comment 0x000000000000007b 0x7c Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_utils.o
|
||||||
|
|
||||||
.debug_frame 0x0000000000000000 0x15c0
|
.debug_frame 0x0000000000000000 0x15dc
|
||||||
.debug_frame 0x0000000000000000 0x1a0 Core/Src/gpio.o
|
.debug_frame 0x0000000000000000 0x1a0 Core/Src/gpio.o
|
||||||
.debug_frame 0x00000000000001a0 0x480 Core/Src/main.o
|
.debug_frame 0x00000000000001a0 0x49c Core/Src/main.o
|
||||||
.debug_frame 0x0000000000000620 0xf0 Core/Src/stm32l4xx_it.o
|
.debug_frame 0x000000000000063c 0xf0 Core/Src/stm32l4xx_it.o
|
||||||
.debug_frame 0x0000000000000710 0x58 Core/Src/system_stm32l4xx.o
|
.debug_frame 0x000000000000072c 0x58 Core/Src/system_stm32l4xx.o
|
||||||
.debug_frame 0x0000000000000768 0x498 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.o
|
.debug_frame 0x0000000000000784 0x498 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.o
|
||||||
.debug_frame 0x0000000000000c00 0x498 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.o
|
.debug_frame 0x0000000000000c1c 0x498 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.o
|
||||||
.debug_frame 0x0000000000001098 0x4fc Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_utils.o
|
.debug_frame 0x00000000000010b4 0x4fc Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_utils.o
|
||||||
.debug_frame 0x0000000000001594 0x2c c:/st/stm32cubeide_1.4.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard\libc_nano.a(lib_a-init.o)
|
.debug_frame 0x00000000000015b0 0x2c c:/st/stm32cubeide_1.4.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard\libc_nano.a(lib_a-init.o)
|
||||||
|
|
Loading…
Reference in a new issue