MPC8313e GPIOs

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

MPC8313e GPIOs

跳至解决方案
2,545 次查看
medina
Contributor III
  I am trying to use the MPC8313e GPIOs . I toggle them from CodeWarrior. I have verified that the way of accessing the registers is the right one and I have been able to change the registers of other peripherals.

On the other hand I always read '0 ' from the GPIO data register even some GPIOs having pull-up. I configure them as output and try to toggle them writing in its respective register  but do not toggle, I check this by hardware (scope) and by software.

Does anyone have any idea?

Regards,
0 项奖励
回复
1 解答
1,239 次查看
abartky
Contributor IV

Medina,

 

Here's a thing to check if you haven't already done so.

 

All the GPIO 0-31 functions are multiplexed so you do have to make sure the pin isn't being used for another function.

 

Here are some excertps from the MPC8313 Engineering Reference Manual Rev. 1 07/2007 that may help

 

From section: 3.4 External Signal Description

From Table 3-6 External Signals—Detailed Signal Descriptions

Signal I/O Description: CFG_LBIU_MUX_EN (LA[0:15]/GPIO)

 

Pin type: Input Meaning:

 

Asserted—GPIO ports function according to the values in their configuration registers (this may be LBC or non-LBC functionality).

 

Negated—GPIO ports function as LA[0:15] irrespective of the value in their configuration registers.

 

Also see, 5.3.2.5 System I/O Configuration Register Low (SICRL). Bits 2-13 control if GPIO is enabled or other functions, see table in spec.  The reset values of this register typically default to GPIO, but there may be software and/or board init that is setting this register to enable an alternate function rather than the GPIO you are trying to use.  This register is read/write, so you can check it's current value by reading it.

 

Hope this helps :smileyhappy:

 

- abartky

在原帖中查看解决方案

0 项奖励
回复
2 回复数
1,240 次查看
abartky
Contributor IV

Medina,

 

Here's a thing to check if you haven't already done so.

 

All the GPIO 0-31 functions are multiplexed so you do have to make sure the pin isn't being used for another function.

 

Here are some excertps from the MPC8313 Engineering Reference Manual Rev. 1 07/2007 that may help

 

From section: 3.4 External Signal Description

From Table 3-6 External Signals—Detailed Signal Descriptions

Signal I/O Description: CFG_LBIU_MUX_EN (LA[0:15]/GPIO)

 

Pin type: Input Meaning:

 

Asserted—GPIO ports function according to the values in their configuration registers (this may be LBC or non-LBC functionality).

 

Negated—GPIO ports function as LA[0:15] irrespective of the value in their configuration registers.

 

Also see, 5.3.2.5 System I/O Configuration Register Low (SICRL). Bits 2-13 control if GPIO is enabled or other functions, see table in spec.  The reset values of this register typically default to GPIO, but there may be software and/or board init that is setting this register to enable an alternate function rather than the GPIO you are trying to use.  This register is read/write, so you can check it's current value by reading it.

 

Hope this helps :smileyhappy:

 

- abartky

0 项奖励
回复
1,239 次查看
medina
Contributor III
Thank you very much abartky. That was the solution.

Regards.

0 项奖励
回复