XM122 XB122 prototyping

Hi new to this, so excuse the elementary question

Can I put custom software on a XM122 using the XB122 dev kit?
This is the only hardware I have, is nRFUtil my only option to push software to the XM122?  Seems like the other tools need different dev boards or debugger interfaces.
If so, what is the best tool to build new hex files on a Windows platform, and some pointer to a sample of doing this?

Thanks

Cheers

Andreas

  • Hi there,

    Can I put custom software on a XM122 using the XB122 dev kit?

    This is an external third party module, but as far as I can see it has a nRF52840 which has a SWD debug interface that can be used to flash fw. I'm not sure if the devkit you're referring to has an on board debugger that can be used to flash external boards (It doesn't look like it). Either way, you could use a stand alone J-link debugger from SEGGER to flash the XM122 as long the SWD interface has been routed out. 

    regards
    Jared

  • Hi Jared,

    Thanks for the prompt reply, I made some progress, but stuck again.  After lots of reading and downloading, I have now picked all the tools to be used, and all steps working, except the actual DFU flashing (which now also works, but BLE not advertising).

    Toolset:

    SEGGER Embedded Studio for ARM Release 6.34a Build 2022083102.51023 Windows x64

    Python 3.7

    nrfutil - latest version 6.1.6

    mergehex - latest version 10.17.3

    nRF5_SDK_15.3.0_59ac345

    Sample App acconeer_xm122_v2_11_0.zip

    Sample project segger_embedded_studio.emProject

    The project compiles after fixing the issue as explained in  undefined reference to `__RAM1_segment_end__' 

    I changed the link settings to add a .hex file as output, also seems successful

    I thengenerated the settings.hex with:

    nrfutil settings generate --family NRF52 --application acc_bluetooth_beacon.hex --application-version 1 --bootloader-version 2 --bl-settings-version 1 settings.hex

    Then merged settings with app with:

    mergehex -m acc_bluetooth_beacon.hex settings.hex -o merged.hex

    Then added what seems to be the appropriate softdevice with:

    mergehex -m merged.hex s140_nrf52_6.1.1_softdevice.hex -o merged_output.hex

    Then generated the deployment package with:

    nrfutil pkg generate --hw-version 52 --application-version 1 --application merged_output.hex --sd-req 0xB6 --sd-id 0xB6 app_dfu_package.zip

    All seems fine.  But when I try to deploy package to XM122 via XB122 and nRF Toolbox DFU app, the process fails after Bootloader Enabled - ok

    Initializing DFU - fail

    Ok, now for the catch, I was repeating these steps as I was typing and this time it worked, no fail on DFU Init.  BUT when I reset the XB-/XM122 I do not see any BLE advertisements as expected, I do not even see the device.

    Any advice on how to debug this will be appreciated.

    Thanks

    Cheers

    Andreas

  • Hi there,

    Let's simplify this a bit by starting with an easier example.

    Can you try to do a DFU with your device and phone by following all the steps until D in this tutorial. If this works then we could conclude that your HW is probably ok.

    regards

    Jared

  • Hi Jared,

    Already did that, I flashed the DFU with the standard DFU package and looked at the explorer data via Python App.  

    I then also put the Distance Demo on and can see that running from an Android App.  

    So the device is working, and how I update seems to be working.

    What I am trying to do is to create my own package to update.  I have not modified the sample other than the two items mentioned (Version fix on the RAM vs RAM1) and adding .hex as additional output to the linker.

    The demo App is almost exactly what I need, just distance info in the BLE advertising header.

    Any ideas?

    Thanks!

    Cheers

    Andreas

  • Hi,

    Which Python application and distance demo are you referring too?

    Just to be clear, you have already followed the tutorial and generated the package with hrm and performed a DFU successfully?

    Regards,
    Sigurd Hellesvik

Related