Commit Graph

17 Commits (52cb11957165f56f01632dbe7c07e0fcc3dc05a7)

Author SHA1 Message Date
Laurent MEUNIER c3d5daf80a Update STM32 16 bits us_tickers in line with new mbed HAL
The new HAL allows to share the timer bit width and frequency,
the actual handling of mapping 16 bits counter up to 32 bits or
64 bits is now managed by mbed common layer.

This makes this ticker layer very similar to 32bits one and much
easier than before.
2018-05-25 12:20:10 -05:00
Wilfried Chauveau 758f3b2dbd add support for the RAK811 2018-03-23 10:19:49 +00:00
bcostm 5bf18682e2 Add FREEZE_TIMER_ON_DEBUG condition
In order to give the choice to enable or not the timer freeze on stop/breakpoint.
This has to be defined in the mbed_app.json file for example.
2017-09-18 13:39:05 +02:00
Jimmy Brisson 9b85155aa7 Merge pull request #4881 from betzw/betzw_freeze_github_wb
[STM32F401xE] Freeze master timer on stop/breakpoint
2017-09-06 14:25:47 -05:00
Wolfgang Betz f8114f2295 [STM32F401xE] Freeze master timer on stop/breakpoint 2017-08-28 14:29:47 +02:00
Wolfgang Betz 4fe8e8ca44 Align HAL & US tickers 2017-07-25 13:25:09 +02:00
Laurent MEUNIER 7bcabf7cc0 STM32 16 bits tickers: remove unused prototype
Since rework, this prototype is not needed anymore.
2017-06-05 13:12:20 +02:00
Laurent MEUNIER 35c68859c0 STM32: 16 bits ticker, fixes in set function and handler
This commit simplifies ticker interrupt set function and handler.

There were issues around the 16 bits timer wrap-around timing as we were
aligning interrupts with wrap-around limits (0xFFFF) and then reading
TIM_MST->CNT again in timer_update_irq_handler which could lead
to crossing case with the wrap-around (TIM_FLAG_UPDATE) case.

Now we're using the 16 lower bits of the timestamp as the reference from
using in set_compare and never changing it. There is also no need to set
comparator again in timer_update_irq_handler. This is more robust and
also more efficient.
2017-06-05 13:12:20 +02:00
Laurent MEUNIER b9b5f0b929 STM32 16bits ticker: rework us_ticker_read()
Move to a single more reliable implementation of us_ticker_read()
There were historically 2 versions of us_ticker_read() implementation.

The one removed here was not reliable because us_ticker_read() can be
called in interrupt context which means that TIM_MST->CNT would have
wrapped around while SlaveCounter is not yet updated. So there is a need
to check the TIM_FLAG_UPDATE inside this function, which was not done in
the implementation that is removed here.
2017-06-05 13:12:20 +02:00
Laurent MEUNIER 675d78d180 STM32 remove usage of deprecated MACROs 2017-05-09 16:48:34 +02:00
Laurent MEUNIER b15fc6a6b5 STM32: TIM: Initialize new TIM parameter 2017-01-10 16:53:20 +01:00
jeromecoutant e1f4d69109 STM32L0 : correct ST HAL API call
- RCC init: unused clock was enabled without any init parameters
- ADC: a parameter setting was missing
- GPIO: mode was not allowed by ST HAL API
- tick: init value was too high for 16b
2016-12-14 11:10:03 +01:00
bcostm 18dc6f4f81 Remove TIM_IT_UPDATE flag in HAL_Suspend/ResumeTick functions to make LPT tests pass. 2016-11-30 11:31:25 +01:00
bcostm da23ef135e Update license + date (same license as in mbed.h file) 2016-11-14 10:01:07 +01:00
bcostm 2006e458fd Typo corrections (functions declaration) 2016-11-14 09:56:54 +01:00
bcostm f8e18cdde4 Change TimMasterHandle variable declaration + typo corrections 2016-11-14 09:31:14 +01:00
bcostm 6baec10d29 Rename files (remove stm_ prefix) 2016-11-14 09:31:14 +01:00