Commit Graph

12 Commits (6ee4c7e21963b184b1f93c0bf9375b583dbc9051)

Author SHA1 Message Date
Sam Grove 72de85c62f Merge pull request #4417 from monkiineko/master
STM32: Fix 32-bit us ticker interrupt scheduling
2017-06-06 19:59:52 -05:00
Bradley Scott 260378e774 STM32: Fix 32-bit us ticker interrupt scheduling
For STM32 targets using a 32-bit timer for the microsecond ticker, the
driver did not properly handle timestamps that are in the past.  It
would just blindly set the compare register to the requested timestamp,
resulting in the interrupt being serviced up to 4295 seconds late
(i.e. after the 32-bit timer counts all the way around to hit the
timestamp again).

This problem can easily be reproduced by creating a Timeout object
then calling the timeout's attach_us() member function to attach a
callback with a timeout of 0 us.  The callback will not get called for
over 2147 seconds, and possibly up to 4295 seconds late if no other
microsecond ticker events are getting scheduled in the meantime.

Now, after the compare register has been set, the timestamp is checked
against the current time to see if the timestamp is in the past, and
if so, the compare event is manually set.

NOTE: By checking if the timestamp is in the past after configuring the
capture register, we ensure proper handling in the case where the timer
updates past the timestamp while setting the capture register.
2017-06-01 12:52:03 -04:00
Bartek Szatkowski b97ffe8fdc CMSIS5: Replace target defined NVIC_Set/GetVector with CMSIS implementation 2017-05-30 18:55:51 +01:00
jeromecoutant 927cba8fa5 STM32F4: remove deprecated macro 2017-05-11 12:38:49 +02:00
jeromecoutant 39d981cf70 STM32Cube_FW_F4_V1.16.0
CMSIS v2.5.0 => v2.6.1
STM32F4 HAL v1.5.0 => v1.7.1
2017-05-10 10:00:42 +02:00
Kevin Gilbert 28d1ac5a44 Added mapping to USER_BUTTON-labelled switches
Revert HRM1017 file source deletion

Added in small comment next to additions

Added mapping to BTN-labelled switches

Added mapping to USER_BUTTON-labelled switches

Undo incorrect mapping to SWIO pin in NORDIC target
2017-04-28 11:37:23 -05:00
jeromecoutant 613cc3d6d9 STM32F4 Internal ADC channels rework
Internal ADC pin are now out of PinMap_ADC array.
2017-04-11 10:12:25 +02:00
Sam Grove 2352ee49a4 Revert "STM32F4 Internal ADC channels rework" 2017-04-10 12:08:15 -05:00
Sam Grove 0559aa431c Merge pull request #4126 from jeromecoutant/PR_F4_PIN_LEVEL0
STM32F4 : remove SERIAL_TX and SERIAL_RX from available pins
2017-04-10 11:09:51 -05:00
jeromecoutant d740bde646 STM32F4 : remove SERIAL_TX and SERIAL_RX from available pins
Pins are used for debug printf
2017-04-06 13:58:06 +02:00
jeromecoutant d599579328 STM32F4 Internal ADC channels rework
Internal ADC pin are now out of PinMap_ADC array.
2017-04-06 10:59:49 +02:00
adustm a9ef00231c STM32F410xB folder structure update 2017-01-27 15:41:49 +01:00