Device Configuration Data (DCD.c/h) for MIMXRT1064CVJ5A, without ext RAM, without ext Flash

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Device Configuration Data (DCD.c/h) for MIMXRT1064CVJ5A, without ext RAM, without ext Flash

跳至解决方案
2,437 次查看
fdm_85
Contributor II

I try to create a Hello World project on our custom board.
It is mostly derived from the EvaKit.
No external RAM, No external Flash.

Regarding this AN:
https://www.nxp.com/docs/en/application-note/AN12290.pdf

The example projects from the EvaKit come with prefilled Device Configuration Data.

I have a hard time creating a DCD for our custom board, that does not configures the SEMC or other related ext RAM lots.
I can only find prefilled dcd.c and dcd.h from the SDK.

Is there a minimal example that configures the FlexSPI2 so the internal 4MB flash is ready to use when entering the application main?

Also the tool generated clock_config.c comes with lines like the following:

    /* In SDK projects, SDRAM (configured by SEMC) will be initialized in either debug script or dcd.
     * With this macro SKIP_SYSCLK_INIT, system pll (selected to be SEMC source clock in SDK projects) will be left unchanged.
     * Note: If another clock source is selected for SEMC, user may want to avoid changing that clock as well.*/
#ifndef SKIP_SYSCLK_INIT
    /* Disable Semc clock gate. */
    CLOCK_DisableClock(kCLOCK_Semc);
    /* Set SEMC_PODF. */
    CLOCK_SetDiv(kCLOCK_SemcDiv, 2);
    /* Set Semc alt clock source. */
    CLOCK_SetMux(kCLOCK_SemcAltMux, 0);
    /* Set Semc clock source. */
    CLOCK_SetMux(kCLOCK_SemcMux, 0);
#endif
    /* Disable Flexspi clock gate. */
    CLOCK_DisableClock(kCLOCK_FlexSpi);
    /* Set FLEXSPI_PODF. */
    CLOCK_SetDiv(kCLOCK_FlexspiDiv, 1);
    /* Set Flexspi clock source. */
    CLOCK_SetMux(kCLOCK_FlexspiMux, 0);
    /* In SDK projects, external flash (configured by FLEXSPI2) will be initialized by dcd.
     * With this macro XIP_EXTERNAL_FLASH, usb1 pll (selected to be FLEXSPI2 clock source in SDK projects) will be left unchanged.
     * Note: If another clock source is selected for FLEXSPI2, user may want to avoid changing that clock as well.*/
#if !(defined(XIP_EXTERNAL_FLASH) && (XIP_EXTERNAL_FLASH == 1))
    /* Disable Flexspi2 clock gate. */
    CLOCK_DisableClock(kCLOCK_FlexSpi2);
    /* Set FLEXSPI2_PODF. */
    CLOCK_SetDiv(kCLOCK_Flexspi2Div, 1);
    /* Set Flexspi2 clock source. */
    CLOCK_SetMux(kCLOCK_Flexspi2Mux, 3);
#endif

 

Is there some documentation or an AN about what needs to be configured to use the internal 4MB flash? 
Cant be that I have to reverse engineer all that stuff?

Currently my dcd.c is empty, and my hello world stucks at:

BOARD_BootClockRUN ()
{
... 
...

    /* Set CSI_PODF. */
    CLOCK_SetDiv(kCLOCK_CsiDiv, 1);
...
...
}

 

Also my J-Link Debugger can not disasemble the flash content... 
Failed to execute MI command:
-data-disassemble -s 1879066528 -e 1879066624 -- 3
Error message from debugger back end:
Cannot access memory at address 0x700047a0
This does not surprise me, as the flash is not configured yet...

So is there some Information about How To configure/create a dedicated dcd.c/h ???
Something other than what pins are mapped...

Kind regards 
Clemens

标签 (1)
标记 (1)
0 项奖励
回复
1 解答
2,407 次查看
mjbcswitzerland
Specialist V

Hi Clemens

The FlexSPI2 configuration is defined in the boot configuration (which is a table supplied by the files that you referenced as being needed).

Nothing else is required for code in the QSPI flash (at the correct location) to then operate.

What is not clear from your case is whether there is a difference in behavior between code running on the EVK and on your custom board?

If your custom HW has the same TFT/touch connections as the EVB I can give you a reference that works in OCR2 (without external memory) as shown here so you can check that the HW is really OK: https://youtu.be/83-Sc4TqpSc

Regards

Mark

 

在原帖中查看解决方案

4 回复数
2,412 次查看
fdm_85
Contributor II

Hi Mark,

thanks for your fast reply.
Our custom Hardware is working. We ported an application from the EvaKit to it.
But as the application has some major issues, i wanted to start a fresh minimal project without any "baggage" from the EvaKit.
(https://community.nxp.com/t5/i-MX-RT/MIMXRT1064CVJ5A-DTCM-ITCM-access-error-happens-Application/td-p...)

So far i learned:

that it is mandatory to include fsl_flexspi_nor_boot.h/c and evkmimxrt1064_flexspi_nor_config.h/c and declare some needed defines. Otherwise the Rom Bootloader can not activate the application. 

But it is all more a trial and error approach. I could not find a dedicated AN "how to start your project" when not working with the EvaKit.

The uTasker project looks promising, but does not seem to me that it is the solution to my issues at hand. And our custom board does not feature USB. 

So If i understand you correctly, i do not need to configure anything about the FlexSPI2. It works out of the box?
Kind regards
Clemens

0 项奖励
回复
2,408 次查看
mjbcswitzerland
Specialist V

Hi Clemens

The FlexSPI2 configuration is defined in the boot configuration (which is a table supplied by the files that you referenced as being needed).

Nothing else is required for code in the QSPI flash (at the correct location) to then operate.

What is not clear from your case is whether there is a difference in behavior between code running on the EVK and on your custom board?

If your custom HW has the same TFT/touch connections as the EVB I can give you a reference that works in OCR2 (without external memory) as shown here so you can check that the HW is really OK: https://youtu.be/83-Sc4TqpSc

Regards

Mark

 

2,404 次查看
fdm_85
Contributor II

Hi Mark,

We use a complete different display with 800*480 in Index8 Mode.
Porting our application back to the EVK board to crosscheck if our problems are hardware related is on my todo list.

But I really would like to evaluate the OCR2 variant.

Thank you very much.
Kind regards

Clemens

 

0 项奖励
回复
2,434 次查看
mjbcswitzerland
Specialist V

Hi Clemens

A DCD is not needed if you don't need external memory to operate out of boot. Its entry can be left at 0.

The problem that you have is probably related to something else.

Try loading a binary from https://www.utasker.com/iMX/RT1064.html to see whether it runs on your HW - it doesn't use a DCD entry and will give you a serial loader on the first HS USB.

Regards

Mark
[uTasker project developer for Kinetis and i.MX RT]
Contact me by personal message or on the uTasker web site to discuss professional training, solutions to problems or rapid product development requirements

For professionals searching for faster, problem-free Kinetis and i.MX RT 10xx developments the uTasker project holds the key: https://www.utasker.com/iMX/RT1064.html