Skip to content

Conversation

@agansari
Copy link
Contributor

@agansari agansari commented Jun 4, 2019

LPC54xxx and LPC55xxx GPIO interrupts enables.
PINT and INPUTMUX devices enabled to route interrupt signal from pin to NVIC.

Tested with GPIO driver sample.

Fixes #16167

@agansari agansari requested a review from MaureenHelm as a code owner June 4, 2019 06:19
@zephyrbot
Copy link

zephyrbot commented Jun 4, 2019

Found the following issues, please fix and resubmit:

License issues

In most cases you do not need to do anything here, especially if the files
reported below are going into ext/ and if license was approved for inclusion
into ext/ already. Fix any missing license/copyright issues. The license
exception if a JFYI for the maintainers and can be overriden when merging the
pull request.

  • ext/hal/nxp/mcux/devices/LPC54114/fsl_pint.c is not apache-2.0 licensed: bsd-new
  • ext/hal/nxp/mcux/devices/LPC54114/fsl_pint.h is not apache-2.0 licensed: bsd-new

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is in the wrong commit

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Include base.yaml and remove the properties that are now defined there.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MaureenHelm I revisited this pull yesterday, and realized after a rebase that I need to do some rework on this pull, including this .yaml.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MaureenHelm i've reworked this pull, please review it again.

@agansari agansari force-pushed the lpc_gpio branch 2 times, most recently from e30b595 to f58c493 Compare August 6, 2019 08:55
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using DT_ALIAS_SW0_GPIOS_PIN here means that gpio interrupts will only work for the aliased buttons/switches. It will not work in the general case.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MaureenHelm What do you mean by "It will not work in the general case."?
InputMux device will map one pin to one interrupt (manual 19.6.3/4).

Analyzing the way I allocate PINT association, I'm not happy with the way I did it.
I'd rather have a static dts allocation, or even better, deduce PINT allocation according to isr no.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're always using the SW0 pin. What if I want to use a sensor pin for data ready interrupts?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MaureenHelm okay, I will change SW to something generic

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MaureenHelm made the changes required, please review it again.
Thank you for your reviews!

NXP's LPC family of MCU's GPIOs parameters is udated.
Boards LPC54xxx and LPC55xxx have updated values according
pin and interrupt layout.

Signed-off-by: Andrei Gansari <[email protected]>
Board is refactored to use DTS generated value, not use
magic numbers.

Signed-off-by: Andrei Gansari <[email protected]>
LPC GPIO architecture uses multiple devices.
GPIO input is routed via INPUTMUX to the PINT
device which roots the interrupt to NVIC.

Signed-off-by: Andrei Gansari <[email protected]>
PINT device is enabled when SoC is booting up. Applies to LPC54xxx and
LPC55xxx families.

Signed-off-by: Andrei Gansari <[email protected]>
Get separate LPC pint devices and GPIO includes.

Signed-off-by: Andrei Gansari <[email protected]>
@agansari
Copy link
Contributor Author

@MaureenHelm I rebased and done the west split for this issue, please review.

@galak
Copy link
Contributor

galak commented Sep 11, 2019

We should have this target the new GPIO APIs and such. I'd say lets pend on this til the initial commit is in the topic-gpio branch and we can target that there.

However it probably makes sense to review zephyrproject-rtos/hal_nxp#11 and have that merged ASAP.

@agansari
Copy link
Contributor Author

Closed via #19714, feature will be available once #18530 is merged

@agansari agansari closed this Oct 18, 2019
@agansari agansari deleted the lpc_gpio branch October 18, 2019 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement interrupt driven GPIO on LPC families

4 participants