/var/www/restricted/ssh/stm32/www/stm32circle/ STM CircleOS forum / Save Power Consumption and EMC

Username:     
Password:     
             

Forum

# 1   2011-03-14 22:52:35 Save Power Consumption and EMC

primagen
Member
Registered: 2010-12-07
Posts: 13

Save Power Consumption and EMC

In Examples GPIO\IOToggle this is given.

/* Configure all unused GPIO port pins in Analog Input mode (floating input
     trigger OFF), this will reduce the power consumption and increase the device
     immunity against EMI/EMC *************************************************/
  RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA | RCC_APB2Periph_GPIOB |
                         RCC_APB2Periph_GPIOC | RCC_APB2Periph_GPIOD |
                         RCC_APB2Periph_GPIOE, ENABLE);

  GPIO_InitStructure.GPIO_Pin = GPIO_Pin_All;
  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AIN;
  GPIO_Init(GPIOA, &GPIO_InitStructure);
  GPIO_Init(GPIOB, &GPIO_InitStructure);
  GPIO_Init(GPIOC, &GPIO_InitStructure);
  GPIO_Init(GPIOD, &GPIO_InitStructure);
  GPIO_Init(GPIOE, &GPIO_InitStructure);

  RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA | RCC_APB2Periph_GPIOB |
                         RCC_APB2Periph_GPIOC | RCC_APB2Periph_GPIOD |
                         RCC_APB2Periph_GPIOE, DISABLE); 

I dont test it. Can anyone Explain this if its true??

Offline

 

# 2   2011-03-16 19:28:35 Save Power Consumption and EMC

atitude
Member
From: USA
Registered: 2010-12-18
Posts: 30
Website

Re: Save Power Consumption and EMC

Switching IO pins to explicit input is not expected to save power consumption. Only under certain condition would an IO pin set as output consumer energy:
- it is connected to a resistive load
- it is connected to a capacitive load, and the signal changes value frequently
Neither of these conditions apply commonly in a well designed system. If it does, program accordingly.

Setting IO pins as inputs does not improve EMI. In case your device is the aggressor (i.e. the device causing the interference), EMI occurs when you have fast switching outputs driving loads with certain antenna like properties (a wire being an antenna). On an unused IO pin you normally do not have a fast switching output, nor is it commonly wired on the PCB.

Neither does setting the IO pins as an input improve the EMC characteristics of a device (i.e. your device is the victim). EMC of the device is guaranteed by the physical properties of the chips' IO function.

EMC/EMI are more commonly issues one needs to address when designing (high frequency) PCBs.

Switching your unused IOs to inputs also doesn't hurt anything normally... Unless you cause an IO pin to float at an undefined value: that's potentially bad for power consumption.

Lowest power consumption can usually be expected by driving unused IOs as outputs to a defined, static, state, and having no resistive paths. Best EMC/EMI is achieved by using a well designed PCB. Unless you want to go into space, then you need a bit more...

Last edited by atitude (2011-03-16 19:30:33)

Offline

 

Board footer