Control GPIO on MQX side

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

Control GPIO on MQX side

跳至解决方案
1,668 次查看
bfac
NXP Employee
NXP Employee

Hello, we are having trouble to control an GPIO from MQX, having the Linux BSP already running.

Our application first boots Linux kernel, then calls MQX from Linux command line, which means that Linux kernel initialization runs first.

What we need to do is to control an specific GPIO state from MQX, lets say as example PTC31.

When we try to simply do the regular GPIO initialization on MQX, without any change on Linux side, the application does not work.

We think the Linux initialization is taking control of that GPIO somehow, and when MQX tries to use it, it is denied.

When we tried on the same application, to control the same GPIO, but this time using the Linux /sys structure, it worked fine.

What would be the necessary steps to have this working?

Should we necessarily remove this GPIO from the Linux GPIO mapping? (on devices.c and board-twr-vf700.c at .../twr_vf600/kernel-source/linux-3.0/arch/arm/mach-mvf)

Thanks!

Bruno

1 解答
1,313 次查看
juangutierrez
NXP Employee
NXP Employee

I assume you are running linux from A5 and MQX on the M4, right?

If you remove the GPIO from the Linux mapping, does it work?

Do you know at what stage of the GPIO initialization on MQX is failing? I mean when calling lwgpio_init or lwgpio_set_attribute? Or whcih function is failing?

在原帖中查看解决方案

0 项奖励
回复
2 回复数
1,313 次查看
bfac
NXP Employee
NXP Employee

Hello Juan, thanks for the answer!

The issue here was that on the MQX, the pins have a diffenrent nomenclature than in datasheet, we were assuming the incorrect pin was the one we needed, after reviewing the bsp header files, we noticed the mistake and solved the issue.

Thanks!

Bruno

1,314 次查看
juangutierrez
NXP Employee
NXP Employee

I assume you are running linux from A5 and MQX on the M4, right?

If you remove the GPIO from the Linux mapping, does it work?

Do you know at what stage of the GPIO initialization on MQX is failing? I mean when calling lwgpio_init or lwgpio_set_attribute? Or whcih function is failing?

0 项奖励
回复