This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Using printf with ITM

I would like to use printf using ITM for debugging my application using a BL652  module (nRf52832).

I have followed the instructions in the Keil paper APNT_308. Printf is working fine when I execute the code on the PCA10040 board, but when I connect my target HW to the Debug Out connector the printf does not work. I can execute code and debug on the target, but the ITM will not work. There is signal on the P0-18 when measuring on the connector, but no message in the Debug (printf) Viewer.

Can any give a hint where to look for the bug?

Parents
  • Hi,

    There was a bug in segger's firmware where it listened on the wrong SWO pin in DEBUG_OUT mode and therefore did not route the SWO signal correctly, and this was fixed in v6.22f.

    Could you try a newer Segger JLink Driver and see if this works better? Remember that when prompted to upgrade firmware, press "yes".

    I've had issues with getting SWO print to work in Keil myself, but it normally works if I open up a JLink Commander and input "swoview <freq in hz>" (normally 4 MHz). Could you try this and see if that prints anything?

    Cheers,

    Håkon

Reply
  • Hi,

    There was a bug in segger's firmware where it listened on the wrong SWO pin in DEBUG_OUT mode and therefore did not route the SWO signal correctly, and this was fixed in v6.22f.

    Could you try a newer Segger JLink Driver and see if this works better? Remember that when prompted to upgrade firmware, press "yes".

    I've had issues with getting SWO print to work in Keil myself, but it normally works if I open up a JLink Commander and input "swoview <freq in hz>" (normally 4 MHz). Could you try this and see if that prints anything?

    Cheers,

    Håkon

Children
Related