Commit Graph

318 Commits (c5ad70c1e5ce060216419375c50350650b33488a)

Author SHA1 Message Date
Rajkumar Kanagaraj dfe4b533c3 Update Watchdog
- Changed the process into static method
 - used the singletonptr for creating the low power ticker instance
 - Added the mbed stub into cmake build for cellularnonipsocket,loramacrypto
2019-06-03 15:31:20 +02:00
Rajkumar Kanagaraj 696638afeb Incorporated the Reivew Comments 2019-06-03 15:24:03 +02:00
Rajkumar Kanagaraj 3c0cd62476 fix for spell check and header file 2019-06-03 15:24:01 +02:00
Rajkumar Kanagaraj f94eb3cf13 Fix for the Ci build issue 2019-06-03 15:24:01 +02:00
Rajkumar Kanagaraj 47030cd23f SW watchdog unittest cases
-Added the mock class function to mock mbed_assert_internal
  -Added the unit test case to test start,kick,stop
  -Modified the interface api name from is_alive to process
  -added the unit test cases for process
2019-06-03 15:23:59 +02:00
Rajkumar Kanagaraj bcea865db2 Add SW Watchdog
-SW watchdog has interface name start(),stop(),kick()	Sw watchdog internally has static list and shared across multiple instance of SW watchdog
	- Sw watchdog initialize timeout value,unique string via constructor whenever threads created sw watchdog object
	-Threads make sure pass proper timeout value,Unique string while creating the instance.
	-start() called by components(BLE,WIFI etc.,),it adds the entry into static list with few details current count ,etc.,
	-kick() called by registered components(BLE,WIFI etc.) to reset current count to zero.
        -is_alive - interface API to mbed_watchdog_manager
        -implementation optimization
2019-06-03 15:23:57 +02:00
Rajkumar Kanagaraj 3cd52d4732 Watchdog refactoring to multithreaded thread.
-Added API to register muliple threads to watchdog drivers
-Watchdog timeout reconfigures everytime whenever new register thread with longer timeout period
-New APIs for watchdog
 wd_register(const osThreadId_t tid, const uint32_t timeout) to register to watchdog
 wd_unregister(const osThreadId_t tid) to unregister to watchdog
 kick(const osThreadId_t tid) to refresh the watchdog
2019-06-03 15:23:56 +02:00
Rajkumar Kanagaraj 95e8e27e9b doxy spell check fix for watchdog 2019-05-24 12:28:23 +02:00
Donatien Garnier 91ef36809f Apply new astyle config style 2019-05-24 12:23:36 +02:00
Donatien Garnier 3ab0fbc7cf Update license headers 2019-05-24 12:23:35 +02:00
Steven Cartmell e7761a1d39 Move watchdog parameter validation into the driver layer 2019-05-24 11:35:22 +02:00
Steven Cartmell 7c392a16d4 Remove window and sleep mode options for watchdog API 2019-05-24 11:35:13 +02:00
Steven Cartmell 8fa38bb25b Add Watchdog driver API 2019-05-24 11:20:26 +02:00
Steven Cartmell 3c18dcb882 Amend reset reason driver API
- Change API to match C++ API throughout drivers
- Amend HAL API documentation to be more specific
2019-05-24 11:20:26 +02:00
Steven Cartmell 366893ae71 Add independent watchdog reference implementation for STM32 2019-05-24 11:20:25 +02:00
Martin Kojtal 64575fe586
Merge pull request #10480 from kjbracey-arm/spi_prime
SPI: Prime asynch transaction buffer on construction
2019-05-14 09:28:41 +01:00
Kevin Bracey 3fbad10337 SPI: Prime asynch transaction buffer on construction
SPI peripherals' asynch transaction buffers are now wrapped by
SingletonPtr, which needs to take the singleton_lock Mutex when first
accessed. If it was first accessed by an asynch transaction started from
IRQ, that would not be possible.

Add a SingletonPtr::get() call to the SPI construction process so that
the peripheral's buffer is fully constructed before any SPI methods can
be called, meaning asynch methods won't fail from IRQ.

