2008-11-13 08:58 PM
Usage of RCC and NVIC functions in GPIO files
2011-05-17 03:52 AM
Dear All,
can anyone tell me that why RCC and NVIC firmware functions are used in toggling the any bit of any port. I want to make a program which toggles the GPIOF_Pin6, but I found that there are RCC and NVIC functions used in the Firmware Examples files ''Firmware\examples\gpio\IOtoggles'' I need a simple program which just toggle the gpio bits without using RCC and NVIC. Also tell me how I configure GPIO registers, what are the steps? reply. Abdul Basit2011-05-17 03:52 AM
You must enable the GPIO clock in the RCC. NVIC is for interrupts.
Enable the relevent GPIO clock in the RCC. Set the GPIO configuration register (to output, probably push-pull) Toggle the GPIO output data register. There are quite a few threads about this already: http://www.st.com/mcu/forums-cat-7495-23.html (you can search the forum for others) Perhaps we need a how-to-toggle-a-port sticky.