This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Output data via SWO without debugger ?

Note: This was originally posted on 15th November 2010 at http://forums.arm.com

Hello,

i am using a Cortex-M3 (in my case a TI Stellaris LM3S9B92 Rev B1).
I would like to know, if it is possible to output data via SWO without a debugger ?
Do i need any clocks (via SWD) from outside (normally generated by the debugger) to output data via SWO (UART, not Manchester) ?

I already tried the following from inside Cortex-M3:

In setup:

#define TRCENA       0x01000000

#define DEMCR     (*((volatile unsigned long *)(0xE000EDFC)))
#define TRACE_ENABLE_REGISTER     (*((volatile unsigned long *)(0xE0000E00)))
#define TRACE_CONTROL_REGISTER       (*((volatile unsigned long *)(0xE0000E80)))
#define ASYNC_CLOCK_PRESCALER_REGISTER  (*((volatile unsigned long *)(0xE0040010)))
#define SELECTED_PIN_CONTROL_REGISTER   (*((volatile unsigned long *)(0xE00400F0)))

             DEMCR = DEMCR | TRCENA;

             TRACE_ENABLE_REGISTER = 0xFFFFFFFF;

             TRACE_CONTROL_REGISTER = 0x00000001;

             ASYNC_CLOCK_PRESCALER_REGISTER = 10;

             SELECTED_PIN_CONTROL_REGISTER = 0x00000002;

In main loop:

   if (DEMCR & TRCENA)
   {
     while (ITM_Port32(0) == 0);
     ITM_Port8(0) = 0x41;
   }


But i don't see any activity on SWO, nor is the line switched to output at all...

Best regards,

Martin
Parents
  • Note: This was originally posted on 18th November 2010 at http://forums.arm.com

    Hi Martin,

    Thanks for the update and information, and glad to know that you are making progress.

    From memory the Cortex-M3 has additional packets (for DWT) and the protocol details are documented in the ARMv7-M Architecture Referenence Manual.
    (ARM DDI 0403).  Please note that the ARMv7-M Application Level Architecture Referenence Manual (ARM DDI 0405) does not include this information.
    You'll need to register on ARM website to get this docment.

    regards,
    Joseph
Reply
  • Note: This was originally posted on 18th November 2010 at http://forums.arm.com

    Hi Martin,

    Thanks for the update and information, and glad to know that you are making progress.

    From memory the Cortex-M3 has additional packets (for DWT) and the protocol details are documented in the ARMv7-M Architecture Referenence Manual.
    (ARM DDI 0403).  Please note that the ARMv7-M Application Level Architecture Referenence Manual (ARM DDI 0405) does not include this information.
    You'll need to register on ARM website to get this docment.

    regards,
    Joseph
Children
No data