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

Probelm in transfering data using uart printf

Hi,

I am using nrf52832 to scan beacons and then store temporary into two dimensional array. I made interrupt that call after some interval to send stored beacons over uart.

I am able to print beacon data over uart when it scanned in BLE_GAP_EVT_ADV_REPORT.

but in timer interrupt i tried to print multiple scanned beacons that stores inside two dimensional array but i am not able to get all beacons. in a single interval it scanned more than 40 beacons but, it prints first 10 mac addresses and then last one. then before scan then scan interval interrupt end

This is my code inside interrupt

void scan_interval_interrupt(nrf_timer_event_t event_type, void* p_context)
{

    switch (event_type)
    {
        case NRF_TIMER_EVENT_COMPARE2:
		    nrf_drv_timer_disable(&TIMER_SCAN);
        	sd_ble_gap_scan_stop();
            for(int i=0;i<=beacon_top;i++)
            {
            	printf("\r\n%d",i);
            	for(int j=0;j<=5;j++){
	            	printf("%02x",beacons_scanned[i][j]);

            	}
            	nrf_delay_ms(20);
            }
        	printf("before scan");
        	scan_start();
			beacon_top=-1;
        	printf("scan interval interrupt end");

		    nrf_drv_timer_enable(&TIMER_SCAN);
            break;
        default:
            break;
    }

}
Parents Reply Children
No Data
Related