C90FL_ERROR_ALIGNMENT with SSD driver

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

C90FL_ERROR_ALIGNMENT with SSD driver

Jump to solution
1,793 Views
bjrajendra
Senior Contributor I

Hello all,

I'm using MPC5602P on CW2.9. I'm trying to implement Flash Boot Loader using SSD drivers. Initially I tested without FBL with random values, everything worked well. I added my FBL code and 

     dest = p_srecord.loadAddr;
     source = (UINT32)p_srecord.Data;
     size = 16;
     // program main array //
        ret = g_FlashProgram( &ssdConfig, dest, size, source, &Callback );
        // Verify the programmed data //
        ret |= pProgramVerify( &ssdConfig, dest, size, source, &failAddress, &failData, &failSource, &Callback);
        if ( C90FL_OK != ret )
        {
            ErrorTrap(ret);
        }

Later after executing the FlashProgram function I'm getting C90FL_ERROR_ALIGNMENT. I'm attaching the image here.

misalign_error.jpg

From the image, we can verify the dest address is correct and the data showing in memory window 1 is also perfect. But it is giving the return value 0x00000100 (C90FL_ERROR_ALIGNMENT).

Hope some turns out ,

Thanks in advance,

Regards,

Raju.

Labels (1)
0 Kudos
1 Solution
483 Views
bjrajendra
Senior Contributor I

I got it,

The C90FL_ERROR_ALIGNMENT will occur if the destination address we transmit satisfies the following condition,

 if ( ((dest | size) % C90FL_DWORD_SIZE) != 0 )
{
returnCode = C90FL_ERROR_ALIGNMENT;
 }

Cheers,

Raju

View solution in original post

0 Kudos
1 Reply
484 Views
bjrajendra
Senior Contributor I

I got it,

The C90FL_ERROR_ALIGNMENT will occur if the destination address we transmit satisfies the following condition,

 if ( ((dest | size) % C90FL_DWORD_SIZE) != 0 )
{
returnCode = C90FL_ERROR_ALIGNMENT;
 }

Cheers,

Raju

0 Kudos