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.

AON Event Fabric



I'm trying to capture new updates on BatMon module (voltage and temperature).
In order to do so, I want to call AONBatMonTemperatureGetDegC() and AONBatMonBatteryVoltageGet() only after an update.

I wrote the following piece of code:

void hwiFxn(UArg arg)
{
	System_printf("%d %d %d.\n", arg, AONBatMonTemperatureGetDegC(), AONBatMonBatteryVoltageGet());
}

Int main()
{
    /* Call board init functions */
    Board_initGeneral();

    /* Call BatMon enable function */
    AONBatMonEnable();

    /* Map Update Temp and Volt events */
    AONEventMcuSet(AON_EVENT_MCU_EVENT0, AON_EVENT_BATMON_TEMP);
    AONEventMcuSet(AON_EVENT_MCU_EVENT0, AON_EVENT_BATMON_VOLT);

    /* Hwi function to be called on temp and volt events */
    Hwi_create(INT_AON_PROG0, (Hwi_FuncPtr) hwiFxn, NULL, NULL);

    BIOS_start();
    return(0);
}

Unfortunately, I got some problems:

  1. I don't know how to test if the hwi function is called because of real updates of BatMon temp and voltage measures.
  2. When I remove AONEventMcuSet calls, my hwiFxn is still called by something which makes me think that  I misused the api.
  3. The hwiFxn function is called repeatedly and another swi functions (button call back) in my code are not called...
  4. I print the argument (arg) in hwiFxn and for the first two calls it values (as integer) are 0 and 1, then it is 855 (always). Where can I find the meaning of those numbers?

Thanks.