5 Commits

20 changed files with 370281 additions and 6712 deletions

View File

@ -14,8 +14,8 @@ cturing Information (PMI)---4.0---2014-10-13',
/* implementation_level */ '2;1');
FILE_NAME(
/* name */ '62ebc0e691c8e9784977d474',
/* time_stamp */ '2022-08-04T12:51:51+00:00',
/* name */ '637eac238791062a77bbc103',
/* time_stamp */ '2022-11-23T23:26:28+00:00',
/* author */ (''),
/* organization */ (''),
/* preprocessor_version */ 'ST-DEVELOPER v18.102',
@ -1255,26 +1255,26 @@ DATA;
#1232=CARTESIAN_POINT('',(-3.46944695195361E-18,0.0025,0.00012));
#1233=CARTESIAN_POINT('',(-3.46944695195361E-18,0.0025,0.));
#1234=CARTESIAN_POINT('',(-3.46944695195361E-18,0.0025,0.00012));
#1235=CARTESIAN_POINT('',(0.019,0.011,0.00012));
#1236=CARTESIAN_POINT('',(0.019,0.011,0.00012));
#1237=CARTESIAN_POINT('',(0.02075,0.011,0.00012));
#1238=CARTESIAN_POINT('',(0.019,0.011,0.));
#1239=CARTESIAN_POINT('',(0.02075,0.011,0.));
#1240=CARTESIAN_POINT('',(-0.019,0.011,0.00012));
#1241=CARTESIAN_POINT('',(-0.019,0.011,0.00012));
#1242=CARTESIAN_POINT('',(-0.01725,0.011,0.00012));
#1243=CARTESIAN_POINT('',(-0.019,0.011,0.));
#1244=CARTESIAN_POINT('',(-0.01725,0.011,0.));
#1245=CARTESIAN_POINT('',(-0.019,-0.011,0.00012));
#1246=CARTESIAN_POINT('',(-0.019,-0.011,0.00012));
#1247=CARTESIAN_POINT('',(-0.01725,-0.011,0.00012));
#1248=CARTESIAN_POINT('',(-0.019,-0.011,0.));
#1249=CARTESIAN_POINT('',(-0.01725,-0.011,0.));
#1250=CARTESIAN_POINT('',(0.019,-0.011,0.00012));
#1251=CARTESIAN_POINT('',(0.019,-0.011,0.00012));
#1252=CARTESIAN_POINT('',(0.02075,-0.011,0.00012));
#1253=CARTESIAN_POINT('',(0.019,-0.011,0.));
#1254=CARTESIAN_POINT('',(0.02075,-0.011,0.));
#1235=CARTESIAN_POINT('',(0.0195,0.0115,0.00012));
#1236=CARTESIAN_POINT('',(0.0195,0.0115,0.00012));
#1237=CARTESIAN_POINT('',(0.02125,0.0115,0.00012));
#1238=CARTESIAN_POINT('',(0.0195,0.0115,0.));
#1239=CARTESIAN_POINT('',(0.02125,0.0115,0.));
#1240=CARTESIAN_POINT('',(-0.0195,0.0115,0.00012));
#1241=CARTESIAN_POINT('',(-0.0195,0.0115,0.00012));
#1242=CARTESIAN_POINT('',(-0.01775,0.0115,0.00012));
#1243=CARTESIAN_POINT('',(-0.0195,0.0115,0.));
#1244=CARTESIAN_POINT('',(-0.01775,0.0115,0.));
#1245=CARTESIAN_POINT('',(-0.0195,-0.0115,0.00012));
#1246=CARTESIAN_POINT('',(-0.0195,-0.0115,0.00012));
#1247=CARTESIAN_POINT('',(-0.01775,-0.0115,0.00012));
#1248=CARTESIAN_POINT('',(-0.0195,-0.0115,0.));
#1249=CARTESIAN_POINT('',(-0.01775,-0.0115,0.));
#1250=CARTESIAN_POINT('',(0.0195,-0.0115,0.00012));
#1251=CARTESIAN_POINT('',(0.0195,-0.0115,0.00012));
#1252=CARTESIAN_POINT('',(0.02125,-0.0115,0.00012));
#1253=CARTESIAN_POINT('',(0.0195,-0.0115,0.));
#1254=CARTESIAN_POINT('',(0.02125,-0.0115,0.));
#1255=CARTESIAN_POINT('',(-0.007175,0.009,0.00012));
#1256=CARTESIAN_POINT('',(-0.007175,0.009,0.));
#1257=CARTESIAN_POINT('',(-0.007175,0.009,0.00012));

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,10 +1,10 @@
{
"board": {
"active_layer": 0,
"active_layer": 36,
"active_layer_preset": "",
"auto_track_width": false,
"hidden_nets": [],
"high_contrast_mode": 0,
"high_contrast_mode": 1,
"net_color_mode": 1,
"opacity": {
"pads": 1.0,
@ -62,7 +62,7 @@
35,
36
],
"visible_layers": "ffcffff_ffffffff",
"visible_layers": "ff4ffff_ffffffff",
"zone_display_mode": 0
},
"meta": {

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -45,64 +45,24 @@
(fp_arc (start -23 -13) (mid -22.414214 -14.414214) (end -21 -15) (layer "Dwgs.User") (width 0.1) (tstamp 4d123677-82ba-40d7-b06e-329a209c99e5))
(fp_arc (start -6.25 -0.5) (mid -5.664214 -1.914214) (end -4.25 -2.5) (layer "Dwgs.User") (width 0.1) (tstamp ed372a68-ac06-4910-b679-3abb459c4053))
(fp_arc (start 23 13) (mid 22.414214 14.414214) (end 21 15) (layer "Dwgs.User") (width 0.1) (tstamp f397ea00-77b3-4e52-8c1f-f40fbefb4c5a))
(fp_circle (center 19 -11) (end 20.75 -11) (layer "Dwgs.User") (width 0.1) (fill none) (tstamp 44be3ae8-2900-4186-bdf3-aa0df1b60494))
(fp_circle (center -19 -11) (end -17.25 -11) (layer "Dwgs.User") (width 0.1) (fill none) (tstamp 69d5781c-ea7a-40e7-b059-5c794936e027))
(fp_circle (center 19 11) (end 20.75 11) (layer "Dwgs.User") (width 0.1) (fill none) (tstamp e2e72bf3-dc42-417c-ad1e-89b7265ae9a4))
(fp_circle (center -19 11) (end -17.25 11) (layer "Dwgs.User") (width 0.1) (fill none) (tstamp f8dcb164-b515-4358-89d4-593010f27b67))
(fp_circle (center 19.5 -11.5) (end 21.25 -11.5) (layer "Dwgs.User") (width 0.1) (fill none) (tstamp 44be3ae8-2900-4186-bdf3-aa0df1b60494))
(fp_circle (center -19.5 -11.5) (end -17.75 -11.5) (layer "Dwgs.User") (width 0.1) (fill none) (tstamp 69d5781c-ea7a-40e7-b059-5c794936e027))
(fp_circle (center 19.5 11.5) (end 21.25 11.5) (layer "Dwgs.User") (width 0.1) (fill none) (tstamp e2e72bf3-dc42-417c-ad1e-89b7265ae9a4))
(fp_circle (center -19.5 11.5) (end -17.75 11.5) (layer "Dwgs.User") (width 0.1) (fill none) (tstamp f8dcb164-b515-4358-89d4-593010f27b67))
(fp_rect (start -7.175 -11.4) (end -6.825 -6.6) (layer "User.2") (width 0.01) (fill solid) (tstamp 15cec376-0cc5-4fb9-9546-200acbadd4c3))
(fp_rect (start 6.825 -11.4) (end 7.175 -6.6) (layer "User.2") (width 0.01) (fill solid) (tstamp 2b145196-0d0e-4b3a-a10d-f603e04431b2))
(fp_rect (start 15.1 0.175) (end 19.9 -0.175) (layer "User.2") (width 0.01) (fill solid) (tstamp 65179cb2-be1e-4398-a5c0-b1ccfeb04f75))
(fp_rect (start -4.25 -2.5) (end 4.25 10) (layer "User.2") (width 0.01) (fill solid) (tstamp 7a34eea2-a6e8-4a3b-96ce-95ae0942333a))
(fp_rect (start -19.9 0.175) (end -15.1 -0.175) (layer "User.2") (width 0.01) (fill solid) (tstamp 94f3ef5d-a92b-4037-9ba0-96a63bb9f2cf))
(fp_rect (start -6.25 -0.5) (end 6.25 8) (layer "User.2") (width 0.01) (fill solid) (tstamp 97e33b51-4c2e-434b-811f-517d98fdabf8))
(fp_circle (center 19 11) (end 20.75 11) (layer "User.2") (width 0.01) (fill solid) (tstamp 02ebc153-06e5-42e5-ae0e-95cf53d2686e))
(fp_circle (center -19 -11) (end -17.25 -11) (layer "User.2") (width 0.01) (fill solid) (tstamp 1d2e485c-13d9-491b-b9b1-d7cdb1ddacd4))
(fp_circle (center 19 -11) (end 20.75 -11) (layer "User.2") (width 0.01) (fill solid) (tstamp 4f064766-fcbe-42b2-9cf1-e3ce1c52823d))
(fp_circle (center 19.5 11.5) (end 21.25 11.5) (layer "User.2") (width 0.01) (fill solid) (tstamp 02ebc153-06e5-42e5-ae0e-95cf53d2686e))
(fp_circle (center -19.5 -11.5) (end -17.75 -11.5) (layer "User.2") (width 0.01) (fill solid) (tstamp 1d2e485c-13d9-491b-b9b1-d7cdb1ddacd4))
(fp_circle (center 19.5 -11.5) (end 21.25 -11.5) (layer "User.2") (width 0.01) (fill solid) (tstamp 4f064766-fcbe-42b2-9cf1-e3ce1c52823d))
(fp_circle (center 4.25 8) (end 6.25 8) (layer "User.2") (width 0.01) (fill solid) (tstamp b2368e7f-0f40-4282-af0f-69e4749fe499))
(fp_circle (center -19 11) (end -17.25 11) (layer "User.2") (width 0.01) (fill solid) (tstamp b4e0236b-b4d5-4fe0-a283-ecee8bcceaba))
(fp_circle (center -19.5 11.5) (end -17.75 11.5) (layer "User.2") (width 0.01) (fill solid) (tstamp b4e0236b-b4d5-4fe0-a283-ecee8bcceaba))
(fp_circle (center 4.25 -0.5) (end 6.25 -0.5) (layer "User.2") (width 0.01) (fill solid) (tstamp b5fb8139-8b3b-4c94-9ad9-eb356c47c480))
(fp_circle (center -4.25 8.000001) (end -2.25 8.000001) (layer "User.2") (width 0.01) (fill solid) (tstamp c8e2cfaa-51bd-4851-a6ce-1afe5d99229f))
(fp_circle (center -4.25 -0.5) (end -2.25 -0.5) (layer "User.2") (width 0.01) (fill solid) (tstamp f2088203-ec06-4532-9ae1-2f2a4395cba9))
(group "Edges" (id 5f068654-7d13-4c99-823f-ca04be378f88)
(members
02f7b83b-69e5-402a-97cd-2ab9ae004365
0e956636-6ecf-40f5-b446-5a28641115e4
139f406e-f1be-4460-bd37-ea8577c4c405
1f015c40-87c5-446d-9682-a71c8c78a240
40bed328-bcff-4a79-862f-05ffa9f0851e
413987a6-e7ff-431f-a102-4d44d813b7bf
43985166-a138-4b16-8f05-eaa329c21854
44be3ae8-2900-4186-bdf3-aa0df1b60494
4d123677-82ba-40d7-b06e-329a209c99e5
562392bc-7fdc-42fb-acf8-8f876fb4baee
6093230f-7da9-436b-a565-22d094506fe8
640cd49d-8be5-4b08-b630-e5f8f8377094
69d5781c-ea7a-40e7-b059-5c794936e027
6c0fac88-9a87-4a51-b33d-184c9ee1cbe4
7126884e-33f6-4742-990f-12a47d411edf
730eedee-9a7c-4f43-8635-69482b5c5018
7f8d4600-f7b7-4961-826b-537479190fec
809ec121-7a00-407b-9216-a6d943033b14
a222aa4e-c344-46b7-bf55-3c6a0aa0a374
a2af30a0-1af5-4580-a31f-0dd5c5ff6734
aa48cd2b-dfd1-49b6-83ee-da5bce84fcd5
aca2d6e2-fe5d-4a12-a499-e4f77b3547cc
ae18f94e-c1fd-4c12-8c06-ff09a4e6e190
bea27199-2194-4f85-a1b7-c8be78ada6e8
c9dd16cc-624b-413b-a0b9-6f812f8a3f7d
d71880c6-495a-4f68-ae0e-ff186b05c077
e2e72bf3-dc42-417c-ad1e-89b7265ae9a4
e7b98613-f8b3-4a0f-a012-c3972828c1f8
ebde6eb6-c376-45f3-8cf1-68b9dd545362
ed372a68-ac06-4910-b679-3abb459c4053
f397ea00-77b3-4e52-8c1f-f40fbefb4c5a
f8a2ccf5-c0e1-49c1-a842-399a9e338537
f8dcb164-b515-4358-89d4-593010f27b67
fce5c3c5-c70c-4ae2-bcfa-1f6bf6b5df83
fe4338d1-8013-48f5-8247-78ece50c7ade
fedfbe41-eacd-4c64-8365-aaee91c517dc
)
)
(model "/home/petr/work/butcube/modules/Sun_sensor/Stencil.step"
(offset (xyz 0 0 0))
(scale (xyz 1 1 1))

File diff suppressed because it is too large Load Diff

View File

@ -1,2 +1,3 @@
(fp_lib_table
(lib (name "Sun_shield")(type "KiCad")(uri "${KIPRJMOD}/Sun_shield.pretty")(options "")(descr ""))
)

1
modules/Sun_sensor/fw/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
build/

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,83 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
2. Grant of Copyright License.
Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
3. Grant of Patent License.
Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
4. Redistribution.
You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
1.You must give any other recipients of the Work or Derivative Works a copy of this License; and
2.You must cause any modified files to carry prominent notices stating that You changed the files; and
3.You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
4.If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
5. Submission of Contributions.
Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
6. Trademarks.
This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty.
Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
8. Limitation of Liability.
In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability.
While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX:
Copyright [2019] [STMicroelectronics]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View File

@ -0,0 +1,6 @@
This software component is provided to you as part of a software package and
applicable license terms are in the Package_license file. If you received this
software component outside of a package or without applicable license terms,
the terms of the BSD-3-Clause license shall apply.
You may obtain a copy of the BSD-3-Clause at:
https://opensource.org/licenses/BSD-3-Clause

View File

@ -0,0 +1,3 @@
# Copyright (c) 2017 STMicroelectronics
This software component is licensed by STMicroelectronics under the **BSD 3-Clause** license. You may not use this file except in compliance with this license. You may obtain a copy of the license [here](https://opensource.org/licenses/BSD-3-Clause).

View File

@ -60,6 +60,30 @@ void Error_Handler(void);
/* Private defines -----------------------------------------------------------*/
#define RCC_HSE_Pin GPIO_PIN_0
#define RCC_HSE_GPIO_Port GPIOA
#define FR_RDY__1_Pin GPIO_PIN_1
#define FR_RDY__1_GPIO_Port GPIOA
#define CS__1_Pin GPIO_PIN_4
#define CS__1_GPIO_Port GPIOA
#define FRAM_CS_Pin GPIO_PIN_1
#define FRAM_CS_GPIO_Port GPIOB
#define FR_RDY__2_Pin GPIO_PIN_9
#define FR_RDY__2_GPIO_Port GPIOA
#define CS__2_Pin GPIO_PIN_10
#define CS__2_GPIO_Port GPIOA
#define CAN_RS_Pin GPIO_PIN_15
#define CAN_RS_GPIO_Port GPIOA
#define LED2_Pin GPIO_PIN_3
#define LED2_GPIO_Port GPIOB
#define LED1_Pin GPIO_PIN_4
#define LED1_GPIO_Port GPIOB
#define CS__3_Pin GPIO_PIN_5
#define CS__3_GPIO_Port GPIOB
#define FR_RDY__3_Pin GPIO_PIN_6
#define FR_RDY__3_GPIO_Port GPIOB
#define CS__4_Pin GPIO_PIN_7
#define CS__4_GPIO_Port GPIOB
#define FR_RDY__4_Pin GPIO_PIN_3
#define FR_RDY__4_GPIO_Port GPIOH
/* USER CODE BEGIN Private defines */
/* USER CODE END Private defines */

View File

@ -1,5 +1,5 @@
##########################################################################################################################
# File automatically-generated by tool: [projectgenerator] version: [3.13.0-B3] date: [Thu Jul 28 23:53:52 CEST 2022]
# File automatically-generated by tool: [projectgenerator] version: [3.18.0-B7] date: [Tue Jan 24 09:24:16 CET 2023]
##########################################################################################################################
# ------------------------------------------------
@ -35,36 +35,36 @@ BUILD_DIR = build
# source
######################################
# C sources
C_SOURCES = \
Src/main.c \
Src/stm32l4xx_it.c \
Src/stm32l4xx_hal_msp.c \
Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_can.c \
Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.c \
Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_i2c.c \
Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_i2c_ex.c \
Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rcc.c \
Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rcc_ex.c \
Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash.c \
Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash_ex.c \
Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash_ramfunc.c \
Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_gpio.c \
Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_dma.c \
Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_dma_ex.c \
Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_pwr.c \
Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_pwr_ex.c \
Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.c \
Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_exti.c \
Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_spi.c \
Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_spi_ex.c \
Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_tim.c \
Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_tim_ex.c \
Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c \
Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart_ex.c \
Src/system_stm32l4xx.c
C_SOURCES = \
Src/main.c \
Src/stm32l4xx_it.c \
Src/stm32l4xx_hal_msp.c \
Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_can.c \
Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.c \
Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_i2c.c \
Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_i2c_ex.c \
Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rcc.c \
Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rcc_ex.c \
Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash.c \
Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash_ex.c \
Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash_ramfunc.c \
Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_gpio.c \
Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_dma.c \
Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_dma_ex.c \
Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_pwr.c \
Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_pwr_ex.c \
Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.c \
Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_exti.c \
Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_spi.c \
Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_spi_ex.c \
Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_tim.c \
Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_tim_ex.c \
Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c \
Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart_ex.c \
Src/system_stm32l4xx.c
# ASM sources
ASM_SOURCES = \
ASM_SOURCES = \
startup_stm32l432xx.s
@ -108,8 +108,8 @@ MCU = $(CPU) -mthumb $(FPU) $(FLOAT-ABI)
AS_DEFS =
# C defines
C_DEFS = \
-DUSE_HAL_DRIVER \
C_DEFS = \
-DUSE_HAL_DRIVER \
-DSTM32L432xx
@ -117,11 +117,11 @@ C_DEFS = \
AS_INCLUDES =
# C includes
C_INCLUDES = \
-IInc \
-IDrivers/STM32L4xx_HAL_Driver/Inc \
-IDrivers/STM32L4xx_HAL_Driver/Inc/Legacy \
-IDrivers/CMSIS/Device/ST/STM32L4xx/Include \
C_INCLUDES = \
-IInc \
-IDrivers/STM32L4xx_HAL_Driver/Inc \
-IDrivers/STM32L4xx_HAL_Driver/Inc/Legacy \
-IDrivers/CMSIS/Device/ST/STM32L4xx/Include \
-IDrivers/CMSIS/Include
@ -194,4 +194,4 @@ clean:
#######################################
-include $(wildcard $(BUILD_DIR)/*.d)
# *** EOF ***
# *** EOF ***

View File

@ -44,7 +44,7 @@ CAN_HandleTypeDef hcan1;
SPI_HandleTypeDef hspi1;
UART_HandleTypeDef huart1;
UART_HandleTypeDef huart2;
/* USER CODE BEGIN PV */
@ -55,7 +55,7 @@ void SystemClock_Config(void);
static void MX_GPIO_Init(void);
static void MX_CAN1_Init(void);
static void MX_SPI1_Init(void);
static void MX_USART1_UART_Init(void);
static void MX_USART2_UART_Init(void);
/* USER CODE BEGIN PFP */
/* USER CODE END PFP */
@ -95,7 +95,7 @@ int main(void)
MX_GPIO_Init();
MX_CAN1_Init();
MX_SPI1_Init();
MX_USART1_UART_Init();
MX_USART2_UART_Init();
/* USER CODE BEGIN 2 */
/* USER CODE END 2 */
@ -107,6 +107,14 @@ int main(void)
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
HAL_GPIO_WritePin(GPIOB, LED2_Pin, GPIO_PIN_RESET);
HAL_GPIO_WritePin(GPIOB, LED1_Pin, GPIO_PIN_SET);
HAL_Delay(100);
HAL_GPIO_WritePin(GPIOB, LED2_Pin, GPIO_PIN_SET);
HAL_GPIO_WritePin(GPIOB, LED1_Pin, GPIO_PIN_RESET);
HAL_Delay(100);
}
/* USER CODE END 3 */
}
@ -151,8 +159,8 @@ void SystemClock_Config(void)
{
Error_Handler();
}
PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_USART1;
PeriphClkInit.Usart1ClockSelection = RCC_USART1CLKSOURCE_PCLK2;
PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_USART2;
PeriphClkInit.Usart2ClockSelection = RCC_USART2CLKSOURCE_PCLK1;
if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit) != HAL_OK)
{
Error_Handler();
@ -243,37 +251,37 @@ static void MX_SPI1_Init(void)
}
/**
* @brief USART1 Initialization Function
* @brief USART2 Initialization Function
* @param None
* @retval None
*/
static void MX_USART1_UART_Init(void)
static void MX_USART2_UART_Init(void)
{
/* USER CODE BEGIN USART1_Init 0 */
/* USER CODE BEGIN USART2_Init 0 */
/* USER CODE END USART1_Init 0 */
/* USER CODE END USART2_Init 0 */
/* USER CODE BEGIN USART1_Init 1 */
/* USER CODE BEGIN USART2_Init 1 */
/* USER CODE END USART1_Init 1 */
huart1.Instance = USART1;
huart1.Init.BaudRate = 115200;
huart1.Init.WordLength = UART_WORDLENGTH_8B;
huart1.Init.StopBits = UART_STOPBITS_1;
huart1.Init.Parity = UART_PARITY_NONE;
huart1.Init.Mode = UART_MODE_TX_RX;
huart1.Init.HwFlowCtl = UART_HWCONTROL_NONE;
huart1.Init.OverSampling = UART_OVERSAMPLING_16;
huart1.Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE;
huart1.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_NO_INIT;
if (HAL_UART_Init(&huart1) != HAL_OK)
/* USER CODE END USART2_Init 1 */
huart2.Instance = USART2;
huart2.Init.BaudRate = 115200;
huart2.Init.WordLength = UART_WORDLENGTH_8B;
huart2.Init.StopBits = UART_STOPBITS_1;
huart2.Init.Parity = UART_PARITY_NONE;
huart2.Init.Mode = UART_MODE_TX_RX;
huart2.Init.HwFlowCtl = UART_HWCONTROL_NONE;
huart2.Init.OverSampling = UART_OVERSAMPLING_16;
huart2.Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE;
huart2.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_NO_INIT;
if (HAL_UART_Init(&huart2) != HAL_OK)
{
Error_Handler();
}
/* USER CODE BEGIN USART1_Init 2 */
/* USER CODE BEGIN USART2_Init 2 */
/* USER CODE END USART1_Init 2 */
/* USER CODE END USART2_Init 2 */
}
@ -284,11 +292,54 @@ static void MX_USART1_UART_Init(void)
*/
static void MX_GPIO_Init(void)
{
GPIO_InitTypeDef GPIO_InitStruct = {0};
/* GPIO Ports Clock Enable */
__HAL_RCC_GPIOC_CLK_ENABLE();
__HAL_RCC_GPIOA_CLK_ENABLE();
__HAL_RCC_GPIOB_CLK_ENABLE();
__HAL_RCC_GPIOH_CLK_ENABLE();
/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(GPIOA, CS__1_Pin|CS__2_Pin|CAN_RS_Pin, GPIO_PIN_RESET);
/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(GPIOB, FRAM_CS_Pin|LED2_Pin|LED1_Pin|CS__3_Pin
|CS__4_Pin, GPIO_PIN_RESET);
/*Configure GPIO pins : FR_RDY__1_Pin FR_RDY__2_Pin */
GPIO_InitStruct.Pin = FR_RDY__1_Pin|FR_RDY__2_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
/*Configure GPIO pins : CS__1_Pin CS__2_Pin CAN_RS_Pin */
GPIO_InitStruct.Pin = CS__1_Pin|CS__2_Pin|CAN_RS_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
/*Configure GPIO pins : FRAM_CS_Pin LED2_Pin LED1_Pin CS__3_Pin
CS__4_Pin */
GPIO_InitStruct.Pin = FRAM_CS_Pin|LED2_Pin|LED1_Pin|CS__3_Pin
|CS__4_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
/*Configure GPIO pin : FR_RDY__3_Pin */
GPIO_InitStruct.Pin = FR_RDY__3_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(FR_RDY__3_GPIO_Port, &GPIO_InitStruct);
/*Configure GPIO pin : FR_RDY__4_Pin */
GPIO_InitStruct.Pin = FR_RDY__4_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(FR_RDY__4_GPIO_Port, &GPIO_InitStruct);
}

View File

@ -218,29 +218,29 @@ void HAL_SPI_MspDeInit(SPI_HandleTypeDef* hspi)
void HAL_UART_MspInit(UART_HandleTypeDef* huart)
{
GPIO_InitTypeDef GPIO_InitStruct = {0};
if(huart->Instance==USART1)
if(huart->Instance==USART2)
{
/* USER CODE BEGIN USART1_MspInit 0 */
/* USER CODE BEGIN USART2_MspInit 0 */
/* USER CODE END USART1_MspInit 0 */
/* USER CODE END USART2_MspInit 0 */
/* Peripheral clock enable */
__HAL_RCC_USART1_CLK_ENABLE();
__HAL_RCC_USART2_CLK_ENABLE();
__HAL_RCC_GPIOB_CLK_ENABLE();
/**USART1 GPIO Configuration
PB6 ------> USART1_TX
PB7 ------> USART1_RX
__HAL_RCC_GPIOA_CLK_ENABLE();
/**USART2 GPIO Configuration
PA2 ------> USART2_TX
PA3 ------> USART2_RX
*/
GPIO_InitStruct.Pin = GPIO_PIN_6|GPIO_PIN_7;
GPIO_InitStruct.Pin = GPIO_PIN_2|GPIO_PIN_3;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
GPIO_InitStruct.Alternate = GPIO_AF7_USART1;
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
GPIO_InitStruct.Alternate = GPIO_AF7_USART2;
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
/* USER CODE BEGIN USART1_MspInit 1 */
/* USER CODE BEGIN USART2_MspInit 1 */
/* USER CODE END USART1_MspInit 1 */
/* USER CODE END USART2_MspInit 1 */
}
}
@ -253,23 +253,23 @@ void HAL_UART_MspInit(UART_HandleTypeDef* huart)
*/
void HAL_UART_MspDeInit(UART_HandleTypeDef* huart)
{
if(huart->Instance==USART1)
if(huart->Instance==USART2)
{
/* USER CODE BEGIN USART1_MspDeInit 0 */
/* USER CODE BEGIN USART2_MspDeInit 0 */
/* USER CODE END USART1_MspDeInit 0 */
/* USER CODE END USART2_MspDeInit 0 */
/* Peripheral clock disable */
__HAL_RCC_USART1_CLK_DISABLE();
__HAL_RCC_USART2_CLK_DISABLE();
/**USART1 GPIO Configuration
PB6 ------> USART1_TX
PB7 ------> USART1_RX
/**USART2 GPIO Configuration
PA2 ------> USART2_TX
PA3 ------> USART2_RX
*/
HAL_GPIO_DeInit(GPIOB, GPIO_PIN_6|GPIO_PIN_7);
HAL_GPIO_DeInit(GPIOA, GPIO_PIN_2|GPIO_PIN_3);
/* USER CODE BEGIN USART1_MspDeInit 1 */
/* USER CODE BEGIN USART2_MspDeInit 1 */
/* USER CODE END USART1_MspDeInit 1 */
/* USER CODE END USART2_MspDeInit 1 */
}
}

View File

@ -1,13 +1,17 @@
#MicroXplorer Configuration settings - do not modify
CAD.formats=
CAD.pinconfig=
CAD.provider=
CAN1.BS1=CAN_BS1_1TQ
CAN1.CalculateBaudRate=833333
CAN1.CalculateTimeBit=1200.00
CAN1.CalculateTimeBit=1200
CAN1.CalculateTimeQuantum=400.0
CAN1.IPParameters=CalculateTimeQuantum,BS1,CalculateTimeBit,CalculateBaudRate,Prescaler
CAN1.Prescaler=32
File.Version=6
GPIO.groupedBy=
KeepUserPlacement=false
Mcu.CPN=STM32L432KCU3
Mcu.Family=STM32L4
Mcu.IP0=CAN1
Mcu.IP1=NVIC
@ -48,17 +52,17 @@ Mcu.UserConstants=
Mcu.UserName=STM32L432KCUx
MxCube.Version=6.2.1
MxDb.Version=DB.6.0.21
NVIC.BusFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false
NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:false\:false
NVIC.BusFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
NVIC.ForceEnableDMAVector=true
NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false
NVIC.MemoryManagement_IRQn=true\:0\:0\:false\:false\:true\:false\:false
NVIC.NonMaskableInt_IRQn=true\:0\:0\:false\:false\:true\:false\:false
NVIC.PendSV_IRQn=true\:0\:0\:false\:false\:true\:false\:false
NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
NVIC.MemoryManagement_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
NVIC.NonMaskableInt_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
NVIC.PendSV_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
NVIC.PriorityGroup=NVIC_PRIORITYGROUP_4
NVIC.SVCall_IRQn=true\:0\:0\:false\:false\:true\:false\:false
NVIC.SysTick_IRQn=true\:0\:0\:false\:false\:true\:false\:true
NVIC.UsageFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false
NVIC.SVCall_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
NVIC.SysTick_IRQn=true\:0\:0\:false\:false\:true\:false\:true\:false
NVIC.UsageFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
PA0.GPIOParameters=GPIO_Label
PA0.GPIO_Label=RCC_HSE
PA0.Mode=HSE-External-Clock-Source-for-LittleOrca
@ -160,7 +164,7 @@ ProjectManager.StackSize=0x400
ProjectManager.TargetToolchain=Makefile
ProjectManager.ToolChainLocation=
ProjectManager.UnderRoot=false
ProjectManager.functionlistsort=1-MX_GPIO_Init-GPIO-false-HAL-true,2-SystemClock_Config-RCC-false-HAL-false,3-MX_CAN1_Init-CAN1-false-HAL-true,4-MX_SPI1_Init-SPI1-false-HAL-true,5-MX_USART1_UART_Init-USART1-false-HAL-true
ProjectManager.functionlistsort=1-MX_GPIO_Init-GPIO-false-HAL-true,2-SystemClock_Config-RCC-false-HAL-false,3-MX_CAN1_Init-CAN1-false-HAL-true,4-MX_SPI1_Init-SPI1-false-HAL-true,5-MX_USART2_UART_Init-USART2-false-HAL-true
RCC.ADCFreq_Value=64000000
RCC.AHBFreq_Value=80000000
RCC.APB1Freq_Value=80000000