The program can't run when using one SDRAM W9825G6KH-5I on RT1170

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

The program can't run when using one SDRAM W9825G6KH-5I on RT1170

862 Views
yalin
Contributor II

We have a custom board using RT1170 connected to just one SDRAM W9825G6KH-5I. (On the RT1170 development board, there are two SDRAM W9825G6KH-5I). We can run the SDK example called "evkmimxrt1170_semc_cm7" by modifying the following parameters, and the log shows "SEMC SDRAM 32 bit Data Write and Read Compare Succeed!".

sdramconfig.memsize_kbytes = 32 * 1024; /* The value is 2 * 32 * 1024 with two sdram */

sdramconfig.portSize = kSEMC_PortSize16Bit; /* The value is kSEMC_PortSize32Bit with two sdram */

And then we modified the corresponding two registers in DCD of "evkmimxrt1170_hello_world_demo_cm7" like the following, which uses SDRAM as the default ram, but the program can't jump to main() function after flashing, and then 'Break at address "0xdeadbeee" '.

SEMC_BR0   0x8000001B  /* The value is 0x8000001D with two sdram */

SEMC_SDRAMCR0  0xF31  /* The value is 0xF32 with two sdram */

Is there any other register value needed to be modified or something else leading to the problem?

Thanks.

0 Kudos
5 Replies

787 Views
TM_MI
Contributor III

Hello @yalin @Omar_Anguiano 

 

Were you able to flash using MCUBootutility or a debugger ?

I have the same issue and I was wondering if it worked for you.

 

Thanks

Tarek

0 Kudos

779 Views
yalin
Contributor II

@TM_MI 

I found the problem is because the DCD configuration will work after hardware reset. When you modify the DCD parameters and flash to the board, it just writes the DCD configuration, and when you reset your board, the new configuration will be used and the SDRAM can work.

0 Kudos

771 Views
TM_MI
Contributor III

@yalin 

Thank you for your reply.

Do you mind sharing the steps to obtain the dcd.bin and flash with any of the two tools? I am using mcubootutility here, I added the project file to load .hex or .axf.

I cant seem to find a way to generate the dcd.bin.

TM_MI_0-1680185795663.png

 

0 Kudos

756 Views
yalin
Contributor II

Hi @TM_MI 

I never generate a dcd.bin, I just modify the DCD configuration table in MCUXpresso IDE and update the code, and the modification will be seen in board/dcd.c, then build the project as usually. You can flash the generated .axf file to board by MCUBootUtility directly without configurating the dcd.bin in it.

0 Kudos

828 Views
Omar_Anguiano
NXP TechSupport
NXP TechSupport

Hello
Hope you are well.

Does the example work if you load it through Secure Provisioning Tool or MCUBootUtility? To do this you need to modify the image as:

1. Select Project > Properties - C/C++ Build > Settings > Tool Settings > MCU Linker > Managed Linker Script and check Link application to RAM.
2. Select Project > Properties - C/C++ Build > Settings > Tool Settings > MCU C Compiler > Preprocessor and add defined symbol SKIP_SYSCLK_INIT=1.
3. In Project > Properties > C/C++ Build > MCU settings, delete Flash, and modify BOARD_SDRAM to start at 0x80002000 with size 0x1dfe000. Move BOARD_SDRAM to first position to make it default.

To load the image to the SDRAM it is needed to initialize it through DCD, however, if you are using a debugger you will need a script, please refer to this post if you are using a debugger: Solved: RT1170 debugging when application is built for SDR... - NXP Community

Best regards,
Omar

 

 

0 Kudos