cancel
Showing results for 
Search instead for 
Did you mean: 

relationship between the ports and pins PA0..7, PB0..7,.. of chip

omatza
Associate II
Posted on November 09, 2005 at 08:34

relationship between the ports and pins PA0..7, PB0..7,.. of chip

3 REPLIES 3
omatza
Associate II
Posted on May 17, 2011 at 10:19

Hello

I use ST7FMC2.

We have to choose a packadge. (44, 64,80 pins)

1. Is there a relationship between the pin name PA0,.. to data register Port A ?

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 ?)

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 ?

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 ?

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 ?

Do I have to set also the in/out direction also if the pin use for PWM and not for PA5 for example ?

Can you help ?

Thanks a lot

Oren

gaetano
Associate II
Posted on May 17, 2011 at 10:19

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

omatza
Associate II
Posted on May 17, 2011 at 10:19

Hello Tanio

Thanks for your excellent (!) answer.

Yours

Oren