SEMC_SendIPCommand() with argument kSEMC_SRAMCM_ArrayRead

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SEMC_SendIPCommand() with argument kSEMC_SRAMCM_ArrayRead

539 Views
nickwallis
Senior Contributor I

Hi,

Does anyone know the format/syntax of IP command SEMC_SendIPCommand() with argument kSEMC_SRAMCM_ArrayRead?

In particular, how do you tell it how much data you want to read?

thanks

-Nick

0 Kudos
1 Reply

531 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi nickwallis,

  I think you can refer to the other SEMC IP read commander, eg.

SEMC_IPCommandNorRead in fsl_semc.c

  You will find the IP command SEMC_SendIPCommand with read method.

    while (size_bytes >= SEMC_IPCOMMANDDATASIZEBYTEMAX)
    {
        result =
            SEMC_SendIPCommand(base, kSEMC_MemType_NOR, address, (uint16_t)kSEMC_NORDBICM_Read, 0, tmpData.u32Data);
        if (result != kStatus_Success)
        {
            break;
        }

        data += SEMC_IPCOMMANDDATASIZEBYTEMAX;
        size_bytes -= SEMC_IPCOMMANDDATASIZEBYTEMAX;
    }

You can find :

SEMC_SendIPCommand(base, kSEMC_MemType_NOR, address, (uint16_t)kSEMC_NORDBICM_Read, 0, tmpData.u32Data);

You can replace the kSEMC_NORDBICM_Read to your kSEMC_SRAMCM_ArrayRead

About how much data, it determined by your code, you can consider each IP read just read 4Bytes, then if you need more, you just call more IP read.

 

Wish it helps you!

If you still have questions about it, please kindly let me know.

Best Regards,

Kerry

0 Kudos