Commit Graph

159 Commits (f3e15ebfa3d142c432db8526fc4fc019adb79129)

Author SHA1 Message Date
Alessandro Angelino eb9d124230 K64F: Add uVisor sections to the linker script
This commit includes all sections that are just added to the linker
script. These changes are backwards-compatible, meaning that they will
not affect the existing code.

Targets that do not support uVisor will leave those sections empty.
2016-06-10 16:56:17 +01:00
Vincent Coubard 6315f8e486 Fix function is_in_wrapped_range, the function where returning false when
instead of true when begin <= val < end. The documentation was correct but
not the code.
2016-06-10 14:46:11 +01:00
bcostm 6e645e50e8 Add USART force/release Reset at Init phase 2016-06-10 11:56:42 +02:00
bcostm ec36ce72c8 Add force/release reset during Serial init phase 2016-06-10 11:26:15 +02:00
svastm fe2871b8bd [STM32L4XX] rename startup file to .S 2016-06-10 09:48:55 +02:00
svastm a1b9e560e2 [STM32L4XX] Fix heap size for uARM 2016-06-10 09:48:55 +02:00
tomoyuki yamanaka 8f3e72f01c Implement SystemCoreClockUpdate () function 2016-06-10 16:16:06 +09:00
tomoyuki yamanaka 0a9e5fa3d6 Implement SystemCoreClockUpdate () function
We changed to calculare the CPU Clock by the division ratio setting of from FRQCR register.
2016-06-10 16:13:35 +09:00
Russ Butler 9d7ca3e405 KSDK2 - restore interrupts in InstallIRQHandler
Restore the state of interrupts inside InstallIRQHandler rather than
leaving them enabled.
2016-06-09 18:27:22 +01:00
bcostm 7e486d8d3b Add USART force/release Reset at Init phase 2016-06-09 17:16:06 +02:00
jeromecoutant 6c31f3c110 STM32Cube_FW_F0_V1.6.0
CMSIS v2.2.3 => v2.3.0
STM32F0 HAL v1.3.1 => v1.4.0
2016-06-09 17:14:02 +02:00
Martin Kojtal 7d583e5541 Merge pull request #1853 from svastm/update_cube_l4
[STM32L4XX] Update HAL_Cube_L4 to 1.5.1
2016-06-09 11:35:35 +01:00
Martin Kojtal 2197b87cca Merge pull request #1886 from kjbracey-arm/gpio_no_fsl
Don't pull KSDK FSL libraries into apps
2016-06-09 11:12:09 +01:00
Martin Kojtal f7e6a0f9ca Merge pull request #1879 from sbutcher-arm/mbedtls-entropy-collector
Add entropy collector for K64F to mbed HAL for use in mbed TLS
2016-06-09 11:07:24 +01:00
Kevin Bracey ecff7753fc Don't pull KSDK FSL libraries into apps
Freescale KSDK2 gpio_object.h pulled in Freescale libraries to inline
some GPIO operations.

