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.

CC2340R5: how to send periodic notification using Basic BLE Example.

Part Number: CC2340R5

Hi expert.

my customer would like to send notification data through SIMPLEGATTPROFILE_CHAR4 using LGPTimer callback to Basic sample.

LGPTimer is as follows.

/*****************************************************************************
//! LGPTimer_Init
//*****************************************************************************
void LGPTimer_Init(void)
{
LGPTimerLPF3_Params params;
uint32_t counterTarget;

// Initialize parameters and assign callback function to be used
LGPTimerLPF3_Params_init(&params);
params.hwiCallbackFxn = timerCallback;
params.prescalerDiv = 255;

// Open driver
g_lgptHandle = LGPTimerLPF3_open(CONFIG_LGPTIMER_0, &params);
// Set counter target
counterTarget = LGPTimer_PERIOD; //48000 - 1; // 1 ms with a system clock of 48 MHz
LGPTimerLPF3_setInitialCounterTarget(g_lgptHandle, counterTarget, true);
// Enable counter target interrupt
LGPTimerLPF3_enableInterrupt(g_lgptHandle, LGPTimerLPF3_INT_TGT);
}

and then, they tried to send notification data periodically through the callback function below, but the program stops after 1 byte transfer.

void timerCallback(LGPTimerLPF3_Handle lgptHandle, LGPTimerLPF3_IntMask interruptMask)
{
GPIO_toggle(CONFIG_GPIO_LED_1);
bt_count++;
SimpleGattProfile_setParameter(SIMPLEGATTPROFILE_CHAR4, sizeof(uint8_t), &bt_count);
}

Please guide me on how to send periodic notification data in the basicble example.

thanks