LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-21-2021, 04:42 PM   #1
slcklnx
Member
 
Registered: Jan 2019
Posts: 144

Rep: Reputation: Disabled
STM32F103


Hi my friends ) I have a stm32f103 microcontroller. I need to make a remap PA7 to use TIM1_CH1 instead of TIM3_CH2. what should I turn on and what should I turn off for this ? can you write how to do this?
 
Old 07-21-2021, 05:52 PM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,883
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
Quote:
Originally Posted by slcklnx View Post
I need to make a remap PA7 to use TIM1_CH1 instead of TIM3_CH2. what should I turn on and what should I turn off for this ? can you write how to do this?
It depends which dev environment you've chosen to work with. PIN mapping options are fairly easy, or easy enough to get help on from the various dev environments available.
 
Old 07-21-2021, 06:44 PM   #3
slcklnx
Member
 
Registered: Jan 2019
Posts: 144

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by rtmistler View Post
It depends which dev environment you've chosen to work with. PIN mapping options are fairly easy, or easy enough to get help on from the various dev environments available.
I want to do it "by hand" without IDE

which register bits AFIO_MAPR
to be used?
Help me to understand
 
Old 07-21-2021, 07:35 PM   #4
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,883
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
Quote:
Originally Posted by slcklnx View Post
I want to do it "by hand" without IDE

which register bits AFIO_MAPR
to be used?
Help me to understand
Yes that's the correct register. Bit settings are defined in the reference manual. See also section 9.3.7 in the reference manual, it describes exactly what bits and values to use to remap, but I do not believe the exact remapping you want is available. Recommend reading the reference manual to ensure my interpretation is not flawed.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:06 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration