Commit Graph

35 Commits (4b3cddff2a66d5b13ad861e8782d1d630c2479c1)

Author SHA1 Message Date
Chun-Chieh Li f5cb899413 M263: Re-organize PinNames.h
This is to support custom boards based on M261 series chips.
2020-03-20 09:16:51 +08:00
Chun-Chieh Li 15fcdb1c36 M263: Support configurability for USB/STDIO UART pins
-   STDIO_UART and STDIO_UART_TX/STDIO_UART_RX
-   USB_UART and USBTX/USBRX
2020-03-20 09:16:51 +08:00
Chun-Chieh Li edcfcf0495 M263: Enable configurability for memory specification
This is to support custom boards based on M261 series chips.
2020-03-20 09:16:50 +08:00
Chun-Chieh Li 203a9fe0ec M263: Add SERIAL_TX/SERIAL_RX pin names
Don't set SERIAL_TX/SERIAL_RX to USBTX/USBRX which should be dedicated for USB VCOM and not for other uses.
2020-03-20 09:16:49 +08:00
Chun-Chieh Li 8df96ec50a Nuvoton: Make SPI inter-frame (delay match configured suspend interval
In no MISO case, skip SPI read so that no more write/read delay contribute to SPI inter-frame delay when data is written successively.

Update targets:
-   NUMAKER_PFM_NANO130
-   NUMAKER_PFM_NUC472
-   NUMAKER_PFM_M453
-   NUMAKER_PFM_M487/NUMAKER_IOT_M487
-   NU_PFM_M2351_*
-   NUMAKER_IOT_M263A
-   NUMAKER_M252KG
2020-02-17 15:00:09 +08:00
Chun-Chieh Li 4a1d612e90 Nuvoton: Fix delay code with RTC clock source
Explicitly configure RTC clock source to LXT

Update targets:

-   NUMAKER_PFM_NANO130
-   NUMAKER_PFM_NUC472
-   NUMAKER_PFM_M453
-   NUMAKER_PFM_M487/NUMAKER_IOT_M487
-   NUMAKER_M252KG
-   NUMAKER_IOT_M263A
2020-02-13 11:24:01 +08:00
Chun-Chieh Li 86fcae5b03 Nuvoton: Fix GPIO rising/falling edge interrupts cannot exist simultaneously
This is to pass mbed_hal_fpga_ci_test_shield-gpio_irq test.

Update targets:

-   NUMAKER_PFM_NANO130
-   NUMAKER_PFM_NUC472
-   NUMAKER_PFM_M453
-   NUMAKER_PFM_M487/NUMAKER_IOT_M487
-   NUMAKER_M252KG
-   NUMAKER_IOT_M263A
2020-02-13 11:24:01 +08:00
Przemyslaw Stekiel a4e1354769 Remove pinmap_restricted_peripherals() function from Nuvoton (STDIO uart is restricted by default) 2020-02-07 10:45:02 +01:00
Maciej Bocianski 9aade4a816 NUMAKER_IOT_M263A: keep __vector_handlers symbol in LTO builds
Add a "used" attribute to __vector_handlers to fix ARMC6 build with
the "-flto" flag.
(Error: L6236E: No section matches selector - no section to be FIRST/LAST. )

This attribute, attached to a function/variable, means that code must be emitted
for the function even if it appears that the function is not referenced.
2020-02-04 12:29:57 +01:00
Chun-Chieh Li c99dc34f65 Nuvoton: Support dynamic heap configuration on IAR
On IAR, configure heap to 1KiB at a minimum and expandable, dependent on available SRAM. This requires IAR 8.x.

Support targets:
-   NUMAKER_PFM_NUC472 w/ and w/o XRAM
-   NUMAKER_PFM_M453
-   NUMAKER_PFM_M487/NUMAKER_IOT_M487
-   NUMAKER_IOT_M263A
-   NUMAKER_M252KG
2019-12-27 09:01:07 +08:00
Chun-Chieh Li 72ea613a12 Nuvoton: Add i2c_free
1.  Disable interrupt
2.  Disable IP clock
3.  Free up pins

Support targets:

-   NUMAKER_PFM_NANO130
-   NUMAKER_PFM_NUC472
-   NUMAKER_PFM_M453
-   NUMAKER_PFM_M487/NUMAKER_IOT_M487
-   NU_PFM_M2351*
-   NUMAKER_IOT_M263A
-   NUMAKER_M252KG
2019-10-31 15:22:57 +08:00
Chun-Chieh Li 3abd02614a Nuvoton: Add analogin_free
1.  Deal with channel-wise and module-wise
2.  Disable IP clock
3.  Free up pin

Support targets:

-   NUMAKER_PFM_NANO130
-   NUMAKER_PFM_NUC472
-   NUMAKER_PFM_M453
-   NUMAKER_PFM_M487/NUMAKER_IOT_M487
-   NU_PFM_M2351*
-   NUMAKER_IOT_M263A
-   NUMAKER_M252KG
2019-10-31 15:19:15 +08:00
Chun-Chieh Li 4cd0332ada NUVOTON: Re-implement TRNG HAL with TRNG H/W
Targets supporting TRNG H/W:

-   NU_PFM_M2351_*
-   NUMAKER_IOT_M263A
2019-10-24 10:55:03 +08:00
Chun-Chieh Li 3f9ba9e61f NUVOTON: Fix BSP/MKROM header
Related targets:
-   NU_PFM_M2351_*
-   NUMAKER_IOT_M263A
2019-10-24 09:36:25 +08:00
Chun-Chieh Li d993c5a108 NUVOTON: Re-implement __PC() with toolchain built-in
Re-implement __PC() by replacing BSP assembly with toolchain built-in.
2019-10-24 09:36:25 +08:00
Chun-Chieh Li 254866eac1 M263: Remove redundant SPI I2S pins from pinmap
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.
2019-08-30 11:33:56 +08:00
Chun-Chieh Li c67a0d8bd0 M263: Free up peripheral pins in peripheral free-up HAL API
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.
2019-08-30 11:33:55 +08:00
Chun-Chieh Li 78ae1e0c73 M263: Support GPIO input pull-high/pull-low
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
2019-08-30 11:33:54 +08:00
Chun-Chieh Li 5b7beab9da M263: Fix redundant call to UART IRQ handler
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.
2019-08-30 11:33:52 +08:00
Chun-Chieh Li eb435b7da0 M263: Fix redundant SPI clock generation
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.
2019-08-30 11:33:51 +08:00
Chun-Chieh Li d15abe5171 M263: Fix I2C NACK error
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.
2019-08-30 11:33:49 +08:00
Chun-Chieh Li 9d4d99cf34 M263: Fix IP initialization sequence
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.
2019-08-30 11:33:48 +08:00
Chun-Chieh Li 9aa69d03bf M263: Exclude USB UART from testing
USB UART is dedicated to USB COM and so must exclude from FPGA CI testing.
2019-08-30 11:33:47 +08:00
Chun-Chieh Li 3cb95a8baf M263: Force enum PinName to 32-bit
NU_PINNAME_BIND(...) requires enum PinName to be 32-bit to encode module
binding information in it.
2019-08-30 11:33:45 +08:00
cyliangtw e57ed04252 modify acceptable license term of SDK drivres 2019-08-23 18:12:23 +08:00
cyliangtw 23267ba229 re-license files of M261 device folder to be Apache 2019-08-23 18:12:19 +08:00
cyliangtw 9d653af2cc re-license all of M261 hal files to be Apache 2019-08-23 18:12:16 +08:00
cyliangtw c9006bd422 Support InterruptIn class in ci-test/pwm_rise_fall test case 2019-08-23 18:12:13 +08:00
cyliangtw d69e7c5613 Fix UNO pin map 2019-08-23 18:12:11 +08:00
cyliangtw 3164095cd6 M263: Fix channel release in analogout_free() 2019-08-23 18:12:10 +08:00
cyliangtw a62c877d0e M263: modify epwm-config-output 2019-08-23 18:12:09 +08:00
cyliangtw 2596b7c7be M263: Include cmsis core_m23.h for macro __CORTEX_M in M261.h 2019-08-23 18:12:07 +08:00
cyliangtw d52fced891 M263: Fix compile error on analogin/out & crypto-misc 2019-08-23 18:12:06 +08:00
cyliangtw b9a2e06a1a M263: delete 2 redundant files 2019-08-23 18:12:04 +08:00
cyliangtw e46cf83850 M263: Add Numaker-IoT-M263A target board 2019-08-23 18:12:02 +08:00