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

nRF UART app not detecting

Hi, I have tested a sample code which sends some data through BLE in nRF52 development kit(PCA10400). The code is attached below.

nRF5_SDK_11.0.0_MPU6050_Acc_X_Output.7z

I was able to connect the nRF UART app with the nRF DK and could send data to the app. The app could also send data and was displayed in terminal.

Later I tried to program a BMD-300 module which is attached on an external board.I followed some steps to program the external module but couldn't succeed. I tried to do the same commands in the onboard nRF52 module and everything executed successfully. But from then the sample program which I atttached is not executing at all. Neither the iPhone's Bluetooth nor nRF UART app no longer detecting the device for this particular code. But the basic ble_app_uart code which comes along with the SDK is working. I haven't done any changes to the code. Does the nRFjprog commands changed anything in the chip? or Is there any settings I need to check in Keil?

There is one more code which is showing the same problem. nRF52-ADC-examples-master.zip This was also working previously, but not working now. Any help would be appreciated.

Thanks, Vishnu

Parents
  • I see that you have added this code to the main.c:

                MPU6050_GetAccData(MPU6050_Acc);
    	        memset(PrintBuffer,0x00,sizeof(PrintBuffer));
    			sprintf(PrintBuffer, "x:%.2f\r\n", MPU6050_Acc[0]);	//show x-axis rawdata
    			length = strlen(PrintBuffer);
    			err_code = ble_nus_string_send(&m_nus, PrintBuffer, length);
    			nrf_delay_ms(1000);
    

    Can you add APP_ERROR_CHECK(err_code); on the error_code from ble_nus_string_send(), and see if you get an error. When sending data on every main iteration, you are also maybe filling the BLE buffers, and getting a BLE_ERROR_NO_TX_BUFFERS error ? Try to only send data when you get new data from the MPU6050.

Reply
  • I see that you have added this code to the main.c:

                MPU6050_GetAccData(MPU6050_Acc);
    	        memset(PrintBuffer,0x00,sizeof(PrintBuffer));
    			sprintf(PrintBuffer, "x:%.2f\r\n", MPU6050_Acc[0]);	//show x-axis rawdata
    			length = strlen(PrintBuffer);
    			err_code = ble_nus_string_send(&m_nus, PrintBuffer, length);
    			nrf_delay_ms(1000);
    

    Can you add APP_ERROR_CHECK(err_code); on the error_code from ble_nus_string_send(), and see if you get an error. When sending data on every main iteration, you are also maybe filling the BLE buffers, and getting a BLE_ERROR_NO_TX_BUFFERS error ? Try to only send data when you get new data from the MPU6050.

Children
No Data
Related