Hi,
I have 2 Cores (uCs) in chip.
There's an available General-Purpose Interrupt between the two.
Core A frequently needs to ask
Core B to read / Write a certain Register for a module which is only accessible to
Core B.
Core B is to perform the Reading / Writing, and return an Acknowledge (with the register Value if in case of a Reading Request).
I'd like to use the General Purpose Interrupt for this purpose.
How would you suggest to efficiently pass Data using this Interrupt?
There's an available Shared Memory, and I'd very love to hear how you would utilize it for this task.
The Challenge here is that
Core A might trigger a second Read/Write request to
Core B from
Task2,
Before
Core B finished with the first Read / Write Request from
Task1, and I'd need to support such case.
An Example to what I mean:
C:
//Called from Task 1
INT32 Core_A_Func1 (INT32 Address1)
{
UINT32 Value1; //Line 1
Value1 = CORE_B_READ( Address1 ); //Line 2
return Value1; //Line 3
}
//Called from Task 2
INT32 Core_A_Func2 (INT32 Address2)
{
UINT32 Value2; //Line 1
Value2= CORE_B_READ( Address2 ); //Line 2
return Value2; //Line 3
}
It could be that While
Func1 is waiting for
Value1 (in
Task 1),
Func2 was triggered (from
Task 2), and also calls
CORE_B_READ, and is waiting for
Value2.
How would you implement
CORE_B_READ Function?
Thank you very much.