Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions targets/TARGET_STM/TARGET_STM32H7/objects.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,11 @@ struct analogin_s {

#if DEVICE_QSPI
struct qspi_s {
#if defined(OCTOSPI1)
OSPI_HandleTypeDef handle;
#else
QSPI_HandleTypeDef handle;
#endif
QSPIName qspi;
PinName io0;
PinName io1;
Expand All @@ -117,6 +121,24 @@ struct qspi_s {
};
#endif

#if DEVICE_OSPI
struct ospi_s {
OSPI_HandleTypeDef handle;
OSPIName ospi;
PinName io0;
PinName io1;
PinName io2;
PinName io3;
PinName io4;
PinName io5;
PinName io6;
PinName io7;
PinName sclk;
PinName ssel;
PinName dqs;
};
#endif

#define GPIO_IP_WITHOUT_BRR

#if defined(DUAL_CORE)
Expand Down
7 changes: 5 additions & 2 deletions targets/TARGET_STM/ospi_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -336,9 +336,12 @@ static ospi_status_t _ospi_init_direct(ospi_t *obj, const ospi_pinmap_t *pinmap,
pin_function(pinmap->dqs_pin, pinmap->dqs_function);
pin_mode(pinmap->dqs_pin, PullNone);

#if defined(OCTOSPI2)
#if defined(OCTOSPIM)
#if defined(TARGET_STM32H7)
__HAL_RCC_OCTOSPIM_CLK_ENABLE();
#else
__HAL_RCC_OSPIM_CLK_ENABLE();

#endif
OSPIM_CfgTypeDef OSPIM_Cfg_Struct = {0};

/* The OctoSPI IO Manager OCTOSPIM configuration is supported in a simplified mode in mbed-os
Expand Down