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

BLE stumbles without RTT Viewer.

Hello, I'm developing a BLE mouse using nRF52840.

I found something strange while testing mouse movement by connecting the BLE.

I was logging using the RTTViewer and found that the BLE only works normally when the logger is in operation.



Here is the description of the attached video.


1. I modified the firmware so that the mouse moves automatically.
2. I connected my mouse and PC with BLE and started to record this video.
3. I recorded when I connected the RTT Viewer and when I didn't. Please look at the mouse's movements.
4. The numbers 39, 40 in the logger are outputting the return value of app_sched_queue_space_get().

The following is an approximate initialization code.

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
//log init
NRF_LOG_INIT(NULL);
NRF_LOG_DEFAULT_BACKENDS_INIT();
//timer init
nrf_drv_clock_init();
nrf_drv_clock_lfclk_request(NULL);
app_timer_init();
//pwr mgmt init
nrf_pwr_mgmt_init()
//schedler init
APP_SCHED_INIT(sizeof(my_event_t), SCHED_QUEUE_SIZE:40);
//cli init
nrf_cli_init(const p_cli*:&m_cli_rtt, void* p_transport_config:NULL, int use_color:true, int log_backend:true, int LOG_LVL)
nrf_cli_start(&m_cli_rtt);
//twi init
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

 

I don't know how RTT Viewer could affect BLE.

Please help me.