The resulting namespace pollution (status_t) doesn't seem to be worth
the function call overhead. Hopefully making the base address array
non-automatic will offset that loss.
2016-06-09 10:28:56 +01:00
svastm 92688edc31 [STM32L4XX] Reset UART on init 2016-06-09 11:25:51 +02:00
svastm 2f29b9af2e [STM32L4XX] Fix deinit of SystemCoreClock on ARM toolchain 2016-06-09 11:25:51 +02:00
svastm 32bca79452 [STM32L4XX] Init daylight saving time 2016-06-09 11:25:51 +02:00
svastm a29e15e07c [STM32L4XX] Update HAL_Cube_L4 to 1.5.1 2016-06-09 11:25:51 +02:00
Simon Butcher f450786174 Add entropy collector for K64F to mbed HAL for use in mbed TLS
mbed TLS requires an entropy source, and this provides support for one through
the K64F RNG.
The macro MBEDTLS_ENTROPY_HARDWARE_ALT also added to target.json to enable use
of the entropy collector by mbed TLS.
2016-06-09 00:51:14 +01:00
Martin Kojtal d7a196e89e Merge pull request #1826 from jeromecoutant/PR_UpdateF0_driver_v1_5_0
[STM32F0] update Cube driver to v1.5.0
2016-06-08 14:11:59 +01:00
Martin Kojtal 5c60eb61d0 Merge pull request #1867 from rgrover/master
introduce the CMSIS Storage driver and its implementation for K64F
2016-06-08 13:56:27 +01:00
Martin Kojtal c9a15d0530 Merge pull request #1854 from pan-/nrf51_port
RTOS port for NRF51 targets
2016-06-08 13:52:32 +01:00
Rohit Grover 93564b6b57 add a missing extern to a global declaration of a status register 2016-06-08 11:23:44 +01:00
Rohit Grover 0986c54b20 guard code within DEVICE_STORAGE
as required by mbedmicro
2016-06-08 11:16:57 +01:00
Mahesh Mahadevan 847d3aa37b Fix for Issue# 1834 (#1871)
Explicitly disable the config for differential conversion

Signed-off-by: Mahadevan Mahesh <Mahesh.Mahadevan@nxp.com>
2016-06-08 09:39:00 +01:00
Bartosz Szczepanski 5562f9a40a [STM32] Move CAN device.h defines to targets.json
This patch moves all CAN defines, for all STM32 boards with CAN support, to
targets.json file.

Change-Id: Ic3335cd4237e646d849b3554de69a9048846b186
2016-06-08 09:24:46 +02:00
Martin Kojtal 02bb0df4dc Merge pull request #1797 from 0xc0170/dev_k64f_hal_additions
k64f - mac address - fix warnings - get UID via K64F SIM macros
2016-06-07 16:02:40 +01:00
Rohit Grover 4651075403 introduce the CMSIS Storage driver and its implementation for K64F 2016-06-07 13:36:51 +01:00
Russ Butler ec81bccb01 Fix support for InterruptManager on KSDK 2
Add the define NVIC_NUM_VECTORS for KSDK 2 targets so InterruptManager
is supported.
2016-06-07 09:56:15 +01:00
Martin Kojtal 02ce61d802 Merge pull request #1774 from BartSX/can-devel-l4
[STM32L4xx] CAN development for STM32L4xx family
2016-06-07 07:45:42 +01:00
Martin Kojtal fc9bd4c27a Merge pull request #1858 from BartSX/f103
[NUCLEO_F103RB] Revert and update path for 16-bit timer
2016-06-06 17:39:18 +01:00
Jimmy Brisson 32075c38e4 added extra_labels_add checking to script
and moved a previously missed device.h file to targets.json
2016-06-06 10:33:58 -05:00
Bartosz Szczepanski f2c824cd54 [NUCLEO_F103RB] Revert and update path for 16-bit timer
Due to directory structure change, modification in e93878078 was made wrong
after rebasing the code.

This reverts commit e938780788 and updates path
to the correct file.

Note:
Current value of TIM_MST->CNT is read in interrupt context only.
This avoids master timer overflow without SlaveCounter update.

Continuation of patch: 07b841b08f

Change-Id: Iab0341847130f86e16500fd85024b6a87525fe14
2016-06-06 16:39:03 +02:00
Bartosz Szczepanski 10cce638a2 [NUCLEO_L476RG] Added CAN support
Added CAN API support for NUCLEO_L476RG target.

"stm32l476xx.h" file was changed to avoid compilation errors.

Change-Id: Ifadf7048f6c72c0311ec915e47ce2190460ede68
2016-06-06 16:20:46 +02:00
Bartosz Szczepanski 155d38ef9e [DISCO_L476VG] Added CAN support
Added CAN API support for DISCO_L476VG target.

*stm32l476xx.h* file was changed to avoid compilation errors.

NOTE: MBED_29 or MBED_30 cannot be tested on this platform because CAN pins are
soldered to USB, GYRO and others.

