cancel
Showing results for 
Search instead for 
Did you mean: 

How to configure unused IO pins and ext memory pins ?

johanpauvert1
Associate II
Posted on January 22, 2003 at 05:48

How to configure unused IO pins and ext memory pins ?

3 REPLIES 3
johanpauvert1
Associate II
Posted on May 17, 2011 at 11:32

Is there any recommendation regarding unused ST9+ pins, IOs and external memory pins ?

Breizh

Posted on May 17, 2011 at 11:32

This is what I would recommend :

- Pin with I/O port

The unused I/O port could be configure in output open-drain and the user should output a zero (Data Register = 0). The pin should then be

connected directly to the ground. This configuration will involve a low consumption and it is good for EMC optimization as well since the free pin will be used as an additional short cut of the noise to the external GND.

Low consumption and EMC optimization would have also been obtained with an IO pin set-up as output push pull with a high level . However, this configuration is not recommended because this may damage the emulator when debugging code . This may happen when

the user's application is power-up and the emulator is shut down : in this case, the user's application will inject some current on the

emulator's I/O pin through its IO clamping diodes. Since this current is not limitated, you may burn several I/O pins.

In the case of a very noisy environment or a bug in the user's firmware, some of the IO configuration registers may be affected. So, if noise or software forces this IO port to go from an open drain low level configuration to output push pull high level then you may have a short cut.

To avoid any damage, it is better to add a serial 10K Ohm resistor between the unconnected pin and the GND.

This second proposal is a little bit more price (extra resistor) than the previous one but safer. Choose the one that will best fit your application.

- AS, DS, R/W

If you don't need to address any external memory, then AS, DS and R/W are useless.

So set the HIMP bit (bit 0) of the MODER register to guaranty those pins are in high impedance and to avoid any noise transmission.

Those pins can be connected directly to Vdd.

Those pins can also be connected to Vdd through a 10k pull-up resistor in order to avoid any short cut : in case of a bad firmware or due to

a noisy environment, the HIMP bit of the MODER register may be cleared, the PC may be lost, access to an external memory address may

happen so a low level can be output on those pins. The resitor will avoid the short-cut.

I hope this will help

Jojo

romain2399
Associate II
Posted on May 17, 2011 at 11:32

From the EMC/EMI specialists point of view the best is to configure the unused I/O port pins in output push-pull with Data Register = 0, when this mode is available. In this case there is no need for an external pull-down as the I/O is already connected to the ground internaly by the data=0 choice.

For I/O with push-pull mode not available, the open-drain output mode data=0 is a good alternative, and you do not need an external pull-down because, even in open-drain, the pin is connected to the ground throw a MOSN transistor (as data=0).

Concerning AS and DS pins, they are by default internaly connected to a weak pull-up, so I do not see why you should use also an external pull-up.

Nevertheless this is a difficult subject, these general rules may not be the best choice for one specific application, EMC/EMI tests should be performed.

In additition, some company (Murata for example) provide to their customers the possibility to make some test in their lab. to optimize the filter choices.

[ This message was edited by: Romain on 22-01-2003 11:36 ]