Question Regarding HAL_RpmsgMcmgrInit() Timeout During IAR Debugging

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Question Regarding HAL_RpmsgMcmgrInit() Timeout During IAR Debugging

73 Views
hyama
Contributor II

Hello,

We would like to ask about an issue related to NBU Core initialization while debugging a KW47 application using IAR.

Environment

  • Board: Custom KW47 board
  • SDK Version: 26.03.00
  • IAR Embedded Workbench for ARM: 9.60.3
  • Debug Probe: CMSIS-DAP
  • Reset setting: Hardware Reset
  • Run to: main

Screenshots of the IAR debugger configuration are attached for reference.

Setting_1.png

Setting_2.png

  

Observed Behavior

After performing "Download and Debug" in IAR, if we press Go without first executing a Hardware Reset, an ASSERT occurs during BLE initialization.

We traced the issue to the following call sequence:

 
APP_InitBle()
  ->PLATFORM_InitMulticore()
    -> HAL_RpmsgMcmgrInit()
      returns kStatus_HAL_RpmsgTimeout
 -> assert(false)

However, if we perform the following sequence:

  1. Download and Debug
  2. Hardware Reset
  3. Go

the application starts normally and no ASSERT occurs.

Our Hypothesis

Based on the observed behavior, we suspect the following sequence may be occurring:

  1. Download starts.
  2. After the download completes, the NBU Core begins running before the debugger is fully attached.
  3. When the debugger attaches, the Cortex-M33 Core returns to ResetHandler.
  4. However, the NBU Core continues running.
  5. As a result, the Cortex-M33 Core and NBU Core become out of sync.
  6. When HAL_RpmsgMcmgrInit() is executed, the RPMsg/MCMGR initialization handshake cannot be completed, causing kStatus_HAL_RpmsgTimeout to be returned.
  7. After a Hardware Reset, both the Cortex-M33 Core and the NBU Core are reset, allowing initialization to complete successfully.

Questions

  1. Is the above understanding and hypothesis correct?
  2. When debugging KW47 applications with IAR, is there a recommended procedure to ensure that the Cortex-M33 Core and NBU Core are properly synchronized before starting execution?

Thank you for your support.

Best regards,
hyama

Labels (1)
0 Kudos
Reply
2 Replies

38 Views
Christine_Li
NXP TechSupport
NXP TechSupport

Hi, @hyama 

Thanks for creating case to us.

Before answer your questions, can you please help to check whether the NBU version is matched with your SDK version?

If you are not sure, please help to update the NBU which located in your SDK directory:mcuxsdk\middleware\wireless\ble_controller\bin\kw47_nbu_ble_hosted.bin

About how to flash nbu, you can refer to below:

(1) Methods to update NBU firmware on KW47 and MCX W72 - NXP Community

After upgrade the NBU to the same version with SDK, then have a try.

 

BR,

Christine.

0 Kudos
Reply

14 Views
hyama
Contributor II

Hi @Christine_Li ,

Thank you for your reply.

We have already programmed the NBU firmware included with SDK version 26.03.00.

However, we have not yet verified whether the NBU firmware was written correctly or whether the currently running NBU firmware version actually matches the SDK version.

Is there a way to check the version of the NBU firmware currently programmed on the device?

If there is a recommended method to verify the NBU firmware version, please let us know.

Best regards,

hyama

0 Kudos
Reply