Commit Graph

1848 Commits (5a6aee43eb58c9ba3b1d2de7d178a3d68867a0da)

Author SHA1 Message Date
Laurent MEUNIER 57222b604f STM32: CAN: do not overwite BTR register when setting frequency
BTR register has other bits than the ones calculated and set through
the can_speed function, so let's take care to only write to the
right registers.
2017-09-05 10:27:21 +02:00
Laurent MEUNIER 759642af8e STM32: Define CAN handle as part of can object
Instead of a static object, this will make driver
instantiation more robust and allow to re-use init
configuration on a need basis.

The CANName struct member is actually the CAN registers base address,
which is now available in the CanHandle.Instance field, so we don't need
CANName anymore.
2017-09-05 10:27:21 +02:00
Laurent MEUNIER 66162c6b1d STM32: move can_s definition to common_objects.h
This will ease up further changes to the structure.
2017-09-05 10:27:21 +02:00
Martin Kojtal b0dd984493 Merge pull request #4939 from c1728p9/crash_on_boot
Fix crashes on boot on some Kinetis devices
2017-09-04 16:51:22 +01:00
Martin Kojtal 5b4e0b30df Merge pull request #4963 from NXPmicro/Fix_NVIC_NUM_VECTORS
K66F,KW24D,K22F,K64F: Fix NVIC_NUM_VECTORS value
2017-09-04 16:50:32 +01:00
Martin Kojtal 675a17cff2 Merge pull request #4980 from LMESTM/stm32_flash_update
Stm32 flash update
2017-09-04 16:49:18 +01:00
Hasnain Virk fce2ca2122 Adjusting Stack size Allocation (IAR, LPC176x)
Since mbed-os 5.4.3, something increased foot print of mbed-os and the applications that were barely fitting in started to spill.

IAR toolchain for LPC176x target family is set to use 2 RAM regions (32K each). RAM region
2 is being used for ETH/USB and 1 is being used for vector table, stack/heap/static data.

In this commit we have decreased heap size allocation from 8K to 7K so that the is more room for stack and static data.
2017-09-04 14:54:42 +03:00
Jan Jongboom 72262ca0b3 MTS targets: Don't use any printf() calls when NDEBUG is defined, prevents linking out printf() and friends in release build 2017-09-04 12:05:41 +01:00
Laurent MEUNIER b01cc966b0 Introduce TIMEOUT_1_BYTE
This makes the code more explicit about what is last parameter of
HAL_SPI_Transmit/HAL_SPI_Receive functions.
2017-09-04 11:16:49 +02:00
Russ Butler b402b7a8c6 Fix crash on boot due to vector size mismatch
If NVIC_NUM_VECTORS is larger than the space allocated by the vector
table in ram (__ram_vector_table_size__) then the call to mbed_cpy_nvic
during boot will corrupt valid data, which can lead to a crash. This
patch fixes the declared number of vectors on the KL27Z, KL43Z and
KL82Z to fix this crash.
2017-09-01 18:43:38 -05:00
Kevin Gilbert 41000e091c Add LED color remapping definitions to Odin target 2017-09-01 17:00:24 -05:00
gorazd 7773acd78c arduino connector namings added 2017-08-31 15:18:14 +02:00
Boting Ren 04461acf5e Remove HAL_GetUID_12Bytes function from stm32l4xx_hal layer. 2017-08-31 15:21:22 +09:00
Boting Ren 87ce631490 Fix a parse error at targets/targets.json. 2017-08-31 11:18:31 +09:00
gorazd 40b0d961b6 extra label deleted 2017-08-30 08:16:08 +02:00
Jimmy Brisson 82f5ce22f8 Merge pull request #4951 from JanneKiiskila/ublox_odin_buttons
UBLOX_EVK_ODIN_W2- add BUTTON1/2 definitions
2017-08-29 13:46:10 -05:00
Jimmy Brisson 318e92c028 Merge pull request #4950 from OpenNuvoton/nuvoton_usb
M487: Support USB device/host
2017-08-29 13:45:55 -05:00
Jimmy Brisson d68cd09c63 Merge pull request #4944 from LMESTM/F1_AFIO_CLK
STM32: F1 GPIO: Enable AFIO clock
2017-08-29 13:45:27 -05:00
Boting Ren defb8ebf41 Add bootloader support configuration for DISCO_L476VG. 2017-08-29 19:01:25 +09:00
Laurent MEUNIER dacf04e69b STM32: Flash: cover TARGET_F410RB case
There was a comilation error for NUCLeO_F410RB as it does not have
a ADDR_FLASH_SECTOR_5.
2017-08-29 11:42:51 +02:00
Laurent MEUNIER 9bed429aa0 STM32: L1: Activate FLASH API for NUCLEO_L152RE 2017-08-28 16:21:33 +02:00
Wolfgang Betz f8114f2295 [STM32F401xE] Freeze master timer on stop/breakpoint 2017-08-28 14:29:47 +02:00
Yuguo Zou c834b7faac Fix bugs for RTL8195AM with debug profile of compilers
1. Add alignment / padding for postbuild segments
2. Clear tcm.bss section
3. Remove TRAP_OverrideTable(), move lines to PLAT_Start()
2017-08-28 19:04:26 +08:00
Laurent MEUNIER a9468c09e3 STM32: F7 Flash API support
Adding flash API support to STM32F7 family. The code is derived from
F4 family one. The memory topology is described in flash_data.h files
and the flash_api.c implementation manages the 2 possible memory types (1
or 2 banks).
2017-08-28 10:23:55 +02:00
Laurent MEUNIER e6631c02a4 STM32: adjust flash.get_page_size() to minimum programable size
Users of FlashIAP usually get the minimum programable size
by calling flash.get_page_size(), so let's return the minimum
to allows a most efficient usage of flash.

