S32K116 STATUS_ERROR on any command

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

S32K116 STATUS_ERROR on any command

Jump to solution
2,586 Views
NathanGalasso
Contributor II

Hello,
I am new to programming MCU's and have been having problems with getting any command to work on the s32k116.  I started with an example project on s32ds being csec_keyconfig_s32k116 and then changed it to suit my needs.  I am using a custom board with the s32k116 and any command I send through WriteCommandHeader are returned with error by csec_readerrorbits() like this as example:  CSEC_WriteCommandHeader(CSEC_CMD_BOOT_OK, CSEC_FUNC_FORMAT_ADDR,CSEC_CALL_SEQ_FIRST, CSEC_SECRET_KEY);
I tried to use CSEC_CMD_INIT_RNG first but also got an error.  Does anyone know why the commands are getting errors?

0 Kudos
Reply
1 Solution
2,473 Views
NathanGalasso
Contributor II

When running csec_flash_part it seems I forgot to power cycle when switching to the other program causing the commands not to work but after power cycling I was able to get the commands to work.  Thank you for your help!

View solution in original post

0 Kudos
Reply
4 Replies
2,556 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi @NathanGalasso 

let's start from the beginning:

Here's a screenshot from SDK user manual:

lukaszadrapa_0-1714122311458.pnglukaszadrapa_0-1714122311458.png

1. Do you have CSEc enabled part?

2. Did you enable the CSEc by mentioned project?

3. Is the original csec_keyconfig_s32k116 (without any changes) working?

Regards,

Lukas

0 Kudos
Reply
2,536 Views
NathanGalasso
Contributor II

As per your questions:

1) The part is CSEc enabled as i can tell by the register SIM_SDID having 11100000
2)I did try to run the mentioned project before the one I am working on to enable CSEc but the project is still not working
3)When I run the base project with nothing changed then I will get DefaultISR 

Thank you for reaching out and if you need anything else please let me know

 

0 Kudos
Reply
2,505 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Did you run the csec_flash_part example from RAM? Was it successful?

When you run the CSEc key configuration example, where does it fail exactly?

0 Kudos
Reply
2,474 Views
NathanGalasso
Contributor II

When running csec_flash_part it seems I forgot to power cycle when switching to the other program causing the commands not to work but after power cycling I was able to get the commands to work.  Thank you for your help!

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-1854908%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ES32K116%20STATUS_ERROR%20on%20any%20command%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1854908%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%3CBR%20%2F%3EI%20am%20new%20to%20programming%20MCU's%20and%20have%20been%20having%20problems%20with%20getting%20any%20command%20to%20work%20on%20the%20s32k116.%26nbsp%3B%20I%20started%20with%20an%20example%20project%20on%20s32ds%20being%20csec_keyconfig_s32k116%20and%20then%20changed%20it%20to%20suit%20my%20needs.%26nbsp%3B%20I%20am%20using%20a%20custom%20board%20with%20the%20s32k116%20and%20any%20command%20I%20send%20through%20WriteCommandHeader%20are%20returned%20with%20error%20by%20csec_readerrorbits()%20like%20this%20as%20example%3A%26nbsp%3B%20CSEC_WriteCommandHeader(CSEC_CMD_BOOT_OK%2C%20CSEC_FUNC_FORMAT_ADDR%2CCSEC_CALL_SEQ_FIRST%2C%20CSEC_SECRET_KEY)%3B%3CBR%20%2F%3EI%20tried%20to%20use%20CSEC_CMD_INIT_RNG%20first%20but%20also%20got%20an%20error.%26nbsp%3B%20Does%20anyone%20know%20why%20the%20commands%20are%20getting%20errors%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1859929%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20S32K116%20STATUS_ERROR%20on%20any%20command%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1859929%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EWhen%20running%20csec_flash_part%20it%20seems%20I%20forgot%20to%20power%20cycle%20when%20switching%20to%20the%20other%20program%20causing%20the%20commands%20not%20to%20work%20but%20after%20power%20cycling%26nbsp%3BI%20was%20able%20to%20get%20the%20commands%20to%20work.%26nbsp%3B%20Thank%20you%20for%20your%20help!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1857392%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20S32K116%20STATUS_ERROR%20on%20any%20command%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1857392%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EDid%20you%20run%20the%20csec_%EF%AC%82ash_part%20example%20from%20RAM%3F%20Was%20it%20successful%3F%3C%2FP%3E%0A%3CP%3EWhen%20you%20run%20the%20CSEc%20key%20con%EF%AC%81guration%20example%2C%20where%20does%20it%20fail%20exactly%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1855934%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20S32K116%20STATUS_ERROR%20on%20any%20command%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1855934%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EAs%20per%20your%20questions%3A%3CBR%20%2F%3E%3CBR%20%2F%3E1)%20The%20part%20is%20CSEc%20enabled%20as%20i%20can%20tell%20by%20the%20register%20SIM_SDID%20having%2011100000%3CBR%20%2F%3E2)I%20did%20try%20to%20run%20the%20mentioned%20project%20before%20the%20one%20I%20am%20working%20on%20to%20enable%20CSEc%20but%20the%20project%20is%20still%20not%20working%3CBR%20%2F%3E3)When%20I%20run%20the%20base%20project%20with%20nothing%20changed%20then%20I%20will%20get%20DefaultISR%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3EThank%20you%20for%20reaching%20out%20and%20if%20you%20need%20anything%20else%20please%20let%20me%20know%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1855512%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20S32K116%20STATUS_ERROR%20on%20any%20command%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1855512%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F232746%22%20target%3D%22_blank%22%3E%40NathanGalasso%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Elet's%20start%20from%20the%20beginning%3A%3C%2FP%3E%0A%3CP%3EHere's%20a%20screenshot%20from%20SDK%20user%20manual%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22lukaszadrapa_0-1714122311458.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22lukaszadrapa_0-1714122311458.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F276087i7739C78A4D7C49D6%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22lukaszadrapa_0-1714122311458.png%22%20alt%3D%22lukaszadrapa_0-1714122311458.png%22%20%2F%3E%3Cspan%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3Elukaszadrapa_0-1714122311458.png%3C%2Fspan%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E1.%20Do%20you%20have%20CSEc%20enabled%20part%3F%3C%2FP%3E%0A%3CP%3E2.%20Did%20you%20enable%20the%20CSEc%20by%20mentioned%20project%3F%3C%2FP%3E%0A%3CP%3E3.%20Is%20the%20original%20csec_keyconfig_s32k116%20(without%20any%20changes)%20working%3F%3C%2FP%3E%0A%3CP%3ERegards%2C%3C%2FP%3E%0A%3CP%3ELukas%3C%2FP%3E%3C%2FLINGO-BODY%3E