Browse Source

everything is working ah, don't look at the code though, its frightening

Cameron Bray 3 years ago
parent
commit
d534824a18
100 changed files with 12082 additions and 15682 deletions
  1. 325
    0
      PlaygroundYoupi/.metadata/.ide.log
  2. 692
    0
      PlaygroundYoupi/.metadata/.log
  3. 0
    1
      PlaygroundYoupi/.metadata/.plugins/com.st.stm32cube.ide.mcu.livewatch/params.dat
  4. 0
    0
      PlaygroundYoupi/.metadata/.plugins/com.st.stm32cube.ide.mcu.livewatch/saved_expr.dat
  5. BIN
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.cdt.core/L476_ats_blink-master.1604569603602.pdom
  6. BIN
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.cdt.core/L476_ats_blink-master.1605514236092.pdom
  7. 0
    5213
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.cdt.core/L476_ats_blink-master.language.settings.xml
  8. BIN
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.cdt.core/RealOne.1605693471723.pdom
  9. 0
    9
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.cdt.dsf.ui/dialog_settings.xml
  10. 0
    5
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.cdt.make.ui/dialog_settings.xml
  11. 0
    10
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.cdt.ui/L476_ats_blink-master.build.log
  12. 40
    46
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.cdt.ui/RealOne.build.log
  13. 0
    13
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.cdt.ui/dialog_settings.xml
  14. 2293
    0
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.cdt.ui/global-build.log
  15. 372
    0
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/12/e05539d09029001b114bfff082d965b2
  16. 0
    217
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/1a/d055de90af28001b1d0af99b6389052e
  17. 375
    0
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/26/a0b238b08f29001b114bfff082d965b2
  18. 374
    0
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/2b/0002564d8a29001b114bfff082d965b2
  19. 374
    0
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/36/40d7681a9029001b114bfff082d965b2
  20. 0
    215
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/3b/c0a8101fb128001b1d0af99b6389052e
  21. 89
    0
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/3f/00ae52dc8429001b114bfff082d965b2
  22. 372
    0
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/43/d07b42e58929001b114bfff082d965b2
  23. 0
    215
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/5e/f0de86ebad28001b1d0af99b6389052e
  24. 373
    0
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/62/90bb79069129001b114bfff082d965b2
  25. 375
    0
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/65/c0f25e289129001b114bfff082d965b2
  26. 374
    0
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/6a/90238ac18f29001b114bfff082d965b2
  27. 374
    0
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/6e/00dce5a28e29001b114bfff082d965b2
  28. 120
    2
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/7/b0023af78729001b114bfff082d965b2
  29. 0
    215
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/8d/e087c036ae28001b1d0af99b6389052e
  30. 374
    0
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/aa/103a01f08a29001b114bfff082d965b2
  31. 0
    218
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/af/40857dccb228001b1d0af99b6389052e
  32. 0
    215
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/b/d024d9ddb128001b1d0af99b6389052e
  33. 1
    0
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/ba/801b2bd08429001b114bfff082d965b2
  34. 373
    0
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/bf/005849908f29001b114bfff082d965b2
  35. 0
    215
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/c2/90b22559b028001b1d0af99b6389052e
  36. 0
    217
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/cb/b0b0c2d1ae28001b1d0af99b6389052e
  37. 373
    0
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/d4/a026fb419029001b114bfff082d965b2
  38. 48
    1
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/d4/c0b800278529001b114bfff082d965b2
  39. 0
    216
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/f0/30a6596bae28001b1d0af99b6389052e
  40. 162
    12
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/f2/80b0dd708829001b114bfff082d965b2
  41. 374
    0
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/f4/7018f0108d29001b114bfff082d965b2
  42. BIN
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.projects/RealOne/.indexes/bf/be/history.index
  43. BIN
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.projects/RealOne/.indexes/bf/c4/history.index
  44. BIN
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.projects/RealOne/.indexes/d5/0/be/properties.index
  45. BIN
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.projects/RealOne/.indexes/d5/0/c4/properties.index
  46. BIN
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.projects/RealOne/.indexes/d5/13/76/61/53/78/properties.index
  47. BIN
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.projects/RealOne/.indexes/properties.index
  48. BIN
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.projects/RealOne/.markers
  49. BIN
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.projects/RealOne/.markers.snap
  50. BIN
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.projects/RealOne/.syncinfo.snap
  51. BIN
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.projects/RemoteSystemsTempFiles/.markers.snap
  52. BIN
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.projects/RemoteSystemsTempFiles/.syncinfo.snap
  53. 0
    1
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/history.version
  54. BIN
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index
  55. 0
    1
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.version
  56. BIN
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.root/.markers.snap
  57. BIN
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources
  58. BIN
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/4.snap
  59. 0
    3
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.runtime/.settings/com.st.stm32cube.common.preferences.prefs
  60. 0
    7
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.cdt.debug.ui.prefs
  61. 0
    2
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.cdt.dsf.ui.prefs
  62. 0
    1
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.cdt.managedbuilder.core.prefs
  63. 0
    5
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.cdt.ui.prefs
  64. 0
    2
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.debug.core.prefs
  65. 0
    5
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.debug.ui.prefs
  66. 0
    1
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.launchbar.core.prefs
  67. 0
    1
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.rse.core.prefs
  68. 0
    2
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.editors.prefs
  69. 0
    6
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs
  70. 0
    2
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.workbench.prefs
  71. 0
    13
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.debug.ui/dialog_settings.xml
  72. 1274
    1280
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi
  73. 2
    1
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/.workspace/2020/11/47/refactorings.history
  74. 1
    3
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/.workspace/2020/11/47/refactorings.index
  75. 0
    7
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.ltk.ui.refactoring/dialog_settings.xml
  76. 0
    28
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.search/dialog_settings.xml
  77. 0
    5
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.ui.editors/dialog_settings.xml
  78. 0
    10
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.ui.ide/dialog_settings.xml
  79. 0
    23
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.ui.workbench.texteditor/dialog_settings.xml
  80. 0
    15
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.ui.workbench/dialog_settings.xml
  81. 1
    1
      PlaygroundYoupi/.metadata/.plugins/org.eclipse.ui.workbench/workingsets.xml
  82. 1
    1
      PlaygroundYoupi/.metadata/version.ini
  83. 4
    0
      RealOne/Core/Inc/main.h
  84. 46
    9
      RealOne/Core/Src/main.c
  85. 3
    0
      RealOne/Debug/Core/Src/main.d
  86. BIN
      RealOne/Debug/Core/Src/main.o
  87. 55
    0
      RealOne/Debug/Core/Src/main.su
  88. 3
    0
      RealOne/Debug/Core/Src/stm32l4xx_hal_msp.d
  89. BIN
      RealOne/Debug/Core/Src/stm32l4xx_hal_msp.o
  90. 3
    0
      RealOne/Debug/Core/Src/stm32l4xx_it.d
  91. BIN
      RealOne/Debug/Core/Src/stm32l4xx_it.o
  92. 5
    0
      RealOne/Debug/Drivers/STM32L4xx_HAL_Driver/Src/subdir.mk
  93. BIN
      RealOne/Debug/L476_ats_blink-master.bin
  94. BIN
      RealOne/Debug/L476_ats_blink-master.elf
  95. 0
    1647
      RealOne/Debug/L476_ats_blink-master.list
  96. 0
    3967
      RealOne/Debug/L476_ats_blink-master.map
  97. BIN
      RealOne/Debug/RealOne.bin
  98. BIN
      RealOne/Debug/RealOne.elf
  99. 2057
    1378
      RealOne/Debug/RealOne.list
  100. 0
    0
      RealOne/Debug/RealOne.map

+ 325
- 0
PlaygroundYoupi/.metadata/.ide.log View File

@@ -946,3 +946,328 @@
946 946
 
947 947
 
948 948
 2020-11-18 09:40:28,013 [INFO] Activator:179 - !SESSION log4j initialized
949
+2020-11-18 10:56:32,919 [INFO] Activator:178 - 
950
+
951
+
952
+2020-11-18 10:56:32,920 [INFO] Activator:179 - !SESSION log4j initialized
953
+2020-11-18 11:48:39,241 [ERROR] ApiDbMcu:1464 - Can't use Application install path:
954
+2020-11-18 11:48:41,498 [WARN] RulesReader:54 - Compatibility file://mcu/compatibility.xml not found
955
+2020-11-18 11:56:45,843 [INFO] ApplicationProperties:181 - Using Application install path: C:\ST\STM32CubeIDE_1.4.0\STM32CubeIDE\plugins\com.st.stm32cube.common.mx_6.0.0.202007160824
956
+2020-11-18 11:56:45,851 [INFO] DbMcusXml:70 - Set database path to: C:\ST\STM32CubeIDE_1.4.0\STM32CubeIDE\plugins\com.st.stm32cube.common.mx_6.0.0.202007160824\\db\/mcu/
957
+2020-11-18 11:56:45,856 [INFO] DbBoardsPdsc:56 - Set plugin database path to: C:\ST\STM32CubeIDE_1.4.0\STM32CubeIDE\plugins\com.st.stm32cube.common.mx_6.0.0.202007160824\\db\/plugins/boardmanager/
958
+2020-11-18 11:56:45,856 [INFO] DbMcus:258 - Set plugin images path to: C:\ST\STM32CubeIDE_1.4.0\STM32CubeIDE\plugins\com.st.stm32cube.common.mx_6.0.0.202007160824\\db\/plugins/mcufinder/images/
959
+2020-11-18 11:56:45,856 [INFO] DbBoards:264 - Set plugin images path to: C:\ST\STM32CubeIDE_1.4.0\STM32CubeIDE\plugins\com.st.stm32cube.common.mx_6.0.0.202007160824\\db\/plugins/mcufinder/images/
960
+2020-11-18 11:56:45,859 [INFO] DbExamples:326 - Set plugin images path to: C:\ST\STM32CubeIDE_1.4.0\STM32CubeIDE\plugins\com.st.stm32cube.common.mx_6.0.0.202007160824\\db\/plugins/mcufinder/images/
961
+2020-11-18 11:56:45,865 [INFO] DbMcusDocs:112 - Set database path to: C:\Users\camer\.stmcufinder\plugins\mcufinder//mcu/
962
+2020-11-18 11:56:45,868 [INFO] DbMcusJson:63 - Set database path to: C:\Users\camer\.stmcufinder\plugins\mcufinder//mcu/
963
+2020-11-18 11:56:45,869 [INFO] DbBoardsDocs:112 - Set database path to: C:\Users\camer\.stmcufinder\plugins\mcufinder//mcu/
964
+2020-11-18 11:56:45,871 [INFO] DbBoardsJson:56 - Set database path to: C:\Users\camer\.stmcufinder\plugins\mcufinder//mcu/
965
+2020-11-18 11:56:45,907 [INFO] CrossReferenceDbSqlite:196 - Set database path to: C:\Users\camer\.stmcufinder\plugins\mcufinder//mcu/cs/
966
+2020-11-18 11:56:45,912 [INFO] DbExamplesSqlite:800 - Set database path to: C:\Users\camer\.stmcufinder\plugins\mcufinder//mcu/
967
+2020-11-18 11:56:46,056 [INFO] MicroXplorer:564 - Detected Java Version = 1.8.0_252
968
+2020-11-18 11:56:46,056 [INFO] DbMcusXml:70 - Set database path to: C:\ST\STM32CubeIDE_1.4.0\STM32CubeIDE\plugins\com.st.stm32cube.common.mx_6.0.0.202007160824\\db\/mcu/
969
+2020-11-18 11:56:46,057 [INFO] DbBoardsPdsc:56 - Set plugin database path to: C:\ST\STM32CubeIDE_1.4.0\STM32CubeIDE\plugins\com.st.stm32cube.common.mx_6.0.0.202007160824\\db\/plugins/boardmanager/
970
+2020-11-18 11:56:46,058 [INFO] DbMcus:258 - Set plugin images path to: C:\ST\STM32CubeIDE_1.4.0\STM32CubeIDE\plugins\com.st.stm32cube.common.mx_6.0.0.202007160824\\db\/plugins/mcufinder/images/
971
+2020-11-18 11:56:46,058 [INFO] DbBoards:264 - Set plugin images path to: C:\ST\STM32CubeIDE_1.4.0\STM32CubeIDE\plugins\com.st.stm32cube.common.mx_6.0.0.202007160824\\db\/plugins/mcufinder/images/
972
+2020-11-18 11:56:46,058 [INFO] DbExamples:326 - Set plugin images path to: C:\ST\STM32CubeIDE_1.4.0\STM32CubeIDE\plugins\com.st.stm32cube.common.mx_6.0.0.202007160824\\db\/plugins/mcufinder/images/
973
+2020-11-18 11:56:46,058 [WARN] DbFile:36 - Overriding database path with different value: C:\Users\camer\.stmcufinder\plugins\mcufinder/ => C:\Users\camer\.stmcufinder\plugins\mcufinder
974
+2020-11-18 11:56:46,059 [INFO] DbMcusDocs:112 - Set database path to: C:\Users\camer\.stmcufinder\plugins\mcufinder//mcu/
975
+2020-11-18 11:56:46,059 [WARN] DbFile:36 - Overriding database path with different value: C:\Users\camer\.stmcufinder\plugins\mcufinder/ => C:\Users\camer\.stmcufinder\plugins\mcufinder
976
+2020-11-18 11:56:46,059 [INFO] DbMcusJson:63 - Set database path to: C:\Users\camer\.stmcufinder\plugins\mcufinder//mcu/
977
+2020-11-18 11:56:46,059 [WARN] DbFile:36 - Overriding database path with different value: C:\Users\camer\.stmcufinder\plugins\mcufinder/ => C:\Users\camer\.stmcufinder\plugins\mcufinder
978
+2020-11-18 11:56:46,060 [INFO] DbBoardsDocs:112 - Set database path to: C:\Users\camer\.stmcufinder\plugins\mcufinder//mcu/
979
+2020-11-18 11:56:46,060 [WARN] DbFile:36 - Overriding database path with different value: C:\Users\camer\.stmcufinder\plugins\mcufinder/ => C:\Users\camer\.stmcufinder\plugins\mcufinder
980
+2020-11-18 11:56:46,060 [INFO] DbBoardsJson:56 - Set database path to: C:\Users\camer\.stmcufinder\plugins\mcufinder//mcu/
981
+2020-11-18 11:56:46,060 [WARN] DbFile:36 - Overriding database path with different value: C:\Users\camer\.stmcufinder\plugins\mcufinder/ => C:\Users\camer\.stmcufinder\plugins\mcufinder
982
+2020-11-18 11:56:46,060 [WARN] DbFile:36 - Overriding database path with different value: C:\Users\camer\.stmcufinder\plugins\mcufinder/ => C:\Users\camer\.stmcufinder\plugins\mcufinder
983
+2020-11-18 11:56:46,061 [INFO] CrossReferenceDbSqlite:196 - Set database path to: C:\Users\camer\.stmcufinder\plugins\mcufinder//mcu/cs/
984
+2020-11-18 11:56:46,061 [WARN] DbFile:36 - Overriding database path with different value: C:\Users\camer\.stmcufinder\plugins\mcufinder/ => C:\Users\camer\.stmcufinder\plugins\mcufinder
985
+2020-11-18 11:56:46,061 [INFO] DbExamplesSqlite:800 - Set database path to: C:\Users\camer\.stmcufinder\plugins\mcufinder//mcu/
986
+2020-11-18 11:56:46,163 [INFO] MainPanel:189 - HeapMemory: 682622976
987
+2020-11-18 11:56:46,236 [INFO] DbMcusXml:70 - Set database path to: C:\ST\STM32CubeIDE_1.4.0\STM32CubeIDE\plugins\com.st.stm32cube.common.mx_6.0.0.202007160824\\db\/mcu/
988
+2020-11-18 11:56:46,236 [INFO] DbBoardsPdsc:56 - Set plugin database path to: C:\ST\STM32CubeIDE_1.4.0\STM32CubeIDE\plugins\com.st.stm32cube.common.mx_6.0.0.202007160824\\db\/plugins/boardmanager/
989
+2020-11-18 11:56:46,237 [INFO] DbMcus:258 - Set plugin images path to: C:\ST\STM32CubeIDE_1.4.0\STM32CubeIDE\plugins\com.st.stm32cube.common.mx_6.0.0.202007160824\\db\/plugins/mcufinder/images/
990
+2020-11-18 11:56:46,237 [INFO] DbBoards:264 - Set plugin images path to: C:\ST\STM32CubeIDE_1.4.0\STM32CubeIDE\plugins\com.st.stm32cube.common.mx_6.0.0.202007160824\\db\/plugins/mcufinder/images/
991
+2020-11-18 11:56:46,237 [INFO] DbExamples:326 - Set plugin images path to: C:\ST\STM32CubeIDE_1.4.0\STM32CubeIDE\plugins\com.st.stm32cube.common.mx_6.0.0.202007160824\\db\/plugins/mcufinder/images/
992
+2020-11-18 11:56:46,238 [WARN] DbFile:36 - Overriding database path with different value: C:\Users\camer\.stmcufinder\plugins\mcufinder/ => C:\Users\camer\.stmcufinder\plugins\mcufinder
993
+2020-11-18 11:56:46,238 [INFO] DbMcusDocs:112 - Set database path to: C:\Users\camer\.stmcufinder\plugins\mcufinder//mcu/
994
+2020-11-18 11:56:46,239 [WARN] DbFile:36 - Overriding database path with different value: C:\Users\camer\.stmcufinder\plugins\mcufinder/ => C:\Users\camer\.stmcufinder\plugins\mcufinder
995
+2020-11-18 11:56:46,239 [INFO] DbMcusJson:63 - Set database path to: C:\Users\camer\.stmcufinder\plugins\mcufinder//mcu/
996
+2020-11-18 11:56:46,239 [WARN] DbFile:36 - Overriding database path with different value: C:\Users\camer\.stmcufinder\plugins\mcufinder/ => C:\Users\camer\.stmcufinder\plugins\mcufinder
997
+2020-11-18 11:56:46,240 [INFO] DbBoardsDocs:112 - Set database path to: C:\Users\camer\.stmcufinder\plugins\mcufinder//mcu/
998
+2020-11-18 11:56:46,240 [WARN] DbFile:36 - Overriding database path with different value: C:\Users\camer\.stmcufinder\plugins\mcufinder/ => C:\Users\camer\.stmcufinder\plugins\mcufinder
999
+2020-11-18 11:56:46,240 [INFO] DbBoardsJson:56 - Set database path to: C:\Users\camer\.stmcufinder\plugins\mcufinder//mcu/
1000
+2020-11-18 11:56:46,240 [WARN] DbFile:36 - Overriding database path with different value: C:\Users\camer\.stmcufinder\plugins\mcufinder/ => C:\Users\camer\.stmcufinder\plugins\mcufinder
1001
+2020-11-18 11:56:46,240 [WARN] DbFile:36 - Overriding database path with different value: C:\Users\camer\.stmcufinder\plugins\mcufinder/ => C:\Users\camer\.stmcufinder\plugins\mcufinder
1002
+2020-11-18 11:56:46,241 [INFO] CrossReferenceDbSqlite:196 - Set database path to: C:\Users\camer\.stmcufinder\plugins\mcufinder//mcu/cs/
1003
+2020-11-18 11:56:46,241 [WARN] DbFile:36 - Overriding database path with different value: C:\Users\camer\.stmcufinder\plugins\mcufinder/ => C:\Users\camer\.stmcufinder\plugins\mcufinder
1004
+2020-11-18 11:56:46,241 [INFO] DbExamplesSqlite:800 - Set database path to: C:\Users\camer\.stmcufinder\plugins\mcufinder//mcu/
1005
+2020-11-18 11:56:46,260 [INFO] ApplicationProperties:181 - Using Application install path: C:\ST\STM32CubeIDE_1.4.0\STM32CubeIDE\plugins\com.st.stm32cube.common.mx_6.0.0.202007160824
1006
+2020-11-18 11:56:46,262 [INFO] PluginManage:178 - Search for loadable plugins [exclusion list=, ]
1007
+2020-11-18 11:56:46,263 [INFO] PluginManage:292 - Check plugin analytics
1008
+2020-11-18 11:56:46,457 [INFO] AnalyticsPlugin:203 - Accepted Software Licenses: 
1009
+2020-11-18 11:56:46,458 [INFO] AnalyticsPlugin:205 - Accepted CMSIS Pack Licenses: 
1010
+2020-11-18 11:56:46,459 [INFO] AnalyticsPlugin:207 - Accepted Firmware Licenses: 
1011
+2020-11-18 11:56:46,460 [INFO] PluginManage:342 - Loaded plugin analytics (category:tool,tabindex:-1)
1012
+2020-11-18 11:56:46,460 [INFO] PluginManage:292 - Check plugin clock
1013
+2020-11-18 11:56:46,479 [INFO] PluginManage:342 - Loaded plugin clock (category:base,tabindex:2)
1014
+2020-11-18 11:56:46,480 [INFO] PluginManage:292 - Check plugin ddr
1015
+2020-11-18 11:56:46,484 [INFO] PluginManage:342 - Loaded plugin ddr (category:tool,tabindex:6)
1016
+2020-11-18 11:56:46,484 [INFO] PluginManage:292 - Check plugin filemanager
1017
+2020-11-18 11:56:46,640 [INFO] PluginManage:342 - Loaded plugin filemanager (category:base,tabindex:10)
1018
+2020-11-18 11:56:46,640 [INFO] PluginManage:292 - Check plugin ipmanager
1019
+2020-11-18 11:56:46,659 [INFO] PluginManage:342 - Loaded plugin ipmanager (category:base,tabindex:5)
1020
+2020-11-18 11:56:46,659 [INFO] PluginManage:292 - Check plugin pinoutandconfiguration
1021
+2020-11-18 11:56:46,675 [INFO] PluginManage:342 - Loaded plugin pinoutandconfiguration (category:base,tabindex:1)
1022
+2020-11-18 11:56:46,675 [INFO] PluginManage:292 - Check plugin pinoutconfig
1023
+2020-11-18 11:56:46,708 [INFO] PluginManage:342 - Loaded plugin pinoutconfig (category:base,tabindex:0)
1024
+2020-11-18 11:56:46,708 [INFO] PluginManage:292 - Check plugin power
1025
+2020-11-18 11:56:46,717 [INFO] PluginManage:342 - Loaded plugin power (category:power,tabindex:4)
1026
+2020-11-18 11:56:46,718 [INFO] PluginManage:292 - Check plugin projectmanager
1027
+2020-11-18 11:56:46,738 [INFO] PluginManage:342 - Loaded plugin projectmanager (category:projectmanager,tabindex:3)
1028
+2020-11-18 11:56:46,739 [INFO] PluginManage:292 - Check plugin thirdparty
1029
+2020-11-18 11:56:46,834 [INFO] ThirdPartyDb:333 - Open Third Party DataBase File (C:/Users/camer/.stm32cubemx/plugins/thirdparty/db/thirdparties_db.xml) : 35 ms. number of Sw pack : 23
1030
+2020-11-18 11:56:46,842 [INFO] PluginManage:342 - Loaded plugin thirdparty (category:base,tabindex:-1)
1031
+2020-11-18 11:56:46,842 [INFO] PluginManage:292 - Check plugin tools
1032
+2020-11-18 11:56:46,845 [INFO] PluginManage:342 - Loaded plugin tools (category:base,tabindex:7)
1033
+2020-11-18 11:56:46,846 [INFO] PluginManage:292 - Check plugin tutovideos
1034
+2020-11-18 11:56:47,082 [INFO] PluginManage:342 - Loaded plugin tutovideos (category:base,tabindex:-1)
1035
+2020-11-18 11:56:47,083 [INFO] PluginManage:292 - Check plugin updater
1036
+2020-11-18 11:56:47,101 [INFO] PluginManage:342 - Loaded plugin updater (category:base,tabindex:12)
1037
+2020-11-18 11:56:47,102 [INFO] PluginManage:265 - PluginManage : Loaded plugins [13]
1038
+2020-11-18 11:56:47,442 [INFO] PinOutPanel:1418 - setPackage(No Configuration,No Configuration)
1039
+2020-11-18 11:56:47,589 [INFO] IPUIPlugin:64 - create IPUIPlugin
1040
+2020-11-18 11:56:47,589 [INFO] PluginManager:200 - loadIPPluginJar : add adc
1041
+2020-11-18 11:56:47,593 [INFO] IPUIPlugin:64 - create IPUIPlugin
1042
+2020-11-18 11:56:47,593 [INFO] PluginManager:200 - loadIPPluginJar : add aes
1043
+2020-11-18 11:56:47,596 [INFO] IPUIPlugin:64 - create IPUIPlugin
1044
+2020-11-18 11:56:47,597 [INFO] PluginManager:200 - loadIPPluginJar : add can
1045
+2020-11-18 11:56:47,599 [INFO] IPUIPlugin:64 - create IPUIPlugin
1046
+2020-11-18 11:56:47,600 [INFO] PluginManager:200 - loadIPPluginJar : add comp
1047
+2020-11-18 11:56:47,603 [INFO] IPUIPlugin:64 - create IPUIPlugin
1048
+2020-11-18 11:56:47,603 [INFO] PluginManager:200 - loadIPPluginJar : add cryp
1049
+2020-11-18 11:56:47,606 [INFO] IPUIPlugin:64 - create IPUIPlugin
1050
+2020-11-18 11:56:47,606 [INFO] PluginManager:200 - loadIPPluginJar : add dfsdm
1051
+2020-11-18 11:56:47,613 [INFO] IPUIPlugin:64 - create IPUIPlugin
1052
+2020-11-18 11:56:47,614 [INFO] PluginManager:200 - loadIPPluginJar : add dma
1053
+2020-11-18 11:56:47,616 [INFO] IPUIPlugin:64 - create IPUIPlugin
1054
+2020-11-18 11:56:47,616 [INFO] PluginManager:200 - loadIPPluginJar : add fatfs
1055
+2020-11-18 11:56:47,621 [INFO] IPUIPlugin:64 - create IPUIPlugin
1056
+2020-11-18 11:56:47,621 [INFO] PluginManager:200 - loadIPPluginJar : add fmc
1057
+2020-11-18 11:56:47,628 [INFO] IPUIPlugin:64 - create IPUIPlugin
1058
+2020-11-18 11:56:47,628 [INFO] PluginManager:200 - loadIPPluginJar : add freertos
1059
+2020-11-18 11:56:47,630 [INFO] IPUIPlugin:64 - create IPUIPlugin
1060
+2020-11-18 11:56:47,631 [INFO] PluginManager:200 - loadIPPluginJar : add genericplugin
1061
+2020-11-18 11:56:47,634 [INFO] IPUIPlugin:64 - create IPUIPlugin
1062
+2020-11-18 11:56:47,634 [INFO] PluginManager:200 - loadIPPluginJar : add gfxmmu
1063
+2020-11-18 11:56:47,645 [INFO] IPUIPlugin:64 - create IPUIPlugin
1064
+2020-11-18 11:56:47,645 [INFO] PluginManager:200 - loadIPPluginJar : add gic
1065
+2020-11-18 11:56:47,650 [INFO] IPUIPlugin:64 - create IPUIPlugin
1066
+2020-11-18 11:56:47,650 [INFO] PluginManager:200 - loadIPPluginJar : add gpio
1067
+2020-11-18 11:56:47,653 [INFO] IPUIPlugin:64 - create IPUIPlugin
1068
+2020-11-18 11:56:47,653 [INFO] PluginManager:200 - loadIPPluginJar : add gtzc
1069
+2020-11-18 11:56:47,656 [INFO] IPUIPlugin:64 - create IPUIPlugin
1070
+2020-11-18 11:56:47,656 [INFO] PluginManager:200 - loadIPPluginJar : add hash
1071
+2020-11-18 11:56:47,659 [INFO] IPUIPlugin:64 - create IPUIPlugin
1072
+2020-11-18 11:56:47,660 [INFO] PluginManager:200 - loadIPPluginJar : add i2c
1073
+2020-11-18 11:56:47,662 [INFO] IPUIPlugin:64 - create IPUIPlugin
1074
+2020-11-18 11:56:47,663 [INFO] PluginManager:200 - loadIPPluginJar : add i2s
1075
+2020-11-18 11:56:47,666 [INFO] IPUIPlugin:64 - create IPUIPlugin
1076
+2020-11-18 11:56:47,667 [INFO] PluginManager:200 - loadIPPluginJar : add ipddr
1077
+2020-11-18 11:56:47,668 [INFO] IPUIPlugin:64 - create IPUIPlugin
1078
+2020-11-18 11:56:47,669 [INFO] PluginManager:200 - loadIPPluginJar : add ltdc
1079
+2020-11-18 11:56:47,673 [INFO] IPUIPlugin:64 - create IPUIPlugin
1080
+2020-11-18 11:56:47,673 [INFO] PluginManager:200 - loadIPPluginJar : add mdma
1081
+2020-11-18 11:56:47,677 [INFO] IPUIPlugin:64 - create IPUIPlugin
1082
+2020-11-18 11:56:47,678 [INFO] PluginManager:200 - loadIPPluginJar : add nvic
1083
+2020-11-18 11:56:47,681 [INFO] IPUIPlugin:64 - create IPUIPlugin
1084
+2020-11-18 11:56:47,681 [INFO] PluginManager:200 - loadIPPluginJar : add opamp
1085
+2020-11-18 11:56:47,685 [INFO] IPUIPlugin:64 - create IPUIPlugin
1086
+2020-11-18 11:56:47,685 [INFO] PluginManager:200 - loadIPPluginJar : add openamp
1087
+2020-11-18 11:56:47,688 [INFO] IPUIPlugin:64 - create IPUIPlugin
1088
+2020-11-18 11:56:47,689 [INFO] PluginManager:200 - loadIPPluginJar : add pdm2pcm
1089
+2020-11-18 11:56:47,696 [INFO] IPUIPlugin:64 - create IPUIPlugin
1090
+2020-11-18 11:56:47,700 [INFO] PluginManager:200 - loadIPPluginJar : add plateformsettings
1091
+2020-11-18 11:56:47,702 [INFO] IPUIPlugin:64 - create IPUIPlugin
1092
+2020-11-18 11:56:47,702 [INFO] PluginManager:200 - loadIPPluginJar : add quadspi
1093
+2020-11-18 11:56:47,706 [INFO] IPUIPlugin:64 - create IPUIPlugin
1094
+2020-11-18 11:56:47,706 [INFO] PluginManager:200 - loadIPPluginJar : add resmgrutility
1095
+2020-11-18 11:56:47,710 [INFO] IPUIPlugin:64 - create IPUIPlugin
1096
+2020-11-18 11:56:47,710 [INFO] PluginManager:200 - loadIPPluginJar : add sai
1097
+2020-11-18 11:56:47,714 [INFO] IPUIPlugin:64 - create IPUIPlugin
1098
+2020-11-18 11:56:47,714 [INFO] PluginManager:200 - loadIPPluginJar : add spi
1099
+2020-11-18 11:56:47,720 [INFO] IPUIPlugin:64 - create IPUIPlugin
1100
+2020-11-18 11:56:47,720 [INFO] PluginManager:200 - loadIPPluginJar : add stm32_wpan
1101
+2020-11-18 11:56:47,723 [INFO] IPUIPlugin:64 - create IPUIPlugin
1102
+2020-11-18 11:56:47,723 [INFO] PluginManager:200 - loadIPPluginJar : add tim
1103
+2020-11-18 11:56:47,728 [INFO] IPUIPlugin:64 - create IPUIPlugin
1104
+2020-11-18 11:56:47,728 [INFO] PluginManager:200 - loadIPPluginJar : add touchsensing
1105
+2020-11-18 11:56:47,731 [INFO] IPUIPlugin:64 - create IPUIPlugin
1106
+2020-11-18 11:56:47,732 [INFO] PluginManager:200 - loadIPPluginJar : add tracer_emb
1107
+2020-11-18 11:56:47,734 [INFO] IPUIPlugin:64 - create IPUIPlugin
1108
+2020-11-18 11:56:47,735 [INFO] PluginManager:200 - loadIPPluginJar : add ts
1109
+2020-11-18 11:56:47,737 [INFO] IPUIPlugin:64 - create IPUIPlugin
1110
+2020-11-18 11:56:47,738 [INFO] PluginManager:200 - loadIPPluginJar : add tsc
1111
+2020-11-18 11:56:47,740 [INFO] IPUIPlugin:64 - create IPUIPlugin
1112
+2020-11-18 11:56:47,741 [INFO] PluginManager:200 - loadIPPluginJar : add ucpd
1113
+2020-11-18 11:56:47,745 [INFO] IPUIPlugin:64 - create IPUIPlugin
1114
+2020-11-18 11:56:47,746 [INFO] PluginManager:200 - loadIPPluginJar : add usart
1115
+2020-11-18 11:56:48,726 [INFO] CubeProgrammer:457 - [DDR PANEL] - PathOfProgrammer: null
1116
+2020-11-18 11:56:49,727 [FATAL] Updater:282 - Updater called before beeing initialized
1117
+2020-11-18 11:56:49,928 [FATAL] Updater:282 - Updater called before beeing initialized
1118
+2020-11-18 11:56:49,929 [WARN] ThirdParty:775 - waiting for thirdparty lock release [close project]
1119
+2020-11-18 11:56:49,929 [INFO] ThirdParty:777 - entering critical section [close project]
1120
+2020-11-18 11:56:49,930 [INFO] ThirdParty:790 - exiting critical section [close project]
1121
+2020-11-18 11:56:49,933 [INFO] PinOutPanel:1418 - setPackage(No Configuration,No Configuration)
1122
+2020-11-18 11:56:49,934 [FATAL] Updater:282 - Updater called before beeing initialized
1123
+2020-11-18 11:56:49,940 [ERROR] Updater:967 - MainUpdater not yet initialized. External WinMGr cannot be set.
1124
+2020-11-18 11:56:49,941 [INFO] CubeProgrammer:457 - [DDR PANEL] - PathOfProgrammer: C:\ST\STM32CubeIDE_1.4.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.win32_1.4.0.202007081208\tools\bin
1125
+2020-11-18 11:56:49,945 [INFO] ProgrammerExecThread:148 - [ProgrammerAPI] CubeProgrammer command construction: C:\ST\STM32CubeIDE_1.4.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.win32_1.4.0.202007081208\tools\bin\STM32_Programmer_CLI.exe -l
1126
+2020-11-18 11:56:50,046 [INFO] MainDdrPanel:49 - [DDR PANEL] SETTER - Set cubeProgrammerPath to: C:\ST\STM32CubeIDE_1.4.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.win32_1.4.0.202007081208\tools\bin
1127
+2020-11-18 11:56:50,048 [INFO] Updater:904 - Updater Version found : 6.0.0
1128
+2020-11-18 11:56:50,069 [INFO] ApplicationProperties:181 - Using Application install path: C:\ST\STM32CubeIDE_1.4.0\STM32CubeIDE\plugins\com.st.stm32cube.common.mx_6.0.0.202007160824
1129
+2020-11-18 11:56:50,260 [INFO] MainUpdater:2268 - connection check result : 10
1130
+2020-11-18 11:56:50,261 [INFO] MainUpdater:239 - Updater Check For Update Now.
1131
+2020-11-18 11:56:50,261 [INFO] MicroXplorer:414 - Change Database Version : DB.6.0.0
1132
+2020-11-18 11:56:50,298 [INFO] CheckServerUpdateThread:102 - End of CheckServer Thread
1133
+2020-11-18 11:56:50,368 [INFO] MainUpdater:2268 - connection check result : 10
1134
+2020-11-18 11:56:50,369 [INFO] MainUpdater:2268 - connection check result : 10
1135
+2020-11-18 11:56:50,474 [INFO] MicroXplorer:384 - Change Database Path : 
1136
+2020-11-18 11:56:50,475 [INFO] MicroXplorer:414 - Change Database Version : DB.6.0.0
1137
+2020-11-18 11:56:50,475 [WARN] ThirdParty:775 - waiting for thirdparty lock release [close project]
1138
+2020-11-18 11:56:50,476 [INFO] ThirdParty:777 - entering critical section [close project]
1139
+2020-11-18 11:56:50,476 [INFO] ThirdParty:790 - exiting critical section [close project]
1140
+2020-11-18 11:56:50,480 [INFO] PinOutPanel:1418 - setPackage(No Configuration,No Configuration)
1141
+2020-11-18 11:56:50,481 [INFO] UtilMem:74 - Begin LoadConfig() Used Memory: 482966912 Bytes (682622976)
1142
+2020-11-18 11:56:50,483 [INFO] MicroXplorer:384 - Change Database Path : 
1143
+2020-11-18 11:56:50,483 [INFO] MicroXplorer:414 - Change Database Version : DB.6.0.0
1144
+2020-11-18 11:56:50,483 [INFO] OpenFileManager:274 - Change cursor
1145
+2020-11-18 11:56:52,845 [WARN] IntegrityCheckThread:61 - waiting for thirdparty lock release [integrity check]
1146
+2020-11-18 11:56:52,845 [INFO] IntegrityCheckThread:63 - entering critical section [integrity check]
1147
+2020-11-18 11:56:52,937 [INFO] ThirdPartyDb:299 - Save Third Party DataBase File (C:/Users/camer/.stm32cubemx/plugins/thirdparty/db/thirdparties_db.xml) [forced]
1148
+2020-11-18 11:56:53,053 [INFO] ThirdPartyDb:299 - Save Third Party DataBase File (C:/Users/camer/.stm32cubemx/plugins/thirdparty/db/thirdparties_db.xml) [forced]
1149
+2020-11-18 11:56:53,095 [INFO] IntegrityCheckThread:76 - exiting critical section [integrity check]
1150
+2020-11-18 11:56:53,095 [INFO] IntegrityCheckThread:79 - End integrity checks thread
1151
+2020-11-18 11:56:55,489 [WARN] ApiManager:274 - Cannot register API 'Board Extension:IKS01A3' from pack STMicroelectronics.X-CUBE-MEMS1.8.1.1: no header file found
1152
+2020-11-18 11:56:55,490 [WARN] ApiManager:274 - Cannot register API 'Board Extension:IKS01A2' from pack STMicroelectronics.X-CUBE-MEMS1.8.1.1: no header file found
1153
+2020-11-18 11:56:55,490 [WARN] ApiManager:274 - Cannot register API 'Board Extension:IKS02A1' from pack STMicroelectronics.X-CUBE-MEMS1.8.1.1: no header file found
1154
+2020-11-18 11:56:55,495 [INFO] DependencyParser:915 - This component is not compatible with the current MCU : [1604477466237]
1155
+2020-11-18 11:56:55,495 [INFO] ThirdPartyModel:556 - Component with status : MCU_INCOMPATIBLE for condition : GFX01M1_Condition id : 1604477466222
1156
+2020-11-18 11:56:55,496 [INFO] DependencyParser:915 - This component is not compatible with the current MCU : [1604477466237]
1157
+2020-11-18 11:56:55,496 [INFO] ThirdPartyModel:556 - Component with status : MCU_INCOMPATIBLE for condition : GFX01M1_HelloWorld_Condition id : 1604477466224
1158
+2020-11-18 11:56:55,498 [INFO] RtosManager:456 - Registered RTOS mode: class=CMSIS, group=RTOS, mode=CMSIS_V1, owner=FREERTOS
1159
+2020-11-18 11:56:55,498 [INFO] RtosManager:456 - Registered RTOS mode: class=CMSIS, group=RTOS2, mode=CMSIS_V2, owner=FREERTOS
1160
+2020-11-18 11:56:55,499 [INFO] RtosManager:456 - Registered RTOS mode: class=RTOS, group=Core, mode=CMSIS_V1, owner=FREERTOS
1161
+2020-11-18 11:56:55,499 [INFO] RtosManager:456 - Registered RTOS mode: class=RTOS, group=Core, mode=CMSIS_V2, owner=FREERTOS
1162
+2020-11-18 11:56:55,499 [WARN] ModelIntegratedComponent:188 - Missing modes for component 1604477487609
1163
+2020-11-18 11:56:55,501 [WARN] ApiManager:274 - Cannot register API 'Board Extension:GNSS1A1' from pack STMicroelectronics.X-CUBE-GNSS1.5.0.0: no header file found
1164
+2020-11-18 11:56:55,501 [WARN] ApiManager:274 - Cannot register API 'Board Support:Custom' from pack STMicroelectronics.X-CUBE-GNSS1.5.0.0: no header file found
1165
+2020-11-18 11:56:55,501 [WARN] ApiManager:274 - Cannot register API 'Data Exchange:lib_gnss' from pack STMicroelectronics.X-CUBE-GNSS1.5.0.0: no header file found
1166
+2020-11-18 11:56:55,502 [WARN] ApiManager:274 - Cannot register API 'Board Extension:S2868A1' from pack STMicroelectronics.X-CUBE-SUBG2.2.0.0: no header file found
1167
+2020-11-18 11:56:55,502 [WARN] ApiManager:274 - Cannot register API 'Board Extension:S2868A2' from pack STMicroelectronics.X-CUBE-SUBG2.2.0.0: no header file found
1168
+2020-11-18 11:56:55,502 [WARN] ApiManager:274 - Cannot register API 'Board Extension:S2915A1' from pack STMicroelectronics.X-CUBE-SUBG2.2.0.0: no header file found
1169
+2020-11-18 11:56:55,502 [WARN] ApiManager:274 - Cannot register API 'Wireless:BlueNRG-MS' from pack STMicroelectronics.X-CUBE-BLE1.6.0.0: no header file found
1170
+2020-11-18 11:56:55,503 [WARN] ApiManager:274 - Cannot register API 'Wireless:BlueNRG-2' from pack STMicroelectronics.X-CUBE-BLE2.3.0.0: no header file found
1171
+2020-11-18 11:56:55,670 [INFO] ImportTextPane:162 - (OptionalMessage_ERROR) IP (RCC) : Invalid parameter (FamilyName)
1172
+2020-11-18 11:56:56,174 [INFO] UtilMem:74 - End LoadConfig() Used Memory: 459874264 Bytes (721420288)
1173
+2020-11-18 11:56:56,177 [INFO] DbMcusXml:100 - Load MCU database from C:\ST\STM32CubeIDE_1.4.0\STM32CubeIDE\plugins\com.st.stm32cube.common.mx_6.0.0.202007160824\\db\/mcu/families.xml
1174
+2020-11-18 11:56:56,913 [INFO] DbMcusJson:92 - JSON generation date=Thu Nov 05 17:05:07 CET 2020 (1604592307)
1175
+2020-11-18 11:56:58,007 [INFO] DbMcus:175 - Found 1761 MCUs (1722 are supported by CubeMX, 1738 are visible in CubeMX)
1176
+2020-11-18 11:56:58,008 [INFO] ApiDb:201 - Load user favorites file C:\Users\camer/.stm32cubemx/favorites.mcus.txt: 0 item(s)
1177
+2020-11-18 11:56:58,008 [INFO] ApiDb:205 - User favorites MCUs=[]
1178
+2020-11-18 11:56:58,008 [INFO] DbMcus:187 - Set 0 / 0 favorites MCUs
1179
+2020-11-18 11:56:58,011 [WARN] ThirdParty:741 - waiting for thirdparty lock release [change project]
1180
+2020-11-18 11:56:58,011 [INFO] ThirdParty:743 - entering critical section [change project]
1181
+2020-11-18 11:56:58,012 [INFO] ThirdParty:968 - CMSIS Pack Vendor :STMicroelectronics X-CUBE-MEMS1 8.1.1
1182
+2020-11-18 11:56:58,012 [INFO] ThirdParty:968 - CMSIS Pack Vendor :STMicroelectronics USB_HOST 2.0.0
1183
+2020-11-18 11:56:58,012 [INFO] ThirdParty:968 - CMSIS Pack Vendor :STMicroelectronics X-CUBE-DISPLAY 1.0.0
1184
+2020-11-18 11:56:58,012 [INFO] ThirdParty:968 - CMSIS Pack Vendor :STMicroelectronics FreeRTOS 0.0.1
1185
+2020-11-18 11:56:58,012 [INFO] ThirdParty:968 - CMSIS Pack Vendor :STMicroelectronics USB_DEVICE 1.0.0
1186
+2020-11-18 11:56:58,012 [INFO] ThirdParty:968 - CMSIS Pack Vendor :STMicroelectronics X-CUBE-ALGOBUILD 1.1.0
1187
+2020-11-18 11:56:58,012 [INFO] ThirdParty:968 - CMSIS Pack Vendor :STMicroelectronics USB_DEVICE 3.0.0
1188
+2020-11-18 11:56:58,012 [INFO] ThirdParty:968 - CMSIS Pack Vendor :STMicroelectronics X-CUBE-GNSS1 5.0.0
1189
+2020-11-18 11:56:58,012 [INFO] ThirdParty:968 - CMSIS Pack Vendor :STMicroelectronics X-CUBE-SUBG2 2.0.0
1190
+2020-11-18 11:56:58,012 [INFO] ThirdParty:968 - CMSIS Pack Vendor :STMicroelectronics MBEDTLS 2.16.2
1191
+2020-11-18 11:56:58,012 [INFO] ThirdParty:968 - CMSIS Pack Vendor :STMicroelectronics X-CUBE-BLE1 6.0.0
1192
+2020-11-18 11:56:58,013 [INFO] ThirdParty:968 - CMSIS Pack Vendor :STMicroelectronics lwIP 2.0.3
1193
+2020-11-18 11:56:58,013 [INFO] ThirdParty:968 - CMSIS Pack Vendor :STMicroelectronics lwIP 2.1.2
1194
+2020-11-18 11:56:58,013 [INFO] ThirdParty:968 - CMSIS Pack Vendor :STMicroelectronics MBEDTLS 2.14.1
1195
+2020-11-18 11:56:58,013 [INFO] ThirdParty:968 - CMSIS Pack Vendor :STMicroelectronics X-CUBE-TOUCHGFX 4.15.0
1196
+2020-11-18 11:56:58,013 [INFO] ThirdParty:968 - CMSIS Pack Vendor :STMicroelectronics USB_HOST 1.0.0
1197
+2020-11-18 11:56:58,013 [INFO] ThirdParty:968 - CMSIS Pack Vendor :STMicroelectronics X-CUBE-AI 5.2.0
1198
+2020-11-18 11:56:58,013 [INFO] ThirdParty:968 - CMSIS Pack Vendor :STMicroelectronics X-CUBE-BLE2 3.0.0
1199
+2020-11-18 11:56:58,013 [INFO] ThirdParty:968 - CMSIS Pack Vendor :STMicroelectronics X-CUBE-NFC4 2.0.0
1200
+2020-11-18 11:56:58,013 [INFO] ThirdParty:968 - CMSIS Pack Vendor :STMicroelectronics PDM2PCM 3.1.0
1201
+2020-11-18 11:56:58,013 [INFO] ThirdParty:968 - CMSIS Pack Vendor :STMicroelectronics PDM2PCM 3.2.0
1202
+2020-11-18 11:56:58,014 [INFO] ThirdParty:968 - CMSIS Pack Vendor :STMicroelectronics USB_DEVICE 2.0.0
1203
+2020-11-18 11:56:58,014 [INFO] ThirdParty:968 - CMSIS Pack Vendor :STMicroelectronics PDM2PCM 3.3.0
1204
+2020-11-18 11:56:58,014 [INFO] ThirdParty:749 - exiting critical section [change project]
1205
+2020-11-18 11:56:58,597 [INFO] PinOutPanel:1418 - setPackage(No Configuration,No Configuration)
1206
+2020-11-18 11:56:58,599 [INFO] PinOutPanel:1418 - setPackage(STM32L476RGTx,LQFP64)
1207
+2020-11-18 11:56:59,555 [INFO] UtilMem:74 - Before build in PCC Used Memory: 515862920 Bytes (796917760)
1208
+2020-11-18 11:57:00,390 [INFO] SharedServices:71 - Folder for power plug-in: C:/Users/camer/.stm32cubemx/plugins/power
1209
+2020-11-18 11:57:00,464 [INFO] SharedServices:71 - Folder for power plug-in: C:/Users/camer/.stm32cubemx/plugins/power
1210
+2020-11-18 11:57:00,574 [INFO] SharedServices:71 - Folder for power plug-in: C:/Users/camer/.stm32cubemx/plugins/power
1211
+2020-11-18 11:57:00,590 [INFO] SharedServices:71 - Folder for power plug-in: C:/Users/camer/.stm32cubemx/plugins/power
1212
+2020-11-18 11:57:00,892 [INFO] UtilMem:74 - After build in PCC Used Memory: 577728904 Bytes (796917760)
1213
+2020-11-18 11:57:00,925 [INFO] IPUIPlugin:64 - create IPUIPlugin
1214
+2020-11-18 11:57:00,926 [INFO] IPUIPlugin:64 - create IPUIPlugin
1215
+2020-11-18 11:57:00,926 [INFO] IPUIPlugin:64 - create IPUIPlugin
1216
+2020-11-18 11:57:00,926 [INFO] IPUIPlugin:64 - create IPUIPlugin
1217
+2020-11-18 11:57:00,926 [INFO] IPUIPlugin:64 - create IPUIPlugin
1218
+2020-11-18 11:57:00,927 [INFO] IPUIPlugin:64 - create IPUIPlugin
1219
+2020-11-18 11:57:00,927 [INFO] IPUIPlugin:64 - create IPUIPlugin
1220
+2020-11-18 11:57:00,927 [INFO] IPUIPlugin:64 - create IPUIPlugin
1221
+2020-11-18 11:57:00,927 [INFO] IPUIPlugin:64 - create IPUIPlugin
1222
+2020-11-18 11:57:00,927 [INFO] IPUIPlugin:64 - create IPUIPlugin
1223
+2020-11-18 11:57:00,928 [INFO] IPUIPlugin:64 - create IPUIPlugin
1224
+2020-11-18 11:57:00,928 [INFO] IPUIPlugin:64 - create IPUIPlugin
1225
+2020-11-18 11:57:00,928 [INFO] IPUIPlugin:64 - create IPUIPlugin
1226
+2020-11-18 11:57:00,928 [INFO] IPUIPlugin:64 - create IPUIPlugin
1227
+2020-11-18 11:57:00,929 [INFO] IPUIPlugin:64 - create IPUIPlugin
1228
+2020-11-18 11:57:00,929 [INFO] IPUIPlugin:64 - create IPUIPlugin
1229
+2020-11-18 11:57:00,929 [INFO] IPUIPlugin:64 - create IPUIPlugin
1230
+2020-11-18 11:57:00,930 [INFO] IPUIPlugin:64 - create IPUIPlugin
1231
+2020-11-18 11:57:00,930 [INFO] IPUIPlugin:64 - create IPUIPlugin
1232
+2020-11-18 11:57:00,930 [INFO] IPUIPlugin:64 - create IPUIPlugin
1233
+2020-11-18 11:57:00,931 [INFO] IPUIPlugin:64 - create IPUIPlugin
1234
+2020-11-18 11:57:00,931 [INFO] IPUIPlugin:64 - create IPUIPlugin
1235
+2020-11-18 11:57:00,931 [INFO] IPUIPlugin:64 - create IPUIPlugin
1236
+2020-11-18 11:57:00,932 [INFO] IPUIPlugin:64 - create IPUIPlugin
1237
+2020-11-18 11:57:00,932 [INFO] IPUIPlugin:64 - create IPUIPlugin
1238
+2020-11-18 11:57:00,932 [INFO] IPUIPlugin:64 - create IPUIPlugin
1239
+2020-11-18 11:57:00,933 [INFO] IPUIPlugin:64 - create IPUIPlugin
1240
+2020-11-18 11:57:00,933 [INFO] IPUIPlugin:64 - create IPUIPlugin
1241
+2020-11-18 11:57:00,933 [INFO] IPUIPlugin:64 - create IPUIPlugin
1242
+2020-11-18 11:57:00,934 [INFO] IPUIPlugin:64 - create IPUIPlugin
1243
+2020-11-18 11:57:00,934 [INFO] IPUIPlugin:64 - create IPUIPlugin
1244
+2020-11-18 11:57:00,934 [INFO] IPUIPlugin:64 - create IPUIPlugin
1245
+2020-11-18 11:57:00,934 [INFO] IPUIPlugin:64 - create IPUIPlugin
1246
+2020-11-18 11:57:00,935 [INFO] IPUIPlugin:64 - create IPUIPlugin
1247
+2020-11-18 11:57:00,935 [INFO] IPUIPlugin:64 - create IPUIPlugin
1248
+2020-11-18 11:57:00,935 [INFO] IPUIPlugin:64 - create IPUIPlugin
1249
+2020-11-18 11:57:00,935 [INFO] IPUIPlugin:64 - create IPUIPlugin
1250
+2020-11-18 11:57:00,935 [INFO] IPUIPlugin:64 - create IPUIPlugin
1251
+2020-11-18 11:57:00,936 [INFO] IPUIPlugin:64 - create IPUIPlugin
1252
+2020-11-18 11:57:00,936 [INFO] IPUIPlugin:64 - create IPUIPlugin
1253
+2020-11-18 11:57:00,936 [INFO] IPUIPlugin:64 - create IPUIPlugin
1254
+2020-11-18 11:57:00,936 [INFO] IPUIPlugin:64 - create IPUIPlugin
1255
+2020-11-18 11:57:00,936 [INFO] IPUIPlugin:64 - create IPUIPlugin
1256
+2020-11-18 11:57:00,936 [INFO] IPUIPlugin:64 - create IPUIPlugin
1257
+2020-11-18 11:57:00,937 [INFO] IPUIPlugin:64 - create IPUIPlugin
1258
+2020-11-18 11:57:00,937 [INFO] IPUIPlugin:64 - create IPUIPlugin
1259
+2020-11-18 11:57:00,937 [INFO] IPUIPlugin:64 - create IPUIPlugin
1260
+2020-11-18 11:57:00,937 [INFO] IPUIPlugin:64 - create IPUIPlugin
1261
+2020-11-18 11:57:00,937 [INFO] IPUIPlugin:64 - create IPUIPlugin
1262
+2020-11-18 11:57:00,938 [INFO] IPUIPlugin:64 - create IPUIPlugin
1263
+2020-11-18 11:57:00,938 [INFO] IPUIPlugin:64 - create IPUIPlugin
1264
+2020-11-18 11:57:00,938 [INFO] IPUIPlugin:64 - create IPUIPlugin
1265
+2020-11-18 11:57:00,938 [INFO] IPUIPlugin:64 - create IPUIPlugin
1266
+2020-11-18 11:57:00,938 [INFO] IPUIPlugin:64 - create IPUIPlugin
1267
+2020-11-18 11:57:00,938 [INFO] IPUIPlugin:64 - create IPUIPlugin
1268
+2020-11-18 11:57:00,939 [INFO] IPUIPlugin:64 - create IPUIPlugin
1269
+2020-11-18 11:57:00,939 [INFO] IPUIPlugin:64 - create IPUIPlugin
1270
+2020-11-18 11:57:00,940 [INFO] IPUIPlugin:64 - create IPUIPlugin
1271
+2020-11-18 11:57:00,940 [INFO] IPUIPlugin:64 - create IPUIPlugin
1272
+2020-11-18 11:57:00,992 [INFO] LogOutputStream:76 - [STDOUT_REDIRECT] toolchainItems.length=====1
1273
+2020-11-18 11:57:01,247 [INFO] OpenFileManager:294 - Restore cursor

+ 692
- 0
PlaygroundYoupi/.metadata/.log View File

@@ -643,3 +643,695 @@ Command-line arguments:  -os win32 -ws win32 -arch x86_64
643 643
 
644 644
 !ENTRY com.st.stm32cube.ide.mcu.ide 4 4 2020-11-18 09:40:35.090
645 645
 !MESSAGE com.st.stm32cube.ide.mcu.ide/META-INF/version/build_ref file not found, build reference will not be reported into properties
646
+!SESSION 2020-11-18 10:56:26.266 -----------------------------------------------
647
+eclipse.buildId=Version 1.4.0
648
+java.version=1.8.0_252
649
+java.vendor=AdoptOpenJDK
650
+BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_GB
651
+Command-line arguments:  -os win32 -ws win32 -arch x86_64
652
+
653
+!ENTRY org.eclipse.core.resources 2 10035 2020-11-18 10:56:28.092
654
+!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes.
655
+
656
+!ENTRY org.eclipse.core.resources 4 567 2020-11-18 10:56:28.203
657
+!MESSAGE Workspace restored, but some problems occurred.
658
+!SUBENTRY 1 org.eclipse.core.resources 4 567 2020-11-18 10:56:28.203
659
+!MESSAGE Could not read metadata for 'RealOne'.
660
+!STACK 1
661
+org.eclipse.core.internal.resources.ResourceException(/RealOne)[567]: java.lang.Exception: The project description file (.project) for 'RealOne' is missing.  This file contains important information about the project.  The project will not function properly until this file is restored.
662
+	at org.eclipse.core.internal.resources.ResourceException.provideStackTrace(ResourceException.java:42)
663
+	at org.eclipse.core.internal.resources.ResourceException.<init>(ResourceException.java:38)
664
+	at org.eclipse.core.internal.localstore.FileSystemResourceManager.read(FileSystemResourceManager.java:907)
665
+	at org.eclipse.core.internal.resources.SaveManager.restoreMetaInfo(SaveManager.java:888)
666
+	at org.eclipse.core.internal.resources.SaveManager.restoreMetaInfo(SaveManager.java:868)
667
+	at org.eclipse.core.internal.resources.SaveManager.restore(SaveManager.java:724)
668
+	at org.eclipse.core.internal.resources.SaveManager.startup(SaveManager.java:1557)
669
+	at org.eclipse.core.internal.resources.Workspace.startup(Workspace.java:2454)
670
+	at org.eclipse.core.internal.resources.Workspace.open(Workspace.java:2211)
671
+	at org.eclipse.core.resources.ResourcesPlugin.start(ResourcesPlugin.java:489)
672
+	at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:842)
673
+	at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1)
674
+	at java.security.AccessController.doPrivileged(Native Method)
675
+	at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:834)
676
+	at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:791)
677
+	at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:1015)
678
+	at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:365)
679
+	at org.eclipse.osgi.container.Module.doStart(Module.java:603)
680
+	at org.eclipse.osgi.container.Module.start(Module.java:467)
681
+	at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:493)
682
+	at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:117)
683
+	at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:571)
684
+	at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:330)
685
+	at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:398)
686
+	at org.eclipse.osgi.internal.loader.sources.SingleSourcePackage.loadClass(SingleSourcePackage.java:41)
687
+	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:472)
688
+	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:425)
689
+	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
690
+	at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:155)
691
+	at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
692
+	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151)
693
+	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
694
+	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
695
+	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
696
+	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
697
+	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
698
+	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
699
+	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
700
+	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
701
+	at java.lang.reflect.Method.invoke(Method.java:498)
702
+	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:660)
703
+	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:597)
704
+	at org.eclipse.equinox.launcher.Main.run(Main.java:1468)
705
+!SUBENTRY 2 org.eclipse.core.resources 4 567 2020-11-18 10:56:28.205
706
+!MESSAGE The project description file (.project) for 'RealOne' is missing.  This file contains important information about the project.  The project will not function properly until this file is restored.
707
+!STACK 0
708
+java.lang.Exception: The project description file (.project) for 'RealOne' is missing.  This file contains important information about the project.  The project will not function properly until this file is restored.
709
+	at org.eclipse.core.internal.resources.ResourceException.provideStackTrace(ResourceException.java:42)
710
+	at org.eclipse.core.internal.resources.ResourceException.<init>(ResourceException.java:38)
711
+	at org.eclipse.core.internal.localstore.FileSystemResourceManager.read(FileSystemResourceManager.java:907)
712
+	at org.eclipse.core.internal.resources.SaveManager.restoreMetaInfo(SaveManager.java:888)
713
+	at org.eclipse.core.internal.resources.SaveManager.restoreMetaInfo(SaveManager.java:868)
714
+	at org.eclipse.core.internal.resources.SaveManager.restore(SaveManager.java:724)
715
+	at org.eclipse.core.internal.resources.SaveManager.startup(SaveManager.java:1557)
716
+	at org.eclipse.core.internal.resources.Workspace.startup(Workspace.java:2454)
717
+	at org.eclipse.core.internal.resources.Workspace.open(Workspace.java:2211)
718
+	at org.eclipse.core.resources.ResourcesPlugin.start(ResourcesPlugin.java:489)
719
+	at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:842)
720
+	at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1)
721
+	at java.security.AccessController.doPrivileged(Native Method)
722
+	at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:834)
723
+	at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:791)
724
+	at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:1015)
725
+	at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:365)
726
+	at org.eclipse.osgi.container.Module.doStart(Module.java:603)
727
+	at org.eclipse.osgi.container.Module.start(Module.java:467)
728
+	at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:493)
729
+	at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:117)
730
+	at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:571)
731
+	at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:330)
732
+	at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:398)
733
+	at org.eclipse.osgi.internal.loader.sources.SingleSourcePackage.loadClass(SingleSourcePackage.java:41)
734
+	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:472)
735
+	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:425)
736
+	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
737
+	at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:155)
738
+	at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
739
+	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151)
740
+	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
741
+	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
742
+	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
743
+	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
744
+	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
745
+	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
746
+	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
747
+	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
748
+	at java.lang.reflect.Method.invoke(Method.java:498)
749
+	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:660)
750
+	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:597)
751
+	at org.eclipse.equinox.launcher.Main.run(Main.java:1468)
752
+!SUBENTRY 1 org.eclipse.core.resources 4 567 2020-11-18 10:56:28.206
753
+!MESSAGE Could not read metadata for 'RemoteSystemsTempFiles'.
754
+!STACK 1
755
+org.eclipse.core.internal.resources.ResourceException(/RemoteSystemsTempFiles)[567]: java.lang.Exception: The project description file (.project) for 'RemoteSystemsTempFiles' is missing.  This file contains important information about the project.  The project will not function properly until this file is restored.
756
+	at org.eclipse.core.internal.resources.ResourceException.provideStackTrace(ResourceException.java:42)
757
+	at org.eclipse.core.internal.resources.ResourceException.<init>(ResourceException.java:38)
758
+	at org.eclipse.core.internal.localstore.FileSystemResourceManager.read(FileSystemResourceManager.java:907)
759
+	at org.eclipse.core.internal.resources.SaveManager.restoreMetaInfo(SaveManager.java:888)
760
+	at org.eclipse.core.internal.resources.SaveManager.restoreMetaInfo(SaveManager.java:868)
761
+	at org.eclipse.core.internal.resources.SaveManager.restore(SaveManager.java:724)
762
+	at org.eclipse.core.internal.resources.SaveManager.startup(SaveManager.java:1557)
763
+	at org.eclipse.core.internal.resources.Workspace.startup(Workspace.java:2454)
764
+	at org.eclipse.core.internal.resources.Workspace.open(Workspace.java:2211)
765
+	at org.eclipse.core.resources.ResourcesPlugin.start(ResourcesPlugin.java:489)
766
+	at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:842)
767
+	at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1)
768
+	at java.security.AccessController.doPrivileged(Native Method)
769
+	at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:834)
770
+	at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:791)
771
+	at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:1015)
772
+	at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:365)
773
+	at org.eclipse.osgi.container.Module.doStart(Module.java:603)
774
+	at org.eclipse.osgi.container.Module.start(Module.java:467)
775
+	at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:493)
776
+	at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:117)
777
+	at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:571)
778
+	at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:330)
779
+	at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:398)
780
+	at org.eclipse.osgi.internal.loader.sources.SingleSourcePackage.loadClass(SingleSourcePackage.java:41)
781
+	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:472)
782
+	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:425)
783
+	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
784
+	at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:155)
785
+	at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
786
+	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151)
787
+	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
788
+	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
789
+	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
790
+	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
791
+	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
792
+	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
793
+	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
794
+	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
795
+	at java.lang.reflect.Method.invoke(Method.java:498)
796
+	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:660)
797
+	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:597)
798
+	at org.eclipse.equinox.launcher.Main.run(Main.java:1468)
799
+!SUBENTRY 2 org.eclipse.core.resources 4 567 2020-11-18 10:56:28.206
800
+!MESSAGE The project description file (.project) for 'RemoteSystemsTempFiles' is missing.  This file contains important information about the project.  The project will not function properly until this file is restored.
801
+!STACK 0
802
+java.lang.Exception: The project description file (.project) for 'RemoteSystemsTempFiles' is missing.  This file contains important information about the project.  The project will not function properly until this file is restored.
803
+	at org.eclipse.core.internal.resources.ResourceException.provideStackTrace(ResourceException.java:42)
804
+	at org.eclipse.core.internal.resources.ResourceException.<init>(ResourceException.java:38)
805
+	at org.eclipse.core.internal.localstore.FileSystemResourceManager.read(FileSystemResourceManager.java:907)
806
+	at org.eclipse.core.internal.resources.SaveManager.restoreMetaInfo(SaveManager.java:888)
807
+	at org.eclipse.core.internal.resources.SaveManager.restoreMetaInfo(SaveManager.java:868)
808
+	at org.eclipse.core.internal.resources.SaveManager.restore(SaveManager.java:724)
809
+	at org.eclipse.core.internal.resources.SaveManager.startup(SaveManager.java:1557)
810
+	at org.eclipse.core.internal.resources.Workspace.startup(Workspace.java:2454)
811
+	at org.eclipse.core.internal.resources.Workspace.open(Workspace.java:2211)
812
+	at org.eclipse.core.resources.ResourcesPlugin.start(ResourcesPlugin.java:489)
813
+	at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:842)
814
+	at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1)
815
+	at java.security.AccessController.doPrivileged(Native Method)
816
+	at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:834)
817
+	at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:791)
818
+	at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:1015)
819
+	at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:365)
820
+	at org.eclipse.osgi.container.Module.doStart(Module.java:603)
821
+	at org.eclipse.osgi.container.Module.start(Module.java:467)
822
+	at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:493)
823
+	at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:117)
824
+	at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:571)
825
+	at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:330)
826
+	at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:398)
827
+	at org.eclipse.osgi.internal.loader.sources.SingleSourcePackage.loadClass(SingleSourcePackage.java:41)
828
+	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:472)
829
+	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:425)
830
+	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
831
+	at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:155)
832
+	at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
833
+	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151)
834
+	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
835
+	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
836
+	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
837
+	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
838
+	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
839
+	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
840
+	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
841
+	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
842
+	at java.lang.reflect.Method.invoke(Method.java:498)
843
+	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:660)
844
+	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:597)
845
+	at org.eclipse.equinox.launcher.Main.run(Main.java:1468)
846
+
847
+!ENTRY com.st.stm32cube.ide.mcu.informationcenter 1 1 2020-11-18 10:56:32.911
848
+!MESSAGE Log4j initialized with config file C:\Users\camer\Desktop\LoPoSo\PlaygroundYoupi\.metadata\.log4j.xml
849
+
850
+!ENTRY com.st.stm32cube.ide.mcu.ide 1 1 2020-11-18 10:56:38.849
851
+!MESSAGE Started RMI Server, listening on port 41337
852
+
853
+!ENTRY com.st.stm32cube.ide.mcu.ide 4 4 2020-11-18 10:56:39.489
854
+!MESSAGE com.st.stm32cube.ide.mcu.ide/META-INF/version/build_ref file not found, build reference will not be reported into properties
855
+
856
+!ENTRY org.eclipse.core.resources 4 567 2020-11-18 10:57:22.236
857
+!MESSAGE The project description file (.project) for 'RealOne' is missing.  This file contains important information about the project.  The project will not function properly until this file is restored.
858
+!STACK 0
859
+java.lang.Exception: The project description file (.project) for 'RealOne' is missing.  This file contains important information about the project.  The project will not function properly until this file is restored.
860
+	at org.eclipse.core.internal.resources.ResourceException.provideStackTrace(ResourceException.java:42)
861
+	at org.eclipse.core.internal.resources.ResourceException.<init>(ResourceException.java:38)
862
+	at org.eclipse.core.internal.localstore.FileSystemResourceManager.read(FileSystemResourceManager.java:907)
863
+	at org.eclipse.core.internal.resources.SaveManager.restoreMetaInfo(SaveManager.java:888)
864
+	at org.eclipse.core.internal.resources.SaveManager.restore(SaveManager.java:763)
865
+	at org.eclipse.core.internal.resources.Project.open(Project.java:1056)
866
+	at org.eclipse.core.internal.resources.Project.open(Project.java:1102)
867
+	at org.eclipse.ui.actions.OpenResourceAction$1.doOpenWithReferences(OpenResourceAction.java:233)
868
+	at org.eclipse.ui.actions.OpenResourceAction$1.runInWorkspace(OpenResourceAction.java:279)
869
+	at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:42)
870
+	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
871
+
872
+!ENTRY org.eclipse.cdt.core 1 0 2020-11-18 10:57:58.147
873
+!MESSAGE Indexed 'RealOne' (29 sources, 119 headers) in 6.29 sec: 11,563 declarations; 57,597 references; 3 unresolved inclusions; 29 syntax errors; 172 unresolved names (0.25%)
874
+
875
+!ENTRY org.eclipse.jface 2 0 2020-11-18 10:58:26.316
876
+!MESSAGE Ignored reentrant call while viewer is busy. This is only logged once per viewer instance, but similar calls will still be ignored.
877
+!STACK 0
878
+java.lang.RuntimeException
879
+	at org.eclipse.jface.viewers.ColumnViewer.checkBusy(ColumnViewer.java:764)
880
+	at org.eclipse.jface.viewers.ColumnViewer.update(ColumnViewer.java:543)
881
+	at org.eclipse.ui.navigator.CommonViewer.update(CommonViewer.java:512)
882
+	at org.eclipse.jface.viewers.StructuredViewer.update(StructuredViewer.java:1965)
883
+	at org.eclipse.ui.internal.navigator.resources.nested.NestedProjectsLabelProvider.lambda$2(NestedProjectsLabelProvider.java:87)
884
+	at java.util.concurrent.CompletableFuture.uniAccept(CompletableFuture.java:670)
885
+	at java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:646)
886
+	at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:488)
887
+	at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1609)
888
+	at java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1596)
889
+	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
890
+	at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
891
+	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
892
+	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
893
+
894
+!ENTRY org.eclipse.ui.workbench.texteditor 4 0 2020-11-18 11:39:14.450
895
+!MESSAGE 
896
+!STACK 0
897
+java.lang.NullPointerException
898
+	at org.eclipse.ui.texteditor.AbstractTextEditor$TextEditorSavable.isDirty(AbstractTextEditor.java:7196)
899
+	at org.eclipse.ui.internal.Workbench.getFilteredSaveables(Workbench.java:3472)
900
+	at org.eclipse.ui.internal.Workbench.saveAll(Workbench.java:3445)
901
+	at org.eclipse.ui.ide.IDE$1.run(IDE.java:1495)
902
+	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
903
+	at org.eclipse.ui.ide.IDE.saveAllEditors(IDE.java:1483)
904
+	at org.eclipse.debug.internal.ui.launchConfigurations.SaveScopeResourcesHandler.doSave(SaveScopeResourcesHandler.java:228)
905
+	at org.eclipse.debug.internal.ui.launchConfigurations.SaveScopeResourcesHandler.handleStatus(SaveScopeResourcesHandler.java:182)
906
+	at org.eclipse.debug.internal.ui.sourcelookup.Prompter.lambda$0(Prompter.java:73)
907
+	at org.eclipse.ui.internal.PendingSyncExec.run(PendingSyncExec.java:68)
908
+	at org.eclipse.ui.internal.UILockListener.doPendingWork(UILockListener.java:171)
909
+	at org.eclipse.ui.internal.UISynchronizer.lambda$0(UISynchronizer.java:152)
910
+	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:40)
911
+	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:185)
912
+	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3961)
913
+	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3588)
914
+	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1160)
915
+	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
916
+	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1049)
917
+	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
918
+	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:633)
919
+	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
920
+	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:557)
921
+	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
922
+	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:150)
923
+	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
924
+	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
925
+	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
926
+	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
927
+	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
928
+	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
929
+	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
930
+	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
931
+	at java.lang.reflect.Method.invoke(Method.java:498)
932
+	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:660)
933
+	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:597)
934
+	at org.eclipse.equinox.launcher.Main.run(Main.java:1468)
935
+
936
+!ENTRY org.eclipse.ui 4 4 2020-11-18 11:48:39.089
937
+!MESSAGE Unable to create part
938
+!STACK 1
939
+org.eclipse.ui.PartInitException: Invalid Input: Must be project's active .ioc file.
940
+
941
+Project's 'RealOne' active one is 'RealOne.ioc' file
942
+	at com.st.stm32cube.common.mx.editor.CubeMxEditor.init(CubeMxEditor.java:795)
943
+	at org.eclipse.ui.internal.EditorReference.initialize(EditorReference.java:353)
944
+	at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(CompatibilityPart.java:340)
945
+	at sun.reflect.GeneratedMethodAccessor61.invoke(Unknown Source)
946
+	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
947
+	at java.lang.reflect.Method.invoke(Method.java:498)
948
+	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:58)
949
+	at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:998)
950
+	at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:963)
951
+	at org.eclipse.e4.core.internal.di.InjectorImpl.internalInject(InjectorImpl.java:139)
952
+	at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:408)
953
+	at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:331)
954
+	at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:202)
955
+	at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:91)
956
+	at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:60)
957
+	at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:42)
958
+	at org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer.createWidget(ContributedPartRenderer.java:132)
959
+	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(PartRenderingEngine.java:1002)
960
+	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:662)
961
+	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:768)
962
+	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$0(PartRenderingEngine.java:739)
963
+	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$2.run(PartRenderingEngine.java:733)
964
+	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
965
+	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:717)
966
+	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl$1.handleEvent(PartServiceImpl.java:107)
967
+	at org.eclipse.e4.ui.services.internal.events.UIEventHandler.lambda$0(UIEventHandler.java:38)
968
+	at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:236)
969
+	at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:146)
970
+	at org.eclipse.swt.widgets.Display.syncExec(Display.java:4622)
971
+	at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:219)
972
+	at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:38)
973
+	at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:205)
974
+	at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:203)
975
+	at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1)
976
+	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234)
977
+	at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:151)
978
+	at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:132)
979
+	at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:75)
980
+	at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:44)
981
+	at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:55)
982
+	at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:63)
983
+	at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:424)
984
+	at org.eclipse.e4.ui.model.application.ui.impl.ElementContainerImpl.setSelectedElementGen(ElementContainerImpl.java:170)
985
+	at org.eclipse.e4.ui.model.application.ui.impl.ElementContainerImpl.setSelectedElement(ElementContainerImpl.java:188)
986
+	at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.showElementInWindow(ModelServiceImpl.java:651)
987
+	at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.bringToTop(ModelServiceImpl.java:615)
988
+	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.delegateBringToTop(PartServiceImpl.java:790)
989
+	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.bringToTop(PartServiceImpl.java:404)
990
+	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.showPart(PartServiceImpl.java:1239)
991
+	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:3205)
992
+	at org.eclipse.ui.internal.WorkbenchPage.lambda$9(WorkbenchPage.java:3110)
993
+	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:72)
994
+	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3108)
995
+	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3078)
996
+	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3069)
997
+	at org.eclipse.ui.ide.IDE.openEditor(IDE.java:570)
998
+	at org.eclipse.ui.ide.IDE.openEditor(IDE.java:525)
999
+	at org.eclipse.ui.actions.OpenFileAction.openFile(OpenFileAction.java:103)
1000
+	at org.eclipse.ui.actions.OpenSystemEditorAction.run(OpenSystemEditorAction.java:96)
1001
+	at org.eclipse.ui.actions.RetargetAction.run(RetargetAction.java:215)
1002
+	at org.eclipse.ui.navigator.CommonNavigatorManager$1.open(CommonNavigatorManager.java:183)
1003
+	at org.eclipse.ui.OpenAndLinkWithEditorHelper$InternalListener.open(OpenAndLinkWithEditorHelper.java:48)
1004
+	at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:797)
1005
+	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
1006
+	at org.eclipse.ui.internal.JFaceUtil.lambda$0(JFaceUtil.java:47)
1007
+	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:174)
1008
+	at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:794)
1009
+	at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1110)
1010
+	at org.eclipse.ui.navigator.CommonViewer.handleOpen(CommonViewer.java:454)
1011
+	at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:275)
1012
+	at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:270)
1013
+	at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:310)
1014
+	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
1015
+	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4173)
1016
+	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057)
1017
+	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3986)
1018
+	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3585)
1019
+	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1160)
1020
+	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
1021
+	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1049)
1022
+	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
1023
+	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:633)
1024
+	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
1025
+	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:557)
1026
+	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
1027
+	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:150)
1028
+	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
1029
+	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
1030
+	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
1031
+	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
1032
+	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
1033
+	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
1034
+	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
1035
+	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
1036
+	at java.lang.reflect.Method.invoke(Method.java:498)
1037
+	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:660)
1038
+	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:597)
1039
+	at org.eclipse.equinox.launcher.Main.run(Main.java:1468)
1040
+!SUBENTRY 1 org.eclipse.ui 4 0 2020-11-18 11:48:39.090
1041
+!MESSAGE Invalid Input: Must be project's active .ioc file.
1042
+
1043
+Project's 'RealOne' active one is 'RealOne.ioc' file
1044
+
1045
+!ENTRY org.eclipse.ui.workbench.texteditor 4 0 2020-11-18 11:59:01.606
1046
+!MESSAGE 
1047
+!STACK 0
1048
+java.lang.NullPointerException
1049
+	at org.eclipse.ui.texteditor.AbstractTextEditor$TextEditorSavable.isDirty(AbstractTextEditor.java:7196)
1050
+	at org.eclipse.ui.internal.Workbench.getFilteredSaveables(Workbench.java:3472)
1051
+	at org.eclipse.ui.internal.Workbench.saveAll(Workbench.java:3445)
1052
+	at org.eclipse.ui.ide.IDE$1.run(IDE.java:1495)
1053
+	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
1054
+	at org.eclipse.ui.ide.IDE.saveAllEditors(IDE.java:1483)
1055
+	at org.eclipse.debug.internal.ui.launchConfigurations.SaveScopeResourcesHandler.doSave(SaveScopeResourcesHandler.java:228)
1056
+	at org.eclipse.debug.internal.ui.launchConfigurations.SaveScopeResourcesHandler.handleStatus(SaveScopeResourcesHandler.java:182)
1057
+	at org.eclipse.debug.internal.ui.sourcelookup.Prompter.lambda$0(Prompter.java:73)
1058
+	at org.eclipse.ui.internal.PendingSyncExec.run(PendingSyncExec.java:68)
1059
+	at org.eclipse.ui.internal.UILockListener.doPendingWork(UILockListener.java:171)
1060
+	at org.eclipse.ui.internal.UISynchronizer.lambda$0(UISynchronizer.java:152)
1061
+	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:40)
1062
+	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:185)
1063
+	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3961)
1064
+	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3588)
1065
+	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1160)
1066
+	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
1067
+	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1049)
1068
+	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
1069
+	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:633)
1070
+	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
1071
+	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:557)
1072
+	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
1073
+	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:150)
1074
+	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
1075
+	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
1076
+	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
1077
+	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
1078
+	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
1079
+	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
1080
+	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
1081
+	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
1082
+	at java.lang.reflect.Method.invoke(Method.java:498)
1083
+	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:660)
1084
+	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:597)
1085
+	at org.eclipse.equinox.launcher.Main.run(Main.java:1468)
1086
+
1087
+!ENTRY org.eclipse.ui.workbench.texteditor 4 0 2020-11-18 12:10:15.986
1088
+!MESSAGE 
1089
+!STACK 0
1090
+java.lang.NullPointerException
1091
+	at org.eclipse.ui.texteditor.AbstractTextEditor$TextEditorSavable.isDirty(AbstractTextEditor.java:7196)
1092
+	at org.eclipse.ui.internal.Workbench.getFilteredSaveables(Workbench.java:3472)
1093
+	at org.eclipse.ui.internal.Workbench.saveAll(Workbench.java:3445)
1094
+	at org.eclipse.ui.ide.IDE$1.run(IDE.java:1495)
1095
+	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
1096
+	at org.eclipse.ui.ide.IDE.saveAllEditors(IDE.java:1483)
1097
+	at org.eclipse.debug.internal.ui.launchConfigurations.SaveScopeResourcesHandler.doSave(SaveScopeResourcesHandler.java:228)
1098
+	at org.eclipse.debug.internal.ui.launchConfigurations.SaveScopeResourcesHandler.handleStatus(SaveScopeResourcesHandler.java:182)
1099
+	at org.eclipse.debug.internal.ui.sourcelookup.Prompter.lambda$0(Prompter.java:73)
1100
+	at org.eclipse.ui.internal.PendingSyncExec.run(PendingSyncExec.java:68)
1101
+	at org.eclipse.ui.internal.UILockListener.doPendingWork(UILockListener.java:171)
1102
+	at org.eclipse.ui.internal.UISynchronizer.lambda$0(UISynchronizer.java:152)
1103
+	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:40)
1104
+	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:185)
1105
+	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3961)
1106
+	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3588)
1107
+	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1160)
1108
+	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
1109
+	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1049)
1110
+	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
1111
+	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:633)
1112
+	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
1113
+	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:557)
1114
+	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
1115
+	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:150)
1116
+	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
1117
+	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
1118
+	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
1119
+	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
1120
+	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
1121
+	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
1122
+	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
1123
+	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
1124
+	at java.lang.reflect.Method.invoke(Method.java:498)
1125
+	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:660)
1126
+	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:597)
1127
+	at org.eclipse.equinox.launcher.Main.run(Main.java:1468)
1128
+
1129
+!ENTRY org.eclipse.ui.workbench.texteditor 4 0 2020-11-18 12:20:45.991
1130
+!MESSAGE 
1131
+!STACK 0
1132
+java.lang.NullPointerException
1133
+	at org.eclipse.ui.texteditor.AbstractTextEditor$TextEditorSavable.isDirty(AbstractTextEditor.java:7196)
1134
+	at org.eclipse.ui.internal.Workbench.getFilteredSaveables(Workbench.java:3472)
1135
+	at org.eclipse.ui.internal.Workbench.saveAll(Workbench.java:3445)
1136
+	at org.eclipse.ui.ide.IDE$1.run(IDE.java:1495)
1137
+	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
1138
+	at org.eclipse.ui.ide.IDE.saveAllEditors(IDE.java:1483)
1139
+	at org.eclipse.debug.internal.ui.launchConfigurations.SaveScopeResourcesHandler.doSave(SaveScopeResourcesHandler.java:228)
1140
+	at org.eclipse.debug.internal.ui.launchConfigurations.SaveScopeResourcesHandler.handleStatus(SaveScopeResourcesHandler.java:182)
1141
+	at org.eclipse.debug.internal.ui.sourcelookup.Prompter.lambda$0(Prompter.java:73)
1142
+	at org.eclipse.ui.internal.PendingSyncExec.run(PendingSyncExec.java:68)
1143
+	at org.eclipse.ui.internal.UILockListener.doPendingWork(UILockListener.java:171)
1144
+	at org.eclipse.ui.internal.UISynchronizer.lambda$0(UISynchronizer.java:152)
1145
+	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:40)
1146
+	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:185)
1147
+	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3961)
1148
+	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3588)
1149
+	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1160)
1150
+	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
1151
+	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1049)
1152
+	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
1153
+	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:633)
1154
+	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
1155
+	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:557)
1156
+	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
1157
+	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:150)
1158
+	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
1159
+	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
1160
+	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
1161
+	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
1162
+	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
1163
+	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
1164
+	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
1165
+	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
1166
+	at java.lang.reflect.Method.invoke(Method.java:498)
1167
+	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:660)
1168
+	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:597)
1169
+	at org.eclipse.equinox.launcher.Main.run(Main.java:1468)
1170
+
1171
+!ENTRY org.eclipse.ui.workbench.texteditor 4 0 2020-11-18 12:21:52.383
1172
+!MESSAGE 
1173
+!STACK 0
1174
+java.lang.NullPointerException
1175
+	at org.eclipse.ui.texteditor.AbstractTextEditor$TextEditorSavable.isDirty(AbstractTextEditor.java:7196)
1176
+	at org.eclipse.ui.internal.Workbench.getFilteredSaveables(Workbench.java:3472)
1177
+	at org.eclipse.ui.internal.Workbench.saveAll(Workbench.java:3445)
1178
+	at org.eclipse.ui.ide.IDE$1.run(IDE.java:1495)
1179
+	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
1180
+	at org.eclipse.ui.ide.IDE.saveAllEditors(IDE.java:1483)
1181
+	at org.eclipse.debug.internal.ui.launchConfigurations.SaveScopeResourcesHandler.doSave(SaveScopeResourcesHandler.java:228)
1182
+	at org.eclipse.debug.internal.ui.launchConfigurations.SaveScopeResourcesHandler.handleStatus(SaveScopeResourcesHandler.java:182)
1183
+	at org.eclipse.debug.internal.ui.sourcelookup.Prompter.lambda$0(Prompter.java:73)
1184
+	at org.eclipse.ui.internal.PendingSyncExec.run(PendingSyncExec.java:68)
1185
+	at org.eclipse.ui.internal.UILockListener.doPendingWork(UILockListener.java:171)
1186
+	at org.eclipse.ui.internal.UISynchronizer.lambda$0(UISynchronizer.java:152)
1187
+	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:40)
1188
+	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:185)
1189
+	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3961)
1190
+	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3588)
1191
+	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1160)
1192
+	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
1193
+	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1049)
1194
+	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
1195
+	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:633)
1196
+	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
1197
+	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:557)
1198
+	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
1199
+	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:150)
1200
+	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
1201
+	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
1202
+	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
1203
+	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
1204
+	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
1205
+	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
1206
+	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
1207
+	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
1208
+	at java.lang.reflect.Method.invoke(Method.java:498)
1209
+	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:660)
1210
+	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:597)
1211
+	at org.eclipse.equinox.launcher.Main.run(Main.java:1468)
1212
+
1213
+!ENTRY org.eclipse.ui.workbench.texteditor 4 0 2020-11-18 12:25:51.024
1214
+!MESSAGE 
1215
+!STACK 0
1216
+java.lang.NullPointerException
1217
+	at org.eclipse.ui.texteditor.AbstractTextEditor$TextEditorSavable.isDirty(AbstractTextEditor.java:7196)
1218
+	at org.eclipse.ui.internal.Workbench.getFilteredSaveables(Workbench.java:3472)
1219
+	at org.eclipse.ui.internal.Workbench.saveAll(Workbench.java:3445)
1220
+	at org.eclipse.ui.ide.IDE$1.run(IDE.java:1495)
1221
+	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
1222
+	at org.eclipse.ui.ide.IDE.saveAllEditors(IDE.java:1483)
1223
+	at org.eclipse.debug.internal.ui.launchConfigurations.SaveScopeResourcesHandler.doSave(SaveScopeResourcesHandler.java:228)
1224
+	at org.eclipse.debug.internal.ui.launchConfigurations.SaveScopeResourcesHandler.handleStatus(SaveScopeResourcesHandler.java:182)
1225
+	at org.eclipse.debug.internal.ui.sourcelookup.Prompter.lambda$0(Prompter.java:73)
1226
+	at org.eclipse.ui.internal.PendingSyncExec.run(PendingSyncExec.java:68)
1227
+	at org.eclipse.ui.internal.UILockListener.doPendingWork(UILockListener.java:171)
1228
+	at org.eclipse.ui.internal.UISynchronizer.lambda$0(UISynchronizer.java:152)
1229
+	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:40)
1230
+	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:185)
1231
+	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3961)
1232
+	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3588)
1233
+	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1160)
1234
+	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
1235
+	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1049)
1236
+	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
1237
+	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:633)
1238
+	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
1239
+	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:557)
1240
+	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
1241
+	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:150)
1242
+	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
1243
+	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
1244
+	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
1245
+	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
1246
+	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
1247
+	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
1248
+	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
1249
+	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
1250
+	at java.lang.reflect.Method.invoke(Method.java:498)
1251
+	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:660)
1252
+	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:597)
1253
+	at org.eclipse.equinox.launcher.Main.run(Main.java:1468)
1254
+
1255
+!ENTRY org.eclipse.ui.workbench.texteditor 4 0 2020-11-18 12:27:22.043
1256
+!MESSAGE 
1257
+!STACK 0
1258
+java.lang.NullPointerException
1259
+	at org.eclipse.ui.texteditor.AbstractTextEditor$TextEditorSavable.isDirty(AbstractTextEditor.java:7196)
1260
+	at org.eclipse.ui.internal.Workbench.getFilteredSaveables(Workbench.java:3472)
1261
+	at org.eclipse.ui.internal.Workbench.saveAll(Workbench.java:3445)
1262
+	at org.eclipse.ui.ide.IDE$1.run(IDE.java:1495)
1263
+	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
1264
+	at org.eclipse.ui.ide.IDE.saveAllEditors(IDE.java:1483)
1265
+	at org.eclipse.debug.internal.ui.launchConfigurations.SaveScopeResourcesHandler.doSave(SaveScopeResourcesHandler.java:228)
1266
+	at org.eclipse.debug.internal.ui.launchConfigurations.SaveScopeResourcesHandler.handleStatus(SaveScopeResourcesHandler.java:182)
1267
+	at org.eclipse.debug.internal.ui.sourcelookup.Prompter.lambda$0(Prompter.java:73)
1268
+	at org.eclipse.ui.internal.PendingSyncExec.run(PendingSyncExec.java:68)
1269
+	at org.eclipse.ui.internal.UILockListener.doPendingWork(UILockListener.java:171)
1270
+	at org.eclipse.ui.internal.UISynchronizer.lambda$0(UISynchronizer.java:152)
1271
+	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:40)
1272
+	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:185)
1273
+	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3961)
1274
+	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3588)
1275
+	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1160)
1276
+	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
1277
+	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1049)
1278
+	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
1279
+	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:633)
1280
+	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
1281
+	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:557)
1282
+	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
1283
+	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:150)
1284
+	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
1285
+	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
1286
+	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
1287
+	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
1288
+	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
1289
+	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
1290
+	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
1291
+	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
1292
+	at java.lang.reflect.Method.invoke(Method.java:498)
1293
+	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:660)
1294
+	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:597)
1295
+	at org.eclipse.equinox.launcher.Main.run(Main.java:1468)
1296
+
1297
+!ENTRY org.eclipse.ui.workbench.texteditor 4 0 2020-11-18 12:28:18.911
1298
+!MESSAGE 
1299
+!STACK 0
1300
+java.lang.NullPointerException
1301
+	at org.eclipse.ui.texteditor.AbstractTextEditor$TextEditorSavable.isDirty(AbstractTextEditor.java:7196)
1302
+	at org.eclipse.ui.internal.Workbench.getFilteredSaveables(Workbench.java:3472)
1303
+	at org.eclipse.ui.internal.Workbench.saveAll(Workbench.java:3445)
1304
+	at org.eclipse.ui.ide.IDE$1.run(IDE.java:1495)
1305
+	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
1306
+	at org.eclipse.ui.ide.IDE.saveAllEditors(IDE.java:1483)
1307
+	at org.eclipse.debug.internal.ui.launchConfigurations.SaveScopeResourcesHandler.doSave(SaveScopeResourcesHandler.java:228)
1308
+	at org.eclipse.debug.internal.ui.launchConfigurations.SaveScopeResourcesHandler.handleStatus(SaveScopeResourcesHandler.java:182)
1309
+	at org.eclipse.debug.internal.ui.sourcelookup.Prompter.lambda$0(Prompter.java:73)
1310
+	at org.eclipse.ui.internal.PendingSyncExec.run(PendingSyncExec.java:68)
1311
+	at org.eclipse.ui.internal.UILockListener.doPendingWork(UILockListener.java:171)
1312
+	at org.eclipse.ui.internal.UISynchronizer.lambda$0(UISynchronizer.java:152)
1313
+	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:40)
1314
+	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:185)
1315
+	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3961)
1316
+	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3588)
1317
+	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1160)
1318
+	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
1319
+	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1049)
1320
+	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
1321
+	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:633)
1322
+	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
1323
+	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:557)
1324
+	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
1325
+	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:150)
1326
+	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
1327
+	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
1328
+	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
1329
+	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
1330
+	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
1331
+	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
1332
+	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
1333
+	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
1334
+	at java.lang.reflect.Method.invoke(Method.java:498)
1335
+	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:660)
1336
+	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:597)
1337
+	at org.eclipse.equinox.launcher.Main.run(Main.java:1468)

+ 0
- 1
PlaygroundYoupi/.metadata/.plugins/com.st.stm32cube.ide.mcu.livewatch/params.dat View File

@@ -1 +0,0 @@
1
-NUMBER_FORMAT=0

+ 0
- 0
PlaygroundYoupi/.metadata/.plugins/com.st.stm32cube.ide.mcu.livewatch/saved_expr.dat View File


BIN
PlaygroundYoupi/.metadata/.plugins/org.eclipse.cdt.core/L476_ats_blink-master.1604569603602.pdom View File


BIN
PlaygroundYoupi/.metadata/.plugins/org.eclipse.cdt.core/L476_ats_blink-master.1605514236092.pdom View File


+ 0
- 5213
PlaygroundYoupi/.metadata/.plugins/org.eclipse.cdt.core/L476_ats_blink-master.language.settings.xml
File diff suppressed because it is too large
View File


BIN
PlaygroundYoupi/.metadata/.plugins/org.eclipse.cdt.core/RealOne.1605601070222.pdom → PlaygroundYoupi/.metadata/.plugins/org.eclipse.cdt.core/RealOne.1605693471723.pdom View File


+ 0
- 9
PlaygroundYoupi/.metadata/.plugins/org.eclipse.cdt.dsf.ui/dialog_settings.xml View File

@@ -1,9 +0,0 @@
1
-<?xml version="1.0" encoding="UTF-8"?>
2
-<section name="Workbench">
3
-	<section name="org.eclipse.cdt.dsf.debug.internal.ui.ExpressionInformationControlCreator$ExpressionInformationControl">
4
-		<item key="WIDTH" value="816"/>
5
-		<item key="HEIGHT" value="297"/>
6
-		<item key="SashWeightTree" value="200"/>
7
-		<item key="SashWeightDetails" value="200"/>
8
-	</section>
9
-</section>

+ 0
- 5
PlaygroundYoupi/.metadata/.plugins/org.eclipse.cdt.make.ui/dialog_settings.xml View File

@@ -1,5 +0,0 @@
1
-<?xml version="1.0" encoding="UTF-8"?>
2
-<section name="Workbench">
3
-	<section name="org.eclipse.cdt.internal.ui.MakeView">
4
-	</section>
5
-</section>

+ 0
- 10
PlaygroundYoupi/.metadata/.plugins/org.eclipse.cdt.ui/L476_ats_blink-master.build.log View File

@@ -1,10 +0,0 @@
1
-10:05:36 **** Incremental Build of configuration Debug for project L476_ats_blink-master ****
2
-make -j8 all 
3
-arm-none-eabi-size   L476_ats_blink-master.elf 
4
-   text	   data	    bss	    dec	    hex	filename
5
-   3648	     20	   1604	   5272	   1498	L476_ats_blink-master.elf
6
-Finished building: default.size.stdout
7
- 
8
-
9
-10:05:37 Build Finished. 0 errors, 0 warnings. (took 260ms)
10
-

+ 40
- 46
PlaygroundYoupi/.metadata/.plugins/org.eclipse.cdt.ui/RealOne.build.log View File

@@ -1,4 +1,4 @@
1
-10:00:06 **** Build of configuration Debug for project RealOne ****
1
+12:28:19 **** Incremental Build of configuration Debug for project RealOne ****
2 2
 make -j8 all 
3 3
 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"
4 4
 In file included from ../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.h:30:0,
@@ -29,50 +29,44 @@ In file included from ../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.h:30:0,
29 29
  #define  DATA_CACHE_ENABLE            1U
30 30
  
31 31
 <command-line>:0:0: note: this is the location of the previous definition
32
-../Core/Src/main.c: In function 'RTC_wakeup_init':
33
-../Core/Src/main.c:297:1: warning: implicit declaration of function 'LL_RTC_DisableWriteProtection'; did you mean 'LL_PWR_DisableSRAM2Retention'? [-Wimplicit-function-declaration]
34
- LL_RTC_DisableWriteProtection( RTC );
35
- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
36
- LL_PWR_DisableSRAM2Retention
37
-../Core/Src/main.c:298:1: warning: implicit declaration of function 'LL_RTC_WAKEUP_Disable'; did you mean 'LL_RCC_LSE_Disable'? [-Wimplicit-function-declaration]
38
- LL_RTC_WAKEUP_Disable( RTC );
39
- ^~~~~~~~~~~~~~~~~~~~~
40
- LL_RCC_LSE_Disable
41
-../Core/Src/main.c:299:10: warning: implicit declaration of function 'LL_RTC_IsActiveFlag_WUTW'; did you mean 'LL_PWR_IsActiveFlag_WU1'? [-Wimplicit-function-declaration]
42
- while ( !LL_RTC_IsActiveFlag_WUTW( RTC ) )
43
-          ^~~~~~~~~~~~~~~~~~~~~~~~
44
-          LL_PWR_IsActiveFlag_WU1
45
-../Core/Src/main.c:302:1: warning: implicit declaration of function 'LL_RTC_WAKEUP_SetClock'; did you mean 'IS_RTC_WAKEUP_CLOCK'? [-Wimplicit-function-declaration]
46
- LL_RTC_WAKEUP_SetClock( RTC, LL_RTC_WAKEUPCLOCK_CKSPRE );
47
- ^~~~~~~~~~~~~~~~~~~~~~
48
- IS_RTC_WAKEUP_CLOCK
49
-../Core/Src/main.c:302:30: error: 'LL_RTC_WAKEUPCLOCK_CKSPRE' undeclared (first use in this function); did you mean 'IS_RTC_WAKEUP_CLOCK'?
50
- LL_RTC_WAKEUP_SetClock( RTC, LL_RTC_WAKEUPCLOCK_CKSPRE );
51
-                              ^~~~~~~~~~~~~~~~~~~~~~~~~
52
-                              IS_RTC_WAKEUP_CLOCK
53
-../Core/Src/main.c:302:30: note: each undeclared identifier is reported only once for each function it appears in
54
-../Core/Src/main.c:304:1: warning: implicit declaration of function 'LL_RTC_WAKEUP_SetAutoReload'; did you mean '__HAL_TIM_SetAutoreload'? [-Wimplicit-function-declaration]
55
- LL_RTC_WAKEUP_SetAutoReload( RTC, delay ); // 16 bits
56
- ^~~~~~~~~~~~~~~~~~~~~~~~~~~
57
- __HAL_TIM_SetAutoreload
58
-../Core/Src/main.c:305:1: warning: implicit declaration of function 'LL_RTC_ClearFlag_WUT'; did you mean 'LL_PWR_ClearFlag_WU1'? [-Wimplicit-function-declaration]
59
- LL_RTC_ClearFlag_WUT(RTC);
60
- ^~~~~~~~~~~~~~~~~~~~
61
- LL_PWR_ClearFlag_WU1
62
-../Core/Src/main.c:306:1: warning: implicit declaration of function 'LL_RTC_EnableIT_WUT'; did you mean 'LL_DMA_EnableIT_HT'? [-Wimplicit-function-declaration]
63
- LL_RTC_EnableIT_WUT(RTC);
64
- ^~~~~~~~~~~~~~~~~~~
65
- LL_DMA_EnableIT_HT
66
-../Core/Src/main.c:307:1: warning: implicit declaration of function 'LL_RTC_WAKEUP_Enable'; did you mean 'LL_RCC_LSE_Enable'? [-Wimplicit-function-declaration]
67
- LL_RTC_WAKEUP_Enable(RTC);
68
- ^~~~~~~~~~~~~~~~~~~~
69
- LL_RCC_LSE_Enable
70
-../Core/Src/main.c:308:1: warning: implicit declaration of function 'LL_RTC_EnableWriteProtection'; did you mean 'LL_PWR_EnableSRAM2Retention'? [-Wimplicit-function-declaration]
71
- LL_RTC_EnableWriteProtection(RTC);
72
- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
73
- LL_PWR_EnableSRAM2Retention
74
-make: *** [Core/Src/subdir.mk:38: Core/Src/main.o] Error 1
75
-"make -j8 all" terminated with exit code 2. Build might be incomplete.
32
+In file included from ../Core/Inc/main.h:42:0,
33
+                 from ../Core/Src/main.c:8:
34
+../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_rtc.h:64:0: warning: "RTC_INIT_MASK" redefined
35
+  #define RTC_INIT_MASK                 0xFFFFFFFFU
36
+ 
37
+In file included from ../Core/Inc/stm32l4xx_hal_conf.h:409:0,
38
+                 from ../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.h:30,
39
+                 from ../Core/Inc/main.h:31,
40
+                 from ../Core/Src/main.c:8:
41
+../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_rtc.h:979:0: note: this is the location of the previous definition
42
+ #define RTC_INIT_MASK                       0xFFFFFFFFu
43
+ 
44
+In file included from ../Core/Inc/main.h:42:0,
45
+                 from ../Core/Src/main.c:8:
46
+../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_rtc.h:65:0: warning: "RTC_RSF_MASK" redefined
47
+  #define RTC_RSF_MASK                  0xFFFFFF5FU
48
+ 
49
+In file included from ../Core/Inc/stm32l4xx_hal_conf.h:409:0,
50
+                 from ../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.h:30,
51
+                 from ../Core/Inc/main.h:31,
52
+                 from ../Core/Src/main.c:8:
53
+../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_rtc.h:983:0: note: this is the location of the previous definition
54
+ #define RTC_RSF_MASK                        (~(RTC_ISR_INIT | RTC_ISR_RSF))
55
+ 
56
+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
57
+Finished building target: RealOne.elf
58
+ 
59
+arm-none-eabi-objdump -h -S  RealOne.elf  > "RealOne.list"
60
+arm-none-eabi-objcopy  -O binary  RealOne.elf  "RealOne.bin"
61
+arm-none-eabi-size   RealOne.elf 
62
+   text	   data	    bss	    dec	    hex	filename
63
+   5008	     20	   1572	   6600	   19c8	RealOne.elf
64
+Finished building: default.size.stdout
65
+ 
66
+Finished building: RealOne.bin
67
+Finished building: RealOne.list
68
+ 
69
+ 
76 70
 
77
-10:00:08 Build Failed. 2 errors, 13 warnings. (took 2s.138ms)
71
+12:28:20 Build Finished. 0 errors, 6 warnings. (took 1s.660ms)
78 72
 

+ 0
- 13
PlaygroundYoupi/.metadata/.plugins/org.eclipse.cdt.ui/dialog_settings.xml View File

@@ -1,13 +0,0 @@
1
-<?xml version="1.0" encoding="UTF-8"?>
2
-<section name="Workbench">
3
-	<section name="completion_proposal_size">
4
-	</section>
5
-	<section name="org.eclipse.cdt.ui.text.hover.CMacroExpansionExploration">
6
-	</section>
7
-	<section name="org.eclipse.cdt.ui.text.hover.CMacroExpansionExploration.internal">
8
-		<item key="size.width" value="586"/>
9
-		<item key="size.height" value="180"/>
10
-	</section>
11
-	<section name="PDOMSearchPage">
12
-	</section>
13
-</section>

+ 2293
- 0
PlaygroundYoupi/.metadata/.plugins/org.eclipse.cdt.ui/global-build.log
File diff suppressed because it is too large
View File


+ 372
- 0
PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/12/e05539d09029001b114bfff082d965b2 View File

@@ -0,0 +1,372 @@
1
+/* Project L476_ats_blink for STM32L476 mounted on Nucleo board:
2
+ * the user LED (mounted on pin PA-5) is flashed every second for 50 ms.
3
+ * The time base is provided by Systick (1000 ticks per second).
4
+ * The clock configuration is the default one (Sysclk = 80 MHz, derived from MSI and PLL).
5
+ */
6
+
7
+/* Includes ------------------------------------------------------------------*/
8
+#include "main.h"
9
+// #if defined(USE_FULL_ASSERT)
10
+// #include "stm32_assert.h"
11
+// #endif /* USE_FULL_ASSERT */
12
+
13
+#include "gpio.h"
14
+
15
+// systick interrupt handler
16
+volatile uint32_t msTicks = 0;
17
+volatile uint8_t expe = 0;
18
+volatile uint8_t blue_mode = 0;
19
+
20
+void SysTick_Handler()
21
+{
22
+	if	( BLUE_BUTTON() ){
23
+		blue_mode = 1 ;
24
+	}
25
+
26
+	msTicks++;                                                /* See startup file startup_LPC17xx.s for SysTick vector */
27
+	if (msTicks == 5 * expe){
28
+		LED_GREEN(0);
29
+	}else if(msTicks >= 200){
30
+		msTicks = 0;
31
+		LED_GREEN(1);
32
+	}
33
+	if(expe == 2 || expe == 4){
34
+		CLK_TOGGLE();
35
+	}
36
+}
37
+
38
+
39
+
40
+
41
+int main(void)
42
+{
43
+
44
+
45
+	// config GPIO
46
+	GPIO_init();
47
+
48
+//	if (RCC->BDCR & RCC_BDCR_LSEON) {
49
+		LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
50
+		LL_PWR_EnableBkUpAccess();
51
+
52
+		//expe = register RTC
53
+		expe = RTC->BKP0R;
54
+		if (expe == 0) {
55
+			SystemClock_Config_24M_LSE();
56
+			expe = 1;
57
+			LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
58
+			LL_PWR_EnableBkUpAccess();
59
+			RTC->BKP0R = expe;
60
+		}
61
+
62
+		if (BLUE_BUTTON()){
63
+
64
+			expe ++;
65
+			blue_mode = 0;
66
+			if (expe > 8) expe = 1;
67
+			RTC->BKP0R = expe;
68
+		}
69
+//	}else{
70
+
71
+//	}
72
+	LL_PWR_DisableBkUpAccess();
73
+	switch(expe){
74
+	case 1:
75
+
76
+		/* Configure the system clock */
77
+		SystemClock_Config_80M();
78
+		//Setup Sleep mode
79
+		LL_LPM_EnableSleep();
80
+		break;
81
+	case 2:
82
+		/* Configure the system clock */
83
+		SystemClock_Config_24M_LSE();
84
+		break;
85
+	case 3:
86
+		SystemClock_Config_24M_LSE_FL3_VS2();
87
+		LL_LPM_EnableSleep();
88
+		break;
89
+	case 4:
90
+		SystemClock_Config_24M_LSE_FL3_VS2();
91
+	case 5:
92
+		SystemClock_Config_24M_LSE_FL3_VS2();
93
+		LL_PWR_SetPowerMode(LL_PWR_MODE_STOP0);
94
+		break;
95
+	case 6:
96
+		SystemClock_Config_24M_LSE_FL3_VS2();
97
+		LL_PWR_SetPowerMode(LL_PWR_MODE_STOP1);
98
+		break;
99
+	case 7:
100
+		SystemClock_Config_24M_LSE_FL3_VS2();
101
+		LL_PWR_SetPowerMode(LL_PWR_MODE_STOP2);
102
+		break;
103
+	case 8:
104
+		SystemClock_Config_24M_LSE_FL3_VS2();
105
+		LL_PWR_SetPowerMode(LL_PWR_MODE_SHUTDOWN);
106
+		break;
107
+	}
108
+
109
+
110
+	// init systick timer (tick period at 1 ms)
111
+	LL_Init1msTick( SystemCoreClock );
112
+	LL_SYSTICK_EnableIT();
113
+
114
+
115
+	//LL_LPM_EnableSleepOnExit();
116
+
117
+	while (1)  {
118
+		if (blue_mode){
119
+			switch(expe){
120
+			case 5:
121
+			case 6:
122
+			case 7:
123
+				LL_LPM_EnableDeepSleep();
124
+				RTC_wakeup_init_from_stop(20);
125
+				__WFI();
126
+				blue_mode = 0;
127
+				break;
128
+			case 8:
129
+				LL_LPM_EnableDeepSleep();
130
+				RTC_wakeup_init_from_standby_or_shutdown(10);
131
+			case 1:
132
+			case 3:
133
+				__WFI();
134
+				break;
135
+			case 2:
136
+			case 4:
137
+				LL_RCC_MSI_EnablePLLMode();
138
+				break;
139
+			}
140
+		}else{
141
+				if (expe > 4) {
142
+					LL_LPM_EnableSleep();
143
+					__WFI();
144
+				}
145
+		}
146
+	}
147
+}
148
+
149
+void SystemClock_Config_24M_LSE_FL3_VS2(void){
150
+	LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
151
+	LL_FLASH_SetLatency(LL_FLASH_LATENCY_3);
152
+	while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_3)
153
+	{
154
+	}
155
+	LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE2);
156
+	LL_RCC_MSI_Enable();
157
+
158
+	/* Wait till MSI is ready */
159
+	while(LL_RCC_MSI_IsReady() != 1)
160
+	{
161
+
162
+	}
163
+
164
+	LL_PWR_EnableBkUpAccess();
165
+//	LL_RCC_ForceBackupDomainReset();
166
+	LL_RCC_ReleaseBackupDomainReset();
167
+	LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW);
168
+
169
+	LL_RCC_MSI_EnableRangeSelection();
170
+	LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6);
171
+	LL_RCC_MSI_SetCalibTrimming(0);
172
+	//  LL_RCC_MSI_EnablePLLMode();
173
+
174
+	LL_RCC_LSE_Enable();
175
+
176
+	/* Wait till LSE is ready */
177
+	while(LL_RCC_LSE_IsReady() != 1)
178
+	{
179
+
180
+	}
181
+	LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE);
182
+	LL_RCC_EnableRTC();
183
+
184
+	LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4);
185
+	LL_RCC_PLL_EnableDomain_SYS();
186
+	LL_RCC_PLL_Enable();
187
+
188
+	/* Wait till PLL is ready */
189
+	while(LL_RCC_PLL_IsReady() != 1)
190
+	{
191
+
192
+	}
193
+	LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL);
194
+
195
+	/* Wait till System clock is ready */
196
+	while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL)
197
+	{
198
+
199
+	}
200
+	LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1);
201
+	LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1);
202
+	LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1);
203
+	LL_SetSystemCoreClock(24000000);
204
+
205
+	/* Update the time base */
206
+	if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK)
207
+	{
208
+		//    Error_Handler();
209
+	}
210
+}
211
+
212
+/**
213
+ * @brief System Clock Configuration
214
+ * @retval None
215
+ * 24Mhz + RTC + LSE
216
+ */
217
+void SystemClock_Config_24M_LSE(void)
218
+{
219
+	LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
220
+	LL_FLASH_SetLatency(LL_FLASH_LATENCY_1);
221
+	while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_1)
222
+	{
223
+	}
224
+	LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1);
225
+	LL_RCC_MSI_Enable();
226
+
227
+	/* Wait till MSI is ready */
228
+	while(LL_RCC_MSI_IsReady() != 1)
229
+	{
230
+
231
+	}
232
+
233
+	LL_PWR_EnableBkUpAccess();
234
+//	LL_RCC_ForceBackupDomainReset();
235
+	LL_RCC_ReleaseBackupDomainReset();
236
+	LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW);
237
+
238
+	LL_RCC_MSI_EnableRangeSelection();
239
+	LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6);
240
+	LL_RCC_MSI_SetCalibTrimming(0);
241
+	//  LL_RCC_MSI_EnablePLLMode();
242
+
243
+	LL_RCC_LSE_Enable();
244
+
245
+	/* Wait till LSE is ready */
246
+	while(LL_RCC_LSE_IsReady() != 1)
247
+	{
248
+
249
+	}
250
+	LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE);
251
+	LL_RCC_EnableRTC();
252
+
253
+	LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4);
254
+	LL_RCC_PLL_EnableDomain_SYS();
255
+	LL_RCC_PLL_Enable();
256
+
257
+	/* Wait till PLL is ready */
258
+	while(LL_RCC_PLL_IsReady() != 1)
259
+	{
260
+
261
+	}
262
+	LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL);
263
+
264
+	/* Wait till System clock is ready */
265
+	while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL)
266
+	{
267
+
268
+	}
269
+	LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1);
270
+	LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1);
271
+	LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1);
272
+	LL_SetSystemCoreClock(24000000);
273
+
274
+	/* Update the time base */
275
+	if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK)
276
+	{
277
+		//    Error_Handler();
278
+	}
279
+}
280
+
281
+
282
+void SystemClock_Config_80M(void)
283
+{
284
+	LL_FLASH_SetLatency(LL_FLASH_LATENCY_4);
285
+	while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_4)
286
+	{
287
+	}
288
+	LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1);
289
+	LL_RCC_MSI_Enable();
290
+
291
+	/* Wait till MSI is ready */
292
+	while(LL_RCC_MSI_IsReady() != 1)
293
+	{
294
+
295
+	}
296
+	LL_RCC_MSI_EnableRangeSelection();
297
+	LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6);
298
+	LL_RCC_MSI_SetCalibTrimming(0);
299
+	LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 40, LL_RCC_PLLR_DIV_2);
300
+	LL_RCC_PLL_EnableDomain_SYS();
301
+	LL_RCC_PLL_Enable();
302
+
303
+	/* Wait till PLL is ready */
304
+	while(LL_RCC_PLL_IsReady() != 1)
305
+	{
306
+
307
+	}
308
+	LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL);
309
+
310
+	/* Wait till System clock is ready */
311
+	while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL)
312
+	{
313
+
314
+	}
315
+	LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1);
316
+	LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1);
317
+	LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1);
318
+	LL_SetSystemCoreClock(80000000);
319
+
320
+	/* Update the time base */
321
+	if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK)
322
+	{
323
+		//    Error_Handler();
324
+	}
325
+}
326
+
327
+// partie commune a toutes les utilisations du wakeup timer
328
+static void RTC_wakeup_init( int delay )
329
+{
330
+LL_RTC_DisableWriteProtection( RTC );
331
+LL_RTC_WAKEUP_Disable( RTC );
332
+while	( !LL_RTC_IsActiveFlag_WUTW( RTC ) )
333
+	{ }
334
+// connecter le timer a l'horloge 1Hz de la RTC
335
+LL_RTC_WAKEUP_SetClock( RTC, LL_RTC_WAKEUPCLOCK_CKSPRE );
336
+// fixer la duree de temporisation
337
+LL_RTC_WAKEUP_SetAutoReload( RTC, delay );	// 16 bits
338
+LL_RTC_ClearFlag_WUT(RTC);
339
+LL_RTC_EnableIT_WUT(RTC);
340
+LL_RTC_WAKEUP_Enable(RTC);
341
+LL_RTC_EnableWriteProtection(RTC);
342
+}
343
+
344
+// Dans le cas des modes STANDBY et SHUTDOWN, le MPU sera reveille par reset
345
+// causé par 1 wakeup line (interne ou externe) (le NVIC n'est plus alimenté)
346
+void RTC_wakeup_init_from_standby_or_shutdown( int delay )
347
+{
348
+RTC_wakeup_init( delay );
349
+// enable the Internal Wake-up line
350
+LL_PWR_EnableInternWU();	// ceci ne concerne que Standby et Shutdown, pas STOPx
351
+}
352
+
353
+// Dans le cas des modes STOPx, le MPU sera reveille par interruption
354
+// le module EXTI et une partie du NVIC sont encore alimentes
355
+// le contenu de la RAM et des registres étant préservé, le MPU
356
+// reprend l'execution après l'instruction WFI
357
+void RTC_wakeup_init_from_stop( int delay )
358
+{
359
+RTC_wakeup_init( delay );
360
+// valider l'interrupt par la ligne 20 du module EXTI, qui est réservée au wakeup timer
361
+LL_EXTI_EnableIT_0_31( LL_EXTI_LINE_20 );
362
+LL_EXTI_EnableRisingTrig_0_31( LL_EXTI_LINE_20 );
363
+// valider l'interrupt chez NVIC
364
+NVIC_SetPriority( RTC_WKUP_IRQn, 1 );
365
+NVIC_EnableIRQ( RTC_WKUP_IRQn );
366
+}
367
+
368
+// wakeup timer interrupt Handler (inutile mais doit etre defini)
369
+void RTC_WKUP_IRQHandler()
370
+{
371
+LL_EXTI_ClearFlag_0_31( LL_EXTI_LINE_20 );
372
+}

+ 0
- 217
PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/1a/d055de90af28001b1d0af99b6389052e View File

@@ -1,217 +0,0 @@
1
-/* Project L476_ats_blink for STM32L476 mounted on Nucleo board:
2
- * the user LED (mounted on pin PA-5) is flashed every second for 50 ms.
3
- * The time base is provided by Systick (1000 ticks per second).
4
- * The clock configuration is the default one (Sysclk = 80 MHz, derived from MSI and PLL).
5
- */
6
-
7
-/* Includes ------------------------------------------------------------------*/
8
-#include "main.h"
9
-// #if defined(USE_FULL_ASSERT)
10
-// #include "stm32_assert.h"
11
-// #endif /* USE_FULL_ASSERT */
12
-
13
-#include "gpio.h"
14
-
15
-// systick interrupt handler
16
-volatile uint32_t msTicks = 0;
17
-volatile uint8_t expe = 0;
18
-volatile uint8_t blue_mode = 0;
19
-
20
-void SysTick_Handler()
21
-{
22
-  if	( BLUE_BUTTON() ){
23
-			blue_mode = 1 ;
24
-  }
25
-
26
-  msTicks++;                                                /* See startup file startup_LPC17xx.s for SysTick vector */
27
-  if (msTicks == 5 * expe){
28
-	  LED_GREEN(0);
29
-  }else if(msTicks >= 200){
30
-	  msTicks = 0;
31
-	  LED_GREEN(1);
32
-  }
33
- if(expe == 2){
34
-	 CLK_TOGGLE();
35
- }
36
-}
37
-
38
-
39
-
40
-
41
-int main(void)
42
-{
43
-	if (RCC->BDCR & RCC_BDCR_LSEON) {
44
-			LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
45
-			LL_PWR_EnableBkUpAccess();
46
-
47
-			//expe = register RTC
48
-			expe = RTC->BKP0R;
49
-			if (expe == 0){
50
-				expe = 1;
51
-				RTC->BKP0R = expe;
52
-			}else if (expe != 0 && BLUE_BUTTON()){
53
-				expe ++;
54
-				RTC->BKP0R = expe;
55
-			}
56
-	}else{
57
-		SystemClock_Config_24M_LSE();
58
-		expe = 1;
59
-		LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
60
-		LL_PWR_EnableBkUpAccess();
61
-		RTC->BKP0R = expe;
62
-	}
63
-	LL_PWR_DisableBkUpAccess();
64
-	switch(expe){
65
-			case 1:
66
-				/* Configure the system clock */
67
-				SystemClock_Config_80M();
68
-				break;
69
-			case 2:
70
-				/* Configure the system clock */
71
-				SystemClock_Config_24M_LSE();
72
-				break;
73
-			}
74
-
75
-
76
-
77
-
78
-// config GPIO
79
-GPIO_init();
80
-
81
-// init systick timer (tick period at 1 ms)
82
-LL_Init1msTick( SystemCoreClock );
83
-LL_SYSTICK_EnableIT();
84
-
85
-//Setup Sleep mode
86
-LL_LPM_EnableSleep();
87
-//LL_LPM_EnableSleepOnExit();
88
-
89
-while (1)  {
90
-	if (blue_mode){
91
-		switch(expe){
92
-					case 1:
93
-						__WFI();
94
-						break;
95
-					case 2:
96
-						LL_RCC_MSI_EnablePLLMode();
97
-						break;
98
-					}
99
-
100
-		}
101
-	}
102
-}
103
-
104
-/**
105
-  * @brief System Clock Configuration
106
-  * @retval None
107
-  * 24Mhz + RTC + LSE
108
-  */
109
-void SystemClock_Config_24M_LSE(void)
110
-{
111
-  LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
112
-  LL_FLASH_SetLatency(LL_FLASH_LATENCY_1);
113
-  while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_1)
114
-  {
115
-  }
116
-  LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1);
117
-  LL_RCC_MSI_Enable();
118
-
119
-   /* Wait till MSI is ready */
120
-  while(LL_RCC_MSI_IsReady() != 1)
121
-  {
122
-
123
-  }
124
-
125
-  LL_PWR_EnableBkUpAccess();
126
-  LL_RCC_ForceBackupDomainReset();
127
-  LL_RCC_ReleaseBackupDomainReset();
128
-  LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW);
129
-
130
-  LL_RCC_MSI_EnableRangeSelection();
131
-  LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6);
132
-  LL_RCC_MSI_SetCalibTrimming(0);
133
-//  LL_RCC_MSI_EnablePLLMode();
134
-
135
-  LL_RCC_LSE_Enable();
136
-
137
-      /* Wait till LSE is ready */
138
-     while(LL_RCC_LSE_IsReady() != 1)
139
-     {
140
-
141
-     }
142
-    LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE);
143
-    LL_RCC_EnableRTC();
144
-
145
-  LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4);
146
-  LL_RCC_PLL_EnableDomain_SYS();
147
-  LL_RCC_PLL_Enable();
148
-
149
-   /* Wait till PLL is ready */
150
-  while(LL_RCC_PLL_IsReady() != 1)
151
-  {
152
-
153
-  }
154
-  LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL);
155
-
156
-   /* Wait till System clock is ready */
157
-  while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL)
158
-  {
159
-
160
-  }
161
-  LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1);
162
-  LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1);
163
-  LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1);
164
-  LL_SetSystemCoreClock(24000000);
165
-
166
-   /* Update the time base */
167
-  if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK)
168
-  {
169
-//    Error_Handler();
170
-  }
171
-}
172
-
173
-
174
-void SystemClock_Config_80M(void)
175
-{
176
-  LL_FLASH_SetLatency(LL_FLASH_LATENCY_4);
177
-  while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_4)
178
-  {
179
-  }
180
-  LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1);
181
-  LL_RCC_MSI_Enable();
182
-
183
-   /* Wait till MSI is ready */
184
-  while(LL_RCC_MSI_IsReady() != 1)
185
-  {
186
-
187
-  }
188
-  LL_RCC_MSI_EnableRangeSelection();
189
-  LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6);
190
-  LL_RCC_MSI_SetCalibTrimming(0);
191
-  LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 40, LL_RCC_PLLR_DIV_2);
192
-  LL_RCC_PLL_EnableDomain_SYS();
193
-  LL_RCC_PLL_Enable();
194
-
195
-   /* Wait till PLL is ready */
196
-  while(LL_RCC_PLL_IsReady() != 1)
197
-  {
198
-
199
-  }
200
-  LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL);
201
-
202
-   /* Wait till System clock is ready */
203
-  while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL)
204
-  {
205
-
206
-  }
207
-  LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1);
208
-  LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1);
209
-  LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1);
210
-  LL_SetSystemCoreClock(80000000);
211
-
212
-   /* Update the time base */
213
-  if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK)
214
-  {
215
-//    Error_Handler();
216
-  }
217
-}

+ 375
- 0
PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/26/a0b238b08f29001b114bfff082d965b2 View File

@@ -0,0 +1,375 @@
1
+/* Project L476_ats_blink for STM32L476 mounted on Nucleo board:
2
+ * the user LED (mounted on pin PA-5) is flashed every second for 50 ms.
3
+ * The time base is provided by Systick (1000 ticks per second).
4
+ * The clock configuration is the default one (Sysclk = 80 MHz, derived from MSI and PLL).
5
+ */
6
+
7
+/* Includes ------------------------------------------------------------------*/
8
+#include "main.h"
9
+// #if defined(USE_FULL_ASSERT)
10
+// #include "stm32_assert.h"
11
+// #endif /* USE_FULL_ASSERT */
12
+
13
+#include "gpio.h"
14
+
15
+// systick interrupt handler
16
+volatile uint32_t msTicks = 0;
17
+volatile uint8_t expe = 0;
18
+volatile uint8_t blue_mode = 0;
19
+
20
+void SysTick_Handler()
21
+{
22
+	if	( BLUE_BUTTON() ){
23
+		blue_mode = 1 ;
24
+	}
25
+
26
+	msTicks++;                                                /* See startup file startup_LPC17xx.s for SysTick vector */
27
+	if (msTicks == 5 * expe){
28
+		LED_GREEN(0);
29
+	}else if(msTicks >= 200){
30
+		msTicks = 0;
31
+		LED_GREEN(1);
32
+	}
33
+	if(expe == 2 || expe == 4){
34
+		CLK_TOGGLE();
35
+	}
36
+}
37
+
38
+
39
+
40
+
41
+int main(void)
42
+{
43
+
44
+
45
+	// config GPIO
46
+	GPIO_init();
47
+
48
+//	if (RCC->BDCR & RCC_BDCR_LSEON) {
49
+		LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
50
+		LL_PWR_EnableBkUpAccess();
51
+
52
+		//expe = register RTC
53
+		expe = RTC->BKP0R;
54
+		if (expe == 0) {
55
+			SystemClock_Config_24M_LSE();
56
+			expe = 1;
57
+			LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
58
+			LL_PWR_EnableBkUpAccess();
59
+			RTC->BKP0R = expe;
60
+		}
61
+
62
+		if (BLUE_BUTTON()){
63
+
64
+			expe ++;
65
+			blue_mode = 0;
66
+			if (expe > 8) expe = 1;
67
+			RTC->BKP0R = expe;
68
+		}
69
+//	}else{
70
+
71
+//	}
72
+	LL_PWR_DisableBkUpAccess();
73
+	switch(expe){
74
+	case 1:
75
+
76
+		/* Configure the system clock */
77
+		SystemClock_Config_80M();
78
+		//Setup Sleep mode
79
+		LL_LPM_EnableSleep();
80
+		break;
81
+	case 2:
82
+		/* Configure the system clock */
83
+		SystemClock_Config_24M_LSE();
84
+		break;
85
+	case 3:
86
+		SystemClock_Config_24M_LSE_FL3_VS2();
87
+		LL_LPM_EnableSleep();
88
+		break;
89
+	case 4:
90
+		SystemClock_Config_24M_LSE_FL3_VS2();
91
+	case 5:
92
+		SystemClock_Config_24M_LSE_FL3_VS2();
93
+		LL_PWR_SetPowerMode(LL_PWR_MODE_STOP0);
94
+		LL_LPM_EnableDeepSleep();
95
+		break;
96
+	case 6:
97
+		SystemClock_Config_24M_LSE_FL3_VS2();
98
+		LL_PWR_SetPowerMode(LL_PWR_MODE_STOP1);
99
+		LL_LPM_EnableDeepSleep();
100
+		break;
101
+	case 7:
102
+		SystemClock_Config_24M_LSE_FL3_VS2();
103
+		LL_PWR_SetPowerMode(LL_PWR_MODE_STOP2);
104
+		LL_LPM_EnableDeepSleep();
105
+		break;
106
+	case 8:
107
+		SystemClock_Config_24M_LSE_FL3_VS2();
108
+		LL_PWR_SetPowerMode(LL_PWR_MODE_SHUTDOWN);
109
+		LL_LPM_EnableDeepSleep();
110
+		break;
111
+	}
112
+
113
+
114
+	// init systick timer (tick period at 1 ms)
115
+	LL_Init1msTick( SystemCoreClock );
116
+	LL_SYSTICK_EnableIT();
117
+
118
+
119
+	//LL_LPM_EnableSleepOnExit();
120
+
121
+	while (1)  {
122
+		if (blue_mode){
123
+			switch(expe){
124
+			case 5:
125
+			case 6:
126
+			case 7:
127
+				RTC_wakeup_init_from_stop(20);
128
+				__WFI();
129
+				blue_mode = 0;
130
+				break;
131
+			case 8:
132
+				RTC_wakeup_init_from_standby_or_shutdown(10);
133
+			case 1:
134
+			case 3:
135
+				__WFI();
136
+				break;
137
+			case 2:
138
+			case 4:
139
+				LL_RCC_MSI_EnablePLLMode();
140
+				break;
141
+			}else{
142
+				if (expe > 4) {
143
+					LL_LPM_EnableSleep();
144
+					__WFI()
145
+				}
146
+			}
147
+
148
+		}
149
+	}
150
+}
151
+
152
+void SystemClock_Config_24M_LSE_FL3_VS2(void){
153
+	LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
154
+	LL_FLASH_SetLatency(LL_FLASH_LATENCY_3);
155
+	while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_3)
156
+	{
157
+	}
158
+	LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE2);
159
+	LL_RCC_MSI_Enable();
160
+
161
+	/* Wait till MSI is ready */
162
+	while(LL_RCC_MSI_IsReady() != 1)
163
+	{
164
+
165
+	}
166
+
167
+	LL_PWR_EnableBkUpAccess();
168
+//	LL_RCC_ForceBackupDomainReset();
169
+	LL_RCC_ReleaseBackupDomainReset();
170
+	LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW);
171
+
172
+	LL_RCC_MSI_EnableRangeSelection();
173
+	LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6);
174
+	LL_RCC_MSI_SetCalibTrimming(0);
175
+	//  LL_RCC_MSI_EnablePLLMode();
176
+
177
+	LL_RCC_LSE_Enable();
178
+
179
+	/* Wait till LSE is ready */
180
+	while(LL_RCC_LSE_IsReady() != 1)
181
+	{
182
+
183
+	}
184
+	LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE);
185
+	LL_RCC_EnableRTC();
186
+
187
+	LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4);
188
+	LL_RCC_PLL_EnableDomain_SYS();
189
+	LL_RCC_PLL_Enable();
190
+
191
+	/* Wait till PLL is ready */
192
+	while(LL_RCC_PLL_IsReady() != 1)
193
+	{
194
+
195
+	}
196
+	LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL);
197
+
198
+	/* Wait till System clock is ready */
199
+	while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL)
200
+	{
201
+
202
+	}
203
+	LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1);
204
+	LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1);
205
+	LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1);
206
+	LL_SetSystemCoreClock(24000000);
207
+
208
+	/* Update the time base */
209
+	if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK)
210
+	{
211
+		//    Error_Handler();
212
+	}
213
+}
214
+
215
+/**
216
+ * @brief System Clock Configuration
217
+ * @retval None
218
+ * 24Mhz + RTC + LSE
219
+ */
220
+void SystemClock_Config_24M_LSE(void)
221
+{
222
+	LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
223
+	LL_FLASH_SetLatency(LL_FLASH_LATENCY_1);
224
+	while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_1)
225
+	{
226
+	}
227
+	LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1);
228
+	LL_RCC_MSI_Enable();
229
+
230
+	/* Wait till MSI is ready */
231
+	while(LL_RCC_MSI_IsReady() != 1)
232
+	{
233
+
234
+	}
235
+
236
+	LL_PWR_EnableBkUpAccess();
237
+//	LL_RCC_ForceBackupDomainReset();
238
+	LL_RCC_ReleaseBackupDomainReset();
239
+	LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW);
240
+
241
+	LL_RCC_MSI_EnableRangeSelection();
242
+	LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6);
243
+	LL_RCC_MSI_SetCalibTrimming(0);
244
+	//  LL_RCC_MSI_EnablePLLMode();
245
+
246
+	LL_RCC_LSE_Enable();
247
+
248
+	/* Wait till LSE is ready */
249
+	while(LL_RCC_LSE_IsReady() != 1)
250
+	{
251
+
252
+	}
253
+	LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE);
254
+	LL_RCC_EnableRTC();
255
+
256
+	LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4);
257
+	LL_RCC_PLL_EnableDomain_SYS();
258
+	LL_RCC_PLL_Enable();
259
+
260
+	/* Wait till PLL is ready */
261
+	while(LL_RCC_PLL_IsReady() != 1)
262
+	{
263
+
264
+	}
265
+	LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL);
266
+
267
+	/* Wait till System clock is ready */
268
+	while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL)
269
+	{
270
+
271
+	}
272
+	LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1);
273
+	LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1);
274
+	LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1);
275
+	LL_SetSystemCoreClock(24000000);
276
+
277
+	/* Update the time base */
278
+	if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK)
279
+	{
280
+		//    Error_Handler();
281
+	}
282
+}
283
+
284
+
285
+void SystemClock_Config_80M(void)
286
+{
287
+	LL_FLASH_SetLatency(LL_FLASH_LATENCY_4);
288
+	while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_4)
289
+	{
290
+	}
291
+	LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1);
292
+	LL_RCC_MSI_Enable();
293
+
294
+	/* Wait till MSI is ready */
295
+	while(LL_RCC_MSI_IsReady() != 1)
296
+	{
297
+
298
+	}
299
+	LL_RCC_MSI_EnableRangeSelection();
300
+	LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6);
301
+	LL_RCC_MSI_SetCalibTrimming(0);
302
+	LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 40, LL_RCC_PLLR_DIV_2);
303
+	LL_RCC_PLL_EnableDomain_SYS();
304
+	LL_RCC_PLL_Enable();
305
+
306
+	/* Wait till PLL is ready */
307
+	while(LL_RCC_PLL_IsReady() != 1)
308
+	{
309
+
310
+	}
311
+	LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL);
312
+
313
+	/* Wait till System clock is ready */
314
+	while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL)
315
+	{
316
+
317
+	}
318
+	LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1);
319
+	LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1);
320
+	LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1);
321
+	LL_SetSystemCoreClock(80000000);
322
+
323
+	/* Update the time base */
324
+	if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK)
325
+	{
326
+		//    Error_Handler();
327
+	}
328
+}
329
+
330
+// partie commune a toutes les utilisations du wakeup timer
331
+static void RTC_wakeup_init( int delay )
332
+{
333
+LL_RTC_DisableWriteProtection( RTC );
334
+LL_RTC_WAKEUP_Disable( RTC );
335
+while	( !LL_RTC_IsActiveFlag_WUTW( RTC ) )
336
+	{ }
337
+// connecter le timer a l'horloge 1Hz de la RTC
338
+LL_RTC_WAKEUP_SetClock( RTC, LL_RTC_WAKEUPCLOCK_CKSPRE );
339
+// fixer la duree de temporisation
340
+LL_RTC_WAKEUP_SetAutoReload( RTC, delay );	// 16 bits
341
+LL_RTC_ClearFlag_WUT(RTC);
342
+LL_RTC_EnableIT_WUT(RTC);
343
+LL_RTC_WAKEUP_Enable(RTC);
344
+LL_RTC_EnableWriteProtection(RTC);
345
+}
346
+
347
+// Dans le cas des modes STANDBY et SHUTDOWN, le MPU sera reveille par reset
348
+// causé par 1 wakeup line (interne ou externe) (le NVIC n'est plus alimenté)
349
+void RTC_wakeup_init_from_standby_or_shutdown( int delay )
350
+{
351
+RTC_wakeup_init( delay );
352
+// enable the Internal Wake-up line
353
+LL_PWR_EnableInternWU();	// ceci ne concerne que Standby et Shutdown, pas STOPx
354
+}
355
+
356
+// Dans le cas des modes STOPx, le MPU sera reveille par interruption
357
+// le module EXTI et une partie du NVIC sont encore alimentes
358
+// le contenu de la RAM et des registres étant préservé, le MPU
359
+// reprend l'execution après l'instruction WFI
360
+void RTC_wakeup_init_from_stop( int delay )
361
+{
362
+RTC_wakeup_init( delay );
363
+// valider l'interrupt par la ligne 20 du module EXTI, qui est réservée au wakeup timer
364
+LL_EXTI_EnableIT_0_31( LL_EXTI_LINE_20 );
365
+LL_EXTI_EnableRisingTrig_0_31( LL_EXTI_LINE_20 );
366
+// valider l'interrupt chez NVIC
367
+NVIC_SetPriority( RTC_WKUP_IRQn, 1 );
368
+NVIC_EnableIRQ( RTC_WKUP_IRQn );
369
+}
370
+
371
+// wakeup timer interrupt Handler (inutile mais doit etre defini)
372
+void RTC_WKUP_IRQHandler()
373
+{
374
+LL_EXTI_ClearFlag_0_31( LL_EXTI_LINE_20 );
375
+}

+ 374
- 0
PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/2b/0002564d8a29001b114bfff082d965b2 View File

@@ -0,0 +1,374 @@
1
+/* Project L476_ats_blink for STM32L476 mounted on Nucleo board:
2
+ * the user LED (mounted on pin PA-5) is flashed every second for 50 ms.
3
+ * The time base is provided by Systick (1000 ticks per second).
4
+ * The clock configuration is the default one (Sysclk = 80 MHz, derived from MSI and PLL).
5
+ */
6
+
7
+/* Includes ------------------------------------------------------------------*/
8
+#include "main.h"
9
+// #if defined(USE_FULL_ASSERT)
10
+// #include "stm32_assert.h"
11
+// #endif /* USE_FULL_ASSERT */
12
+
13
+#include "gpio.h"
14
+
15
+// systick interrupt handler
16
+volatile uint32_t msTicks = 0;
17
+volatile uint8_t expe = 0;
18
+volatile uint8_t blue_mode = 0;
19
+
20
+void SysTick_Handler()
21
+{
22
+	if	( BLUE_BUTTON() ){
23
+		blue_mode = 1 ;
24
+	}
25
+
26
+	msTicks++;                                                /* See startup file startup_LPC17xx.s for SysTick vector */
27
+	if (msTicks == 5 * expe){
28
+		LED_GREEN(0);
29
+	}else if(msTicks >= 200){
30
+		msTicks = 0;
31
+		LED_GREEN(1);
32
+	}
33
+	if(expe == 2 || expe == 4){
34
+		CLK_TOGGLE();
35
+	}
36
+}
37
+
38
+
39
+
40
+
41
+int main(void)
42
+{
43
+
44
+
45
+	// config GPIO
46
+	GPIO_init();
47
+
48
+//	if (RCC->BDCR & RCC_BDCR_LSEON) {
49
+		LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
50
+		LL_PWR_EnableBkUpAccess();
51
+
52
+		//expe = register RTC
53
+		expe = RTC->BKP0R;
54
+		if (expe == 0) {
55
+			SystemClock_Config_24M_LSE();
56
+			expe = 1;
57
+			LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
58
+			LL_PWR_EnableBkUpAccess();
59
+			RTC->BKP0R = expe;
60
+		}
61
+
62
+		if (BLUE_BUTTON()){
63
+
64
+			expe ++;
65
+
66
+			if (expe > 7) expe = 1;
67
+			RTC->BKP0R = expe;
68
+		}
69
+//	}else{
70
+
71
+//	}
72
+	LL_PWR_DisableBkUpAccess();
73
+	switch(expe){
74
+	case 1:
75
+
76
+		/* Configure the system clock */
77
+		SystemClock_Config_80M();
78
+		//Setup Sleep mode
79
+		LL_LPM_EnableSleep();
80
+		break;
81
+	case 2:
82
+		/* Configure the system clock */
83
+		SystemClock_Config_24M_LSE();
84
+		break;
85
+	case 3:
86
+		SystemClock_Config_24M_LSE_FL3_VS2();
87
+		LL_LPM_EnableSleep();
88
+		break;
89
+	case 4:
90
+		SystemClock_Config_24M_LSE_FL3_VS2();
91
+	case 5:
92
+		SystemClock_Config_24M_LSE_FL3_VS2();
93
+		RTC_wakeup_init_from_stop(20);
94
+		LL_PWR_SetPowerMode(LL_PWR_MODE_STOP0);
95
+		LL_LPM_EnableDeepSleep();
96
+		break;
97
+	case 6:
98
+		SystemClock_Config_24M_LSE_FL3_VS2();
99
+		RTC_wakeup_init_from_stop(20);
100
+		LL_PWR_SetPowerMode(LL_PWR_MODE_STOP1);
101
+		LL_LPM_EnableDeepSleep();
102
+		break;
103
+	case 7:
104
+		SystemClock_Config_24M_LSE_FL3_VS2();
105
+		RTC_wakeup_init_from_stop(20);
106
+		LL_PWR_SetPowerMode(LL_PWR_MODE_STOP2);
107
+		LL_LPM_EnableDeepSleep();
108
+		break;
109
+	case 8:
110
+		SystemClock_Config_24M_LSE_FL3_VS2();
111
+		RTC_wakeup_init_from_standby_or_shutdown(20);
112
+		LL_PWR_SetPowerMode(LL_PWR_MODE_SHUTDOWN);
113
+		LL_LPM_EnableDeepSleep();
114
+		break;
115
+	}
116
+
117
+
118
+	// init systick timer (tick period at 1 ms)
119
+	LL_Init1msTick( SystemCoreClock );
120
+	LL_SYSTICK_EnableIT();
121
+
122
+
123
+	//LL_LPM_EnableSleepOnExit();
124
+
125
+	while (1)  {
126
+		if (blue_mode){
127
+			switch(expe){
128
+			case 5:
129
+			case 6:
130
+			case 7:
131
+				__WFI();
132
+				blue_mode = 0;
133
+				break;
134
+			case 1:
135
+			case 3:
136
+			case 8:
137
+				__WFI();
138
+				break;
139
+			case 2:
140
+			case 4:
141
+				LL_RCC_MSI_EnablePLLMode();
142
+				break;
143
+
144
+
145
+			}
146
+
147
+		}
148
+	}
149
+}
150
+
151
+void SystemClock_Config_24M_LSE_FL3_VS2(void){
152
+	LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
153
+	LL_FLASH_SetLatency(LL_FLASH_LATENCY_3);
154
+	while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_3)
155
+	{
156
+	}
157
+	LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE2);
158
+	LL_RCC_MSI_Enable();
159
+
160
+	/* Wait till MSI is ready */
161
+	while(LL_RCC_MSI_IsReady() != 1)
162
+	{
163
+
164
+	}
165
+
166
+	LL_PWR_EnableBkUpAccess();
167
+//	LL_RCC_ForceBackupDomainReset();
168
+	LL_RCC_ReleaseBackupDomainReset();
169
+	LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW);
170
+
171
+	LL_RCC_MSI_EnableRangeSelection();
172
+	LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6);
173
+	LL_RCC_MSI_SetCalibTrimming(0);
174
+	//  LL_RCC_MSI_EnablePLLMode();
175
+
176
+	LL_RCC_LSE_Enable();
177
+
178
+	/* Wait till LSE is ready */
179
+	while(LL_RCC_LSE_IsReady() != 1)
180
+	{
181
+
182
+	}
183
+	LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE);
184
+	LL_RCC_EnableRTC();
185
+
186
+	LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4);
187
+	LL_RCC_PLL_EnableDomain_SYS();
188
+	LL_RCC_PLL_Enable();
189
+
190
+	/* Wait till PLL is ready */
191
+	while(LL_RCC_PLL_IsReady() != 1)
192
+	{
193
+
194
+	}
195
+	LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL);
196
+
197
+	/* Wait till System clock is ready */
198
+	while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL)
199
+	{
200
+
201
+	}
202
+	LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1);
203
+	LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1);
204
+	LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1);
205
+	LL_SetSystemCoreClock(24000000);
206
+
207
+	/* Update the time base */
208
+	if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK)
209
+	{
210
+		//    Error_Handler();
211
+	}
212
+}
213
+
214
+/**
215
+ * @brief System Clock Configuration
216
+ * @retval None
217
+ * 24Mhz + RTC + LSE
218
+ */
219
+void SystemClock_Config_24M_LSE(void)
220
+{
221
+	LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
222
+	LL_FLASH_SetLatency(LL_FLASH_LATENCY_1);
223
+	while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_1)
224
+	{
225
+	}
226
+	LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1);
227
+	LL_RCC_MSI_Enable();
228
+
229
+	/* Wait till MSI is ready */
230
+	while(LL_RCC_MSI_IsReady() != 1)
231
+	{
232
+
233
+	}
234
+
235
+	LL_PWR_EnableBkUpAccess();
236
+//	LL_RCC_ForceBackupDomainReset();
237
+	LL_RCC_ReleaseBackupDomainReset();
238
+	LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW);
239
+
240
+	LL_RCC_MSI_EnableRangeSelection();
241
+	LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6);
242
+	LL_RCC_MSI_SetCalibTrimming(0);
243
+	//  LL_RCC_MSI_EnablePLLMode();
244
+
245
+	LL_RCC_LSE_Enable();
246
+
247
+	/* Wait till LSE is ready */
248
+	while(LL_RCC_LSE_IsReady() != 1)
249
+	{
250
+
251
+	}
252
+	LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE);
253
+	LL_RCC_EnableRTC();
254
+
255
+	LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4);
256
+	LL_RCC_PLL_EnableDomain_SYS();
257
+	LL_RCC_PLL_Enable();
258
+
259
+	/* Wait till PLL is ready */
260
+	while(LL_RCC_PLL_IsReady() != 1)
261
+	{
262
+
263
+	}
264
+	LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL);
265
+
266
+	/* Wait till System clock is ready */
267
+	while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL)
268
+	{
269
+
270
+	}
271
+	LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1);
272
+	LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1);
273
+	LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1);
274
+	LL_SetSystemCoreClock(24000000);
275
+
276
+	/* Update the time base */
277
+	if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK)
278
+	{
279
+		//    Error_Handler();
280
+	}
281
+}
282
+
283
+
284
+void SystemClock_Config_80M(void)
285
+{
286
+	LL_FLASH_SetLatency(LL_FLASH_LATENCY_4);
287
+	while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_4)
288
+	{
289
+	}
290
+	LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1);
291
+	LL_RCC_MSI_Enable();
292
+
293
+	/* Wait till MSI is ready */
294
+	while(LL_RCC_MSI_IsReady() != 1)
295
+	{
296
+
297
+	}
298
+	LL_RCC_MSI_EnableRangeSelection();
299
+	LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6);
300
+	LL_RCC_MSI_SetCalibTrimming(0);
301
+	LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 40, LL_RCC_PLLR_DIV_2);
302
+	LL_RCC_PLL_EnableDomain_SYS();
303
+	LL_RCC_PLL_Enable();
304
+
305
+	/* Wait till PLL is ready */
306
+	while(LL_RCC_PLL_IsReady() != 1)
307
+	{
308
+
309
+	}
310
+	LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL);
311
+
312
+	/* Wait till System clock is ready */
313
+	while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL)
314
+	{
315
+
316
+	}
317
+	LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1);
318
+	LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1);
319
+	LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1);
320
+	LL_SetSystemCoreClock(80000000);
321
+
322
+	/* Update the time base */
323
+	if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK)
324
+	{
325
+		//    Error_Handler();
326
+	}
327
+}
328
+
329
+// partie commune a toutes les utilisations du wakeup timer
330
+static void RTC_wakeup_init( int delay )
331
+{
332
+LL_RTC_DisableWriteProtection( RTC );
333
+LL_RTC_WAKEUP_Disable( RTC );
334
+while	( !LL_RTC_IsActiveFlag_WUTW( RTC ) )
335
+	{ }
336
+// connecter le timer a l'horloge 1Hz de la RTC
337
+LL_RTC_WAKEUP_SetClock( RTC, LL_RTC_WAKEUPCLOCK_CKSPRE );
338
+// fixer la duree de temporisation
339
+LL_RTC_WAKEUP_SetAutoReload( RTC, delay );	// 16 bits
340
+LL_RTC_ClearFlag_WUT(RTC);
341
+LL_RTC_EnableIT_WUT(RTC);
342
+LL_RTC_WAKEUP_Enable(RTC);
343
+LL_RTC_EnableWriteProtection(RTC);
344
+}
345
+
346
+// Dans le cas des modes STANDBY et SHUTDOWN, le MPU sera reveille par reset
347
+// causé par 1 wakeup line (interne ou externe) (le NVIC n'est plus alimenté)
348
+void RTC_wakeup_init_from_standby_or_shutdown( int delay )
349
+{
350
+RTC_wakeup_init( delay );
351
+// enable the Internal Wake-up line
352
+LL_PWR_EnableInternWU();	// ceci ne concerne que Standby et Shutdown, pas STOPx
353
+}
354
+
355
+// Dans le cas des modes STOPx, le MPU sera reveille par interruption
356
+// le module EXTI et une partie du NVIC sont encore alimentes
357
+// le contenu de la RAM et des registres étant préservé, le MPU
358
+// reprend l'execution après l'instruction WFI
359
+void RTC_wakeup_init_from_stop( int delay )
360
+{
361
+RTC_wakeup_init( delay );
362
+// valider l'interrupt par la ligne 20 du module EXTI, qui est réservée au wakeup timer
363
+LL_EXTI_EnableIT_0_31( LL_EXTI_LINE_20 );
364
+LL_EXTI_EnableRisingTrig_0_31( LL_EXTI_LINE_20 );
365
+// valider l'interrupt chez NVIC
366
+NVIC_SetPriority( RTC_WKUP_IRQn, 1 );
367
+NVIC_EnableIRQ( RTC_WKUP_IRQn );
368
+}
369
+
370
+// wakeup timer interrupt Handler (inutile mais doit etre defini)
371
+void RTC_WKUP_IRQHandler()
372
+{
373
+LL_EXTI_ClearFlag_0_31( LL_EXTI_LINE_20 );
374
+}

+ 374
- 0
PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/36/40d7681a9029001b114bfff082d965b2 View File

@@ -0,0 +1,374 @@
1
+/* Project L476_ats_blink for STM32L476 mounted on Nucleo board:
2
+ * the user LED (mounted on pin PA-5) is flashed every second for 50 ms.
3
+ * The time base is provided by Systick (1000 ticks per second).
4
+ * The clock configuration is the default one (Sysclk = 80 MHz, derived from MSI and PLL).
5
+ */
6
+
7
+/* Includes ------------------------------------------------------------------*/
8
+#include "main.h"
9
+// #if defined(USE_FULL_ASSERT)
10
+// #include "stm32_assert.h"
11
+// #endif /* USE_FULL_ASSERT */
12
+
13
+#include "gpio.h"
14
+
15
+// systick interrupt handler
16
+volatile uint32_t msTicks = 0;
17
+volatile uint8_t expe = 0;
18
+volatile uint8_t blue_mode = 0;
19
+
20
+void SysTick_Handler()
21
+{
22
+	if	( BLUE_BUTTON() ){
23
+		blue_mode = 1 ;
24
+	}
25
+
26
+	msTicks++;                                                /* See startup file startup_LPC17xx.s for SysTick vector */
27
+	if (msTicks == 5 * expe){
28
+		LED_GREEN(0);
29
+	}else if(msTicks >= 200){
30
+		msTicks = 0;
31
+		LED_GREEN(1);
32
+	}
33
+	if(expe == 2 || expe == 4){
34
+		CLK_TOGGLE();
35
+	}
36
+}
37
+
38
+
39
+
40
+
41
+int main(void)
42
+{
43
+
44
+
45
+	// config GPIO
46
+	GPIO_init();
47
+
48
+//	if (RCC->BDCR & RCC_BDCR_LSEON) {
49
+		LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
50
+		LL_PWR_EnableBkUpAccess();
51
+
52
+		//expe = register RTC
53
+		expe = RTC->BKP0R;
54
+		if (expe == 0) {
55
+			SystemClock_Config_24M_LSE();
56
+			expe = 1;
57
+			LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
58
+			LL_PWR_EnableBkUpAccess();
59
+			RTC->BKP0R = expe;
60
+		}
61
+
62
+		if (BLUE_BUTTON()){
63
+
64
+			expe ++;
65
+			blue_mode = 0;
66
+			if (expe > 8) expe = 1;
67
+			RTC->BKP0R = expe;
68
+		}
69
+//	}else{
70
+
71
+//	}
72
+	LL_PWR_DisableBkUpAccess();
73
+	switch(expe){
74
+	case 1:
75
+
76
+		/* Configure the system clock */
77
+		SystemClock_Config_80M();
78
+		//Setup Sleep mode
79
+		LL_LPM_EnableSleep();
80
+		break;
81
+	case 2:
82
+		/* Configure the system clock */
83
+		SystemClock_Config_24M_LSE();
84
+		break;
85
+	case 3:
86
+		SystemClock_Config_24M_LSE_FL3_VS2();
87
+		LL_LPM_EnableSleep();
88
+		break;
89
+	case 4:
90
+		SystemClock_Config_24M_LSE_FL3_VS2();
91
+	case 5:
92
+		SystemClock_Config_24M_LSE_FL3_VS2();
93
+		LL_PWR_SetPowerMode(LL_PWR_MODE_STOP0);
94
+		LL_LPM_EnableDeepSleep();
95
+		break;
96
+	case 6:
97
+		SystemClock_Config_24M_LSE_FL3_VS2();
98
+		LL_PWR_SetPowerMode(LL_PWR_MODE_STOP1);
99
+		LL_LPM_EnableDeepSleep();
100
+		break;
101
+	case 7:
102
+		SystemClock_Config_24M_LSE_FL3_VS2();
103
+		LL_PWR_SetPowerMode(LL_PWR_MODE_STOP2);
104
+		LL_LPM_EnableDeepSleep();
105
+		break;
106
+	case 8:
107
+		SystemClock_Config_24M_LSE_FL3_VS2();
108
+		LL_PWR_SetPowerMode(LL_PWR_MODE_SHUTDOWN);
109
+		LL_LPM_EnableDeepSleep();
110
+		break;
111
+	}
112
+
113
+
114
+	// init systick timer (tick period at 1 ms)
115
+	LL_Init1msTick( SystemCoreClock );
116
+	LL_SYSTICK_EnableIT();
117
+
118
+
119
+	//LL_LPM_EnableSleepOnExit();
120
+
121
+	while (1)  {
122
+		if (blue_mode){
123
+			switch(expe){
124
+			case 5:
125
+			case 6:
126
+			case 7:
127
+				RTC_wakeup_init_from_stop(20);
128
+				__WFI();
129
+				blue_mode = 0;
130
+				break;
131
+			case 8:
132
+				RTC_wakeup_init_from_standby_or_shutdown(10);
133
+			case 1:
134
+			case 3:
135
+				__WFI();
136
+				break;
137
+			case 2:
138
+			case 4:
139
+				LL_RCC_MSI_EnablePLLMode();
140
+				break;
141
+			}
142
+		}else{
143
+				if (expe > 4) {
144
+					LL_LPM_EnableSleep();
145
+					__WFI();
146
+				}
147
+		}
148
+	}
149
+}
150
+
151
+void SystemClock_Config_24M_LSE_FL3_VS2(void){
152
+	LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
153
+	LL_FLASH_SetLatency(LL_FLASH_LATENCY_3);
154
+	while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_3)
155
+	{
156
+	}
157
+	LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE2);
158
+	LL_RCC_MSI_Enable();
159
+
160
+	/* Wait till MSI is ready */
161
+	while(LL_RCC_MSI_IsReady() != 1)
162
+	{
163
+
164
+	}
165
+
166
+	LL_PWR_EnableBkUpAccess();
167
+//	LL_RCC_ForceBackupDomainReset();
168
+	LL_RCC_ReleaseBackupDomainReset();
169
+	LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW);
170
+
171
+	LL_RCC_MSI_EnableRangeSelection();
172
+	LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6);
173
+	LL_RCC_MSI_SetCalibTrimming(0);
174
+	//  LL_RCC_MSI_EnablePLLMode();
175
+
176
+	LL_RCC_LSE_Enable();
177
+
178
+	/* Wait till LSE is ready */
179
+	while(LL_RCC_LSE_IsReady() != 1)
180
+	{
181
+
182
+	}
183
+	LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE);
184
+	LL_RCC_EnableRTC();
185
+
186
+	LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4);
187
+	LL_RCC_PLL_EnableDomain_SYS();
188
+	LL_RCC_PLL_Enable();
189
+
190
+	/* Wait till PLL is ready */
191
+	while(LL_RCC_PLL_IsReady() != 1)
192
+	{
193
+
194
+	}
195
+	LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL);
196
+
197
+	/* Wait till System clock is ready */
198
+	while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL)
199
+	{
200
+
201
+	}
202
+	LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1);
203
+	LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1);
204
+	LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1);
205
+	LL_SetSystemCoreClock(24000000);
206
+
207
+	/* Update the time base */
208
+	if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK)
209
+	{
210
+		//    Error_Handler();
211
+	}
212
+}
213
+
214
+/**
215
+ * @brief System Clock Configuration
216
+ * @retval None
217
+ * 24Mhz + RTC + LSE
218
+ */
219
+void SystemClock_Config_24M_LSE(void)
220
+{
221
+	LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
222
+	LL_FLASH_SetLatency(LL_FLASH_LATENCY_1);
223
+	while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_1)
224
+	{
225
+	}
226
+	LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1);
227
+	LL_RCC_MSI_Enable();
228
+
229
+	/* Wait till MSI is ready */
230
+	while(LL_RCC_MSI_IsReady() != 1)
231
+	{
232
+
233
+	}
234
+
235
+	LL_PWR_EnableBkUpAccess();
236
+//	LL_RCC_ForceBackupDomainReset();
237
+	LL_RCC_ReleaseBackupDomainReset();
238
+	LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW);
239
+
240
+	LL_RCC_MSI_EnableRangeSelection();
241
+	LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6);
242
+	LL_RCC_MSI_SetCalibTrimming(0);
243
+	//  LL_RCC_MSI_EnablePLLMode();
244
+
245
+	LL_RCC_LSE_Enable();
246
+
247
+	/* Wait till LSE is ready */
248
+	while(LL_RCC_LSE_IsReady() != 1)
249
+	{
250
+
251
+	}
252
+	LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE);
253
+	LL_RCC_EnableRTC();
254
+
255
+	LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4);
256
+	LL_RCC_PLL_EnableDomain_SYS();
257
+	LL_RCC_PLL_Enable();
258
+
259
+	/* Wait till PLL is ready */
260
+	while(LL_RCC_PLL_IsReady() != 1)
261
+	{
262
+
263
+	}
264
+	LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL);
265
+
266
+	/* Wait till System clock is ready */
267
+	while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL)
268
+	{
269
+
270
+	}
271
+	LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1);
272
+	LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1);
273
+	LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1);
274
+	LL_SetSystemCoreClock(24000000);
275
+
276
+	/* Update the time base */
277
+	if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK)
278
+	{
279
+		//    Error_Handler();
280
+	}
281
+}
282
+
283
+
284
+void SystemClock_Config_80M(void)
285
+{
286
+	LL_FLASH_SetLatency(LL_FLASH_LATENCY_4);
287
+	while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_4)
288
+	{
289
+	}
290
+	LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1);
291
+	LL_RCC_MSI_Enable();
292
+
293
+	/* Wait till MSI is ready */
294
+	while(LL_RCC_MSI_IsReady() != 1)
295
+	{
296
+
297
+	}
298
+	LL_RCC_MSI_EnableRangeSelection();
299
+	LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6);
300
+	LL_RCC_MSI_SetCalibTrimming(0);
301
+	LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 40, LL_RCC_PLLR_DIV_2);
302
+	LL_RCC_PLL_EnableDomain_SYS();
303
+	LL_RCC_PLL_Enable();
304
+
305
+	/* Wait till PLL is ready */
306
+	while(LL_RCC_PLL_IsReady() != 1)
307
+	{
308
+
309
+	}
310
+	LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL);
311
+
312
+	/* Wait till System clock is ready */
313
+	while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL)
314
+	{
315
+
316
+	}
317
+	LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1);
318
+	LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1);
319
+	LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1);
320
+	LL_SetSystemCoreClock(80000000);
321
+
322
+	/* Update the time base */
323
+	if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK)
324
+	{
325
+		//    Error_Handler();
326
+	}
327
+}
328
+
329
+// partie commune a toutes les utilisations du wakeup timer
330
+static void RTC_wakeup_init( int delay )
331
+{
332
+LL_RTC_DisableWriteProtection( RTC );
333
+LL_RTC_WAKEUP_Disable( RTC );
334
+while	( !LL_RTC_IsActiveFlag_WUTW( RTC ) )
335
+	{ }
336
+// connecter le timer a l'horloge 1Hz de la RTC
337
+LL_RTC_WAKEUP_SetClock( RTC, LL_RTC_WAKEUPCLOCK_CKSPRE );
338
+// fixer la duree de temporisation
339
+LL_RTC_WAKEUP_SetAutoReload( RTC, delay );	// 16 bits
340
+LL_RTC_ClearFlag_WUT(RTC);
341
+LL_RTC_EnableIT_WUT(RTC);
342
+LL_RTC_WAKEUP_Enable(RTC);
343
+LL_RTC_EnableWriteProtection(RTC);
344
+}
345
+
346
+// Dans le cas des modes STANDBY et SHUTDOWN, le MPU sera reveille par reset
347
+// causé par 1 wakeup line (interne ou externe) (le NVIC n'est plus alimenté)
348
+void RTC_wakeup_init_from_standby_or_shutdown( int delay )
349
+{
350
+RTC_wakeup_init( delay );
351
+// enable the Internal Wake-up line
352
+LL_PWR_EnableInternWU();	// ceci ne concerne que Standby et Shutdown, pas STOPx
353
+}
354
+
355
+// Dans le cas des modes STOPx, le MPU sera reveille par interruption
356
+// le module EXTI et une partie du NVIC sont encore alimentes
357
+// le contenu de la RAM et des registres étant préservé, le MPU
358
+// reprend l'execution après l'instruction WFI
359
+void RTC_wakeup_init_from_stop( int delay )
360
+{
361
+RTC_wakeup_init( delay );
362
+// valider l'interrupt par la ligne 20 du module EXTI, qui est réservée au wakeup timer
363
+LL_EXTI_EnableIT_0_31( LL_EXTI_LINE_20 );
364
+LL_EXTI_EnableRisingTrig_0_31( LL_EXTI_LINE_20 );
365
+// valider l'interrupt chez NVIC
366
+NVIC_SetPriority( RTC_WKUP_IRQn, 1 );
367
+NVIC_EnableIRQ( RTC_WKUP_IRQn );
368
+}
369
+
370
+// wakeup timer interrupt Handler (inutile mais doit etre defini)
371
+void RTC_WKUP_IRQHandler()
372
+{
373
+LL_EXTI_ClearFlag_0_31( LL_EXTI_LINE_20 );
374
+}

+ 0
- 215
PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/3b/c0a8101fb128001b1d0af99b6389052e View File

@@ -1,215 +0,0 @@
1
-/* Project L476_ats_blink for STM32L476 mounted on Nucleo board:
2
- * the user LED (mounted on pin PA-5) is flashed every second for 50 ms.
3
- * The time base is provided by Systick (1000 ticks per second).
4
- * The clock configuration is the default one (Sysclk = 80 MHz, derived from MSI and PLL).
5
- */
6
-
7
-/* Includes ------------------------------------------------------------------*/
8
-#include "main.h"
9
-// #if defined(USE_FULL_ASSERT)
10
-// #include "stm32_assert.h"
11
-// #endif /* USE_FULL_ASSERT */
12
-
13
-#include "gpio.h"
14
-
15
-// systick interrupt handler
16
-volatile uint32_t msTicks = 0;
17
-volatile uint8_t expe = 0;
18
-volatile uint8_t blue_mode = 0;
19
-
20
-void SysTick_Handler()
21
-{
22
-	if	( BLUE_BUTTON() ){
23
-		blue_mode = 1 ;
24
-	}
25
-
26
-	msTicks++;                                                /* See startup file startup_LPC17xx.s for SysTick vector */
27
-	if (msTicks == 5 * expe){
28
-		LED_GREEN(0);
29
-	}else if(msTicks >= 200){
30
-		msTicks = 0;
31
-		LED_GREEN(1);
32
-	}
33
-	if(expe == 2){
34
-		CLK_TOGGLE();
35
-	}
36
-}
37
-
38
-
39
-
40
-
41
-int main(void)
42
-{
43
-	if (RCC->BDCR & RCC_BDCR_LSEON) {
44
-		LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
45
-		LL_PWR_EnableBkUpAccess();
46
-
47
-		//expe = register RTC
48
-		expe = RTC->BKP0R;
49
-
50
-		if (BLUE_BUTTON()){
51
-			expe ++;
52
-			RTC->BKP0R = expe;
53
-		}
54
-	}else{
55
-		SystemClock_Config_24M_LSE();
56
-		expe = 1;
57
-		LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
58
-		LL_PWR_EnableBkUpAccess();
59
-		RTC->BKP0R = expe;
60
-	}
61
-	LL_PWR_DisableBkUpAccess();
62
-	switch(expe){
63
-	case 1:
64
-		/* Configure the system clock */
65
-		SystemClock_Config_80M();
66
-		break;
67
-	case 2:
68
-		/* Configure the system clock */
69
-		SystemClock_Config_24M_LSE();
70
-		break;
71
-	}
72
-
73
-
74
-
75
-
76
-	// config GPIO
77
-	GPIO_init();
78
-
79
-	// init systick timer (tick period at 1 ms)
80
-	LL_Init1msTick( SystemCoreClock );
81
-	LL_SYSTICK_EnableIT();
82
-
83
-	//Setup Sleep mode
84
-	LL_LPM_EnableSleep();
85
-	//LL_LPM_EnableSleepOnExit();
86
-
87
-	while (1)  {
88
-		if (blue_mode){
89
-			switch(expe){
90
-			case 1:
91
-				__WFI();
92
-				break;
93
-			case 2:
94
-				LL_RCC_MSI_EnablePLLMode();
95
-				break;
96
-			}
97
-
98
-		}
99
-	}
100
-}
101
-
102
-/**
103
- * @brief System Clock Configuration
104
- * @retval None
105
- * 24Mhz + RTC + LSE
106
- */
107
-void SystemClock_Config_24M_LSE(void)
108
-{
109
-	LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
110
-	LL_FLASH_SetLatency(LL_FLASH_LATENCY_1);
111
-	while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_1)
112
-	{
113
-	}
114
-	LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1);
115
-	LL_RCC_MSI_Enable();
116
-
117
-	/* Wait till MSI is ready */
118
-	while(LL_RCC_MSI_IsReady() != 1)
119
-	{
120
-
121
-	}
122
-
123
-	LL_PWR_EnableBkUpAccess();
124
-	LL_RCC_ForceBackupDomainReset();
125
-	LL_RCC_ReleaseBackupDomainReset();
126
-	LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW);
127
-
128
-	LL_RCC_MSI_EnableRangeSelection();
129
-	LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6);
130
-	LL_RCC_MSI_SetCalibTrimming(0);
131
-	//  LL_RCC_MSI_EnablePLLMode();
132
-
133
-	LL_RCC_LSE_Enable();
134
-
135
-	/* Wait till LSE is ready */
136
-	while(LL_RCC_LSE_IsReady() != 1)
137
-	{
138
-
139
-	}
140
-	LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE);
141
-	LL_RCC_EnableRTC();
142
-
143
-	LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4);
144
-	LL_RCC_PLL_EnableDomain_SYS();
145
-	LL_RCC_PLL_Enable();
146
-
147
-	/* Wait till PLL is ready */
148
-	while(LL_RCC_PLL_IsReady() != 1)
149
-	{
150
-
151
-	}
152
-	LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL);
153
-
154
-	/* Wait till System clock is ready */
155
-	while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL)
156
-	{
157
-
158
-	}
159
-	LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1);
160
-	LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1);
161
-	LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1);
162
-	LL_SetSystemCoreClock(24000000);
163
-
164
-	/* Update the time base */
165
-	if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK)
166
-	{
167
-		//    Error_Handler();
168
-	}
169
-}
170
-
171
-
172
-void SystemClock_Config_80M(void)
173
-{
174
-	LL_FLASH_SetLatency(LL_FLASH_LATENCY_4);
175
-	while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_4)
176
-	{
177
-	}
178
-	LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1);
179
-	LL_RCC_MSI_Enable();
180
-
181
-	/* Wait till MSI is ready */
182
-	while(LL_RCC_MSI_IsReady() != 1)
183
-	{
184
-
185
-	}
186
-	LL_RCC_MSI_EnableRangeSelection();
187
-	LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6);
188
-	LL_RCC_MSI_SetCalibTrimming(0);
189
-	LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 40, LL_RCC_PLLR_DIV_2);
190
-	LL_RCC_PLL_EnableDomain_SYS();
191
-	LL_RCC_PLL_Enable();
192
-
193
-	/* Wait till PLL is ready */
194
-	while(LL_RCC_PLL_IsReady() != 1)
195
-	{
196
-
197
-	}
198
-	LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL);
199
-
200
-	/* Wait till System clock is ready */
201
-	while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL)
202
-	{
203
-
204
-	}
205
-	LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1);
206
-	LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1);
207
-	LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1);
208
-	LL_SetSystemCoreClock(80000000);
209
-
210
-	/* Update the time base */
211
-	if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK)
212
-	{
213
-		//    Error_Handler();
214
-	}
215
-}

+ 89
- 0
PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/3f/00ae52dc8429001b114bfff082d965b2 View File

@@ -0,0 +1,89 @@
1
+/* USER CODE BEGIN Header */
2
+/**
3
+  ******************************************************************************
4
+  * @file           : main.h
5
+  * @brief          : Header for main.c file.
6
+  *                   This file contains the common defines of the application.
7
+  ******************************************************************************
8
+  * @attention
9
+  *
10
+  * <h2><center>&copy; Copyright (c) 2020 STMicroelectronics.
11
+  * All rights reserved.</center></h2>
12
+  *
13
+  * This software component is licensed by ST under BSD 3-Clause license,
14
+  * the "License"; You may not use this file except in compliance with the
15
+  * License. You may obtain a copy of the License at:
16
+  *                        opensource.org/licenses/BSD-3-Clause
17
+  *
18
+  ******************************************************************************
19
+  */
20
+/* USER CODE END Header */
21
+
22
+/* Define to prevent recursive inclusion -------------------------------------*/
23
+#ifndef __MAIN_H
24
+#define __MAIN_H
25
+
26
+#ifdef __cplusplus
27
+extern "C" {
28
+#endif
29
+
30
+/* Includes ------------------------------------------------------------------*/
31
+#include "stm32l4xx_hal.h"
32
+#include "stm32l4xx_ll_crs.h"
33
+#include "stm32l4xx_ll_rcc.h"
34
+#include "stm32l4xx_ll_bus.h"
35
+#include "stm32l4xx_ll_system.h"
36
+#include "stm32l4xx_ll_exti.h"
37
+#include "stm32l4xx_ll_cortex.h"
38
+#include "stm32l4xx_ll_utils.h"
39
+#include "stm32l4xx_ll_pwr.h"
40
+#include "stm32l4xx_ll_dma.h"
41
+#include "stm32l4xx_ll_gpio.h"
42
+#include "stm32l4xx_ll_rtc.h"
43
+
44
+/* Private includes ----------------------------------------------------------*/
45
+/* USER CODE BEGIN Includes */
46
+#include "../Src/gpio.h"
47
+/* USER CODE END Includes */
48
+
49
+/* Exported types ------------------------------------------------------------*/
50
+/* USER CODE BEGIN ET */
51
+
52
+/* USER CODE END ET */
53
+
54
+/* Exported constants --------------------------------------------------------*/
55
+/* USER CODE BEGIN EC */
56
+
57
+/* USER CODE END EC */
58
+
59
+/* Exported macro ------------------------------------------------------------*/
60
+/* USER CODE BEGIN EM */
61
+
62
+/* USER CODE END EM */
63
+
64
+/* Exported functions prototypes ---------------------------------------------*/
65
+void Error_Handler(void);
66
+void SystemClock_Config_24M_LSE(void);
67
+void SystemClock_Config_24M_LSE_FL3_VS2(void);
68
+void SystemClock_Config_80M(void);
69
+void Init_LSE(void);
70
+static void RTC_wakeup_init( int delay );
71
+void RTC_wakeup_init_from_standby_or_shutdown( int delay );
72
+void RTC_wakeup_init_from_stop( int delay );
73
+void RTC_WKUP_IRQHandler(void);
74
+/* USER CODE BEGIN EFP */
75
+
76
+/* USER CODE END EFP */
77
+
78
+/* Private defines -----------------------------------------------------------*/
79
+/* USER CODE BEGIN Private defines */
80
+
81
+/* USER CODE END Private defines */
82
+
83
+#ifdef __cplusplus
84
+}
85
+#endif
86
+
87
+#endif /* __MAIN_H */
88
+
89
+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

+ 372
- 0
PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/43/d07b42e58929001b114bfff082d965b2 View File

@@ -0,0 +1,372 @@
1
+/* Project L476_ats_blink for STM32L476 mounted on Nucleo board:
2
+ * the user LED (mounted on pin PA-5) is flashed every second for 50 ms.
3
+ * The time base is provided by Systick (1000 ticks per second).
4
+ * The clock configuration is the default one (Sysclk = 80 MHz, derived from MSI and PLL).
5
+ */
6
+
7
+/* Includes ------------------------------------------------------------------*/
8
+#include "main.h"
9
+// #if defined(USE_FULL_ASSERT)
10
+// #include "stm32_assert.h"
11
+// #endif /* USE_FULL_ASSERT */
12
+
13
+#include "gpio.h"
14
+
15
+// systick interrupt handler
16
+volatile uint32_t msTicks = 0;
17
+volatile uint8_t expe = 0;
18
+volatile uint8_t blue_mode = 0;
19
+
20
+void SysTick_Handler()
21
+{
22
+	if	( BLUE_BUTTON() ){
23
+		blue_mode = 1 ;
24
+	}
25
+
26
+	msTicks++;                                                /* See startup file startup_LPC17xx.s for SysTick vector */
27
+	if (msTicks == 5 * expe){
28
+		LED_GREEN(0);
29
+	}else if(msTicks >= 200){
30
+		msTicks = 0;
31
+		LED_GREEN(1);
32
+	}
33
+	if(expe == 2 || expe == 4){
34
+		CLK_TOGGLE();
35
+	}
36
+}
37
+
38
+
39
+
40
+
41
+int main(void)
42
+{
43
+
44
+
45
+	// config GPIO
46
+	GPIO_init();
47
+
48
+//	if (RCC->BDCR & RCC_BDCR_LSEON) {
49
+		LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
50
+		LL_PWR_EnableBkUpAccess();
51
+
52
+		//expe = register RTC
53
+		expe = RTC->BKP0R;
54
+		if (expe == 0) {
55
+			SystemClock_Config_24M_LSE();
56
+			expe = 1;
57
+			LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
58
+			LL_PWR_EnableBkUpAccess();
59
+			RTC->BKP0R = expe;
60
+		}
61
+
62
+		if (BLUE_BUTTON()){
63
+
64
+			expe ++;
65
+
66
+			if (expe > 7) expe = 1;
67
+			RTC->BKP0R = expe;
68
+		}
69
+//	}else{
70
+
71
+//	}
72
+	LL_PWR_DisableBkUpAccess();
73
+	switch(expe){
74
+	case 1:
75
+
76
+		/* Configure the system clock */
77
+		SystemClock_Config_80M();
78
+		//Setup Sleep mode
79
+		LL_LPM_EnableSleep();
80
+		break;
81
+	case 2:
82
+		/* Configure the system clock */
83
+		SystemClock_Config_24M_LSE();
84
+		break;
85
+	case 3:
86
+		SystemClock_Config_24M_LSE_FL3_VS2();
87
+		LL_LPM_EnableSleep();
88
+		break;
89
+	case 4:
90
+		SystemClock_Config_24M_LSE_FL3_VS2();
91
+	case 5:
92
+		SystemClock_Config_24M_LSE_FL3_VS2();
93
+		RTC_wakeup_init_from_stop(20);
94
+		LL_PWR_SetPowerMode(LL_PWR_MODE_STOP0);
95
+		LL_LPM_EnableDeepSleep();
96
+		break;
97
+	case 6:
98
+		SystemClock_Config_24M_LSE_FL3_VS2();
99
+		RTC_wakeup_init_from_stop(20);
100
+		LL_PWR_SetPowerMode(LL_PWR_MODE_STOP1);
101
+		LL_LPM_EnableDeepSleep();
102
+		break;
103
+	case 7:
104
+		SystemClock_Config_24M_LSE_FL3_VS2();
105
+		RTC_wakeup_init_from_stop(20);
106
+		LL_PWR_SetPowerMode(LL_PWR_MODE_STOP2);
107
+		LL_LPM_EnableDeepSleep();
108
+		break;
109
+	case 8:
110
+		SystemClock_Config_24M_LSE_FL3_VS2();
111
+		RTC_wakeup_init_from_standby_or_shutdown(20);
112
+		LL_PWR_SetPowerMode(LL_PWR_MODE_SHUTDOWN);
113
+		LL_LPM_EnableDeepSleep();
114
+		break;
115
+	}
116
+
117
+
118
+	// init systick timer (tick period at 1 ms)
119
+	LL_Init1msTick( SystemCoreClock );
120
+	LL_SYSTICK_EnableIT();
121
+
122
+
123
+	//LL_LPM_EnableSleepOnExit();
124
+
125
+	while (1)  {
126
+		if (blue_mode){
127
+			switch(expe){
128
+			case 1:
129
+			case 3:
130
+			case 5:
131
+			case 6:
132
+			case 7:
133
+			case 8:
134
+				__WFI();
135
+				break;
136
+
137
+			case 2:
138
+			case 4:
139
+				LL_RCC_MSI_EnablePLLMode();
140
+				break;
141
+
142
+
143
+			}
144
+
145
+		}
146
+	}
147
+}
148
+
149
+void SystemClock_Config_24M_LSE_FL3_VS2(void){
150
+	LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
151
+	LL_FLASH_SetLatency(LL_FLASH_LATENCY_3);
152
+	while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_3)
153
+	{
154
+	}
155
+	LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE2);
156
+	LL_RCC_MSI_Enable();
157
+
158
+	/* Wait till MSI is ready */
159
+	while(LL_RCC_MSI_IsReady() != 1)
160
+	{
161
+
162
+	}
163
+
164
+	LL_PWR_EnableBkUpAccess();
165
+//	LL_RCC_ForceBackupDomainReset();
166
+	LL_RCC_ReleaseBackupDomainReset();
167
+	LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW);
168
+
169
+	LL_RCC_MSI_EnableRangeSelection();
170
+	LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6);
171
+	LL_RCC_MSI_SetCalibTrimming(0);
172
+	//  LL_RCC_MSI_EnablePLLMode();
173
+
174
+	LL_RCC_LSE_Enable();
175
+
176
+	/* Wait till LSE is ready */
177
+	while(LL_RCC_LSE_IsReady() != 1)
178
+	{
179
+
180
+	}
181
+	LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE);
182
+	LL_RCC_EnableRTC();
183
+
184
+	LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4);
185
+	LL_RCC_PLL_EnableDomain_SYS();
186
+	LL_RCC_PLL_Enable();
187
+
188
+	/* Wait till PLL is ready */
189
+	while(LL_RCC_PLL_IsReady() != 1)
190
+	{
191
+
192
+	}
193
+	LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL);
194
+
195
+	/* Wait till System clock is ready */
196
+	while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL)
197
+	{
198
+
199
+	}
200
+	LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1);
201
+	LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1);
202
+	LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1);
203
+	LL_SetSystemCoreClock(24000000);
204
+
205
+	/* Update the time base */
206
+	if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK)
207
+	{
208
+		//    Error_Handler();
209
+	}
210
+}
211
+
212
+/**
213
+ * @brief System Clock Configuration
214
+ * @retval None
215
+ * 24Mhz + RTC + LSE
216
+ */
217
+void SystemClock_Config_24M_LSE(void)
218
+{
219
+	LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
220
+	LL_FLASH_SetLatency(LL_FLASH_LATENCY_1);
221
+	while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_1)
222
+	{
223
+	}
224
+	LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1);
225
+	LL_RCC_MSI_Enable();
226
+
227
+	/* Wait till MSI is ready */
228
+	while(LL_RCC_MSI_IsReady() != 1)
229
+	{
230
+
231
+	}
232
+
233
+	LL_PWR_EnableBkUpAccess();
234
+//	LL_RCC_ForceBackupDomainReset();
235
+	LL_RCC_ReleaseBackupDomainReset();
236
+	LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW);
237
+
238
+	LL_RCC_MSI_EnableRangeSelection();
239
+	LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6);
240
+	LL_RCC_MSI_SetCalibTrimming(0);
241
+	//  LL_RCC_MSI_EnablePLLMode();
242
+
243
+	LL_RCC_LSE_Enable();
244
+
245
+	/* Wait till LSE is ready */
246
+	while(LL_RCC_LSE_IsReady() != 1)
247
+	{
248
+
249
+	}
250
+	LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE);
251
+	LL_RCC_EnableRTC();
252
+
253
+	LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4);
254
+	LL_RCC_PLL_EnableDomain_SYS();
255
+	LL_RCC_PLL_Enable();
256
+
257
+	/* Wait till PLL is ready */
258
+	while(LL_RCC_PLL_IsReady() != 1)
259
+	{
260
+
261
+	}
262
+	LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL);
263
+
264
+	/* Wait till System clock is ready */
265
+	while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL)
266
+	{
267
+
268
+	}
269
+	LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1);
270
+	LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1);
271
+	LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1);
272
+	LL_SetSystemCoreClock(24000000);
273
+
274
+	/* Update the time base */
275
+	if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK)
276
+	{
277
+		//    Error_Handler();
278
+	}
279
+}
280
+
281
+
282
+void SystemClock_Config_80M(void)
283
+{
284
+	LL_FLASH_SetLatency(LL_FLASH_LATENCY_4);
285
+	while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_4)
286
+	{
287
+	}
288
+	LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1);
289
+	LL_RCC_MSI_Enable();
290
+
291
+	/* Wait till MSI is ready */
292
+	while(LL_RCC_MSI_IsReady() != 1)
293
+	{
294
+
295
+	}
296
+	LL_RCC_MSI_EnableRangeSelection();
297
+	LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6);
298
+	LL_RCC_MSI_SetCalibTrimming(0);
299
+	LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 40, LL_RCC_PLLR_DIV_2);
300
+	LL_RCC_PLL_EnableDomain_SYS();
301
+	LL_RCC_PLL_Enable();
302
+
303
+	/* Wait till PLL is ready */
304
+	while(LL_RCC_PLL_IsReady() != 1)
305
+	{
306
+
307
+	}
308
+	LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL);
309
+
310
+	/* Wait till System clock is ready */
311
+	while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL)
312
+	{
313
+
314
+	}
315
+	LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1);
316
+	LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1);
317
+	LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1);
318
+	LL_SetSystemCoreClock(80000000);
319
+
320
+	/* Update the time base */
321
+	if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK)
322
+	{
323
+		//    Error_Handler();
324
+	}
325
+}
326
+
327
+// partie commune a toutes les utilisations du wakeup timer
328
+static void RTC_wakeup_init( int delay )
329
+{
330
+LL_RTC_DisableWriteProtection( RTC );
331
+LL_RTC_WAKEUP_Disable( RTC );
332
+while	( !LL_RTC_IsActiveFlag_WUTW( RTC ) )
333
+	{ }
334
+// connecter le timer a l'horloge 1Hz de la RTC
335
+LL_RTC_WAKEUP_SetClock( RTC, LL_RTC_WAKEUPCLOCK_CKSPRE );
336
+// fixer la duree de temporisation
337
+LL_RTC_WAKEUP_SetAutoReload( RTC, delay );	// 16 bits
338
+LL_RTC_ClearFlag_WUT(RTC);
339
+LL_RTC_EnableIT_WUT(RTC);
340
+LL_RTC_WAKEUP_Enable(RTC);
341
+LL_RTC_EnableWriteProtection(RTC);
342
+}
343
+
344
+// Dans le cas des modes STANDBY et SHUTDOWN, le MPU sera reveille par reset
345
+// causé par 1 wakeup line (interne ou externe) (le NVIC n'est plus alimenté)
346
+void RTC_wakeup_init_from_standby_or_shutdown( int delay )
347
+{
348
+RTC_wakeup_init( delay );
349
+// enable the Internal Wake-up line
350
+LL_PWR_EnableInternWU();	// ceci ne concerne que Standby et Shutdown, pas STOPx
351
+}
352
+
353
+// Dans le cas des modes STOPx, le MPU sera reveille par interruption
354
+// le module EXTI et une partie du NVIC sont encore alimentes
355
+// le contenu de la RAM et des registres étant préservé, le MPU
356
+// reprend l'execution après l'instruction WFI
357
+void RTC_wakeup_init_from_stop( int delay )
358
+{
359
+RTC_wakeup_init( delay );
360
+// valider l'interrupt par la ligne 20 du module EXTI, qui est réservée au wakeup timer
361
+LL_EXTI_EnableIT_0_31( LL_EXTI_LINE_20 );
362
+LL_EXTI_EnableRisingTrig_0_31( LL_EXTI_LINE_20 );
363
+// valider l'interrupt chez NVIC
364
+NVIC_SetPriority( RTC_WKUP_IRQn, 1 );
365
+NVIC_EnableIRQ( RTC_WKUP_IRQn );
366
+}
367
+
368
+// wakeup timer interrupt Handler (inutile mais doit etre defini)
369
+void RTC_WKUP_IRQHandler()
370
+{
371
+LL_EXTI_ClearFlag_0_31( LL_EXTI_LINE_20 );
372
+}

+ 0
- 215
PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/5e/f0de86ebad28001b1d0af99b6389052e View File

@@ -1,215 +0,0 @@
1
-/* Project L476_ats_blink for STM32L476 mounted on Nucleo board:
2
- * the user LED (mounted on pin PA-5) is flashed every second for 50 ms.
3
- * The time base is provided by Systick (1000 ticks per second).
4
- * The clock configuration is the default one (Sysclk = 80 MHz, derived from MSI and PLL).
5
- */
6
-
7
-/* Includes ------------------------------------------------------------------*/
8
-#include "main.h"
9
-// #if defined(USE_FULL_ASSERT)
10
-// #include "stm32_assert.h"
11
-// #endif /* USE_FULL_ASSERT */
12
-
13
-#include "gpio.h"
14
-
15
-// systick interrupt handler
16
-volatile uint32_t msTicks = 0;
17
-volatile uint8_t expe = 2;
18
-volatile uint8_t blue_mode = 0;
19
-
20
-void SysTick_Handler()
21
-{
22
-  if	( BLUE_BUTTON() ){
23
-			blue_mode = 1 ;
24
-  }
25
-
26
-  msTicks++;                                                /* See startup file startup_LPC17xx.s for SysTick vector */
27
-  if (msTicks == 5 * expe){
28
-	  LED_GREEN(0);
29
-  }else if(msTicks >= 200){
30
-	  msTicks = 0;
31
-	  LED_GREEN(1);
32
-  }
33
- if(expe == 2){
34
-	 CLK_TOGGLE();
35
- }
36
-}
37
-
38
-
39
-
40
-
41
-int main(void)
42
-{
43
-//	if (RCC->BDCR & RCC_BDCR_LSEON) {
44
-//			LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
45
-//			LL_PWR_EnableBkUpAccess();
46
-//
47
-//			//expe = register RTC
48
-//			expe = RTC->BKP0R;
49
-//			if (expe == 0){
50
-//				expe = 1;
51
-//				RTC->BKP0R = expe;
52
-//			}else if (expe != 0 && BLUE_BUTTON()){
53
-//				expe ++;
54
-//				RTC->BKP0R = expe;
55
-//			}
56
-//	}else{
57
-//		SystemClock_Config_24M_LSE();
58
-//		expe = 1;
59
-//		LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
60
-//		LL_PWR_EnableBkUpAccess();
61
-//		RTC->BKP0R = expe;
62
-//	}
63
-//	LL_PWR_DisableBkUpAccess();
64
-	switch(expe){
65
-			case 1:
66
-				/* Configure the system clock */
67
-				SystemClock_Config_80M();
68
-				break;
69
-			case 2:
70
-				/* Configure the system clock */
71
-				SystemClock_Config_24M_LSE();
72
-				break;
73
-			}
74
-
75
-
76
-
77
-
78
-// config GPIO
79
-GPIO_init();
80
-
81
-// init systick timer (tick period at 1 ms)
82
-LL_Init1msTick( SystemCoreClock );
83
-LL_SYSTICK_EnableIT();
84
-
85
-//Setup Sleep mode
86
-LL_LPM_EnableSleep();
87
-//LL_LPM_EnableSleepOnExit();
88
-
89
-while (1)  {
90
-	if (blue_mode){
91
-		switch(expe){
92
-					case 1:
93
-						__WFI();
94
-						break;
95
-					case 2:
96
-						LL_RCC_MSI_EnablePLLMode();
97
-						break;
98
-					}
99
-
100
-		}
101
-	}
102
-}
103
-
104
-/**
105
-  * @brief System Clock Configuration
106
-  * @retval None
107
-  * 24Mhz + RTC + LSE
108
-  */
109
-void SystemClock_Config_24M_LSE(void)
110
-{
111
-  LL_FLASH_SetLatency(LL_FLASH_LATENCY_1);
112
-  while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_1)
113
-  {
114
-  }
115
-  LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1);
116
-  LL_RCC_MSI_Enable();
117
-
118
-   /* Wait till MSI is ready */
119
-  while(LL_RCC_MSI_IsReady() != 1)
120
-  {
121
-
122
-  }
123
-
124
-  LL_RCC_LSE_Enable();
125
-
126
-    /* Wait till LSE is ready */
127
-   while(LL_RCC_LSE_IsReady() != 1)
128
-   {
129
-
130
-   }
131
-  LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE);
132
-  LL_RCC_EnableRTC();
133
-
134
-  LL_RCC_MSI_EnableRangeSelection();
135
-  LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6);
136
-  LL_RCC_MSI_SetCalibTrimming(0);
137
-//  LL_RCC_MSI_EnablePLLMode();
138
-  LL_PWR_EnableBkUpAccess();
139
-  LL_RCC_ForceBackupDomainReset();
140
-  LL_RCC_ReleaseBackupDomainReset();
141
-  LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW);
142
-
143
-  LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4);
144
-  LL_RCC_PLL_EnableDomain_SYS();
145
-  LL_RCC_PLL_Enable();
146
-
147
-   /* Wait till PLL is ready */
148
-  while(LL_RCC_PLL_IsReady() != 1)
149
-  {
150
-
151
-  }
152
-  LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL);
153
-
154
-   /* Wait till System clock is ready */
155
-  while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL)
156
-  {
157
-
158
-  }
159
-  LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1);
160
-  LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1);
161
-  LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1);
162
-  LL_SetSystemCoreClock(24000000);
163
-
164
-   /* Update the time base */
165
-  if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK)
166
-  {
167
-//    Error_Handler();
168
-  }
169
-}
170
-
171
-
172
-void SystemClock_Config_80M(void)
173
-{
174
-  LL_FLASH_SetLatency(LL_FLASH_LATENCY_4);
175
-  while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_4)
176
-  {
177
-  }
178
-  LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1);
179
-  LL_RCC_MSI_Enable();
180
-
181
-   /* Wait till MSI is ready */
182
-  while(LL_RCC_MSI_IsReady() != 1)
183
-  {
184
-
185
-  }
186
-  LL_RCC_MSI_EnableRangeSelection();
187
-  LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6);
188
-  LL_RCC_MSI_SetCalibTrimming(0);
189
-  LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 40, LL_RCC_PLLR_DIV_2);
190
-  LL_RCC_PLL_EnableDomain_SYS();
191
-  LL_RCC_PLL_Enable();
192
-
193
-   /* Wait till PLL is ready */
194
-  while(LL_RCC_PLL_IsReady() != 1)
195
-  {
196
-
197
-  }
198
-  LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL);
199
-
200
-   /* Wait till System clock is ready */
201
-  while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL)
202
-  {
203
-
204
-  }
205
-  LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1);
206
-  LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1);
207
-  LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1);
208
-  LL_SetSystemCoreClock(80000000);
209
-
210
-   /* Update the time base */
211
-  if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK)
212
-  {
213
-//    Error_Handler();
214
-  }
215
-}

+ 373
- 0
PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/62/90bb79069129001b114bfff082d965b2 View File

@@ -0,0 +1,373 @@
1
+/* Project L476_ats_blink for STM32L476 mounted on Nucleo board:
2
+ * the user LED (mounted on pin PA-5) is flashed every second for 50 ms.
3
+ * The time base is provided by Systick (1000 ticks per second).
4
+ * The clock configuration is the default one (Sysclk = 80 MHz, derived from MSI and PLL).
5
+ */
6
+
7
+/* Includes ------------------------------------------------------------------*/
8
+#include "main.h"
9
+// #if defined(USE_FULL_ASSERT)
10
+// #include "stm32_assert.h"
11
+// #endif /* USE_FULL_ASSERT */
12
+
13
+#include "gpio.h"
14
+
15
+// systick interrupt handler
16
+volatile uint32_t msTicks = 0;
17
+volatile uint8_t expe = 0;
18
+volatile uint8_t blue_mode = 0;
19
+
20
+void SysTick_Handler()
21
+{
22
+	if	( BLUE_BUTTON() ){
23
+		blue_mode = 1 ;
24
+	}
25
+
26
+	msTicks++;                                                /* See startup file startup_LPC17xx.s for SysTick vector */
27
+	if (msTicks == 5 * expe){
28
+		LED_GREEN(0);
29
+	}else if(msTicks >= 200){
30
+		msTicks = 0;
31
+		LED_GREEN(1);
32
+	}
33
+	if(expe == 2 || expe == 4){
34
+		CLK_TOGGLE();
35
+	}
36
+}
37
+
38
+
39
+
40
+
41
+int main(void)
42
+{
43
+
44
+
45
+	// config GPIO
46
+	GPIO_init();
47
+
48
+//	if (RCC->BDCR & RCC_BDCR_LSEON) {
49
+		LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
50
+		LL_PWR_EnableBkUpAccess();
51
+
52
+		//expe = register RTC
53
+		expe = RTC->BKP0R;
54
+		if (expe == 0) {
55
+			SystemClock_Config_24M_LSE();
56
+			expe = 1;
57
+			LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
58
+			LL_PWR_EnableBkUpAccess();
59
+			RTC->BKP0R = expe;
60
+		}
61
+
62
+		if (BLUE_BUTTON()){
63
+
64
+			expe ++;
65
+			blue_mode = 0;
66
+			if (expe > 8) expe = 1;
67
+			RTC->BKP0R = expe;
68
+		}
69
+//	}else{
70
+
71
+//	}
72
+	LL_PWR_DisableBkUpAccess();
73
+	switch(expe){
74
+	case 1:
75
+
76
+		/* Configure the system clock */
77
+		SystemClock_Config_80M();
78
+		//Setup Sleep mode
79
+		LL_LPM_EnableSleep();
80
+		break;
81
+	case 2:
82
+		/* Configure the system clock */
83
+		SystemClock_Config_24M_LSE();
84
+		break;
85
+	case 3:
86
+		SystemClock_Config_24M_LSE_FL3_VS2();
87
+		LL_LPM_EnableSleep();
88
+		break;
89
+	case 4:
90
+		SystemClock_Config_24M_LSE_FL3_VS2();
91
+	case 5:
92
+		SystemClock_Config_24M_LSE_FL3_VS2();
93
+		LL_PWR_SetPowerMode(LL_PWR_MODE_STOP0);
94
+		break;
95
+	case 6:
96
+		SystemClock_Config_24M_LSE_FL3_VS2();
97
+		LL_PWR_SetPowerMode(LL_PWR_MODE_STOP1);
98
+		break;
99
+	case 7:
100
+		SystemClock_Config_24M_LSE_FL3_VS2();
101
+		LL_PWR_SetPowerMode(LL_PWR_MODE_STOP2);
102
+		break;
103
+	case 8:
104
+		SystemClock_Config_24M_LSE_FL3_VS2();
105
+		LL_PWR_SetPowerMode(LL_PWR_MODE_SHUTDOWN);
106
+		break;
107
+	}
108
+
109
+
110
+	// init systick timer (tick period at 1 ms)
111
+	LL_Init1msTick( SystemCoreClock );
112
+	LL_SYSTICK_EnableIT();
113
+
114
+
115
+	//LL_LPM_EnableSleepOnExit();
116
+
117
+	while (1)  {
118
+		if (blue_mode){
119
+			switch(expe){
120
+			case 5:
121
+			case 6:
122
+			case 7:
123
+				LL_LPM_EnableDeepSleep();
124
+				RTC_wakeup_init_from_stop(20);
125
+				__WFI();
126
+				blue_mode = 0;
127
+				SystemClock_Config_24M_LSE_FL3_VS2();
128
+				break;
129
+			case 8:
130
+				LL_LPM_EnableDeepSleep();
131
+				RTC_wakeup_init_from_standby_or_shutdown(10);
132
+			case 1:
133
+			case 3:
134
+				__WFI();
135
+				break;
136
+			case 2:
137
+			case 4:
138
+				LL_RCC_MSI_EnablePLLMode();
139
+				break;
140
+			}
141
+		}else{
142
+				if (expe > 4) {
143
+					LL_LPM_EnableSleep();
144
+					__WFI();
145
+				}
146
+		}
147
+	}
148
+}
149
+
150
+void SystemClock_Config_24M_LSE_FL3_VS2(void){
151
+	LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
152
+	LL_FLASH_SetLatency(LL_FLASH_LATENCY_3);
153
+	while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_3)
154
+	{
155
+	}
156
+	LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE2);
157
+	LL_RCC_MSI_Enable();
158
+
159
+	/* Wait till MSI is ready */
160
+	while(LL_RCC_MSI_IsReady() != 1)
161
+	{
162
+
163
+	}
164
+
165
+	LL_PWR_EnableBkUpAccess();
166
+//	LL_RCC_ForceBackupDomainReset();
167
+	LL_RCC_ReleaseBackupDomainReset();
168
+	LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW);
169
+
170
+	LL_RCC_MSI_EnableRangeSelection();
171
+	LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6);
172
+	LL_RCC_MSI_SetCalibTrimming(0);
173
+	//  LL_RCC_MSI_EnablePLLMode();
174
+
175
+	LL_RCC_LSE_Enable();
176
+
177
+	/* Wait till LSE is ready */
178
+	while(LL_RCC_LSE_IsReady() != 1)
179
+	{
180
+
181
+	}
182
+	LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE);
183
+	LL_RCC_EnableRTC();
184
+
185
+	LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4);
186
+	LL_RCC_PLL_EnableDomain_SYS();
187
+	LL_RCC_PLL_Enable();
188
+
189
+	/* Wait till PLL is ready */
190
+	while(LL_RCC_PLL_IsReady() != 1)
191
+	{
192
+
193
+	}
194
+	LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL);
195
+
196
+	/* Wait till System clock is ready */
197
+	while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL)
198
+	{
199
+
200
+	}
201
+	LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1);
202
+	LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1);
203
+	LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1);
204
+	LL_SetSystemCoreClock(24000000);
205
+
206
+	/* Update the time base */
207
+	if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK)
208
+	{
209
+		//    Error_Handler();
210
+	}
211
+}
212
+
213
+/**
214
+ * @brief System Clock Configuration
215
+ * @retval None
216
+ * 24Mhz + RTC + LSE
217
+ */
218
+void SystemClock_Config_24M_LSE(void)
219
+{
220
+	LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
221
+	LL_FLASH_SetLatency(LL_FLASH_LATENCY_1);
222
+	while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_1)
223
+	{
224
+	}
225
+	LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1);
226
+	LL_RCC_MSI_Enable();
227
+
228
+	/* Wait till MSI is ready */
229
+	while(LL_RCC_MSI_IsReady() != 1)
230
+	{
231
+
232
+	}
233
+
234
+	LL_PWR_EnableBkUpAccess();
235
+//	LL_RCC_ForceBackupDomainReset();
236
+	LL_RCC_ReleaseBackupDomainReset();
237
+	LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW);
238
+
239
+	LL_RCC_MSI_EnableRangeSelection();
240
+	LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6);
241
+	LL_RCC_MSI_SetCalibTrimming(0);
242
+	//  LL_RCC_MSI_EnablePLLMode();
243
+
244
+	LL_RCC_LSE_Enable();
245
+
246
+	/* Wait till LSE is ready */
247
+	while(LL_RCC_LSE_IsReady() != 1)
248
+	{
249
+
250
+	}
251
+	LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE);
252
+	LL_RCC_EnableRTC();
253
+
254
+	LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4);
255
+	LL_RCC_PLL_EnableDomain_SYS();
256
+	LL_RCC_PLL_Enable();
257
+
258
+	/* Wait till PLL is ready */
259
+	while(LL_RCC_PLL_IsReady() != 1)
260
+	{
261
+
262
+	}
263
+	LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL);
264
+
265
+	/* Wait till System clock is ready */
266
+	while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL)
267
+	{
268
+
269
+	}
270
+	LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1);
271
+	LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1);
272
+	LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1);
273
+	LL_SetSystemCoreClock(24000000);
274
+
275
+	/* Update the time base */
276
+	if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK)
277
+	{
278
+		//    Error_Handler();
279
+	}
280
+}
281
+
282
+
283
+void SystemClock_Config_80M(void)
284
+{
285
+	LL_FLASH_SetLatency(LL_FLASH_LATENCY_4);
286
+	while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_4)
287
+	{
288
+	}
289
+	LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1);
290
+	LL_RCC_MSI_Enable();
291
+
292
+	/* Wait till MSI is ready */
293
+	while(LL_RCC_MSI_IsReady() != 1)
294
+	{
295
+
296
+	}
297
+	LL_RCC_MSI_EnableRangeSelection();
298
+	LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6);
299
+	LL_RCC_MSI_SetCalibTrimming(0);
300
+	LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 40, LL_RCC_PLLR_DIV_2);
301
+	LL_RCC_PLL_EnableDomain_SYS();
302
+	LL_RCC_PLL_Enable();
303
+
304
+	/* Wait till PLL is ready */
305
+	while(LL_RCC_PLL_IsReady() != 1)
306
+	{
307
+
308
+	}
309
+	LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL);
310
+
311
+	/* Wait till System clock is ready */
312
+	while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL)
313
+	{
314
+
315
+	}
316
+	LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1);
317
+	LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1);
318
+	LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1);
319
+	LL_SetSystemCoreClock(80000000);
320
+
321
+	/* Update the time base */
322
+	if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK)
323
+	{
324
+		//    Error_Handler();
325
+	}
326
+}
327
+
328
+// partie commune a toutes les utilisations du wakeup timer
329
+static void RTC_wakeup_init( int delay )
330
+{
331
+LL_RTC_DisableWriteProtection( RTC );
332
+LL_RTC_WAKEUP_Disable( RTC );
333
+while	( !LL_RTC_IsActiveFlag_WUTW( RTC ) )
334
+	{ }
335
+// connecter le timer a l'horloge 1Hz de la RTC
336
+LL_RTC_WAKEUP_SetClock( RTC, LL_RTC_WAKEUPCLOCK_CKSPRE );
337
+// fixer la duree de temporisation
338
+LL_RTC_WAKEUP_SetAutoReload( RTC, delay );	// 16 bits
339
+LL_RTC_ClearFlag_WUT(RTC);
340
+LL_RTC_EnableIT_WUT(RTC);
341
+LL_RTC_WAKEUP_Enable(RTC);
342
+LL_RTC_EnableWriteProtection(RTC);
343
+}
344
+
345
+// Dans le cas des modes STANDBY et SHUTDOWN, le MPU sera reveille par reset
346
+// causé par 1 wakeup line (interne ou externe) (le NVIC n'est plus alimenté)
347
+void RTC_wakeup_init_from_standby_or_shutdown( int delay )
348
+{
349
+RTC_wakeup_init( delay );
350
+// enable the Internal Wake-up line
351
+LL_PWR_EnableInternWU();	// ceci ne concerne que Standby et Shutdown, pas STOPx
352
+}
353
+
354
+// Dans le cas des modes STOPx, le MPU sera reveille par interruption
355
+// le module EXTI et une partie du NVIC sont encore alimentes
356
+// le contenu de la RAM et des registres étant préservé, le MPU
357
+// reprend l'execution après l'instruction WFI
358
+void RTC_wakeup_init_from_stop( int delay )
359
+{
360
+RTC_wakeup_init( delay );
361
+// valider l'interrupt par la ligne 20 du module EXTI, qui est réservée au wakeup timer
362
+LL_EXTI_EnableIT_0_31( LL_EXTI_LINE_20 );
363
+LL_EXTI_EnableRisingTrig_0_31( LL_EXTI_LINE_20 );
364
+// valider l'interrupt chez NVIC
365
+NVIC_SetPriority( RTC_WKUP_IRQn, 1 );
366
+NVIC_EnableIRQ( RTC_WKUP_IRQn );
367
+}
368
+
369
+// wakeup timer interrupt Handler (inutile mais doit etre defini)
370
+void RTC_WKUP_IRQHandler()
371
+{
372
+LL_EXTI_ClearFlag_0_31( LL_EXTI_LINE_20 );
373
+}

+ 375
- 0
PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/65/c0f25e289129001b114bfff082d965b2 View File

@@ -0,0 +1,375 @@
1
+/* Project L476_ats_blink for STM32L476 mounted on Nucleo board:
2
+ * the user LED (mounted on pin PA-5) is flashed every second for 50 ms.
3
+ * The time base is provided by Systick (1000 ticks per second).
4
+ * The clock configuration is the default one (Sysclk = 80 MHz, derived from MSI and PLL).
5
+ */
6
+
7
+/* Includes ------------------------------------------------------------------*/
8
+#include "main.h"
9
+// #if defined(USE_FULL_ASSERT)
10
+// #include "stm32_assert.h"
11
+// #endif /* USE_FULL_ASSERT */
12
+
13
+#include "gpio.h"
14
+
15
+// systick interrupt handler
16
+volatile uint32_t msTicks = 0;
17
+volatile uint8_t expe = 0;
18
+volatile uint8_t blue_mode = 0;
19
+
20
+void SysTick_Handler()
21
+{
22
+	if	( BLUE_BUTTON() ){
23
+		blue_mode = 1 ;
24
+	}
25
+
26
+	msTicks++;                                                /* See startup file startup_LPC17xx.s for SysTick vector */
27
+	if (msTicks == 5 * expe){
28
+		LED_GREEN(0);
29
+	}else if(msTicks >= 200){
30
+		msTicks = 0;
31
+		LED_GREEN(1);
32
+	}
33
+	if(expe == 2 || expe == 4){
34
+		CLK_TOGGLE();
35
+	}
36
+}
37
+
38
+
39
+
40
+
41
+int main(void)
42
+{
43
+
44
+
45
+	// config GPIO
46
+	GPIO_init();
47
+
48
+//	if (RCC->BDCR & RCC_BDCR_LSEON) {
49
+		LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
50
+		LL_PWR_EnableBkUpAccess();
51
+
52
+		//expe = register RTC
53
+		expe = RTC->BKP0R;
54
+		if (expe == 0) {
55
+			SystemClock_Config_24M_LSE();
56
+			expe = 1;
57
+			LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
58
+			LL_PWR_EnableBkUpAccess();
59
+			RTC->BKP0R = expe;
60
+		}
61
+
62
+		if (BLUE_BUTTON()){
63
+
64
+			expe ++;
65
+			blue_mode = 0;
66
+			if (expe > 8) expe = 1;
67
+			RTC->BKP0R = expe;
68
+		}
69
+//	}else{
70
+
71
+//	}
72
+	LL_PWR_DisableBkUpAccess();
73
+	switch(expe){
74
+	case 1:
75
+
76
+		/* Configure the system clock */
77
+		SystemClock_Config_80M();
78
+		//Setup Sleep mode
79
+		LL_LPM_EnableSleep();
80
+		break;
81
+	case 2:
82
+		/* Configure the system clock */
83
+		SystemClock_Config_24M_LSE();
84
+		break;
85
+	case 3:
86
+		SystemClock_Config_24M_LSE_FL3_VS2();
87
+		LL_LPM_EnableSleep();
88
+		break;
89
+	case 4:
90
+		SystemClock_Config_24M_LSE_FL3_VS2();
91
+	case 5:
92
+		SystemClock_Config_24M_LSE_FL3_VS2();
93
+		LL_PWR_SetPowerMode(LL_PWR_MODE_STOP0);
94
+		break;
95
+	case 6:
96
+		SystemClock_Config_24M_LSE_FL3_VS2();
97
+		LL_PWR_SetPowerMode(LL_PWR_MODE_STOP1);
98
+		break;
99
+	case 7:
100
+		SystemClock_Config_24M_LSE_FL3_VS2();
101
+		LL_PWR_SetPowerMode(LL_PWR_MODE_STOP2);
102
+		break;
103
+	case 8:
104
+		SystemClock_Config_24M_LSE_FL3_VS2();
105
+		LL_PWR_SetPowerMode(LL_PWR_MODE_SHUTDOWN);
106
+		break;
107
+	}
108
+
109
+
110
+	// init systick timer (tick period at 1 ms)
111
+	LL_Init1msTick( SystemCoreClock );
112
+	LL_SYSTICK_EnableIT();
113
+
114
+
115
+	//LL_LPM_EnableSleepOnExit();
116
+
117
+	while (1)  {
118
+		if (blue_mode){
119
+			switch(expe){
120
+			case 5:
121
+			case 6:
122
+			case 7:
123
+				LL_LPM_EnableDeepSleep();
124
+				RTC_wakeup_init_from_stop(20);
125
+				__WFI();
126
+				blue_mode = 0;
127
+
128
+				SystemClock_Config_24M_LSE_FL3_VS2();
129
+				LL_Init1msTick( SystemCoreClock );
130
+				break;
131
+			case 8:
132
+				LL_LPM_EnableDeepSleep();
133
+				RTC_wakeup_init_from_standby_or_shutdown(10);
134
+			case 1:
135
+			case 3:
136
+				__WFI();
137
+				break;
138
+			case 2:
139
+			case 4:
140
+				LL_RCC_MSI_EnablePLLMode();
141
+				break;
142
+			}
143
+		}else{
144
+				if (expe > 4) {
145
+					LL_LPM_EnableSleep();
146
+					__WFI();
147
+				}
148
+		}
149
+	}
150
+}
151
+
152
+void SystemClock_Config_24M_LSE_FL3_VS2(void){
153
+	LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
154
+	LL_FLASH_SetLatency(LL_FLASH_LATENCY_3);
155
+	while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_3)
156
+	{
157
+	}
158
+	LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE2);
159
+	LL_RCC_MSI_Enable();
160
+
161
+	/* Wait till MSI is ready */
162
+	while(LL_RCC_MSI_IsReady() != 1)
163
+	{
164
+
165
+	}
166
+
167
+	LL_PWR_EnableBkUpAccess();
168
+//	LL_RCC_ForceBackupDomainReset();
169
+	LL_RCC_ReleaseBackupDomainReset();
170
+	LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW);
171
+
172
+	LL_RCC_MSI_EnableRangeSelection();
173
+	LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6);
174
+	LL_RCC_MSI_SetCalibTrimming(0);
175
+	//  LL_RCC_MSI_EnablePLLMode();
176
+
177
+	LL_RCC_LSE_Enable();
178
+
179
+	/* Wait till LSE is ready */
180
+	while(LL_RCC_LSE_IsReady() != 1)
181
+	{
182
+
183
+	}
184
+	LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE);
185
+	LL_RCC_EnableRTC();
186
+
187
+	LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4);
188
+	LL_RCC_PLL_EnableDomain_SYS();
189
+	LL_RCC_PLL_Enable();
190
+
191
+	/* Wait till PLL is ready */
192
+	while(LL_RCC_PLL_IsReady() != 1)
193
+	{
194
+
195
+	}
196
+	LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL);
197
+
198
+	/* Wait till System clock is ready */
199
+	while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL)
200
+	{
201
+
202
+	}
203
+	LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1);
204
+	LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1);
205
+	LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1);
206
+	LL_SetSystemCoreClock(24000000);
207
+
208
+	/* Update the time base */
209
+	if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK)
210
+	{
211
+		//    Error_Handler();
212
+	}
213
+}
214
+
215
+/**
216
+ * @brief System Clock Configuration
217
+ * @retval None
218
+ * 24Mhz + RTC + LSE
219
+ */
220
+void SystemClock_Config_24M_LSE(void)
221
+{
222
+	LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
223
+	LL_FLASH_SetLatency(LL_FLASH_LATENCY_1);
224
+	while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_1)
225
+	{
226
+	}
227
+	LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1);
228
+	LL_RCC_MSI_Enable();
229
+
230
+	/* Wait till MSI is ready */
231
+	while(LL_RCC_MSI_IsReady() != 1)
232
+	{
233
+
234
+	}
235
+
236
+	LL_PWR_EnableBkUpAccess();
237
+//	LL_RCC_ForceBackupDomainReset();
238
+	LL_RCC_ReleaseBackupDomainReset();
239
+	LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW);
240
+
241
+	LL_RCC_MSI_EnableRangeSelection();
242
+	LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6);
243
+	LL_RCC_MSI_SetCalibTrimming(0);
244
+	//  LL_RCC_MSI_EnablePLLMode();
245
+
246
+	LL_RCC_LSE_Enable();
247
+
248
+	/* Wait till LSE is ready */
249
+	while(LL_RCC_LSE_IsReady() != 1)
250
+	{
251
+
252
+	}
253
+	LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE);
254
+	LL_RCC_EnableRTC();
255
+
256
+	LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4);
257
+	LL_RCC_PLL_EnableDomain_SYS();
258
+	LL_RCC_PLL_Enable();
259
+
260
+	/* Wait till PLL is ready */
261
+	while(LL_RCC_PLL_IsReady() != 1)
262
+	{
263
+
264
+	}
265
+	LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL);
266
+
267
+	/* Wait till System clock is ready */
268
+	while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL)
269
+	{
270
+
271
+	}
272
+	LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1);
273
+	LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1);
274
+	LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1);
275
+	LL_SetSystemCoreClock(24000000);
276
+
277
+	/* Update the time base */
278
+	if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK)
279
+	{
280
+		//    Error_Handler();
281
+	}
282
+}
283
+
284
+
285
+void SystemClock_Config_80M(void)
286
+{
287
+	LL_FLASH_SetLatency(LL_FLASH_LATENCY_4);
288
+	while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_4)
289
+	{
290
+	}
291
+	LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1);
292
+	LL_RCC_MSI_Enable();
293
+
294
+	/* Wait till MSI is ready */
295
+	while(LL_RCC_MSI_IsReady() != 1)
296
+	{
297
+
298
+	}
299
+	LL_RCC_MSI_EnableRangeSelection();
300
+	LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6);
301
+	LL_RCC_MSI_SetCalibTrimming(0);
302
+	LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 40, LL_RCC_PLLR_DIV_2);
303
+	LL_RCC_PLL_EnableDomain_SYS();
304
+	LL_RCC_PLL_Enable();
305
+
306
+	/* Wait till PLL is ready */
307
+	while(LL_RCC_PLL_IsReady() != 1)
308
+	{
309
+
310
+	}
311
+	LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL);
312
+
313
+	/* Wait till System clock is ready */
314
+	while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL)
315
+	{
316
+
317
+	}
318
+	LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1);
319
+	LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1);
320
+	LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1);
321
+	LL_SetSystemCoreClock(80000000);
322
+
323
+	/* Update the time base */
324
+	if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK)
325
+	{
326
+		//    Error_Handler();
327
+	}
328
+}
329
+
330
+// partie commune a toutes les utilisations du wakeup timer
331
+static void RTC_wakeup_init( int delay )
332
+{
333
+LL_RTC_DisableWriteProtection( RTC );
334
+LL_RTC_WAKEUP_Disable( RTC );
335
+while	( !LL_RTC_IsActiveFlag_WUTW( RTC ) )
336
+	{ }
337
+// connecter le timer a l'horloge 1Hz de la RTC
338
+LL_RTC_WAKEUP_SetClock( RTC, LL_RTC_WAKEUPCLOCK_CKSPRE );
339
+// fixer la duree de temporisation
340
+LL_RTC_WAKEUP_SetAutoReload( RTC, delay );	// 16 bits
341
+LL_RTC_ClearFlag_WUT(RTC);
342
+LL_RTC_EnableIT_WUT(RTC);
343
+LL_RTC_WAKEUP_Enable(RTC);
344
+LL_RTC_EnableWriteProtection(RTC);
345
+}
346
+
347
+// Dans le cas des modes STANDBY et SHUTDOWN, le MPU sera reveille par reset
348
+// causé par 1 wakeup line (interne ou externe) (le NVIC n'est plus alimenté)
349
+void RTC_wakeup_init_from_standby_or_shutdown( int delay )
350
+{
351
+RTC_wakeup_init( delay );
352
+// enable the Internal Wake-up line
353
+LL_PWR_EnableInternWU();	// ceci ne concerne que Standby et Shutdown, pas STOPx
354
+}
355
+
356
+// Dans le cas des modes STOPx, le MPU sera reveille par interruption
357
+// le module EXTI et une partie du NVIC sont encore alimentes
358
+// le contenu de la RAM et des registres étant préservé, le MPU
359
+// reprend l'execution après l'instruction WFI
360
+void RTC_wakeup_init_from_stop( int delay )
361
+{
362
+RTC_wakeup_init( delay );
363
+// valider l'interrupt par la ligne 20 du module EXTI, qui est réservée au wakeup timer
364
+LL_EXTI_EnableIT_0_31( LL_EXTI_LINE_20 );
365
+LL_EXTI_EnableRisingTrig_0_31( LL_EXTI_LINE_20 );
366
+// valider l'interrupt chez NVIC
367
+NVIC_SetPriority( RTC_WKUP_IRQn, 1 );
368
+NVIC_EnableIRQ( RTC_WKUP_IRQn );
369
+}
370
+
371
+// wakeup timer interrupt Handler (inutile mais doit etre defini)
372
+void RTC_WKUP_IRQHandler()
373
+{
374
+LL_EXTI_ClearFlag_0_31( LL_EXTI_LINE_20 );
375
+}

+ 374
- 0
PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/6a/90238ac18f29001b114bfff082d965b2 View File

@@ -0,0 +1,374 @@
1
+/* Project L476_ats_blink for STM32L476 mounted on Nucleo board:
2
+ * the user LED (mounted on pin PA-5) is flashed every second for 50 ms.
3
+ * The time base is provided by Systick (1000 ticks per second).
4
+ * The clock configuration is the default one (Sysclk = 80 MHz, derived from MSI and PLL).
5
+ */
6
+
7
+/* Includes ------------------------------------------------------------------*/
8
+#include "main.h"
9
+// #if defined(USE_FULL_ASSERT)
10
+// #include "stm32_assert.h"
11
+// #endif /* USE_FULL_ASSERT */
12
+
13
+#include "gpio.h"
14
+
15
+// systick interrupt handler
16
+volatile uint32_t msTicks = 0;
17
+volatile uint8_t expe = 0;
18
+volatile uint8_t blue_mode = 0;
19
+
20
+void SysTick_Handler()
21
+{
22
+	if	( BLUE_BUTTON() ){
23
+		blue_mode = 1 ;
24
+	}
25
+
26
+	msTicks++;                                                /* See startup file startup_LPC17xx.s for SysTick vector */
27
+	if (msTicks == 5 * expe){
28
+		LED_GREEN(0);
29
+	}else if(msTicks >= 200){
30
+		msTicks = 0;
31
+		LED_GREEN(1);
32
+	}
33
+	if(expe == 2 || expe == 4){
34
+		CLK_TOGGLE();
35
+	}
36
+}
37
+
38
+
39
+
40
+
41
+int main(void)
42
+{
43
+
44
+
45
+	// config GPIO
46
+	GPIO_init();
47
+
48
+//	if (RCC->BDCR & RCC_BDCR_LSEON) {
49
+		LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
50
+		LL_PWR_EnableBkUpAccess();
51
+
52
+		//expe = register RTC
53
+		expe = RTC->BKP0R;
54
+		if (expe == 0) {
55
+			SystemClock_Config_24M_LSE();
56
+			expe = 1;
57
+			LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
58
+			LL_PWR_EnableBkUpAccess();
59
+			RTC->BKP0R = expe;
60
+		}
61
+
62
+		if (BLUE_BUTTON()){
63
+
64
+			expe ++;
65
+			blue_mode = 0;
66
+			if (expe > 8) expe = 1;
67
+			RTC->BKP0R = expe;
68
+		}
69
+//	}else{
70
+
71
+//	}
72
+	LL_PWR_DisableBkUpAccess();
73
+	switch(expe){
74
+	case 1:
75
+
76
+		/* Configure the system clock */
77
+		SystemClock_Config_80M();
78
+		//Setup Sleep mode
79
+		LL_LPM_EnableSleep();
80
+		break;
81
+	case 2:
82
+		/* Configure the system clock */
83
+		SystemClock_Config_24M_LSE();
84
+		break;
85
+	case 3:
86
+		SystemClock_Config_24M_LSE_FL3_VS2();
87
+		LL_LPM_EnableSleep();
88
+		break;
89
+	case 4:
90
+		SystemClock_Config_24M_LSE_FL3_VS2();
91
+	case 5:
92
+		SystemClock_Config_24M_LSE_FL3_VS2();
93
+		LL_PWR_SetPowerMode(LL_PWR_MODE_STOP0);
94
+		LL_LPM_EnableDeepSleep();
95
+		break;
96
+	case 6:
97
+		SystemClock_Config_24M_LSE_FL3_VS2();
98
+		LL_PWR_SetPowerMode(LL_PWR_MODE_STOP1);
99
+		LL_LPM_EnableDeepSleep();
100
+		break;
101
+	case 7:
102
+		SystemClock_Config_24M_LSE_FL3_VS2();
103
+		LL_PWR_SetPowerMode(LL_PWR_MODE_STOP2);
104
+		LL_LPM_EnableDeepSleep();
105
+		break;
106
+	case 8:
107
+		SystemClock_Config_24M_LSE_FL3_VS2();
108
+		LL_PWR_SetPowerMode(LL_PWR_MODE_SHUTDOWN);
109
+		LL_LPM_EnableDeepSleep();
110
+		break;
111
+	}
112
+
113
+
114
+	// init systick timer (tick period at 1 ms)
115
+	LL_Init1msTick( SystemCoreClock );
116
+	LL_SYSTICK_EnableIT();
117
+
118
+
119
+	//LL_LPM_EnableSleepOnExit();
120
+
121
+	while (1)  {
122
+		if (blue_mode){
123
+			switch(expe){
124
+			case 5:
125
+			case 6:
126
+			case 7:
127
+				RTC_wakeup_init_from_stop(20);
128
+				__WFI();
129
+				blue_mode = 0;
130
+				break;
131
+			case 8:
132
+				RTC_wakeup_init_from_standby_or_shutdown(10);
133
+			case 1:
134
+			case 3:
135
+				__WFI();
136
+				break;
137
+			case 2:
138
+			case 4:
139
+				LL_RCC_MSI_EnablePLLMode();
140
+				break;
141
+			}
142
+		}else{
143
+				if (expe > 4) {
144
+					LL_LPM_EnableSleep();
145
+					__WFI();
146
+				}
147
+		}
148
+	}
149
+
150
+
151
+void SystemClock_Config_24M_LSE_FL3_VS2(void){
152
+	LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
153
+	LL_FLASH_SetLatency(LL_FLASH_LATENCY_3);
154
+	while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_3)
155
+	{
156
+	}
157
+	LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE2);
158
+	LL_RCC_MSI_Enable();
159
+
160
+	/* Wait till MSI is ready */
161
+	while(LL_RCC_MSI_IsReady() != 1)
162
+	{
163
+
164
+	}
165
+
166
+	LL_PWR_EnableBkUpAccess();
167
+//	LL_RCC_ForceBackupDomainReset();
168
+	LL_RCC_ReleaseBackupDomainReset();
169
+	LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW);
170
+
171
+	LL_RCC_MSI_EnableRangeSelection();
172
+	LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6);
173
+	LL_RCC_MSI_SetCalibTrimming(0);
174
+	//  LL_RCC_MSI_EnablePLLMode();
175
+
176
+	LL_RCC_LSE_Enable();
177
+
178
+	/* Wait till LSE is ready */
179
+	while(LL_RCC_LSE_IsReady() != 1)
180
+	{
181
+
182
+	}
183
+	LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE);
184
+	LL_RCC_EnableRTC();
185
+
186
+	LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4);
187
+	LL_RCC_PLL_EnableDomain_SYS();
188
+	LL_RCC_PLL_Enable();
189
+
190
+	/* Wait till PLL is ready */
191
+	while(LL_RCC_PLL_IsReady() != 1)
192
+	{
193
+
194
+	}
195
+	LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL);
196
+
197
+	/* Wait till System clock is ready */
198
+	while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL)
199
+	{
200
+
201
+	}
202
+	LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1);
203
+	LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1);
204
+	LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1);
205
+	LL_SetSystemCoreClock(24000000);
206
+
207
+	/* Update the time base */
208
+	if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK)
209
+	{
210
+		//    Error_Handler();
211
+	}
212
+}
213
+
214
+/**
215
+ * @brief System Clock Configuration
216
+ * @retval None
217
+ * 24Mhz + RTC + LSE
218
+ */
219
+void SystemClock_Config_24M_LSE(void)
220
+{
221
+	LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
222
+	LL_FLASH_SetLatency(LL_FLASH_LATENCY_1);
223
+	while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_1)
224
+	{
225
+	}
226
+	LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1);
227
+	LL_RCC_MSI_Enable();
228
+
229
+	/* Wait till MSI is ready */
230
+	while(LL_RCC_MSI_IsReady() != 1)
231
+	{
232
+
233
+	}
234
+
235
+	LL_PWR_EnableBkUpAccess();
236
+//	LL_RCC_ForceBackupDomainReset();
237
+	LL_RCC_ReleaseBackupDomainReset();
238
+	LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW);
239
+
240
+	LL_RCC_MSI_EnableRangeSelection();
241
+	LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6);
242
+	LL_RCC_MSI_SetCalibTrimming(0);
243
+	//  LL_RCC_MSI_EnablePLLMode();
244
+
245
+	LL_RCC_LSE_Enable();
246
+
247
+	/* Wait till LSE is ready */
248
+	while(LL_RCC_LSE_IsReady() != 1)
249
+	{
250
+
251
+	}
252
+	LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE);
253
+	LL_RCC_EnableRTC();
254
+
255
+	LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4);
256
+	LL_RCC_PLL_EnableDomain_SYS();
257
+	LL_RCC_PLL_Enable();
258
+
259
+	/* Wait till PLL is ready */
260
+	while(LL_RCC_PLL_IsReady() != 1)
261
+	{
262
+
263
+	}
264
+	LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL);
265
+
266
+	/* Wait till System clock is ready */
267
+	while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL)
268
+	{
269
+
270
+	}
271
+	LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1);
272
+	LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1);
273
+	LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1);
274
+	LL_SetSystemCoreClock(24000000);
275
+
276
+	/* Update the time base */
277
+	if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK)
278
+	{
279
+		//    Error_Handler();
280
+	}
281
+}
282
+
283
+
284
+void SystemClock_Config_80M(void)
285
+{
286
+	LL_FLASH_SetLatency(LL_FLASH_LATENCY_4);
287
+	while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_4)
288
+	{
289
+	}
290
+	LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1);
291
+	LL_RCC_MSI_Enable();
292
+
293
+	/* Wait till MSI is ready */
294
+	while(LL_RCC_MSI_IsReady() != 1)
295
+	{
296
+
297
+	}
298
+	LL_RCC_MSI_EnableRangeSelection();
299
+	LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6);
300
+	LL_RCC_MSI_SetCalibTrimming(0);
301
+	LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 40, LL_RCC_PLLR_DIV_2);
302
+	LL_RCC_PLL_EnableDomain_SYS();
303
+	LL_RCC_PLL_Enable();
304
+
305
+	/* Wait till PLL is ready */
306
+	while(LL_RCC_PLL_IsReady() != 1)
307
+	{
308
+
309
+	}
310
+	LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL);
311
+
312
+	/* Wait till System clock is ready */
313
+	while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL)
314
+	{
315
+
316
+	}
317
+	LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1);
318
+	LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1);
319
+	LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1);
320
+	LL_SetSystemCoreClock(80000000);
321
+
322
+	/* Update the time base */
323
+	if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK)
324
+	{
325
+		//    Error_Handler();
326
+	}
327
+}
328
+
329
+// partie commune a toutes les utilisations du wakeup timer
330
+static void RTC_wakeup_init( int delay )
331
+{
332
+LL_RTC_DisableWriteProtection( RTC );
333
+LL_RTC_WAKEUP_Disable( RTC );
334
+while	( !LL_RTC_IsActiveFlag_WUTW( RTC ) )
335
+	{ }
336
+// connecter le timer a l'horloge 1Hz de la RTC
337
+LL_RTC_WAKEUP_SetClock( RTC, LL_RTC_WAKEUPCLOCK_CKSPRE );
338
+// fixer la duree de temporisation
339
+LL_RTC_WAKEUP_SetAutoReload( RTC, delay );	// 16 bits
340
+LL_RTC_ClearFlag_WUT(RTC);
341
+LL_RTC_EnableIT_WUT(RTC);
342
+LL_RTC_WAKEUP_Enable(RTC);
343
+LL_RTC_EnableWriteProtection(RTC);
344
+}
345
+
346
+// Dans le cas des modes STANDBY et SHUTDOWN, le MPU sera reveille par reset
347
+// causé par 1 wakeup line (interne ou externe) (le NVIC n'est plus alimenté)
348
+void RTC_wakeup_init_from_standby_or_shutdown( int delay )
349
+{
350
+RTC_wakeup_init( delay );
351
+// enable the Internal Wake-up line
352
+LL_PWR_EnableInternWU();	// ceci ne concerne que Standby et Shutdown, pas STOPx
353
+}
354
+
355
+// Dans le cas des modes STOPx, le MPU sera reveille par interruption
356
+// le module EXTI et une partie du NVIC sont encore alimentes
357
+// le contenu de la RAM et des registres étant préservé, le MPU
358
+// reprend l'execution après l'instruction WFI
359
+void RTC_wakeup_init_from_stop( int delay )
360
+{
361
+RTC_wakeup_init( delay );
362
+// valider l'interrupt par la ligne 20 du module EXTI, qui est réservée au wakeup timer
363
+LL_EXTI_EnableIT_0_31( LL_EXTI_LINE_20 );
364
+LL_EXTI_EnableRisingTrig_0_31( LL_EXTI_LINE_20 );
365
+// valider l'interrupt chez NVIC
366
+NVIC_SetPriority( RTC_WKUP_IRQn, 1 );
367
+NVIC_EnableIRQ( RTC_WKUP_IRQn );
368
+}
369
+
370
+// wakeup timer interrupt Handler (inutile mais doit etre defini)
371
+void RTC_WKUP_IRQHandler()
372
+{
373
+LL_EXTI_ClearFlag_0_31( LL_EXTI_LINE_20 );
374
+}

+ 374
- 0
PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/6e/00dce5a28e29001b114bfff082d965b2 View File

@@ -0,0 +1,374 @@
1
+/* Project L476_ats_blink for STM32L476 mounted on Nucleo board:
2
+ * the user LED (mounted on pin PA-5) is flashed every second for 50 ms.
3
+ * The time base is provided by Systick (1000 ticks per second).
4
+ * The clock configuration is the default one (Sysclk = 80 MHz, derived from MSI and PLL).
5
+ */
6
+
7
+/* Includes ------------------------------------------------------------------*/
8
+#include "main.h"
9
+// #if defined(USE_FULL_ASSERT)
10
+// #include "stm32_assert.h"
11
+// #endif /* USE_FULL_ASSERT */
12
+
13
+#include "gpio.h"
14
+
15
+// systick interrupt handler
16
+volatile uint32_t msTicks = 0;
17
+volatile uint8_t expe = 0;
18
+volatile uint8_t blue_mode = 0;
19
+
20
+void SysTick_Handler()
21
+{
22
+	if	( BLUE_BUTTON() ){
23
+		blue_mode = 1 ;
24
+	}
25
+
26
+	msTicks++;                                                /* See startup file startup_LPC17xx.s for SysTick vector */
27
+	if (msTicks == 5 * expe){
28
+		LED_GREEN(0);
29
+	}else if(msTicks >= 200){
30
+		msTicks = 0;
31
+		LED_GREEN(1);
32
+	}
33
+	if(expe == 2 || expe == 4){
34
+		CLK_TOGGLE();
35
+	}
36
+}
37
+
38
+
39
+
40
+
41
+int main(void)
42
+{
43
+
44
+
45
+	// config GPIO
46
+	GPIO_init();
47
+
48
+//	if (RCC->BDCR & RCC_BDCR_LSEON) {
49
+		LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
50
+		LL_PWR_EnableBkUpAccess();
51
+
52
+		//expe = register RTC
53
+		expe = RTC->BKP0R;
54
+		if (expe == 0) {
55
+			SystemClock_Config_24M_LSE();
56
+			expe = 1;
57
+			LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
58
+			LL_PWR_EnableBkUpAccess();
59
+			RTC->BKP0R = expe;
60
+		}
61
+
62
+		if (BLUE_BUTTON()){
63
+
64
+			expe ++;
65
+
66
+			if (expe > 8) expe = 1;
67
+			RTC->BKP0R = expe;
68
+		}
69
+//	}else{
70
+
71
+//	}
72
+	LL_PWR_DisableBkUpAccess();
73
+	switch(expe){
74
+	case 1:
75
+
76
+		/* Configure the system clock */
77
+		SystemClock_Config_80M();
78
+		//Setup Sleep mode
79
+		LL_LPM_EnableSleep();
80
+		break;
81
+	case 2:
82
+		/* Configure the system clock */
83
+		SystemClock_Config_24M_LSE();
84
+		break;
85
+	case 3:
86
+		SystemClock_Config_24M_LSE_FL3_VS2();
87
+		LL_LPM_EnableSleep();
88
+		break;
89
+	case 4:
90
+		SystemClock_Config_24M_LSE_FL3_VS2();
91
+	case 5:
92
+		SystemClock_Config_24M_LSE_FL3_VS2();
93
+		RTC_wakeup_init_from_stop(20);
94
+		LL_PWR_SetPowerMode(LL_PWR_MODE_STOP0);
95
+		LL_LPM_EnableDeepSleep();
96
+		break;
97
+	case 6:
98
+		SystemClock_Config_24M_LSE_FL3_VS2();
99
+		RTC_wakeup_init_from_stop(20);
100
+		LL_PWR_SetPowerMode(LL_PWR_MODE_STOP1);
101
+		LL_LPM_EnableDeepSleep();
102
+		break;
103
+	case 7:
104
+		SystemClock_Config_24M_LSE_FL3_VS2();
105
+		RTC_wakeup_init_from_stop(20);
106
+		LL_PWR_SetPowerMode(LL_PWR_MODE_STOP2);
107
+		LL_LPM_EnableDeepSleep();
108
+		break;
109
+	case 8:
110
+		SystemClock_Config_24M_LSE_FL3_VS2();
111
+		RTC_wakeup_init_from_standby_or_shutdown(10);
112
+		LL_PWR_SetPowerMode(LL_PWR_MODE_SHUTDOWN);
113
+		LL_LPM_EnableDeepSleep();
114
+		break;
115
+	}
116
+
117
+
118
+	// init systick timer (tick period at 1 ms)
119
+	LL_Init1msTick( SystemCoreClock );
120
+	LL_SYSTICK_EnableIT();
121
+
122
+
123
+	//LL_LPM_EnableSleepOnExit();
124
+
125
+	while (1)  {
126
+		if (blue_mode){
127
+			switch(expe){
128
+			case 5:
129
+			case 6:
130
+			case 7:
131
+				__WFI();
132
+				blue_mode = 0;
133
+				break;
134
+			case 1:
135
+			case 3:
136
+			case 8:
137
+				__WFI();
138
+				break;
139
+			case 2:
140
+			case 4:
141
+				LL_RCC_MSI_EnablePLLMode();
142
+				break;
143
+
144
+
145
+			}
146
+
147
+		}
148
+	}
149
+}
150
+
151
+void SystemClock_Config_24M_LSE_FL3_VS2(void){
152
+	LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
153
+	LL_FLASH_SetLatency(LL_FLASH_LATENCY_3);
154
+	while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_3)
155
+	{
156
+	}
157
+	LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE2);
158
+	LL_RCC_MSI_Enable();
159
+
160
+	/* Wait till MSI is ready */
161
+	while(LL_RCC_MSI_IsReady() != 1)
162
+	{
163
+
164
+	}
165
+
166
+	LL_PWR_EnableBkUpAccess();
167
+//	LL_RCC_ForceBackupDomainReset();
168
+	LL_RCC_ReleaseBackupDomainReset();
169
+	LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW);
170
+
171
+	LL_RCC_MSI_EnableRangeSelection();
172
+	LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6);
173
+	LL_RCC_MSI_SetCalibTrimming(0);
174
+	//  LL_RCC_MSI_EnablePLLMode();
175
+
176
+	LL_RCC_LSE_Enable();
177
+
178
+	/* Wait till LSE is ready */
179
+	while(LL_RCC_LSE_IsReady() != 1)
180
+	{
181
+
182
+	}
183
+	LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE);
184
+	LL_RCC_EnableRTC();
185
+
186
+	LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4);
187
+	LL_RCC_PLL_EnableDomain_SYS();
188
+	LL_RCC_PLL_Enable();
189
+
190
+	/* Wait till PLL is ready */
191
+	while(LL_RCC_PLL_IsReady() != 1)
192
+	{
193
+
194
+	}
195
+	LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL);
196
+
197
+	/* Wait till System clock is ready */
198
+	while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL)
199
+	{
200
+
201
+	}
202
+	LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1);
203
+	LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1);
204
+	LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1);
205
+	LL_SetSystemCoreClock(24000000);
206
+
207
+	/* Update the time base */
208
+	if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK)
209
+	{
210
+		//    Error_Handler();
211
+	}
212
+}
213
+
214
+/**
215
+ * @brief System Clock Configuration
216
+ * @retval None
217
+ * 24Mhz + RTC + LSE
218
+ */
219
+void SystemClock_Config_24M_LSE(void)
220
+{
221
+	LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
222
+	LL_FLASH_SetLatency(LL_FLASH_LATENCY_1);
223
+	while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_1)
224
+	{
225
+	}
226
+	LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1);
227
+	LL_RCC_MSI_Enable();
228
+
229
+	/* Wait till MSI is ready */
230
+	while(LL_RCC_MSI_IsReady() != 1)
231
+	{
232
+
233
+	}
234
+
235
+	LL_PWR_EnableBkUpAccess();
236
+//	LL_RCC_ForceBackupDomainReset();
237
+	LL_RCC_ReleaseBackupDomainReset();
238
+	LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW);
239
+
240
+	LL_RCC_MSI_EnableRangeSelection();
241
+	LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6);
242
+	LL_RCC_MSI_SetCalibTrimming(0);
243
+	//  LL_RCC_MSI_EnablePLLMode();
244
+
245
+	LL_RCC_LSE_Enable();
246
+
247
+	/* Wait till LSE is ready */
248
+	while(LL_RCC_LSE_IsReady() != 1)
249
+	{
250
+
251
+	}
252
+	LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE);
253
+	LL_RCC_EnableRTC();
254
+
255
+	LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4);
256
+	LL_RCC_PLL_EnableDomain_SYS();
257
+	LL_RCC_PLL_Enable();
258
+
259
+	/* Wait till PLL is ready */
260
+	while(LL_RCC_PLL_IsReady() != 1)
261
+	{
262
+
263
+	}
264
+	LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL);
265
+
266
+	/* Wait till System clock is ready */
267
+	while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL)
268
+	{
269
+
270
+	}
271
+	LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1);
272
+	LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1);
273
+	LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1);
274
+	LL_SetSystemCoreClock(24000000);
275
+
276
+	/* Update the time base */
277
+	if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK)
278
+	{
279
+		//    Error_Handler();
280
+	}
281
+}
282
+
283
+
284
+void SystemClock_Config_80M(void)
285
+{
286
+	LL_FLASH_SetLatency(LL_FLASH_LATENCY_4);
287
+	while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_4)
288
+	{
289
+	}
290
+	LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1);
291
+	LL_RCC_MSI_Enable();
292
+
293
+	/* Wait till MSI is ready */
294
+	while(LL_RCC_MSI_IsReady() != 1)
295
+	{
296
+
297
+	}
298
+	LL_RCC_MSI_EnableRangeSelection();
299
+	LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6);
300
+	LL_RCC_MSI_SetCalibTrimming(0);
301
+	LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 40, LL_RCC_PLLR_DIV_2);
302
+	LL_RCC_PLL_EnableDomain_SYS();
303
+	LL_RCC_PLL_Enable();
304
+
305
+	/* Wait till PLL is ready */
306
+	while(LL_RCC_PLL_IsReady() != 1)
307
+	{
308
+
309
+	}
310
+	LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL);
311
+
312
+	/* Wait till System clock is ready */
313
+	while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL)
314
+	{
315
+
316
+	}
317
+	LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1);
318
+	LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1);
319
+	LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1);
320
+	LL_SetSystemCoreClock(80000000);
321
+
322
+	/* Update the time base */
323
+	if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK)
324
+	{
325
+		//    Error_Handler();
326
+	}
327
+}
328
+
329
+// partie commune a toutes les utilisations du wakeup timer
330
+static void RTC_wakeup_init( int delay )
331
+{
332
+LL_RTC_DisableWriteProtection( RTC );
333
+LL_RTC_WAKEUP_Disable( RTC );
334
+while	( !LL_RTC_IsActiveFlag_WUTW( RTC ) )
335
+	{ }
336
+// connecter le timer a l'horloge 1Hz de la RTC
337
+LL_RTC_WAKEUP_SetClock( RTC, LL_RTC_WAKEUPCLOCK_CKSPRE_WUT );
338
+// fixer la duree de temporisation
339
+LL_RTC_WAKEUP_SetAutoReload( RTC, delay );	// 16 bits
340
+LL_RTC_ClearFlag_WUT(RTC);
341
+LL_RTC_EnableIT_WUT(RTC);
342
+LL_RTC_WAKEUP_Enable(RTC);
343
+LL_RTC_EnableWriteProtection(RTC);
344
+}
345
+
346
+// Dans le cas des modes STANDBY et SHUTDOWN, le MPU sera reveille par reset
347
+// causé par 1 wakeup line (interne ou externe) (le NVIC n'est plus alimenté)
348
+void RTC_wakeup_init_from_standby_or_shutdown( int delay )
349
+{
350
+RTC_wakeup_init( delay );
351
+// enable the Internal Wake-up line
352
+LL_PWR_EnableInternWU();	// ceci ne concerne que Standby et Shutdown, pas STOPx
353
+}
354
+
355
+// Dans le cas des modes STOPx, le MPU sera reveille par interruption
356
+// le module EXTI et une partie du NVIC sont encore alimentes
357
+// le contenu de la RAM et des registres étant préservé, le MPU
358
+// reprend l'execution après l'instruction WFI
359
+void RTC_wakeup_init_from_stop( int delay )
360
+{
361
+RTC_wakeup_init( delay );
362
+// valider l'interrupt par la ligne 20 du module EXTI, qui est réservée au wakeup timer
363
+LL_EXTI_EnableIT_0_31( LL_EXTI_LINE_20 );
364
+LL_EXTI_EnableRisingTrig_0_31( LL_EXTI_LINE_20 );
365
+// valider l'interrupt chez NVIC
366
+NVIC_SetPriority( RTC_WKUP_IRQn, 1 );
367
+NVIC_EnableIRQ( RTC_WKUP_IRQn );
368
+}
369
+
370
+// wakeup timer interrupt Handler (inutile mais doit etre defini)
371
+void RTC_WKUP_IRQHandler()
372
+{
373
+LL_EXTI_ClearFlag_0_31( LL_EXTI_LINE_20 );
374
+}

PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/a1/e0477108b728001b1d0af99b6389052e → PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/7/b0023af78729001b114bfff082d965b2 View File

@@ -30,7 +30,7 @@ void SysTick_Handler()
30 30
 		msTicks = 0;
31 31
 		LED_GREEN(1);
32 32
 	}
33
-	if(expe == 2){
33
+	if(expe == 2 || expe == 4){
34 34
 		CLK_TOGGLE();
35 35
 	}
36 36
 }
@@ -63,7 +63,7 @@ int main(void)
63 63
 
64 64
 			expe ++;
65 65
 
66
-			if (expe > 2) expe = 1;
66
+			if (expe > 7) expe = 1;
67 67
 			RTC->BKP0R = expe;
68 68
 		}
69 69
 //	}else{
@@ -79,6 +79,9 @@ int main(void)
79 79
 		/* Configure the system clock */
80 80
 		SystemClock_Config_24M_LSE();
81 81
 		break;
82
+	default: //case 3 to 8
83
+		SystemClock_Config_24M_LSE_FL3_VS2();
84
+		break;
82 85
 	}
83 86
 
84 87
 
@@ -94,17 +97,85 @@ int main(void)
94 97
 		if (blue_mode){
95 98
 			switch(expe){
96 99
 			case 1:
100
+			case 3:
97 101
 				__WFI();
98 102
 				break;
103
+
99 104
 			case 2:
105
+			case 4:
100 106
 				LL_RCC_MSI_EnablePLLMode();
101 107
 				break;
108
+
109
+
102 110
 			}
103 111
 
104 112
 		}
105 113
 	}
106 114
 }
107 115
 
116
+void SystemClock_Config_24M_LSE_FL3_VS2(void){
117
+	LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
118
+	LL_FLASH_SetLatency(LL_FLASH_LATENCY_3);
119
+	while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_3)
120
+	{
121
+	}
122
+	LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE2);
123
+	LL_RCC_MSI_Enable();
124
+
125
+	/* Wait till MSI is ready */
126
+	while(LL_RCC_MSI_IsReady() != 1)
127
+	{
128
+
129
+	}
130
+
131
+	LL_PWR_EnableBkUpAccess();
132
+//	LL_RCC_ForceBackupDomainReset();
133
+	LL_RCC_ReleaseBackupDomainReset();
134
+	LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW);
135
+
136
+	LL_RCC_MSI_EnableRangeSelection();
137
+	LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6);
138
+	LL_RCC_MSI_SetCalibTrimming(0);
139
+	//  LL_RCC_MSI_EnablePLLMode();
140
+
141
+	LL_RCC_LSE_Enable();
142
+
143
+	/* Wait till LSE is ready */
144
+	while(LL_RCC_LSE_IsReady() != 1)
145
+	{
146
+
147
+	}
148
+	LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE);
149
+	LL_RCC_EnableRTC();
150
+
151
+	LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4);
152
+	LL_RCC_PLL_EnableDomain_SYS();
153
+	LL_RCC_PLL_Enable();
154
+
155
+	/* Wait till PLL is ready */
156
+	while(LL_RCC_PLL_IsReady() != 1)
157
+	{
158
+
159
+	}
160
+	LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL);
161
+
162
+	/* Wait till System clock is ready */
163
+	while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL)
164
+	{
165
+
166
+	}
167
+	LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1);
168
+	LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1);
169
+	LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1);
170
+	LL_SetSystemCoreClock(24000000);
171
+
172
+	/* Update the time base */
173
+	if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK)
174
+	{
175
+		//    Error_Handler();
176
+	}
177
+}
178
+
108 179
 /**
109 180
  * @brief System Clock Configuration
110 181
  * @retval None
@@ -219,3 +290,50 @@ void SystemClock_Config_80M(void)
219 290
 		//    Error_Handler();
220 291
 	}
221 292
 }
293
+
294
+// partie commune a toutes les utilisations du wakeup timer
295
+static void RTC_wakeup_init( int delay )
296
+{
297
+LL_RTC_DisableWriteProtection( RTC );
298
+LL_RTC_WAKEUP_Disable( RTC );
299
+while	( !LL_RTC_IsActiveFlag_WUTW( RTC ) )
300
+	{ }
301
+// connecter le timer a l'horloge 1Hz de la RTC
302
+LL_RTC_WAKEUP_SetClock( RTC, LL_RTC_WAKEUPCLOCK_CKSPRE );
303
+// fixer la duree de temporisation
304
+LL_RTC_WAKEUP_SetAutoReload( RTC, delay );	// 16 bits
305
+LL_RTC_ClearFlag_WUT(RTC);
306
+LL_RTC_EnableIT_WUT(RTC);
307
+LL_RTC_WAKEUP_Enable(RTC);
308
+LL_RTC_EnableWriteProtection(RTC);
309
+}
310
+
311
+// Dans le cas des modes STANDBY et SHUTDOWN, le MPU sera reveille par reset
312
+// causé par 1 wakeup line (interne ou externe) (le NVIC n'est plus alimenté)
313
+void RTC_wakeup_init_from_standby_or_shutdown( int delay )
314
+{
315
+RTC_wakeup_init( delay );
316
+// enable the Internal Wake-up line
317
+LL_PWR_EnableInternWU();	// ceci ne concerne que Standby et Shutdown, pas STOPx
318
+}
319
+
320
+// Dans le cas des modes STOPx, le MPU sera reveille par interruption
321
+// le module EXTI et une partie du NVIC sont encore alimentes
322
+// le contenu de la RAM et des registres étant préservé, le MPU
323
+// reprend l'execution après l'instruction WFI
324
+void RTC_wakeup_init_from_stop( int delay )
325
+{
326
+RTC_wakeup_init( delay );
327
+// valider l'interrupt par la ligne 20 du module EXTI, qui est réservée au wakeup timer
328
+LL_EXTI_EnableIT_0_31( LL_EXTI_LINE_20 );
329
+LL_EXTI_EnableRisingTrig_0_31( LL_EXTI_LINE_20 );
330
+// valider l'interrupt chez NVIC
331
+NVIC_SetPriority( RTC_WKUP_IRQn, 1 );
332
+NVIC_EnableIRQ( RTC_WKUP_IRQn );
333
+}
334
+
335
+// wakeup timer interrupt Handler (inutile mais doit etre defini)
336
+void RTC_WKUP_IRQHandler()
337
+{
338
+LL_EXTI_ClearFlag_0_31( LL_EXTI_LINE_20 );
339
+}

+ 0
- 215
PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/8d/e087c036ae28001b1d0af99b6389052e View File

@@ -1,215 +0,0 @@
1
-/* Project L476_ats_blink for STM32L476 mounted on Nucleo board:
2
- * the user LED (mounted on pin PA-5) is flashed every second for 50 ms.
3
- * The time base is provided by Systick (1000 ticks per second).
4
- * The clock configuration is the default one (Sysclk = 80 MHz, derived from MSI and PLL).
5
- */
6
-
7
-/* Includes ------------------------------------------------------------------*/
8
-#include "main.h"
9
-// #if defined(USE_FULL_ASSERT)
10
-// #include "stm32_assert.h"
11
-// #endif /* USE_FULL_ASSERT */
12
-
13
-#include "gpio.h"
14
-
15
-// systick interrupt handler
16
-volatile uint32_t msTicks = 0;
17
-volatile uint8_t expe = 2;
18
-volatile uint8_t blue_mode = 0;
19
-
20
-void SysTick_Handler()
21
-{
22
-  if	( BLUE_BUTTON() ){
23
-			blue_mode = 1 ;
24
-  }
25
-
26
-  msTicks++;                                                /* See startup file startup_LPC17xx.s for SysTick vector */
27
-  if (msTicks == 5 * expe){
28
-	  LED_GREEN(0);
29
-  }else if(msTicks >= 200){
30
-	  msTicks = 0;
31
-	  LED_GREEN(1);
32
-  }
33
- if(expe == 2){
34
-	 CLK_TOGGLE();
35
- }
36
-}
37
-
38
-
39
-
40
-
41
-int main(void)
42
-{
43
-//	if (RCC->BDCR & RCC_BDCR_LSEON) {
44
-//			LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
45
-//			LL_PWR_EnableBkUpAccess();
46
-//
47
-//			//expe = register RTC
48
-//			expe = RTC->BKP0R;
49
-//			if (expe == 0){
50
-//				expe = 1;
51
-//				RTC->BKP0R = expe;
52
-//			}else if (expe != 0 && BLUE_BUTTON()){
53
-//				expe ++;
54
-//				RTC->BKP0R = expe;
55
-//			}
56
-//	}else{
57
-//		SystemClock_Config_24M_LSE();
58
-//		expe = 1;
59
-//		LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
60
-//		LL_PWR_EnableBkUpAccess();
61
-//		RTC->BKP0R = expe;
62
-//	}
63
-//	LL_PWR_DisableBkUpAccess();
64
-	switch(expe){
65
-			case 1:
66
-				/* Configure the system clock */
67
-				SystemClock_Config_80M();
68
-				break;
69
-			case 2:
70
-				/* Configure the system clock */
71
-				SystemClock_Config_24M_LSE();
72
-				break;
73
-			}
74
-
75
-
76
-
77
-
78
-// config GPIO
79
-GPIO_init();
80
-
81
-// init systick timer (tick period at 1 ms)
82
-LL_Init1msTick( SystemCoreClock );
83
-LL_SYSTICK_EnableIT();
84
-
85
-//Setup Sleep mode
86
-LL_LPM_EnableSleep();
87
-//LL_LPM_EnableSleepOnExit();
88
-
89
-while (1)  {
90
-	if (blue_mode){
91
-		switch(expe){
92
-					case 1:
93
-						__WFI();
94
-						break;
95
-					case 2:
96
-						LL_RCC_MSI_EnablePLLMode();
97
-						break;
98
-					}
99
-
100
-		}
101
-	}
102
-}
103
-
104
-/**
105
-  * @brief System Clock Configuration
106
-  * @retval None
107
-  * 24Mhz + RTC + LSE
108
-  */
109
-void SystemClock_Config_24M_LSE(void)
110
-{
111
-  LL_FLASH_SetLatency(LL_FLASH_LATENCY_1);
112
-  while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_1)
113
-  {
114
-  }
115
-  LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1);
116
-  LL_RCC_MSI_Enable();
117
-
118
-   /* Wait till MSI is ready */
119
-  while(LL_RCC_MSI_IsReady() != 1)
120
-  {
121
-
122
-  }
123
-  LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE);
124
-   LL_RCC_EnableRTC();
125
-  LL_RCC_LSE_Enable();
126
-
127
-    /* Wait till LSE is ready */
128
-   while(LL_RCC_LSE_IsReady() != 1)
129
-   {
130
-
131
-   }
132
-
133
-
134
-  LL_RCC_MSI_EnableRangeSelection();
135
-  LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6);
136
-  LL_RCC_MSI_SetCalibTrimming(0);
137
-//  LL_RCC_MSI_EnablePLLMode();
138
-  LL_PWR_EnableBkUpAccess();
139
-  LL_RCC_ForceBackupDomainReset();
140
-  LL_RCC_ReleaseBackupDomainReset();
141
-  LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW);
142
-
143
-  LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4);
144
-  LL_RCC_PLL_EnableDomain_SYS();
145
-  LL_RCC_PLL_Enable();
146
-
147
-   /* Wait till PLL is ready */
148
-  while(LL_RCC_PLL_IsReady() != 1)
149
-  {
150
-
151
-  }
152
-  LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL);
153
-
154
-   /* Wait till System clock is ready */
155
-  while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL)
156
-  {
157
-
158
-  }
159
-  LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1);
160
-  LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1);
161
-  LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1);
162
-  LL_SetSystemCoreClock(24000000);
163
-
164
-   /* Update the time base */
165
-  if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK)
166
-  {
167
-//    Error_Handler();
168
-  }
169
-}
170
-
171
-
172
-void SystemClock_Config_80M(void)
173
-{
174
-  LL_FLASH_SetLatency(LL_FLASH_LATENCY_4);
175
-  while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_4)
176
-  {
177
-  }
178
-  LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1);
179
-  LL_RCC_MSI_Enable();
180
-
181
-   /* Wait till MSI is ready */
182
-  while(LL_RCC_MSI_IsReady() != 1)
183
-  {
184
-
185
-  }
186
-  LL_RCC_MSI_EnableRangeSelection();
187
-  LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6);
188
-  LL_RCC_MSI_SetCalibTrimming(0);
189
-  LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 40, LL_RCC_PLLR_DIV_2);
190
-  LL_RCC_PLL_EnableDomain_SYS();
191
-  LL_RCC_PLL_Enable();
192
-
193
-   /* Wait till PLL is ready */
194
-  while(LL_RCC_PLL_IsReady() != 1)
195
-  {
196
-
197
-  }
198
-  LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL);
199
-
200
-   /* Wait till System clock is ready */
201
-  while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL)
202
-  {
203
-
204
-  }
205
-  LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1);
206
-  LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1);
207
-  LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1);
208
-  LL_SetSystemCoreClock(80000000);
209
-
210
-   /* Update the time base */
211
-  if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK)
212
-  {
213
-//    Error_Handler();
214
-  }
215
-}

+ 374
- 0
PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/aa/103a01f08a29001b114bfff082d965b2 View File

@@ -0,0 +1,374 @@
1
+/* Project L476_ats_blink for STM32L476 mounted on Nucleo board:
2
+ * the user LED (mounted on pin PA-5) is flashed every second for 50 ms.
3
+ * The time base is provided by Systick (1000 ticks per second).
4
+ * The clock configuration is the default one (Sysclk = 80 MHz, derived from MSI and PLL).
5
+ */
6
+
7
+/* Includes ------------------------------------------------------------------*/
8
+#include "main.h"
9
+// #if defined(USE_FULL_ASSERT)
10
+// #include "stm32_assert.h"
11
+// #endif /* USE_FULL_ASSERT */
12
+
13
+#include "gpio.h"
14
+
15
+// systick interrupt handler
16
+volatile uint32_t msTicks = 0;
17
+volatile uint8_t expe = 0;
18
+volatile uint8_t blue_mode = 0;
19
+
20
+void SysTick_Handler()
21
+{
22
+	if	( BLUE_BUTTON() ){
23
+		blue_mode = 1 ;
24
+	}
25
+
26
+	msTicks++;                                                /* See startup file startup_LPC17xx.s for SysTick vector */
27
+	if (msTicks == 5 * expe){
28
+		LED_GREEN(0);
29
+	}else if(msTicks >= 200){
30
+		msTicks = 0;
31
+		LED_GREEN(1);
32
+	}
33
+	if(expe == 2 || expe == 4){
34
+		CLK_TOGGLE();
35
+	}
36
+}
37
+
38
+
39
+
40
+
41
+int main(void)
42
+{
43
+
44
+
45
+	// config GPIO
46
+	GPIO_init();
47
+
48
+//	if (RCC->BDCR & RCC_BDCR_LSEON) {
49
+		LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
50
+		LL_PWR_EnableBkUpAccess();
51
+
52
+		//expe = register RTC
53
+		expe = RTC->BKP0R;
54
+		if (expe == 0) {
55
+			SystemClock_Config_24M_LSE();
56
+			expe = 1;
57
+			LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
58
+			LL_PWR_EnableBkUpAccess();
59
+			RTC->BKP0R = expe;
60
+		}
61
+
62
+		if (BLUE_BUTTON()){
63
+
64
+			expe ++;
65
+
66
+			if (expe > 8) expe = 1;
67
+			RTC->BKP0R = expe;
68
+		}
69
+//	}else{
70
+
71
+//	}
72
+	LL_PWR_DisableBkUpAccess();
73
+	switch(expe){
74
+	case 1:
75
+
76
+		/* Configure the system clock */
77
+		SystemClock_Config_80M();
78
+		//Setup Sleep mode
79
+		LL_LPM_EnableSleep();
80
+		break;
81
+	case 2:
82
+		/* Configure the system clock */
83
+		SystemClock_Config_24M_LSE();
84
+		break;
85
+	case 3:
86
+		SystemClock_Config_24M_LSE_FL3_VS2();
87
+		LL_LPM_EnableSleep();
88
+		break;
89
+	case 4:
90
+		SystemClock_Config_24M_LSE_FL3_VS2();
91
+	case 5:
92
+		SystemClock_Config_24M_LSE_FL3_VS2();
93
+		RTC_wakeup_init_from_stop(20);
94
+		LL_PWR_SetPowerMode(LL_PWR_MODE_STOP0);
95
+		LL_LPM_EnableDeepSleep();
96
+		break;
97
+	case 6:
98
+		SystemClock_Config_24M_LSE_FL3_VS2();
99
+		RTC_wakeup_init_from_stop(20);
100
+		LL_PWR_SetPowerMode(LL_PWR_MODE_STOP1);
101
+		LL_LPM_EnableDeepSleep();
102
+		break;
103
+	case 7:
104
+		SystemClock_Config_24M_LSE_FL3_VS2();
105
+		RTC_wakeup_init_from_stop(20);
106
+		LL_PWR_SetPowerMode(LL_PWR_MODE_STOP2);
107
+		LL_LPM_EnableDeepSleep();
108
+		break;
109
+	case 8:
110
+		SystemClock_Config_24M_LSE_FL3_VS2();
111
+		RTC_wakeup_init_from_standby_or_shutdown(20);
112
+		LL_PWR_SetPowerMode(LL_PWR_MODE_SHUTDOWN);
113
+		LL_LPM_EnableDeepSleep();
114
+		break;
115
+	}
116
+
117
+
118
+	// init systick timer (tick period at 1 ms)
119
+	LL_Init1msTick( SystemCoreClock );
120
+	LL_SYSTICK_EnableIT();
121
+
122
+
123
+	//LL_LPM_EnableSleepOnExit();
124
+
125
+	while (1)  {
126
+		if (blue_mode){
127
+			switch(expe){
128
+			case 5:
129
+			case 6:
130
+			case 7:
131
+				__WFI();
132
+				blue_mode = 0;
133
+				break;
134
+			case 1:
135
+			case 3:
136
+			case 8:
137
+				__WFI();
138
+				break;
139
+			case 2:
140
+			case 4:
141
+				LL_RCC_MSI_EnablePLLMode();
142
+				break;
143
+
144
+
145
+			}
146
+
147
+		}
148
+	}
149
+}
150
+
151
+void SystemClock_Config_24M_LSE_FL3_VS2(void){
152
+	LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
153
+	LL_FLASH_SetLatency(LL_FLASH_LATENCY_3);
154
+	while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_3)
155
+	{
156
+	}
157
+	LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE2);
158
+	LL_RCC_MSI_Enable();
159
+
160
+	/* Wait till MSI is ready */
161
+	while(LL_RCC_MSI_IsReady() != 1)
162
+	{
163
+
164
+	}
165
+
166
+	LL_PWR_EnableBkUpAccess();
167
+//	LL_RCC_ForceBackupDomainReset();
168
+	LL_RCC_ReleaseBackupDomainReset();
169
+	LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW);
170
+
171
+	LL_RCC_MSI_EnableRangeSelection();
172
+	LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6);
173
+	LL_RCC_MSI_SetCalibTrimming(0);
174
+	//  LL_RCC_MSI_EnablePLLMode();
175
+
176
+	LL_RCC_LSE_Enable();
177
+
178
+	/* Wait till LSE is ready */
179
+	while(LL_RCC_LSE_IsReady() != 1)
180
+	{
181
+
182
+	}
183
+	LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE);
184
+	LL_RCC_EnableRTC();
185
+
186
+	LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4);
187
+	LL_RCC_PLL_EnableDomain_SYS();
188
+	LL_RCC_PLL_Enable();
189
+
190
+	/* Wait till PLL is ready */
191
+	while(LL_RCC_PLL_IsReady() != 1)
192
+	{
193
+
194
+	}
195
+	LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL);
196
+
197
+	/* Wait till System clock is ready */
198
+	while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL)
199
+	{
200
+
201
+	}
202
+	LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1);
203
+	LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1);
204
+	LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1);
205
+	LL_SetSystemCoreClock(24000000);
206
+
207
+	/* Update the time base */
208
+	if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK)
209
+	{
210
+		//    Error_Handler();
211
+	}
212
+}
213
+
214
+/**
215
+ * @brief System Clock Configuration
216
+ * @retval None
217
+ * 24Mhz + RTC + LSE
218
+ */
219
+void SystemClock_Config_24M_LSE(void)
220
+{
221
+	LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
222
+	LL_FLASH_SetLatency(LL_FLASH_LATENCY_1);
223
+	while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_1)
224
+	{
225
+	}
226
+	LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1);
227
+	LL_RCC_MSI_Enable();
228
+
229
+	/* Wait till MSI is ready */
230
+	while(LL_RCC_MSI_IsReady() != 1)
231
+	{
232
+
233
+	}
234
+
235
+	LL_PWR_EnableBkUpAccess();
236
+//	LL_RCC_ForceBackupDomainReset();
237
+	LL_RCC_ReleaseBackupDomainReset();
238
+	LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW);
239
+
240
+	LL_RCC_MSI_EnableRangeSelection();
241
+	LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6);
242
+	LL_RCC_MSI_SetCalibTrimming(0);
243
+	//  LL_RCC_MSI_EnablePLLMode();
244
+
245
+	LL_RCC_LSE_Enable();
246
+
247
+	/* Wait till LSE is ready */
248
+	while(LL_RCC_LSE_IsReady() != 1)
249
+	{
250
+
251
+	}
252
+	LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE);
253
+	LL_RCC_EnableRTC();
254
+
255
+	LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4);
256
+	LL_RCC_PLL_EnableDomain_SYS();
257
+	LL_RCC_PLL_Enable();
258
+
259
+	/* Wait till PLL is ready */
260
+	while(LL_RCC_PLL_IsReady() != 1)
261
+	{
262
+
263
+	}
264
+	LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL);
265
+
266
+	/* Wait till System clock is ready */
267
+	while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL)
268
+	{
269
+
270
+	}
271
+	LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1);
272
+	LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1);
273
+	LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1);
274
+	LL_SetSystemCoreClock(24000000);
275
+
276
+	/* Update the time base */
277
+	if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK)
278
+	{
279
+		//    Error_Handler();
280
+	}
281
+}
282
+
283
+
284
+void SystemClock_Config_80M(void)
285
+{
286
+	LL_FLASH_SetLatency(LL_FLASH_LATENCY_4);
287
+	while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_4)
288
+	{
289
+	}
290
+	LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1);
291
+	LL_RCC_MSI_Enable();
292
+
293
+	/* Wait till MSI is ready */
294
+	while(LL_RCC_MSI_IsReady() != 1)
295
+	{
296
+
297
+	}
298
+	LL_RCC_MSI_EnableRangeSelection();
299
+	LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6);
300
+	LL_RCC_MSI_SetCalibTrimming(0);
301
+	LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 40, LL_RCC_PLLR_DIV_2);
302
+	LL_RCC_PLL_EnableDomain_SYS();
303
+	LL_RCC_PLL_Enable();
304
+
305
+	/* Wait till PLL is ready */
306
+	while(LL_RCC_PLL_IsReady() != 1)
307
+	{
308
+
309
+	}
310
+	LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL);
311
+
312
+	/* Wait till System clock is ready */
313
+	while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL)
314
+	{
315
+
316
+	}
317
+	LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1);
318
+	LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1);
319
+	LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1);
320
+	LL_SetSystemCoreClock(80000000);
321
+
322
+	/* Update the time base */
323
+	if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK)
324
+	{
325
+		//    Error_Handler();
326
+	}
327
+}
328
+
329
+// partie commune a toutes les utilisations du wakeup timer
330
+static void RTC_wakeup_init( int delay )
331
+{
332
+LL_RTC_DisableWriteProtection( RTC );
333
+LL_RTC_WAKEUP_Disable( RTC );
334
+while	( !LL_RTC_IsActiveFlag_WUTW( RTC ) )
335
+	{ }
336
+// connecter le timer a l'horloge 1Hz de la RTC
337
+LL_RTC_WAKEUP_SetClock( RTC, LL_RTC_WAKEUPCLOCK_CKSPRE );
338
+// fixer la duree de temporisation
339
+LL_RTC_WAKEUP_SetAutoReload( RTC, delay );	// 16 bits
340
+LL_RTC_ClearFlag_WUT(RTC);
341
+LL_RTC_EnableIT_WUT(RTC);
342
+LL_RTC_WAKEUP_Enable(RTC);
343
+LL_RTC_EnableWriteProtection(RTC);
344
+}
345
+
346
+// Dans le cas des modes STANDBY et SHUTDOWN, le MPU sera reveille par reset
347
+// causé par 1 wakeup line (interne ou externe) (le NVIC n'est plus alimenté)
348
+void RTC_wakeup_init_from_standby_or_shutdown( int delay )
349
+{
350
+RTC_wakeup_init( delay );
351
+// enable the Internal Wake-up line
352
+LL_PWR_EnableInternWU();	// ceci ne concerne que Standby et Shutdown, pas STOPx
353
+}
354
+
355
+// Dans le cas des modes STOPx, le MPU sera reveille par interruption
356
+// le module EXTI et une partie du NVIC sont encore alimentes
357
+// le contenu de la RAM et des registres étant préservé, le MPU
358
+// reprend l'execution après l'instruction WFI
359
+void RTC_wakeup_init_from_stop( int delay )
360
+{
361
+RTC_wakeup_init( delay );
362
+// valider l'interrupt par la ligne 20 du module EXTI, qui est réservée au wakeup timer
363
+LL_EXTI_EnableIT_0_31( LL_EXTI_LINE_20 );
364
+LL_EXTI_EnableRisingTrig_0_31( LL_EXTI_LINE_20 );
365
+// valider l'interrupt chez NVIC
366
+NVIC_SetPriority( RTC_WKUP_IRQn, 1 );
367
+NVIC_EnableIRQ( RTC_WKUP_IRQn );
368
+}
369
+
370
+// wakeup timer interrupt Handler (inutile mais doit etre defini)
371
+void RTC_WKUP_IRQHandler()
372
+{
373
+LL_EXTI_ClearFlag_0_31( LL_EXTI_LINE_20 );
374
+}

+ 0
- 218
PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/af/40857dccb228001b1d0af99b6389052e View File

@@ -1,218 +0,0 @@
1
-/* Project L476_ats_blink for STM32L476 mounted on Nucleo board:
2
- * the user LED (mounted on pin PA-5) is flashed every second for 50 ms.
3
- * The time base is provided by Systick (1000 ticks per second).
4
- * The clock configuration is the default one (Sysclk = 80 MHz, derived from MSI and PLL).
5
- */
6
-
7
-/* Includes ------------------------------------------------------------------*/
8
-#include "main.h"
9
-// #if defined(USE_FULL_ASSERT)
10
-// #include "stm32_assert.h"
11
-// #endif /* USE_FULL_ASSERT */
12
-
13
-#include "gpio.h"
14
-
15
-// systick interrupt handler
16
-volatile uint32_t msTicks = 0;
17
-volatile uint8_t expe = 0;
18
-volatile uint8_t blue_mode = 0;
19
-
20
-void SysTick_Handler()
21
-{
22
-	if	( BLUE_BUTTON() ){
23
-		blue_mode = 1 ;
24
-	}
25
-
26
-	msTicks++;                                                /* See startup file startup_LPC17xx.s for SysTick vector */
27
-	if (msTicks == 5 * expe){
28
-		LED_GREEN(0);
29
-	}else if(msTicks >= 200){
30
-		msTicks = 0;
31
-		LED_GREEN(1);
32
-	}
33
-	if(expe == 2){
34
-		CLK_TOGGLE();
35
-	}
36
-}
37
-
38
-
39
-
40
-
41
-int main(void)
42
-{
43
-
44
-
45
-	// config GPIO
46
-	GPIO_init();
47
-
48
-	if (RCC->BDCR & RCC_BDCR_LSEON) {
49
-		LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
50
-		LL_PWR_EnableBkUpAccess();
51
-
52
-		//expe = register RTC
53
-		expe = RTC->BKP0R;
54
-
55
-		if (BLUE_BUTTON()){
56
-
57
-			expe ++;
58
-
59
-			if (expe > 2) expe = 1;
60
-			RTC->BKP0R = expe;
61
-		}
62
-	}else{
63
-		SystemClock_Config_24M_LSE();
64
-		expe = 1;
65
-		LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
66
-		LL_PWR_EnableBkUpAccess();
67
-		RTC->BKP0R = expe;
68
-	}
69
-	LL_PWR_DisableBkUpAccess();
70
-	switch(expe){
71
-	case 1:
72
-		/* Configure the system clock */
73
-		SystemClock_Config_80M();
74
-		break;
75
-	case 2:
76
-		/* Configure the system clock */
77
-		SystemClock_Config_24M_LSE();
78
-		break;
79
-	}
80
-
81
-
82
-	// init systick timer (tick period at 1 ms)
83
-	LL_Init1msTick( SystemCoreClock );
84
-	LL_SYSTICK_EnableIT();
85
-
86
-	//Setup Sleep mode
87
-	LL_LPM_EnableSleep();
88
-	//LL_LPM_EnableSleepOnExit();
89
-
90
-	while (1)  {
91
-		if (blue_mode){
92
-			switch(expe){
93
-			case 1:
94
-				__WFI();
95
-				break;
96
-			case 2:
97
-				LL_RCC_MSI_EnablePLLMode();
98
-				break;
99
-			}
100
-
101
-		}
102
-	}
103
-}
104
-
105
-/**
106
- * @brief System Clock Configuration
107
- * @retval None
108
- * 24Mhz + RTC + LSE
109
- */
110
-void SystemClock_Config_24M_LSE(void)
111
-{
112
-	LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
113
-	LL_FLASH_SetLatency(LL_FLASH_LATENCY_1);
114
-	while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_1)
115
-	{
116
-	}
117
-	LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1);
118
-	LL_RCC_MSI_Enable();
119
-
120
-	/* Wait till MSI is ready */
121
-	while(LL_RCC_MSI_IsReady() != 1)
122
-	{
123
-
124
-	}
125
-
126
-	LL_PWR_EnableBkUpAccess();
127
-	LL_RCC_ForceBackupDomainReset();
128
-	LL_RCC_ReleaseBackupDomainReset();
129
-	LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW);
130
-
131
-	LL_RCC_MSI_EnableRangeSelection();
132
-	LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6);
133
-	LL_RCC_MSI_SetCalibTrimming(0);
134
-	//  LL_RCC_MSI_EnablePLLMode();
135
-
136
-	LL_RCC_LSE_Enable();
137
-
138
-	/* Wait till LSE is ready */
139
-	while(LL_RCC_LSE_IsReady() != 1)
140
-	{
141
-
142
-	}
143
-	LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE);
144
-	LL_RCC_EnableRTC();
145
-
146
-	LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4);
147
-	LL_RCC_PLL_EnableDomain_SYS();
148
-	LL_RCC_PLL_Enable();
149
-
150
-	/* Wait till PLL is ready */
151
-	while(LL_RCC_PLL_IsReady() != 1)
152
-	{
153
-
154
-	}
155
-	LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL);
156
-
157
-	/* Wait till System clock is ready */
158
-	while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL)
159
-	{
160
-
161
-	}
162
-	LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1);
163
-	LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1);
164
-	LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1);
165
-	LL_SetSystemCoreClock(24000000);
166
-
167
-	/* Update the time base */
168
-	if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK)
169
-	{
170
-		//    Error_Handler();
171
-	}
172
-}
173
-
174
-
175
-void SystemClock_Config_80M(void)
176
-{
177
-	LL_FLASH_SetLatency(LL_FLASH_LATENCY_4);
178
-	while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_4)
179
-	{
180
-	}
181
-	LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1);
182
-	LL_RCC_MSI_Enable();
183
-
184
-	/* Wait till MSI is ready */
185
-	while(LL_RCC_MSI_IsReady() != 1)
186
-	{
187
-
188
-	}
189
-	LL_RCC_MSI_EnableRangeSelection();
190
-	LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6);
191
-	LL_RCC_MSI_SetCalibTrimming(0);
192
-	LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 40, LL_RCC_PLLR_DIV_2);
193
-	LL_RCC_PLL_EnableDomain_SYS();
194
-	LL_RCC_PLL_Enable();
195
-
196
-	/* Wait till PLL is ready */
197
-	while(LL_RCC_PLL_IsReady() != 1)
198
-	{
199
-
200
-	}
201
-	LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL);
202
-
203
-	/* Wait till System clock is ready */
204
-	while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL)
205
-	{
206
-
207
-	}
208
-	LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1);
209
-	LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1);
210
-	LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1);
211
-	LL_SetSystemCoreClock(80000000);
212
-
213
-	/* Update the time base */
214
-	if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK)
215
-	{
216
-		//    Error_Handler();
217
-	}
218
-}

+ 0
- 215
PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/b/d024d9ddb128001b1d0af99b6389052e View File

@@ -1,215 +0,0 @@
1
-/* Project L476_ats_blink for STM32L476 mounted on Nucleo board:
2
- * the user LED (mounted on pin PA-5) is flashed every second for 50 ms.
3
- * The time base is provided by Systick (1000 ticks per second).
4
- * The clock configuration is the default one (Sysclk = 80 MHz, derived from MSI and PLL).
5
- */
6
-
7
-/* Includes ------------------------------------------------------------------*/
8
-#include "main.h"
9
-// #if defined(USE_FULL_ASSERT)
10
-// #include "stm32_assert.h"
11
-// #endif /* USE_FULL_ASSERT */
12
-
13
-#include "gpio.h"
14
-
15
-// systick interrupt handler
16
-volatile uint32_t msTicks = 0;
17
-volatile uint8_t expe = 0;
18
-volatile uint8_t blue_mode = 0;
19
-
20
-void SysTick_Handler()
21
-{
22
-	if	( BLUE_BUTTON() ){
23
-		blue_mode = 1 ;
24
-	}
25
-
26
-	msTicks++;                                                /* See startup file startup_LPC17xx.s for SysTick vector */
27
-	if (msTicks == 5 * expe){
28
-		LED_GREEN(0);
29
-	}else if(msTicks >= 200){
30
-		msTicks = 0;
31
-		LED_GREEN(1);
32
-	}
33
-	if(expe == 2){
34
-		CLK_TOGGLE();
35
-	}
36
-}
37
-
38
-
39
-
40
-
41
-int main(void)
42
-{
43
-
44
-
45
-	// config GPIO
46
-	GPIO_init();
47
-
48
-	if (RCC->BDCR & RCC_BDCR_LSEON) {
49
-		LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
50
-		LL_PWR_EnableBkUpAccess();
51
-
52
-		//expe = register RTC
53
-		expe = RTC->BKP0R;
54
-
55
-		if (BLUE_BUTTON()){
56
-			expe ++;
57
-			RTC->BKP0R = expe;
58
-		}
59
-	}else{
60
-		SystemClock_Config_24M_LSE();
61
-		expe = 1;
62
-		LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
63
-		LL_PWR_EnableBkUpAccess();
64
-		RTC->BKP0R = expe;
65
-	}
66
-	LL_PWR_DisableBkUpAccess();
67
-	switch(expe){
68
-	case 1:
69
-		/* Configure the system clock */
70
-		SystemClock_Config_80M();
71
-		break;
72
-	case 2:
73
-		/* Configure the system clock */
74
-		SystemClock_Config_24M_LSE();
75
-		break;
76
-	}
77
-
78
-
79
-	// init systick timer (tick period at 1 ms)
80
-	LL_Init1msTick( SystemCoreClock );
81
-	LL_SYSTICK_EnableIT();
82
-
83
-	//Setup Sleep mode
84
-	LL_LPM_EnableSleep();
85
-	//LL_LPM_EnableSleepOnExit();
86
-
87
-	while (1)  {
88
-		if (blue_mode){
89
-			switch(expe){
90
-			case 1:
91
-				__WFI();
92
-				break;
93
-			case 2:
94
-				LL_RCC_MSI_EnablePLLMode();
95
-				break;
96
-			}
97
-
98
-		}
99
-	}
100
-}
101
-
102
-/**
103
- * @brief System Clock Configuration
104
- * @retval None
105
- * 24Mhz + RTC + LSE
106
- */
107
-void SystemClock_Config_24M_LSE(void)
108
-{
109
-	LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
110
-	LL_FLASH_SetLatency(LL_FLASH_LATENCY_1);
111
-	while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_1)
112
-	{
113
-	}
114
-	LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1);
115
-	LL_RCC_MSI_Enable();
116
-
117
-	/* Wait till MSI is ready */
118
-	while(LL_RCC_MSI_IsReady() != 1)
119
-	{
120
-
121
-	}
122
-
123
-	LL_PWR_EnableBkUpAccess();
124
-	LL_RCC_ForceBackupDomainReset();
125
-	LL_RCC_ReleaseBackupDomainReset();
126
-	LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW);
127
-
128
-	LL_RCC_MSI_EnableRangeSelection();
129
-	LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6);
130
-	LL_RCC_MSI_SetCalibTrimming(0);
131
-	//  LL_RCC_MSI_EnablePLLMode();
132
-
133
-	LL_RCC_LSE_Enable();
134
-
135
-	/* Wait till LSE is ready */
136
-	while(LL_RCC_LSE_IsReady() != 1)
137
-	{
138
-
139
-	}
140
-	LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE);
141
-	LL_RCC_EnableRTC();
142
-
143
-	LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4);
144
-	LL_RCC_PLL_EnableDomain_SYS();
145
-	LL_RCC_PLL_Enable();
146
-
147
-	/* Wait till PLL is ready */
148
-	while(LL_RCC_PLL_IsReady() != 1)
149
-	{
150
-
151
-	}
152
-	LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL);
153
-
154
-	/* Wait till System clock is ready */
155
-	while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL)
156
-	{
157
-
158
-	}
159
-	LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1);
160
-	LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1);
161
-	LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1);
162
-	LL_SetSystemCoreClock(24000000);
163
-
164
-	/* Update the time base */
165
-	if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK)
166
-	{
167
-		//    Error_Handler();
168
-	}
169
-}
170
-
171
-
172
-void SystemClock_Config_80M(void)
173
-{
174
-	LL_FLASH_SetLatency(LL_FLASH_LATENCY_4);
175
-	while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_4)
176
-	{
177
-	}
178
-	LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1);
179
-	LL_RCC_MSI_Enable();
180
-
181
-	/* Wait till MSI is ready */
182
-	while(LL_RCC_MSI_IsReady() != 1)
183
-	{
184
-
185
-	}
186
-	LL_RCC_MSI_EnableRangeSelection();
187
-	LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6);
188
-	LL_RCC_MSI_SetCalibTrimming(0);
189
-	LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 40, LL_RCC_PLLR_DIV_2);
190
-	LL_RCC_PLL_EnableDomain_SYS();
191
-	LL_RCC_PLL_Enable();
192
-
193
-	/* Wait till PLL is ready */
194
-	while(LL_RCC_PLL_IsReady() != 1)
195
-	{
196
-
197
-	}
198
-	LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL);
199
-
200
-	/* Wait till System clock is ready */
201
-	while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL)
202
-	{
203
-
204
-	}
205
-	LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1);
206
-	LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1);
207
-	LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1);
208
-	LL_SetSystemCoreClock(80000000);
209
-
210
-	/* Update the time base */
211
-	if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK)
212
-	{
213
-		//    Error_Handler();
214
-	}
215
-}

PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/e5/102e7408b728001b1d0af99b6389052e → PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/ba/801b2bd08429001b114bfff082d965b2 View File

@@ -63,6 +63,7 @@ extern "C" {
63 63
 /* Exported functions prototypes ---------------------------------------------*/
64 64
 void Error_Handler(void);
65 65
 void SystemClock_Config_24M_LSE(void);
66
+void SystemClock_Config_24M_LSE_FL3_VS2(void);
66 67
 void SystemClock_Config_80M(void);
67 68
 void Init_LSE(void);
68 69
 /* USER CODE BEGIN EFP */

+ 373
- 0
PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/bf/005849908f29001b114bfff082d965b2 View File

@@ -0,0 +1,373 @@
1
+/* Project L476_ats_blink for STM32L476 mounted on Nucleo board:
2
+ * the user LED (mounted on pin PA-5) is flashed every second for 50 ms.
3
+ * The time base is provided by Systick (1000 ticks per second).
4
+ * The clock configuration is the default one (Sysclk = 80 MHz, derived from MSI and PLL).
5
+ */
6
+
7
+/* Includes ------------------------------------------------------------------*/
8
+#include "main.h"
9
+// #if defined(USE_FULL_ASSERT)
10
+// #include "stm32_assert.h"
11
+// #endif /* USE_FULL_ASSERT */
12
+
13
+#include "gpio.h"
14
+
15
+// systick interrupt handler
16
+volatile uint32_t msTicks = 0;
17
+volatile uint8_t expe = 0;
18
+volatile uint8_t blue_mode = 0;
19
+
20
+void SysTick_Handler()
21
+{
22
+	if	( BLUE_BUTTON() ){
23
+		blue_mode = 1 ;
24
+	}
25
+
26
+	msTicks++;                                                /* See startup file startup_LPC17xx.s for SysTick vector */
27
+	if (msTicks == 5 * expe){
28
+		LED_GREEN(0);
29
+	}else if(msTicks >= 200){
30
+		msTicks = 0;
31
+		LED_GREEN(1);
32
+	}
33
+	if(expe == 2 || expe == 4){
34
+		CLK_TOGGLE();
35
+	}
36
+}
37
+
38
+
39
+
40
+
41
+int main(void)
42
+{
43
+
44
+
45
+	// config GPIO
46
+	GPIO_init();
47
+
48
+//	if (RCC->BDCR & RCC_BDCR_LSEON) {
49
+		LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
50
+		LL_PWR_EnableBkUpAccess();
51
+
52
+		//expe = register RTC
53
+		expe = RTC->BKP0R;
54
+		if (expe == 0) {
55
+			SystemClock_Config_24M_LSE();
56
+			expe = 1;
57
+			LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
58
+			LL_PWR_EnableBkUpAccess();
59
+			RTC->BKP0R = expe;
60
+		}
61
+
62
+		if (BLUE_BUTTON()){
63
+
64
+			expe ++;
65
+			blue_mode = 0;
66
+			if (expe > 8) expe = 1;
67
+			RTC->BKP0R = expe;
68
+		}
69
+//	}else{
70
+
71
+//	}
72
+	LL_PWR_DisableBkUpAccess();
73
+	switch(expe){
74
+	case 1:
75
+
76
+		/* Configure the system clock */
77
+		SystemClock_Config_80M();
78
+		//Setup Sleep mode
79
+		LL_LPM_EnableSleep();
80
+		break;
81
+	case 2:
82
+		/* Configure the system clock */
83
+		SystemClock_Config_24M_LSE();
84
+		break;
85
+	case 3:
86
+		SystemClock_Config_24M_LSE_FL3_VS2();
87
+		LL_LPM_EnableSleep();
88
+		break;
89
+	case 4:
90
+		SystemClock_Config_24M_LSE_FL3_VS2();
91
+	case 5:
92
+		SystemClock_Config_24M_LSE_FL3_VS2();
93
+
94
+		LL_PWR_SetPowerMode(LL_PWR_MODE_STOP0);
95
+		LL_LPM_EnableDeepSleep();
96
+		break;
97
+	case 6:
98
+		SystemClock_Config_24M_LSE_FL3_VS2();
99
+		LL_PWR_SetPowerMode(LL_PWR_MODE_STOP1);
100
+		LL_LPM_EnableDeepSleep();
101
+		break;
102
+	case 7:
103
+		SystemClock_Config_24M_LSE_FL3_VS2();
104
+		LL_PWR_SetPowerMode(LL_PWR_MODE_STOP2);
105
+		LL_LPM_EnableDeepSleep();
106
+		break;
107
+	case 8:
108
+		SystemClock_Config_24M_LSE_FL3_VS2();
109
+		LL_PWR_SetPowerMode(LL_PWR_MODE_SHUTDOWN);
110
+		LL_LPM_EnableDeepSleep();
111
+		break;
112
+	}
113
+
114
+
115
+	// init systick timer (tick period at 1 ms)
116
+	LL_Init1msTick( SystemCoreClock );
117
+	LL_SYSTICK_EnableIT();
118
+
119
+
120
+	//LL_LPM_EnableSleepOnExit();
121
+
122
+	while (1)  {
123
+		if (blue_mode){
124
+			switch(expe){
125
+			case 5:
126
+			case 6:
127
+			case 7:
128
+				RTC_wakeup_init_from_stop(20);
129
+				__WFI();
130
+				blue_mode = 0;
131
+				break;
132
+			case 8:
133
+				RTC_wakeup_init_from_standby_or_shutdown(10);
134
+			case 1:
135
+			case 3:
136
+				__WFI();
137
+				break;
138
+			case 2:
139
+			case 4:
140
+				LL_RCC_MSI_EnablePLLMode();
141
+				break;
142
+
143
+
144
+			}
145
+
146
+		}
147
+	}
148
+}
149
+
150
+void SystemClock_Config_24M_LSE_FL3_VS2(void){
151
+	LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
152
+	LL_FLASH_SetLatency(LL_FLASH_LATENCY_3);
153
+	while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_3)
154
+	{
155
+	}
156
+	LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE2);
157
+	LL_RCC_MSI_Enable();
158
+
159
+	/* Wait till MSI is ready */
160
+	while(LL_RCC_MSI_IsReady() != 1)
161
+	{
162
+
163
+	}
164
+
165
+	LL_PWR_EnableBkUpAccess();
166
+//	LL_RCC_ForceBackupDomainReset();
167
+	LL_RCC_ReleaseBackupDomainReset();
168
+	LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW);
169
+
170
+	LL_RCC_MSI_EnableRangeSelection();
171
+	LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6);
172
+	LL_RCC_MSI_SetCalibTrimming(0);
173
+	//  LL_RCC_MSI_EnablePLLMode();
174
+
175
+	LL_RCC_LSE_Enable();
176
+
177
+	/* Wait till LSE is ready */
178
+	while(LL_RCC_LSE_IsReady() != 1)
179
+	{
180
+
181
+	}
182
+	LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE);
183
+	LL_RCC_EnableRTC();
184
+
185
+	LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4);
186
+	LL_RCC_PLL_EnableDomain_SYS();
187
+	LL_RCC_PLL_Enable();
188
+
189
+	/* Wait till PLL is ready */
190
+	while(LL_RCC_PLL_IsReady() != 1)
191
+	{
192
+
193
+	}
194
+	LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL);
195
+
196
+	/* Wait till System clock is ready */
197
+	while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL)
198
+	{
199
+
200
+	}
201
+	LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1);
202
+	LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1);
203
+	LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1);
204
+	LL_SetSystemCoreClock(24000000);
205
+
206
+	/* Update the time base */
207
+	if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK)
208
+	{
209
+		//    Error_Handler();
210
+	}
211
+}
212
+
213
+/**
214
+ * @brief System Clock Configuration
215
+ * @retval None
216
+ * 24Mhz + RTC + LSE
217
+ */
218
+void SystemClock_Config_24M_LSE(void)
219
+{
220
+	LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
221
+	LL_FLASH_SetLatency(LL_FLASH_LATENCY_1);
222
+	while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_1)
223
+	{
224
+	}
225
+	LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1);
226
+	LL_RCC_MSI_Enable();
227
+
228
+	/* Wait till MSI is ready */
229
+	while(LL_RCC_MSI_IsReady() != 1)
230
+	{
231
+
232
+	}
233
+
234
+	LL_PWR_EnableBkUpAccess();
235
+//	LL_RCC_ForceBackupDomainReset();
236
+	LL_RCC_ReleaseBackupDomainReset();
237
+	LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW);
238
+
239
+	LL_RCC_MSI_EnableRangeSelection();
240
+	LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6);
241
+	LL_RCC_MSI_SetCalibTrimming(0);
242
+	//  LL_RCC_MSI_EnablePLLMode();
243
+
244
+	LL_RCC_LSE_Enable();
245
+
246
+	/* Wait till LSE is ready */
247
+	while(LL_RCC_LSE_IsReady() != 1)
248
+	{
249
+
250
+	}
251
+	LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE);
252
+	LL_RCC_EnableRTC();
253
+
254
+	LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4);
255
+	LL_RCC_PLL_EnableDomain_SYS();
256
+	LL_RCC_PLL_Enable();
257
+
258
+	/* Wait till PLL is ready */
259
+	while(LL_RCC_PLL_IsReady() != 1)
260
+	{
261
+
262
+	}
263
+	LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL);
264
+
265
+	/* Wait till System clock is ready */
266
+	while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL)
267
+	{
268
+
269
+	}
270
+	LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1);
271
+	LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1);
272
+	LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1);
273
+	LL_SetSystemCoreClock(24000000);
274
+
275
+	/* Update the time base */
276
+	if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK)
277
+	{
278
+		//    Error_Handler();
279
+	}
280
+}
281
+
282
+
283
+void SystemClock_Config_80M(void)
284
+{
285
+	LL_FLASH_SetLatency(LL_FLASH_LATENCY_4);
286
+	while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_4)
287
+	{
288
+	}
289
+	LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1);
290
+	LL_RCC_MSI_Enable();
291
+
292
+	/* Wait till MSI is ready */
293
+	while(LL_RCC_MSI_IsReady() != 1)
294
+	{
295
+
296
+	}
297
+	LL_RCC_MSI_EnableRangeSelection();
298
+	LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6);
299
+	LL_RCC_MSI_SetCalibTrimming(0);
300
+	LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 40, LL_RCC_PLLR_DIV_2);
301
+	LL_RCC_PLL_EnableDomain_SYS();
302
+	LL_RCC_PLL_Enable();
303
+
304
+	/* Wait till PLL is ready */
305
+	while(LL_RCC_PLL_IsReady() != 1)
306
+	{
307
+
308
+	}
309
+	LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL);
310
+
311
+	/* Wait till System clock is ready */
312
+	while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL)
313
+	{
314
+
315
+	}
316
+	LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1);
317
+	LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1);
318
+	LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1);
319
+	LL_SetSystemCoreClock(80000000);
320
+
321
+	/* Update the time base */
322
+	if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK)
323
+	{
324
+		//    Error_Handler();
325
+	}
326
+}
327
+
328
+// partie commune a toutes les utilisations du wakeup timer
329
+static void RTC_wakeup_init( int delay )
330
+{
331
+LL_RTC_DisableWriteProtection( RTC );
332
+LL_RTC_WAKEUP_Disable( RTC );
333
+while	( !LL_RTC_IsActiveFlag_WUTW( RTC ) )
334
+	{ }
335
+// connecter le timer a l'horloge 1Hz de la RTC
336
+LL_RTC_WAKEUP_SetClock( RTC, LL_RTC_WAKEUPCLOCK_CKSPRE );
337
+// fixer la duree de temporisation
338
+LL_RTC_WAKEUP_SetAutoReload( RTC, delay );	// 16 bits
339
+LL_RTC_ClearFlag_WUT(RTC);
340
+LL_RTC_EnableIT_WUT(RTC);
341
+LL_RTC_WAKEUP_Enable(RTC);
342
+LL_RTC_EnableWriteProtection(RTC);
343
+}
344
+
345
+// Dans le cas des modes STANDBY et SHUTDOWN, le MPU sera reveille par reset
346
+// causé par 1 wakeup line (interne ou externe) (le NVIC n'est plus alimenté)
347
+void RTC_wakeup_init_from_standby_or_shutdown( int delay )
348
+{
349
+RTC_wakeup_init( delay );
350
+// enable the Internal Wake-up line
351
+LL_PWR_EnableInternWU();	// ceci ne concerne que Standby et Shutdown, pas STOPx
352
+}
353
+
354
+// Dans le cas des modes STOPx, le MPU sera reveille par interruption
355
+// le module EXTI et une partie du NVIC sont encore alimentes
356
+// le contenu de la RAM et des registres étant préservé, le MPU
357
+// reprend l'execution après l'instruction WFI
358
+void RTC_wakeup_init_from_stop( int delay )
359
+{
360
+RTC_wakeup_init( delay );
361
+// valider l'interrupt par la ligne 20 du module EXTI, qui est réservée au wakeup timer
362
+LL_EXTI_EnableIT_0_31( LL_EXTI_LINE_20 );
363
+LL_EXTI_EnableRisingTrig_0_31( LL_EXTI_LINE_20 );
364
+// valider l'interrupt chez NVIC
365
+NVIC_SetPriority( RTC_WKUP_IRQn, 1 );
366
+NVIC_EnableIRQ( RTC_WKUP_IRQn );
367
+}
368
+
369
+// wakeup timer interrupt Handler (inutile mais doit etre defini)
370
+void RTC_WKUP_IRQHandler()
371
+{
372
+LL_EXTI_ClearFlag_0_31( LL_EXTI_LINE_20 );
373
+}

+ 0
- 215
PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/c2/90b22559b028001b1d0af99b6389052e View File

@@ -1,215 +0,0 @@
1
-/* Project L476_ats_blink for STM32L476 mounted on Nucleo board:
2
- * the user LED (mounted on pin PA-5) is flashed every second for 50 ms.
3
- * The time base is provided by Systick (1000 ticks per second).
4
- * The clock configuration is the default one (Sysclk = 80 MHz, derived from MSI and PLL).
5
- */
6
-
7
-/* Includes ------------------------------------------------------------------*/
8
-#include "main.h"
9
-// #if defined(USE_FULL_ASSERT)
10
-// #include "stm32_assert.h"
11
-// #endif /* USE_FULL_ASSERT */
12
-
13
-#include "gpio.h"
14
-
15
-// systick interrupt handler
16
-volatile uint32_t msTicks = 0;
17
-volatile uint8_t expe = 0;
18
-volatile uint8_t blue_mode = 0;
19
-
20
-void SysTick_Handler()
21
-{
22
-  if	( BLUE_BUTTON() ){
23
-			blue_mode = 1 ;
24
-  }
25
-
26
-  msTicks++;                                                /* See startup file startup_LPC17xx.s for SysTick vector */
27
-  if (msTicks == 5 * expe){
28
-	  LED_GREEN(0);
29
-  }else if(msTicks >= 200){
30
-	  msTicks = 0;
31
-	  LED_GREEN(1);
32
-  }
33
- if(expe == 2){
34
-	 CLK_TOGGLE();
35
- }
36
-}
37
-
38
-
39
-
40
-
41
-int main(void)
42
-{
43
-	if (RCC->BDCR & RCC_BDCR_LSEON) {
44
-			LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
45
-			LL_PWR_EnableBkUpAccess();
46
-
47
-			//expe = register RTC
48
-			expe = RTC->BKP0R;
49
-
50
-			if (BLUE_BUTTON()){
51
-			expe ++;
52
-			RTC->BKP0R = expe;
53
-
54
-	}else{
55
-		SystemClock_Config_24M_LSE();
56
-		expe = 1;
57
-		LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
58
-		LL_PWR_EnableBkUpAccess();
59
-		RTC->BKP0R = expe;
60
-	}
61
-	LL_PWR_DisableBkUpAccess();
62
-	switch(expe){
63
-			case 1:
64
-				/* Configure the system clock */
65
-				SystemClock_Config_80M();
66
-				break;
67
-			case 2:
68
-				/* Configure the system clock */
69
-				SystemClock_Config_24M_LSE();
70
-				break;
71
-			}
72
-
73
-
74
-
75
-
76
-// config GPIO
77
-GPIO_init();
78
-
79
-// init systick timer (tick period at 1 ms)
80
-LL_Init1msTick( SystemCoreClock );
81
-LL_SYSTICK_EnableIT();
82
-
83
-//Setup Sleep mode
84
-LL_LPM_EnableSleep();
85
-//LL_LPM_EnableSleepOnExit();
86
-
87
-while (1)  {
88
-	if (blue_mode){
89
-		switch(expe){
90
-					case 1:
91
-						__WFI();
92
-						break;
93
-					case 2:
94
-						LL_RCC_MSI_EnablePLLMode();
95
-						break;
96
-					}
97
-
98
-		}
99
-	}
100
-}
101
-
102
-/**
103
-  * @brief System Clock Configuration
104
-  * @retval None
105
-  * 24Mhz + RTC + LSE
106
-  */
107
-void SystemClock_Config_24M_LSE(void)
108
-{
109
-  LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
110
-  LL_FLASH_SetLatency(LL_FLASH_LATENCY_1);
111
-  while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_1)
112
-  {
113
-  }
114
-  LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1);
115
-  LL_RCC_MSI_Enable();
116
-
117
-   /* Wait till MSI is ready */
118
-  while(LL_RCC_MSI_IsReady() != 1)
119
-  {
120
-
121
-  }
122
-
123
-  LL_PWR_EnableBkUpAccess();
124
-  LL_RCC_ForceBackupDomainReset();
125
-  LL_RCC_ReleaseBackupDomainReset();
126
-  LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW);
127
-
128
-  LL_RCC_MSI_EnableRangeSelection();
129
-  LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6);
130
-  LL_RCC_MSI_SetCalibTrimming(0);
131
-//  LL_RCC_MSI_EnablePLLMode();
132
-
133
-  LL_RCC_LSE_Enable();
134
-
135
-      /* Wait till LSE is ready */
136
-     while(LL_RCC_LSE_IsReady() != 1)
137
-     {
138
-
139
-     }
140
-    LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE);
141
-    LL_RCC_EnableRTC();
142
-
143
-  LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4);
144
-  LL_RCC_PLL_EnableDomain_SYS();
145
-  LL_RCC_PLL_Enable();
146
-
147
-   /* Wait till PLL is ready */
148
-  while(LL_RCC_PLL_IsReady() != 1)
149
-  {
150
-
151
-  }
152
-  LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL);
153
-
154
-   /* Wait till System clock is ready */
155
-  while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL)
156
-  {
157
-
158
-  }
159
-  LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1);
160
-  LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1);
161
-  LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1);
162
-  LL_SetSystemCoreClock(24000000);
163
-
164
-   /* Update the time base */
165
-  if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK)
166
-  {
167
-//    Error_Handler();
168
-  }
169
-}
170
-
171
-
172
-void SystemClock_Config_80M(void)
173
-{
174
-  LL_FLASH_SetLatency(LL_FLASH_LATENCY_4);
175
-  while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_4)
176
-  {
177
-  }
178
-  LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1);
179
-  LL_RCC_MSI_Enable();
180
-
181
-   /* Wait till MSI is ready */
182
-  while(LL_RCC_MSI_IsReady() != 1)
183
-  {
184
-
185
-  }
186
-  LL_RCC_MSI_EnableRangeSelection();
187
-  LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6);
188
-  LL_RCC_MSI_SetCalibTrimming(0);
189
-  LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 40, LL_RCC_PLLR_DIV_2);
190
-  LL_RCC_PLL_EnableDomain_SYS();
191
-  LL_RCC_PLL_Enable();
192
-
193
-   /* Wait till PLL is ready */
194
-  while(LL_RCC_PLL_IsReady() != 1)
195
-  {
196
-
197
-  }
198
-  LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL);
199
-
200
-   /* Wait till System clock is ready */
201
-  while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL)
202
-  {
203
-
204
-  }
205
-  LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1);
206
-  LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1);
207
-  LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1);
208
-  LL_SetSystemCoreClock(80000000);
209
-
210
-   /* Update the time base */
211
-  if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK)
212
-  {
213
-//    Error_Handler();
214
-  }
215
-}

+ 0
- 217
PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/cb/b0b0c2d1ae28001b1d0af99b6389052e View File

@@ -1,217 +0,0 @@
1
-/* Project L476_ats_blink for STM32L476 mounted on Nucleo board:
2
- * the user LED (mounted on pin PA-5) is flashed every second for 50 ms.
3
- * The time base is provided by Systick (1000 ticks per second).
4
- * The clock configuration is the default one (Sysclk = 80 MHz, derived from MSI and PLL).
5
- */
6
-
7
-/* Includes ------------------------------------------------------------------*/
8
-#include "main.h"
9
-// #if defined(USE_FULL_ASSERT)
10
-// #include "stm32_assert.h"
11
-// #endif /* USE_FULL_ASSERT */
12
-
13
-#include "gpio.h"
14
-
15
-// systick interrupt handler
16
-volatile uint32_t msTicks = 0;
17
-volatile uint8_t expe = 2;
18
-volatile uint8_t blue_mode = 0;
19
-
20
-void SysTick_Handler()
21
-{
22
-  if	( BLUE_BUTTON() ){
23
-			blue_mode = 1 ;
24
-  }
25
-
26
-  msTicks++;                                                /* See startup file startup_LPC17xx.s for SysTick vector */
27
-  if (msTicks == 5 * expe){
28
-	  LED_GREEN(0);
29
-  }else if(msTicks >= 200){
30
-	  msTicks = 0;
31
-	  LED_GREEN(1);
32
-  }
33
- if(expe == 2){
34
-	 CLK_TOGGLE();
35
- }
36
-}
37
-
38
-
39
-
40
-
41
-int main(void)
42
-{
43
-//	if (RCC->BDCR & RCC_BDCR_LSEON) {
44
-//			LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
45
-//			LL_PWR_EnableBkUpAccess();
46
-//
47
-//			//expe = register RTC
48
-//			expe = RTC->BKP0R;
49
-//			if (expe == 0){
50
-//				expe = 1;
51
-//				RTC->BKP0R = expe;
52
-//			}else if (expe != 0 && BLUE_BUTTON()){
53
-//				expe ++;
54
-//				RTC->BKP0R = expe;
55
-//			}
56
-//	}else{
57
-//		SystemClock_Config_24M_LSE();
58
-//		expe = 1;
59
-//		LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
60
-//		LL_PWR_EnableBkUpAccess();
61
-//		RTC->BKP0R = expe;
62
-//	}
63
-//	LL_PWR_DisableBkUpAccess();
64
-	switch(expe){
65
-			case 1:
66
-				/* Configure the system clock */
67
-				SystemClock_Config_80M();
68
-				break;
69
-			case 2:
70
-				/* Configure the system clock */
71
-				SystemClock_Config_24M_LSE();
72
-				break;
73
-			}
74
-
75
-
76
-
77
-
78
-// config GPIO
79
-GPIO_init();
80
-
81
-// init systick timer (tick period at 1 ms)
82
-LL_Init1msTick( SystemCoreClock );
83
-LL_SYSTICK_EnableIT();
84
-
85
-//Setup Sleep mode
86
-LL_LPM_EnableSleep();
87
-//LL_LPM_EnableSleepOnExit();
88
-
89
-while (1)  {
90
-	if (blue_mode){
91
-		switch(expe){
92
-					case 1:
93
-						__WFI();
94
-						break;
95
-					case 2:
96
-						LL_RCC_MSI_EnablePLLMode();
97
-						break;
98
-					}
99
-
100
-		}
101
-	}
102
-}
103
-
104
-/**
105
-  * @brief System Clock Configuration
106
-  * @retval None
107
-  * 24Mhz + RTC + LSE
108
-  */
109
-void SystemClock_Config_24M_LSE(void)
110
-{
111
-  LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
112
-  LL_FLASH_SetLatency(LL_FLASH_LATENCY_1);
113
-  while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_1)
114
-  {
115
-  }
116
-  LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1);
117
-  LL_RCC_MSI_Enable();
118
-
119
-   /* Wait till MSI is ready */
120
-  while(LL_RCC_MSI_IsReady() != 1)
121
-  {
122
-
123
-  }
124
-
125
-  LL_PWR_EnableBkUpAccess();
126
-  LL_RCC_ForceBackupDomainReset();
127
-  LL_RCC_ReleaseBackupDomainReset();
128
-  LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW);
129
-
130
-  LL_RCC_MSI_EnableRangeSelection();
131
-  LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6);
132
-  LL_RCC_MSI_SetCalibTrimming(0);
133
-//  LL_RCC_MSI_EnablePLLMode();
134
-
135
-  LL_RCC_LSE_Enable();
136
-
137
-      /* Wait till LSE is ready */
138
-     while(LL_RCC_LSE_IsReady() != 1)
139
-     {
140
-
141
-     }
142
-    LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE);
143
-    LL_RCC_EnableRTC();
144
-
145
-  LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4);
146
-  LL_RCC_PLL_EnableDomain_SYS();
147
-  LL_RCC_PLL_Enable();
148
-
149
-   /* Wait till PLL is ready */
150
-  while(LL_RCC_PLL_IsReady() != 1)
151
-  {
152
-
153
-  }
154
-  LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL);
155
-
156
-   /* Wait till System clock is ready */
157
-  while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL)
158
-  {
159
-
160
-  }
161
-  LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1);
162
-  LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1);
163
-  LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1);
164
-  LL_SetSystemCoreClock(24000000);
165
-
166
-   /* Update the time base */
167
-  if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK)
168
-  {
169
-//    Error_Handler();
170
-  }
171
-}
172
-
173
-
174
-void SystemClock_Config_80M(void)
175
-{
176
-  LL_FLASH_SetLatency(LL_FLASH_LATENCY_4);
177
-  while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_4)
178
-  {
179
-  }
180
-  LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1);
181
-  LL_RCC_MSI_Enable();
182
-
183
-   /* Wait till MSI is ready */
184
-  while(LL_RCC_MSI_IsReady() != 1)
185
-  {
186
-
187
-  }
188
-  LL_RCC_MSI_EnableRangeSelection();
189
-  LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6);
190
-  LL_RCC_MSI_SetCalibTrimming(0);
191
-  LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 40, LL_RCC_PLLR_DIV_2);
192
-  LL_RCC_PLL_EnableDomain_SYS();
193
-  LL_RCC_PLL_Enable();
194
-
195
-   /* Wait till PLL is ready */
196
-  while(LL_RCC_PLL_IsReady() != 1)
197
-  {
198
-
199
-  }
200
-  LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL);
201
-
202
-   /* Wait till System clock is ready */
203
-  while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL)
204
-  {
205
-
206
-  }
207
-  LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1);
208
-  LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1);
209
-  LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1);
210
-  LL_SetSystemCoreClock(80000000);
211
-
212
-   /* Update the time base */
213
-  if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK)
214
-  {
215
-//    Error_Handler();
216
-  }
217
-}

+ 373
- 0
PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/d4/a026fb419029001b114bfff082d965b2 View File

@@ -0,0 +1,373 @@
1
+/* Project L476_ats_blink for STM32L476 mounted on Nucleo board:
2
+ * the user LED (mounted on pin PA-5) is flashed every second for 50 ms.
3
+ * The time base is provided by Systick (1000 ticks per second).
4
+ * The clock configuration is the default one (Sysclk = 80 MHz, derived from MSI and PLL).
5
+ */
6
+
7
+/* Includes ------------------------------------------------------------------*/
8
+#include "main.h"
9
+// #if defined(USE_FULL_ASSERT)
10
+// #include "stm32_assert.h"
11
+// #endif /* USE_FULL_ASSERT */
12
+
13
+#include "gpio.h"
14
+
15
+// systick interrupt handler
16
+volatile uint32_t msTicks = 0;
17
+volatile uint8_t expe = 0;
18
+volatile uint8_t blue_mode = 0;
19
+
20
+void SysTick_Handler()
21
+{
22
+	if	( BLUE_BUTTON() ){
23
+		blue_mode = 1 ;
24
+	}
25
+
26
+	msTicks++;                                                /* See startup file startup_LPC17xx.s for SysTick vector */
27
+	if (msTicks == 5 * expe){
28
+		LED_GREEN(0);
29
+	}else if(msTicks >= 200){
30
+		msTicks = 0;
31
+		LED_GREEN(1);
32
+	}
33
+	if(expe == 2 || expe == 4){
34
+		CLK_TOGGLE();
35
+	}
36
+}
37
+
38
+
39
+
40
+
41
+int main(void)
42
+{
43
+
44
+
45
+	// config GPIO
46
+	GPIO_init();
47
+
48
+//	if (RCC->BDCR & RCC_BDCR_LSEON) {
49
+		LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
50
+		LL_PWR_EnableBkUpAccess();
51
+
52
+		//expe = register RTC
53
+		expe = RTC->BKP0R;
54
+		if (expe == 0) {
55
+			SystemClock_Config_24M_LSE();
56
+			expe = 1;
57
+			LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
58
+			LL_PWR_EnableBkUpAccess();
59
+			RTC->BKP0R = expe;
60
+		}
61
+
62
+		if (BLUE_BUTTON()){
63
+
64
+			expe ++;
65
+			blue_mode = 0;
66
+			if (expe > 8) expe = 1;
67
+			RTC->BKP0R = expe;
68
+		}
69
+//	}else{
70
+
71
+//	}
72
+	LL_PWR_DisableBkUpAccess();
73
+	switch(expe){
74
+	case 1:
75
+
76
+		/* Configure the system clock */
77
+		SystemClock_Config_80M();
78
+		//Setup Sleep mode
79
+		LL_LPM_EnableSleep();
80
+		break;
81
+	case 2:
82
+		/* Configure the system clock */
83
+		SystemClock_Config_24M_LSE();
84
+		break;
85
+	case 3:
86
+		SystemClock_Config_24M_LSE_FL3_VS2();
87
+		LL_LPM_EnableSleep();
88
+		break;
89
+	case 4:
90
+		SystemClock_Config_24M_LSE_FL3_VS2();
91
+	case 5:
92
+		SystemClock_Config_24M_LSE_FL3_VS2();
93
+		LL_PWR_SetPowerMode(LL_PWR_MODE_STOP0);
94
+		break;
95
+	case 6:
96
+		SystemClock_Config_24M_LSE_FL3_VS2();
97
+		LL_PWR_SetPowerMode(LL_PWR_MODE_STOP1);
98
+		break;
99
+	case 7:
100
+		SystemClock_Config_24M_LSE_FL3_VS2();
101
+		LL_PWR_SetPowerMode(LL_PWR_MODE_STOP2);
102
+		break;
103
+	case 8:
104
+		SystemClock_Config_24M_LSE_FL3_VS2();
105
+		LL_PWR_SetPowerMode(LL_PWR_MODE_SHUTDOWN);
106
+		LL_LPM_EnableDeepSleep();
107
+		break;
108
+	}
109
+
110
+
111
+	// init systick timer (tick period at 1 ms)
112
+	LL_Init1msTick( SystemCoreClock );
113
+	LL_SYSTICK_EnableIT();
114
+
115
+
116
+	//LL_LPM_EnableSleepOnExit();
117
+
118
+	while (1)  {
119
+		if (blue_mode){
120
+			switch(expe){
121
+			case 5:
122
+			case 6:
123
+			case 7:
124
+				LL_LPM_EnableDeepSleep();
125
+				RTC_wakeup_init_from_stop(20);
126
+				__WFI();
127
+				blue_mode = 0;
128
+				break;
129
+			case 8:
130
+				LL_LPM_EnableDeepSleep();
131
+				RTC_wakeup_init_from_standby_or_shutdown(10);
132
+			case 1:
133
+			case 3:
134
+				__WFI();
135
+				break;
136
+			case 2:
137
+			case 4:
138
+				LL_RCC_MSI_EnablePLLMode();
139
+				break;
140
+			}
141
+		}else{
142
+				if (expe > 4) {
143
+					LL_LPM_EnableSleep();
144
+					__WFI();
145
+				}
146
+		}
147
+	}
148
+}
149
+
150
+void SystemClock_Config_24M_LSE_FL3_VS2(void){
151
+	LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
152
+	LL_FLASH_SetLatency(LL_FLASH_LATENCY_3);
153
+	while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_3)
154
+	{
155
+	}
156
+	LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE2);
157
+	LL_RCC_MSI_Enable();
158
+
159
+	/* Wait till MSI is ready */
160
+	while(LL_RCC_MSI_IsReady() != 1)
161
+	{
162
+
163
+	}
164
+
165
+	LL_PWR_EnableBkUpAccess();
166
+//	LL_RCC_ForceBackupDomainReset();
167
+	LL_RCC_ReleaseBackupDomainReset();
168
+	LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW);
169
+
170
+	LL_RCC_MSI_EnableRangeSelection();
171
+	LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6);
172
+	LL_RCC_MSI_SetCalibTrimming(0);
173
+	//  LL_RCC_MSI_EnablePLLMode();
174
+
175
+	LL_RCC_LSE_Enable();
176
+
177
+	/* Wait till LSE is ready */
178
+	while(LL_RCC_LSE_IsReady() != 1)
179
+	{
180
+
181
+	}
182
+	LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE);
183
+	LL_RCC_EnableRTC();
184
+
185
+	LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4);
186
+	LL_RCC_PLL_EnableDomain_SYS();
187
+	LL_RCC_PLL_Enable();
188
+
189
+	/* Wait till PLL is ready */
190
+	while(LL_RCC_PLL_IsReady() != 1)
191
+	{
192
+
193
+	}
194
+	LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL);
195
+
196
+	/* Wait till System clock is ready */
197
+	while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL)
198
+	{
199
+
200
+	}
201
+	LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1);
202
+	LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1);
203
+	LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1);
204
+	LL_SetSystemCoreClock(24000000);
205
+
206
+	/* Update the time base */
207
+	if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK)
208
+	{
209
+		//    Error_Handler();
210
+	}
211
+}
212
+
213
+/**
214
+ * @brief System Clock Configuration
215
+ * @retval None
216
+ * 24Mhz + RTC + LSE
217
+ */
218
+void SystemClock_Config_24M_LSE(void)
219
+{
220
+	LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
221
+	LL_FLASH_SetLatency(LL_FLASH_LATENCY_1);
222
+	while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_1)
223
+	{
224
+	}
225
+	LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1);
226
+	LL_RCC_MSI_Enable();
227
+
228
+	/* Wait till MSI is ready */
229
+	while(LL_RCC_MSI_IsReady() != 1)
230
+	{
231
+
232
+	}
233
+
234
+	LL_PWR_EnableBkUpAccess();
235
+//	LL_RCC_ForceBackupDomainReset();
236
+	LL_RCC_ReleaseBackupDomainReset();
237
+	LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW);
238
+
239
+	LL_RCC_MSI_EnableRangeSelection();
240
+	LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6);
241
+	LL_RCC_MSI_SetCalibTrimming(0);
242
+	//  LL_RCC_MSI_EnablePLLMode();
243
+
244
+	LL_RCC_LSE_Enable();
245
+
246
+	/* Wait till LSE is ready */
247
+	while(LL_RCC_LSE_IsReady() != 1)
248
+	{
249
+
250
+	}
251
+	LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE);
252
+	LL_RCC_EnableRTC();
253
+
254
+	LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4);
255
+	LL_RCC_PLL_EnableDomain_SYS();
256
+	LL_RCC_PLL_Enable();
257
+
258
+	/* Wait till PLL is ready */
259
+	while(LL_RCC_PLL_IsReady() != 1)
260
+	{
261
+
262
+	}
263
+	LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL);
264
+
265
+	/* Wait till System clock is ready */
266
+	while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL)
267
+	{
268
+
269
+	}
270
+	LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1);
271
+	LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1);
272
+	LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1);
273
+	LL_SetSystemCoreClock(24000000);
274
+
275
+	/* Update the time base */
276
+	if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK)
277
+	{
278
+		//    Error_Handler();
279
+	}
280
+}
281
+
282
+
283
+void SystemClock_Config_80M(void)
284
+{
285
+	LL_FLASH_SetLatency(LL_FLASH_LATENCY_4);
286
+	while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_4)
287
+	{
288
+	}
289
+	LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1);
290
+	LL_RCC_MSI_Enable();
291
+
292
+	/* Wait till MSI is ready */
293
+	while(LL_RCC_MSI_IsReady() != 1)
294
+	{
295
+
296
+	}
297
+	LL_RCC_MSI_EnableRangeSelection();
298
+	LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6);
299
+	LL_RCC_MSI_SetCalibTrimming(0);
300
+	LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 40, LL_RCC_PLLR_DIV_2);
301
+	LL_RCC_PLL_EnableDomain_SYS();
302
+	LL_RCC_PLL_Enable();
303
+
304
+	/* Wait till PLL is ready */
305
+	while(LL_RCC_PLL_IsReady() != 1)
306
+	{
307
+
308
+	}
309
+	LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL);
310
+
311
+	/* Wait till System clock is ready */
312
+	while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL)
313
+	{
314
+
315
+	}
316
+	LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1);
317
+	LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1);
318
+	LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1);
319
+	LL_SetSystemCoreClock(80000000);
320
+
321
+	/* Update the time base */
322
+	if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK)
323
+	{
324
+		//    Error_Handler();
325
+	}
326
+}
327
+
328
+// partie commune a toutes les utilisations du wakeup timer
329
+static void RTC_wakeup_init( int delay )
330
+{
331
+LL_RTC_DisableWriteProtection( RTC );
332
+LL_RTC_WAKEUP_Disable( RTC );
333
+while	( !LL_RTC_IsActiveFlag_WUTW( RTC ) )
334
+	{ }
335
+// connecter le timer a l'horloge 1Hz de la RTC
336
+LL_RTC_WAKEUP_SetClock( RTC, LL_RTC_WAKEUPCLOCK_CKSPRE );
337
+// fixer la duree de temporisation
338
+LL_RTC_WAKEUP_SetAutoReload( RTC, delay );	// 16 bits
339
+LL_RTC_ClearFlag_WUT(RTC);
340
+LL_RTC_EnableIT_WUT(RTC);
341
+LL_RTC_WAKEUP_Enable(RTC);
342
+LL_RTC_EnableWriteProtection(RTC);
343
+}
344
+
345
+// Dans le cas des modes STANDBY et SHUTDOWN, le MPU sera reveille par reset
346
+// causé par 1 wakeup line (interne ou externe) (le NVIC n'est plus alimenté)
347
+void RTC_wakeup_init_from_standby_or_shutdown( int delay )
348
+{
349
+RTC_wakeup_init( delay );
350
+// enable the Internal Wake-up line
351
+LL_PWR_EnableInternWU();	// ceci ne concerne que Standby et Shutdown, pas STOPx
352
+}
353
+
354
+// Dans le cas des modes STOPx, le MPU sera reveille par interruption
355
+// le module EXTI et une partie du NVIC sont encore alimentes
356
+// le contenu de la RAM et des registres étant préservé, le MPU
357
+// reprend l'execution après l'instruction WFI
358
+void RTC_wakeup_init_from_stop( int delay )
359
+{
360
+RTC_wakeup_init( delay );
361
+// valider l'interrupt par la ligne 20 du module EXTI, qui est réservée au wakeup timer
362
+LL_EXTI_EnableIT_0_31( LL_EXTI_LINE_20 );
363
+LL_EXTI_EnableRisingTrig_0_31( LL_EXTI_LINE_20 );
364
+// valider l'interrupt chez NVIC
365
+NVIC_SetPriority( RTC_WKUP_IRQn, 1 );
366
+NVIC_EnableIRQ( RTC_WKUP_IRQn );
367
+}
368
+
369
+// wakeup timer interrupt Handler (inutile mais doit etre defini)
370
+void RTC_WKUP_IRQHandler()
371
+{
372
+LL_EXTI_ClearFlag_0_31( LL_EXTI_LINE_20 );
373
+}

PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/c0/a0303f18b828001b1d0af99b6389052e → PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/d4/c0b800278529001b114bfff082d965b2 View File

@@ -30,7 +30,7 @@ void SysTick_Handler()
30 30
 		msTicks = 0;
31 31
 		LED_GREEN(1);
32 32
 	}
33
-	if(expe == 2){
33
+	if(expe == 2 || expe == 4){
34 34
 		CLK_TOGGLE();
35 35
 	}
36 36
 }
@@ -290,3 +290,50 @@ void SystemClock_Config_80M(void)
290 290
 		//    Error_Handler();
291 291
 	}
292 292
 }
293
+
294
+// partie commune a toutes les utilisations du wakeup timer
295
+static void RTC_wakeup_init( int delay )
296
+{
297
+LL_RTC_DisableWriteProtection( RTC );
298
+LL_RTC_WAKEUP_Disable( RTC );
299
+while	( !LL_RTC_IsActiveFlag_WUTW( RTC ) )
300
+	{ }
301
+// connecter le timer a l'horloge 1Hz de la RTC
302
+LL_RTC_WAKEUP_SetClock( RTC, LL_RTC_WAKEUPCLOCK_CKSPRE );
303
+// fixer la duree de temporisation
304
+LL_RTC_WAKEUP_SetAutoReload( RTC, delay );	// 16 bits
305
+LL_RTC_ClearFlag_WUT(RTC);
306
+LL_RTC_EnableIT_WUT(RTC);
307
+LL_RTC_WAKEUP_Enable(RTC);
308
+LL_RTC_EnableWriteProtection(RTC);
309
+}
310
+
311
+// Dans le cas des modes STANDBY et SHUTDOWN, le MPU sera reveille par reset
312
+// causé par 1 wakeup line (interne ou externe) (le NVIC n'est plus alimenté)
313
+void RTC_wakeup_init_from_standby_or_shutdown( int delay )
314
+{
315
+RTC_wakeup_init( delay );
316
+// enable the Internal Wake-up line
317
+LL_PWR_EnableInternWU();	// ceci ne concerne que Standby et Shutdown, pas STOPx
318
+}
319
+
320
+// Dans le cas des modes STOPx, le MPU sera reveille par interruption
321
+// le module EXTI et une partie du NVIC sont encore alimentes
322
+// le contenu de la RAM et des registres étant préservé, le MPU
323
+// reprend l'execution après l'instruction WFI
324
+void RTC_wakeup_init_from_stop( int delay )
325
+{
326
+RTC_wakeup_init( delay );
327
+// valider l'interrupt par la ligne 20 du module EXTI, qui est réservée au wakeup timer
328
+LL_EXTI_EnableIT_0_31( LL_EXTI_LINE_20 );
329
+LL_EXTI_EnableRisingTrig_0_31( LL_EXTI_LINE_20 );
330
+// valider l'interrupt chez NVIC
331
+NVIC_SetPriority( RTC_WKUP_IRQn, 1 );
332
+NVIC_EnableIRQ( RTC_WKUP_IRQn );
333
+}
334
+
335
+// wakeup timer interrupt Handler (inutile mais doit etre defini)
336
+void RTC_WKUP_IRQHandler()
337
+{
338
+LL_EXTI_ClearFlag_0_31( LL_EXTI_LINE_20 );
339
+}

+ 0
- 216
PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/f0/30a6596bae28001b1d0af99b6389052e View File

@@ -1,216 +0,0 @@
1
-/* Project L476_ats_blink for STM32L476 mounted on Nucleo board:
2
- * the user LED (mounted on pin PA-5) is flashed every second for 50 ms.
3
- * The time base is provided by Systick (1000 ticks per second).
4
- * The clock configuration is the default one (Sysclk = 80 MHz, derived from MSI and PLL).
5
- */
6
-
7
-/* Includes ------------------------------------------------------------------*/
8
-#include "main.h"
9
-// #if defined(USE_FULL_ASSERT)
10
-// #include "stm32_assert.h"
11
-// #endif /* USE_FULL_ASSERT */
12
-
13
-#include "gpio.h"
14
-
15
-// systick interrupt handler
16
-volatile uint32_t msTicks = 0;
17
-volatile uint8_t expe = 2;
18
-volatile uint8_t blue_mode = 0;
19
-
20
-void SysTick_Handler()
21
-{
22
-  if	( BLUE_BUTTON() ){
23
-			blue_mode = 1 ;
24
-  }
25
-
26
-  msTicks++;                                                /* See startup file startup_LPC17xx.s for SysTick vector */
27
-  if (msTicks == 5 * expe){
28
-	  LED_GREEN(0);
29
-  }else if(msTicks >= 200){
30
-	  msTicks = 0;
31
-	  LED_GREEN(1);
32
-  }
33
- if(expe == 2){
34
-	 CLK_TOGGLE();
35
- }
36
-}
37
-
38
-
39
-
40
-
41
-int main(void)
42
-{
43
-//	if (RCC->BDCR & RCC_BDCR_LSEON) {
44
-//			LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
45
-//			LL_PWR_EnableBkUpAccess();
46
-//
47
-//			//expe = register RTC
48
-//			expe = RTC->BKP0R;
49
-//			if (expe == 0){
50
-//				expe = 1;
51
-//				RTC->BKP0R = expe;
52
-//			}else if (expe != 0 && BLUE_BUTTON()){
53
-//				expe ++;
54
-//				RTC->BKP0R = expe;
55
-//			}
56
-//	}else{
57
-//		SystemClock_Config_24M_LSE();
58
-//		expe = 1;
59
-//		LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
60
-//		LL_PWR_EnableBkUpAccess();
61
-//		RTC->BKP0R = expe;
62
-//	}
63
-//	LL_PWR_DisableBkUpAccess();
64
-	switch(expe){
65
-			case 1:
66
-				/* Configure the system clock */
67
-				SystemClock_Config_80M();
68
-				break;
69
-			case 2:
70
-				/* Configure the system clock */
71
-				SystemClock_Config_24M_LSE();
72
-				break;
73
-			}
74
-
75
-
76
-
77
-
78
-// config GPIO
79
-GPIO_init();
80
-
81
-// init systick timer (tick period at 1 ms)
82
-LL_Init1msTick( SystemCoreClock );
83
-LL_SYSTICK_EnableIT();
84
-
85
-//Setup Sleep mode
86
-LL_LPM_EnableSleep();
87
-//LL_LPM_EnableSleepOnExit();
88
-
89
-while (1)  {
90
-	if (blue_mode){
91
-		switch(expe){
92
-					case 1:
93
-						__WFI();
94
-						break;
95
-					case 2:
96
-						LL_RCC_MSI_EnablePLLMode();
97
-						break;
98
-					}
99
-
100
-		}
101
-	}
102
-}
103
-
104
-/**
105
-  * @brief System Clock Configuration
106
-  * @retval None
107
-  * 24Mhz + RTC + LSE
108
-  */
109
-void SystemClock_Config_24M_LSE(void)
110
-{
111
-  LL_FLASH_SetLatency(LL_FLASH_LATENCY_1);
112
-  while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_1)
113
-  {
114
-  }
115
-  LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1);
116
-  LL_RCC_MSI_Enable();
117
-
118
-   /* Wait till MSI is ready */
119
-  while(LL_RCC_MSI_IsReady() != 1)
120
-  {
121
-
122
-  }
123
-
124
-  LL_PWR_EnableBkUpAccess();
125
-  LL_RCC_ForceBackupDomainReset();
126
-  LL_RCC_ReleaseBackupDomainReset();
127
-  LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW);
128
-
129
-  LL_RCC_MSI_EnableRangeSelection();
130
-  LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6);
131
-  LL_RCC_MSI_SetCalibTrimming(0);
132
-//  LL_RCC_MSI_EnablePLLMode();
133
-
134
-  LL_RCC_LSE_Enable();
135
-
136
-      /* Wait till LSE is ready */
137
-     while(LL_RCC_LSE_IsReady() != 1)
138
-     {
139
-
140
-     }
141
-    LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE);
142
-    LL_RCC_EnableRTC();
143
-
144
-  LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4);
145
-  LL_RCC_PLL_EnableDomain_SYS();
146
-  LL_RCC_PLL_Enable();
147
-
148
-   /* Wait till PLL is ready */
149
-  while(LL_RCC_PLL_IsReady() != 1)
150
-  {
151
-
152
-  }
153
-  LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL);
154
-
155
-   /* Wait till System clock is ready */
156
-  while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL)
157
-  {
158
-
159
-  }
160
-  LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1);
161
-  LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1);
162
-  LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1);
163
-  LL_SetSystemCoreClock(24000000);
164
-
165
-   /* Update the time base */
166
-  if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK)
167
-  {
168
-//    Error_Handler();
169
-  }
170
-}
171
-
172
-
173
-void SystemClock_Config_80M(void)
174
-{
175
-  LL_FLASH_SetLatency(LL_FLASH_LATENCY_4);
176
-  while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_4)
177
-  {
178
-  }
179
-  LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1);
180
-  LL_RCC_MSI_Enable();
181
-
182
-   /* Wait till MSI is ready */
183
-  while(LL_RCC_MSI_IsReady() != 1)
184
-  {
185
-
186
-  }
187
-  LL_RCC_MSI_EnableRangeSelection();
188
-  LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6);
189
-  LL_RCC_MSI_SetCalibTrimming(0);
190
-  LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 40, LL_RCC_PLLR_DIV_2);
191
-  LL_RCC_PLL_EnableDomain_SYS();
192
-  LL_RCC_PLL_Enable();
193
-
194
-   /* Wait till PLL is ready */
195
-  while(LL_RCC_PLL_IsReady() != 1)
196
-  {
197
-
198
-  }
199
-  LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL);
200
-
201
-   /* Wait till System clock is ready */
202
-  while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL)
203
-  {
204
-
205
-  }
206
-  LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1);
207
-  LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1);
208
-  LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1);
209
-  LL_SetSystemCoreClock(80000000);
210
-
211
-   /* Update the time base */
212
-  if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK)
213
-  {
214
-//    Error_Handler();
215
-  }
216
-}

PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/fd/00deef80b428001b1d0af99b6389052e → PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/f2/80b0dd708829001b114bfff082d965b2 View File

@@ -30,7 +30,7 @@ void SysTick_Handler()
30 30
 		msTicks = 0;
31 31
 		LED_GREEN(1);
32 32
 	}
33
-	if(expe == 2){
33
+	if(expe == 2 || expe == 4){
34 34
 		CLK_TOGGLE();
35 35
 	}
36 36
 }
@@ -45,37 +45,73 @@ int main(void)
45 45
 	// config GPIO
46 46
 	GPIO_init();
47 47
 
48
-	if (RCC->BDCR & RCC_BDCR_LSEON) {
48
+//	if (RCC->BDCR & RCC_BDCR_LSEON) {
49 49
 		LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
50 50
 		LL_PWR_EnableBkUpAccess();
51 51
 
52 52
 		//expe = register RTC
53 53
 		expe = RTC->BKP0R;
54
+		if (expe == 0) {
55
+			SystemClock_Config_24M_LSE();
56
+			expe = 1;
57
+			LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
58
+			LL_PWR_EnableBkUpAccess();
59
+			RTC->BKP0R = expe;
60
+		}
54 61
 
55 62
 		if (BLUE_BUTTON()){
56 63
 
57 64
 			expe ++;
58 65
 
59
-			if (expe > 2) expe = 1;
66
+			if (expe > 7) expe = 1;
60 67
 			RTC->BKP0R = expe;
61 68
 		}
62
-	}else{
63
-		SystemClock_Config_24M_LSE();
64
-		expe = 1;
65
-		LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
66
-		LL_PWR_EnableBkUpAccess();
67
-		RTC->BKP0R = expe;
68
-	}
69
+//	}else{
70
+
71
+//	}
69 72
 	LL_PWR_DisableBkUpAccess();
70 73
 	switch(expe){
71 74
 	case 1:
75
+
72 76
 		/* Configure the system clock */
73 77
 		SystemClock_Config_80M();
78
+		//Setup Sleep mode
79
+		LL_LPM_EnableSleep();
74 80
 		break;
75 81
 	case 2:
76 82
 		/* Configure the system clock */
77 83
 		SystemClock_Config_24M_LSE();
78 84
 		break;
85
+	case 3:
86
+		SystemClock_Config_24M_LSE_FL3_VS2();
87
+		LL_LPM_EnableSleep();
88
+		break;
89
+	case 4:
90
+		SystemClock_Config_24M_LSE_FL3_VS2();
91
+	case 5:
92
+		SystemClock_Config_24M_LSE_FL3_VS2();
93
+		RTC_wakeup_init_from_stop(20);
94
+		LL_PWR_SetPowerMode(LL_PWR_MODE_STOP0);
95
+		LL_LPM_EnableDeepSleep();
96
+		break;
97
+	case 6:
98
+		SystemClock_Config_24M_LSE_FL3_VS2();
99
+		RTC_wakeup_init_from_stop(20);
100
+		LL_PWR_SetPowerMode(LL_PWR_MODE_STOP1);
101
+		LL_LPM_EnableDeepSleep();
102
+		break;
103
+	case 7:
104
+		SystemClock_Config_24M_LSE_FL3_VS2();
105
+		RTC_wakeup_init_from_stop(20);
106
+		LL_PWR_SetPowerMode(LL_PWR_MODE_STOP2);
107
+		LL_LPM_EnableDeepSleep();
108
+		break;
109
+	case 8:
110
+		SystemClock_Config_24M_LSE_FL3_VS2();
111
+		RTC_wakeup_init_from_standby_or_shutdown(20);
112
+		LL_PWR_SetPowerMode(LL_PWR_MODE_SHUTDOWN);
113
+		LL_LPM_EnableDeepSleep();
114
+		break;
79 115
 	}
80 116
 
81 117
 
@@ -83,25 +119,92 @@ int main(void)
83 119
 	LL_Init1msTick( SystemCoreClock );
84 120
 	LL_SYSTICK_EnableIT();
85 121
 
86
-	//Setup Sleep mode
87
-	LL_LPM_EnableSleep();
122
+
88 123
 	//LL_LPM_EnableSleepOnExit();
89 124
 
90 125
 	while (1)  {
91 126
 		if (blue_mode){
92 127
 			switch(expe){
93 128
 			case 1:
129
+			case 3:
94 130
 				__WFI();
95 131
 				break;
132
+
96 133
 			case 2:
134
+			case 4:
97 135
 				LL_RCC_MSI_EnablePLLMode();
98 136
 				break;
137
+
138
+
99 139
 			}
100 140
 
101 141
 		}
102 142
 	}
103 143
 }
104 144
 
145
+void SystemClock_Config_24M_LSE_FL3_VS2(void){
146
+	LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
147
+	LL_FLASH_SetLatency(LL_FLASH_LATENCY_3);
148
+	while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_3)
149
+	{
150
+	}
151
+	LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE2);
152
+	LL_RCC_MSI_Enable();
153
+
154
+	/* Wait till MSI is ready */
155
+	while(LL_RCC_MSI_IsReady() != 1)
156
+	{
157
+
158
+	}
159
+
160
+	LL_PWR_EnableBkUpAccess();
161
+//	LL_RCC_ForceBackupDomainReset();
162
+	LL_RCC_ReleaseBackupDomainReset();
163
+	LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW);
164
+
165
+	LL_RCC_MSI_EnableRangeSelection();
166
+	LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6);
167
+	LL_RCC_MSI_SetCalibTrimming(0);
168
+	//  LL_RCC_MSI_EnablePLLMode();
169
+
170
+	LL_RCC_LSE_Enable();
171
+
172
+	/* Wait till LSE is ready */
173
+	while(LL_RCC_LSE_IsReady() != 1)
174
+	{
175
+
176
+	}
177
+	LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE);
178
+	LL_RCC_EnableRTC();
179
+
180
+	LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4);
181
+	LL_RCC_PLL_EnableDomain_SYS();
182
+	LL_RCC_PLL_Enable();
183
+
184
+	/* Wait till PLL is ready */
185
+	while(LL_RCC_PLL_IsReady() != 1)
186
+	{
187
+
188
+	}
189
+	LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL);
190
+
191
+	/* Wait till System clock is ready */
192
+	while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL)
193
+	{
194
+
195
+	}
196
+	LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1);
197
+	LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1);
198
+	LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1);
199
+	LL_SetSystemCoreClock(24000000);
200
+
201
+	/* Update the time base */
202
+	if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK)
203
+	{
204
+		//    Error_Handler();
205
+	}
206
+}
207
+
105 208
 /**
106 209
  * @brief System Clock Configuration
107 210
  * @retval None
@@ -216,3 +319,50 @@ void SystemClock_Config_80M(void)
216 319
 		//    Error_Handler();
217 320
 	}
218 321
 }
322
+
323
+// partie commune a toutes les utilisations du wakeup timer
324
+static void RTC_wakeup_init( int delay )
325
+{
326
+LL_RTC_DisableWriteProtection( RTC );
327
+LL_RTC_WAKEUP_Disable( RTC );
328
+while	( !LL_RTC_IsActiveFlag_WUTW( RTC ) )
329
+	{ }
330
+// connecter le timer a l'horloge 1Hz de la RTC
331
+LL_RTC_WAKEUP_SetClock( RTC, LL_RTC_WAKEUPCLOCK_CKSPRE );
332
+// fixer la duree de temporisation
333
+LL_RTC_WAKEUP_SetAutoReload( RTC, delay );	// 16 bits
334
+LL_RTC_ClearFlag_WUT(RTC);
335
+LL_RTC_EnableIT_WUT(RTC);
336
+LL_RTC_WAKEUP_Enable(RTC);
337
+LL_RTC_EnableWriteProtection(RTC);
338
+}
339
+
340
+// Dans le cas des modes STANDBY et SHUTDOWN, le MPU sera reveille par reset
341
+// causé par 1 wakeup line (interne ou externe) (le NVIC n'est plus alimenté)
342
+void RTC_wakeup_init_from_standby_or_shutdown( int delay )
343
+{
344
+RTC_wakeup_init( delay );
345
+// enable the Internal Wake-up line
346
+LL_PWR_EnableInternWU();	// ceci ne concerne que Standby et Shutdown, pas STOPx
347
+}
348
+
349
+// Dans le cas des modes STOPx, le MPU sera reveille par interruption
350
+// le module EXTI et une partie du NVIC sont encore alimentes
351
+// le contenu de la RAM et des registres étant préservé, le MPU
352
+// reprend l'execution après l'instruction WFI
353
+void RTC_wakeup_init_from_stop( int delay )
354
+{
355
+RTC_wakeup_init( delay );
356
+// valider l'interrupt par la ligne 20 du module EXTI, qui est réservée au wakeup timer
357
+LL_EXTI_EnableIT_0_31( LL_EXTI_LINE_20 );
358
+LL_EXTI_EnableRisingTrig_0_31( LL_EXTI_LINE_20 );
359
+// valider l'interrupt chez NVIC
360
+NVIC_SetPriority( RTC_WKUP_IRQn, 1 );
361
+NVIC_EnableIRQ( RTC_WKUP_IRQn );
362
+}
363
+
364
+// wakeup timer interrupt Handler (inutile mais doit etre defini)
365
+void RTC_WKUP_IRQHandler()
366
+{
367
+LL_EXTI_ClearFlag_0_31( LL_EXTI_LINE_20 );
368
+}

+ 374
- 0
PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.history/f4/7018f0108d29001b114bfff082d965b2 View File

@@ -0,0 +1,374 @@
1
+/* Project L476_ats_blink for STM32L476 mounted on Nucleo board:
2
+ * the user LED (mounted on pin PA-5) is flashed every second for 50 ms.
3
+ * The time base is provided by Systick (1000 ticks per second).
4
+ * The clock configuration is the default one (Sysclk = 80 MHz, derived from MSI and PLL).
5
+ */
6
+
7
+/* Includes ------------------------------------------------------------------*/
8
+#include "main.h"
9
+// #if defined(USE_FULL_ASSERT)
10
+// #include "stm32_assert.h"
11
+// #endif /* USE_FULL_ASSERT */
12
+
13
+#include "gpio.h"
14
+
15
+// systick interrupt handler
16
+volatile uint32_t msTicks = 0;
17
+volatile uint8_t expe = 0;
18
+volatile uint8_t blue_mode = 0;
19
+
20
+void SysTick_Handler()
21
+{
22
+	if	( BLUE_BUTTON() ){
23
+		blue_mode = 1 ;
24
+	}
25
+
26
+	msTicks++;                                                /* See startup file startup_LPC17xx.s for SysTick vector */
27
+	if (msTicks == 5 * expe){
28
+		LED_GREEN(0);
29
+	}else if(msTicks >= 200){
30
+		msTicks = 0;
31
+		LED_GREEN(1);
32
+	}
33
+	if(expe == 2 || expe == 4){
34
+		CLK_TOGGLE();
35
+	}
36
+}
37
+
38
+
39
+
40
+
41
+int main(void)
42
+{
43
+
44
+
45
+	// config GPIO
46
+	GPIO_init();
47
+
48
+//	if (RCC->BDCR & RCC_BDCR_LSEON) {
49
+		LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
50
+		LL_PWR_EnableBkUpAccess();
51
+
52
+		//expe = register RTC
53
+		expe = RTC->BKP0R;
54
+		if (expe == 0) {
55
+			SystemClock_Config_24M_LSE();
56
+			expe = 1;
57
+			LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
58
+			LL_PWR_EnableBkUpAccess();
59
+			RTC->BKP0R = expe;
60
+		}
61
+
62
+		if (BLUE_BUTTON()){
63
+
64
+			expe ++;
65
+
66
+			if (expe > 8) expe = 1;
67
+			RTC->BKP0R = expe;
68
+		}
69
+//	}else{
70
+
71
+//	}
72
+	LL_PWR_DisableBkUpAccess();
73
+	switch(expe){
74
+	case 1:
75
+
76
+		/* Configure the system clock */
77
+		SystemClock_Config_80M();
78
+		//Setup Sleep mode
79
+		LL_LPM_EnableSleep();
80
+		break;
81
+	case 2:
82
+		/* Configure the system clock */
83
+		SystemClock_Config_24M_LSE();
84
+		break;
85
+	case 3:
86
+		SystemClock_Config_24M_LSE_FL3_VS2();
87
+		LL_LPM_EnableSleep();
88
+		break;
89
+	case 4:
90
+		SystemClock_Config_24M_LSE_FL3_VS2();
91
+	case 5:
92
+		SystemClock_Config_24M_LSE_FL3_VS2();
93
+		RTC_wakeup_init_from_stop(20);
94
+		LL_PWR_SetPowerMode(LL_PWR_MODE_STOP0);
95
+		LL_LPM_EnableDeepSleep();
96
+		break;
97
+	case 6:
98
+		SystemClock_Config_24M_LSE_FL3_VS2();
99
+		RTC_wakeup_init_from_stop(20);
100
+		LL_PWR_SetPowerMode(LL_PWR_MODE_STOP1);
101
+		LL_LPM_EnableDeepSleep();
102
+		break;
103
+	case 7:
104
+		SystemClock_Config_24M_LSE_FL3_VS2();
105
+		RTC_wakeup_init_from_stop(20);
106
+		LL_PWR_SetPowerMode(LL_PWR_MODE_STOP2);
107
+		LL_LPM_EnableDeepSleep();
108
+		break;
109
+	case 8:
110
+		SystemClock_Config_24M_LSE_FL3_VS2();
111
+		RTC_wakeup_init_from_standby_or_shutdown(10);
112
+		LL_PWR_SetPowerMode(LL_PWR_MODE_SHUTDOWN);
113
+		LL_LPM_EnableDeepSleep();
114
+		break;
115
+	}
116
+
117
+
118
+	// init systick timer (tick period at 1 ms)
119
+	LL_Init1msTick( SystemCoreClock );
120
+	LL_SYSTICK_EnableIT();
121
+
122
+
123
+	//LL_LPM_EnableSleepOnExit();
124
+
125
+	while (1)  {
126
+		if (blue_mode){
127
+			switch(expe){
128
+			case 5:
129
+			case 6:
130
+			case 7:
131
+				__WFI();
132
+				blue_mode = 0;
133
+				break;
134
+			case 1:
135
+			case 3:
136
+			case 8:
137
+				__WFI();
138
+				break;
139
+			case 2:
140
+			case 4:
141
+				LL_RCC_MSI_EnablePLLMode();
142
+				break;
143
+
144
+
145
+			}
146
+
147
+		}
148
+	}
149
+}
150
+
151
+void SystemClock_Config_24M_LSE_FL3_VS2(void){
152
+	LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
153
+	LL_FLASH_SetLatency(LL_FLASH_LATENCY_3);
154
+	while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_3)
155
+	{
156
+	}
157
+	LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE2);
158
+	LL_RCC_MSI_Enable();
159
+
160
+	/* Wait till MSI is ready */
161
+	while(LL_RCC_MSI_IsReady() != 1)
162
+	{
163
+
164
+	}
165
+
166
+	LL_PWR_EnableBkUpAccess();
167
+//	LL_RCC_ForceBackupDomainReset();
168
+	LL_RCC_ReleaseBackupDomainReset();
169
+	LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW);
170
+
171
+	LL_RCC_MSI_EnableRangeSelection();
172
+	LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6);
173
+	LL_RCC_MSI_SetCalibTrimming(0);
174
+	//  LL_RCC_MSI_EnablePLLMode();
175
+
176
+	LL_RCC_LSE_Enable();
177
+
178
+	/* Wait till LSE is ready */
179
+	while(LL_RCC_LSE_IsReady() != 1)
180
+	{
181
+
182
+	}
183
+	LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE);
184
+	LL_RCC_EnableRTC();
185
+
186
+	LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4);
187
+	LL_RCC_PLL_EnableDomain_SYS();
188
+	LL_RCC_PLL_Enable();
189
+
190
+	/* Wait till PLL is ready */
191
+	while(LL_RCC_PLL_IsReady() != 1)
192
+	{
193
+
194
+	}
195
+	LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL);
196
+
197
+	/* Wait till System clock is ready */
198
+	while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL)
199
+	{
200
+
201
+	}
202
+	LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1);
203
+	LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1);
204
+	LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1);
205
+	LL_SetSystemCoreClock(24000000);
206
+
207
+	/* Update the time base */
208
+	if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK)
209
+	{
210
+		//    Error_Handler();
211
+	}
212
+}
213
+
214
+/**
215
+ * @brief System Clock Configuration
216
+ * @retval None
217
+ * 24Mhz + RTC + LSE
218
+ */
219
+void SystemClock_Config_24M_LSE(void)
220
+{
221
+	LL_APB1_GRP1_EnableClock( LL_APB1_GRP1_PERIPH_PWR );
222
+	LL_FLASH_SetLatency(LL_FLASH_LATENCY_1);
223
+	while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_1)
224
+	{
225
+	}
226
+	LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1);
227
+	LL_RCC_MSI_Enable();
228
+
229
+	/* Wait till MSI is ready */
230
+	while(LL_RCC_MSI_IsReady() != 1)
231
+	{
232
+
233
+	}
234
+
235
+	LL_PWR_EnableBkUpAccess();
236
+//	LL_RCC_ForceBackupDomainReset();
237
+	LL_RCC_ReleaseBackupDomainReset();
238
+	LL_RCC_LSE_SetDriveCapability(LL_RCC_LSEDRIVE_LOW);
239
+
240
+	LL_RCC_MSI_EnableRangeSelection();
241
+	LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6);
242
+	LL_RCC_MSI_SetCalibTrimming(0);
243
+	//  LL_RCC_MSI_EnablePLLMode();
244
+
245
+	LL_RCC_LSE_Enable();
246
+
247
+	/* Wait till LSE is ready */
248
+	while(LL_RCC_LSE_IsReady() != 1)
249
+	{
250
+
251
+	}
252
+	LL_RCC_SetRTCClockSource(LL_RCC_RTC_CLKSOURCE_LSE);
253
+	LL_RCC_EnableRTC();
254
+
255
+	LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 24, LL_RCC_PLLR_DIV_4);
256
+	LL_RCC_PLL_EnableDomain_SYS();
257
+	LL_RCC_PLL_Enable();
258
+
259
+	/* Wait till PLL is ready */
260
+	while(LL_RCC_PLL_IsReady() != 1)
261
+	{
262
+
263
+	}
264
+	LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL);
265
+
266
+	/* Wait till System clock is ready */
267
+	while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL)
268
+	{
269
+
270
+	}
271
+	LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1);
272
+	LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1);
273
+	LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1);
274
+	LL_SetSystemCoreClock(24000000);
275
+
276
+	/* Update the time base */
277
+	if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK)
278
+	{
279
+		//    Error_Handler();
280
+	}
281
+}
282
+
283
+
284
+void SystemClock_Config_80M(void)
285
+{
286
+	LL_FLASH_SetLatency(LL_FLASH_LATENCY_4);
287
+	while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_4)
288
+	{
289
+	}
290
+	LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1);
291
+	LL_RCC_MSI_Enable();
292
+
293
+	/* Wait till MSI is ready */
294
+	while(LL_RCC_MSI_IsReady() != 1)
295
+	{
296
+
297
+	}
298
+	LL_RCC_MSI_EnableRangeSelection();
299
+	LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6);
300
+	LL_RCC_MSI_SetCalibTrimming(0);
301
+	LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_MSI, LL_RCC_PLLM_DIV_1, 40, LL_RCC_PLLR_DIV_2);
302
+	LL_RCC_PLL_EnableDomain_SYS();
303
+	LL_RCC_PLL_Enable();
304
+
305
+	/* Wait till PLL is ready */
306
+	while(LL_RCC_PLL_IsReady() != 1)
307
+	{
308
+
309
+	}
310
+	LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL);
311
+
312
+	/* Wait till System clock is ready */
313
+	while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL)
314
+	{
315
+
316
+	}
317
+	LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1);
318
+	LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1);
319
+	LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_1);
320
+	LL_SetSystemCoreClock(80000000);
321
+
322
+	/* Update the time base */
323
+	if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK)
324
+	{
325
+		//    Error_Handler();
326
+	}
327
+}
328
+
329
+// partie commune a toutes les utilisations du wakeup timer
330
+static void RTC_wakeup_init( int delay )
331
+{
332
+LL_RTC_DisableWriteProtection( RTC );
333
+LL_RTC_WAKEUP_Disable( RTC );
334
+while	( !LL_RTC_IsActiveFlag_WUTW( RTC ) )
335
+	{ }
336
+// connecter le timer a l'horloge 1Hz de la RTC
337
+LL_RTC_WAKEUP_SetClock( RTC, LL_RTC_WAKEUPCLOCK_CKSPRE );
338
+// fixer la duree de temporisation
339
+LL_RTC_WAKEUP_SetAutoReload( RTC, delay );	// 16 bits
340
+LL_RTC_ClearFlag_WUT(RTC);
341
+LL_RTC_EnableIT_WUT(RTC);
342
+LL_RTC_WAKEUP_Enable(RTC);
343
+LL_RTC_EnableWriteProtection(RTC);
344
+}
345
+
346
+// Dans le cas des modes STANDBY et SHUTDOWN, le MPU sera reveille par reset
347
+// causé par 1 wakeup line (interne ou externe) (le NVIC n'est plus alimenté)
348
+void RTC_wakeup_init_from_standby_or_shutdown( int delay )
349
+{
350
+RTC_wakeup_init( delay );
351
+// enable the Internal Wake-up line
352
+LL_PWR_EnableInternWU();	// ceci ne concerne que Standby et Shutdown, pas STOPx
353
+}
354
+
355
+// Dans le cas des modes STOPx, le MPU sera reveille par interruption
356
+// le module EXTI et une partie du NVIC sont encore alimentes
357
+// le contenu de la RAM et des registres étant préservé, le MPU
358
+// reprend l'execution après l'instruction WFI
359
+void RTC_wakeup_init_from_stop( int delay )
360
+{
361
+RTC_wakeup_init( delay );
362
+// valider l'interrupt par la ligne 20 du module EXTI, qui est réservée au wakeup timer
363
+LL_EXTI_EnableIT_0_31( LL_EXTI_LINE_20 );
364
+LL_EXTI_EnableRisingTrig_0_31( LL_EXTI_LINE_20 );
365
+// valider l'interrupt chez NVIC
366
+NVIC_SetPriority( RTC_WKUP_IRQn, 1 );
367
+NVIC_EnableIRQ( RTC_WKUP_IRQn );
368
+}
369
+
370
+// wakeup timer interrupt Handler (inutile mais doit etre defini)
371
+void RTC_WKUP_IRQHandler()
372
+{
373
+LL_EXTI_ClearFlag_0_31( LL_EXTI_LINE_20 );
374
+}

BIN
PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.projects/RealOne/.indexes/bf/be/history.index View File


BIN
PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.projects/RealOne/.indexes/bf/c4/history.index View File


BIN
PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.projects/RealOne/.indexes/d5/0/be/properties.index View File


BIN
PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.projects/RealOne/.indexes/d5/0/c4/properties.index View File


BIN
PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.projects/RealOne/.indexes/d5/13/76/61/53/78/properties.index View File


BIN
PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.projects/RealOne/.indexes/properties.index View File


BIN
PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.projects/RealOne/.markers View File


BIN
PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.projects/RealOne/.markers.snap View File


BIN
PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.projects/RealOne/.syncinfo.snap View File


BIN
PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.projects/RemoteSystemsTempFiles/.markers.snap View File


BIN
PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.projects/RemoteSystemsTempFiles/.syncinfo.snap View File


+ 0
- 1
PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/history.version View File

@@ -1 +0,0 @@
1
-

BIN
PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index View File


+ 0
- 1
PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.version View File

@@ -1 +0,0 @@
1
-

BIN
PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.root/.markers.snap View File


BIN
PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources View File


BIN
PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.resources/4.snap View File


+ 0
- 3
PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.runtime/.settings/com.st.stm32cube.common.preferences.prefs View File

@@ -1,3 +0,0 @@
1
-DeviceConfigurationTool.AskToSwitchToCubeMxPerspective=false
2
-DeviceConfigurationTool.SwitchToCubeMxPerspective=true
3
-eclipse.preferences.version=1

+ 0
- 7
PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.cdt.debug.ui.prefs View File

@@ -1,7 +0,0 @@
1
-columnOrderKeyEXE=0,1,2,3,4,5
2
-columnOrderKeySF=0,1,2,3,4,5
3
-columnSortDirectionKeyEXE=128
4
-columnSortDirectionKeySF=128
5
-eclipse.preferences.version=1
6
-visibleColumnsKeyEXE=1,1,1,0,0,0
7
-visibleColumnsKeySF=1,1,0,0,0,0

+ 0
- 2
PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.cdt.dsf.ui.prefs View File

@@ -1,2 +0,0 @@
1
-eclipse.preferences.version=1
2
-useAnnotationsPrefPage=true

+ 0
- 1
PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.cdt.managedbuilder.core.prefs View File

@@ -1,3 +1,2 @@
1 1
 eclipse.preferences.version=1
2 2
 properties/L476_ats_blink-master.null.288482210/com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.1993574618=com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.994264857\=rebuildState\\\=false\\r\\n\r\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.size.91709690\=rebuildState\\\=false\\r\\n\r\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.archiver.1202888461\=rebuildState\\\=false\\r\\n\r\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.toolchain.exe.debug.625023476\=rebuildState\\\=false\\r\\n\r\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objdump.listfile.63586621\=rebuildState\\\=false\\r\\n\r\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.1360455809\=rebuildState\\\=false\\r\\n\r\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.srec.1067399580\=rebuildState\\\=false\\r\\n\r\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.1553682211\=rebuildState\\\=false\\r\\n\r\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.1993574618\=rcState\\\=0\\r\\nrebuildState\\\=false\\r\\n\r\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.verilog.1727439865\=rebuildState\\\=false\\r\\n\r\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.binary.364289998\=rebuildState\\\=false\\r\\n\r\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.609578370\=rebuildState\\\=false\\r\\n\r\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.symbolsrec.429240276\=rebuildState\\\=false\\r\\n\r\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.hex.853959268\=rebuildState\\\=false\\r\\n\r\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.linker.424373827\=rebuildState\\\=false\\r\\n\r\n
3
-properties/L476_ats_blink-master.null.288482210/com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.1139819027=com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.verilog.1581129723\=rebuildState\\\=true\\r\\n\r\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.binary.1387555249\=rebuildState\\\=true\\r\\n\r\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objdump.listfile.2118805013\=rebuildState\\\=true\\r\\n\r\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.144237511\=rebuildState\\\=true\\r\\n\r\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.829735460\=rebuildState\\\=true\\r\\n\r\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.symbolsrec.284733610\=rebuildState\\\=true\\r\\n\r\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.442331978\=rebuildState\\\=true\\r\\n\r\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.toolchain.exe.release.1703995923\=rebuildState\\\=true\\r\\n\r\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.archiver.972505564\=rebuildState\\\=true\\r\\n\r\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.hex.1321327754\=rebuildState\\\=true\\r\\n\r\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.srec.680088270\=rebuildState\\\=true\\r\\n\r\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.237074260\=rebuildState\\\=true\\r\\n\r\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.size.1681344170\=rebuildState\\\=true\\r\\n\r\ncom.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.linker.1140645243\=rebuildState\\\=true\\r\\n\r\n

+ 0
- 5
PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.cdt.ui.prefs View File

@@ -1,5 +0,0 @@
1
-eclipse.preferences.version=1
2
-spelling_locale=en_GB
3
-spelling_locale_initialized=true
4
-useAnnotationsPrefPage=true
5
-useQuickDiffPrefPage=true

+ 0
- 2
PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.debug.core.prefs View File

@@ -1,7 +1,5 @@
1
-//org.eclipse.debug.core.PREFERRED_DELEGATES/org.eclipse.cdt.debug.gdbjtag.launchConfigurationType=org.eclipse.cdt.debug.gdbjtag.core.dsfLaunchDelegate,debug,;
2 1
 //org.eclipse.debug.core.PREFERRED_DELEGATES/org.eclipse.cdt.launch.applicationLaunchType=org.eclipse.cdt.dsf.gdb.launch.localCLaunch,debug,;org.eclipse.cdt.cdi.launch.localCLaunch,run,;
3 2
 //org.eclipse.debug.core.PREFERRED_DELEGATES/org.eclipse.cdt.launch.attachLaunchType=org.eclipse.cdt.dsf.gdb.launch.attachCLaunch,debug,;
4 3
 //org.eclipse.debug.core.PREFERRED_DELEGATES/org.eclipse.cdt.launch.postmortemLaunchType=org.eclipse.cdt.dsf.gdb.launch.coreCLaunch,debug,;
5 4
 //org.eclipse.debug.core.PREFERRED_DELEGATES/org.eclipse.cdt.launch.remoteApplicationLaunchType=org.eclipse.rse.remotecdt.dsf.debug,debug,;
6 5
 eclipse.preferences.version=1
7
-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-&gt;BKP0R"/>\r\n</watchExpressions>\r\n

+ 0
- 5
PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.debug.ui.prefs View File

@@ -1,8 +1,3 @@
1 1
 eclipse.preferences.version=1
2
-org.eclipse.debug.ui.MemoryView.orientation=0
3 2
 org.eclipse.debug.ui.PREF_LAUNCH_PERSPECTIVES=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?>\r\n<launchPerspectives/>\r\n
4
-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
5
-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>
6
-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>
7
-preferredDetailPanes=NumberFormatPane\:NumberFormatPane|DefaultDetailPane\:DefaultDetailPane|
8 3
 preferredTargets=org.eclipse.cdt.debug.ui.toggleCBreakpointTarget,org.eclipse.cdt.debug.ui.toggleCDynamicPrintfTarget\:org.eclipse.cdt.debug.ui.toggleCBreakpointTarget|

+ 0
- 1
PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.launchbar.core.prefs View File

@@ -5,4 +5,3 @@ configDescList=org.eclipse.cdt.dsf.gdb.gdbRemotedescriptorType\:L476_ats_blink-m
5 5
 eclipse.preferences.version=1
6 6
 org.eclipse.cdt.dsf.gdb.gdbRemotedescriptorType\:L476_ats_blink-master\ Debug/activeLaunchMode=run
7 7
 org.eclipse.cdt.dsf.gdb.gdbRemotedescriptorType\:L476_ats_blink-master\ Debug/activeLaunchTarget=null\:---
8
-org.eclipse.cdt.dsf.gdb.gdbRemotedescriptorType\:RealOne\ Debug/activeLaunchMode=run

+ 0
- 1
PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.rse.core.prefs View File

@@ -1,4 +1,3 @@
1 1
 activeuserprofiles=DESKTOP-9AR6HHQ;Team
2 2
 eclipse.preferences.version=1
3 3
 org.eclipse.rse.systemtype.local.systemType.defaultUserId=camer
4
-useridperkey=DESKTOP-9AR6HHQ.Local\=camer;

+ 0
- 2
PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.editors.prefs View File

@@ -1,2 +0,0 @@
1
-eclipse.preferences.version=1
2
-overviewRuler_migration=migrated_3.1

+ 0
- 6
PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs View File

@@ -1,6 +0,0 @@
1
-PROBLEMS_FILTERS_MIGRATE=true
2
-TASKS_FILTERS_MIGRATE=true
3
-eclipse.preferences.version=1
4
-platformState=1604477333731
5
-quickStart=false
6
-tipsAndTricks=true

+ 0
- 2
PlaygroundYoupi/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.workbench.prefs View File

@@ -1,4 +1,2 @@
1
-//org.eclipse.ui.commands/state/com.st.stm32cube.ide.mcu.buildanalyzer.showstate/org.eclipse.ui.commands.radioState=human
2
-//org.eclipse.ui.commands/state/org.eclipse.ui.navigator.resources.nested.changeProjectPresentation/org.eclipse.ui.commands.radioState=false
3 1
 UIActivities.org.eclipse.cdt.debug.dsfgdbActivity=true
4 2
 eclipse.preferences.version=1

+ 0
- 13
PlaygroundYoupi/.metadata/.plugins/org.eclipse.debug.ui/dialog_settings.xml View File

@@ -1,13 +0,0 @@
1
-<?xml version="1.0" encoding="UTF-8"?>
2
-<section name="Workbench">
3
-	<section name="org.eclipse.debug.ui.SCOPED_SAVE_SELECTION_DIALOG">
4
-		<item key="DIALOG_WIDTH" value="343"/>
5
-		<item key="DIALOG_HEIGHT" value="434"/>
6
-		<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"/>
7
-	</section>
8
-	<section name="org.eclipse.debug.ui.LAUNCH_CONFIGURATION_PROPERTIES_DIALOG_SECTION">
9
-		<item key="DIALOG_WIDTH" value="883"/>
10
-		<item key="DIALOG_HEIGHT" value="702"/>
11
-		<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"/>
12
-	</section>
13
-</section>

+ 1274
- 1280
PlaygroundYoupi/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi
File diff suppressed because it is too large
View File


+ 2
- 1
PlaygroundYoupi/.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/.workspace/2020/11/47/refactorings.history View File

@@ -1,3 +1,4 @@
1 1
 <?xml version="1.0" encoding="UTF-8"?>
2
-<session version="1.0">&#x0A;<refactoring comment="Delete resource &apos;L476_ats_blink-master&apos;" deleteContents="false" description="Delete resource &apos;L476_ats_blink-master&apos;" element1="/L476_ats_blink-master" flags="7" id="org.eclipse.ltk.core.refactoring.delete.resources" resources="1" stamp="1605514212142"/>&#x0A;<refactoring comment="Delete resource &apos;L476_ats_blink-master&apos;" deleteContents="true" description="Delete resource &apos;L476_ats_blink-master&apos;" element1="/L476_ats_blink-master" flags="7" id="org.eclipse.ltk.core.refactoring.delete.resources" resources="1" stamp="1605597878223"/>&#x0A;<refactoring comment="Delete resource &apos;RealOne&apos;" deleteContents="false" description="Delete resource &apos;RealOne&apos;" element1="/RealOne" flags="7" id="org.eclipse.ltk.core.refactoring.delete.resources" resources="1" stamp="1605601055463"/>
2
+<session version="1.0">
3
+<refactoring comment="Delete resource &apos;RealOne&apos;" deleteContents="false" description="Delete resource &apos;RealOne&apos;" element1="/RealOne" flags="7" id="org.eclipse.ltk.core.refactoring.delete.resources" resources="1" stamp="1605693456598"/>
3 4
 </session>

+ 1
- 3
PlaygroundYoupi/.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/.workspace/2020/11/47/refactorings.index View File

@@ -1,3 +1 @@
1
-1605514212142	Delete resource 'L476_ats_blink-master'
2
-1605597878223	Delete resource 'L476_ats_blink-master'
3
-1605601055463	Delete resource 'RealOne'
1
+1605693456598	Delete resource 'RealOne'

+ 0
- 7
PlaygroundYoupi/.metadata/.plugins/org.eclipse.ltk.ui.refactoring/dialog_settings.xml View File

@@ -1,7 +0,0 @@
1
-<?xml version="1.0" encoding="UTF-8"?>
2
-<section name="Workbench">
3
-	<section name="RefactoringWizard.preview">
4
-		<item key="width" value="600"/>
5
-		<item key="height" value="400"/>
6
-	</section>
7
-</section>

+ 0
- 28
PlaygroundYoupi/.metadata/.plugins/org.eclipse.search/dialog_settings.xml View File

@@ -1,28 +0,0 @@
1
-<?xml version="1.0" encoding="UTF-8"?>
2
-<section name="Workbench">
3
-	<section name="SearchDialog">
4
-		<item key="PREVIOUS_PAGE" value="org.eclipse.cdt.ui.pdomSearchPage"/>
5
-	</section>
6
-	<section name="Search">
7
-		<list key="Search.processedPageIds">
8
-			<item value="org.eclipse.rse.internal.files.ui.search.searchPage"/>
9
-			<item value="org.eclipse.search.internal.ui.text.TextSearchPage"/>
10
-			<item value="org.eclipse.cdt.ui.pdomSearchPage"/>
11
-		</list>
12
-		<list key="Search.enabledPageIds">
13
-			<item value="org.eclipse.rse.internal.files.ui.search.searchPage"/>
14
-			<item value="org.eclipse.search.internal.ui.text.TextSearchPage"/>
15
-			<item value="org.eclipse.cdt.ui.pdomSearchPage"/>
16
-		</list>
17
-	</section>
18
-	<section name="SearchDialog.ScopePart">
19
-		<item key="scope" value="0"/>
20
-	</section>
21
-	<section name="DialogBounds_SearchDialog">
22
-		<item key="DIALOG_X_ORIGIN" value="635"/>
23
-		<item key="DIALOG_Y_ORIGIN" value="174"/>
24
-		<item key="DIALOG_WIDTH" value="669"/>
25
-		<item key="DIALOG_HEIGHT" value="525"/>
26
-		<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"/>
27
-	</section>
28
-</section>

+ 0
- 5
PlaygroundYoupi/.metadata/.plugins/org.eclipse.ui.editors/dialog_settings.xml View File

@@ -1,5 +0,0 @@
1
-<?xml version="1.0" encoding="UTF-8"?>
2
-<section name="Workbench">
3
-	<section name="quick_assist_proposal_size">
4
-	</section>
5
-</section>

+ 0
- 10
PlaygroundYoupi/.metadata/.plugins/org.eclipse.ui.ide/dialog_settings.xml View File

@@ -3,14 +3,4 @@
3 3
 	<section name="ExternalProjectImportWizard">
4 4
 		<item key="WizardProjectsImportPage.STORE_NESTED_PROJECTS" value="true"/>
5 5
 	</section>
6
-	<section name="SmartImportWizard">
7
-		<item key="SmartImportRootWizardPage.STORE_HIDE_ALREADY_OPEN" value="false"/>
8
-		<item key="SmartImportRootWizardPage.STORE_CLOSE_IMPORTED" value="false"/>
9
-		<item key="SmartImportRootWizardPage.STORE_NESTED_PROJECTS" value="true"/>
10
-		<item key="SmartImportRootWizardPage.STORE_CONFIGURE_NATURES" value="true"/>
11
-		<list key="org.eclipse.ui.internal.wizards.datatransfer.SmartImportRootWizardPage.knownSources">
12
-			<item value="C:\Users\camer\Desktop\LoPoSo\L476_ats_blink-master"/>
13
-			<item value="C:\Users\camer\Desktop\LoPoSo\RealOne"/>
14
-		</list>
15
-	</section>
16 6
 </section>

+ 0
- 23
PlaygroundYoupi/.metadata/.plugins/org.eclipse.ui.workbench.texteditor/dialog_settings.xml View File

@@ -1,23 +0,0 @@
1
-<?xml version="1.0" encoding="UTF-8"?>
2
-<section name="Workbench">
3
-	<section name="org.eclipse.ui.texteditor.FindReplaceDialog">
4
-		<item key="selection" value="RCC_BDCR_LSEON"/>
5
-		<item key="wrap" value="true"/>
6
-		<item key="casesensitive" value="false"/>
7
-		<item key="wholeword" value="false"/>
8
-		<item key="incremental" value="false"/>
9
-		<item key="isRegEx" value="false"/>
10
-		<list key="findhistory">
11
-			<item value="RCC_BDCR_LSEON"/>
12
-		</list>
13
-		<list key="replacehistory">
14
-		</list>
15
-	</section>
16
-	<section name="org.eclipse.ui.texteditor.FindReplaceDialog_dialogBounds">
17
-		<item key="DIALOG_X_ORIGIN" value="1152"/>
18
-		<item key="DIALOG_Y_ORIGIN" value="189"/>
19
-		<item key="DIALOG_WIDTH" value="336"/>
20
-		<item key="DIALOG_HEIGHT" value="454"/>
21
-		<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"/>
22
-	</section>
23
-</section>

+ 0
- 15
PlaygroundYoupi/.metadata/.plugins/org.eclipse.ui.workbench/dialog_settings.xml View File

@@ -1,15 +0,0 @@
1
-<?xml version="1.0" encoding="UTF-8"?>
2
-<section name="Workbench">
3
-	<section name="org.eclipse.ui.internal.QuickAccess">
4
-		<item key="dialogHeight" value="-1"/>
5
-		<item key="dialogWidth" value="-1"/>
6
-		<list key="orderedElements">
7
-		</list>
8
-		<list key="orderedProviders">
9
-		</list>
10
-		<list key="textEntries">
11
-		</list>
12
-		<list key="textArray">
13
-		</list>
14
-	</section>
15
-</section>

+ 1
- 1
PlaygroundYoupi/.metadata/.plugins/org.eclipse.ui.workbench/workingsets.xml View File

@@ -1,4 +1,4 @@
1 1
 <?xml version="1.0" encoding="UTF-8"?>
2 2
 <workingSetManager>
3
-<workingSet aggregate="true" factoryID="org.eclipse.ui.internal.WorkingSetFactory" id="1604569598788_0" label="Window Working Set" name="Aggregate for window 1604569598788"/>
3
+<workingSet aggregate="true" factoryID="org.eclipse.ui.internal.WorkingSetFactory" id="1605693396537_0" label="Window Working Set" name="Aggregate for window 1604569598788"/>
4 4
 </workingSetManager>

+ 1
- 1
PlaygroundYoupi/.metadata/version.ini View File

@@ -1,3 +1,3 @@
1
-#Wed Nov 18 09:40:21 CET 2020
1
+#Wed Nov 18 10:56:27 CET 2020
2 2
 org.eclipse.core.runtime=2
3 3
 org.eclipse.platform=4.13.0.v20190916-1045

+ 4
- 0
RealOne/Core/Inc/main.h View File

@@ -39,6 +39,7 @@ extern "C" {
39 39
 #include "stm32l4xx_ll_pwr.h"
40 40
 #include "stm32l4xx_ll_dma.h"
41 41
 #include "stm32l4xx_ll_gpio.h"
42
+#include "stm32l4xx_ll_rtc.h"
42 43
 
43 44
 /* Private includes ----------------------------------------------------------*/
44 45
 /* USER CODE BEGIN Includes */
@@ -66,6 +67,9 @@ void SystemClock_Config_24M_LSE(void);
66 67
 void SystemClock_Config_24M_LSE_FL3_VS2(void);
67 68
 void SystemClock_Config_80M(void);
68 69
 void Init_LSE(void);
70
+void RTC_wakeup_init_from_standby_or_shutdown( int delay );
71
+void RTC_wakeup_init_from_stop( int delay );
72
+void RTC_WKUP_IRQHandler(void);
69 73
 /* USER CODE BEGIN EFP */
70 74
 
71 75
 /* USER CODE END EFP */

+ 46
- 9
RealOne/Core/Src/main.c View File

@@ -62,8 +62,8 @@ int main(void)
62 62
 		if (BLUE_BUTTON()){
63 63
 
64 64
 			expe ++;
65
-
66
-			if (expe > 4) expe = 1;
65
+			blue_mode = 0;
66
+			if (expe > 8) expe = 1;
67 67
 			RTC->BKP0R = expe;
68 68
 		}
69 69
 //	}else{
@@ -72,15 +72,37 @@ int main(void)
72 72
 	LL_PWR_DisableBkUpAccess();
73 73
 	switch(expe){
74 74
 	case 1:
75
+
75 76
 		/* Configure the system clock */
76 77
 		SystemClock_Config_80M();
78
+		//Setup Sleep mode
79
+		LL_LPM_EnableSleep();
77 80
 		break;
78 81
 	case 2:
79 82
 		/* Configure the system clock */
80 83
 		SystemClock_Config_24M_LSE();
81 84
 		break;
82
-	default: //case 3 to 8
85
+	case 3:
86
+		SystemClock_Config_24M_LSE_FL3_VS2();
87
+		LL_LPM_EnableSleep();
88
+		break;
89
+	case 4:
90
+		SystemClock_Config_24M_LSE_FL3_VS2();
91
+	case 5:
92
+		SystemClock_Config_24M_LSE_FL3_VS2();
93
+		LL_PWR_SetPowerMode(LL_PWR_MODE_STOP0);
94
+		break;
95
+	case 6:
83 96
 		SystemClock_Config_24M_LSE_FL3_VS2();
97
+		LL_PWR_SetPowerMode(LL_PWR_MODE_STOP1);
98
+		break;
99
+	case 7:
100
+		SystemClock_Config_24M_LSE_FL3_VS2();
101
+		LL_PWR_SetPowerMode(LL_PWR_MODE_STOP2);
102
+		break;
103
+	case 8:
104
+		SystemClock_Config_24M_LSE_FL3_VS2();
105
+		LL_PWR_SetPowerMode(LL_PWR_MODE_SHUTDOWN);
84 106
 		break;
85 107
 	}
86 108
 
@@ -89,26 +111,41 @@ int main(void)
89 111
 	LL_Init1msTick( SystemCoreClock );
90 112
 	LL_SYSTICK_EnableIT();
91 113
 
92
-	//Setup Sleep mode
93
-	LL_LPM_EnableSleep();
114
+
94 115
 	//LL_LPM_EnableSleepOnExit();
95 116
 
96 117
 	while (1)  {
97 118
 		if (blue_mode){
98 119
 			switch(expe){
120
+			case 5:
121
+			case 6:
122
+			case 7:
123
+				LL_LPM_EnableDeepSleep();
124
+				RTC_wakeup_init_from_stop(20);
125
+				__WFI();
126
+				blue_mode = 0;
127
+
128
+				SystemClock_Config_24M_LSE_FL3_VS2();
129
+				LL_Init1msTick( SystemCoreClock );
130
+				LL_SYSTICK_EnableIT();
131
+				break;
132
+			case 8:
133
+				LL_LPM_EnableDeepSleep();
134
+				RTC_wakeup_init_from_standby_or_shutdown(10);
99 135
 			case 1:
100 136
 			case 3:
101 137
 				__WFI();
102 138
 				break;
103
-
104 139
 			case 2:
105 140
 			case 4:
106 141
 				LL_RCC_MSI_EnablePLLMode();
107 142
 				break;
108
-
109
-
110 143
 			}
111
-
144
+		}else{
145
+				if (expe > 4) {
146
+					LL_LPM_EnableSleep();
147
+					__WFI();
148
+				}
112 149
 		}
113 150
 	}
114 151
 }

+ 3
- 0
RealOne/Debug/Core/Src/main.d View File

@@ -37,6 +37,7 @@ Core/Src/main.o: ../Core/Src/main.c ../Core/Inc/main.h \
37 37
  ../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_pwr.h \
38 38
  ../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_dma.h \
39 39
  ../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_gpio.h \
40
+ ../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_rtc.h \
40 41
  ../Core/Inc/../Src/gpio.h ../Core/Src/gpio.h
41 42
 
42 43
 ../Core/Inc/main.h:
@@ -117,6 +118,8 @@ Core/Src/main.o: ../Core/Src/main.c ../Core/Inc/main.h \
117 118
 
118 119
 ../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_gpio.h:
119 120
 
121
+../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_rtc.h:
122
+
120 123
 ../Core/Inc/../Src/gpio.h:
121 124
 
122 125
 ../Core/Src/gpio.h:

BIN
RealOne/Debug/Core/Src/main.o View File


+ 55
- 0
RealOne/Debug/Core/Src/main.su View File

@@ -0,0 +1,55 @@
1
+core_cm4.h:1679:22:__NVIC_EnableIRQ	16	static,ignoring_inline_asm
2
+core_cm4.h:1809:22:__NVIC_SetPriority	16	static
3
+stm32l4xx_ll_rcc.h:2270:22:LL_RCC_LSE_Enable	4	static
4
+stm32l4xx_ll_rcc.h:2316:22:LL_RCC_LSE_SetDriveCapability	16	static
5
+stm32l4xx_ll_rcc.h:2362:26:LL_RCC_LSE_IsReady	4	static
6
+stm32l4xx_ll_rcc.h:2489:22:LL_RCC_MSI_Enable	4	static
7
+stm32l4xx_ll_rcc.h:2509:26:LL_RCC_MSI_IsReady	4	static
8
+stm32l4xx_ll_rcc.h:2523:22:LL_RCC_MSI_EnablePLLMode	4	static
9
+stm32l4xx_ll_rcc.h:2548:22:LL_RCC_MSI_EnableRangeSelection	4	static
10
+stm32l4xx_ll_rcc.h:2581:22:LL_RCC_MSI_SetRange	16	static
11
+stm32l4xx_ll_rcc.h:2656:22:LL_RCC_MSI_SetCalibTrimming	16	static
12
+stm32l4xx_ll_rcc.h:2742:22:LL_RCC_SetSysClkSource	16	static
13
+stm32l4xx_ll_rcc.h:2756:26:LL_RCC_GetSysClkSource	4	static
14
+stm32l4xx_ll_rcc.h:2776:22:LL_RCC_SetAHBPrescaler	16	static
15
+stm32l4xx_ll_rcc.h:2792:22:LL_RCC_SetAPB1Prescaler	16	static
16
+stm32l4xx_ll_rcc.h:2808:22:LL_RCC_SetAPB2Prescaler	16	static
17
+stm32l4xx_ll_rcc.h:3650:22:LL_RCC_SetRTCClockSource	16	static
18
+stm32l4xx_ll_rcc.h:3674:22:LL_RCC_EnableRTC	4	static
19
+stm32l4xx_ll_rcc.h:3714:22:LL_RCC_ReleaseBackupDomainReset	4	static
20
+stm32l4xx_ll_rcc.h:3733:22:LL_RCC_PLL_Enable	4	static
21
+stm32l4xx_ll_rcc.h:3754:26:LL_RCC_PLL_IsReady	4	static
22
+stm32l4xx_ll_rcc.h:3800:22:LL_RCC_PLL_ConfigDomain_SYS	24	static
23
+stm32l4xx_ll_rcc.h:4178:22:LL_RCC_PLL_EnableDomain_SYS	4	static
24
+stm32l4xx_ll_bus.h:1089:22:LL_APB1_GRP1_EnableClock	24	static
25
+stm32l4xx_ll_system.h:1400:22:LL_FLASH_SetLatency	16	static
26
+stm32l4xx_ll_system.h:1428:26:LL_FLASH_GetLatency	4	static
27
+stm32l4xx_ll_exti.h:306:22:LL_EXTI_EnableIT_0_31	16	static
28
+stm32l4xx_ll_exti.h:739:22:LL_EXTI_EnableRisingTrig_0_31	16	static
29
+stm32l4xx_ll_exti.h:1299:22:LL_EXTI_ClearFlag_0_31	16	static
30
+stm32l4xx_ll_cortex.h:272:22:LL_SYSTICK_EnableIT	4	static
31
+stm32l4xx_ll_cortex.h:310:22:LL_LPM_EnableSleep	4	static
32
+stm32l4xx_ll_cortex.h:321:22:LL_LPM_EnableDeepSleep	4	static
33
+stm32l4xx_ll_pwr.h:344:22:LL_PWR_SetRegulVoltageScaling	16	static
34
+stm32l4xx_ll_pwr.h:398:22:LL_PWR_EnableBkUpAccess	4	static
35
+stm32l4xx_ll_pwr.h:408:22:LL_PWR_DisableBkUpAccess	4	static
36
+stm32l4xx_ll_pwr.h:434:22:LL_PWR_SetPowerMode	16	static
37
+stm32l4xx_ll_pwr.h:714:22:LL_PWR_EnableInternWU	4	static
38
+stm32l4xx_ll_rtc.h:1049:23:LL_RTC_EnableWriteProtection	16	static
39
+stm32l4xx_ll_rtc.h:1060:23:LL_RTC_DisableWriteProtection	16	static
40
+stm32l4xx_ll_rtc.h:2921:23:LL_RTC_WAKEUP_Enable	16	static
41
+stm32l4xx_ll_rtc.h:2933:23:LL_RTC_WAKEUP_Disable	16	static
42
+stm32l4xx_ll_rtc.h:2964:23:LL_RTC_WAKEUP_SetClock	16	static
43
+stm32l4xx_ll_rtc.h:2994:23:LL_RTC_WAKEUP_SetAutoReload	16	static
44
+stm32l4xx_ll_rtc.h:3452:23:LL_RTC_ClearFlag_WUT	16	static
45
+stm32l4xx_ll_rtc.h:3542:27:LL_RTC_IsActiveFlag_WUTW	16	static
46
+stm32l4xx_ll_rtc.h:3610:23:LL_RTC_EnableIT_WUT	16	static
47
+main.c:20:6:SysTick_Handler	8	static
48
+main.c:41:5:main	8	static,ignoring_inline_asm
49
+main.c:153:6:SystemClock_Config_24M_LSE_FL3_VS2	8	static
50
+main.c:221:6:SystemClock_Config_24M_LSE	8	static
51
+main.c:286:6:SystemClock_Config_80M	8	static
52
+main.c:332:13:RTC_wakeup_init	16	static
53
+main.c:350:6:RTC_wakeup_init_from_standby_or_shutdown	16	static
54
+main.c:361:6:RTC_wakeup_init_from_stop	16	static
55
+main.c:373:6:RTC_WKUP_IRQHandler	8	static

+ 3
- 0
RealOne/Debug/Core/Src/stm32l4xx_hal_msp.d View File

@@ -37,6 +37,7 @@ Core/Src/stm32l4xx_hal_msp.o: ../Core/Src/stm32l4xx_hal_msp.c \
37 37
  ../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_pwr.h \
38 38
  ../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_dma.h \
39 39
  ../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_gpio.h \
40
+ ../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_rtc.h \
40 41
  ../Core/Inc/../Src/gpio.h
41 42
 
42 43
 ../Core/Inc/main.h:
@@ -117,4 +118,6 @@ Core/Src/stm32l4xx_hal_msp.o: ../Core/Src/stm32l4xx_hal_msp.c \
117 118
 
118 119
 ../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_gpio.h:
119 120
 
121
+../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_rtc.h:
122
+
120 123
 ../Core/Inc/../Src/gpio.h:

BIN
RealOne/Debug/Core/Src/stm32l4xx_hal_msp.o View File


+ 3
- 0
RealOne/Debug/Core/Src/stm32l4xx_it.d View File

@@ -37,6 +37,7 @@ Core/Src/stm32l4xx_it.o: ../Core/Src/stm32l4xx_it.c ../Core/Inc/main.h \
37 37
  ../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_pwr.h \
38 38
  ../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_dma.h \
39 39
  ../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_gpio.h \
40
+ ../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_rtc.h \
40 41
  ../Core/Inc/../Src/gpio.h ../Core/Inc/stm32l4xx_it.h
41 42
 
42 43
 ../Core/Inc/main.h:
@@ -117,6 +118,8 @@ Core/Src/stm32l4xx_it.o: ../Core/Src/stm32l4xx_it.c ../Core/Inc/main.h \
117 118
 
118 119
 ../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_gpio.h:
119 120
 
121
+../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_rtc.h:
122
+
120 123
 ../Core/Inc/../Src/gpio.h:
121 124
 
122 125
 ../Core/Inc/stm32l4xx_it.h:

BIN
RealOne/Debug/Core/Src/stm32l4xx_it.o View File


+ 5
- 0
RealOne/Debug/Drivers/STM32L4xx_HAL_Driver/Src/subdir.mk View File

@@ -24,6 +24,7 @@ C_SRCS += \
24 24
 ../Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_tim.c \
25 25
 ../Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_tim_ex.c \
26 26
 ../Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_exti.c \
27
+../Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_rtc.c \
27 28
 ../Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_utils.c 
28 29
 
29 30
 OBJS += \
@@ -47,6 +48,7 @@ OBJS += \
47 48
 ./Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_tim.o \
48 49
 ./Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_tim_ex.o \
49 50
 ./Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_exti.o \
51
+./Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_rtc.o \
50 52
 ./Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_utils.o 
51 53
 
52 54
 C_DEPS += \
@@ -70,6 +72,7 @@ C_DEPS += \
70 72
 ./Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_tim.d \
71 73
 ./Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_tim_ex.d \
72 74
 ./Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_exti.d \
75
+./Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_rtc.d \
73 76
 ./Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_utils.d 
74 77
 
75 78
 
@@ -114,6 +117,8 @@ Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_tim_ex.o: ../Drivers/STM32L4xx_HA
114 117
 	arm-none-eabi-gcc "$<" -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"Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_tim_ex.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@"
115 118
 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_exti.o: ../Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_exti.c
116 119
 	arm-none-eabi-gcc "$<" -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"Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_exti.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@"
120
+Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_rtc.o: ../Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_rtc.c
121
+	arm-none-eabi-gcc "$<" -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"Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_rtc.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@"
117 122
 Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_utils.o: ../Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_utils.c
118 123
 	arm-none-eabi-gcc "$<" -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"Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_ll_utils.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@"
119 124
 

BIN
RealOne/Debug/L476_ats_blink-master.bin View File


BIN
RealOne/Debug/L476_ats_blink-master.elf View File


+ 0
- 1647
RealOne/Debug/L476_ats_blink-master.list
File diff suppressed because it is too large
View File


+ 0
- 3967
RealOne/Debug/L476_ats_blink-master.map
File diff suppressed because it is too large
View File


BIN
RealOne/Debug/RealOne.bin View File


BIN
RealOne/Debug/RealOne.elf View File


+ 2057
- 1378
RealOne/Debug/RealOne.list
File diff suppressed because it is too large
View File


+ 0
- 0
RealOne/Debug/RealOne.map View File


Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save