Commit Graph

664 Commits (d1d6bf51b387ef39f97320b2febd5d79231682ba)

Author SHA1 Message Date
cyliangtw 3916026dd7 Commit M451/NANO100 i2c_api again to resolve abnormal gitattribute 2020-09-30 10:27:16 +08:00
cyliangtw ffee35a5c8 Fix NuMaker I2C timeout,
some H/W timer count is 24 bits only, hardcode 0xffffffff causing
  wrong judgement of timeout as while H/W timer counting overflow.
2020-09-29 21:01:18 +08:00
Martin Kojtal 468372e759
Merge pull request #13492 from talorion/fix-PwmOut-resets-after-suspend
Fix pwm out resets after suspend
2020-09-10 12:40:18 +01:00
Jaeden Amero 612b148fd4 stack: armc: Workaround config passing bug
Workaround a bug where the boot stack size configuration option is not
passed on to armlink, the Arm Compiler's linker. Prefer
MBED_CONF_TARGET_BOOT_STACK_SIZE if present, as this is what the
configuration system should provide. Fall back to MBED_BOOT_STACK_SIZE
if MBED_CONF_TARGET_BOOT_STACK_SIZE is not defined, as in the case of
buggy tools. If both MBED_CONF_TARGET_BOOT_STACK_SIZE and
MBED_BOOT_STACK_SIZE are not defined, then we fall back to a hard-coded
value provided by the linkerscript. See
https://github.com/ARMmbed/mbed-os/issues/13474 for more information.
2020-09-10 10:08:38 +01:00
Jaeden Amero 39e69d328d Use boot stack size from config system
To allow overriding of the boot stack size from the Mbed configuration
system, consistently use MBED_CONF_TARGET_BOOT_STACK_SIZE rather than
MBED_BOOT_STACK_SIZE.

Fixes #10319
2020-09-10 10:08:38 +01:00
Martin Kojtal 0190014103
Merge pull request #13547 from OpenNuvoton/nvt_nuc472_sd
Nuvoton: Fixed NUC472 SD buffer alignment
2020-09-09 09:51:17 +01:00
cyliangtw 47a28dacd7 Fix nuc472 SD buffer alignment 2020-09-04 16:23:24 +08:00
Chun-Chieh Li ce63a17212 Nuvoton: Fix degrading QSPI to SPI
In most cases, we can control degraded QSPI H/W to standard through BSP SPI driver directly as if it is just SPI H/W.
However, BSP SPI driver distinguishes among SPI H/W instances in below functions:
-   SPI_Open
-   SPI_Close
-   SPI_SetBusClock
-   SPI_GetBusClock
In these cases, we must change to QSPI version instead for QSPI H/W.

Change target:
-   NUMAKER_PFM_M487
-   NUMAKER_IOT_M487
-   NU_PFM_M2351*
2020-09-03 10:25:08 +08:00
talorion b03d80fd08 pwmout - fixed compile errors 2020-09-02 13:39:17 +02:00
talorion a6f9c5b84f pwmout - NUC472 - add read methods for period and pulsewidth 2020-09-02 13:39:14 +02:00
talorion 20dce73257 pwmout - NANO100 - add read methods for period and pulsewidth 2020-09-02 13:39:14 +02:00
talorion 05128898a5 pwmout - M480 - add read methods for period and pulsewidth 2020-09-02 13:39:13 +02:00
talorion bdfe6a8ba6 pwmout - M451 - add read methods for period and pulsewidth 2020-09-02 13:39:13 +02:00
talorion 1a9d8576d7 pwmout - M261 - add read methods for period and pulsewidth 2020-09-02 13:39:13 +02:00
talorion 1c75956312 pwmout - M251 - add read methods for period and pulsewidth 2020-09-02 13:39:13 +02:00
talorion b859d7039f pwmout - M2351 - add read methods for period and pulsewidth 2020-09-02 13:39:13 +02:00
Chun-Chieh Li dde8f6f015 M252: Re-organize PinNames.h
This is to support M251 series based targets.
2020-07-31 17:05:36 +08:00
Chun-Chieh Li a76f5dcbdf M252: Support configurability of USB/STDIO UART pins
-   STDIO_UART and STDIO_UART_TX/STDIO_UART_RX
-   USB_UART and USBTX/USBRX
2020-07-31 17:05:35 +08:00
Chun-Chieh Li f7e4a75041 M252: Make memory specification configurable
This is to support all M251 series based targets.
2020-07-31 17:05:35 +08:00
Chun-Chieh Li 1f70a3caa2 M252: Change SERIAL_TX/SERIAL_RX pin names to other than USBTX/USBRX
USBTX/USBRX should be dedicated for USB VCOM and not for other uses.
2020-07-31 17:05:34 +08:00
cyliangtw dd48500cc3 Revise M263A button pin name 2020-07-21 20:50:19 +08:00
Martin Kojtal e371db441c
Merge pull request #12949 from 0xc0170/feature_CMSIS_5_b5f0603d6
CMSIS: update to CMSIS 5.7.0
2020-05-14 13:21:12 +02:00
Martin Kojtal e2fb52aab7 M2351: fix startup after cmsis update
Don't use CMSIS low level startup
2020-05-13 12:21:05 +01:00
Martin Kojtal 981fcdf52a M251: fix startup after cmsis update
Don't use CMSIS low level startup
2020-05-13 12:20:06 +01:00
Martin Kojtal 2c8be47525 Revert "Use cmsis gcc types instead of own"
This reverts commit 606ccbceff.
2020-05-13 10:43:57 +01:00
Martin Kojtal 606ccbceff Use cmsis gcc types instead of own
This caused a conflict. As CMSIS update introduced low level init, lets use the types
from CMSIS. We could potentionally use __cmsis_start but as I saw for some targets,
the init routine is slightly different. So rather keep what we have in targets, and just
use types already defined in CMSIS.
2020-05-12 16:01:21 +01:00
Martin Kojtal 8a254a9cc6
Merge pull request #12923 from OpenNuvoton/nuvoton_watchdog_lxt
Nuvoton: Refine more on watchdog HAL
2020-05-12 14:31:26 +02:00
Martin Kojtal b376ee1c7c
Merge pull request #12896 from OpenNuvoton/nuvoton_watchdog_hardfault
Nuvoton: Fix watchdog reset failure on meeting Hard Fault
2020-05-12 14:18:18 +02:00
Chun-Chieh Li 9e9e2f18de Nuvoton: Change WDT clock source to LXT
LIRC has 40%~50% error rate, so change WDT clock source to LXT from LIRC.

