Skip to content

Commit 8cd00b3

Browse files
jeromecoutantLMESTM
authored andcommitted
STM32L4: Add OSPI IP support in fallback QSPI mode
For STM32 platforms that embed an OSPI IP, we're offering a QSPI fallback support with this commit. When OSPI is supported in mbed, we can consider adding full OSPI support
1 parent 1c29136 commit 8cd00b3

File tree

19 files changed

+602
-143
lines changed

19 files changed

+602
-143
lines changed

targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F413xH/objects.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,6 @@ struct trng_s {
4444
RNG_HandleTypeDef handle;
4545
};
4646

47-
struct qspi_s {
48-
QSPI_HandleTypeDef handle;
49-
PinName io0;
50-
PinName io1;
51-
PinName io2;
52-
PinName io3;
53-
PinName sclk;
54-
PinName ssel;
55-
};
56-
5747
#include "common_objects.h"
5848

5949
#ifdef __cplusplus

targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F469xI/objects.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,16 +58,6 @@ struct trng_s {
5858
RNG_HandleTypeDef handle;
5959
};
6060

61-
struct qspi_s {
62-
QSPI_HandleTypeDef handle;
63-
PinName io0;
64-
PinName io1;
65-
PinName io2;
66-
PinName io3;
67-
PinName sclk;
68-
PinName ssel;
69-
};
70-
7161
#include "common_objects.h"
7262

7363
#ifdef __cplusplus

targets/TARGET_STM/TARGET_STM32F4/common_objects.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,23 @@ struct can_s {
143143
};
144144
#endif
145145

146+
#if DEVICE_QSPI
147+
struct qspi_s {
148+
#if defined(OCTOSPI1)
149+
OSPI_HandleTypeDef handle;
150+
#else
151+
QSPI_HandleTypeDef handle;
152+
#endif
153+
QSPIName qspi;
154+
PinName io0;
155+
PinName io1;
156+
PinName io2;
157+
PinName io3;
158+
PinName sclk;
159+
PinName ssel;
160+
};
161+
#endif
162+
146163
#ifdef __cplusplus
147164
}
148165
#endif

targets/TARGET_STM/TARGET_STM32F7/TARGET_STM32F746xG/objects.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,16 +58,6 @@ struct trng_s {
5858
RNG_HandleTypeDef handle;
5959
};
6060

61-
struct qspi_s {
62-
QSPI_HandleTypeDef handle;
63-
PinName io0;
64-
PinName io1;
65-
PinName io2;
66-
PinName io3;
67-
PinName sclk;
68-
PinName ssel;
69-
};
70-
7161
#include "common_objects.h"
7262

7363
#ifdef __cplusplus

targets/TARGET_STM/TARGET_STM32F7/TARGET_STM32F756xG/objects.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,16 +58,6 @@ struct trng_s {
5858
RNG_HandleTypeDef handle;
5959
};
6060

61-
struct qspi_s {
62-
QSPI_HandleTypeDef handle;
63-
PinName io0;
64-
PinName io1;
65-
PinName io2;
66-
PinName io3;
67-
PinName sclk;
68-
PinName ssel;
69-
};
70-
7161
#include "common_objects.h"
7262

7363
#ifdef __cplusplus

targets/TARGET_STM/TARGET_STM32F7/TARGET_STM32F769xI/objects.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,16 +58,6 @@ struct trng_s {
5858
RNG_HandleTypeDef handle;
5959
};
6060

61-
struct qspi_s {
62-
QSPI_HandleTypeDef handle;
63-
PinName io0;
64-
PinName io1;
65-
PinName io2;
66-
PinName io3;
67-
PinName sclk;
68-
PinName ssel;
69-
};
70-
7161
#include "common_objects.h"
7262

7363
#ifdef __cplusplus

targets/TARGET_STM/TARGET_STM32F7/common_objects.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,23 @@ struct can_s {
142142
};
143143
#endif
144144

145+
#if DEVICE_QSPI
146+
struct qspi_s {
147+
#if defined(OCTOSPI1)
148+
OSPI_HandleTypeDef handle;
149+
#else
150+
QSPI_HandleTypeDef handle;
151+
#endif
152+
QSPIName qspi;
153+
PinName io0;
154+
PinName io1;
155+
PinName io2;
156+
PinName io3;
157+
PinName sclk;
158+
PinName ssel;
159+
};
160+
#endif
161+
145162
#ifdef __cplusplus
146163
}
147164
#endif

targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L475xG/objects.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,16 +58,6 @@ struct trng_s {
5858
RNG_HandleTypeDef handle;
5959
};
6060

61-
struct qspi_s {
62-
QSPI_HandleTypeDef handle;
63-
PinName io0;
64-
PinName io1;
65-
PinName io2;
66-
PinName io3;
67-
PinName sclk;
68-
PinName ssel;
69-
};
70-
7161
#include "common_objects.h"
7262

7363
#ifdef __cplusplus

targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L476xG/objects.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,16 +58,6 @@ struct trng_s {
5858
RNG_HandleTypeDef handle;
5959
};
6060

61-
struct qspi_s {
62-
QSPI_HandleTypeDef handle;
63-
PinName io0;
64-
PinName io1;
65-
PinName io2;
66-
PinName io3;
67-
PinName sclk;
68-
PinName ssel;
69-
};
70-
7161
#include "common_objects.h"
7262

7363
#ifdef __cplusplus

targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L486xG/objects.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,16 +58,6 @@ struct trng_s {
5858
RNG_HandleTypeDef handle;
5959
};
6060

61-
struct qspi_s {
62-
QSPI_HandleTypeDef handle;
63-
PinName io0;
64-
PinName io1;
65-
PinName io2;
66-
PinName io3;
67-
PinName sclk;
68-
PinName ssel;
69-
};
70-
7161
#include "common_objects.h"
7262

7363
#ifdef __cplusplus

0 commit comments

Comments
 (0)