Skip to content

Commit 275314d

Browse files
committed
Update the examples to be compatible with STM32duino Core v2.3.0
1 parent 1ebea8b commit 275314d

File tree

7 files changed

+4
-70
lines changed

7 files changed

+4
-70
lines changed

README.md

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -27,29 +27,11 @@ Expansion Board. It shows how to do the magnetometer hard iron calibration and d
2727
* Fusion9X_IKS02A1: This application provides a simple example of usage of the 9-axis fusion (accelerometer, gyroscope and magnetometer) with the X-NUCLEO-IKS02A1
2828
Expansion Board. It shows how to do the magnetometer hard iron calibration and display on a hyperterminal the values of yaw, pitch and roll.
2929

30-
## Setting CRC
31-
Up to [STM32 core](https://github.com/stm32duino/Arduino_Core_STM32) version 2.2.0 it is necessary to apply the following steps:
32-
33-
Check where the Arduino `preferences.txt` file are in `Arduino IDE -> Preferences`.
34-
35-
For Example: `C:\Users\Duino\AppData\Local\Arduino15` (Windows)
36-
37-
Then go to `.\packages\STM32\hardware\stm32\<release version>\cores\arduino\stm32\stm32yyxx_hal_conf.h` and open the file.
38-
39-
In the file add these lines of code:
40-
41-
```C
42-
#if !defined(HAL_CRC_MODULE_ENABLED)
43-
#define HAL_CRC_MODULE_ENABLED
44-
#else
45-
#undef HAL_CRC_MODULE_ENABLED
46-
#endif
47-
```
48-
4930
## Note
5031

51-
The MotionFX Library can be used on STM32 boards with ST MEMS sensors only. For more information, please give a look at the license terms.
52-
The MotionFX Library currently does not support the Cortex-M4 core of the STM32MP1xx devices.
32+
The MotionFX library requires [STM32 core](https://github.com/stm32duino/Arduino_Core_STM32) version 2.3.0 or higher.
33+
The MotionFX library can be used on STM32 boards with ST MEMS sensors only. For more information, please give a look at the license terms.
34+
The MotionFX library currently does not support the Cortex-M4 core of the STM32MP1xx devices.
5335

5436
## Dependencies
5537

@@ -67,5 +49,5 @@ The MotionFX library requires the following STM32duino libraries:
6749
You can find the library files at
6850
https://github.com/stm32duino/MotionFX
6951

70-
The MotionFX Library user manual is available at
52+
The MotionFX library user manual is available at
7153
https://www.st.com/content/ccc/resource/technical/document/user_manual/group0/31/0e/66/39/cb/f7/4e/cd/DM00394369/files/DM00394369.pdf/jcr:content/translations/en.DM00394369.pdf

examples/Fusion6X_IKS01A2/Fusion6X_IKS01A2.ino

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,6 @@ HardwareTimer *MyTim;
4848

4949
volatile uint8_t fusion_flag;
5050

51-
/* This variable can be removed when CRC will be integrated in the STM32duino Core */
52-
CRC_HandleTypeDef hcrc = {.Instance = CRC};
53-
5451
void fusion_update(void)
5552
{
5653
fusion_flag = 1;
@@ -61,11 +58,6 @@ void setup() {
6158
Serial.begin(115200);
6259
while (!Serial) yield();
6360

64-
/* This initialization can be removed when CRC will be integrated in the STM32duino Core */
65-
/* Initialize CRC */
66-
HAL_CRC_Init(&hcrc);
67-
__HAL_RCC_CRC_CLK_ENABLE();
68-
6961
/* Initialize I2C bus */
7062
Wire.begin();
7163
Wire.setClock(400000);

examples/Fusion6X_IKS01A3/Fusion6X_IKS01A3.ino

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,6 @@ HardwareTimer *MyTim;
4848

4949
volatile uint8_t fusion_flag;
5050

51-
/* This variable can be removed when CRC will be integrated in the STM32duino Core */
52-
CRC_HandleTypeDef hcrc = {.Instance = CRC};
53-
5451
void fusion_update(void)
5552
{
5653
fusion_flag = 1;
@@ -61,11 +58,6 @@ void setup() {
6158
Serial.begin(115200);
6259
while (!Serial) yield();
6360

64-
/* This initialization can be removed when CRC will be integrated in the STM32duino Core */
65-
/* Initialize CRC */
66-
HAL_CRC_Init(&hcrc);
67-
__HAL_RCC_CRC_CLK_ENABLE();
68-
6961
/* Initialize I2C bus */
7062
Wire.begin();
7163
Wire.setClock(400000);

examples/Fusion6X_IKS02A1/Fusion6X_IKS02A1.ino

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,6 @@ HardwareTimer *MyTim;
4848

4949
volatile uint8_t fusion_flag;
5050

51-
/* This variable can be removed when CRC will be integrated in the STM32duino Core */
52-
CRC_HandleTypeDef hcrc = {.Instance = CRC};
53-
5451
void fusion_update(void)
5552
{
5653
fusion_flag = 1;
@@ -61,11 +58,6 @@ void setup() {
6158
Serial.begin(115200);
6259
while (!Serial) yield();
6360

64-
/* This initialization can be removed when CRC will be integrated in the STM32duino Core */
65-
/* Initialize CRC */
66-
HAL_CRC_Init(&hcrc);
67-
__HAL_RCC_CRC_CLK_ENABLE();
68-
6961
/* Initialize I2C bus */
7062
Wire.begin();
7163
Wire.setClock(400000);

examples/Fusion9X_IKS01A2/Fusion9X_IKS01A2.ino

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,6 @@ volatile uint8_t fusion_flag;
5959

6060
bool mag_calibrated = false;
6161

62-
/* This variable can be removed when CRC will be integrated in the STM32duino Core */
63-
CRC_HandleTypeDef hcrc = {.Instance = CRC};
64-
6562
void fusion_update(void)
6663
{
6764
fusion_flag = 1;
@@ -72,11 +69,6 @@ void setup() {
7269
Serial.begin(115200);
7370
while (!Serial) yield();
7471

75-
/* This initialization can be removed when CRC will be integrated in the STM32duino Core */
76-
/* Initialize CRC */
77-
HAL_CRC_Init(&hcrc);
78-
__HAL_RCC_CRC_CLK_ENABLE();
79-
8072
/* Initialize LED */
8173
pinMode(LED_BUILTIN, OUTPUT);
8274

examples/Fusion9X_IKS01A3/Fusion9X_IKS01A3.ino

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,6 @@ volatile uint8_t fusion_flag;
5959

6060
bool mag_calibrated = false;
6161

62-
/* This variable can be removed when CRC will be integrated in the STM32duino Core */
63-
CRC_HandleTypeDef hcrc = {.Instance = CRC};
64-
6562
void fusion_update(void)
6663
{
6764
fusion_flag = 1;
@@ -72,11 +69,6 @@ void setup() {
7269
Serial.begin(115200);
7370
while (!Serial) yield();
7471

75-
/* This initialization can be removed when CRC will be integrated in the STM32duino Core */
76-
/* Initialize CRC */
77-
HAL_CRC_Init(&hcrc);
78-
__HAL_RCC_CRC_CLK_ENABLE();
79-
8072
/* Initialize LED */
8173
pinMode(LED_BUILTIN, OUTPUT);
8274

examples/Fusion9X_IKS02A1/Fusion9X_IKS02A1.ino

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,6 @@ volatile uint8_t fusion_flag;
5959

6060
bool mag_calibrated = false;
6161

62-
/* This variable can be removed when CRC will be integrated in the STM32duino Core */
63-
CRC_HandleTypeDef hcrc = {.Instance = CRC};
64-
6562
void fusion_update(void)
6663
{
6764
fusion_flag = 1;
@@ -72,11 +69,6 @@ void setup() {
7269
Serial.begin(115200);
7370
while (!Serial) yield();
7471

75-
/* This initialization can be removed when CRC will be integrated in the STM32duino Core */
76-
/* Initialize CRC */
77-
HAL_CRC_Init(&hcrc);
78-
__HAL_RCC_CRC_CLK_ENABLE();
79-
8072
/* Initialize LED */
8173
pinMode(LED_BUILTIN, OUTPUT);
8274

0 commit comments

Comments
 (0)