ISP MODE NOT WORKING BY DEFAULT WITH FRDM-MCXC444 PROJECTS

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ISP MODE NOT WORKING BY DEFAULT WITH FRDM-MCXC444 PROJECTS

Jump to solution
2,010 Views
gvellet
Contributor II

Hi,

With SDK example projects or new projects created from scratch, the ISP mode is not working when a valid application is in Flash.

I have traced the problem to the file startup/startup_mcxc444.c. At line 53, the struct  "Flash_config[3]" is set to value 0xFFFF3FFE. The byte value 0x3F correspond to the FOPT (Flash option register) where bit 1 (BOOTPIN_OPT) = 1. This setting disable the ISP_MODE pin 26. 

I have changed the byte value to 0x3D. Now when I press Reset and ISP_MODE together, the MCXC444 enters ISP mode every time.

My question is about MCUXpresso. I don't think it is a good practice to manually edit "startup_mcxc444.c", is there a project settings to customize the Flash_config value in "startup_mcxc444.c"?

Thanks

 

 

Labels (1)
0 Kudos
Reply
1 Solution
1,988 Views
diego_charles
NXP TechSupport
NXP TechSupport

Hi @gvellet 

Thank you for your interest and for sharing the solution to the problem you encountered. 

I confirm that there  are no project options, to avoid manually customizing the Flash_config structure, available in MCUXpresso IDE.  

Diego

View solution in original post

0 Kudos
Reply
4 Replies
1,845 Views
diego_charles
NXP TechSupport
NXP TechSupport

Hi @gvellet 

I just want to follow up our thread with the below information!

We just released MCUXpresso Secure Provisioning Tool v25. I believe the tool provides security settings for the MCX C that you could find really useful. Below an ilustrative image, where I changed the MCU Life cycle from Unsecure to Flash secure. 

diego_charles_0-1744219929454.png

As you can see in the BCA/FCF settings,  the FSEC setting  enabled according to Flash secured life cycle. 

The SPT, for short. creates bootable and secure images, you can provide a sample image for the MCX C or your custom image. The tool requires connection to the MCU over USB/UART.

For more details about the SPT use, please refer to sections:

6.10 MCX C041/C242/C444 device workflow

6.10.3.3 Life cycle for MCX C041/C242/C444 devices

of the MCUXSPTUG , you can get it easily by doing this: 

diego_charles_1-1744221155917.png

 

We can conclude that you can manually edit flash security settings for the MCU using the MCUXpresso IDE, however, we leveraged this to the MCUXpresso Secure Provisioining Tool

hope this helps you, 

Diego

0 Kudos
Reply
1,838 Views
gvellet
Contributor II
Hi Diego,

Thank you for the information and remembering my question. I will try this new software asap!
1,835 Views
diego_charles
NXP TechSupport
NXP TechSupport

Hi @gvellet 

My pleasure, we just release it yersterday,  please give it a try! Feel free to create another post, if you get any questions or feedback regarding the SPT. The MCX C support was just introduced. 

All the best, 

Diego

0 Kudos
Reply
1,989 Views
diego_charles
NXP TechSupport
NXP TechSupport

Hi @gvellet 

Thank you for your interest and for sharing the solution to the problem you encountered. 

I confirm that there  are no project options, to avoid manually customizing the Flash_config structure, available in MCUXpresso IDE.  

