Secure Provisioning Tool v7 writing image issues

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

Secure Provisioning Tool v7 writing image issues

6,134 次查看
jamesli
Contributor IV

jamesli_0-1695307351231.png

Fig 1 SEC erase memory fails

jamesli_1-1695307402995.png

Fig 2 GUI flash tool configuration

jamesli_2-1695307423283.png

Fig 3 GUI flash erase memory successfully

Try to write image to RT1064 processor with RT1060 profile so that it writes to QSPI NOR memory, but SEC tool V7 configures or erases the flash memory fails shown in Fig 1. So that I try GUI flash tool of JLink to erase all memories, it works shown in Fig 2 and 3, I think this indicates my memory hardware is fine, problem is SEC v7 software configure or erase memory fails, what can I do to make SEC V7 work?

 Try to test memory configuration as follows, but fails as shown in Fig 4 below,

jamesli_3-1695308233781.png

 I used SEC V3 in RT1052, there is no such issues, but V7 is more complicated, then RT1064 is more complicated as well, any tips are welcome to fix these issues.

Jian Li

 

 

 

 

 

0 项奖励
回复
12 回复数

6,074 次查看
marek-trmac
NXP Employee
NXP Employee

Hi Jian Li,

I have not headered that it would be possible to attach additional FlexSPI NOR to RT1064, but I'm not expert on the memory configuration.

From you log, it seems the memory is not configured properly. I'd recommend using the default FlexSPI NOR Flash for RT1064 and once you have RT1062, use there your custom memory.

This issue is not directly related to security, so you may also try to write your question in another community forum, related to RT10xx processors.

I'm sorry, I cannot help more.

Edit: additional comments:

  • In this moment, SEC tool does not support using additional external memory for RT1064 processor.
  • Do you use EVK or your own custom board?
  • From you log it seems, at the end, the RT1064 flashloader was not started. Can you do a power cycle and start again?
Regards,
Marek


NOTE: If you find the answer useful, kindly click on [ACCEPT AS SOLUTION] button
0 项奖励
回复

6,063 次查看
jamesli
Contributor IV

Hi, Marek,

 Thank you for reply.

  Here is schematic of RT1064 EVK from NXP and clearly there is additional external flash memory. Why is it existed if it is not supported? This is the same IC in my hardware.

jamesli_0-1695375283759.png

  The tests I did are with default profile configurations, I did not change them, and they do not work as expected. If the tool does not work with unsigned file, how can I expect it works with more complicated security features? My post is regarding provisional tool functionality and settings, who else can help me if you cannot help? Are you the only support in this community?

 Jian

 

 

0 项奖励
回复

6,051 次查看
marek-trmac
NXP Employee
NXP Employee

Hi Jian

in reference manual RT1064, 07/2021, in chapter 9.6.1.2 I found that processor boots from serial NOR flash attached to FLEXSPI2_A_SS0_B. I have not found information, that it can boot from FlexSPI1. I suppose this was a reason why we have requirement in MCUXpresso Secure Provisioning tool to support SIP flash only. 

Definitely, MCUXpresso Secure Provisioning tool is not designed to support all uses cases. We suppose most typical use cases only, that make sense for majority of the customers.

Please mind, we generate script for the configuration, so in case, you need to try any unsupported use case, you can modify the generated code manually and customize it.

 

In you log we see, that RT1064 flashloader failed. Can you check this on RT1064 EVK board? We do not see any reason why the flashloader fails.

Regards,
Marek


NOTE: If you find the answer useful, kindly click on [ACCEPT AS SOLUTION] button

6,043 次查看
jamesli
Contributor IV

Hi, Marek,

  Many thanks for your help, I successfully programmed the internal flash using 1064 profile by changing source memory configuration as shown below Fig 1, the starting RAM address is 0x4000 (recommended is 0x3000), then the size is 0x1C000. Compile and build image on axf file, then writing image is success in Fig 2.

jamesli_0-1695384918834.png

Fig 1 memory configuration in source code

jamesli_1-1695385394231.png

