Hi Team,
The customer wants use the variable as parameter for Hwi in the .cfg file.
How to define to pass variable to Hwi in the .cfg file by the XGCONF Configuration Editor to use Argument passed to ISR function?
Thanks and Best regards,
Kuerbis
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.
Hi Team,
The customer wants use the variable as parameter for Hwi in the .cfg file.
How to define to pass variable to Hwi in the .cfg file by the XGCONF Configuration Editor to use Argument passed to ISR function?
Thanks and Best regards,
Kuerbis
Hi Charles,
Thank you for your reply.
The customer wants to know how to describe a variable to pass Hwi function.
“1” on Argument passed to ISR function is assigned to hwi1params.arg then passed Hwi function for the example in TI-RTOS 2.16 User’s Guide (SPRUHD4L) as below.
They wants to use a variable instead of actual value “1” from Argument passed to ISR function setting.
Thanks and Best regards,
Kuerbis
Hi Kuerbis,
The below is code snippet example for passing an argument to the "timerFunc". In your case, you should be able to pass the argument to your Hwi function as in
Void I2CUSCIB_hwiIntFxn(UArg arg).
Timer_Params timerParams;
Timer_Params_init(&timerParams);
timerParams.period = 100000; /* 100,000 uSecs = 100ms */
timerParams.arg = 5;
Timer_construct(&timer0Struct, Timer_ANY, (Timer_FuncPtr)timerFunc, &timerParams, NULL);
Here's the timer function that takes the arg as a parameter. This allows you to use the same timer function for multiple timers.
Void timerFunc(UArg arg)
{
...
}
Hi Charles,
Thank you for your reply.
We’ll try like Timer_Params_init(&timerParams);.
BTW, I’m not familiar with .cfg. I feel that the statement in .cfg is a little different from the statement in the code.
For example, Hwi.create vs. Hwi_create.
Is there any manual or document to understand / modify ,cfg file?
Thanks and Best regards,
Kuerbis
Hi Akemi-san,
The detail can be found in the SYS/BIOS user's guide. 
Below is an excerpt.
The Hwi.create in the .cfg is a Java script syntax to statically enable the Hwi feature. The Hwi_create is dynamic method to create a Hwi object in the application code. The user's guide has the detail on both methods to create Hwi object.
Hi Charles,
Thanks!
I see. It’s JavaScript-like syntax.
I’ll read it but please help me if I get stack.
Thanks and Best regards,
Kuerbis