2011-08-04 03:41 AM
Hello there...
My aim is, I need to be able to configure ports of stm32.
Is there an utility/software in order to configure GPIO of it?
Any help, feedback will be so helpful!..
2011-08-05 04:19 AM
Hello,
you can download STM32 fw library. In the examples you can see how to configure GPIOs for different configuration. Is it the right answer for your question?2011-08-05 05:55 AM
The inference here is a desire for a utility the allows you to select peripherals or combinations of them and have it fit and spit out the GPIO configuration code for the desired STM32 part, if I'm not mistaken.
I recall someone posting a nice excel sheet a while back, but I don't know if it survived the meltdown of the forum.2011-08-05 06:01 AM
It's much easier to read the reference manual (RM0008). In section 8.2.1 p157 you can find a good description of how it's done.
Don't forget to enable the clocks (RCC section) for the ports first! It's basically one nibble for each port pin: 0x0000 analog in 0x0001 GP out PP 10MHz 0x0010 GP out PP 2MHz 0x0011 GP out PP 50MHz 0x0100 floating in 0x0101 GP out OD 10MHz 0x0110 GP out OD 2MHz 0x0111 GP out OD 50MHz 0x1000 in with PU/PD 0x1001 AF out PP 10MHz 0x1010 AF out PP 2MHz 0x1011 AF out PP 50MHz 0x1100 reserved 0x1101 AF out OD 10MHz 0x1110 AF out OD 2MHz 0x1111 AF out OD 50MHz GP: general purpose AF: alternate function PU: pull-up PD: pull-down PP: push-pull OD: open-drain2011-08-05 07:26 AM
Have you seen this?
The last time I used it, it only supported the stm32f105/7 and stm32f205/7. Perhaps it has been updated, or maybe you are using one of those. In either case, that should help. Of course you will learn more if you dig through the documentation, though that isn't always enjoyable. I remember using a tool called DAVE when we worked with Infineon parts... It would actually generate drivers, which was nice (when they worked).2011-08-05 04:52 PM
The spreadsheet is over in the VLDiscovery forum. I've updated it a few times.
It only covers the 64 pin package, but I could rework it for other packages if there was interest. It should be pretty easy since the pinouts are so similar. We have only designed with the 36, 48 and 64 pin packages. Picking a pin assignment that allows changing between them with minimal layout changes is easy with the right chart. From experience I can say that the most important thing is avoiding the errata.