Change-Id: I2e85bd36dc45872b1ab617f072de98164f2c96f8
2016-06-06 16:19:11 +02:00
Bartosz Szczepanski 7a262f1b2d Added CAN API for STM32L4xx family
* STM32L4xx family have only one CAN bus

Change-Id: I95dcffac2176dba6d89850e24ba9561c11319f00
2016-06-06 16:04:31 +02:00
Martin Kojtal 0d3c83589b Merge pull request #1846 from jamike/fix-issue-1845
[NUCLEO_L476RG, DISCO_L476VG]: GCC_ARM, ARM_STD fix RTOS failed
2016-06-06 14:52:44 +01:00
Vincent Coubard 55a35f9b9b Use attributes from toolchain.h instead of compiler specific declaration. 2016-06-06 13:59:17 +01:00
Bartosz Szczepanski bafd20f561 [DISCO_F746NG] Added CAN support
Added CAN API support for DISCO_F746NG target.

Change-Id: I3b475309ab9b08c2e0ca1e8fe7e10489b8256321
2016-06-06 13:28:00 +02:00
Bartosz Szczepanski 4d22e94156 [NUCLEO_F746ZG] Added CAN support
Added CAN API support for NUCLEO_F746ZG target.

Change-Id: Ib9d416125671e3e1f1ef89e88e6da66f4c457f02
2016-06-06 13:28:00 +02:00
Bartosz Szczepanski 19f0c58514 Added CAN API for STM32F7xx family
Change-Id: I0f04f28d0d737e01eff737dfcab375c155d4f704
2016-06-06 13:10:47 +02:00
Bartosz Szczepanski 6e77543313 [NUCLEO_F103RB] Added CAN support
Added CAN API support for NUCLEO_F103RB target.

Change-Id: Ib5dac8023917afef683ba0703d732bbf53efdcd9
2016-06-06 13:00:03 +02:00
Bartosz Szczepanski 8b44c0d54b Added CAN API for STM32F1xx family.
* STM32F1xx family have only one CAN bus

Change-Id: Ie1c82a22e1483fc5d389b958d062f561770f9004
2016-06-06 12:53:51 +02:00
Vincent Coubard e46b659799 Merge branch 'master' of https://github.com/mbedmicro/mbed into nrf51_port 2016-06-05 20:46:42 +01:00
Vincent Coubard c0a6c7c6d4 Better generation of heap section.
With this change, the heap section occupy the whole space from the end of
the bss section to the start of the stack section instead of taking a
fixed size in RAM.

This change allows applications to make a more efficient use of the RAM
available and allows application to be compiled if the space between end
of bss and start of stack is less than 2048 bytes.
2016-06-05 17:56:01 +01:00
Jimmy Brisson dbeee2ab69 added device MICRONFCBOARD's provides to targets.json 2016-06-03 14:08:50 -05:00
Jimmy Brisson 9cf326861b HUGE COMMIT WARNING device.h defines -> target.json features
one problem:
[WARNING] device APPNEARME_MICRONFCBOARD did not have an associated entry in targets.json
2016-06-03 14:08:40 -05:00
Michel Jaouen 4e5fe30bc1 [NUCLEO_L476RG, DISCO_L476VG]: GCC_ARM, ARM_STD fix RTOS failed,
INIT_STACK used to compute RTOS main stack inconsistant with sp set at reset
align heap, stack config with IAR
issue: #1845
2016-06-03 18:49:54 +02:00
Martin Kojtal 986225d2a8 Merge pull request #1838 from egostm/dev_F4_V1.12.0
[STM32F4xx] Update Cube hal to v1.12.0
2016-06-03 15:22:34 +01:00
Erwan GOURIOU e5a12ea505 [STM32F4][DISCO-F429ZI] LSE not soldered. Use LSI RTC 2016-06-03 15:48:25 +02:00
Erwan GOURIOU 2afce67e5c [STM32F4][V1.12.0] SystemCoreClock update
With ARM and uARM toolchains, SystemCoreClock is reset before UART init by libc.
Fix to perform SystemCoreClock init with UART init out of HAL init.
2016-06-03 15:48:25 +02:00
Erwan GOURIOU a9b27da409 [STM32F4] Update Cube FW to V1.12.0
CMSIS to V2.5.0
HAL to V1.5.0
2016-06-03 15:48:25 +02:00
Erwan GOURIOU 8e15a6cc55 [STM32F4][V1.11.0] Update serial_api.c to support new UART_HandleTypeDef
Following cube update, there has been changes in cube HAL that impact
the serial_api.c layer. The global state has been moved to separate
global/tx and rx states, so we can now differentiate both.
2016-06-03 15:48:25 +02:00
Laurent Meunier 8955b6690d [STM32F4] Update to cube V1.11.0
This cube version includes
 HAL to V1.4.4
 CMSIS to V2.4.3
