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

Parents
  • 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

  • No, I do not have a J-Link, I was hoping there might be another solution...

  • Hi Andreas,

    If you have not used a J-Link yet, I think the bootloader should still be present on the device, since the bootloader should not be able to overwrite itself.

    To do DFU over Bluetooth Low Energy (LE), as the tutorial explains, you need to have Bluetooth LE supported when in DFU mode.

    Do you know if the last firmware you uploaded to the device has support for sending firmware over Bluetooth LE? (Also known as Firmware Over the Air (FOTA)

    Do you know if the Bootloader has support for Bluetooth LE  (Not in the application, but in the bootloader?

    Regards,
    Sigurd Hellesvik

  • Oops, I managed the same, I also pressed Verify instead of reply, hope you can see this reply and reopen.

    I am not 100% sure, but I did use my Android phone and nRF Util to DFU the device, so I assume the bootloader has BLE capabilities.  But I have tried that again, and currently cannot see the device in nRF Util on my Andoid, hence I assume it has been overwritten with my last DFU

    Cheers

    Andreas

  • Hi,

    Can you send the last zip file you uploaded to the device before it stopped working?

    Last time you uploaded firmware to the device, did you use serial(cable) or Bluetooth(mobile)?

    Regards,
    Sigurd Hellesvik

Reply Children
Related