For F4 devices, this is 1 byte.
For L0 and L1 devices, this is a word (4 bytes).
For L4 devices, this is a double word (8 bytes).
2017-08-25 17:21:30 +02:00
Laurent MEUNIER 3de2ce9c10 STM32: Add Flash API support to STM32F413xH
First add the flash_data.h that describe the flash memory topology,
and also activate FLASH support for the corresponding targets.

This is a 1,5MB flash memory device which contains 15 sectors, where
sectors 12 to 15 are 128KB sectors. So flash_api.c needed has been
updated to differentiate between this flash memory and the 2MB ones
by checking existence of sector 16 instead of sector 12.
2017-08-25 17:21:30 +02:00
Laurent MEUNIER 4b62cf015c STM32: Add Flash API support to STM32F469xI
First add the flash_data.h that describe the flash memory topology,
and also activate FLASH support for the corresponding targets.
2017-08-25 17:21:08 +02:00
Laurent MEUNIER 86ad16f5f8 STM32: Add Flash API support to STM32F410RB
First add the flash_data.h that describe the flash memory topology,
and also activate FLASH support for the corresponding targets.
2017-08-25 17:20:40 +02:00
Laurent MEUNIER 645fd0f06d STM32: Add Flash API support to STM32F4 devices with 512KB Flash
First add the flash_data.h that describe the flash memory topology,
and also activate FLASH support for the corresponding targets.
2017-08-25 17:20:13 +02:00
gorazd 436d97c9f9 new target added L-TEK FF1705
based on XDOT
2017-08-24 22:11:10 +02:00
Jimmy Brisson 3926b56cd8 Merge pull request #4935 from LMESTM/F410RB_ARM_TC
STM32: fix F410RB vectors size
2017-08-24 10:16:31 -05:00
Jimmy Brisson d2793ede5e Merge pull request #4922 from gorazdko/bug-fix-clock-config-xdot
bug fix: xdot clock config
2017-08-24 10:15:25 -05:00
Jimmy Brisson 7252447385 Merge pull request #4920 from scartmell-arm/led-error-sequence
Modify LED error sequence to be more recognisable
2017-08-24 10:14:13 -05:00
Jimmy Brisson 0a063a00fd Merge pull request #4840 from ganesh-ramachandran/master
Add Support for TOSHIBA TMPM066 board
2017-08-24 10:13:09 -05:00
Mahadevan Mahesh c5b66b85ba K66F,KW24D,K22F,K64F: Fix NVIC_NUM_VECTORS value
Signed-off-by: Mahadevan Mahesh <Mahesh.Mahadevan@nxp.com>
2017-08-23 10:50:12 -05:00
Yuguo Zou c530be0eeb Fix stack underflow issue
Switch on TCM
2017-08-23 16:12:07 +08:00
Boting Ren 4b9b174c7f Add function to read 12byte HW RoT over STM32L4xx. 2017-08-23 11:06:44 +09:00
Yuguo Zou 1e398cfc60 Add RTL8195AM support for mbed client with IAR
Move ticker related code to SRAM due to time drift sensitive
2017-08-22 17:34:00 +08:00
Yuguo Zou e16c2d2833 Add RTW8195AM support for mbed client with ARMCC
Move ticker related code to SRAM due to time drift sensitive
2017-08-22 17:33:41 +08:00
Janne Kiiskilä 2e6cd907d4 UBLOX_ODIN_EVK_W2 - add BUTTON1/2 definitions
UBLOX_ODIN_EVK_W2 is missing the abstract button definitions originally
introduced with PR https://github.com/ARMmbed/mbed-os/pull/4249.

Fix two tab to spaces issues on the go as well.
2017-08-22 09:54:53 +03:00
ccli8 cacc444b73 [M487] Support USB device/host 2017-08-22 09:27:31 +08:00
Jimmy Brisson 316c875136 Merge pull request #4926 from bcostm/merge_l053x8
STM32L053x8: Refactor NUCLEO_L053R8 and DISCO_L053C8 targets
2017-08-21 10:38:42 -05:00
Jimmy Brisson bb7ab1942a Merge pull request #4896 from pilotak/patch-1
target BLUEPILL_F103C8 compile fix
2017-08-21 10:37:01 -05:00
Laurent MEUNIER d4fa585ac4 STM32: F1 GPIO: Enable AFIO clock
It is required to enable AFIO clock before using __HAL_AFIO_REMAP_xy
macros, which was missing here. Without clocks enable, the remap
actually doesn't occur. This would possibly cause some PIOs (part of
PB_3, PB_4, PA_13, PA_14, PA_15) to not behave as expected.

In most cases AFIO clock was enabled in stm_pin_SetAFPin function, so
that this bug was not visible. But there were few cases left were
stm_pin_DisconnectDebug would be called first. A typical case was
with GCC_ARM in case a DigitalInOut variable is declared as global.
2017-08-21 13:32:33 +02:00
Laurent MEUNIER 95fc6d0bad STM32: fix F410RB vectors size
On F410RB, the size reserved to vectors with ARM toolchains was not properly
defined,which was not the case for other toolchains.

This would cause few tests to fail like EXAMPLE_1 with below error:

HOST: Unknown property: mbed assertation failed: _ptr == (T *)&_data, file: C:/github/mbed/BUILD/mbed/platform/SingletonPtr.h, line 91
2017-08-18 11:57:51 +02:00
bcostm d0fce353cc STM32F4: Set ADC sample time to max value for VRefInt 2017-08-17 16:12:16 +02:00
Laurent MEUNIER 8c99bf3b62 SPI: HAL: disable IP at the end of transmit
in case of 1LINE direction
2017-08-17 11:02:43 +02:00
mapellil 6dfafc7293 STM32: SPI: Use LL in spi_slave_read
this is more a cosmetic change, but since LL was introduced, we can now
use it here as well.
2017-08-17 11:02:43 +02:00
Laurent MEUNIER 57371ea591 STM32: SPI: Do not enable SPI during Init if 3W
Enabling SPI causes the clock to be output by default.

Most devices will not care about extra clock cycles, especially as long
as chip select is not active, nevertheless this may cause side issues
with other devices especially during init phase.

This was actually the case with a 3 wire device (LPS22HB sensor).
2017-08-17 11:02:43 +02:00
mapellil 4f20cfc0be STM32: SPI: SPI3W / SPI_DIRECTION_1LINE management
In case MISO is not passed at SPI init, then we consider a 3 wires SPI
configuration is requested, which corresponds to SPI_DIRECTION_1LINE
configuration parameter in STM32 HAL layer.

