-
Notifications
You must be signed in to change notification settings - Fork 55
Open
Labels
bugSomething isn't workingSomething isn't workinginternal bug trackerIssue confirmed and logged into the internal bug tracking systemIssue confirmed and logged into the internal bug tracking systemneeds clarificationNeeds clarification or inputs from the userNeeds clarification or inputs from the userospiOctal Serial Peripheral InterfaceOctal Serial Peripheral Interface
Description
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)
stm32h7xx-hal-driver/Src/stm32h7xx_hal_ospi.c
Line 2484 in d649ed2
| 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 workingSomething isn't workinginternal bug trackerIssue confirmed and logged into the internal bug tracking systemIssue confirmed and logged into the internal bug tracking systemneeds clarificationNeeds clarification or inputs from the userNeeds clarification or inputs from the userospiOctal Serial Peripheral InterfaceOctal Serial Peripheral Interface
Type
Projects
Status
Analyzed