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