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 Sigurd,

    I have read so much and downloaded so much and tried so many things, I decided I will redo my first basic steps to confirm the actual versions before I answer in detail, but now I see after my last DFU I cannot see the device to do a DFU again.  I assume I must now first restore the bootloader.  The instructions from the XM122 Module Software User Guide says:

    "2.4 Restore Bootloader

    A backup copy of the bootloader is delivered as part of the “production sw.hex” file, which also includes Nordic’s softdevice (containing their Bluetooth stack). Bootloader and softdevice has been merged into a single hex file, because as of version 15.3.0 of the Nordic SDK they cannot be flashed separately. To restore an XM122 device to its factory condition, do the following using a J-Link: 1. Download and install “nRF5x Command Line Tools” from www.nordicsemi.com 2. Download and install “J-Link Software and Documentation Pack” from www.segger.com nrfjprog -f nrf52 -- erasepage 0 xFE000 -0 x100000 nrfjprog -f nrf52 -- program production_sw . hex -- sectorerase -- verify nrfjprog -f nrf52 -- reset "

    My 3 questions now are:

    1) Do I need a J-Link device, is this now the only way to communicate with the XB122?

    2) If so, which is the smallest/cheapest version that will get the job done?

    3) If not, what is the alternative way?

    Thanks

    Cheers

    Andreas

  • Hi Andreas:

    AndreasLiebenberg said:
    The instructions from the XM122 Module Software User Guide says:

    If you have questions to the XM122 guides, contact Acconeer.

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

    I did not get the answer to this. Have you ever been able to do DFU on your device?

    AndreasLiebenberg said:

    1) Do I need a J-Link device, is this now the only way to communicate with the XB122?

    2) If so, which is the smallest/cheapest version that will get the job done?

    3) If not, what is the alternative way?

    There are two ways to program a device: Using a Debugger or a Bootloader.

    Here is the top result when I search for "bootloader vs debugger": https://www.playembedded.org/blog/difference-bootloader-debugger/

    I suspect the XB122 came preprogrammed with a bootloader.
    If you programmed it using a debugger, you might have overwritten the bootloader.
    In this case you need to program an application with a bootloader to the chip using a debugger.

    With a bootloader, you no longer need a debugger to program the chip.

    Regards,
    Sigurd Hellesvik

  • Hi Sigurd,

    Thanks, here the answers:

    I take your point on the XM122 User guide and Acconeer, but am I missing something? Are all the steps not referring to your tools?  It starts with "Download and install “nRF5x Command Line Tools” from www.nordicsemi.com" I must say, it is confusing who's tools is who's and who to talk to.  Thanks for the patience!

    I did follow a tutorial https://www.youtube.com/watch?v=JaVWA4c8-2I (not sure if it is the one you are referring to), which instructed me on how to put the bootloader on the device.  This DFU was done successfully.  I did not generate the package with HRM (I do not know what HRM is).  I downloaded a file acc_module_server_dfu_package.zip and deployed that with the command "nrfutil dfu serial -pkg acc_module_server_dfu_package.zip -p COM5"

    This worked.  I deployed a second .zip "nrfutil dfu serial -pkg bluetooth_demo_app_xm122.zip -p COM5"

    This also worked and I could see distance measurements on my phone as the demo should do.

    Regarding the last part of restoring the bootloader.  Their instructions on how I loaded the original with nrfutil does not work again, it just says no response from COM5.  So, I suspect XM/XB122 it is in a vegetable state, I need a "Factory Reset" and a J-Link debugger is the only option?  

    Thanks again

    Cheers

    Andreas

  • Hi Andreas,

    Sorry for the notifications, but I managed to misclick on your answer and "Mark as Solution".

    AndreasLiebenberg said:
    This also worked and I could see distance measurements on my phone as the demo should do.

    Ah, so it worked first, good to know!

    Just to be sure: Have you ever connected a J-Link debugger or other debugger to your XM/XB122?

    Regards,
    Sigurd Hellesvik

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

Related