Skip to content

impossibility of simultaneous operation of two OSPI in quad mode #97

@xfaktory

Description

@xfaktory

When CubeMX generates code with both OSPI modules configured in Quad Mode the first module becomes inactive (disconnected from GPIO) after the second one is initialized.

In the function HAL_OSPIM_Config(OSPI_HandleTypeDef *hospi, OSPIM_CfgTypeDef *cfg, uint32_t Timeout)

HAL_StatusTypeDef HAL_OSPIM_Config(OSPI_HandleTypeDef *hospi, OSPIM_CfgTypeDef *cfg, uint32_t Timeout)

there is a check that one port is used in both instances. but when both OSPIs configured in QuadMode IOHighPort is zero (HAL_OSPIM_IOPORT_NONE) for both and next condition is true

 if ((cfg->ClkPort == IOM_cfg[other_instance].ClkPort) || (cfg->NCSPort == IOM_cfg[other_instance].NCSPort) ||
        ((cfg->DQSPort == IOM_cfg[other_instance].DQSPort) && (cfg->DQSPort != 0U)) ||
        (cfg->IOLowPort == IOM_cfg[other_instance].IOLowPort) ||
        (cfg->IOHighPort == IOM_cfg[other_instance].IOHighPort))

I think it's necessary to add a check for cfg->IOHighPort != HAL_OSPIM_IOPORT_NONE

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinginternal bug trackerIssue confirmed and logged into the internal bug tracking systemneeds clarificationNeeds clarification or inputs from the userospiOctal Serial Peripheral Interface

Type

Projects

Status

Analyzed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions