Commit Graph

516 Commits (ba7b4799f9a74797f0380226748bb1d985b358ec)

Author SHA1 Message Date
Chun-Chieh Li 85bb65cd56 M2351: Add pre-built secure image for non-PSA 2019-09-16 11:01:34 +08:00
Chun-Chieh Li 2471c9ea10 M2351: Remove pre-built non-PSA secure image temporarily
This will add back immediately after target renaming is done.
2019-09-16 10:20:30 +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
Chun-Chieh Li 96dac4faa7 [M487] Exclude A2/A3 from testing for NuMaker-IoT-M487 V1.3
Since NuMaker-IoT-M487 V1.3, A2/A3 are dedicated to on-board ESP8266 WiFi
module RTS/CTS pins and so must exclude from FPGA CI testing.
2019-08-20 13:12:44 +08:00
Chun-Chieh Li c99c43cacd [M2351] Fix pinmap table error with SPI clock pin 2019-08-20 13:12:44 +08:00
Chun-Chieh Li 07f39f1337 [M2351] Fix CLK_SetModuleClock_S(...) error with SPI
Fix SPI module index error in modidx_ns_tab table in CLK_SetModuleClock_S().
Need to update secure image for this bugfix.

This is also to fix FPGA CI test mbed_hal_fpga_ci_test_shield-spi/
SPI - init/free test all pins.
2019-08-20 13:12:44 +08:00
Chun-Chieh Li bab5d27e26 [M453] Classify by M45xD/M45xC and M45xG/M45xE
M451 series can classify by M45xD/M45xC and M45xG/M45xE. To support this
classification:
1.  Create TARGET_M45xD_M45xC and TARGET_M45xG_M45xE targets.
2.  Mark NUMAKER_PFM_M453 belongs to TARGET_M45xG_M45xE by 'extra_labels_add'
    in targets.json.
3.  Fix pin name table according to the classification.
4.  Fix pinmap table according to the classification.
2019-08-20 13:12:43 +08:00
Chun-Chieh Li 6f1bd325cd [NANO130] Remove SPI MOSI1/MISO1 pins from pinmap
MOSI1/MISO1 are used in second bit of 2-bit transfer mode and cannot be used
for normal MOSI/MISO. Remove them from pinmap.

This is also to fix FPGA CI test mbed_hal_fpga_ci_test_shield-spi/
SPI - basic test.
2019-08-20 13:12:43 +08:00
Chun-Chieh Li c3d7ef8341 [Nuvoton] 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-20 13:12:43 +08:00
Chun-Chieh Li ca0846b1e9 [Nuvoton] 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-20 13:12:42 +08:00
Chun-Chieh Li 09bf844d76 [Nuvoton] 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-20 13:12:42 +08:00
Chun-Chieh Li d46c6fea47 [Nuvoton] 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-20 13:12:42 +08:00
Chun-Chieh Li 80c21aeff5 [Nuvoton] 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-20 13:12:42 +08:00
Chun-Chieh Li fef138a3cd [Nuvoton] 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-20 13:12:41 +08:00
Chun-Chieh Li 560fe33ed8 [Nuvoton] Exclude USB UART from testing
USB UART is dedicated to USB COM and so must exclude from FPGA CI testing.
2019-08-20 13:12:41 +08:00
Chun-Chieh Li f88bd72c19 [Nuvoton] 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-20 13:12:41 +08:00
Chun-Chieh Li 413d127586 Nuvoton: Remove dead code nu_delay_cycle_x4(...)
Originally, nu_delay_cycle_x4(...) is borrowed from mbed test code for delay
cycle. Currently, it is not used on Nuvoton targets. If delay cycle is needed,
use wait_ns(...) instead which has strict implementation and has passed tests.
2019-08-05 09:32:35 +08:00
Chun-Chieh Li 3d905b0607 [NUC472] Override wait_ns(...) to provide more accurate implementation
NUC472 series doesn't support cache but supports branch buffer. But it still
cannot provide zero-wait state flash performance.
2019-07-08 17:52:26 +08:00
Chun-Chieh Li 2b9ee2a93f [NANO130] Override wait_ns(...) to provide more accurate implementation
NANO100 series doesn't support cache and so cannot provide zero-wait state
flash performance.
2019-07-08 17:52:26 +08:00
Chun-Chieh Li a03985ea43 [M2351] Refine wait_ns(...) code
1.  Add missing header file for mbed_mpu_manager_lock_ram_execution()/
    mbed_mpu_manager_unlock_ram_execution() to avoid compile warning.
2.  Locate delay_loop_code() on 16-byte boundary (sync to common version).
3.  Optimize delay_loop macro (sync to common version).
2019-07-08 17:51:49 +08:00
Martin Kojtal ccb63d771e
Merge pull request #10857 from ARMmbed/feature-watchdog
Add Watchdog and ResetReason
2019-07-03 11:43:52 +01:00
Anna Bridge ac274833f0
Merge pull request #10741 from OpenNuvoton/nuvoton_m2351_wait-ns
M2351: Override wait_ns to provide more accurate implementation
2019-06-19 12:22:56 +01:00
Chun-Chieh Li 016ab2a417 [Nuvoton] Fix channel release in analogout_free() 2019-06-13 18:11:50 +08:00
Chun-Chieh Li 197b328944 [M2351] Override wait_ns to provide more accurate implementation
At high HCLK rate, M2351 cannot provide zero-wait-state flash performance. Besides,
cache is forcibly turned off for non-secure land for internal reason. We locate
'delay_loop_code' from flash to SRAM to achieve zero-wait-state performance.
2019-06-03 16:47:14 +08:00
Chun-Chieh Li 010f4225a0 [M487] Fix wait_ns test failed 2019-06-03 11:28:26 +08:00
Rajkumar Kanagaraj 50c6e9f481 Added the SPDX identifier 2019-05-24 12:32:53 +02:00
ccli8 84440531f1 [Nuvoton] Support watchdog timer 2019-05-24 12:20:01 +02:00
ccli8 6e514b6e08 [Nuvoton] Support reset reason 2019-05-24 11:35:44 +02:00
ccli8 717979075f [NUC472] Fix WDT driver in BSP 2019-05-24 11:35:43 +02:00
Martin Kojtal 3ea1c56124
Merge pull request #10147 from kjbracey-arm/atomic_bitwise
Assembler atomics
2019-05-13 14:18:05 +01:00
ccli8 fcab482357 [NANO130] Fix optimization error with NVIC_SetVector/NVIC_GetVector on ARMC6
On ARMC6 with optimization level "-Os", the two functions NVIC_SetVector/NVIC_GetVector
will be translated to illegal instruction for trapping due to NVIC_FLASH_VECTOR_ADDRESS
defined as direct 0. Fixed by defining NVIC_FLASH_VECTOR_ADDRESS as a symbol instead to
avoid such optimization error.
2019-05-08 10:25:36 +08:00