ITADN

OSPI API code should not contain conditional compilation for the MX25LM51245G

#498Openwdx04 创建于 2025-09-17
W
wdx04commented
In the current implementation of the ST OSPI API, There is a conditional compilation used to determine the type of the OCTOSPI memory. The model MX25LM51245G is set as MACRONIX type, while all other models are treated as MICRON type. This is obviously wrong. MACRONIX also produces other OCTOSPI memory chips, and in addition to MACRONIX and MICRON, there are other OCTOSPI memory manufacturers and memory types, including HyperFlash and HyperRAM. We may need to treat the memory type as an initialization parameter. https://github.com/mbed-ce/mbed-os/blob/9048a88b91e0ff93921fe7828624cd74d4f4d980/targets/TARGET_STM/ospi_api.c#L331-L335 Also, in the COMPONENT_OSPIF/include/OSPIF folder, there are configuration headers for MX25LM51245G and MX25LW51245G models. These files may also need to be removed.
0 条评论