AnsweredAssumed Answered

TWR-K70 using external DDR2 memory with MQX 4

Question asked by Lorenzo Fornari on Apr 5, 2013
Latest reply on Apr 19, 2013 by Lorenzo Fornari

i'm devoloping a simple mqx application on twr-k70, with codewarrior 10.3, and i have to use the external ram module (1 gb ddr2).

So i'm trying to debug with DDRData target configuration (getting started guide explains that this is the way to use external ram instead of the internal one, that is only 128k).

As result mqx doesn't start, locking in a loop trying to initialize a lwsem (light weight semaphore component) in mqx() start function in mqx.c file.

With SRAM debug configuration all works properly (but i haven't enough memory).

I have the same problem with mqx 3.8.1 and 4.0, using provided bsps.

 

It seems that ddr module isn't properly initialized, since the global pointer to kernel data _mqx_kernel_data has some erratic or uninitialized values (0xbabababa), and the application cannot write on it, nor in the other variables.

I found out a bug in ddr2 initialization function: _bsp_ddr2_setup(), in init_hw.c, so i corrected it following the ddr2 init function provided in bare metal sample code, but with the same result.

 

At last i tried one of the bare metal examples (hello world) with EXTERNAL_DDR build and debug configuration (i had some problems with references to the settings file, but i fixed them), and it wont start... locking at first asm instruction...

I know that EXTERNAL_DDR configuration means that the application code is loaded on external ram, while DDRData of mqx project means that che variables are loaded on external ram; but anyway the external ddr module is unusable.

 

Some one has the same issue? Is it a hardware problem?

Outcomes