2008-03-06 08:11 AM
Which libraries are you using
2011-05-17 03:25 AM
Hi Guys,
Which (on chip peripheral) libraries are you using: ST or the ones that came with your compiler, Keil, IAR etc ?2011-05-17 03:25 AM
Arm_Wrestler,
As I'm in ST and moderator of this forum, You should guess my answer :-), However, I think that it depends on your usage. 1) I believe if you would like to go very fast without deep knowledge of STM32 and reading all documents : Keil examples are useful.. ( In 10 minutes you are able to have your example running with some copy/paste for existing ones). 2) ST Library is more exhaustive where most of features and many examples (more than 70 !! :-o) are available. But is not optimized in terms of code size and performance speed which is understandble because all cases are handled in the initialization of the periperals structures. But most important : it is working on all tools and template is available for IAR, Keil, Raisonance ... 3) If you are going to use the libraries for your producton, this is not the best way and in my opinion you should have your own code with more or less some copy paste from ST ones and others... Dear all, Do you have others comments ? or ideas of improvement to add to ST Libraries in order to meet your requirements :p Poll is Open ! Cheers, STOne-322011-05-17 03:25 AM
''or ideas of improvement to add to ST Libraries in order to meet your requirements''
LCD segment software driver would be very nice! [ This message was edited by: obtronix on 06-03-2008 05:01 ]2011-05-17 03:25 AM
I found I/O initialization in all examples not friendly and not applicable in any serious application (yes, easy to apply in examples).
Calling init.port.structure and then add group by group of pins with same functions take lot of code and is not clear. I had similar problem with STR73X family and have made SW something like this: #define LED1 0x0001 ... #define Tx1 0x1000 and then later area with configuration for all pins in one PORT: PORTA ={ AINPUT, PP_OUT, AF_PP... } for all pins. Additional SW (for loop for all pins and all ports) checks all pins and writes right values in config. registers. If I change any pin later I don't have to change register manually. I believe it is question of style but I like to have all pins (names and types) defined in one .h file and then their configuration software in ports.c or IO.c to avoid confusion. As I said it looks like I will have to do this again, but if someone have better idea I would like to hear it. Cheers. P.S Other initialization can be simplified too, with libraries help a lot to make this process much quicker. One just need to be careful to copy and paste right parts, not forgetting important things. Otherwise code will be too big and slow (in that particular STR73x case I had constraints with both size and speed)