Commit Graph

1196 Commits (8f07b9ebd5d4a95b33907662d1252db0f8dd7a6c)

Author SHA1 Message Date
Filip Jagodzinski f2c222be15 Tests: SleepManager: extend test suite
New test cases:
* "deep sleep lock/unlock"
* "deep sleep unbalanced unlock"
* "deep sleep locked USHRT_MAX times"
* "deep sleep locked more than USHRT_MAX times"
* "sleep_auto calls sleep/deep sleep based on lock"
2018-10-09 17:52:42 +02:00
Martin Kojtal 962273c4a1
Merge pull request #8029 from OpenNuvoton/nuvoton_fix_lpticker_wrapper
Fix issues with LowPowerTickerWrapper
2018-09-19 13:44:40 +02:00
Martin Kojtal 3d94fb889b
Merge pull request #7903 from tkem/fix/cleanup-include-paths
Clean up include paths.
2018-09-19 12:16:09 +02:00
Martin Kojtal 9abcbf6acf
Merge pull request #7901 from deepikabhavnani/warning_fix
Compiler Warning fixes
2018-09-17 14:29:15 +02:00
ccli8 5b90b4ca97 Fix issues with LowPowerTickerWrapper
1. Complement _ticker_match_interval_passed with '_last_set_interrupt == _cur_match_time' for pass check
2. Fix 'too close' check with _min_count_until_match
2018-09-07 15:04:54 +08:00
Deepika 4d7fdfc2a9 Use MbedCRC for LittleFS (0xEDB88320)
CRC used in LittleFS is Reversed ANSI, hence new polynomial added.
Reversed polynomials perform shift in reverse direction of standard
polynomial, and we do not have option to notify reverse shift to hardware.
Hence this option is available in software only.
2018-09-02 15:25:40 -05:00
Thomas Kemmer a16c374725 Clean up include paths. 2018-08-27 20:47:19 +02:00
Deepika 64d3bd8199 Fixed: comparison between signed and unsigned integer expressions 2018-08-27 10:34:58 -05:00
Cruz Monrreal 2f8e679183
Merge pull request #7592 from orenc17/remove_uvisor
Remove uVisor from mbed-os
2018-08-25 19:52:24 -05:00
Oren Cohen 787317b7eb Remove uVisor from mbed-os 2018-08-22 16:36:59 +03:00
Maciej Bocianski 883ea2f1d1 astyle fixes on QSPI API/driver/tests 2018-08-22 15:02:15 +02:00
Martin Kojtal d444abcc96 QSPI: fix doxy hal documentation 2018-08-22 15:02:02 +02:00
Martin Kojtal 99f2107881 QSPI: hal doxygen fixes
Small corrections, fixing typos in the documentation
2018-08-22 15:00:15 +02:00
Martin Kojtal 784c473f63 QSPI HAL: add disabled flag to format phase
If phase is being skipped, set disabled to true, otherwise false.
2018-08-22 15:00:08 +02:00
Martin Kojtal 1d234aade4 QSPI HAL: fix alternative comment 2018-08-22 15:00:06 +02:00
Senthil Ramakrishnan 2df58e2d25 Modify QSPI HAL API to include an API for command-transfer operations 2018-08-22 14:59:59 +02:00
Martin Kojtal a3c8117b0e QSPI: fix command declaration names 2018-08-22 14:59:58 +02:00
Martin Kojtal 10e7b5f6d0 QSPI: improve mode documentation
SPI mode means Clock polarity and phase mode (0 - 3)
2018-08-22 14:59:57 +02:00
Martin Kojtal 4564383ba8 QSPI: change length to be in/out parameter
This provides a way to return how many bytes have been written/read (as status codes
are returned via func ret value)
2018-08-22 14:59:57 +02:00
Martin Kojtal 510d743051 QSPI: fix address/alt variable sizes (can be skipped)
Fixing by adding NONE values for both
2018-08-22 14:59:56 +02:00
Martin Kojtal b3037afae4 QSPI HAL addition
Adding new QSPI HAL header file. This should help to use memory-maped devices
as memories, graphical displays.

The API consist of few functions, most important are read/write/write_command functions.

The command format is:

```
----------------------------------------------
| Instruction | Address | Alt | Dummy | Data |
----------------------------------------------
```

We define only synch API at the moment.
2018-08-22 14:59:56 +02:00
Cruz Monrreal e02466a77a
Merge pull request #7524 from c1728p9/tickless_fix
Fixes for tickless and LPTICKER_DELAY_TICKS
2018-08-21 10:03:41 -05:00
Martin Kojtal 5b751e8be7
Merge pull request #7599 from c1728p9/double_low_power_ticker_interrupt
Fix double low power ticker interrupt
2018-08-20 18:00:55 +02:00
Russ Butler dc2e2c0ce0 Speed optimization for LowPowerTickerWrapper
Only reschedule the Timeout object in the low power ticker wrapper
if it is not already pending.
2018-08-17 11:59:01 -05:00
Russ Butler adc64cccac Update low power ticker wrapper
Update the low power ticker wrapper code so it does not violate any
properties of the ticker specification. In specific this patch fixes
the following:
- Prevent spurious interrupts
- Fire interrupt only when the ticker times increments to or past the
    value set by ticker_set_interrupt
- Disable interrupts when ticker_init is called
2018-08-17 09:29:41 -05:00
Russ Butler 472ababfef Update deep sleep lock check in tests
When the define LPTICKER_DELAY_TICKS is set deep sleep can be randomly
disallowed when using the low power ticker. This is because a Timer
object, which locks deep sleep, is used to protect from back-to-back
writes to lp tickers which can't support that. This causes tests which
assert that deep sleep is allowed to intermittently fail.