Fig 2 Writing image success.

 This is surprised to me, why the RAM configuration affect program writing? it may affect power up booting.

 Power boot run is correct, it talks to Free Master over CAN. At moment I am happy it works with internal flash boot. As you suggested, I will try to boot from QSPI with RT1062 later, I think now external QSPI could be used as data storage. 

 Thank you again for help.

Jian

 

 

 

  

0 项奖励
回复

5,883 次查看
marek-trmac
NXP Employee
NXP Employee

Hi Jian,

we have tried simple application (LED blinky) on RT1064 EVK board and it works even if it is built on address 0x3000. Not sure why your code does not work, this might be application-specific problem.

 

Regards,
Marek


NOTE: If you find the answer useful, kindly click on [ACCEPT AS SOLUTION] button

5,875 次查看
jamesli
Contributor IV

HI, Marek,

Many thanks for your confirmation starting address 0x3000, yes, that works in my RT1052 board. However, it does not work, not only on my RT1064 board, but also on my colleague's RT1064 board. Two boards are different hardware and applications, both applications work when starting address is 0x4000, we do not understand why!?

Regards!

Jian

 

 

0 项奖励
回复

5,867 次查看
marek-trmac
NXP Employee
NXP Employee

Hi Jian,

attached you can find rt1064_ram.zip with workspace for Secure Provisioning tool v7. The workspace contains application blinking LED on RT1064 EVK build to 0x3000. You can test on your board. The blink period is 4 sec, the LED is 2 seconds ON and then 2 seconds OFF.

This was tested on RT1064 EVK with RT1064 processor.

 

 

Regards,
Marek


NOTE: If you find the answer useful, kindly click on [ACCEPT AS SOLUTION] button

5,791 次查看
jamesli
Contributor IV

Hi, Marek,

 Many thanks for your effort. I try to flash your image attached into RT1064EVK, but communication hangs long time and flash fails. It is very strange that I cannot find EVK user guide in NXP site, only hardware guide, I try SEC manual 8.7 to unlink J44, still not work. My PC cannot recognize EVK USB port J9 and J10, USB connection test fails so that I cannot program EVK and verify your claim. However, I trust your image may work fine in your EVK, but starting address 0x3000 does not work in my RT1064 based hardware. The feeling is RT1064 behaviors very different from its non-internal flash RT10xx processor peers. 

0 项奖励
回复

5,784 次查看
liborukropec
NXP Employee
NXP Employee

Hello Jian,

 

it is very strange that the port cannot be recognized.

1. avoid using USB HUBs during the trouble shooting

2. If USB is not recognized, could you (re) install latest MCUXpresso IDE, that should install all necessary drivers?

3. the J44 jumper is only for Mac OS, when the board is reset right after the flashloader is uploaded and the COM port closed by sdphost application. We cannot guarantee that some weird serial driver on Windows might behave like on Mac OS though.

 

Regards,

Libor

0 项奖励
回复

6,126 次查看
marek-trmac
NXP Employee
NXP Employee

Hi Jian Li,

do not use RT1060 if you have RT1064. SEC tool already contains valid configuration of the flex-spi nor flash, which is in the SIP for RT1064. Select RT1064 and it must work.

Regards,
Marek


NOTE: If you find the answer useful, kindly click on [ACCEPT AS SOLUTION] button
0 项奖励
回复

6,086 次查看
jamesli
Contributor IV

HI, Marek-Trmac,

  Many thanks for tip. I attached the log file that I tried RT1060 profile on 2023-09-22 08:12:36 and RT1064 profile on 2023-09-22 08:13:46, both failed but at different error codes.

 I want to write image to the external QSPI IS25LP64A, not the internal flash of RT1064 because my final product is RT1062, RT1064 is used in prototype test due to shortage of RT1062. Chose RT1064 profile will write to internal flash W25Q32JV that is not what I want, however, it still failed. What profile is available for me to choose in my case?  How to configure the external QSPI in RT1064 profile?

 I attached log file for your reference, I may attach twice because it is hard to tell drag and drop works or not.

  Thank you for help!

 Jian

0 项奖励
回复

6,073 次查看
jamesli
Contributor IV

HI, Marek-Trmac,

 Here is my screen shot, I cannot find my log file attachments, so I re-dot it, hopefully, it works.

jamesli_0-1695370222117.png

 

0 项奖励
回复