Commit Graph

94 Commits (cb9b2b0456203525289ec4d78720465d7d137467)

Author SHA1 Message Date
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 85cc9c8381 Remove deprecated RTX4 config options 2017-05-30 18:55:55 +01:00
Bartek Szatkowski b793a3fb89 Update codebase for CMSIS5/RTX5
Update all of mbed-os to use RTX5.
2017-05-30 18:55:52 +01: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
ccli8 502e8ce2a5 [NUC472/M453] Refine SPI PDMA code 2017-03-10 16:18:14 +08:00
ccli8 867072fe70 [NUC472/M453] Add dma_modbase() to get PDMA base address 2017-03-10 16:18:14 +08:00
ccli8 49a2a221a4 [NUC472/M453] Fix pwmout power-down condition 2017-03-10 16:18:14 +08:00
ccli8 4e96f8b721 [NUC472/M453] Fix PDMA error on timeout 2017-03-10 16:18:14 +08:00
ccli8 1da33e809f [NUC472/M453] Refine pin/peripheral/pin map definitions
Change NUC472 analogin_api.c accordingly
2017-03-10 16:18:14 +08:00
ccli8 4e4c294fa3 [NUC472/M453] Fix incorrect use of peripheral name as peripheral base address 2017-03-10 16:18:14 +08:00
Christopher Haster aff49d8d1e Renamed files in platform to match source names
critical.h     -> mbed_critical.h
sleep.h        -> mbed_sleep.h
toolchain.h    -> mbed_toolchain.h
rtc_time.h     -> mbed_rtc_time.h
semihost_api.h -> mbed_semihost_api.h
wait_api.h     -> mbed_wait_api.h
2017-02-22 18:17:54 -06:00
ccli8 0bd8fb22c4 [NUC472] Support no-XRAM configuration 2017-02-14 09:12:02 +08:00
Sam Grove d8151d7991 Merge pull request #3590 from OpenNuvoton/nuvoton
[NUC472/M453] Export IAR project and other bugfixes
2017-02-13 10:12:02 -06:00
Bartek Szatkowski 6a045a49a9 Platform: Add sleep/deepsleep user facing functions
Add sleep/deepsleep functions to platform layer which are replacing HAL
functions with the same name, rename existing symbols in HAL layer
to hal_sleep/hal_deepsleep. This way sleep functions
are always available, even if target doesn't implement them, which makes
the code using sleep clearer. It also enables us to make decision on in
which builds (debug/release) the sleep will be enabled.
2017-01-19 09:39:29 +00:00
ccli8 0a0b326da6 [NUC472/M453] Change sbrk() allocation to be 32-byte aligned 2017-01-16 09:48:27 +08:00
ccli8 453f60e9c1 [NUC472/M453] Remove power-down support from us_ticker 2017-01-16 09:48:21 +08:00
Martin Kojtal e7361ebc44 Merge pull request #3365 from OpenNuvoton/nuvoton_usb
[NUC472/M453] Support USB device
2016-12-30 12:43:53 +01:00
ccli8 fff8357c1e [NUC472] Fix compile error with Travis CI
Use MBED_CONF_RTOS_PRESENT to filter out mbedtls alternative for mbed OS 2.
2016-12-15 11:43:43 +08:00
cyliangtw e4a5401b9b [NUC472/M453] Fix GCC warnings 2016-12-13 15:41:41 +08:00
ccli8 64e27b2e3d [NUC472/M453] Fix stuck in lp_ticker_init() 2016-12-13 11:10:51 +08:00
cyliangtw ec945db013 [NUC472] Resolve TRNG GCC warning 2016-12-13 11:10:51 +08:00
ccli8 3ff2df1875 [NUC472] Fix compile error for SHA-256 alternative on some condition
Also include non-issue refinement for SHA-1/SHA-256 alternatives.
2016-12-13 11:10:51 +08:00
ccli8 6af60f9b32 [NUC472/M453] Fix PWM clock error in BSP driver 2016-12-13 11:10:51 +08:00
ccli8 f796eb5d2d [NUC472/M453] Change UART RTS/CTS to low level active 2016-12-13 11:10:51 +08:00
ccli8 59e38666ae [NUC472/M453] Fix serial async transfer failed as data with is 16/32 2016-12-13 11:10:51 +08:00
ccli8 8c0948d605 [NUC472/M453] Integrate with Travis CI
1. Add targets into build_travis.py and tests.py.
2. Add target SPI pins into SPI SD test samples.
3. Rename target TOOLCHAIN_GCC_ARM/retarget.c to avoid name collision of compiled retarget.o with platform/retargets.cpp.
2016-12-09 13:46:38 +08:00
ccli8 7f4881fbb2 [NUC472/M453] Support USB device 2016-12-05 15:12:15 +08:00
ccli8 e1995dbe79 [NUC472/M453] Fix spi_master_transfer failed as bit width is 32 2016-11-25 15:32:25 +08:00
ccli8 137053343e [M453] Fix button naming error 2016-11-23 14:35:09 +08:00