Hello All,
Greeting for the day!!!!
i want to implement something like this -> ( plz refer attached pic for more clarity )
1) i hav my application code with main() and in that under while(1) loop i am monitoring my sensors data and processing it..... for ex -
int main()
{.....
......
while(1)
{
process sensors data...
update the bits in flag register
}
return 0;
}
this application is for cc2538 only and i implemented this using cc2538 foundation firmware code..my this application is making use of HAL, BSP and driverlib provided in that codes
2) in this application i am creating one flag register and as per the sensors status i am modifying this flag register.
3) now what i want is that -> zigbee should periodically monitor status of my this flag register and as soon as if any change is happened zstack should run ISR related to that bit and should start the n/w and send report to ZC over the air....
4) after sending the report zstack must monitor the flag register statud and if any further changes happening then must inform the ZC....
5) i dont want to register my main code in task array of zigbee like generally we are doing.....
6) zigbee is like a ISR for me whenever my flag bit is sent it will take my flag data and sent OTA and again return control to my main code....
my problem is ->
1) how can i integrate my application code into zstack HA code becoz in zstack the main fn (in zmain.c) is like this-
int main( void )
{
// Turn off interrupts
osal_int_disable( INTS_ALL );
// Initialization for board related stuff such as LEDs
HAL_BOARD_INIT();
.............
...........
osal_start_system(); // No Return from here
return 0; // Shouldn't get here.
} // main()
so wher to keep my code ?
2) how to make zstack to periodically monitor my flag register . in zstack they are doing something like this ->
in fn ->
void osal_run_system( void )
{...............
process / monitor / check task array
}
and under task array they are monitoring HAL, MAC, NWK and Applications related event....
so how zstack monitor my flag register status ? how can i define my own event monitoring task for flag register.
anyone plz help me and guide me how can i do this or how i can implement this....
Thanks & Regards,
Maneesh SIngh