Code flashing successful but not working!

Hello,

I am creating a new project that uses the nRF52810 as my controller, and during the development stage, I am using the PCA10040 nRF52832 development board. (I read somewhere that we can flash the nRF52810 code into the nRF52832 PCA10040 development board). My requirement is a simple LED indicator based on delay commands from an APK that uses the Nordic UART service to send and receive data. I added the timer peripheral to the ble_app_uart example project from the directory nRF5_SDK_17.0.2_d674dde\examples\ble_peripheral\ble_app_uart\pca10040e\s112\ses and flashed the code onto the PCA10040 nRF52832 development board to test it. The code works perfectly.

Then I took an nRF52810 custom PCB and connected the JTAG. The board is able to detect and erase the chip. When I flash the code onto the board, the IDE shows "flash successful," but the board is not working. Are there any other conditions for flashing the code into the nRF52810 custom board? Your response is valuable.

SDK version: 17.0.2
SEGGER Embedded Studio version: 5.42a

Parents
  • Hi,

    If your custom board do not have external 32K crystal, you can try to modify these parameters in sdk_config.h

    // <o> NRF_SDH_CLOCK_LF_SRC  - SoftDevice clock source.
     
    // <0=> NRF_CLOCK_LF_SRC_RC 
    // <1=> NRF_CLOCK_LF_SRC_XTAL 
    // <2=> NRF_CLOCK_LF_SRC_SYNTH 
    
    #ifndef NRF_SDH_CLOCK_LF_SRC
    #define NRF_SDH_CLOCK_LF_SRC 0
    #endif
    
    // <o> NRF_SDH_CLOCK_LF_RC_CTIV - SoftDevice calibration timer interval. 
    #ifndef NRF_SDH_CLOCK_LF_RC_CTIV
    #define NRF_SDH_CLOCK_LF_RC_CTIV 16
    #endif
    
    // <o> NRF_SDH_CLOCK_LF_RC_TEMP_CTIV - SoftDevice calibration timer interval under constant temperature. 
    // <i> How often (in number of calibration intervals) the RC oscillator shall be calibrated
    // <i>  if the temperature has not changed.
    
    #ifndef NRF_SDH_CLOCK_LF_RC_TEMP_CTIV
    #define NRF_SDH_CLOCK_LF_RC_TEMP_CTIV 2
    #endif
    
    // <o> NRF_SDH_CLOCK_LF_ACCURACY  - External clock accuracy used in the LL to compute timing.
     
    // <0=> NRF_CLOCK_LF_ACCURACY_250_PPM 
    // <1=> NRF_CLOCK_LF_ACCURACY_500_PPM 
    // <2=> NRF_CLOCK_LF_ACCURACY_150_PPM 
    // <3=> NRF_CLOCK_LF_ACCURACY_100_PPM 
    // <4=> NRF_CLOCK_LF_ACCURACY_75_PPM 
    // <5=> NRF_CLOCK_LF_ACCURACY_50_PPM 
    // <6=> NRF_CLOCK_LF_ACCURACY_30_PPM 
    // <7=> NRF_CLOCK_LF_ACCURACY_20_PPM 
    // <8=> NRF_CLOCK_LF_ACCURACY_10_PPM 
    // <9=> NRF_CLOCK_LF_ACCURACY_5_PPM 
    // <10=> NRF_CLOCK_LF_ACCURACY_2_PPM 
    // <11=> NRF_CLOCK_LF_ACCURACY_1_PPM 
    
    #ifndef NRF_SDH_CLOCK_LF_ACCURACY
    #define NRF_SDH_CLOCK_LF_ACCURACY 1
    #endif

  • hi  ,

    I modified the sdk_config file as per the given instructions. Now I am able to debug through RTT Viewer, but the issue still persists. I am still getting a fatal error, Are there any other memory constraints while flashing the code onto the nRF52810 ?.

  • hi ,  , ,I apologize for the previous incorrect response. The debug terminal shows that the code enters this specific case. The issue is actually occurring within the UART event handler. What could be causing this?

    case NRF_DRV_UART_EVT_ERROR:
    NRF_LOG_INFO(" NRF_DRV_UART_EVT_ERROR \n");
    app_uart_event.evt_type = APP_UART_COMMUNICATION_ERROR;
    app_uart_event.data.error_communication = p_event->data.error.error_mask;
    (void)nrf_drv_uart_rx(&app_uart_inst, rx_buffer, 1);
    m_event_handler(&app_uart_event);
    break;

  • Hi,

    You can set break point in app_uart_event.evt_type = APP_UART_COMMUNICATION_ERROR;

    And check UART register's ERRORSRC.

    This document shows error root casue.

    https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/uart.html?cp=5_2_0_49_9_3#register.ERRORSRC

    typedef struct
    {
        app_uart_evt_type_t evt_type; /**< Type of event. */
        union
        {
            uint32_t error_communication; /**< Field used if evt_type is: APP_UART_COMMUNICATION_ERROR. This field contains the value in the ERRORSRC register for the UART peripheral. The UART_ERRORSRC_x defines from nrf5x_bitfields.h can be used to parse the error code. See also the \nRFXX Series Reference Manual for specification. */
            uint32_t error_code;          /**< Field used if evt_type is: NRF_ERROR_x. Additional status/error code if the error event type is APP_UART_FIFO_ERROR. This error code refer to errors defined in nrf_error.h. */
            uint8_t  value;               /**< Field used if evt_type is: NRF_ERROR_x. Additional status/error code if the error event type is APP_UART_FIFO_ERROR. This error code refer to errors defined in nrf_error.h. */
        } data;
    } app_uart_evt_t;

  • hi ,  , , 

    When I put a breakpoint here and start debugging the code, it never stops at the given breakpoint. The code execution continues until a fatal error occurs.

    When I check the ERRORSRC register, I am attaching an image of the ERRORSRC register values.

  • Hi,

    Please refer to spec :

    Break condition

    The serial data input is '0' for longer than the length of a data frame. (The data frame length is 10 bits without parity bit, and 11 bits with parity bit.).

    If you have logic analyzer or oscilloscope, you can measure the waveform of 52810 RX pin.

  • Hi, sorry for the delayed response. solved the issue by changing the UART RX, TX, CTS, and RTS pin numbers. The previously used pin numbers were connected to a motion sensor on the custom PCB via the SPI peripheral. Now the board is able to advertise, send commands, and trigger timer intervals based on the delay command from the APK. I really appreciate your efforts in providing this level of support for our development.

Reply
  • Hi, sorry for the delayed response. solved the issue by changing the UART RX, TX, CTS, and RTS pin numbers. The previously used pin numbers were connected to a motion sensor on the custom PCB via the SPI peripheral. Now the board is able to advertise, send commands, and trigger timer intervals based on the delay command from the APK. I really appreciate your efforts in providing this level of support for our development.

Children
No Data
Related