Commit Graph

111 Commits (faec0c3ce52065e7f2dac0f89af04c2921cd6c51)

Author SHA1 Message Date
Martin Kojtal be52ba2156
Merge pull request #5363 from mprse/extended_rtc
Add support and tests for extended RTC
2017-12-12 17:36:44 +00:00
Przemyslaw Stekiel 106561669f Update RTC drivers for extended RTC. 2017-12-05 07:54:02 +01:00
Jimmy Brisson ab1b3ae8d3
Merge pull request #5454 from OpenNuvoton/trng_get_unalignment
Nuvoton: TRNG_Get support 32 bytes unalignment
2017-11-22 10:21:39 -06:00
cyliangtw 288094568c [M487/NUC472/NANO130] fix TRUE/FALSE redefinition 2017-11-16 11:21:20 +00:00
cyliangtw d8a9e35a0c [M487/NUC472] Refine trng_get_bytes for consistency and readability 2017-11-13 12:11:08 +08:00
cyliangtw 2ee058be53 [M487/NUC472] Refine for correctness control 2017-11-10 16:22:35 +08:00
cyliangtw e252b10148 [M487/NUC472] zeroize random data on the stack memory 2017-11-09 16:01:14 +08:00
cyliangtw 76c2c19853 [M487/NUC472] Unified code-path for remaining bytes of TRNG_Get 2017-11-08 19:56:12 +08:00
cyliangtw 4118afa259 [M487/NUC472] TRN_Get support 32 bytes unalignment 2017-11-08 14:23:05 +08:00
ccli8 bf426b0771 [NUC472/M453/M487/NANO130] Remove dead power-down code with mbed OS 3
These power-down code are stale and would be superseded by sleep manager.
2017-09-22 09:42:51 +08:00
ccli8 d4af4ba3a7 [NUC472/M453/M487] Fix RTC hour error with AM/PM 2017-09-20 16:56:34 +08:00
ccli8 83fc132b97 [NUC472] Fix RTC macro function with no arguments in BSP 2017-09-20 16:56:33 +08:00
ccli8 6eb4e11b37 [NUC472/M453/M487] Refine sleep code
1. Remove stale code with mbed OS 3.
2. Remove check for busy peripherals unorganizedly. This would be supported by e.g. official sleep manager.
2017-09-20 16:56:32 +08:00
Jimmy Brisson 91afbce18a Correct Nuvoton compiler detection logic 2017-09-11 13:20:33 -05:00
Jimmy Brisson 15a9a0382b Enable Compiling with ARMC6 across all targets
remove duplicate sys.cpp
2017-09-11 13:20:32 -05:00
cyliangtw 6b8724b27d [NUC472] Sync SPI mode with NUC472 BSP V3.02.001 2017-08-01 14:40:54 +08:00
ccli8 d885de6ec5 [NUC472/M453] Move target configuration from mbed_lib.json to targets.json 2017-08-01 14:40:48 +08:00
ccli8 8092c3611b [NUC472/M453] Add comment for Receive Time-out IF in SPI HAL 2017-08-01 14:40:42 +08:00
ccli8 c7fcd071e9 [NUC472/M453] Add sanity check for serial format 2017-08-01 14:40:37 +08:00
ccli8 5e335de67e [NUC472/M453] Set LED4 to LED1
No real LED4. Just for passing ATS.
2017-08-01 14:40:31 +08:00
ccli8 ea1de8c9a8 [NUC472/M453] Remove mbed_sdk_init_forced()
1. With mbed OS 5, mbed_sdk_init() is ensured to call before C++ global object constructor.
2. Refine startup file with GCC_ARM toolchain related to this modification.
2017-08-01 14:40:25 +08:00
ccli8 6c9fda4e3e [NUC472/M453] Fix lp_ticker typo 2017-08-01 14:40:20 +08:00
ccli8 ea7a0fdf74 [NUC472/M453] Add comment in gpio_irq_init() 2017-08-01 14:40:14 +08:00
ccli8 46cb684a32 [NUC472] Conform to mbed TLS H/W acceleration support 2017-08-01 14:40:08 +08:00
ccli8 8067f9ac91 [NUC472/M453] Move SystemInit() to register unlock range for perhaps future protected register access 2017-08-01 14:40:02 +08:00
ccli8 2844be6434 [NUC472/M453] Fix RTC time doesn't continue across reset cycle 2017-08-01 14:39:57 +08:00
ccli8 c4df35d1b5 [NUC472/M453] Fix region end address error with IAR toolchain 2017-08-01 14:39:50 +08:00
Jimmy Brisson 1f94ede86c Merge pull request #4744 from deepikabhavnani/spi_issue_4743
Allow user to set default transfer byte for block read
2017-07-24 14:45:30 -05:00
Deepika 1b797e9081 Closed review comments
1. Doxygen and Grammar related
2. Change dummy to spi_fill
3. Remove NXP driver and add default loop in spi block read (same as all
other drivers)
2017-07-21 09:46:22 -05:00
Martin Kojtal 10ea63b8e7 Ticker: add fire interrupt now function
fire_interrupt function should be used for events in the past. As we have now
64bit timestamp, we can figure out what is in the past, and ask a target to invoke
an interrupt immediately. The previous attemps in the target HAL tickers were not ideal, as it can wrap around easily (16 or 32 bit counters). This new
functionality should solve this problem.

