UART data sending issue in custom board using nRF52832

Hi,

We are doing a project on nRF52832 which uses UART for QR-code sensor, I2C for OLED and SPI for external flash.

The code works fine as expected when tested in nRF52832  DK (PCA10040), and we have designed a new PCB for our project.

Now we are testing the new board . While testing we have found something strange.

Now the OLED, EXTERNAL FLASH and QR-code sensor works fine, we can scan QR code and save it in the external flash and display contents on OLED based on commands received via BLE.

But we are unable to debug the code. ie, Printf doesnt send data in to the serial console.

After further testing for hardware issues we have found that UART peripheral example is working fine in the new board, we can send and receive data via serial console.

Its bit confusing and looks strange. Is there any suggestion to rectify it.

Another issue found that when ble commands are send to the device device reboots and Bluetooth gets disconnected. Actually debugging is not possible now due to the UART issue mentioned earlier.

We are using SES v5.42a

SDK version 17.0.2.

Chip  used MS50FB-nRF52832 from MiNew

Any help would be appreciated

thanks & regards

Parents
  • Hi,

    It looks like a configuration issue, can you switch to newer SDKs using Zephyr , would be easier.


    Thanks,

    Reuven

  • Hi Reuven,

    Thank you for ur response/suggestion.

    Currently we are developing our project using nRF52 SDK, anyway we just started through the documentations/ courses for nRF connect SDk. But it may take time as we need to use multiple peripherals in single project like UART,SPI,I2C . We are also using SAADC and softdevices for the project. So planning  a demo version using nRF sdk in the custom board for now.

    Is there any example projects available with these peripherals ? If yes, that will be helpful. But as per current knowledge we have to add different peripherals one by one to the project

    But if some configuration  issue persists ,how can it work properly in nRF52832 DK as expected ?

    Edit

    After Debugging via RTT Failed receiving NUS message. Error 0x04 is found inside nus_data_handler(). And commenting the do while section resolves the BLE transfer issues. Here also UART transmission seems the issue

      for (uint32_t i = 0; i < p_evt->params.rx_data.length; i++)
            {
               BLEDataBuff[i]=(p_evt->params.rx_data.p_data[i]);
                do
                {
                   BLEDataBuff[i]=(p_evt->params.rx_data.p_data[i]);
                    err_code = app_uart_put(p_evt->params.rx_data.p_data[i]);
                    if ((err_code != NRF_SUCCESS) && (err_code != NRF_ERROR_BUSY))
                    {
                        NRF_LOG_ERROR("Failed receiving NUS message. Error 0x%x. ", err_code);
                        APP_ERROR_CHECK(err_code);
                    }
                } while (err_code == NRF_ERROR_BUSY);
            }

    thanks & regards

  • Disabling flow control solved the issue

    Changed APP_UART_FLOW_CONTROL_ENABLED to APP_UART_FLOW_CONTROL_DISABLED

Reply Children
No Data
Related