2016-06-03 15:48:25 +02:00
Laurent Meunier 08733d131d [STM32F4] Update to cube V1.10.0
CMSIS to V2.4.2
HAL to V1.4.3
2016-06-03 15:48:25 +02:00
Bartosz Szczepanski 766b5c29e2 [DISCO_F429ZI] Added CAN support
Added CAN API support for DISCO_F429ZI target.

Change-Id: I54b7d0ed25baf179fd899087297f4b8e76fc040a
2016-06-03 15:13:39 +02:00
Bartosz Szczepanski ce781448b7 [DISCO_F469NI] Added CAN support
Added CAN API support for DISCO_F469NI target.

Change-Id: Icfc52ec532aa71412814f245b41494fa69df4430
2016-06-03 15:13:39 +02:00
Bartosz Szczepanski 96787cd79e [NUCLEO_F446RE] Added CAN support
Added CAN API support for NUCLEO_F446RE target.

Change-Id: I6e585fd5ef9e5395c1dc5b9c31d09427927a0021
2016-06-03 14:48:20 +02:00
tomoyuki yamanaka 1e2e14e11d Implement SystemcoreClock
We implemented SystemcoreClock which is defined in CMSIS.
2016-06-03 18:36:28 +09:00
Vincent Coubard 000e04d768 RTOS port for nrf51.
The NRF51 doesn't have a systick. When the MCU doesn't have a systick, the
HAL has to export several functions which will be use by the kernel to
manage the tick:

  * os_tick_init provides the initialization function for the alternative
    hardware timer.
  * os_tick_val returns the current value of the alternative hardware timer.
  * os_tick_ovf returns the overflow flag of the alternative hardware timer.
  * os_tick_irqack is an interrupt acknowledge function that is called to
    confirm the alternative hardware timer interrupt.

The HAL should also call OS_Tick_Handler needs to be called as the
hardware timer interrupt function.

In the case of the NRF51, two RTCs are available:
  * RTC0: reserved for soft device
  * RTC1: used by us_ticker.

RTC1 is a 4 channels timers, channel 0 is used for us_ticker, and
in this port channel 1 is used for tick generation.

Implementation notes:
  * RTC1_IRQHandler: has to be written in assembly otherwise a stack
    overflow will occur because the function OS_Tick_Handler never
    returns. This function is called when RTC1 channel IRQ is triggered.
  * tick generation has been optimised for a tick with a duration of
    1000us.
  * us_ticker can still be compiled and used without RTX enabled.

