I am in a project where I need to deploy a applicationas shown below.
switch(statecase)
{
case 0: Scanning(); // GAPCentralRole_StartDiscovery is called and waiting for advertiments
// once it finds advertisment data in GAP_DEVICE_INFO_EVENT:,advertisment is sent
//through Uart and go to next state.
break;
case 1: if(ReadtheBuffer()) // In GAPROLE_ADVERTISING: the RxBuffer is read,the DMA destination is directly
//trasnferred to the Rxbuffer,once this buffer has data then start advertising go nextstate
break;
case 2: rtrnvalue=ReadtheBuffer();
if(rtrnvalue==TRUE)
{
Advertise();
}
else
{
statecase=2;
}
break;
the advertisment is not continous in any of the state its restricted to 1sec, after the time expires an event is called which will go to advertising or scanning depending on condition
In case 1 the data from Uart is load at the start,so till case 1, it works perfectly but in case 2 the Uart is loaded after 10 seconds , after 10 seconds the control should go to case2 and start advertise there is no advertising even after 15 seconds.
Is it the problem that Cpu is continously in the switch case and is not able to detect DMA call ?
or is there some other problem.. any kind of help is appreciable.
BR,
Timber