Llhw_init() is return an error value QERR_EINVAL = -11, * @QERR_EINVAL: Invalid argument

Hello everyone,

I am currently utilizing a DWM3000EVB along with the DW3_QM33 SDK v1.0.0 release and attempting to port this SDK to the PSoC 6 platform. While running the UCI application, I encountered an issue within the “uwbmac_helper_dw3000.c” file, specifically during the initialization process.

The file contains three initialization calls. The qplatform_init() function executes successfully, with the board responding with the device ID (DECA0302). For the l1_config_init() function, I am passing NULL as an argument.

However, the execution halts when the llhw_init() function is called, as it returns a non-zero value(QERR_EINVAL = -11, * @QERR_EINVAL: Invalid argument). Since this function is provided as a library, I am unsure of its specific operations and the possible reasons for this issue.

questions

  1. Is passing “NULL” in “l1_config_init()” okay or do we need to pass some platform specific ops
  2. What does llhw_init() do, what are the reasons it could be failing.

Any suggestions or solutions to resolve this problem would be greatly appreciated. Thank you.

Hi Kevin,

For question 1, it should be fine to pass NULL for l1_config_init().
For question 2, llhw_init is meant to setup the UWB hardware required components:

  1. Init crypto required for Fira ranging by calling mcps_crypto_init()
  2. Setup QM33/DW3K low level driver and try to probe the device ID
  3. Reset QM33/DW3K chip and do basic configuration
  4. Start MCPS tasks which will be responsible for handling UWB events
    For the error, I will suggest you to check above items to make sure everything is correct configured. Especially the hardware GPIO pins connected to QM33/DW3K which defined in Projects/DW3_QM33_SDK/FreeRTOS/nRF52840DK/ProjectDefinition/uwb_stack_llhw.cmake

Besides from that, I recommend to try driver examples which included in SDK/Drivers before actually run SDK/Firmware. Because driver examples is fully opensource, it will be easier to debug your hardware and make sure it works in the first place.

1 Like