Good day. Question about STM32L051C8 and PA11-PA12 ports.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-12-23 4:32 AM
Good day. I use STM32L051C8. And I have a problem with GPIOs PA11 and PA12 in push-pull mode. When I trying set signal in 1, it up on short time and drop back. Other ports works perfect, but I can't understand what with these.
#stm32l0- Labels:
-
STM32L0 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-12-23 5:13 AM
The datasheet does show that PA11 and PA12 are typical GPIO:
PA11 = SPI1_MISO, EVENTOUT, USART1_CTS, COMP1_OUT
PA12 = SPI1_MOSI, EVENTOUT, USART1_RTS_DE, COMP2_OUT
Use debugger to look at your code. After tuning on the PA11 and PA12 ports, put a breakpoint to stop all SW (including interrupt). Then check with oscilloscope or multimeter what happen to the pin.
With so little info, there are many possibilities in mis-managing GPIOs.
The most popular mistakes are:
- The same GPIO are used by 2 different functions, sometime one of them is an interrupt based function
- Using GPIO DR directly instead of using the BSSR register (bit set or bit reset)
- Wrong GPIO pointer useage or activation of an alternate function in some other part of the code
Good luck in your debug!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-12-23 5:59 AM
You'll need to review the pins in the context of your design, if you have things attached to them, or if they are shorted to each other, or other pins.
Up vote any posts that you find helpful, it shows what's working..