More information about alternative timer as RTX Kernel Timer:
https://www.keil.com/pack/doc/CMSIS/RTX/html/_timer_tick.html
2016-06-03 10:13:10 +01:00
Martin Kojtal bddce7ce7e Merge pull request #1847 from svastm/pr_1743_continuation
[STM32L0XX] SlaveCounter type correction
2016-06-03 10:09:43 +01:00
svastm d3c14f6bde [STM32L0XX] SlaveCounter type correction 2016-06-03 11:03:53 +02:00
Martin Kojtal 57645936ba Merge pull request #1811 from lindvalla/lpc4088_misc_fixes
Misc fixes for LPC4088/LPC4088DM:
2016-06-03 09:22:38 +01:00
0xc0170 2a19ddc9d1 Add lpc821 cocorico target
Added by @ElektorLabs PR #1840, squashed manually.
2016-06-03 09:20:30 +01:00
Martin Kojtal ff7d7aa337 Merge pull request #1776 from adamgreen/i2cRepeatedStartFix
Fix NXP LPCxxxx i2c_start() handling of repeated start
2016-06-03 08:18:28 +01:00
Martin Kojtal 5ac648f866 Merge pull request #1762 from BartSX/can-devel-f3
[STM32F3xx] CAN development for STM32F3xx family
2016-06-03 07:59:19 +01:00
Russ Butler c730c63f1d Update K64F memory map for for larger static data
The KSDK2 update restricts static data to the first 64K of RAM.
This breaks some applications which require more than 64K of
static data.  This patch moves the static data sections
(bss and data) into the second ram region which is 192K.

Changes taken from similar patches here:
https://github.com/ARMmbed/target-kinetis-k64-gcc/pull/5
https://github.com/ARMmbed/target-kinetis-k64-gcc/pull/6

Previous layout
---------------
0x1FFF0000 m_data   .interrupts_ram
0x1FFF0400          data, bss
0x1FFFFFFF          end of bss
0x20000000 m_data_2 start of heap, end of stack
0x2002ffff          end of heap, start of stack

New layout
----------
0x1FFF0000 m_data   .interrupts_ram
0x1FFF0400          start of unused ram
0x1FFFFFFF          end of unused ram
0x20000000 m_data_2 data, bss
0x200XXXXX          end of bss
0x200XXXXX+1        start of heap, end of stack
0x2002ffff          end of heap, start of stack
2016-05-31 10:45:46 -05:00
Martin Kojtal 64edea6717 Merge pull request #1817 from c1728p9/ksdk2_fixes
KSDK2 fixes
2016-05-31 16:22:25 +01:00
Russ Butler 6815ce6343 KSDK2 - fix SPI
When the function spi_master_write is called a transfer will occur
and set the end of queue flag.  This disables further SPI transfers
which causes the next SPI transfer to hang forever.

This patch clears the end of queue flag so SPI does not hang after
the first transfer.
2016-05-31 10:05:14 -05:00
Martin Kojtal 34ea175b95 Merge pull request #1810 from adustm/fixserial_f3
[STM32F3] Use USART3_BASE instead of UART3_BASE
2016-05-31 15:23:15 +01:00
Martin Kojtal 486d7e88d5 Merge pull request #1812 from bcostm/fix_f091rc_hsi_clock
[NUCLEO_F091RC] Fix HSI clock configuration issue.
2016-05-31 15:22:16 +01:00
svastm 6ebb2e6c6c [STM32L1XX] Reset UART on init 2016-05-31 14:46:06 +02:00
svastm 3243b38f5b [STM32L1XX] Fix deinit of SystemCoreClock on ARM toolchain 2016-05-31 14:46:06 +02:00
svastm 84e65c7ee3 [STM32L1XX] Init daylight saving time 2016-05-31 14:46:06 +02:00
svastm b6fe6638f1 [STM32L1XX] Update HAL_Cube_L1 to 1.5 2016-05-31 14:46:06 +02:00
Russ Butler 88ac7d89d1 KSDK2 - Fix IIC address
Address passed into the mbed I2C API are expected to be 8 bit and
include the read/write flag.  KSDK2 expects a 7 bit address without
this flag.  This patch shifts the address passed into the KSDK by 1
so it is in the correct format.
2016-05-30 23:08:56 -05:00
Russ Butler bee1570a7f KSDK2 - Fix repeated starts
On repeated starts the flag to indicate this is not being set
properly.  Because of this the transfer fails.  This patch
keeps track of the last transfer to determine if a repeated
start should be sent and sets the KSDK flags appropriately.
2016-05-30 23:08:55 -05:00
Jerome COUTANT 7f88761b55 [STM32F0] Init daylight saving time 2016-05-30 17:31:47 +02:00
Jerome COUTANT f327de0682 STM32Cube_FW_F0_V1.5.0 2016-05-30 17:31:18 +02:00
adustm 955b92804d Add UART_3 define for compilation 2016-05-30 11:38:52 +02:00
bcostm aef000ddbf [NUCLEO_F091RC] Fix HSI clock configuration issue. The clock was 96MHz instead of 48MHz. 2016-05-30 11:29:53 +02:00
adustm d2e7eda82e Add UART_3 define for compilation fix 2016-05-30 11:27:35 +02:00
Anders Lindvall d8935bb837 Misc fixes for LPC4088/LPC4088DM:
- Resetting in LPCXpresso IDE did not reset the LCD controller which
  sometimes could cause strange behaviour