(Other pre-existing synchronisation issues with async remain, but this
avoids a new trap in Mbed OS 5.12).
2019-04-25 17:19:01 +03:00
Martin Kojtal 8c696076fc
Merge pull request #10408 from sg-/docs-businout
Update comments and improve readability for the BusInOut class
2019-04-18 18:00:07 +01:00
Amanda Butler 04552a1409
Fix typos in BusInOut.h
Fix typos.
2019-04-17 15:12:19 -05:00
Martin Kojtal 14b9229b13
Merge pull request #10415 from 0xc0170/fix_licenses
rtos/drivers: add license information
2019-04-17 12:26:43 +01:00
Martin Kojtal 5a96f45ce0 license: fix files list 2019-04-16 11:43:14 +01:00
Martin Kojtal 5f985f56dc drivers: add license information 2019-04-16 11:29:14 +01:00
samgrove d88f2d9eed Update comments and improve readability for the BusInOut class 2019-04-15 14:58:24 -05:00
Kevin Bracey 380b27e741 Fix UARTSerial emergency unbuffered write
The length calculation in UARTSerial::write_unbuffered was wrong,
meaning it would truncate output data to half length.

This would show up if `platform.stdio-buffered-serial` was configured to
true, `platform.stdio-convert-newlines` was still false - `mbed_error`
crashes would be garbled.

This wasn't usually spotted because applications generally have both
settings false or both true, and if newline conversion is on, then
`mbed_error_puts` writes 1 character at a time to FileHandle::write,
avoiding the length error.
2019-04-09 16:15:09 +03:00
Cruz Monrreal d2c9d9ddc8
Merge pull request #9111 from embeddedteam103/can_signness_mismatch
CAN: Fix signness mismatch in `CANMessage` constructors
2019-04-01 17:06:09 -05:00
Cruz Monrreal ab22ab8ce3
Merge pull request #10150 from kjbracey-arm/timer_sleepcheck
Timer: remove hard-coded lp_ticker knowledge
2019-03-28 17:09:36 -05:00
Cruz Monrreal d7bec657ef
Merge pull request #10043 from ithinuel/add_vprintf_to_rawserial
add vprintf to Rawserial.
2019-03-28 17:09:29 -05:00
Cruz Monrreal d3db0a8c2d
Merge pull request #9476 from lrusinowicz/asynch_serial_api
Asynchronous Serial API fixes and refactoring
2019-03-28 17:09:22 -05:00
CoolUsername 6f3ad9a93b CR: Add signed overload 2019-03-26 16:11:50 +02:00
Ryan Morse 51a47139f3 Fixed issue with PWM not being freed when the object is destroyed 2019-03-21 07:48:42 -07:00
Kevin Bracey 534a3d2333 Timer: remove hard-coded lp_ticker knowledge
The knowledge that lp_ticker runs in deep sleep was hard-coded with a
comparison check of a ticker_data_t pointer against get_lp_ticker_data.

Remove this hard-coded check, which adds a linker dependency against
the low power ticker even if not being used - put a flag into the
ticker_interface_t.

A future extension might be to move this flag into the ticker_info_t
provided by the HAL, but for the moment keep the assumption that
lp_ticker does run, us_ticker doesn't.
2019-03-20 10:18:49 +02:00
Wilfried Chauveau 8b605069f7
add vprintf to Rawserial. 2019-03-15 07:07:16 +00:00
Martin Kojtal 7c9a71846e
Merge pull request #9469 from kjbracey-arm/spi_muxing
SPI upgrade - per-peripheral mutex and GPIO-based SSEL
2019-03-01 18:38:27 +01:00
Kevin Bracey b12be6bb80 Rename SPI_COUNT to DEVICE_SPI_COUNT
Avoid collision with some HALs that already define SPI_COUNT.
2019-03-01 14:37:04 +02:00
Kevin Bracey df7e3367f7 Cope with HALs not defining SPIName 2019-03-01 14:33:34 +02:00
Kevin Bracey 5e059b7d1d SPI upgrade - per-peripheral mutex and GPIO-based SSEL
This commit takes some of the work done on the SPI class from #8445, and
refines it, to provide the per-peripheral mutex functionality.

This also implements GPIO-based SSEL, which exposes a new
select()/deselect() API for users to group transfers, and should work on
every platform (unlike the HAL-based SSEL). This requires users to use a
new constructor to avoid backwards compatibility issues.

