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

The program stays at 4B01 LDR R3, [PC, # 4]

Hi All,

I have a question, it seems to be the SES debugger crashed.

My project only uses peripheral devices, my purpose is to combine libuarte with my framework.

And my framework use features with Blinky and RTT.

Attachment is my project, please help me debug.

Besrregards,

Kai

0552.test.zip

  • Hello,

    Your application attempted to log data before initializing the logger module and this is what caused it to hang at 0xA60 in the MBR's Hardfault exception handler. There were also some asserts because you had selected TIMER0 that is reserved to the Softdevice.

    Here's your updated project:

    blinky_.zip

    Best regards,

    Vidar

  • Hi Vidar,


    I try another ways,I have conflict when I see the NRF_DRIVERS and NRF_SOFTDEVICE in SDK_Config.h when they merge a project.

    At present, I have successfully reached the purpose I want,but there is still a problem, please ask.

    The question is : IO_STATUS + 1 once every 1 second, and use RTT printing, confirmation will enter the implementation of this section every 1 second, but sometimes the print will lose information, and the J-LLINK Viewer is seriously lost.

     by the way,i want to ask a question about how to show timestamp?

    void timer_led_event_handler(nrf_timer_event_t event_type, void* p_context)  //20211104 Kai
    {   
        switch(event_type)  
        {  
             case NRF_TIMER_EVENT_COMPARE0:  
                  nrf_gpio_pin_toggle(2);
                  IO_Status++;
                  NRF_LOG_INFO("IO Status : %d",IO_Status);
                  if (IO_Status == 10)
                  {
                    IO_Status = 0;
                  }
               break;  
       
            default:  
               //Do nothing.  
               break;  
        }      
    } 
    
    
    void myTimerInit()  //20211104 Kai
    {  
       uint32_t time_ms = 1000; //Time(in miliseconds) between consecutive compare events.  
       uint32_t time_ticks;  
       uint32_t err_code = NRF_SUCCESS;  
         
       //Configure all leds on board.  
      
       nrf_drv_timer_config_t timer_cfg = NRF_DRV_TIMER_DEFAULT_CONFIG;
    
       //Configure TIMER_LED for generating simple light effect - leds on board will invert his state one after the other.  
       err_code = nrf_drv_timer_init(&TIMER_LED, &timer_cfg, timer_led_event_handler);
       APP_ERROR_CHECK(err_code);  
       time_ticks = nrf_drv_timer_ms_to_ticks(&TIMER_LED, time_ms);  
         
       nrf_drv_timer_extended_compare(  
            &TIMER_LED, NRF_TIMER_CC_CHANNEL0, time_ticks, NRF_TIMER_SHORT_COMPARE0_CLEAR_MASK, true);  
       nrf_drv_timer_enable(&TIMER_LED); 
    }  

    Best regards,

    Kai

  • Hi Kai,

    Can you upload the current version of your project so I can give it a try here? You should not be able overflow the log buffers when logging at this rate.

    kai19960504 said:
    by the way,i want to ask a question about how to show timestamp?

    You can see how it's done in the CLI example here: \examples\peripheral\cli

    Best regards,

    Vidar

  • Hi Vidar,

    Attachment is my program.Thank you for your help.

    But today i retry this project it seem normal. I have no idea.Maybe Segger Terminal and J-Link RTT view can not enable at the same time?

    Best regards,

    Kai

    libuarte_Kai3.zip

  • Hi All,

    But today i retry this project it seem normal. I have no idea.Maybe Segger Terminal and J-Link RTT view can not enable at the same time?

     Segger Terminal and J-Link RTT viewer can not enable at the same time is true.

Related