What's this?

Go To Last Post
8 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Anything useful?  I don't see any mention of it in my AU manual.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It's exactly what it says and you don't need (or want) to mess with it.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

That clears that up, but how do you know I don't want to mess with it?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Obsessive compulsive disorder perhaps...

 

Ross McKenzie ValuSoft Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You don't mess with it yourself - you use a debug adaptor such as the EDBG on Xplained-Pro boards, or an ARV ICE type thing...

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

how do you know I don't want to mess with it?

Well you can if you are very clever, which no doubt you are. wink But unless you are absolutely sure of what you are doing, don't do it.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

js wrote:
Well you can if you are very clever, which no doubt you are.
If I was clever I could get you to poke some 1 bits in those registers and tell me what happened.smiley

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The plan / promise given in the AVR datasheets always was that you'd be able to have your code running on the AVR write to the OCDR register and the value would be reported (via the debugger link) in Studio. This gave you a way to tag the code with 0x00..0x7F reference points so that, for example, if Studio reported "hit 0x4E" then you'd know it had made it into that sort() routine where you output the 0x4E code and so on.

 

In all my time using AVRs I have NEVER got this mechanism to work. Perhaps it did once but I guess it was before my time?

 

In this day and age when using Cortex chips you can usually get a version of newlib to link your C code with so it can "printf("entering sort()")" and that message comes out on the debug console. But AVRs are not this advanced and the only option is, in theory, this 0x00..0x7F code you should be able to send from the AVR but I've never seen Studio report it happening.

 

Now having said all that I imagine everyone here who's used Studio, a JTAG and an AVR at some time has seen Studio produce a message about "OCDR code 0xFF"? You get that when the JTAG cable is loose or too long or there's some other problem. So it seems that Studio does have the ability to report OCDR activity - it just doesn't ever do it when you WANT it to!!