Skip to content

LPC55S69: Fix UART & GPIO HAL to pass FPGA CI test shield tests #12342

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 11, 2020

Conversation

fkjagodzinski
Copy link
Member

Summary of changes

Update the LPC55S69 HAL to pass the tests that make use of the FPGA CI test shield:

  • tests-mbed_hal_fpga_ci_test_shield-uart,
  • tests-mbed_hal_fpga_ci_test_shield-gpio.

Impact of changes

Migration actions required

Documentation

None


Pull request type

[x] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[] No Tests required for this change (E.g docs only update)
[x] Covered by existing mbed-os tests (Greentea or Unittest)
[] Tests / results supplied as part of this PR

Reviewers

@ARMmbed/team-nxp, @jamesbeyond, @mprse, @maciejbocianski


@ciarmcom
Copy link
Member

@fkjagodzinski, thank you for your changes.
@jamesbeyond @maclobdell @maciejbocianski @ARMmbed/mbed-os-maintainers please review.

Copy link
Member

@bulislaw bulislaw left a comment

Choose a reason for hiding this comment

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

@mmahadevan108 please review

@@ -19,6 +19,74 @@

#include <mstd_cstddef>

/************GPIO***************/
MSTD_CONSTEXPR_OBJ_11 PinMap PinMap_GPIO[] = {
Copy link
Member

Choose a reason for hiding this comment

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

if that's a dummy for testing, should it only be compiled in while building tests?

Copy link
Contributor

Choose a reason for hiding this comment

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

This is only a header file and it looks like this is correct place to add pinmap, even dummy one for testing only.
Maybe we should add an extra comment like here:

// Pinmap used for testing only
MSTD_CONSTEXPR_OBJ_11 PinMap All_pins[] = {

Copy link
Contributor

Choose a reason for hiding this comment

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

I think this will also be changed for using const PinList *pinmap_restricted_gpio_pins() to exclude GPIO pins, instead of keeping this dummy list. just like what been discussed in the other PR #12380

Copy link
Contributor

@mmahadevan108 mmahadevan108 left a comment

Choose a reason for hiding this comment

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

@mmahadevan108 please review

I am awaiting a response for my review query to understand why the GPIO changes are needed

typedef enum {
GPIO_X = 0, // dummy peripheral used instead of GPIO0 & GPIO1
} GPIOName;

Copy link
Contributor

Choose a reason for hiding this comment

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

What is this for?

Copy link
Contributor

Choose a reason for hiding this comment

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

I believe that this is just dummy GPIO used in the PinMap_GPIO pin-map. We need GPIO pin-map to control the FPGA GPIO test and to skip testing the specific GPIOs which do not fulfill the defined behavior. As you can see some entries in the PinMap_GPIO are commented out and there is added a note why.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thank you. Could you maybe update the comment stating this dummy is for FPGA GPIO testing so that its clear

Copy link
Contributor

Choose a reason for hiding this comment

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

Fixed as suggested

@mprse
Copy link
Contributor

mprse commented Feb 5, 2020

We need this PR asap to enable FPGA-test-shield support for LPC55S69.

@fkjagodzinski is off till the end of the week, so I tried to address review comments and responded to the provided questions.

jamesbeyond
jamesbeyond previously approved these changes Feb 5, 2020
@mergify mergify bot added needs: CI and removed needs: review labels Feb 5, 2020
@mergify mergify bot dismissed jamesbeyond’s stale review February 6, 2020 07:46

Pull request has been modified.

@0xc0170 0xc0170 added the release-version: 6.0.0-alpha-2 Second pre-release version of 6.0.0 label Feb 6, 2020
@0xc0170
Copy link
Contributor

0xc0170 commented Feb 6, 2020

CI started

Also restarted Travis, should execute now

0xc0170
0xc0170 previously approved these changes Feb 6, 2020
@mbed-ci
Copy link

mbed-ci commented Feb 6, 2020

Test run: SUCCESS

Summary: 11 of 11 test jobs passed
Build number : 1
Build artifacts

@@ -19,6 +19,74 @@

#include <mstd_cstddef>

/************GPIO***************/
MSTD_CONSTEXPR_OBJ_11 PinMap PinMap_GPIO[] = {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this will also be changed for using const PinList *pinmap_restricted_gpio_pins() to exclude GPIO pins, instead of keeping this dummy list. just like what been discussed in the other PR #12380

@mergify mergify bot added needs: work and removed needs: CI labels Feb 6, 2020
Filip Jagodzinski and others added 2 commits February 7, 2020 13:32
Check that the RX or TX interrupt is enabled before calling
a registered handler with RxIrq or TxIrq arg.
@mergify mergify bot dismissed jamesbeyond’s stale review February 7, 2020 12:33

Pull request has been modified.

@mergify mergify bot dismissed 0xc0170’s stale review February 7, 2020 12:33

Pull request has been modified.

@mprse
Copy link
Contributor

mprse commented Feb 7, 2020

Provided the following changes:

  • dropped other commits than the fix for serial IRQ handling (STDIO uart is now restricted during FPGA testing by default),
  • added restricted GPIO pins for FPGA testing for LPC55S69.

Test results (this PR + PR #12379):

| target              | platform_name | test suite                              | result | elapsed_time (sec) | copy_method |
|---------------------|---------------|-----------------------------------------|--------|--------------------|-------------|
| LPC55S69_NS-GCC_ARM | LPC55S69      | tests-mbed_hal_fpga_ci_test_shield-gpio | OK     | 30.08              | default     |
mbedgt: test suite results: 1 OK
mbedgt: test case report:
| target              | platform_name | test suite                              | test case                    | passed | failed | result | elapsed_time (sec) |
|---------------------|---------------|-----------------------------------------|------------------------------|--------|--------|--------|--------------------|
| LPC55S69_NS-GCC_ARM | LPC55S69      | tests-mbed_hal_fpga_ci_test_shield-gpio | explicit init, input         | 1      | 0      | OK     | 1.26               |
| LPC55S69_NS-GCC_ARM | LPC55S69      | tests-mbed_hal_fpga_ci_test_shield-gpio | explicit init, output        | 1      | 0      | OK     | 1.25               |
| LPC55S69_NS-GCC_ARM | LPC55S69      | tests-mbed_hal_fpga_ci_test_shield-gpio | generic init, input & output | 1      | 0      | OK     | 1.26               |

| target              | platform_name | test suite                              | result | elapsed_time (sec) | copy_method |
|---------------------|---------------|-----------------------------------------|--------|--------------------|-------------|
| LPC55S69_NS-GCC_ARM | LPC55S69      | tests-mbed_hal_fpga_ci_test_shield-uart | OK     | 35.13              | default     |
mbedgt: test suite results: 1 OK
mbedgt: test case report:
| target              | platform_name | test suite                              | test case                              | passed | failed | result | elapsed_time (sec) |
|---------------------|---------------|-----------------------------------------|----------------------------------------|--------|--------|--------|--------------------|
| LPC55S69_NS-GCC_ARM | LPC55S69      | tests-mbed_hal_fpga_ci_test_shield-uart | 115200, 8N1, FC off                    | 1      | 0      | OK     | 0.35               |
| LPC55S69_NS-GCC_ARM | LPC55S69      | tests-mbed_hal_fpga_ci_test_shield-uart | 115200, 8N1, FC on                     | 1      | 0      | OK     | 0.3                |
| LPC55S69_NS-GCC_ARM | LPC55S69      | tests-mbed_hal_fpga_ci_test_shield-uart | 19200, 8N1, FC off                     | 1      | 0      | OK     | 0.37               |
| LPC55S69_NS-GCC_ARM | LPC55S69      | tests-mbed_hal_fpga_ci_test_shield-uart | 19200, 8N1, FC on                      | 1      | 0      | OK     | 0.31               |
| LPC55S69_NS-GCC_ARM | LPC55S69      | tests-mbed_hal_fpga_ci_test_shield-uart | 38400, 8N1, FC off                     | 1      | 0      | OK     | 0.35               |
| LPC55S69_NS-GCC_ARM | LPC55S69      | tests-mbed_hal_fpga_ci_test_shield-uart | 38400, 8N1, FC on                      | 1      | 0      | OK     | 0.31               |
| LPC55S69_NS-GCC_ARM | LPC55S69      | tests-mbed_hal_fpga_ci_test_shield-uart | 9600, 8E1, FC on                       | 1      | 0      | OK     | 0.31               |
| LPC55S69_NS-GCC_ARM | LPC55S69      | tests-mbed_hal_fpga_ci_test_shield-uart | 9600, 8N2, FC off                      | 1      | 0      | OK     | 0.4                |
| LPC55S69_NS-GCC_ARM | LPC55S69      | tests-mbed_hal_fpga_ci_test_shield-uart | 9600, 8N2, FC on                       | 1      | 0      | OK     | 0.32               |
| LPC55S69_NS-GCC_ARM | LPC55S69      | tests-mbed_hal_fpga_ci_test_shield-uart | 9600, 8O1, FC on                       | 1      | 0      | OK     | 0.3                |
| LPC55S69_NS-GCC_ARM | LPC55S69      | tests-mbed_hal_fpga_ci_test_shield-uart | basic (direct init), 9600, 8N1, FC off | 1      | 0      | OK     | 0.42               |
| LPC55S69_NS-GCC_ARM | LPC55S69      | tests-mbed_hal_fpga_ci_test_shield-uart | basic (direct init), 9600, 8N1, FC on  | 1      | 0      | OK     | 0.34               |
| LPC55S69_NS-GCC_ARM | LPC55S69      | tests-mbed_hal_fpga_ci_test_shield-uart | basic, 9600, 8N1, FC off               | 1      | 0      | OK     | 0.4                |
| LPC55S69_NS-GCC_ARM | LPC55S69      | tests-mbed_hal_fpga_ci_test_shield-uart | basic, 9600, 8N1, FC on                | 1      | 0      | OK     | 0.31               |
| LPC55S69_NS-GCC_ARM | LPC55S69      | tests-mbed_hal_fpga_ci_test_shield-uart | init/free, FC off                      | 1      | 0      | OK     | 0.33               |
| LPC55S69_NS-GCC_ARM | LPC55S69      | tests-mbed_hal_fpga_ci_test_shield-uart | init/free, FC on                       | 1      | 0      | OK     | 0.38               |
mbedgt: test case results: 16 OK

@0xc0170 This should be merged after PR #12379.

The second review round is required I think.

@jamesbeyond
Copy link
Contributor

please tag this PR as alpha-2-release @adbridge

@0xc0170
Copy link
Contributor

0xc0170 commented Feb 11, 2020

CI restarted (also Travis)

@mbed-ci
Copy link

mbed-ci commented Feb 11, 2020

Test run: SUCCESS

Summary: 11 of 11 test jobs passed
Build number : 2
Build artifacts

@0xc0170 0xc0170 merged commit a745525 into ARMmbed:master Feb 11, 2020
@mergify mergify bot removed the ready for merge label Feb 11, 2020
@fkjagodzinski fkjagodzinski deleted the fix-nxp-hal_fpga branch February 11, 2020 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-version: 6.0.0-alpha-2 Second pre-release version of 6.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants