Hi Aprado,
I have two cores sharing a particular memory address. I also implemented the mutex same way you did.
But when I program and start my first core it works. As I program and start the second core, it freezes the first code.
These happen only when i implement the mutex for sharing some common address space between two cores. Otherwise if I run two cores independently, it RUNs.
Below is a template for my code:
if (!altera_avalon_mutex_trylock (m1, ALT_CPU_CPU_ID_VALUE))
{
if (!altera_avalon_mutex_trylock (m2, ALT_CPU_CPU_ID_VALUE))
{
IORD(BASE, 0x00); //Memory Operation
altera_avalon_mutex_unlock (m2);
}
}
I used IORD. Does IORD & IORD_32DIRECT will make a difference in this case.
Please suggest.