S32K146 Csec sdk examples

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

S32K146 Csec sdk examples

Jump to solution
3,946 Views
Kris_chao
Contributor III

请教一下,在Csec模块给的Example4_secure_boot_add_BOOT_MAC_manual_SDK3_0_0例程里。main.c的第133行,Res = CSEC_DRV_BootDefine(BOOTSIZE_BYTE*8, CSEC_BOOT_SERIAL);

就是这个函数第一个参数bootsize的单位是啥?看上去好像是bit,但说明里写的是-1. parameter: Number of blocks of 128-bit data to check on boot. Maximum size is 512kBytes.  看上去单位又是word。

另外在该例程main.c的第143行:uint32_t BootSizeBit=BOOTSIZE_BYTE*8; 

这里的BootSizeBit赋的值和上面CSEC_DRV_BootDefine里的第一个参数是一致的,所以说上面CSEC_DRV_BootDefine第一个参数bootsize的单位也是bit?但跟说明就冲突了,望解答一下。

 

0 Kudos
Reply
1 Solution
3,931 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@Kris_chao

是的,这个地方SDK的描述确实是错误的,这个单位确实是bit。

View solution in original post

0 Kudos
Reply
3 Replies
3,932 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@Kris_chao

是的,这个地方SDK的描述确实是错误的,这个单位确实是bit。

0 Kudos
Reply
3,694 Views
Ryan5
Contributor I

1.Example1_Configure_part_and_Load_keys_SDK3_0_0  2.Example2_Update_user_keys_sdk_SDK3_0_0 3. Example3_Basic_operations_SDK3_0_0 4. Example4_secure_boot_add_BOOT_MAC_manual_SDK3_0_0 5. Example5_Resetting_flash_to_the_factory_state_SDK3_0_0
在哪里可以找到这些示例代码?

0 Kudos
Reply
2,355 Views
Jason88619
Contributor II

请问你找到这些示例代码了吗?能否分享给我?

Did you find these sample codes? Could you please share them with me?

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-1693733%22%20slang%3D%22zh-CN%22%20mode%3D%22CREATE%22%3ES32K146%20Csec%20sdk%20examples%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1693733%22%20slang%3D%22zh-CN%22%20mode%3D%22CREATE%22%3E%3CP%3EPlease%20tell%20me%2C%20in%20the%20Example4_secure_boot_add_BOOT_MAC_manual_SDK3_0_0%20routine%20given%20by%20the%20Csec%20module.%20line%20133%20of%20main.c%2C%20Res%20%3D%20CSEC_DRV_BootDefine(BOOTSIZE_BYTE*8%2C%20CSEC_BOOT_%20SERIAL)%3B%3C%2FP%3E%3CP%3EWhat%20is%20the%20unit%20of%20the%20first%20parameter%20of%20this%20function%2C%20bootsize%3F%20It%20looks%20like%20bits%2C%20but%20the%20description%20says%20-1.%20parameter%3A%20Number%20of%20blocks%20of%20128-bit%20data%20to%20check%20on%20boot.%20Maximum%20size%20is%20512kBytes.%20%20Looks%20like%20the%20unit%20is%20word%20again.%3C%2FP%3E%3CP%3EAlso%20in%20the%20routine%20main.c%20line%20143%3Auint32_t%20BootSizeBit%3DBOOTSIZE_BYTE*8%3B%20%3C%2FP%3E%3CP%3EThe%20value%20assigned%20to%20BootSizeBit%20here%20is%20the%20same%20as%20the%20first%20parameter%20in%20CSEC_DRV_BootDefine%20above%2C%20so%20the%20unit%20of%20bootsize%20of%20the%20first%20parameter%20of%20CSEC_DRV_BootDefine%20above%20is%20also%20bit%2C%20but%20it%20conflicts%20with%20the%20description%2C%20so%20I%20hope%20to%20answer%20the%20question.%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2136160%22%20slang%3D%22zh-CN%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K146%20Csec%20sdk%20examples%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2136160%22%20slang%3D%22zh-CN%22%20mode%3D%22CREATE%22%3E%3CP%3EMay%20I%20ask%20if%20you%20found%20these%20sample%20codes%3F%20Can%20you%20share%20it%20with%20me%3F%3C%2FP%3E%3CP%3E%3CSPAN%3EDid%20you%20find%20these%20sample%20codes%3F%20Could%20you%20please%20share%20them%20with%20me%3F%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1800732%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K146%20Csec%20sdk%20examples%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1800732%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E1.Example1_Configure_part_and_Load_keys_SDK3_0_0%26nbsp%3B%202.Example2_Update_user_keys_sdk_SDK3_0_0%203.%20Example3_Basic_operations_SDK3_0_0%204.%20Example4_secure_boot_add_BOOT_MAC_manual_SDK3_0_0%205.%20Example5_Resetting_flash_to_the_factory_state_SDK3_0_0%3CBR%20%2F%3E%E5%9C%A8%E5%93%AA%E9%87%8C%E5%8F%AF%E4%BB%A5%E6%89%BE%E5%88%B0%E8%BF%99%E4%BA%9B%E7%A4%BA%E4%BE%8B%E4%BB%A3%E7%A0%81%EF%BC%9F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1693847%22%20slang%3D%22zh-CN%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K146%20Csec%20sdk%20examples%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1693847%22%20slang%3D%22zh-CN%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CA%20href%3D%22mailto%3AHi%40Kris_chao%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3EHi%40Kris_chao%3C%2FA%3E%3C%2FP%3E%0A%3CP%3EYes%2C%20the%20SDK%20description%20of%20this%20place%20is%20indeed%20wrong%2C%20the%20unit%20is%20indeed%20bit.%3C%2FP%3E%3C%2FLINGO-BODY%3E