Control GPIO on MQX side

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Control GPIO on MQX side

Jump to solution
876 Views
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 Solution
521 Views
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?

View solution in original post

0 Kudos
2 Replies
521 Views
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

522 Views
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 Kudos