- The ROM_LAT bit in the MATRIXARB register must be set in order to
  prevent a HardFault when debugging
- The change of compiler in LPCXpresso IDE to ARM launchpad GCC5 was
  causing build errors due to multiply defined timeval symbol.
- The exporters for LPCXpresso IDE did not set the FPU_PRESENT define
  for assembler, only for c/c++. This caused very strange behaviour
  in the RTOS code (e.g. timeouts no longer working, context switches
  failing etc.)
2016-05-30 10:50:17 +02:00
adustm 86fe75cb9b [STM32F3] Use USART3_BASE instead of UART3_BASE
This change allows the use of UART3 instance.
This change fixes the following issue :
https://developer.mbed.org/questions/4937/Serial-problem-no-Tx-to-PB_10
It's been validated on NUCLEO_F302RB, for PB_9 and PB_10 pins
2016-05-30 10:14:35 +02:00
0xc0170 04e4c6a880 k64f - mac address - fix warnings - get UID via K64F SIM macros 2016-05-27 15:00:39 +01:00
0xc0170 f7b629664d HAL - nordic Lib folder back
It was removed with hal/rtos rearrangement.
2016-05-25 09:57:26 +01:00
Adam Green 61e2296037 Fix NXP LPCxxxx i2c_start() handling of repeated start
In repeating start scenarios, there was a bug in the I2C driver for
various NXP LPCxxxx parts which could allow an extra I/O from the
previous operation to leak through. The scenario I encountered which
triggered this bug went like so:
* The higher level application code would first do an I2C write that
  doesn't send a stop bit (use repeating start instead.)
* The higher level application code would then issues an I2C read
  operation which begin with a call to i2c_start().
* i2c_start() would clear the SI bit (interrupt flag) at the top of
  its implementation.
* i2C_start() would then get interrupted right after clearing the SI
  bit.
  * While the CPU is off running the ISR code, the I2C peripheral
    repeats the last byte written to I2CDAT and then sets the SI bit to
    indicate that the write has completed.
  * The ISR returns to allow the i2c_start() to continue execution.
* i2c_start() would then set the STA bit but it is too late.
* i2c_start() waits for the SI bit to be set but it is already set
  because of the completed byte write and not because of the repeated
  start as expected.

For me this bug would cause strange interactions between my ISRs and
the code using I2C to read from the MPU-6050 IMU. I would be getting
valid orientation data and then all of a sudden I would start receiving
what looked like random values but I think it was just reading from the
incorrect offset in the device's FIFO.

It appears that atleast one other person has seen this before but it
was never root caused since it required specific timing to reproduce:
  https://developer.mbed.org/forum/bugs-suggestions/topic/4254/

This bug can be found in most of the NXP I2C drivers and this commit
contains a fix for them all. I however only have the LPC1768 and
LPC11U24 for testing.

My fix does the following:
* No longer clears the SI bit in the i2c_conclr() call near the
  beginning of the i2c_start() function. It was this clear that
  previously caused the problem as described above.
