Asynchronous notification without synchronous clear

Technical questions regarding the XTC tools and programming with XMOS.
babazaroni
Experienced Member
Posts: 94
Joined: Sun Feb 10, 2013 4:47 am

Asynchronous notification without synchronous clear

Post by babazaroni »

I put i2c events into a global circular buffer, then I do an interface notification to the i2c core indicating that there are events to process.

If i2c core is waiting in a select statement, and gets 'poked' out of the select and process's the buffer. If it's already processing the buffer, the core doing the notification is not locked up waiting for a response.

That's fine but now in order to clear the notification, one has to call the interface method marked 'clear notification', which in the documentation design guide is usually a method to return data which makes it synchronous. This can potentially cause a lockup between cores, and there is no need for me to get the data, as it is in the circular buffer already.

Is there a way to clear the notification asynchronously instead of synchronously?

Maybe there is a better way?


User avatar
infiniteimprobability
XCore Legend
Posts: 1126
Joined: Thu May 27, 2010 10:08 am

Post by infiniteimprobability »

Is there a way to clear the notification asynchronously instead of synchronously?
Not using XC interfaces as far as I know.

Maybe could use streaming channels and rely on the fact there is a >1 long word buffer to decouple the communication. (i.e. you can

Code: Select all

my_chan <: data 
once without blocking)

Failing that, you could always roll your own comms scheme using shared memory!