This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Can direct test mode and general test work together?

Hello.

I used nrf51822 central and peripheral.

I want to general mode after direct test mode, because massive production test.

but, source code keep stay direct test mode.

please confirm source code as below.

Can direct test mode and general test work together?

please confirm it. thank you,

int main(void) {

uint32_t err_code;
bool erase_bonds;
int i;
uint32_t    dtm_error_code;
unsigned char started_battery_check = 1;
//direct test mode	
uart_init();
dtm_error_code = dtm_init();
if (dtm_error_code != DTM_SUCCESS)
{
    // If DTM cannot be correctly initialized, then we just return.
    return -1;
}	
for(i =0; i<2; i++) {
dtm_cmd(LE_TRANSMITTER_TEST, 0, CARRIER_TEST, DTM_PKT_VENDORSPECIFIC);
}	
	
// Initialize.general mode
APP_TIMER_INIT(APP_TIMER_PRESCALER, APP_TIMER_OP_QUEUE_SIZE, false);
uart_init();
buttons_leds_init(&erase_bonds);
ble_stack_init();
gap_params_init();
services_init();
advertising_init();
conn_params_init();

init_port();
err_code = ble_advertising_start(BLE_ADV_MODE_FAST);
APP_ERROR_CHECK(err_code); 
adc_config();
Related