[SOLVED] SAME70 XPLD board and SWV

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [SOLVED] SAME70 XPLD board and SWV

    Dear all,

    I tried to use SWV on a SAME70 board together with JLINK. I start using a Keil MDK project. However, that doesn't work like it was expected. I reached the point where I can see the pin toggling on the SWO pin with respect to my printf commands and at least the timing seems to be OK (not so easy to measure on a 300MHz device). But nothing gets displayed in the corresponding Keil MDK window. Same happens if I try the same example with SES. My printf's get displayed in the 'Debug Terminal' Terminal. However, nothing get's displayed in JLINK SWO Viewer Tool. So I'm not surprised that Keil MDK was not able to show something.
    Anyone gets the SWO output working on a SAME70 XPLD board or better what do I need to do get the output redirected to the SWO Viewer?

    Best Regards
  • Hello Markus,

    Thank you for your inquiry.
    We were able to reproduce the issue with SWO and the SAME70 target device.
    The problem is related to different SWO clock speeds standards. Usually maximum SWO speed equals the CPU clock speed. With such fast devices this is usually not the case as 300 MHz over a single pin is quite difficult to achieve.
    So the SAME70 device uses some other peripheral clock or similar as base clock for SWO. J-Link assumes though it is the CPU clock (as it is specified in the Cortex-M specification).
    This obviously does not work.
    For this reason we implemented the JLinkScript function GetSWOBaseClock() which allows you to set the actual SWO base clock instead.
    More information about this can be found in the J-Link User Manual.

    Unfortunately the SAME70 device manual is not well documented in that regard and it is not quite clear how fast the SWO base clock is.
    We suggest to get into contact with Microchip in that regard as we do not have any information about that either.

    So once you set the "real" SWO base clock everything should work as expected.

    Alternatively you could simply use RTT: segger.com/products/debug-prob…about-real-time-transfer/
    This enables you the same printf features of the SWO pin but without the need of a actual hardware pin. RTT data can be made visible by using the RTTViewer instead of the SWOViewer.
    Keep in mind though that each RTT channel can only be "grabbed" by one logger at a time. So you can display it either in the Embedded Studio debug terminal or in the RTTViewer. Not in both at the same time.

    The Embedded Studio project you tried, did it have RTT sources included?
    If yes that this is the reason why you could see the prinf output in the debug terminal.
    If not then Embedded Studio defaults to semihosting (very slow) which can't be logged in an external tool currently.

    Best regards,
    Please read the forum rules before posting: Forum Rules

    Keep in mind, this is not a support forum. Its main purpose is user to user interaction.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.