Hello everyone,
Target is C6678, Sysbios 6.37, XDCTools 3.25, CCS v6beta.
Here's what we want to do :
- Post a swi N times with N different values to be transmitted with the post
- Make sure we DONT lose any posted swi and the value associated
- Calling context of the 'post' range from Idle to Task to Swi to Hwi
- the same SWI can be called from different places in the code
Here's what we noticed :
Swi_or doesn't fit our needs because let's say the SWI is posted 3 times in a HWI context, the SWI will only execute once.
Swi_post isn't right either.
Swi_inc is OK with the repetitions = getTrigger and while loop as described in the SYSBIOS User Guide.
But we also need to pass an argument with the SWI.
When the SWI is posted from a single place we used the following mechanism
Swi_getAttrs(swi_hdl, NULL, ¶m); param.arg0 = (UArg) &event_table[0]; /* fixed pointer */ Swi_setAttrs(swi_hdl, NULL, ¶m); Swi_inc(swi_hdl); // in the SWI function // getTrigger call to know the number of times the swi must // be executed // read the event_table
My question is :
When a SWI is to be posted in A) a task context b) a SWI context,
what's the best strategy to make sure we don't lose 'posts' and have a 32-bit argument passed with each post ?