We're then handling this specific case of SPI_DIRECTION_1LINE,
in spi_master_write or spi_master_block_write, we call to HAL API
2017-08-17 11:02:43 +02:00
bcostm 8273e371df STM32L053x8: Align system_clock.c files 2017-08-17 10:55:18 +02:00
gorazd 34bd3e5c14 xdot: fix target clock config in targets.json
Resolves #4876
2017-08-17 10:37:17 +02:00
Ganesh Ramachandran f79216c8d8 Issue with mbed compile for GCC_ARM tool resolved
Functions 'serial_break_set' & 'serial_break_clear' wrongly removed during 'SERIAL_FC disabled, critical section API Updation' commit.
Due to this 'mbed compile' command for GCC_ARM tool fails to compile.
2017-08-17 11:14:09 +05:30
Ganesh Ramachandran 552feccca3 Main stack dependant on GCC toolchain removed 2017-08-17 10:54:26 +05:30
Ganesh Ramachandran 48ee6a0fb6 Clear interrupt and delta check removed 2017-08-17 10:54:26 +05:30
Ganesh Ramachandran 9dca3fe5df Interrupt and Overflow check for us_ticker 2017-08-17 10:54:26 +05:30
Ganesh Ramachandran 0a781c4f04 ADC Reset Conflict Fixed
ADC Reset conflict with already configured ADC pins is fixed
2017-08-17 10:54:25 +05:30
Ganesh Ramachandran 624620b0d2 SERIAL_FC disabled, critical section API Updation
SERIAL_FC disabled, critical section API and Format changes updated
2017-08-17 10:54:25 +05:30
Ganesh Ramachandran bd8fa4eb70 Added Support for Toshiba TMPM066 2017-08-17 10:54:25 +05:30
bcostm 794d4f657f STM32L053x8: Add STM32L053x8 label in targets.json 2017-08-16 17:10:43 +02:00
bcostm 580c7cb0b6 STM32L053x8: cleanup ARM compiler files 2017-08-16 17:10:42 +02:00
bcostm 9b8bb9eec4 STM32L053x8: Move other folders and files 2017-08-16 17:10:42 +02:00
bcostm 04cefd300d STM32L053x8: Create folder and move objects.h 2017-08-16 17:10:42 +02:00
Steve Cartmell 9c87f5936c Unified the LED error pattern for all boards
- Removed the patterned LED sequence, all boards now use the 4 fast pulse, 4 slow pulses LED sequence.
  - Changed the LED used from LED_RED to LED1. Only 58/174 targets seem to define LED_RED but they all define LED1.
  - Removed all ERROR_RED and ERROR_PATTERN definitions from targets/targets.json
2017-08-16 11:55:24 +01:00
Jimmy Brisson 7653f65434 Merge pull request #4878 from jeromecoutant/PR_ADC_INTERNAL
STM32 : internal ADC channels
2017-08-14 11:42:30 -05:00
Jimmy Brisson 1c41a9b920 Merge pull request #4869 from toyowata/lpc_spi_fix
HAL LPCs SPI: Fix mask bits for SPI clock rate
2017-08-14 11:40:25 -05:00
Jimmy Brisson 96074417b2 Merge pull request #4863 from Archcady/RTWInf
Optimize memory usage of wifi scan for REALTEK_RTW8195AM
2017-08-14 11:39:59 -05:00
Jimmy Brisson d10d5af28a Merge pull request #4842 from NXPmicro/Fix_Analogout
Add call to DAC_Enable as this is no longer done as part …
2017-08-14 11:38:38 -05:00
Jimmy Brisson 0f0a461209 Merge pull request #4832 from OpenNuvoton/nuvoton
NUC472/M453: Fix several startup and hal bugs
2017-08-14 11:38:18 -05:00
Jimmy Brisson 069b2536bf Merge pull request #4812 from deepikabhavnani/nxp_spi
Use DSPI SDK driver API's in SPI HAL driver
2017-08-14 11:37:52 -05:00
Jimmy Brisson 98720b0ae2 Merge pull request #4809 from betzw/betzw_ticker_github_wb
STM32: Align HAL & US tickers
2017-08-14 11:36:52 -05:00
Jimmy Brisson 25bcc2795e Merge pull request #4808 from betzw/betzw_idle_github_wb
Make HAL & US tickers idle safe
2017-08-14 11:36:35 -05:00
Jimmy Brisson 2766e56e3d Merge pull request #4801 from bcostm/fix_can_issue_4763
STM32 CAN: Fix issue with speed function calculation
2017-08-14 11:36:17 -05:00
Jimmy Brisson 097720670e Merge pull request #4631 from OpenNuvoton/nuvoton_nano130
Add new target NUMAKER_PFM_NANO130
2017-08-14 11:35:58 -05:00
Jimmy Brisson 0150f58e12 Merge pull request #4608 from OpenNuvoton/nuvoton_m487
Support Nuvoton's new target NUMAKER_PFM_M487
2017-08-14 11:35:33 -05:00
Pavel Slama 2bc224bc2f target BLUEPILL_F106C8 compile fix
INITIAL_SP missing when compile, here is a quick fix
2017-08-13 15:32:11 +02:00
Deepika 2a9c88c1b0 Use DSPI SDK driver API's in spi block read 2017-08-11 10:22:23 -05:00
Anna Bridge 8a1c7fab79 Merge pull request #4813 from jacobjohnson-ON/master
Dual Flash and Hex file support on NCS36510
2017-08-11 11:50:15 +01:00
Jimmy Brisson 00ab1fd6b2 Merge pull request #4852 from janjongboom/cortexm0p_bugs
SAM_CortexM0P uses uninitialized memory in i2c and uses out of bounds array in pwmout
2017-08-10 09:38:53 -05:00
Jimmy Brisson 95ca29930f Merge pull request #4851 from janjongboom/stm32f4_wrong_erase
STM32F4_HAL_MMC erase command check is wrong. == has higher precedence than &
2017-08-10 09:38:25 -05:00
Mahadevan Mahesh 8a8553e8a0 Add call to DAC_Enable as this is no longer done as part of DAC_Init
Fixes Issue #3999

