Hi, i use the saadc example(triggered by ppi+timer) with uart to get voltage signal and transmit to central device( another custom nrf52832 board), and the central prints data on pc.
the problem is the data receiving rate on the central side is so low, i read the rate on a Serial debugging assistant.
MIN_CONN_INTERVAL and MAX_CONN_INTERVAL is 7.5ms on both sides; baud rate 115200;
J-link shows "Updating data length to 251 on connection" and "Updating ATT MTU to 247 bytes(desired:247) on connection";
NRF_SDH_BLE_GAP_EVENT_LENGTH 6, but i don't know how to make connection event length extension enabled;
uint32_t ticks = nrf_drv_timer_us_to_ticks(&m_timer,3000); i trigger saadc event every 3ms and send data in saadc_callback():
if (p_event->type == NRF_DRV_SAADC_EVT_DONE)
{
ret_code_t err_code;
static uint8_t data_array[SAMPLES_IN_BUFFER*2];//SAMPLE_IN_BUFFER=120;
err_code = nrf_drv_saadc_buffer_convert(p_event->data.done.p_buffer, SAMPLES_IN_BUFFER);
APP_ERROR_CHECK(err_code);
uint8_t i;
for (i = 0; i data.done.p_buffer[i];
value=val>>4;
data_array[i*2+1]=value;
}
uint16_t length = (uint16_t)(i*2);
err_code = ble_nus_data_send(&m_nus, data_array, &length, m_conn_handle);
}
I set the uart tx/rx buffer size :
#define UART_TX_BUF_SIZE 16384
#define UART_RX_BUF_SIZE 16384
I can only get 8KB/sec rate that's not enough and connection get disconnected sometimes.
two custom nrf52832 boards; SDK15; S132 V6.0;
Any advice will be appreciated.