* The second part of the fix was to instead clear the SI bit after
  the STA (start) bit has been set with the i2c_conset() call.
* The clearing of the SI bit should be skipped if there isn't an
  active interrupt when first entering i2c_start(). If you clear
  the SI bit when there isn't an active interrupt then the code
  is likely to skip over the interrupt for the start bit which was
  just sent and then allow the I2C peripheral to start sending the
  slave address before it has even been loaded into the I2CDAT
  register.
2016-05-25 00:20:06 -07:00
0xc0170 b32f7a9aaf Merge branch 'TomoYamanaka-master_branch2' 2016-05-24 13:27:32 +01:00
0xc0170 935111ff6c Merge branch 'master_branch2' of https://github.com/TomoYamanaka/mbed into TomoYamanaka-master_branch2 2016-05-24 11:30:26 +01:00
Martin Kojtal 24136afd3f Merge pull request #1763 from BartSX/timer-fxxx-#816
Fix timer #816 issue for STM32F0 and STM32F1
2016-05-24 11:26:43 +01:00
0xc0170 39fa25d77e Merge branch 'ksitko-master' 2016-05-23 15:48:12 +01:00
Martin Kojtal 045d99bbaa Merge pull request #1764 from BartSX/can-devel-f0
[STM32F0xx] Move CAN API to new directory structure
2016-05-23 15:40:52 +01:00
Bartosz Szczepanski aa2ecad0b2 [STM32F0xx] Move CAN API to new directory structure
We need to remove *can_api.c* file accordingly to new directory structure.
Without that we can't compile any CAN mBed test.

Change-Id: I3d4f798ad75ec1b4c4a1d7ed877e71b7db6bf60f
2016-05-23 16:30:25 +02:00
0xc0170 62eda4dd6d Merge branch 'master' of https://github.com/ksitko/mbed into ksitko-master 2016-05-23 15:22:23 +01:00
0xc0170 9c525e2f71 Merge branch 'master' of https://github.com/toyowata/mbed into toyowata-master 2016-05-23 15:06:09 +01:00
Bartosz Szczepanski 01ff0b9ab7 [NUCLEO_F030R8] 16-bit timer register update
This path fixes issue #816.

Current value of TIM_MST->CNT is read in interrupt context only.
This avoids master timer overflow without SlaveCounter update.

Change-Id: I8e2ec02ce7539a4c044c7e3dfe6bedc9fcdf7736
2016-05-23 16:02:25 +02:00
Bartosz Szczepanski 82d82d0b2a [NUCLEO_F070RB] 16-bit timer register update
This path fixes issue #816.

Current value of TIM_MST->CNT is read in interrupt context only.
This avoids master timer overflow without SlaveCounter update.

Change-Id: Iaaf7b9eb33aa8d8992e9354ca5e21bf01ec2413d
2016-05-23 16:02:25 +02:00
Rafal Kula e938780788 [NUCLEO_F103RB] 16-bit timer register update
This path fixes issue #816.

Current value of TIM_MST->CNT is read in interrupt context only.
This avoids master timer overflow without SlaveCounter update.

Change-Id: Ie7a9bfce76990f85caa84264450d053604af33e5
2016-05-23 16:02:25 +02:00
Rafal Kula 07b841b08f [STM32Fxxx] Fix issue #816
Both STM32F0xx and STM32F1xx are using a 16-bit timer as a internal ticker
but the mBed ticker needs a 32-bit timer implementation, so the upper part
of that 32-bit timer is being calculated in software.

Software bug has been fixed where continous HIGH/LOW voltage levels
could be observerd for 65ms due to 16-bit timer overflow.

Now current value of TIM_MST->CNT is stored in cnt_val and is
updated in interrupt context only. This avoids master timer
overflow without SlaveCounter update.

This fix is only for platforms which already implements a 16-bit timer:
F103RB, F070RB, F030R8

Change-Id: I205c70ce155b373c6593ead93ade9ec38993f7f9
2016-05-23 16:02:25 +02:00