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

PSoC™ 6

user_1570836
Level 4
50 replies posted 25 replies posted 25 sign-ins
Level 4

Hello,

I have a few questions about two-processor PSoCs.

If I declare a global variable in a header file inside shared-code folder, how will this be compiled?

Will this get compiled as two variables, one for each core? Or will this be compiled as a shared memory location?

If the first, how should I declare shared memory?

And the last question, how will volatile keyword behave in two-processor environment? I used to declare variable as volatile, when it may be accessed from multiple ISRs and/or non-interrupt code. Does this mean that all shared memory should be volatile?

Stanislav

1 Solution
MarkA_91
Employee
10 likes received First like received
Employee

Hello Stanislav,

The draft application note in another thread addresses the shared memory issue. There is an associated code example which I will also publish. Please let me know if these address your needs.

Regards,

Mark Ainsworth

View solution in original post

3 Replies