OTFAD with FlexSPI in code

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

OTFAD with FlexSPI in code

ソリューションへジャンプ
1,392件の閲覧回数
AChun
Contributor I

I am using IMXRT1010EVK board with NXP-MCUBootUtility-v3.5.0.

I use the function “ flexspi_nor_flash_init(EXAMPLE_FLEXSPI)”,

and blink the led after the function.

It failed while i choose OTFAD as my secure Type, I follow 

the post “Use FlexSPI while decrypted with OTFAD”, change code to the the following

 {
 //OTFAD->CR &= ~OTFAD_CR_GE_MASK;
  backupendaddr = OTFAD->CTX[0].RGD_W1;
  OTFAD->CTX[0].RGD_W1 = OTFAD->CTX[0].RGD_W0;
  //flexspi_nor_flash_init(EXAMPLE_FLEXSPI);
  OTFAD->CTX[0].RGD_W1 = backupendaddr;
  //OTFAD->CR |= OTFAD_CR_GE(1);
}

The led blink with OTFAD when i commet the  function “flexspi_nor_flash_init(EXAMPLE_FLEXSPI)”.

data.ldt:

        <#if memory.name=="SRAM_ITC">
        *flexspi_nor_flash_ops.o(.text*)
        *fsl_flexspi.o(.text*)
        </#if>

main_text.ldt:

        *(EXCLUDE_FILE(*flexspi_nor_flash_ops.o *fsl_flexspi.o) .text*)

 The program is in XIP mode.

 

0 件の賞賛
1 解決策
1,325件の閲覧回数
jay_heng
NXP Employee
NXP Employee

The issue is caused by FlexSPI reset way, please refer to my blog

https://www.cnblogs.com/henjay724/p/14479276.html

元の投稿で解決策を見る

7 返答(返信)
1,326件の閲覧回数
jay_heng
NXP Employee
NXP Employee

The issue is caused by FlexSPI reset way, please refer to my blog

https://www.cnblogs.com/henjay724/p/14479276.html

1,370件の閲覧回数
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
Actually, I'm not very clear with this question, whether you mean the evkmimxrt1170_flexspi_nor_polling_transfer_cm7 can't work well after enabling encrypted XiP with OTFAD.
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.
-------------------------------------------------------------------------------

0 件の賞賛
1,352件の閲覧回数
AChun
Contributor I

I'm using the flexspi example code for the IMXRT1010EVK board. Add the blinking code after the function "flexspi_nor_flash_init".

    BOARD_ConfigMPU();
    BOARD_InitBootPins();
    BOARD_BootClockRUN();
    BOARD_InitDebugConsole();
    SCB_DisableDCache();

    flexspi_nor_flash_init(EXAMPLE_FLEXSPI);

    PRINTF("\r\nFLEXSPI example started!\r\n");

    /* Set systick reload value to generate 1ms interrupt */
    if (SysTick_Config(SystemCoreClock / 1000U))
    {
    	while (1);
    }
    while (1)
    {
		if(delay_timer==0)
		{
			delay_timer = 500;
			LED_toggle();
		}
    }

 

Following the article , I have change the function "BOARD_BootClockRUN()".

It blinks the led If I commet the function "flexspi_nor_flash_init".

Or I change the secure boot Type to "HAB signed Image Boot".

How can it work on OTFAD Mode with the flexspi_nor_flash_init and blinky in code?

0 件の賞賛
1,347件の閲覧回数
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thanks for your reply.
Firstly, I'd like to know your Advanced Key Settings, next, in the flexspi_nor_polling_transfer demo, the flexspi_nor_flash_init will be relocated to the RAM after booting up, so it shouldn't be affected by the restriction mentioned in the article.

jeremyzhou_0-1656922179485.png

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.
-------------------------------------------------------------------------------

 

0 件の賞賛
1,339件の閲覧回数
AChun
Contributor I

Here is the NXP-MCUBootUtility-v3.5.0. "Advanced Key Settings".

Advanced Key Settings.png

The setting is work (led blinky) when I commet the function "flexspi_nor_flash_init".

Also, I confirm the map,  the function "flexspi_nor_flash_init"  is definitely located in RAM.

flexspiinram.png

0 件の賞賛
1,335件の閲覧回数
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thanks for your reply.
Can you share the read result of eFuse in the NXP-MCUBootUtility-v3.5.0?
@jay_heng  Can you share some insight into the phenomenon?
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.
-------------------------------------------------------------------------------

0 件の賞賛
1,330件の閲覧回数
AChun
Contributor I

The fuse is got here.

fuse_setting.png

0 件の賞賛