Using PSoC 6 Crypto block from both CM0+ and CM4.

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
NiBu_4687336
Level 5
Level 5
5 solutions authored 50 replies posted 25 replies posted

Hi.

My application needs to perform Crypto operations from code running on both the CM0+ and the CM4 cores. The PDL documentation is a bit confusing on the issue. On the one hand, it says, 

"Only one Crypto server and only one Crypto client can be run at the same time on any core. [Emphasis mine]"

Suggesting that you cannot run two clients on a single core, but that running a single client on each of the two cores is not prohibited. It then goes on to say,

"So, valid configurations are:

  • one server instance runs on CM0+ and one client instance on CM4 (and vice versa).
  • one server instance and one client instance run on CM0+ (** This is not recommended, use Direct Crypto API's to perform Crypto operations on a single core).
  • one server instance and one client instance run on CM4 (** This is not recommended, use Direct Crypto API's to perform Crypto operations on a single core)."

This suggests that you cannot have more than one server and one client. In other words, having one server and two clients, one on each core, is not allowed.

The PDL then says,

"IPC communication between the client and server is completely transparent. Using IPC for communication provides a simple synchronization mechanism to handle concurrent requests from different cores. [Emphasis mine]"

Which suggests that running a client on each of the two cores is allowed.

What is the definitive answer - can I run the Crypto server on, say the CM0+, and run one client on the CM0+, with a second client on the CM4? Or otherwise have access to Crypto functions from both cores?

Thanks,

-Nick

0 Likes
1 Solution
Rakshith
Moderator
Moderator
Moderator
250 likes received 1000 replies posted 750 replies posted

Hi Nick, 

The best way to use the crypto block on both cores would be to use the Direct Access mode. Please note that you have to make sure that the crypto block is not accessed at the same time.

The Client-Server model is obsolete and is not recommended to be used. All the newer code examples will be using the Direct Access model.

Thanks and Regards,
Rakshith M B

View solution in original post

0 Likes
2 Replies
Rakshith
Moderator
Moderator
Moderator
250 likes received 1000 replies posted 750 replies posted

Hi Nick, 

The best way to use the crypto block on both cores would be to use the Direct Access mode. Please note that you have to make sure that the crypto block is not accessed at the same time.

The Client-Server model is obsolete and is not recommended to be used. All the newer code examples will be using the Direct Access model.

Thanks and Regards,
Rakshith M B
0 Likes

Hi @Rakshith.

Thanks - I'll give that a try.

-Nick

0 Likes