Part Number: LAUNCHXL-F28379D
Tool/software: TI-RTOS
Hello,
I am trying to add very simple Swi in RTSC project. I added idle function and swi in *.cfg file. Here is my code:
/*
* ======== main.c ========
*/
#include <xdc/cfg/global.h>
#include <xdc/std.h>
#include <xdc/runtime/Error.h>
#include <xdc/runtime/System.h>
#include <ti/sysbios/BIOS.h>
#include <ti/sysbios/knl/Task.h>
#include <ti/sysbios/knl/Swi.h>
Void swiFxn(UArg a0, UArg a1)
{
System_printf("enter swiFxn()\n");
System_printf("exit swiFxn()\n");
System_flush(); /* force SysMin output to console */
}
Void idleFxn()
{
Swi_post(swi0);
//Task_sleep(1000);
}
/*
* ======== main ========
*/
Int main()
{
System_printf("enter main()\n");
BIOS_start(); /* does not return */
return(0);
}
And here is log from a Console:
[C28xx_CPU1] enter main() enter swiFxn() exit swiFxn() ti.sysbios.gates.GateMutex: line 99: assertion failure: A_badContext: bad calling context. See GateMutex API doc for details. xdc.runtime.Error.raise: terminating execution
I have no idea why it doesn't work.
Any help appreciated.
BR,
Dawid.