Diego

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2068905%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EISP%20MODE%20NOT%20WORKING%20BY%20DEFAULT%20WITH%20FRDM-MCXC444%20PROJECTS%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2068905%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3EWith%20SDK%20example%20projects%20or%20new%20projects%20created%20from%20scratch%2C%20the%20ISP%20mode%20is%20not%20working%20when%20a%20valid%20application%20is%20in%20Flash.%3C%2FP%3E%3CP%3EI%20have%20traced%20the%20problem%20to%20the%20file%20startup%2Fstartup_mcxc444.c.%20At%20line%2053%2C%20the%20struct%26nbsp%3B%20%22Flash_config%5B3%5D%22%20is%20set%20to%20value%200xFFFF3FFE.%20The%20byte%20value%200x3F%20correspond%20to%20the%20FOPT%20(Flash%20option%20register)%20where%20bit%201%20(BOOTPIN_OPT)%20%3D%201.%20This%20setting%20disable%20the%20ISP_MODE%20pin%2026.%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20changed%20the%20byte%20value%20to%200x3D.%20Now%20when%20I%20press%20Reset%20and%20ISP_MODE%20together%2C%20the%20MCXC444%20enters%20ISP%20mode%20every%20time.%3C%2FP%3E%3CP%3EMy%20question%20is%20about%20MCUXpresso.%20I%20don't%20think%20it%20is%20a%20good%20practice%20to%20manually%20edit%20%22startup_mcxc444.c%22%2C%20is%20there%20a%20project%20settings%20to%20customize%20the%26nbsp%3BFlash_config%20value%20in%20%22startup_mcxc444.c%22%3F%3C%2FP%3E%3CP%3EThanks%3C%2FP%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2068905%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3EMCXC%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2077615%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20ISP%20MODE%20NOT%20WORKING%20BY%20DEFAULT%20WITH%20FRDM-MCXC444%20PROJECTS%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2077615%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F191227%22%20target%3D%22_blank%22%3E%40gvellet%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EMy%20pleasure%2C%20we%20just%20release%20it%20yersterday%2C%26nbsp%3B%20please%20give%20it%20a%20try!%20Feel%20free%20to%20create%20another%20post%2C%20if%20you%20get%20any%20questions%20or%20feedback%20regarding%20the%20SPT.%20The%20MCX%20C%20support%20was%20just%20introduced.%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAll%20the%20best%2C%26nbsp%3B%3C%2FP%3E%0A%3CP%3EDiego%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2077563%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20ISP%20MODE%20NOT%20WORKING%20BY%20DEFAULT%20WITH%20FRDM-MCXC444%20PROJECTS%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2077563%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EHi%20Diego%2C%3CBR%20%2F%3E%3CBR%20%2F%3EThank%20you%20for%20the%20information%20and%20remembering%20my%20question.%20I%20will%20try%20this%20new%20software%20asap!%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2077384%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20ISP%20MODE%20NOT%20WORKING%20BY%20DEFAULT%20WITH%20FRDM-MCXC444%20PROJECTS%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2077384%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F191227%22%20target%3D%22_blank%22%3E%40gvellet%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20just%20want%20to%20follow%20up%20our%20thread%20with%20the%20below%20information!%3C%2FP%3E%0A%3CP%3EWe%20just%20released%20MCUXpresso%20Secure%20Provisioning%20Tool%20v25.%20I%20believe%20the%20tool%20provides%20security%20settings%20for%20the%20MCX%20C%20that%20you%20could%20find%20really%20useful.%20Below%20an%20ilustrative%20image%2C%20where%20I%20changed%20the%20MCU%20Life%20cycle%20from%20Unsecure%20to%20Flash%20secure.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22diego_charles_0-1744219929454.png%22%20style%3D%22width%3A%20726px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22diego_charles_0-1744219929454.png%22%20style%3D%22width%3A%20726px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F332332iAE14CAE24381CEF3%2Fimage-dimensions%2F726x385%3Fv%3Dv2%22%20width%3D%22726%22%20height%3D%22385%22%20role%3D%22button%22%20title%3D%22diego_charles_0-1744219929454.png%22%20alt%3D%22diego_charles_0-1744219929454.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EAs%20you%20can%20see%20in%20the%20BCA%2FFCF%20settings%2C%26nbsp%3B%20the%20FSEC%20setting%26nbsp%3B%20enabled%20according%20to%20Flash%20secured%20life%20cycle.%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20SPT%2C%20for%20short.%20creates%20bootable%20and%20secure%20images%2C%20you%20can%20provide%20a%20sample%20image%20for%20the%20MCX%20C%20or%20your%20custom%20image.%20The%20tool%20requires%20connection%20to%20the%20MCU%20over%20USB%2FUART.%3C%2FP%3E%0A%3CP%3EFor%20more%20details%20about%20the%20SPT%20use%2C%20please%20refer%20to%20sections%3A%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-30px%22%20style%3D%22padding-left%20%3A%2030px%3B%22%20style%3D%22padding-left%20%3A%2030px%3B%22%3E%3CEM%3E6.10%20MCX%20C041%2FC242%2FC444%20device%20workflow%3C%2FEM%3E%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-30px%22%20style%3D%22padding-left%20%3A%2030px%3B%22%20style%3D%22padding-left%20%3A%2030px%3B%22%3E%3CEM%3E6.10.3.3%20Life%20cycle%20for%20MCX%20C041%2FC242%2FC444%20devices%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3Eof%20the%26nbsp%3BMCUXSPTUG%20%2C%20you%20can%20get%20it%20easily%20by%20doing%20this%3A%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22diego_charles_1-1744221155917.png%22%20style%3D%22width%3A%20528px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22diego_charles_1-1744221155917.png%22%20style%3D%22width%3A%20528px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F332334i1AF04CBBB60A98E1%2Fimage-dimensions%2F528x168%3Fv%3Dv2%22%20width%3D%22528%22%20height%3D%22168%22%20role%3D%22button%22%20title%3D%22diego_charles_1-1744221155917.png%22%20alt%3D%22diego_charles_1-1744221155917.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EWe%20can%20conclude%20that%20you%20can%20manually%20edit%20flash%20security%20settings%20for%20the%20MCU%20using%20the%20MCUXpresso%20IDE%2C%20however%2C%20we%20leveraged%20this%20to%20the%20MCUXpresso%20Secure%20Provisioining%20Tool%3C%2FP%3E%0A%3CP%3Ehope%20this%20helps%20you%2C%26nbsp%3B%3C%2FP%3E%0A%3CP%3EDiego%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2069791%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20ISP%20MODE%20NOT%20WORKING%20BY%20DEFAULT%20WITH%20FRDM-MCXC444%20PROJECTS%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2069791%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F191227%22%20target%3D%22_blank%22%3E%40gvellet%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThank%20you%20for%20your%20interest%20and%20for%20sharing%20the%20solution%20to%20the%20problem%20you%20encountered.%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20confirm%20that%20there%26nbsp%3B%20are%20no%20project%20options%2C%20to%20avoid%20manually%26nbsp%3Bcustomizing%20the%26nbsp%3B%3CSPAN%3EFlash_config%26nbsp%3Bstructure%2C%20available%20in%20MCUXpresso%20IDE.%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EDiego%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E