Ciao Omatza,
请花点时间阅读问题的答案:
1.引脚名称PA0,..与数据寄存器端口A之间是否存在关系?
答:
端口A数据寄存器称为“PADR”,PADR [7:0]分别与引脚PA7,... PA0相关。
2.我看到64和80引脚之间的差异是引脚PH0-7,PG0-7。 44到64之间有什么增加?
(我看到44针中有PA3,PA5,但没有PA0,1,2,4,6,7。可以吗?)
回答:
是的,它可以。数据表中的内容是您可以在ST7FMC设备产品上检索的正确信息。
3.如何在特定引脚的不同功能之间进行选择?
例如,在64引脚中,引脚PA5也是ARTIC1和AIN1,所以如果我不使用PWM-ART和ADC那么PA5是免费的吗?
回答:
只要相关外设使能(ART,ADC,......),就会验证引脚的备用功能
在您的示例中,PA5是免费的,因为数字I / O都禁用了外设。
4.如果上面的答案是肯定的,那么因为每个Px0..Px7与备用功能相结合,而对于电机控制,我们使用PWM,MTC,ADC,然后没有GPIO保持空闲。不是吗?
回答:
电机控制操作不需要附加PWM(定时器A和定时器B)。在这种情况下,您可以使用PORT D引脚,即ADC未使用的引脚。
5.所以正确的工作方式是坐在平底锅和纸上,标记我使用的所有引脚,看看剩下的是什么,然后才设置PDDR,POR寄存器?
回答:
对,就是这样。
最好的祝福,
Tanio
以上来自于谷歌翻译
以下为原文
Ciao Omatza,
please, take your time for reading the answers to your questions:
1. Is there a relationship between the pin name PA0,.. to data register Port A ?
Ans:
The Port A data register is called 'PADR' and PADR[7:0] is related on pins PA7,..PA0 respectively.
2. I saw that the different between 64 and 80 pins is pins PH0-7, PG0-7. What is the additions between 44 to 64 ?
(I saw that there is PA3,PA5 in the 44 pins, but there isn't PA0,1,2,4,6,7. Can it be ?)
Ans.:
Yes, it can. What is written in the datasheet is the correct info you can retrieve on ST7FMC device product.
3. How do I choose between different functions of a specific pin ?
for example in 64 pins, pin PA5 is also ARTIC1 and AIN1, so if I don't use the PWM-ART and the ADC then PA5 is free ?
Ans.:
The alternate function for a pin is validated as soon as the relative peripheral is enabled (ART, ADC,...)
In your example, PA5 is free as digital I/O is both peripherals are disabled.
4.if the answer above is yes, then because each Px0..Px7 is combined with alternate function, and for motor control we use PWM, MTC, ADC, then no GPIO left free. Isn't it ?
Ans.:
Additional PWM (Timer A and Timer B) is not necessary for Motor Control operations. In that case you can use PORT D pins, the ones not used by ADC.
5. So the correct way to work is to sit with pan and paper, mark all the pin that I use, see what left, and only then set the PDDR, POR registers ?
Ans.:
Yes, exactly.
Best regards,
Tanio