I am interested in the external flash on MCXN947. I read this guide https://community.nxp.com/t5/MCX-Microcontrollers-Knowledge/Running-code-from-external-memory-with-M... and I have some questions:
1. Is the guide in the above link is valid at current time? I ask this question because:
- I see that in the cmpa_template.yaml there are not DEFAULT_BOOT_SOURCE and FLEXSPI_AUTO_PROBE as NXP mentioned
- I saw you attached video and it is not same as the guide. The guide said that we need to created QSPI_FLASH and QSPI_FCB, but in your video I did not see this steps.
- At the step Write image and PFR and run demo, if I want to get output from board, what do I need to do. Assume that I have project tflm_cifar10. It need this feature because I want to know predictions of model. In the past, I used MIMXRTxxxx board and I could run with debug mode and got output via COM port by using picocom or Teraterm
- At the step Double-check execution from external flash. Maybe it is related to my above question.
- The guide said that If you want to return the device to run from internal memory, then you need to go back to default values. If there are no modifications, to the ones shown in this document, to the CMPA and CMPA areas, the nxpdebugmbox command can be executed. I am not clear about this point. Sorry, I am a newbie with board. As my understanding, NXP was saying about back to internal boot by using SPDSK. Whether I can back to internal flash by creating NEW PROJECT from SDK in MCUXpresso IDE (without any MCU settings) and run debug as usual?
Sorry, currently I don't have the board in hand, but it is some doubts about external flash. Thank you.
Thank you for detailed response.
1. Is the guide in the above link is valid at current time? I need to maintain this article and update it to current time. The SPSDK version used, is not the latest anymore. This should explain why you see differences in the YAML. Btw, Do you have the link of the video? I want to take a look at it.
This is a link https://community.nxp.com/t5/MCX-Microcontrollers/FRDM-MCXN947/m-p/1917889/highlight/true#M1367 . Sorry, I commented in that post. By the way, maybe it is video for older version.
At the step Write image and PFR and run demo, if I want to get output from board, what do I need to do. A reset should be enough to get your image running from the external flash.
Sorry for lack of information. I means that, whether I can get output from the board, for example prediction results (by using PRINTF as in the SDK exmaple) via PC terminal or teraterm. I need to get prediction results to evaluate performance of model. Because in the past, I used to use DEBUG mode to get results (I have never used reset mode in the past)
I have another comment, this article is very low level, as we install the SPSDK manually and we also edit the YML and call the the SPSDK tools from the terminal. I have not done this already, but we can use the MCUXpresso Secure Provisioning tool for this purpose, I can work on this to simplify the setup. Does this work for you?
Yes. I am very appriciated about this. Please make short video on how to config to run with external flash and how to revert to internal flash by using MCUXpresso Secure Provisioning tool. Because I don't have more exprience with hardware, I am afraid of I can not switch to the internal flash.
What do you want to achieve? Run your tflm_cifar10project from external memory, as it is big enough for the internal flash, correct?
That is almost correct. My ML model is NPU classification model (same as tflm_cifar10 NPU example) and its size is large, it can not fit with internal flash. This is why I want to run with external flash.
Hi @nnxxpp
Thank you for your response!
I won't be able to do a short video ( For me it is simpler to do a text document) on how to config to run with external flash and how to revert to internal flash by using MCUXpresso Secure Provisioning tool by the end of this year, but I am planning to do this soon at the beginning of Q1, by making an update or a new version of the document, I do appreciate your interest.
Diego
Thank you. Please update text documents on how to config to run with external flash and how to revert to internal flash by using MCUXpresso Secure Provisioning tool for MCXN947 (tflm_cifar10 as example + MCUXpress IDE). I really need it for my project.
Without it, I can not run my model with external flash. It is urgent with me.
Thank you so much again.
Hi @nnxxpp
Thank you for your reply, I will try to revert soon to you, I presume after this holiday season.
Diego
Happy new year. I am waiting updates from you.
I checked the flow to run external flash on MCXN947 (tflm_cifar10).
Build app image in MCUXpresso IDE => Build bootable image in SEC => Write image to board => Reset.
There are something not clear about how to set up address in MCUXpresso IDE, SEC, how to set mode when writing image. I am really looking forward to see your guide.
Thank you.
Hi @nnxxpp
Happy new year too!
I undertand that you began testing on your side. I still haven't chance on my side, I do appreciate your interest. I understand that your target application is the tflm_cifar10, but did you had problems with simpler applications like hello word or led blinky ?
Diego
Acutally, we have some problem with delivery, so in the beginning of the next week I will receive MCXN947, but I need to prepare prior for all experiments to save effort.
As I mentioned something that I confused is about "There are something not clear about how to set up address in MCUXpresso IDE, SEC, how to set mode when writing image. I am really looking forward to see your guide."
Please arrange your time, I expect that I can see your guideline in the beginning of the next week. Thank you so much for supporting me.
@Hi @diego_charles
Thank you so much for supporting me. I will wait for update from you.
Thank you. Please update it as soon as possible. I need it for my project. Thank you so much.
Hi @nnxxpp
We apreciate your interest in the MCX series and the article.
1. Is the guide in the above link is valid at current time? I need to maintain this article and update it to current time. The SPSDK version used, is not the latest anymore. This should explain why you see differences in the YAML. Btw, Do you have the link of the video? I want to take a look at it.
At the step Write image and PFR and run demo, if I want to get output from board, what do I need to do. A reset should be enough to get your image running from the external flash.
- The guide said that If you want to return the device to run from internal memory, then you need to go back to default values. If there are no modifications, to the ones shown in this document, to the CMPA and CMPA areas, the nxpdebugmbox command can be executed. I am not clear about this point. Sorry, I am a newbie with board. As my understanding, NXP was saying about back to internal boot by using SPDSK. Whether I can back to internal flash by creating NEW PROJECT from SDK in MCUXpresso IDE (without any MCU settings) and run debug as usual?
I think that this sentence is not clear enougth, and I appreciate your feedback. Basically, what we did in the article was: write some bits into the PFR section ( specifically CMPA and CFPA areas of the PFR ) to tell the bootROM to read flash settings and setup XIP from the external flash. To revert this, we need to clear the bits we just wrote.
I have another comment, this article is very low level, as we install the SPSDK manually and we also edit the YML and call the the SPSDK tools from the terminal. I have not done this already, but we can use the MCUXpresso Secure Provisioning tool for this purpose, I can work on this to simplify the setup. Does this work for you?
What do you want to achieve? Run your tflm_cifar10 project from external memory, as it is big enough for the internal flash, correct?
Thank you again!
Diego