This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

USB and RADIO are having problems working together on nrf52833.

Platform: pca10100

SDK version: SDK17.0

Purpose: Use radio to scan Bluetooth devices and perform CTE sampling. When the scan data and IQ data accumulate nearly 4K, output these data via USB CDC ACM.

Detail:

1 Softdevice isn't enabled

2 After EVENT_PHYEND is generated, if the CRC status is correct, put the function that processes the scan result into app_scheduler, and then start the next scan after the processing is completed; otherwise, directly start the next scan. Insert this part of the code below.

After scanning for a period of time, more than ten seconds or several minutes, the function( radio_scan_report_hdl() or radio_scan_handler() ) put in app_scheduler is not executed, cause the scanning process to not continue. Insert the corresponding log information.

3 But when the USB is not sending data, radio scanning can work. 

4 RADIO uses hardware resource TIMER1, USB uses hardware resource TIMER2.

5 Is there any resource conflict between USB and RADIO? Or other problems?

Fullscreen
1
2
3
4
5
6
7
8
9
10
if (NRF_RADIO->EVENTS_PHYEND == 1) {
NRF_RADIO->EVENTS_PHYEND = 0;
if(NRF_RADIO->CRCSTATUS == 1) {
NRF_LOG_INFO("EVENTS_PHYEND CRC ok");
APP_ERROR_CHECK(app_sched_event_put(NULL, 0, radio_scan_report_hdl));
} else {
NRF_LOG_INFO("RADIO->CRCSTATUS Error!");
APP_ERROR_CHECK(app_sched_event_put(NULL, 0, radio_scan_handler));
}
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX