cancel
Showing results for 
Search instead for 
Did you mean: 

Does anyone actually use the register names to program?

aerospacengineer
Associate II
Posted on September 20, 2013 at 03:12

That may seem like a bit of a pretentious question, but it is not intended to be so.  I am new to STM32 products, coming from PIC and dsPIC devices.  There are some changes that I am wrapping my head around, though nothing too bad. 

I have noticed that there is a tendency to not use the actual register names to set a value, but to use the structs and the defines in the header files to accomplish the programming.  This is not bad per say, though I really dislike digging through header files as documentation.  I like to be able to use a datasheet/addendum to have all the registers and then setting a value in that register.

Perhaps I am just missing something.  I would really love to hear some thoughts on this.  Perhaps there is other documentation that I am missing.  Thanks again.  I am looking forward to getting beyond the blinking lights and really using this device for something useful.

Adam
15 REPLIES 15
Posted on September 20, 2013 at 17:10

Documentation is hard to pitch, and API stuff is criminally dull stuff to read or write, and often written by the wrong people. The library code and peripheral function is best approached by looking at the source/comments, and having sufficiently rich examples. Different people need different things.

Beyond the register level descriptions there is also the nuanced behaviour and ordering issues. I'd rather chat with the silicon and software engineers, than the technical writers.

What I've tried to do here is a ''Cook Book'' approach, where the ''how do I do this'' type questions are roughed out in library code. With enough clear and concise examples it's relatively straight forward to fashion other solutions.

I use register level code when I need too, I just have zero interest debugging it for others, for free.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
John F.
Senior
Posted on September 21, 2013 at 21:12

''there is a CHM file, but on the two computers I tried this does not work''. Was the chm file on your local hard drive? I think they won't work over a network - it's a windows thing. It's worth making it work.

aerospacengineer
Associate II
Posted on September 21, 2013 at 22:18

John,

Yes it was on my local drive.  I will mess with it some more to see if I can get it to work.

jpeacock2399
Associate II
Posted on September 21, 2013 at 23:02

CHM files are normally blocked when copied.  Right click on the file, there's a button to unblock it.

  Jack Peacock
dthedens23
Associate II
Posted on September 23, 2013 at 16:32

Yea, and there are some interesting behaviors with CHM files in Win 8.

They open but show no content.

copy them to your user/Documents and they may work. 

aerospacengineer
Associate II
Posted on September 25, 2013 at 23:53

That did the trick.  This is the first time that I had do every deal with this.  I have used quite a few CHM files, but now I can read the contents of the file.  For reference, though, these are two Win7 boxes that I had trouble with.  The file would open and show the titles of the contents available, but would not actually display the content itself.

Adam