gpio_cpu_configure - override defaults?

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

gpio_cpu_configure - override defaults?

跳至解决方案
785 次查看
w2vy
Contributor V

 gpio_cpu_configure is called often to update the pin configurations.

 

One problem.

 

It assumes GPIO or Alternate Function 2 for most (well I care about PORT TC) functions.

 

How do you select a different non-GPIO function?

 

If the pin usage is generally GPIO or non-GPIO maybe the BSP should add a table to define the Alt function.

Or is there a clean up function that can be called after gpio_cpu_configure() to fix the 'errors' induced?

 

I am using DTIM0 as a clock output... searching ther code I do not see anything in MQX that uses any of the DTIM registers

 

tom

0 项奖励
1 解答
317 次查看
w2vy
Contributor V

Ok after digging deeper I see that the code I was looking at leaves the bits alone that are not assigned as GPIO.

 

I just set the PAR bits and all is well.

在原帖中查看解决方案

0 项奖励
1 回复
318 次查看
w2vy
Contributor V

Ok after digging deeper I see that the code I was looking at leaves the bits alone that are not assigned as GPIO.

 

I just set the PAR bits and all is well.

0 项奖励