C90FL_ERROR_ALIGNMENT with SSD driver

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

C90FL_ERROR_ALIGNMENT with SSD driver

跳至解决方案
2,475 次查看
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.

标签 (1)
标记 (2)
0 项奖励
回复
1 解答
1,165 次查看
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 项奖励
回复
1 回复
1,166 次查看
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 项奖励
回复