About the use of AFR0 and AFR1 of STM8

Publisher:快乐舞蹈Latest update time:2021-11-01 Source: eefocusKeywords:STM8 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

The chip manual states that AFR0 and AFR1 cannot be used at the same time

134920qx10cva7kveb0t50.jpg

AFR1 Alternate function remapping option 1 (2)
0: AFR1 remapping option inactive: default alternate function(1);
1: Port A3 alternate function = SPI_NSS; port D2 alternate function =TIM2_CH3.

AFR0 Alternate function remapping option 0(2)
0: AFR0 remapping option inactive: Default alternate functions(1);
1: Port C5 alternate function = TIM2_CH1; port C6 alternate function =TIM1_CH1; port C7 alternate function = TIM1_CH2.

1. Refer to the pinout description.
2. Do not use more than one remapping option in the same port. It is forbidden to enable both AFR1 and AFR0.

In fact, there is no problem in testing simultaneous use, just pay attention to the ports.

In addition, ST-LINK-->option bytes in IAR also need to be configured accordingly. The figure shows that AFR0 is configured.

The official STVP is also configured during burning.


Keywords:STM8 Reference address:About the use of AFR0 and AFR1 of STM8

Previous article:IAR EW for STM8 3.11.1 Chinese package Chinese tutorial
Next article:Common problems and solutions for STM8 microcontrollers

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号