To fix this intermittent failure this patch adds the function
sleep_manager_can_deep_sleep_test_check() which checks if deep sleep
is allowed over a duration. It updates all the tests to use
sleep_manager_can_deep_sleep_test_check() rather
than sleep_manager_can_deep_sleep() so the tests work even if deep
sleep is spuriously blocked.
2018-08-17 09:29:41 -05:00
Russ Butler 23e6d50000 Add ticker suspend/resume API
Add an API to suspend and resume the ticker.
2018-08-17 09:29:40 -05:00
Cruz Monrreal f62e1032af
Merge pull request #7600 from c1728p9/remove_unnecissary_low_power_ticker_rescheduling
Remove unnecessary low power ticker rescheduling
2018-08-16 13:37:01 -05:00
Przemyslaw Stekiel 629718bc7f Remove requirements for ticker free function 2018-08-14 08:08:11 +02:00
Russ Butler e69ecaab57 Don't reschedule ticker while dispatching
Wait until dispatching is finished before scheduling the next ticker
interrupt. This prevents unnecissary calls to set_interrupt from
periodic elements being added back.

This is particularly useful for the low power ticker on devices with
LPTICKER_DELAY_TICKS set to a non-zero value. This is because the low
power ticker cannot be reschduled immediately and needs to fall back
onto the microsecond ticker which temporarily locks deep sleep.
2018-07-25 23:24:12 -05:00
Russ Butler c36b58a05b Fix double low power ticker interrupt
When computing the next set_interrupt time in the common ticker layer
the absolute time in microseconds is rounded down to the closes low
power tick. Because of this the low power ticker interrupt fires one
cycle too early. This causes ticker_irq_handler to run even though
there are no events ready to run.

To prevent this unnecessary interrupt this patch changes the
computation for the next set_interrupt time to round up rather than
down.
2018-07-25 23:21:24 -05:00
Przemyslaw Stekiel 0f9ce651e7 Add ticker_free() function to the ticker interface. 2018-07-25 08:54:51 +02:00
Przemyslaw Stekiel 28d8f4595f Add requirements and pseudo code for HAL ticker_free() function. 2018-07-25 08:54:50 +02:00
Kevin Bracey 0f98338153 Improve efficiency and formatting of ITM output
SerialWireOutput was outputting 1 character per 32-bit write to the
ITM stimulus port. This is inefficient, and causes processing problems
with some viewers due to them receiving 3 NUL bytes between each
desired character.

Rework to allow us to be more efficient, and eliminate those NUL bytes:

* Retain existing mbed_itm_send() and clarify it's a single 32-bit write.
* Add new mbed_itm_send_block() that is appropriate for sending
  character data, and modify SerialWireOutput to use it.
* Move "wait for FIFO ready" check to before the write, rather than
  after.

One minor correction - FIFOREADY is a single bit of the register read.
Don't interpret reserved bits.
2018-07-04 10:16:28 +03:00
Martin Kojtal 483427a285 hal: astyle update 2018-06-29 10:36:36 +01:00
Przemyslaw Stekiel 307021ec23 Add testing requirements to HAL CRC header file. 2018-06-07 10:17:21 +02:00
Marc Emmers b01b173214 Only schedule mbed_ticker interrupt if queue->head is changed
Reverts change from commit 1057720114
2018-05-30 11:36:20 +02:00
Bartek Szatkowski 93a7db5d84 Add clarification to rtc_free doxygen 2018-05-25 12:49:11 -05:00
Przemyslaw Stekiel 5a79655d05 Modify rtc_api.h header file - update tests specification. 2018-05-25 12:49:11 -05:00
Russ Butler 1f97f11373 Add documentation and test the HAL RTC API
Add requirements, tests, an example implementation and additional
function documentation to the HAL RTC API.
2018-05-25 12:37:19 -05:00
Russ Butler 77637682a0 Keep RTC API prototypes even when not enabled
Keep the prototypes in rtc_api.h even when DEVICE_RTC is not defined.
This allows devices that aren't fully compliant with the RTC API to
still use the header and prototypes.
2018-05-25 12:33:43 -05:00
Bartek Szatkowski efd307fa79 Rename new occurrences of LOWPOWERTIMER to LPTICKER 2018-05-25 12:33:43 -05:00
Bartek Szatkowski 95559ad3e1 Change LPTICKER spec to allow clock freq starting at 4kHz 2018-05-25 12:32:39 -05:00
Marc Emmers ce79492154 Updated types according to header changes 2018-05-25 12:29:55 -05:00
Marc Emmers d35b29830b Changed struct position to try to maintain binary compatibility
Changed comment because a lot of numbers are divisible by 2
2018-05-25 12:29:55 -05:00
Marc Emmers 1aaef7bc12 mbed_ticker_api remove specific case for 32768 in favor of all frequencies divisible by 2 2018-05-25 12:29:55 -05:00
jeromecoutant 12b3df7773 #6536 rebase correction 2018-05-25 12:26:05 -05:00
Bartek Szatkowski ba963b4453 Rename lp_us tests to common and hf to microsecond 2018-05-25 12:20:09 -05:00
Bartek Szatkowski 6e9f04bf2f Rename DEVICE_LOWPOWERTIMER to DEVICE_LPTICKER
That's to match DEVICE_USTICKER.
2018-05-25 12:20:09 -05:00
Przemyslaw Stekiel f55f9d36fb lp_ticker test - provide lp ticker glitch test case
Test that lp ticker does not glitch backwards due to an incorrectly implemented ripple counter driver.
2018-05-25 12:18:55 -05:00