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

Need one stable UART and RTT loging example code

Hi,

Overview: In our board BMD340 (containing nRF52840) module present with GSM module and they exchange data using UART(PINRX-6,PINTX-7). Now we trying to use "ble_app_uart" example code from "nRF5_SDK_15.0.0_a53641a".
Objective: Using uart we send some AT command from BMD340 to GSM and connect internet,SMS or HTTP request. Also we need RTT log debugging .
Observation: We try many way to complete our objective but firmware crashes, hang and "Reset: Halt core after reset via DEMCR.VC_CORERESET.". Sometime its run after that its not working. Even "uart_event_handle" data missing. When we send data "app_uart_put();" its hang.
Also when we run RTTLOG and UART not able to debug error is "CPU not able to read register"
Executing Reset script TargetInterface.resetAndStop()

Reset: Halt core after reset via DEMCR.VC_CORERESET.
Reset: Reset device via AIRCR.SYSRESETREQ.
Preparing target for user application
Executing Reset script TargetInterface.resetAndStop()
Reset: Halt core after reset via DEMCR.VC_CORERESET.
Reset: Reset device via AIRCR.SYSRESETREQ.
Could not start CPU core. (ErrorCode: -1)
Support: Need one stable UART and RTT loging example code. Please guide us.
Parents
  • Hi Oliver,

    If I understood correctly you want to send messages from the nRF52840 module (BMD340) to a GPS module via the UART peripheral?

    I recommend you take a look at the UART hardware peripheral example, under the folder \examples\peripheral\uart in the SDK.

    RTT logging can you enable in sdk_config.h by setting NRF_LOG_BACKEND_RTT_ENABLED to 1.

    But are you sure you are able to compile and run the examples in the SDK at all? From the error messages you are getting it seems like you have some HW issue. What do you use to program the BMD340 module? Are you using an external debugger or the debugger on a DK perhaps? And do you program using nrfprog or SES?

    Best regards,

    Marjeris

  • We are using >>Environment: IDE- Segger embedded studio, external Debugger- segger-jlink EDU, Hardware- development board, SDK version -"nRF5_SDK_15.0.0"

    Use of BMD340 is send AT command to GSM and some internal sensor data capturing 

    We able to compile and debugging "sometime" and crash. 

    i try with UART hardware peripheral example but no luck. problem in sending and receiving data handling so let me any help you can do

  • Hi,

    So you are not able to compile and debug any example on the SDK? Can you describe how things are connected? How is the j-link EDU connected to the BMD340 module? And how is the BMD340 being powered? If you could attach a picture of the setup and the schematic files of your PCB it would be great.

    Best regards,

    Marjeris

Reply
  • Hi,

    So you are not able to compile and debug any example on the SDK? Can you describe how things are connected? How is the j-link EDU connected to the BMD340 module? And how is the BMD340 being powered? If you could attach a picture of the setup and the schematic files of your PCB it would be great.

    Best regards,

    Marjeris

Children
  • Hi,

    I am able to compile code, buid & run . But its crash when we sending "AT\r" or other command..for example:

    in this uart code i am using "APP_UART_FIFO_INIT" so my question is there any other way we can write code which using HAL ?

    I attached circuit diagram of BMD340 for reference 

     

  • Hi,

    Sorry for the late reply. When do you get the Could not start CPU core. (ErrorCode: -1) error message? It doesn't make sense that you are getting it when you sent something over UART.

    Can you explain a bit more about what is happening right before you get this error?

    Can you also try to run a debug session in SES and see if the code is getting stuck anywhere? Try setting a breakpoint in uart_event_handle() and see if you get any callbacks.

    If you are using the UART module in the applicatio you should not use the UART module for logging, so can you also make sure you don't have the UART backend for logging enable in sdk_config.h?

    Best regards,

    Marjeris