To activate the per-peripheral mutex, the HAL must define SPI_COUNT and
provide spi_get_peripheral_name().  (In #8445 this is a reworked
spi_get_module, but the name is changed here to avoid a collision with
existing HALs - this commit is designed to work without wider HAL
changes).

Fixes: #9149
2019-03-01 14:33:33 +02:00
Kevin Bracey 649856f3ff Implement enable calls in UARTSerial
Implement enable calls so that reception can be shut down to save
power without closing the device.
2019-02-22 11:01:01 +02:00
Leszek Rusinowicz 8586528ff6 Asynchronous Serial API fixes and refactoring, part 3
Updated API documentation to better explain API operation and to explicitly
point out that any event ends the operation.
2019-02-12 17:13:02 +01:00
Leszek Rusinowicz cbb84d8ad3 Asynchronous Serial API fixes and refactoring, part 2
Aborting of asynchronous operation is necessarily hazardous, as
operation can end in interrupt anywhere from the point of decision
until it is actually aborted down the abort_...() method.
Proper deep sleep unlocking requires then use of the critical
section and should be contained completely within API implementation.
2019-02-12 17:09:48 +01:00
Leszek Rusinowicz 6d648092e1 Asynchronous Serial API fixes and refactoring, part 1
1. As RX and TX flows are separate on Serial device, read and write
   functionalities should be completely separate, including any deep
   sleep locking etc.
2. User may want to use asynchronous API without a callback (especially
   for write operations), for example in a command-response scheme
   end of write operation is usually meaningless. The intuitive
   method is to submit NULL pointer for a callback. For this reason
   depending on the _callback field in determining whether the
   operation is in progress seems to be uncertain, so introduced
   additional flags for this purpose.
2019-02-12 17:04:19 +01:00
David Saada 48a3ae9636 FlashIAP driver: Add retries to erase and program operations.
Few boards may fail the write actions due to HW limitations (like critical
drivers that disable flash operations). Just retry a few times until success.
In addition, remove the redundant retries in NVStore (not needed now).
2019-01-30 16:05:27 +02:00
Przemyslaw Stekiel af02b23bf7 Fix for Issue #7308 (Deep_sleep_lock Ticker.h Issue) 2019-01-24 08:22:24 +01:00
kegilbert 70b9b753db Add doxygen spellcheck jobs to Travis
Currently tests
    - drivers
    - platform
    - rtos
    - events
    - features/netsocket
2019-01-11 10:22:15 -06:00
Martin Kojtal ab1c2be997
Merge pull request #8957 from InfernoEmbedded/fix-8913
Fix incorrect #ifdefs on DEVICE_FOO macros
2018-12-20 10:52:06 +00:00
Alastair D'Silva 2617c5d55b Don't use define checks on DEVICE_FOO macros (mbed code)
The DEVICE_FOO macros are always defined (either 0 or 1).

This patch replaces any instances of a define check on a DEVICE_FOO
macro with value test instead.

Signed-off-by: Alastair D'Silva <alastair@d-silva.org>
2018-12-20 10:16:42 +11:00
Alastair D'Silva 24dbfb6b09 Remove #ifdefs for DEVICE_SERIAL & friends
DEVICE_SERIAL is always defined (either 0 or 1).
Remove the faulty checks introduces in commit
26b9a1f6a3 and replace them with
value checks as originally implemented.

Fixes #8913

Signed-off-by: Alastair D'Silva <alastair@d-silva.org>
2018-12-20 09:42:02 +11:00
David Saada f3bac3451c Fix FLASHIAP_ROM_END macro for GCC_ARM & IAR toolchains
- Consider data section in GCC_ARM toolchain
- Consider init_array section in IAR toolchain
- Rename macro to FLASHIAP_APP_ROM_END_ADDR for clarity sake
2018-12-19 12:05:08 +02:00
embeddedteam103 0210cefa9e Add unsigned everywhere in the driver for
compatibility with the CAN HAL
2018-12-17 16:49:17 +02:00
Martin Kojtal aec8bb6046 drivers: add spdx license 2018-11-28 10:39:50 +00:00
Russ Butler caa7b93921 Rename lock functions and classes
Invert the name of the lock functions and classes so you are not
locking a negative.
2018-11-27 09:29:32 +00:00