I've a iMXRT1050-EVK (not B) and the SDK_2.6.1_MIMXRT1052xxxB.
What I'm trying to figure out is the handle of the BOARD_SDRAM that I'd want to use in a personal application. As a first trial I modified the example application gpio_led_output by placing the following code line:
__DATA(BOARD_SDRAM) int vect1[500] = {5};
in order to place some global data in the BOARD_SDRAM. In the first statement of the main function I inserted the following write operation:
vect1[0] = 120;
I paid attention to:
The application does actually work, i.e. the PRINTF are printed in the stdout and the led blinks. However as I debug the application and I try to watch the vect1 variable after some steps through the code, the IDE pops up the message reported in SDRAM_read_error.png. I mean that I can watch the variable at the beginning but it gets inaccessible after moving through the code just one/two steps.
A probably related behaviour occurs when I use the BOARD_SDRAM, I run the application and I try to flash the application again. The message that appears is showed in the terminate_build_debug.png.
It seems that the DAP or the CPU becomes unreachable. The unique way to unblock the CPU is to unplug the DAPLink cable, connect to the CPU thorugh the J-Link commander (SWO) and erase the Flash. It is very annoying.
Is there anyone who can help me?
I also attach the MCU Settings and the Managed Linker Configuration
Hi jeremyzhou,
I even tried to define SKIP_SYSCLK_INIT and I can now read any time I want the SDRAM without having troubles.
What does the above symbol act on?
Thanks,
Massimiliano
Thanks for your reply.
1) What does the above symbol act on?
-- XIP_BOOT_HEADER_DCD_ENABLE=1 makes the IVT contains the DCD, and with this macro SKIP_SYSCLK_INIT, system pll (selected to be SEMC source clock in SDK projects) will be left unchanged.
Have a great day,
TIC
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
Before answering your reply, I was wondering if you can introduce what the modifications you had done about the gpio_led_output demo, it can help me to figure the issue out.
Have a great day,
TIC
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Hi jeremyzhou,
Thank you for your fast reply and your support. I attached to this post the source of the modified gpio_led_output example. I hope it may help you.
Thanks for your reply.
After checking, the igpio_led_output demo's IVT doesn't contain the DCD which is configuration information contained in the program image (external to the ROM) that the ROM interprets to configure various peripherals on the chip, likes the SDRAM, in another word, the SDRAM is not initialized, so it will be unavailable.
So you should add macro
XIP_BOOT_HEADER_DCD_ENABLE =1 in the Defined symbol (Fig 1) to enable the SDRAM.
Fig 1
Have a great day,
TIC
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Hi jeremyzhou,
I forgot to tell you that I've already defined such symbol in the preprocessor tab, thus my SDRAM is initialized. At the beginning I didn't set it, but after some search on the web, I realized the necessity of such symbol.
Thus, my SDRAM is initialized correctly and I manage to read it, indeed. The problem is that the debug session gets blocked if I try to read it again after many step. Did you manage to read from SDRAM without issues?
Another change to the example's source is located at the following line
#if (defined(FSL_FEATURE_IGPIO_HAS_DR_TOGGLE) && (FSL_FEATURE_IGPIO_HAS_DR_TOGGLE == 1)) && 0
because the led did not blink whether I used the toggle function.
Thanks,
Massimiliano
Thanks for your reply.
It seems a bit weird, as I don't encounter a similar error you mentioned above when I did the testing on my site (Fig 1), I just added the below two macros in the Defined symbols window of the demo.
XIP_BOOT_HEADER_DCD_ENABLE=1
SKIP_SYSCLK_INIT
Fig 1
Have a great day,
TIC
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------