[En-Nut-Discussion] STM32 GPIO BSRR
Uwe Bonnes
bon at elektron.ikp.physik.tu-darmstadt.de
Thu Apr 21 12:14:11 CEST 2016
>>>>> "Holger" == Holger Mai <mai at gemac.info> writes:
Holger> for my sources i use often the BSRRH and BSRRL registers in
Holger> GPIO_Typedef. They based on BSRR (32bit), but if splitted in
Holger> BSRRH and BSRRL, setting/resetting bits is simpler than on BSRR,
Holger> because can use the same bitmask for set/reset, without any
Holger> shifting. However, i found that some headerfiles from ST has
Holger> BSRR in GPIO_TypeDef, some other has BSRRH and BSRRL. And there
Holger> are files for the same MCU with different GPIO_TypeDef's. For
Holger> me, i find it a good idea, to work with one or other access, so
Holger> as i need it. To realise this, the MCU decription files
Holger> (i.e. STM32F756xx.h) has to be edited:
Did you have a look at the macros in include/dev/gpio.h :
GpioPortSetHigh(), GpioPortSetLow(), GpioPinSetHigh() and GpioPinSetLow()?
They should handle BRR vs. BSSR vs. BSSRH and BSSRL.
Otherwise for a change in the vendor headers, try to talk to STM perhaps in
the "STM32 Software Tools and Firmware" forum.
>From my side, I want as few change to the vendor headers as possible.
Cheers
--
Uwe Bonnes bon at elektron.ikp.physik.tu-darmstadt.de
Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt
--------- Tel. 06151 1623569 ------- Fax. 06151 1623305 ---------
More information about the En-Nut-Discussion
mailing list