C90FL_ERROR_ALIGNMENT

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

C90FL_ERROR_ALIGNMENT

1,083 Views
常瓦姚
Contributor I

hello all,

When I use  the Standard Software Driver (SSD) for single C90FL Flash module, I have one problem is that:

 ret = pFlashProgram(&ssdConfig,  target_address, size, (uint32_t)buffer, NULL_CALLBACK);

the return code is C90FL_ERROR_ALIGNMENT; But I check that:

 target_address = 0xC000;

 size = 576;

 buffer = 0x40000378;

It is page size aligned and word size aligned, so what's the problem?

0 Kudos
Reply
3 Replies

1,002 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

I can't see problem here. What is version of the drivers exactly? And which microcontroller do you use? There's usually this piece of code which checks the alignment:

   /* Check alignments */
    if ( (((dest | size) % C90FL_DWORD_SIZE) != 0) ||
         ((source % C90FL_WORD_SIZE) != 0))
    {
        returnCode = C90FL_ERROR_ALIGNMENT;
        goto EXIT;
    }

C90FL_DWORD_SIZE is 8, so it should be ok.

Regards,

Lukas

0 Kudos
Reply

1,002 Views
常瓦姚
Contributor I

The microcontroller I use is MPC5604P, and I don't know the version of drivers. I only have the c-array code.

const unsigned long FlashErase_C[] =
{

0x0080D101, 0x18210690, 0x1A61093C, 0x7C000026, 0xDE01013F
, 0x014D015B, 0x026F027E, 0x488A4809, 0xC0EF7FB5, 0xDB78329F
, 0x00207E75, 0xA3967E93, 0xA1D67E94, 0xA8501874, 0xA8007A0E
, 0x001076F4, 0x07BF1874, 0xA8007A1E, 0x000A6379, 0x7800028E
, 0x529F000C, 0x52BF0010, 0x7E94AA14, 0x5681001C, 0x529F0004
, 0x52BF0008, 0x7E94AA14, 0x56810018, 0x7F9DDA14, 0x529F000C
, 0x7D9DA040, 0x7A1C0032, 0x5281001C, 0x7D9DA040, 0x7A0C0026
, 0x529F0010, 0x7D9BA040, 0x7A1D001A, 0x5281001C, 0x7D9CA040
, 0x7A1D000E, 0x72600001, 0x36610010, 0xE821529F, 0x00047D9D
, 0xA0407A1C, 0x00325281, 0x00187D9D, 0xA0407A0C, 0x0026529F
, 0x00087D9B, 0xA0407A1D, 0x001A5281, 0x00187D9C, 0xA0407A1D
, 0x000E7260, 0x00023661, 0x0010E804, 0x63697800, 0x01F0187B
, 0xA8007A1E, 0x01E8529E, 0x00005681, 0x00205281, 0x00201A94
, 0xC8161874, 0xA8007A1E, 0x000C7320, 0x03007800, 0x01C8529E
, 0x00001A94, 0xD0107694, 0x049F569E, 0x0000329F, 0x002018F4
, 0xA8207A0E, 0x000E777C, 0xD97F4A0A, 0x4888E821, 0x329F0020
, 0x18F4A810, 0x7A0E000E, 0x777CE13F, 0x490A4888, 0xE816329F
, 0x002018F4, 0xA8087A0E, 0x000E777C, 0xE8FF488A, 0x4888E80B
, 0x329F0020, 0x18F4A804, 0x7A0E000C, 0x777CF0BF, 0x484A4848
, 0x72600001, 0x56610024, 0xE86118FA, 0xA8047A0D, 0x001652B7
, 0x00005297, 0x0004569D, 0x000456BD, 0x0000E805, 0x52970000
, 0x569D0000, 0x048D7EF7, 0xC2147E9D, 0xD3967E94, 0xD1D67E94
, 0xE8501874, 0xA8007A1E, 0x00105281, 0x00247D94, 0xE0407A0E
, 0x0070529E, 0x00001A94, 0xD0017694, 0x049F569E, 0x0000E80C
, 0x727F7FFF, 0x7D969840, 0x7A1E000E, 0x7ECCB378, 0x7D8903A6
, 0x0007529E, 0x00007694, 0x056B1874, 0xA8007A1E, 0xFFDE529E
, 0x00007694, 0x05AD1874, 0xA8007A0E, 0x0018527E, 0x00007673
, 0x003D7673, 0x049F567E, 0x00006359, 0xE815529E, 0x00007694
, 0x003D7694, 0x049F569E, 0x00005281, 0x00241E94, 0x00015681
, 0x00245281, 0x00247D94, 0xE0407A0D, 0xFF38527E, 0x00007673
, 0x07357673, 0x049F567E, 0x0000527F, 0x000070F3, 0x940818F3
, 0xA9C07A1E, 0x00307278, 0xE3F95273, 0x801C5661, 0x00147278
, 0xE3F95273, 0x801C7674, 0x003D7278, 0xE3F95693, 0x801C5261
, 0x00147298, 0xE3F95674, 0x801C527F, 0x000070F3, 0x940818F3
, 0xA9C07A0E, 0x00307278, 0xE3F95273, 0x80205661, 0x00147278
, 0xE3F95273, 0x80207674, 0x003D7278, 0xE3F95693, 0x80205261
, 0x00147298, 0xE3F95674, 0x8020527F, 0x00241873, 0xA8007A1E
, 0x00060002, 0x01935181, 0x00387D8F, 0xF1201A61, 0x083CC011
, 0xC1010090, 0x00040000
, 0x30393530, 0x34464646
};

0 Kudos
Reply

1,002 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

let's start with using of the correct driver. This is the latest one for MPC560xP:

https://www.nxp.com/downloads/en/device-drivers/MPC56XX_C90LC_JDP_SSD_100_DEVD.exe

Comparing with the c-array shared above, you are not using this version.

Regards,

Lukas

0 Kudos
Reply