Hello,
I am using a nrf51422 development kit with softdevice S310 and I have a problem in whatever pin I choose as output when I use the bluetooth.
I run the example ble_app_hts for nrf51822 but conditioned to be flashed in nrf51422. In this example, it is implemented a health thermometer profile and it works fine, but I've added to this code a little code to generate a clock signal and to send it to an output pin. The clock pulse works fine when I eliminate the "advertising_start()" line, but I can not connect with bluetooth when I eliminate it, obviously. But when advertising_start() is running, the clock pulse doesn't work fine, some times it stays high or low more time than needed.
So, someone can tell me why when bluetooth is working, there is interference in the output signal??? my code is the next:
int main(void)
{
// Initialize.
leds_init();
timers_init();
gpiote_init();
buttons_init();
ble_stack_init();
bond_manager_init();
gap_params_init();
advertising_init();
services_init();
sensor_sim_init();
conn_params_init();
sec_params_init();
// Start execution.
application_timers_start();
advertising_start();
// Enter main loop.
int contador=1;
for (;;)
{
//power_manage();
if (contador%2==1)
{
nrf_gpio_cfg_output(SALIDA);
nrf_gpio_pin_set(SALIDA);
}
else
{
nrf_gpio_cfg_output(SALIDA);
nrf_gpio_pin_clear(SALIDA);
}
contador++;
}
}