Hello all,
I am working on project using SDK 5.0.4 and for my project i need to follow the state machine where, mode of operation switch from one state to another state and that switching of mode/ state i want to keep in while(1) loop along with other BLE activities and check every time the state before move to next state.
Can any one help me, how can i proceed with logic execution as per my requirement and also can change the arch_main.c ?
If i change main file then will it be affect to my entire SDK ?
Urgently need help to proceed further Please.
Thanks and Regards
Rohit
Keywords:
Device:


Hi Rajapurerohit,
Apologies, but I am not able to completely understand what you are trying to accomplish? Could you please try to explain it a bit more? Do you want to get the last BLE event? If yes, the arch_last_rwble_evt_get() function will return the last event (the function returns the last state the BLE was, it rolls through the states).
Thanks, PM_Dialog
Hello PM_Dialog,
我的要求不是祝福Event or anything else. i just wanted to implement my custom requirement state machine i.e..
once the system initialization is completed, i will makes some flags true , once that is done according flags being set, program should execute the respective State.
[ For example: user wants to turn on LED or Initiate timer, based on the command sent over BLE. i.e. if User send turn On, program should goto State LED where it checks respective flags and execute state called next if any other command over BLE program should interrupt to respective state and so on].
This state of custom transition i want to maintain into arch_main.c file's while (1) loop, without changing any BLE event . where state transition is from one state to other state on request of commands .
So is it possible for me to change the while(1) loop in main function without affecting SDK files / any other files.
If can i alert the arch_main file and main function without affecting other events or function it will be very useful for me. Please help me to solve.
Thanks and Regards
Rohit
Hi Rajapurerohit,
You could modify the arch_main but I wouldn’t recommend this approach and I am not sure if is has any effects on the SDK. Why don’t you have a look at the Codeless reference application design? You could send command to the DA14580/3 over uart and you could easily toggle GPIOs. For example, you could send commands in order to turn on/off the led. If I understood correctly the application you would like to accomplish. Otherwise, please correct me.
Thanks, PM_Dialog