iMX283 custom board - loading Linux fails

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

iMX283 custom board - loading Linux fails

777 Views
johandejong
Contributor I

Dear all,

We have a custom board, iMX283 with Alliance Memory AS4C32M16D2-25BCN (DDR2, 64MB, 512Mbit, 1 bank, 16 bits wide databus) memory connected to it (6-layer board, device is just 4mm away from microcontroller). The board runs off a 5V supply, with only the memory connected to the 1.8V power rail (DCDC_VDDA). The power rail is fed by the DCDC converter, which seem to work nice, as the power of the rail increases from 1.78 to 1.81V when switching from the linear regulators to the DCDC converter.

In the imx-bootlets code, I modified the EMI clock to run 100MHz, just to be sure memory clock speed is not the problem (fractional divider 480 * 18/29 = 297, integer division factor 6). On the scope it gives, even with a passive probe, a nice non-distorted signal.

I'm trying to built updater_ivt.sb using LTIB.

In the bootlet code (init-mx28.c) I implemented a small DDR memory test program, which writes 0xAA and 0x55 to memory locations, and reads them back (starting address is 0x40000000, which is DDR base address). This seems to work fine, as the first 1024 locations are written with alternating values, and are read back correctly.

However, after the last JUMP instruction to the vector table, the program does nothing anymore. This is the point where I don't known how to proceed.

The results of running sb_loader.exe /f updater_ivt.sb are:

---------------------------------------------------------------------------------------

HTLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLFLC

PowerPrep start initialize power...

Battery Voltage = 0.00V

No battery or bad battery detected! Disabling battery voltage measurements.

LLLC

Aug 26 2015 14:52:21

Powering on PLL...

Setting EMI pins...

Setting EMI clock...

CLKCTRL_FRAC0 register value: 0x92925D52

Powering on VDDA...

Changing CPU frequency...

POWER_VDDDCTRL register value: 0x00820710

CLKCTRL_FRAC0 register value: 0x92925D52

Changing CPU frequency to 454MHz...

Starting to change CPU frequency...

CLKCTRL_FRAC0 register value: 0x92925D13

CLKCTRL_HBUS register value: 0x00000003

CLKCTRL_CPU register value: 0x00010001

CLKCTRL_EMI register value: 0x00000106

Wait for DDR2 ready...

Start DDR2 memory test...

DDR2 mapped at 0x40000000. Testing first 0x00000400 memory locations...

Writing memory locations to 0x000000AA, 0xFFFFFF55...

Reading back memory locations...

Writing memory locations to 0x00000055, 0xFFFFFFAA...

Reading back memory locations...

Finished simple test successfully.

LLLLLLLFLCLFLLJ

---------------------------------------------------------------------------------------