set_interrupt for tickers in HAL code should not handle anything but the next match interrupt. If it was in the past is handled by the upper layer.

It is possible that we are setting next event to the close future, so once it is set it is already in the past. Therefore we add a check after set interrupt to verify it is in future.
If it is not, we fire interrupt immediately. This results in
two events - first one immediate, correct one. The second one might be scheduled in far future (almost entire ticker range),
that should be discarded.

The specification for the fire_interrupts are:
- should set pending bit for the ticker interrupt (as soon as possible),
the event we are scheduling is already in the past, and we do not want to skip
any events
- no arguments are provided, neither return value, not needed
- ticker should be initialized prior calling this function (no need to check if it is already initialized)

All our targets provide this new functionality, removing old misleading if (timestamp is in the past) checks.
2017-07-13 12:23:25 +01:00
Sam Grove 547320e99c Rename function st_rtc_localtime with _rtc_localtime 2017-06-07 23:24:48 -05:00
Vincent Coubard f880e44145 remove usage of mktime/localtime in favor of dedicated functions.
The use of mktime was causing a fault when called in interrupt handler because on GCC it lock the mutex protecting the environment, To overcome this issue, this patch add dedicated routine to convert a time_t into a tm and vice versa.
In the process mktime has been optimized and is now an order of magnitude faster than the routines present in the C library.
2017-06-07 22:06:22 -05:00
Sam Grove 5f138810a9 Merge pull request #4294 from ARMmbed/feature_cmsis5
Update CMSIS-Core and RTX to version 5
2017-06-02 23:44:32 -05:00
Martin Kojtal e229a49182 Merge pull request #4207 from geky/spi-remove-byte-locking
spi: Add SPI block-write to C++ and HAL for performance
2017-06-01 14:03:36 +02:00
Bartek Szatkowski b97ffe8fdc CMSIS5: Replace target defined NVIC_Set/GetVector with CMSIS implementation 2017-05-30 18:55:51 +01:00
Sam Grove d11289b576 Merge pull request #4165 from adustm/can_init
fix #3863 Add an mbed API that allows the init of the CAN at the bus frequency
2017-05-26 10:45:19 -05:00
Christopher Haster c1de19e49e spi: Added default spi_master_block_write implementation to all targets
There is an easy default implementation of spi_master_block_write that
just calls spi_master_write in a loop, so the default implementation
of spi_master_block_write has been added to all targets.
2017-05-25 12:04:58 -05:00
adustm 3d44a3fcc3 add can_init_freq for NUVOTON platforms 2017-05-15 14:27:22 +02:00
ccli8 08c778d18d [NUC472/M453] Change comment for serial_getc/serial_putc 2017-05-09 09:22:41 +08:00
ccli8 e7b737ddad [NUC472/M453] Fix serial error with sync/async calls interlaced
Serial implementation uses different vector handlers for sync/async calls respectively. The issue can be reproduced with the following flow:
1. Register sync mode callback with Serial.attach().
2. Sync call with Serial.putc()/getc().
3. Change to async call with Serial.write()/read().
4. Change back to sync call with Serial.putc()/getc().
Now, vector handller is still for async mode, not for sync mode.

To fix it:
1. Introduce internal function serial_enable_interrupt() for both sync/async vector handler enable/disable.
   Original HAL function serial_irq_set() is reduced to call it for sync mode vector handler enable/disable.
2. Introduce internal function serial_rollback_interrupt() to roll back sync mode vector handler at end of async transfer.
2017-05-02 09:31:09 +08:00
ccli8 32a7e6ba5e [NUC472/M453] Fix pwmout power-down condition 2017-04-20 16:13:37 +08:00
ccli8 e55553e749 [NUC472/M453] Fix DMA channel over-allocate 2017-04-20 14:57:09 +08:00
ccli8 40a9852608 [NUC472] Fix flash algorithm
1. Remove setting of not released register ICPCON
2. Enable FMC_APUEN to update APROM
2017-04-05 11:10:48 +08:00
cyliangtw b55708ec65 [NUC472] remove stray tabs to avoid formatting slips 2017-03-30 09:17:35 +08:00
cyliangtw c9e9052c5d [NUC472/M453] remove redundant comment of flash_api 2017-03-23 20:43:52 +08:00
cyliangtw ab814661e5 [NUC472/M453] Fixed scatterAssert of ROM limit 2017-03-23 15:25:08 +08:00
cyliangtw c1b8509b23 [NUC472] Enable HW AES 2017-03-23 10:03:58 +08:00
cyliangtw 1e163e8848 [NUC472/M453] Support bootloader 2017-03-23 09:54:03 +08:00
ccli8 d554f6e4e0 [NUC472/M453] Support flash 2017-03-23 09:54:03 +08:00
ccli8 5720725a3d [NUC472/M453] Refine serial PDMA code 2017-03-10 16:18:14 +08:00