T=1 over I2C + APDU commands in SE050

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

T=1 over I2C + APDU commands in SE050

跳至解决方案
5,898 次查看
nidhintomy
Contributor IV

Which api is used for starting the i2c communication in SE050?

status_t I2C_MasterStart(I2C_Type *base, uint8_t address, i2c_direction_t direction); is used for starting i2c in MCU. But which api is used in secure element se050 instead of this api as t=1 over i2c(T1oI2C).

Are we need to set T1oI2C structure or just set apdu structure as it is format specified in SE050 APDU Specification- AN12413.

I tried to learn from K64F SE HostLib GetInfo example. But can't understand what is the flow of code.

Please help me.

Thanks.

标记 (1)
0 项奖励
回复
1 解答
5,853 次查看
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @nidhintomy ,

 

The T1oI2C function is also handled by the MW, and you may find all details in the folder of "simw-top\hostlib\hostLib\libCommon\smCom".

 

Hope that helps,

 

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

在原帖中查看解决方案

7 回复数
5,885 次查看
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @nidhintomy ,

 

Are you referring to the latest MW? Actually for each APDU command, there is a dedicated API for it. For example, Se05x_API_ReadObject(). and if you prefer to do raw APDU transfer, you may refer to smCom_TransceiveRaw(), as invoked in JCOP4_GetDataIdentify() from the get info demo.

 

Hope that makes sense,

 

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

5,875 次查看
nidhintomy
Contributor IV

Hi @Kan_Li 

Thanks for helping.

I have some questions.

There are a lot of API. How i decide which i need?

If a specific api for each apdu, then why we set an apdu in GetInfo Example.Se05x_GetInfo.c line no.210. Why we set apdu in there?

Thanks.

 

0 项奖励
回复
5,868 次查看
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @nidhintomy ,

 

Sorry for the confusion! Actually each APDU command issued to the IoT applet has a dedicated API, but the commands issued to the card manager are not like that, you have to set it up in raw data as shown in GetInfo Example.Se05x_GetInfo.c line no.210.

 

Hope that makes sense,

 

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

5,836 次查看
nidhintomy
Contributor IV

Hi @Kan_Li 

Do the value and meaning of  APDU fields P1 and P2 depends on INS field?

Thanks

0 项奖励
回复
5,807 次查看
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @nidhintomy ,

 

No, they are independent ,  please kindly refer to "4.3.4 P1 parameter" in https://www.nxp.com/docs/en/application-note/AN12413.pdf for more details.

 

Hope that helps,

 

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

5,862 次查看
nidhintomy
Contributor IV

@Kan_Li 

But i can't find any trace to T1o2C. Is the functions handle that part alone? Or we need to set it in some other files?

Thanks

 

0 项奖励
回复
5,854 次查看
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @nidhintomy ,

 

The T1oI2C function is also handled by the MW, and you may find all details in the folder of "simw-top\hostlib\hostLib\libCommon\smCom".

 

Hope that helps,

 

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------