(The number 0x000000AA shoud read 0xAA, I'll fix that later)

I can run sb_loader.exe as often as I wish, it produces everytime the same results. The voltages (VDD5V, DCDC_VDDD, DCDC_VDDA, DCDC_VDDIO look OK without interruptions/spikes/etc on the oscilloscope. So I assume the power is OK.

The ./ltib command produces this table for the loader:

---------------------------------------------------------------------------------------

  LOAD..... (cut away some lines)

  LOAD | adr=0x00001ffc | len=0x00000038 | crc=0x67df6bf0 | flg=0x00000000

  LOAD | adr=0x00002034 | len=0x00000008 | crc=0x13925bb6 | flg=0x00000000

  LOAD | adr=0x0000203c | len=0x000000bc | crc=0xc55a359b | flg=0x00000000

  LOAD | adr=0x000020f8 | len=0x0000008c | crc=0x8a2bdeb8 | flg=0x00000000

  LOAD | adr=0x00002184 | len=0x000000b0 | crc=0xbbe9473a | flg=0x00000000

  LOAD | adr=0x00002234 | len=0x00000040 | crc=0xd84aa7b4 | flg=0x00000000

  LOAD | adr=0x00002274 | len=0x00000030 | crc=0x8912c8f6 | flg=0x00000000

  LOAD | adr=0x000022a4 | len=0x00000038 | crc=0x8b44b847 | flg=0x00000000

  LOAD | adr=0x000022dc | len=0x00000010 | crc=0x332a6bad | flg=0x00000000

  LOAD | adr=0x000022ec | len=0x00000048 | crc=0xcd5ea097 | flg=0x00000000

  LOAD | adr=0x00002334 | len=0x0000002c | crc=0xdc5b5aa9 | flg=0x00000000

  LOAD | adr=0x00002360 | len=0x00000005 | crc=0x763cab7d | flg=0x00000000

  FILL | adr=0x00002368 | len=0x00000024 | ptn=0x00000000

  LOAD | adr=0x00008000 | len=0x00000020 | crc=0x0ec9b2e5 | flg=0x00000000

  CALL | adr=0x00008000 | arg=0x00000000 | flg=0x00000001 <----- start executing power_prep

  LOAD | adr=0x00000000 | len=0x00000c10 | crc=0x6bd0b098 | flg=0x00000000

  LOAD | adr=0x00000c10 | len=0x00000320 | crc=0x620fd097 | flg=0x00000000

  LOAD | adr=0x00008000 | len=0x00000020 | crc=0x7ebfbf46 | flg=0x00000000

  CALL | adr=0x00008000 | arg=0x00000000 | flg=0x00000001 <----- start executing boot_prep

  LOAD | adr=0x00002000 | len=0x00000144 | crc=0xea80477d | flg=0x00000000

  LOAD | adr=0x00002160 | len=0x0000078c | crc=0xf6d80ca0 | flg=0x00000000

  LOAD | adr=0x00002900 | len=0x00000004 | crc=0xdc0472d0 | flg=0x00000000

  LOAD | adr=0x00002920 | len=0x00000008 | crc=0x55e1b86b | flg=0x00000000

  LOAD | adr=0x00002928 | len=0x00000028 | crc=0x3c146c50 | flg=0x00000000

  LOAD | adr=0x00002960 | len=0x000000ec | crc=0x7e0b4612 | flg=0x00000000

  LOAD | adr=0x00002a60 | len=0x000000d8 | crc=0x1388eb32 | flg=0x00000000

  FILL | adr=0x00002b40 | len=0x00000014 | ptn=0x00000000

  LOAD | adr=0x00008000 | len=0x00000020 | crc=0x38d66e8d | flg=0x00000000

  CALL | adr=0x00008000 | arg=0x00000000 | flg=0x00000001 <----- start executing linux_prep

  LOAD | adr=0x40008000 | len=0x0014d6fc | crc=0xf1b7c167 | flg=0x00000000 <----- loads zImage into DDR memory (~1.3MB, free space is almost 8MB)

  FILL | adr=0x40800000 | len=0x00600000 | ptn=0x00000000 <----- clear some memory locations

  LOAD | adr=0x40800000 | len=0x0049684a | crc=0xc4f78213 | flg=0x00000000 <----- loads initramfs into DDR memory (~4.7MB)

  LOAD | adr=0x00008000 | len=0x00000020 | crc=0x38d66e8d | flg=0x00000000 <----- load vector table

  JUMP | adr=0x00008000 | arg=0x00000000 | flg=0x00000001 <----- jump into just loaded vector table

---------------------------------------------------------------------------------------

Can anyone help me out?

For example with code I can load to test if it is executed correctly from DDR memory? Is the JUMP instruction just wrong? Did I miss any patches?

I've looked into all DDR2 memory initialisation topics from Freescale community already, and filled in the Excel sheet with timing parameters. And because the DDR memory test routines work well, I thing that is not the problem anymore.

If you need more information, please let me know.

Thanks in advance.

Labels (1)
0 Kudos
2 Replies

543 Views
igorpadykov
NXP Employee
NXP Employee

Hi Johan

please check that latest BSP (optimized for operation from VDD5V) and latest

updater pacthes are used:

Board Support Packages (5)

i.MX28 Linux 2.6.35 Source Code Files and documentation (REV L2.6.35_1.1.0)

Updates and Patches (9)

The purpose of this patch release is Fix the updater.sb boot issue

in the i.MX28 Linux BSP L2.6.35_1.1.0 release. (REV L2.6.35_1.1.1)

http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=MCIMX28EVKJ&fpsp=1&tab=Design_Tools_T...

Just for additional test one can try OBDS on the same link

Lab and Test Software (1)

On-Board Diagnostic Suit for the i.MX28

standalone DDR test

https://community.freescale.com/message/375692#375692

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos

543 Views
johandejong
Contributor I

The main problem was that I didn't have enough capacity on the the VDD_4P2 line. Adding a 10uF capacitor stabilized the system (maybe lower values will work too, but first I used a 10uF SMD capacitor which seems to do the job). I already applied all patches as proposed by Freescale and/or Igor. Next to that, I tried several DDR register settings and now it is working stable.

At a later time I will try to increase the EMI clock, but for now I leave it at 100MHz.

I hope I can help others by posting the settings for our memory chip (Alliance Memory AS4C32M16D2-25BCN, which is 64MBytes)

EMI clock 100MHz (actually 99.3MHz, fractional divider: 29, integer divider: 3)

DRAM_VAL[0] = 0x00000000;

DRAM_VAL[1] = 0x00000000;

DRAM_VAL[2] = 0x00000000;

DRAM_VAL[3] = 0x00000000;

DRAM_VAL[4] = 0x00000000;

DRAM_VAL[5] = 0x00000000;

DRAM_VAL[6] = 0x00000000;

DRAM_VAL[7] = 0x00000000;

DRAM_VAL[8] = 0x00000000;

DRAM_VAL[9] = 0x00000000;

DRAM_VAL[10] = 0x00000000;

DRAM_VAL[11] = 0x00000000;

DRAM_VAL[12] = 0x00000000;

DRAM_VAL[13] = 0x00000000;

DRAM_VAL[14] = 0x00000000;

DRAM_VAL[15] = 0x00000000;

DRAM_VAL[16] = 0x00000000;

DRAM_VAL[17] = 0x00000000;

DRAM_VAL[18] = 0x00000000;

DRAM_VAL[19] = 0x00000000;

DRAM_VAL[20] = 0x00000000;

DRAM_VAL[21] = 0x00000000;

DRAM_VAL[22] = 0x00000000;

DRAM_VAL[23] = 0x00000000;

DRAM_VAL[24] = 0x00000000;

DRAM_VAL[25] = 0x00000000;

DRAM_VAL[26] = 0x00010101;

DRAM_VAL[27] = 0x01010101;

DRAM_VAL[28] = 0x000f0f01;

DRAM_VAL[29] = 0x0102020A;

DRAM_VAL[30] = 0x00000000;

DRAM_VAL[31] = 0x00000001;

DRAM_VAL[32] = 0x00000100;

DRAM_VAL[33] = 0x00000100;

DRAM_VAL[34] = 0x00000000;

DRAM_VAL[35] = 0x00000000;

DRAM_VAL[36] = 0x01010000;

DRAM_VAL[37] = 0x08080404;

DRAM_VAL[38] = 0x03002803;

DRAM_VAL[39] = 0x050000C8;

DRAM_VAL[40] = 0x02004D5A;

DRAM_VAL[41] = 0x00020206;

DRAM_VAL[42] = 0x001B1305;

DRAM_VAL[43] = 0x020B02FF;

DRAM_VAL[44] = 0x02020201;

DRAM_VAL[45] = 0x00C8000C;

DRAM_VAL[46] = 0x00000000;

DRAM_VAL[47] = 0x00000000;

DRAM_VAL[48] = 0x00011900;

DRAM_VAL[49] = 0xffff0303;

DRAM_VAL[50] = 0x00012100;

DRAM_VAL[51] = 0xffff0303;

DRAM_VAL[52] = 0x00012100;

DRAM_VAL[53] = 0xffff0303;

DRAM_VAL[54] = 0x00012100;

DRAM_VAL[55] = 0xffff0303;

DRAM_VAL[56] = 0x00000003;

DRAM_VAL[57] = 0x00000000;

DRAM_VAL[58] = 0x00000000;

DRAM_VAL[59] = 0x00000000;

DRAM_VAL[60] = 0x00000000;

DRAM_VAL[61] = 0x00000000;

DRAM_VAL[62] = 0x00000000;

DRAM_VAL[63] = 0x00000000;

DRAM_VAL[64] = 0x00000000;

DRAM_VAL[65] = 0x00000000;

DRAM_VAL[66] = 0x00000612;

DRAM_VAL[67] = 0x01000f02;

DRAM_VAL[68] = 0x00000000;

DRAM_VAL[69] = 0x00000200;

DRAM_VAL[70] = 0x00020007;

DRAM_VAL[71] = 0xf4004a27;

DRAM_VAL[72] = 0xf4004a27;

DRAM_VAL[73] = 0x00000000;

DRAM_VAL[74] = 0x00000000;

DRAM_VAL[75] = 0x07400300;

DRAM_VAL[76] = 0x07400300;

DRAM_VAL[77] = 0x00000000;

DRAM_VAL[78] = 0x00000000;

DRAM_VAL[79] = 0x00000005;

DRAM_VAL[80] = 0x00000000;

DRAM_VAL[81] = 0x00000000;

DRAM_VAL[82] = 0x01000000;

DRAM_VAL[83] = 0x01020408;

DRAM_VAL[84] = 0x08040201;

DRAM_VAL[85] = 0x000f1133;

DRAM_VAL[86] = 0x00000000;

DRAM_VAL[87] = 0x00001f04;

DRAM_VAL[88] = 0x00001f04;

DRAM_VAL[89] = 0x00000000;

DRAM_VAL[90] = 0x00000000;

DRAM_VAL[91] = 0x00001f04;

DRAM_VAL[92] = 0x00001f04;

DRAM_VAL[93] = 0x00000000;

DRAM_VAL[94] = 0x00000000;

DRAM_VAL[95] = 0x00000000;

DRAM_VAL[96] = 0x00000000;

DRAM_VAL[97] = 0x00000000;

DRAM_VAL[98] = 0x00000000;

DRAM_VAL[99] = 0x00000000;

DRAM_VAL[100] = 0x00000000;

DRAM_VAL[101] = 0x00000000;

DRAM_VAL[102] = 0x00000000;

DRAM_VAL[103] = 0x00000000;

DRAM_VAL[104] = 0x00000000;

DRAM_VAL[105] = 0x00000000;

DRAM_VAL[106] = 0x00000000;

DRAM_VAL[107] = 0x00000000;

DRAM_VAL[108] = 0x00000000;

DRAM_VAL[109] = 0x00000000;

DRAM_VAL[110] = 0x00000000;

DRAM_VAL[111] = 0x00000000;

DRAM_VAL[112] = 0x00000000;

DRAM_VAL[113] = 0x00000000;

DRAM_VAL[114] = 0x00000000;

DRAM_VAL[115] = 0x00000000;

DRAM_VAL[116] = 0x00000000;

DRAM_VAL[117] = 0x00000000;

DRAM_VAL[118] = 0x00000000;

DRAM_VAL[119] = 0x00000000;

DRAM_VAL[120] = 0x00000000;

DRAM_VAL[121] = 0x00000000;

DRAM_VAL[122] = 0x00000000;

DRAM_VAL[123] = 0x00000000;

DRAM_VAL[124] = 0x00000000;

DRAM_VAL[125] = 0x00000000;

DRAM_VAL[126] = 0x00000000;

DRAM_VAL[127] = 0x00000000;

DRAM_VAL[128] = 0x00000000;

DRAM_VAL[129] = 0x00000000;

DRAM_VAL[130] = 0x00000000;

DRAM_VAL[131] = 0x00000000;

DRAM_VAL[132] = 0x00000000;

DRAM_VAL[133] = 0x00000000;

DRAM_VAL[134] = 0x00000000;

DRAM_VAL[135] = 0x00000000;

DRAM_VAL[136] = 0x00000000;

DRAM_VAL[137] = 0x00000000;

DRAM_VAL[138] = 0x00000000;

DRAM_VAL[139] = 0x00000000;

DRAM_VAL[140] = 0x00000000;

DRAM_VAL[141] = 0x00000000;

DRAM_VAL[142] = 0x00000000;

DRAM_VAL[143] = 0x00000000;

DRAM_VAL[144] = 0x00000000;

DRAM_VAL[145] = 0x00000000;

DRAM_VAL[146] = 0x00000000;

DRAM_VAL[147] = 0x00000000;

DRAM_VAL[148] = 0x00000000;

DRAM_VAL[149] = 0x00000000;

DRAM_VAL[150] = 0x00000000;

DRAM_VAL[151] = 0x00000000;

DRAM_VAL[152] = 0x00000000;

DRAM_VAL[153] = 0x00000000;

DRAM_VAL[154] = 0x00000000;

DRAM_VAL[155] = 0x00000000;

DRAM_VAL[156] = 0x00000000;

DRAM_VAL[157] = 0x00000000;

DRAM_VAL[158] = 0x00000000;

DRAM_VAL[159] = 0x00000000;

DRAM_VAL[160] = 0x00000000;

DRAM_VAL[161] = 0x00000000;

DRAM_VAL[162] = 0x00010000;

DRAM_VAL[163] = 0x00030404;

DRAM_VAL[164] = 0x00000002;

DRAM_VAL[165] = 0x00000000;

DRAM_VAL[166] = 0x00000000;

DRAM_VAL[167] = 0x00000000;

DRAM_VAL[168] = 0x00000000;

DRAM_VAL[169] = 0x00000000;

DRAM_VAL[170] = 0x00000000;

DRAM_VAL[171] = 0x01010000;

DRAM_VAL[172] = 0x01000000;

DRAM_VAL[173] = 0x03030000;

DRAM_VAL[174] = 0x00010303;

DRAM_VAL[175] = 0x01020202;

DRAM_VAL[176] = 0x00000000;

DRAM_VAL[177] = 0x02020303;

DRAM_VAL[178] = 0x21002103;

DRAM_VAL[179] = 0x00061200;

DRAM_VAL[180] = 0x06120612;

DRAM_VAL[181] = 0x04420442;

DRAM_VAL[182] = 0x00000000;

DRAM_VAL[183] = 0x00440044;

DRAM_VAL[184] = 0x00000000;

DRAM_VAL[185] = 0x00000000;

DRAM_VAL[186] = 0x00000000;

DRAM_VAL[187] = 0x00000000;

DRAM_VAL[188] = 0x00000000;

DRAM_VAL[189] = 0xffffffff;

0 Kudos