The Bluetooth firmware will report an error message before startup, and then everything will be normal

The chip I am using is 54l15, and the NCS version is 2.8.0

I used the peripheral_uart example for modification and got my own program, but I forgot which time this problem occurred during the modification

The specific error code is shown in the following figure

As can be seen, there was a slight error message output before the code started, but I searched for a long time without finding the cause. And this does not affect other functions, except for these few lines of error messages, everything else is running as expected

Parents Reply
  • Hi Illy, 

    How did you do the reboot ? 
    It seems like there is assert at line 287 of nrfx_grtc.c file causing the issue:
      NRFX_ASSERT(m_cb.state == NRFX_DRV_STATE_INITIALIZED);

    Either something wrong with the rebooting or the GRTC module is being initialized twice at booting. 

    If you do power reboot do you see the problem ? 
    If you test with the default application do you see the same issue ? 

Children
  • hi

    Since our board does not have a reset button, I use soft reset on our board. Pressing two buttons at the same time will reset and restart. Additionally, during development, I prefer to use the programmer in nRF Connect for Desktop for resetting. Both of these methods can lead to this problem. Then I tested it using a 54l15pdk development board, and if I reset it using the reset button on the board, there would be no problem.

    Even when the power was disconnected and reconnected, this issue was not observed.

    Using unmodified peripheral_uart examples will not cause this issue.

    What functions or peripherals are related to GRTC? Maybe I can rule it out again

  • I have also printed out the information of mcuboot, and it seems that mcuboot has been started twice so far? Only the second time successfully redirected to the app and started running

  • Hi Illy, 

    I think it's my mistake the assert is not about the grtc module has been initialized twice but about that the module is not initialized when the function is called. 
    So we need to look into why it's not initialized when you do soft reset. 

    I think it's easier if you can trace back on the modification you made to the application. 

    GRTC is the peripheral replaced the RTC in the NRF52. GRTC is used for the system clock and for the application clock . Could you check if you have done any modification related to the clock ? Any chance that you remove the pre-kernel sysinit to start the sys_clock_driver_init() ? 
    Could you show how you do reset ? 

  • hi
    I use NVIC_SystemReset and this
    At present, I have found that this issue may be caused by the configuration in prj.conf. In a new example, I copied the current prj.conf and the same issue occurred, I am ruling out which configuration is causing the problem
  • hi

    I should have already found where the problem lies

    Previously, there were some issues with Bluetooth caused by hardware, but I didn't know it was a hardware error at the time, so I enabled CONFIG_DEBUG_OPTIMIZATIONS=y and CONFIG_DEBUG_THREAD_INFO=y for debugging purposes

    And I chose OG here

    The current result of my testing is that only by canceling both of these changes can the grtc error be resolved. Whether changing one of them separately or both at the same time, it will trigger the grtc error

    Although the problem has been resolved, I would like to know the reason for its occurrence. Can you explain it to me? Thank you.

Related