Commit Graph

1208 Commits (a7bf31210677d72cfbd0cc94fe12227149b3c680)

Author SHA1 Message Date
Russ Butler 1821d37621 Overhaul MPU for new requirements
Make the following changes:
-Allow a vector specific ARM MPU driver by defining MBED_MPU_CUSTOM
-Allow ROM address to be configured for ARMv7-M devices by
    setting the define MBED_MPU_ROM_END
-Add ROM write protection
    -Add new functions and lock
    -enable at boot
    -disable during flash programming
2018-11-27 09:29:32 +00:00
Russ Butler 7283f9b0ee Add a formal HAL specification for the MPU API
Add a formal HAL specification consisting of:
-defined and undefined behavior
-test descriptions
-enable doxygen for MPU
2018-11-27 09:29:32 +00:00
Russ Butler a4aa5eaf93 Add v8m MPU
Add a driver for the v8m MPU.
2018-11-27 09:29:32 +00:00
Russ Butler d00f59fdc8 Rework MPU layout for future changes
Create a dedicated MPU directory for standard Arm MPU implementations
in preparation for the Arm v8m MPU. Replace MBED_MPU_ENABLED with
DEVICE_MPU to align with the porting layer of other HAL APIs.
2018-11-27 09:29:31 +00:00
Russ Butler 0f5b9eaf94 Add an initial MPU API
Add a minimalistic HAL MPU API with the ability to prevent execution
in ram.
2018-11-27 09:29:31 +00:00
David Saada 542744d03c Support erase value in Flash HAL drivers, FlashIAP and block devices 2018-11-07 14:23:07 +02:00
Cruz Monrreal 5ed07c2dd4
Merge pull request #8328 from kjbracey-arm/noreturn
Error path tightening: use MBED_NORETURN; add+use core_util_atomic_flag
2018-10-29 20:49:54 -05:00
Kevin Bracey 0b27736536 Remove sleep manager tests that trigger mbed_error
Intercepting mbed_error will be too hard after mbed_error becomes
[[noreturn]], so remove tests that do this.
2018-10-29 13:58:05 +02:00
Cruz Monrreal 3f5eeac29d
Merge pull request #8279 from fkjagodzinski/fix-lp_ticker_wrapper-suspend
Fix LowPowerTickerWrapper operation when suspended
2018-10-26 11:39:12 -05:00
Martin Kojtal 4b3a031087 low power ticker: fix astyle 2018-10-25 09:58:17 +01:00
Filip Jagodzinski effabc5271 lp ticker wrapper: Add undefined behavior warning 2018-10-19 17:32:31 +02:00
Filip Jagodzinski 023603faa7 Fix LowPowerTickerWrapper operation when suspended
Update the LowPowerTickerWrapper class logic to stop using its internal
Timeout object for scheduling LP ticker interrupts after the wrapper has
been suspended.

Fixes #8278
2018-10-19 17:30:47 +02:00
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