This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RTOS/TMS320C6678: SWI with parameter

Part Number: TMS320C6678

Tool/software: TI-RTOS

Hi guys,

I am posting an SWI out of an HWI and want to send parameters with this swi, which are defined and calculated at the time of HWI execution. My approuch is, as follows:

                            if (<condition>)
                            {
                                Swi_Params swiParams;
                                Swi_Handle swi;

                                Swi_Params_init(&swiParams);
                                swiParams.arg0 = variable1;
                                swiParams.arg1 = variable2;
                                swi = Swi_create(swi_Function, &swiParams, NULL);

                                Swi_post(swi);

                                <instructions>
                            }

The idea is, i just want to fire and forget an swi with parameters exactly known during runtime of the hwi.

Does it work this way? My concern is, that that this swi handle and this swi parameters structure is free'd at the end of this block, the memory is reused, and something wrong is happening before/during the execution of the swi function ..


greets, Stefan