Signed-off-by: Mahadevan Mahesh <Mahesh.Mahadevan@nxp.com>
2017-08-10 09:36:48 -05:00
Yuguo Zou 215a7906d3 Change to use copy assignment operator for RTWInterface::scan 2017-08-10 17:36:05 +08:00
MS30 CCChang12 346209ed2f [NANO130] Adjust the stack size in IAR toolchains 2017-08-10 15:35:02 +08:00
Wolfgang Betz e2dc67750c Make HAL & US tickers idle safe 2017-08-09 14:29:57 +02:00
Martin Kojtal 1c948283be Merge pull request #4805 from NXPmicro/Update_K64F_DSPI_SDK_Driver
K64F: Update the DSPI SDK driver to support the new API to change DUM…
2017-08-09 10:24:07 +01:00
jeromecoutant 54a32e0410 STM32L1 : internal ADC channels 2017-08-09 11:01:40 +02:00
jeromecoutant 726f207ee8 STM32L0 : internal ADC channels 2017-08-09 11:01:36 +02:00
jeromecoutant 27bf7d21d1 STM32F7 : internal ADC channels 2017-08-09 11:01:32 +02:00
jeromecoutant 803ab189fc STM32F4 : internal ADC channels 2017-08-09 11:01:27 +02:00
jeromecoutant 3826ad23f6 STM32F3 : internal ADC channels 2017-08-09 11:01:23 +02:00
jeromecoutant 63ccfa0958 STM32F1 : internal ADC channels 2017-08-09 11:01:19 +02:00
jeromecoutant aff3478519 STM32F0 : internal ADC channels 2017-08-09 11:01:14 +02:00
toyowata da7fa0dd2a [HAL LPC43xx] Fix mask bits for SPI clock rate 2017-08-09 16:51:31 +09:00
toyowata 72e8241ee0 [HAL LPC408x] Fix mask bits for SPI clock rate 2017-08-09 16:51:31 +09:00
toyowata cb9b2b0456 [HAL LPC13xx] Fix mask bits for SPI clock rate 2017-08-09 16:51:31 +09:00
toyowata db2da2e932 [HAL LPC11xx_11Cxx] Fix mask bits for SPI clock rate 2017-08-09 16:51:31 +09:00
toyowata aa334b0d3e [HAL LPC11Uxx] Fix mask bits for SPI clock rate 2017-08-09 16:51:31 +09:00
toyowata fdc071d5e8 [HAL LPC11U6x] Fix mask bits for SPI clock rate 2017-08-09 16:51:31 +09:00
toyowata 9ad17b21a2 [HAL LPC176x] Fix mask bits for SPI clock rate 2017-08-09 16:51:31 +09:00
Martin Kojtal f200db3e84 STM32F4: fix for 2nd back sector
Use ADDR_FLASH_SECTOR_12 as this is defined by target (the flash size varies, for
instance for some F437xx is up to 2MB (2nd bank might not be there)).
2017-08-08 09:50:19 +01:00