cancel
Showing results for 
Search instead for 
Did you mean: 

C90FL (beta) flash program fails - help!

Posted on June 20, 2014 at 11:41

C90FL program fails due to alignment error but all parameters check out?

Parameter details before call:

dest       size       source     result = C90FL_ERROR_ALIGNMENT

0x00008000 0x00000100 0x40005300 0x00000100

0x00008100 0x00000100 0x40005300 0x00000100

From UM1627, p.15, table 18, Troubleshooting for FlashProgram()

C90FL_ERROR_ALIGNMENT

This error indicates that dest/size/source isn�t properly aligned

Check if dest and size are aligned on double word (64-bit) boundary. Check if source is aligned on word boundary.

Ok my checks,

0x8000 & 8 = 0 so aligned to 64bit/double word boundary

0x100 & 8 = 0 so aligned to 64bit/double word boundary

0x40005300 & 8=0 or 0x40005300 & 4=0 source is aligned to 32bit and 64bit brounary

What else should be check?

Blank check and then erase before hand worked so the flash is ready for programming.

Here is the VLE?? code I have been using for program from C90FL library, beta.

My development device is spc560b64l7.

const unsigned long FlashProgram_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

    

}; /* Total Size = 194 words */

#c90fl
This discussion has been locked for participation. If you have a question, please start a new topic in order to ask your question
1 REPLY 1
Erwan YVIN
ST Employee
Posted on June 30, 2014 at 11:25

Dear David ,

Sorry for the late answer.

The used parameters are correct and in line with specification.

I tried them and in my environment I don’t get the error during programming, using the same parameters.

Could you check which version of the driver you are using?

Could you please use the following function for a check?

const unsigned short FlashProgram_C[] =

{

      0x0080, 0x1821, 0x06D0, 0x1AC1, 0x0908, 0xDD01, 0x013E, 0x014B, 0x016C, 0x017D, 0x488A, 0x480F, 0xC08E, 0x7F64

    , 0x2B78, 0xC86E, 0x7CE4, 0x3396, 0x0567, 0x7CE7, 0x2051, 0xE204, 0x1B87, 0xC803, 0xE604, 0x637F, 0x7800, 0x0196

    , 0xC36E, 0xC47E, 0x7C86, 0x3A14, 0xC16E, 0xC27E, 0x0476, 0x7F3B, 0x2A14, 0xC37E, 0x0D7B, 0xE40A, 0x0D4B, 0xE008

    , 0xC47E, 0x0D75, 0xE505, 0x0D49, 0xE503, 0x4817, 0xE810, 0xC17E, 0x0D7B, 0xE40A, 0x0D6B, 0xE008, 0xC27E, 0x0D75

    , 0xE505, 0x0D69, 0xE503, 0x4827, 0xE804, 0x636F, 0x7800, 0x014E, 0x2A05, 0x7A12, 0x0148, 0xC078, 0x70E0, 0xC816

    , 0xE605, 0x73E0, 0x0300, 0x7800, 0x0138, 0xC078, 0x65B7, 0x18E7, 0xC53F, 0xD078, 0xC87E, 0x23F7, 0xE207, 0x7CB9

    , 0x2C70, 0x4A0A, 0x72E0, 0x0008, 0xE81B, 0xC87E, 0x2B07, 0xE207, 0x7CB9, 0x2470, 0x490A, 0x72E0, 0x0008, 0xE812

    , 0xC87E, 0x2A87, 0xE207, 0x7CB9, 0x1C70, 0x488A, 0x72E0, 0x0008, 0xE809, 0xC87E, 0x2A47, 0xE206, 0x7CB9, 0x1470

    , 0x484A, 0x72E0, 0x0004, 0x72C0, 0x0001, 0xE838, 0x223A, 0xE106, 0xC05C, 0xC16C, 0xD05B, 0xD16B, 0xE803, 0xC07C

    , 0xD07B, 0x7F7B, 0xBA14, 0x7F9C, 0xBA14, 0x7CFB, 0xD396, 0x05A7, 0x7CE7, 0xD851, 0xE604, 0x7C16, 0xC840, 0xE220

    , 0xC078, 0x65F7, 0x18E7, 0xC53F, 0xD078, 0xE806, 0x181D, 0xACFF, 0xE603, 0x00BD, 0x0007, 0xC078, 0x70E0, 0xCC00

    , 0xE6F8, 0xC078, 0x70E0, 0xCA00, 0xE208, 0xC078, 0x61F7, 0x18E7, 0xC53F, 0xD078, 0x635F, 0xE80B, 0xC078, 0x61F7

    , 0x18E7, 0xC53F, 0xD078, 0x1AD6, 0x8001, 0x7C16, 0xC840, 0xE1C7, 0xC078, 0x61B7, 0x18E7, 0xC53F, 0xD078, 0xC06E

    , 0x70F8, 0xE3F9, 0x1CE7, 0xC000, 0x0D76, 0xE612, 0x70F8, 0xE3F9, 0x1CE7, 0x801C, 0xC057, 0x70D8, 0xE3F9, 0x1CC6

    , 0x801C, 0xC076, 0x61F7, 0xD076, 0x70F8, 0xE3F9, 0x1CE7, 0x801C, 0xD057, 0xC06E, 0x70F8, 0xE3F9, 0x1CE7, 0xC000

    , 0x0D76, 0xE212, 0x70F8, 0xE3F9, 0x1CE7, 0x8020, 0xC057, 0x70D8, 0xE3F9, 0x1CC6, 0x8020, 0xC076, 0x61F7, 0xD076

    , 0x70F8, 0xE3F9, 0x1CE7, 0x8020, 0xD057, 0xC97E, 0x2A07, 0xE602, 0x0002, 0x01F7, 0x0173, 0x1AC1, 0x0808, 0xCD01

    , 0x1821, 0x8030, 0x0090, 0x0004

    , 0x3039, 0x3530, 0x3446, 0x4646

   

}; /* Total Size = 246 half words */

Could we access the application code to try it with source code of the driver? Please let us know.

Best regards.

        Erwan