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?
已解决! 转到解答。
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!
let's start from the beginning:
Here's a screenshot from SDK user manual:
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
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
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!