NOTE: NANO100 series just supports LIRC-clocked WDT.
2020-05-05 17:50:20 +08:00
Chun-Chieh Li f6485cf92f Nuvoton: Fix failure to change WDT clock source
WDT clock source selection and its enablement bits are protected. Add unlock sequence before write to them.
2020-05-05 17:50:15 +08:00
Chun-Chieh Li d121ea89d1 Nuvoton: Fix WDT feature report with clock frequency 2020-05-05 17:50:10 +08:00
Chun-Chieh Li d823756cb7 Nuvoton: Enlarge WDT reset delay to avoid premature WDT reset
Consider the following factors to define WDT reset delay:
1. Cannot be too small. This is to avoid premature WDT reset in pieces of timeout cascading.
2. Cannot be too large. This is to pass Greentea reset_reason/watchdog_reset tests, which have e.g. 50~100 reset delay tolerance.
2020-05-05 17:50:05 +08:00
Chun-Chieh Li 73824f0c4d Nuvoton: Fix watchdog reset failure on meeting Hard Fault
Original implementation doesn't enable watchdog reset in pieces of cascaded timeout, except the last one. This is to guarantee re-configuration can be in time, but in interrupt disabled scenario e.g. Hard Fault, watchdog reset can cease to be effective.

This change enables watchdog reset all the way of cascaded timeout. With trade-off, guaranteed watchdog reset function is more significant than re-configuration in time.
2020-04-30 14:22:30 +08:00
Chun-Chieh Li e7dd4057c3 M453: Support bare metal
Relevant modifications to make TOOLCHAIN_* directories clear:
1. Remove TOOLCHAIN_ARM_STD
2. Rename TOOLCHAIN_ARM_MICRO to TOOLCHAIN_ARM
2020-04-27 11:24:13 +08:00
Chun-Chieh Li 226d86b304 NANO130: Support bare metal
Relevant modifications to make TOOLCHAIN_* directories clear:
1. Remove TOOLCHAIN_ARM_STD
2. Rename TOOLCHAIN_ARM_MICRO to TOOLCHAIN_ARM
2020-04-27 11:24:13 +08:00
Chun-Chieh Li 530a5cfe7c M453: Make memory specification configurable 2020-04-27 11:24:12 +08:00
Chun-Chieh Li 188c6d9a4a NANO130: Make memory specification configurable 2020-04-27 11:24:11 +08:00
Martin Kojtal 68f1ef2df6
Merge pull request #12716 from OpenNuvoton/nuvoton_m487_bsp
M487: Update BSP
2020-04-15 09:07:10 +02:00
Martin Kojtal f03860a971
Merge pull request #12604 from OpenNuvoton/nuvoton_nano130_tickless_lpticker
NANO130: Fix test failures with tickless from lp_ticker
2020-04-01 08:40:19 +02:00
Chun-Chieh Li 2c9ec8f19d M487: Add SPDX license identifier for BSP files 2020-04-01 13:55:46 +08:00
Chun-Chieh Li d709c775b4 M487: Add SPDX license identifier 2020-04-01 13:55:45 +08:00
Chun-Chieh Li 3b9492fdbc M487: Update BSP
Relevant modifications:
1. Support degrading QSPI0/1 to SPI4/5 for normal SPI transfer
2. Fix with BSP crypto driver API change
3. Fix with BSP PDMA driver API change
4. Make necessary modifications to pass FPGA CI Test Shield tests
5. Don't distinguish pinmap among parts e.g. M480 LG. Application users must take care.
2020-04-01 13:55:12 +08:00
Martin Kojtal 0a6e586a9d
Merge pull request #12660 from OpenNuvoton/nuvoton_m2351_custom_board
M2351: Support custom board
2020-03-31 09:29:22 +02:00
Chun-Chieh Li e6823c6af5 M2351: Add SPDX license identifier for BSP files 2020-03-24 10:47:03 +08:00
Chun-Chieh Li d1655854c9 M2351: Add SPDX license identifier 2020-03-24 10:03:44 +08:00
Chun-Chieh Li dbd34ed63e NANO130: Enlarge timeout in CLK_WaitClockReady(...)
Most code doesn't check return code of CLK_WaitClockReady(...). Enlarge timeout to meet most cases.

lp_ticker initialization fails with this issue. Steps for reproducing:
1.  System runs in tickless from lp_ticker mode.
2.  Arm WDT reset.
3.  In next reset cycle, lp_ticker initialization fails (active flag doesn't become active).
2020-03-20 10:26:39 +08:00
Chun-Chieh Li 427e8eb777 M2351: Support custom board
1. Introduce MCU_M2351 target to be inheritable
2. Re-organize PinNames.h to be overridable
3. Enable configurability of USB/STDIO UART pins
2020-03-20 09:39:16 +08:00
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