Skip to content

M263: Fix FPGA CI testing failing #11379

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 9 commits into from
Sep 4, 2019

Conversation

ccli8
Copy link
Contributor

@ccli8 ccli8 commented Aug 30, 2019

Description

This PR is to pass FPGA CI test shield tests on Nuvoton NUMAKER_IOT_M263A target. It has the following major bugfix:

  • Force enum PinName to 32-bit required to encode module binding information in it
  • Exclude USB UART from testing which is dedicated to USB VCOM
  • Fix IP initialization sequence
  • Fix I2C NACK error
  • Fix redundant SPI clock generation
  • Fix redundant call to UART IRQ handler
  • Support GPIO input pull-high/pull-low (not all Nuvoton targets support it)

Related PR

Continuation of #11152 and applies on M263 target

Pull request type

[x] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

ccli8 added 9 commits August 30, 2019 11:33
NU_PINNAME_BIND(...) requires enum PinName to be 32-bit to encode module
binding information in it.
USB UART is dedicated to USB COM and so must exclude from FPGA CI testing.
Better IP initialization sequence:
1. Configure IP pins
2. Select IP clock source and then enable it
3. Reset the IP (SYS_ResetModule)

NOTE1: IP reset takes effect regardless of IP clock. So it doesn't matter if
       IP clock enable is before IP reset.
NOTE2: Non-configured pins may disturb IP's state, so IP pinout first and then
       IP reset.
NOTE3: IP reset at the end of IP initialization sequence can cover unexpected
       situation.
Fix logic error on replying NACK at the end of transfer.

This is also to fix FPGA CI test mbed_hal_fpga_ci_test_shield-i2c/
i2c - test single byte read i2c API.
Fix SPI clocks are generated redundantly at the end of transfer.

This is also to fix FPGA CI test mbed_hal_fpga_ci_test_shield-spi/
SPI - async mode.
Honor RxIrq/TxIrq to avoid redundant call to UART IRQ handler.

This is also to fix FPGA CI test mbed_hal_fpga_ci_test_shield-uart.
In Nuvoton, only new-design chips support GPIO input pull-high/pull-low modes.
Targets not supporting this feature are listed below:

- NUMAKER_PFM_NANO130
- NUMAKER_PFM_NUC472
- NUMAKER_PFM_M453
Without free-up of peripheral pins, peripheral pins of the same peripheral may
share by multiple ports after port iteration, and this peripheral may fail with
pin interference.
The pins suffixed with 'I2SMCLK' are for SPI I2S and cannot be used in normal SPI.

This is also to fix FPGA CI test mbed_hal_fpga_ci_test_shield-spi.
@ciarmcom ciarmcom requested review from Ronny-Liu and a team August 30, 2019 07:00
@ciarmcom
Copy link
Member

@ccli8, thank you for your changes.
@Ronny-Liu @ARMmbed/mbed-os-maintainers please review.

@0xc0170
Copy link
Contributor

0xc0170 commented Sep 4, 2019

CI started

@mbed-ci
Copy link

mbed-ci commented Sep 4, 2019

Test run: SUCCESS

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

@0xc0170 0xc0170 merged commit ea54f12 into ARMmbed:master Sep 4, 2019
@ccli8 ccli8 deleted the nuvoton_m263_fpga-ci branch September 5, 2019 01:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants