Hi All. What will happen if try to toggle pin with alternate function. Controller will ignore this command?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-04-14 5:47 AM
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-04-14 6:53 AM
If the pin is in SPI mode, trying to toggle it will not affect SPI communication. But if it's initialized as GPIO last, then clearly SPI mode won't work.
Unclear what "code written earlier" means exactly. Surely you can edit code to do what you want instead of what it did before. The order in which code is executed is going to affect things.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-04-14 5:54 AM
GPIO->ODR​ or BSRR ain't going to work if that's their question. The AF mux will determine who owns control
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-04-14 6:09 AM
If a pin is in AF mode, the peripheral controls the pin state (input vs output) as well as its output state. ODR/BSRR is ignored in this case.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-04-14 6:11 AM
Thank You for response. I have activated SPI1 in f401re(nucleo board), but in code written earlier SCK was common GPIO, connected with LED, and this part of code wasn't commented. May it affect SPI functionality?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-04-14 6:16 AM
Thank You for answers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-04-14 6:53 AM
If the pin is in SPI mode, trying to toggle it will not affect SPI communication. But if it's initialized as GPIO last, then clearly SPI mode won't work.
Unclear what "code written earlier" means exactly. Surely you can edit code to do what you want instead of what it did before. The order in which code is executed is going to affect things.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-04-14 6:54 AM
If your code control LED ODR/BSRR no , but if you activate other AF as PWM then SPI AF will ovrride...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-04-17 9:54 PM
Thank You!
