Commit Graph

2414 Commits (860b66a722b3f60858c0bd51b02deb46615e5843)

Author SHA1 Message Date
gorazd 5c2f2c3cff lpc546xx: remove obsolete line 2017-11-18 10:44:33 +01:00
gorazd 8411134184 lpc546xx: correct register name (DIGIMODE) 2017-11-17 19:16:42 +01:00
gorazd d62b47393e lpc546xx: fix adc
Resolve #5304
2017-11-17 13:54:25 +01:00
bcostm c54e9079b8 STM32 ADC: replace flags type from int to bool 2017-11-17 13:50:59 +01:00
bcostm 1d3eb508bf STM32: fix linker error with adc_read() 2017-11-17 13:50:59 +01:00
bcostm 2bbedabf7d STM32: add analogin_api.c file in STM folder 2017-11-17 13:50:59 +01:00
bcostm 34fdcc926b STM32: move analogin_read functions in a common file 2017-11-17 13:50:59 +01:00
bcostm 4dbe95dded STM32: rename analogin_api.c in analogin_device.c 2017-11-17 13:50:59 +01:00
bcostm 072ec2e765 STM32L4 ADC: remove adc_inited flag 2017-11-17 13:50:59 +01:00
bcostm 52d942e2d2 STM32L1 ADC: remove adc_inited flag 2017-11-17 13:50:59 +01:00
bcostm 4b82479175 STM32L0 ADC: remove adc_inited flag 2017-11-17 13:50:59 +01:00
bcostm 75f80abddc STM32F7 ADC: remove adc_inited flag 2017-11-17 13:50:59 +01:00
bcostm d5ff05a03b STM32F4 ADC: remove adc_inited flag 2017-11-17 13:50:59 +01:00
bcostm 7005bc21d7 STM32F3 ADC: remove adc_inited flag 2017-11-17 13:50:59 +01:00
bcostm f12391ad25 STM32F2 ADC: remove adc_inited flag 2017-11-17 13:50:59 +01:00
bcostm 36110e10cf STM32F1 ADC: remove adc_inited flag 2017-11-17 13:50:58 +01:00
bcostm 2e2744ccbe STM32F0 ADC: remove adc_inited flag 2017-11-17 13:50:58 +01:00
bcostm 57722eb2b5 STM32 USBDevice: Update targets.json for DISCO_F429ZI 2017-11-17 13:11:57 +01:00
Martin Kojtal b025ea16d6
Merge pull request #5137 from dave-wu/master
Add support for ADI EV-COG-AD3029LZ platform.
2017-11-17 10:21:56 +00:00
Marko Fabo 313458b120 STM32F407VG: Fix RTC 2017-11-17 08:52:00 +01:00
Martin Kojtal 3bedff36e3
Merge pull request #4825 from SiliconLabs/feature/mbedtls-hw-accel
Silicon Labs: Add cryptographic acceleration support
2017-11-16 16:24:52 +00:00
Martin Kojtal d8d8c28e11
Merge pull request #5452 from 0xc0170/fix_i2c_onsemi
ONSEMI: Fix I2C issues
2017-11-16 16:18:28 +00:00
Martin Kojtal 01bc4340e8
Merge pull request #5482 from bcostm/fix_disco_l072cz_extclock
DISCO_L072CZ_LRWAN1: HSE clock configuration improvement
2017-11-16 16:15:12 +00:00
Martin Kojtal 1fa09fa43d
Merge pull request #5487 from nvlsianpu/bugfix_5462_initial_pin_value
Fix bug for issue:  initial pin value not retained
2017-11-16 16:13:13 +00:00
Martin Kojtal 114e019675
Merge pull request #5486 from bcostm/fix_CAN3
STM32: Add support of CAN3
2017-11-16 16:12:27 +00:00
Martin Kojtal dc6dd5961e
Merge pull request #5505 from LMESTM/fix_smartcard_HAL
STM32: HAL smartcard, fix memory corruption in Receive
2017-11-16 16:11:04 +00:00
jeromecoutant 763531921f DISCO_L072CZ_LRWAN1 can use LSE from LORA module (more precise than LSI) 2017-11-16 15:27:04 +01:00
jeromecoutant 5f86ae5757 STM32L072CZ error in ARM sct file name 2017-11-16 15:12:51 +01:00
Dave Wu 45aa2130bc Added SystemCoreClock as an extern. 2017-11-16 13:29:43 +00:00
cyliangtw 288094568c [M487/NUC472/NANO130] fix TRUE/FALSE redefinition 2017-11-16 11:21:20 +00:00
Dave Wu 401674284a Cleaned up some formatting issues. 2017-11-15 22:59:26 +11:00
Martin Kojtal 41eb565d9c
Merge pull request #5342 from ARMmbed/feature_cortex_a
Update CMSIS/RTX with Cortex-A support
2017-11-15 11:24:36 +00:00
Laurent MEUNIER be42c6de55 STM32: HAL smartcard, fix memory corruption in Receive
Re-casting with tmp the uint8_t* pData pointer to uint16_t* brings a
memory corruption and typically can corrupt the size parameter. This
is fixed with this commit.

STM32 Internal ticket reference : 39116
2017-11-15 10:50:21 +01:00
bcostm 2d8d8ae9e1 STM32: fix error with CAN_3 not defined 2017-11-15 10:36:03 +01:00
bcostm 2e2b408580 STM32: fix compilation error with STM32F1 2017-11-15 09:07:52 +01:00
bcostm f0aed41991 DISCO_L072CZ: remove dead code 2017-11-15 08:59:50 +01:00
Dave Wu 82a58ac94d Added support for ADI EV-COG-AD3029LZ platform.
Fixed issues raised from ARM PR review and removed the unsupported platform.

- Fixed an issue where the TRNG is read even though it may not be ready;
- Added configuration to ensure the buffering mode is disabled so only 8-bit bytes are generated;
- Moved the TRNG device handle into the trng_t structure.

Removed undefined spi slave related functions.

- Added error checking for trng_get_bytes function;
- Added curly brackets to single line conditions for some files;
- Changed rx and tx buffers in serial module as local variables;
- Removed some unused code and some minor formatting corrections;
- Minor i2c & spi updates for github pull request;
- Added function definition for spi_master_block_write.

Added default delay and sample times for the ADC during initialization.

- Added code to clear stack variable in trng_get_bytes upon exiting the
function;
- Remove lp ticker functionality as the timer hardware does not satisfy
lp timer requirements.

Added a check for the STUCK bit before reading the RNG data register to ensure there are no hardware faults.

- Removed .mbedignore to work around some exporter issues;
- Added #includes to some of the driver data C files for them to build on their own.
2017-11-15 16:35:31 +11:00
bcostm be2a6ae273 STM32: Use CAN3_BASE + typos 2017-11-14 09:48:02 +01:00
bcostm 0ef4e2881c STM32: Add support of CAN3 on STM32F413/F767 2017-11-14 09:48:02 +01:00
Jimmy Brisson f0912554d5
Merge pull request #5473 from marcuschangarm/rtl8195am_ota
Reorganize defines for firmware updates on Realtek RTL8195AM
2017-11-13 10:59:28 -06:00
Jimmy Brisson 4185c1a6cf
Merge pull request #5471 from marcuschangarm/rtl8195_flash_page
Increase flash program granularity on Realtek RTL8195AM
2017-11-13 10:58:50 -06:00
Jimmy Brisson 757a4e3b75
Merge pull request #5464 from Archcady/Fix_lockup
Fix lockup issue for REALTEK_RTL8195AM
2017-11-13 10:54:37 -06:00
Jimmy Brisson ee76bd8ae3
Merge pull request #5231 from jrobeson/add-rblab-blenano2
Add support for RedBear's BLE Nano 2
2017-11-13 10:53:04 -06:00
Jimmy Brisson 13d43d75ef
Merge pull request #5144 from dave-wu/ev-cog-ad4050lz
Add support for ADI EV-COG-AD4050LZ platform.
2017-11-13 10:50:51 -06:00
Andrzej Puzdrowski edb86500b5 Fix bug for issue 5462, initial pin value not retained
For api usage like DigitalOut led(LED1, 1) the hal function gpio_write()
sets the output before f. gpio_mode() is called. gpio_mode() clears the
output as it take never writen parameters (gpio_cfg_t.init_hight).

This patch use internal hardware register of GPIO output instedad of above paramiter latch
for retaining proper writen state.
2017-11-13 16:44:56 +01:00
bcostm 104295b64e DISCO_L072CZ: add comment in clock_source config 2017-11-13 11:36:22 +01:00
bcostm c0f6b25eba DISCO_L072CZ: align SetSysClock_PLL_HSE() with SetSysClock_PLL_HSI() 2017-11-13 11:34:56 +01:00
cyliangtw d8a9e35a0c [M487/NUC472] Refine trng_get_bytes for consistency and readability 2017-11-13 12:11:08 +08:00
Steven Cooreman 1dc3941a5f Apply feedback by @Patater 2017-11-11 19:38:54 +01:00
Tony Wu a451498141 rtl8195am - remove redundant header file inclusion
Signed-off-by: Tony Wu <tung7970@gmail.com>
2017-11-10 09:53:42 +00:00
Bartek Szatkowski c5a5438256 Update params in calls to LD/STREXW to be uint32_t 2017-11-10 09:53:42 +00:00
Bartosz Szatkowski 717087c772 Renesas: Add empty mbed_rtx.h 2017-11-10 09:53:41 +00:00
Bartek Szatkowski c10dd0a725 RZ_A1H: Fix cmsis header name 2017-11-10 09:53:41 +00:00
Martin Kojtal 47bae16a5c
Merge pull request #5305 from andcor02/master
New Target: Mbed Connect Cloud board
2017-11-10 08:43:29 +00:00
cyliangtw 2ee058be53 [M487/NUC472] Refine for correctness control 2017-11-10 16:22:35 +08:00
Marcus Chang a0729952a3 Reorganize defines for firmware updates on Realtek RTL8195AM
Moved defines, typedefs and function prototypes from ota_api.c to
ota_api.h so that these can be included in applications.
2017-11-09 10:27:59 -08:00
Marcus Chang 5fe03afea6 Increase flash program granularity on Realtek RTL8195AM
The Page size has been set to 1 byte instead of the previous 256.
Although 256 is the physical page size, the driver supports
writing 1 byte at a time.
2017-11-09 09:51:06 -08:00
Ashok Rao 761254c1a0
Adding device_name for TB_SENSE_12.
device_name key is required to add Cloud Client support / enable bootloader support for this target.
2017-11-09 17:33:12 +00:00
Martin Kojtal 0d1dc83eb1
Merge pull request #5432 from JammuKekkonen/master
HEXIWEAR: define HEXIWEAR target to support bootloader.
2017-11-09 16:56:29 +00:00
Martin Kojtal 494c25d71c
Merge pull request #5344 from gorazdko/add-new-target-L-TEK-FF-LPC546XX
add new target L-Tek FF-LPC546XX
2017-11-09 16:42:24 +00:00
Martin Kojtal 2b391447c6
Merge pull request #5390 from 0xc0170/fix_fire_int_ncs
ncs36510: fire interrupt correct timer fix
2017-11-09 16:36:57 +00:00
Martin Kojtal f17355fc71
Merge pull request #5422 from soramame21/master
Add bootloader support for DISCO_L475VG_IOT01A
2017-11-09 16:35:31 +00:00
Martin Kojtal 18393f3faf
Merge pull request #5424 from jeromecoutant/PR_L496
NUCLEO_L496ZG_P support
2017-11-09 16:32:56 +00:00
Martin Kojtal a65d37e485
Merge pull request #5453 from marcuschangarm/rtl8195am_flash
Increase flash size on Realtek RTL8195AM
2017-11-09 16:23:46 +00:00
Martin Kojtal 66054f4b62
Merge pull request #5455 from LMESTM/flash_2MB_GetSector_fix
STM32 Flash 2MB GetSector fix
2017-11-09 16:23:02 +00:00
Yuguo Zou 6af9a5a002 Remove lines to improve readability 2017-11-09 18:23:17 +08:00
Yuguo Zou 05cf4680bd Update HAL library to fix lockup issue 2017-11-09 17:59:14 +08:00
jeromecoutant 17c86d1cd6 STM32F412 IAR linker file issue 2017-11-09 09:45:07 +01:00
cyliangtw e252b10148 [M487/NUC472] zeroize random data on the stack memory 2017-11-09 16:01:14 +08:00
Dave Wu d5122c5ea5 - Removed .mbedignore due to an issue with the eclipse exporter not picking up the ignored files;
- Added #includes in BSP data C files so they can be built on their own without mbedignore;
2017-11-09 14:17:15 +11:00
cyliangtw 76c2c19853 [M487/NUC472] Unified code-path for remaining bytes of TRNG_Get 2017-11-08 19:56:12 +08:00
Laurent MEUNIER 48a49b4a00 STM32: remove trailing white spaces 2017-11-08 10:28:46 +01:00
Laurent MEUNIER d9bda2800d STM32F4: Flash: fix 2MB GetSector computation
The computation of the sector number in GetSector for 2MB flash sizes
consists in adding an extra constant for 2MB dual bank (12 as in
ADDR_FLASH_SECTOR_12), then going through the same address check as if it
was an address of the first sector.

That means that we need to modify tmp and address as if it was a first bank
address, which we're doing here by sub_stracting 0x100000 delta.
2017-11-08 10:24:36 +01:00
cyliangtw 4118afa259 [M487/NUC472] TRN_Get support 32 bytes unalignment 2017-11-08 14:23:05 +08:00
Marcus Chang f44a15454b Increase flash size on Realtek RTL8195AM
The Realtek RTL8195AM has 2 MiB of external flash. This change
enables the FlashIAP driver to gain access to the full flash.
2017-11-07 09:25:24 -08:00
danclement 36d335baf4 Checking in the fixes related to I2C issues.
Three main issues:
1) The 0x13 special case section in write data in ncs36510_i2c.c didn't have a write++ command.
2) In the same write function, the WDAT8 command was put before the 0x13 section and this is not correct
3) Needed to add wait_us(0) before and after the register writes for apparent clock domain crossing delay times until registers are stable in HW

There were also a handful of other tweaks related to general code maintenance and moving some status register checks to the proper locations.
2017-11-07 16:00:05 +00:00
Yuguo Zou bf3d68ee88 Update HAL code to resolve ticker lockup issue 2017-11-07 17:02:42 +08:00
Tony Wu 07646db24c rtl8195am - fix us_ticker interrupt handling
TIMER2_7_IRQ is shared among several timer sources, including
us_ticker. Raising TIMER2_7_IRQ pending bit will trigger the timer
interrupt, but the timer interrupt handler will not know which timer
source this interrupt is for. This patch sets timer load value to one
tick and force us_ticker to fire almost "immediately".

TIMER2_7_IRQ is handled through a common interrupt handler, and
is automatically cleared. Therefore, there is no need to clear IRQ.

The underlying timer HAL treats load value as micro-seconds and does
conversion internally. Therefore, simply pass micro-seconds to timer
HAL without converting to tick first.

Signed-off-by: Tony Wu <tung7970@gmail.com>
2017-11-07 11:44:43 +08:00
Jammu Kekkonen 46b6490d87 HEXIWEAR: define HEXIWEAR target to support bootloader. 2017-11-03 18:25:02 +02:00
jeromecoutant 88c3bcfd1c NUCLEO_L496ZG_P support 2017-11-03 11:06:45 +01:00
jeromecoutant dde615b8a8 NUCLEO_L496ZG minor update 2017-11-03 10:54:49 +01:00
johnny a2c78e104a Add support for RedBear's BLE Nano 2
Cribbed from 4bf42f2e20

I'm not sure if if there are any copyright issues here with what is
effectively a set of config files. A few folks have been bugging me (and
the redbear folks) for these changes, so I wanted them somewhere
centralized.
2017-11-02 17:43:12 -04:00
Boting Ren e5fd7f2100 Add mbed-cloud-client support on DISCO_L475VG_IOT01A with
wifi_esp8266_v4.json.
2017-11-03 05:15:38 +09:00
Jimmy Brisson 9163ddfe61
Merge pull request #5399 from jeromecoutant/PR_MSP
STM32F4/STM32L4: remove MSP template file
2017-11-02 10:42:04 -05:00
Jimmy Brisson c40b642455
Merge pull request #4650 from catiedev/master
NUCLEO_L496ZG: Add new Platform
2017-11-02 10:36:23 -05:00
Dave Wu 9e0e9c8bee Added a check for the STUCK bit before reading the RNG data register to ensure there are no hardware faults. 2017-11-02 15:50:55 +11:00
Andrea Corrado 53c476acf2 introduced mbed Connect Cloud board based on ODIN-W2 Module rety commit, added ublox changes
Corrected error

Corrected error in targets json

Reworked JSON

Added lwip-eth to Connect ODIN removes ARM CC error

Fixed formating issues

Correct formating error in  .json

Indentation errors
2017-10-31 11:24:28 +00:00
Jimmy Brisson 02f1d0185a
Merge pull request #5320 from kegilbert/fix-build-warnings-lpc4088
Fix ethernet API build warnings for LPC4088
2017-10-30 10:08:15 -05:00
jeromecoutant c51f0f3d5f STM32F4/STM32L4: remove MSP template file
HAL_MspInit/HAL_MspDeInit/HAL_PPP_MspInit/HAL_PPP_MspDeInit weak functions can now be overwritten as it is expected
2017-10-30 10:38:43 +01:00
Wu 2eff4c7569 - Added code to clear temporary variable on the stack before exiting the
trng_get_bytes;
- Removed lp ticker as it does not satisfy the requirements of the lp
timer.
2017-10-30 02:16:55 +01:00
Martin Kojtal 99f4961325 ncs36510: fire interrupt correct timer fix
Use Timer1, it is used for us ticker isr handling. Plus reset target counter,
that should be 0, go to upper ticker isr handler immediately.
2017-10-27 17:46:24 +01:00
Kevin Gilbert 901157b305 Replace PACKED attribute on lpc4088 ethernet structs with MBED_PACKED. Placement of packed attribute was causing warnings due to following typedef 2017-10-26 11:34:48 -05:00
Anna Bridge 97e2d4a8c5 Merge pull request #5025 from grygorek/master
LPC1769 port
2017-10-26 11:35:35 +01:00
Anna Bridge 38ba693c57 Merge pull request #5327 from bcostm/remove_warnings
STM32: Remove compilation warnings
2017-10-26 11:05:20 +01:00
Anna Bridge ea43b437a6 Merge pull request #5352 from Archcady/fix-event-lockup
Fix us_ticker collision and race for RTL8195AM
2017-10-26 11:01:06 +01:00
amq 0958a8dce1 Add missing device_name for targets with bootloader 2017-10-25 10:40:10 +02:00
Jimmy Brisson 1566395323 Merge pull request #5347 from 0xc0170/nxp_fix_lptimer
MCUXpresso: Fix LPTimer issue when using multiple timeout objects
2017-10-23 10:34:50 -05:00
Jimmy Brisson 2a8023180f Merge pull request #5340 from 0xc0170/nxp_fix_us_timer_replacement
MCUXpresso: Fix issue of ticker interrupt incorrectly firing
2017-10-23 10:34:07 -05:00
Jimmy Brisson d2b762092c Merge pull request #5260 from tung7970/fix-iar
RTL8195AM - Fix IAR ielftool zero-padding issue
2017-10-23 10:32:29 -05:00
Jimmy Brisson 3354327a9f Merge pull request #5188 from bcostm/fix_dac_f207zg
NUCLEO_F207ZG: Analogout improvement
2017-10-23 10:31:17 -05:00
Jimmy Brisson 656aa8279b Merge pull request #5179 from LMESTM/trng_deprecated_call
STM32: TRNG: remove call to deprecated HAL_RNG_GetRandomNumber
2017-10-23 10:29:04 -05:00
misodengaku 1c28898ed1 add target TARGET_SAKURAIO_EVB_01. 2017-10-23 12:55:58 +09:00
Laurent MEUNIER 38488623c8 Activate FLASH hal support on 2 STM32 boards
The generic Flash support for L4 and L0 families is already there,
but was not activated by default on 2 recentely added boards:
DISCO_L475VG_IOT01A and DISCO_L072CZ_LRWAN1
This is done now.
2017-10-20 15:11:01 +02:00
Tony Wu 1ee88fb0f6 rtl8195am - fix us_ticker collision and race
Switch to timer 2 for us_ticker for timer 6 might be used
for power saving.

Signed-off-by: Tony Wu <tonywu@realtek.com>
2017-10-20 17:10:02 +08:00
Martin Kojtal 0c679a8f7d Merge pull request #4989 from maclobdell/k66f_flash_iap_bootloader_noflashdrvr
add flash iap and bootloader support to K66F
2017-10-19 16:45:52 +01:00
Martin Kojtal 2af7213c51 Merge pull request #5104 from architech-boards/master
add support for SILICA_SENSOR_NODE platform
2017-10-19 16:44:17 +01:00
Mahadevan Mahesh bc5c94517c MCUXpresso: Fix LPTimer issue when using multiple timeout objects
Fix for Issue #5150

Signed-off-by: Mahadevan Mahesh <Mahesh.Mahadevan@nxp.com>
2017-10-19 11:38:22 +01:00
gorazd b010223145 add new target L-Tek FF-LPC546XX 2017-10-18 23:56:12 +02:00
Mahadevan Mahesh 168bdc8803 MCUXpresso: Fix issue of ticker interrupt incorrectly firing
Fix for Issue #5279

Signed-off-by: Mahadevan Mahesh <Mahesh.Mahadevan@nxp.com>
2017-10-18 15:29:57 +01:00
bcostm 35bf526ca4 STM32: Remove IAR compilation warning 2017-10-18 10:07:06 +02:00
bcostm ad55bc26dc STM32: Remove GCC_ARM compilation warnings 2017-10-17 14:04:59 +02:00
Piotr Grygorczuk be5a8a98ee lpc1769 inherits from lpc1768; reuse lpc1768.ld for LPC1769 target 2017-10-17 11:12:59 +01:00
iotvietmember dba38b6250 Add detect_code=0xC006 to the VBLUNO51 boards configuration.
Add detect_code=0xC006 to the VBLUNO51 boards configuration.
Disbale UART Hard flow control feature.

Signed-off-by: iotvietmember <robotden@gmail.com>
2017-10-17 12:07:18 +07:00
maclobdell e6b0a2bec4 fix app start size in IAR linker for K66F 2017-10-13 10:41:08 -05:00
maclobdell 5ec0616602 add updates for bootloader support to K66F 2017-10-13 10:41:08 -05:00
maclobdell 845f24507e enabled flash in-application-programming driver for k66f 2017-10-13 10:41:07 -05:00
Laurent MEUNIER 849749f86f STM32: RNG: Ensure that no more than 1 instance is used
There is only 1 RNG HW IP and we do not support more than one driver
user at a time, so let's ensure this is the case and raise an error if
needed.
2017-10-13 16:59:33 +02:00
Laurent MEUNIER 14343c49c4 STM32: TRNG: remove call to deprecated HAL_RNG_GetRandomNumber
HAL_RNG_GetRandomNumber is a deprecated API and replaced here with
a call to HAL_RNG_GenerateRandomNumber.

Doing so, we also rework the driver to use the 4 bytes returned by a call
to HAL_RNG_GenerateRandomNumber instead of 1 byte out of 4.

HAL_RNG_GenerateRandomNumber was not returning any error code, so now
we can also check the return code.
2017-10-13 16:59:29 +02:00
Jimmy Brisson 410ef0cc6c Merge pull request #5289 from LMESTM/test_api_ticker
STM32: RTC: Call irq_handler whenever interrupt fires
2017-10-13 09:28:18 -05:00
Jimmy Brisson de3784f6da Merge pull request #5288 from bcostm/NUCLEO32_add_ALT_pins
STM32: Add alternate pins on NUCLEO 32pins boards
2017-10-13 09:27:53 -05:00
Jimmy Brisson f596c714bd Merge pull request #5287 from andreaslarssonublox/ublox_odin_driver_os_5_v2.2_rc1
Updated u-blox ODIN-W2 binaries to 2.2 rc1
2017-10-13 09:27:29 -05:00
Jimmy Brisson 8bf2775e00 Merge pull request #5269 from bcostm/fix_rtc_struct_init
STM32: Initialize RTC structures at init phase.
2017-10-13 09:27:06 -05:00
Jimmy Brisson 6a74cdb39c Merge pull request #5263 from bcostm/fix_init_struct
STM32: Fix analogout structure/variable wrong initialization
2017-10-13 09:25:59 -05:00
Jimmy Brisson d3d7e0ccbf Merge pull request #5228 from pavels/master
Add bootloaderd support to NUCLEO_F446RE target
2017-10-13 09:23:33 -05:00
Jimmy Brisson 2f25744b07 Merge pull request #5223 from seppestas/master
Fix analogin scaling for EFM32 target
2017-10-13 09:22:22 -05:00
Jimmy Brisson 0b796cdbb9 Merge pull request #5187 from nvlsianpu/fix_i2c_timeout
nRFx: Use us ticker for I2C timeout
2017-10-13 09:20:14 -05:00
Jimmy Brisson a67737f993 Merge pull request #5086 from pan-/systick_sleep_fix
Sleep: Disallow sleep for targets turning off the systick clock at sleep entry
2017-10-13 09:19:10 -05:00
Jimmy Brisson 2f652be4c0 Merge pull request #4898 from u-blox/stm32f437xg_hw_security
Enable crypto HW acceleration for STM32F437xG platforms
2017-10-13 09:16:19 -05:00
Pavel Sorejs 97cb8519c8 Add bootloaderd support to NUCLEO_F446RE target 2017-10-12 19:44:02 +02:00
Dave Wu de2b5264e2 Added default delay and sample times for the ADC during initialization. 2017-10-12 12:46:54 +11:00
Tony Wu a35c76d805 rtl8195am - remove redundant file
This file is unused and redundant.

Signed-off-by: Tony Wu <tonywu@realtek.com>
2017-10-11 21:54:23 +08:00
Tony Wu f5b668a9fc rtl8195am - fix IAR zero padding issue
Remove redundant memory regions, and merge multiple RAM regions into one
to solve ielftool zero padding issue.

The side effect is less control over object files placement. It's all up
to linker's best effort.

Signed-off-by: Tony Wu <tonywu@realtek.com>
2017-10-11 21:54:23 +08:00
Tony Wu e57d184fb0 rtl8195am - cleanup IAR icf file
Cleanup ICF file. No logic change.

Signed-off-by: Tony Wu <tonywu@realtek.com>
2017-10-11 21:54:23 +08:00
Dave Wu 6d116273c7 - Cleaned up some formatting issues; - Fixed a build error in spi_master_block_write; - Some clean up in serai_api. 2017-10-11 15:06:49 +11:00
Laurent MEUNIER e15ebd3c53 STM32: RTC: Call irq_handler whenever interrupt fires
lp_ticker driver is the known registered user of RTC handler API.

In case, a lp_ticker is set in the past, the lp_ticker_fire_interrupt
will be called which itself sets the RTC interrupt as pending by calling
NVIC_SetPendingIRQ(RTC_WKUP_IRQn). This all happens without actual
programing of the RTC wake-up.

As a result the RTC HW and corresponding HAL layer doesn't expect an
interrupt to happen and will not call HAL_RTCEx_WakeUpTimerEventCallback.

To sove this situation, we will not use HAL_RTCEx_WakeUpTimerEventCallback
weak definition but rather call handler whenever an RTC interrupt fires.
2017-10-10 17:05:45 +02:00
bcostm 992722df2a Initialize State variable 2017-10-10 16:47:05 +02:00
Roberto Spelta 35736f57a3 removed memory allocation 2017-10-10 16:46:12 +02:00
bcostm c571d8d6f8 STM32 RTC: initializes structures 2017-10-10 16:23:35 +02:00
Roberto Spelta 7af6e88999 fixed pin LEDs 2017-10-10 16:04:52 +02:00
bcostm 02598d57fa Typo correction 2017-10-10 15:04:56 +02:00
bcostm 868143e3dd Coding style and add State field init 2017-10-10 15:02:11 +02:00
bcostm c5cc9ec8cf NUCLEO_F207ZG: Fix issue with tests-api-analogout and GCC_ARM
Without this fix the tests-api-analogout test is fail with GCC_ARM.
2017-10-10 15:02:11 +02:00
bcostm e46beb659f NUCLEO_L011K4: add ALT pins + cleanup 2017-10-10 14:44:01 +02:00
bcostm 0155a416e6 NUCLEO_F042K6: add ALT pins + cleanup 2017-10-10 14:13:10 +02:00
Roberto Spelta 182d689b8c setted pin USBTX and USBRX 2017-10-10 13:58:41 +02:00
Roberto Spelta 3fd009ed05 added clock_source for tests 2017-10-10 13:58:41 +02:00
Roberto Spelta c5e6689e82 added TARGET_STM32L476JG define in mbed_rtx.h 2017-10-10 13:58:41 +02:00
Roberto Spelta f63dfce4bb modification to .ld to improve memory 2017-10-10 13:58:41 +02:00
Roberto Spelta e466685666 copy of L476RG ld file 2017-10-10 13:58:41 +02:00
Roberto Spelta 4d75cbec01 peripherals pins adaptation 2017-10-10 13:58:41 +02:00
Roberto Spelta a95acdabb3 copy of L476RG target 2017-10-10 13:58:41 +02:00
Roberto Spelta b328654085 added SILICA_SENSOR_NODE in target.json 2017-10-10 13:58:41 +02:00
bcostm 6ac1b0e046 NUCLEO_L432KC: add ALT pins + cleanup 2017-10-10 10:51:04 +02:00
bcostm 34760c5567 NUCLEO_L031K6: add ALT pins + cleanup 2017-10-10 10:51:03 +02:00
bcostm f6e30e7422 NUCLEO_F303K8: add ALT pins + cleanup 2017-10-10 10:50:48 +02:00
Jimmy Brisson ad1345771f Merge pull request #5232 from tung7970/fix-target
RTL8195AM - Fix and cleanup mbed_rtx.h
2017-10-09 11:16:08 -05:00
Jimmy Brisson 80ff7071b4 Merge pull request #5210 from bcostm/L4_add_adc_calib
STM32: add ADC calibration for L4, F1, F3 devices
2017-10-09 11:15:31 -05:00
Jimmy Brisson 5c3ce0a84c Merge pull request #5200 from nvlsianpu/nrf51_adcIn_range_extend
Extend nRF51 AnalogIn voltage range to 3.6 V
2017-10-09 11:14:41 -05:00
Jimmy Brisson df484e7885 Merge pull request #5192 from andreaslarssonublox/ublox_move_stdio_uart_defines
Moved STDIO_UART defines for UBLOX_EVK_ODIN_W2
2017-10-09 11:14:06 -05:00
Jimmy Brisson d6136b9790 Merge pull request #5157 from OpenNuvoton/nuvoton
NUC472/M453/M487/NANO130: Add updates for Nuvoton targets
2017-10-09 11:12:43 -05:00
Jimmy Brisson d60f1452d5 Merge pull request #5113 from LMESTM/i2c_OpenDrainNoPull
STM: I2C: Configure pins in OpenDrainNoPull by default (no pullup)
2017-10-09 11:12:04 -05:00
Andrzej Puzdrowski 2a0d38eaf6 fix bug: I2C timeout due the clos strething by slave on nRFx SoC
Change implementation of timeout to one that is using us_ticker hal.
Timeout is now configurable by I2C_TIMEOUT_VALUE_US macro and this
value will be imported if will be defined externaly.
2017-10-09 14:14:54 +02:00
Dave Wu 6f9a54777d Added curly brackets for the single line if else statement. 2017-10-09 17:28:46 +11:00
Dave Wu 5ea792cc9a - Added error checking for trng_get_bytes function;
- Added curly brackets to single line conditions in gpio_qpi.c and gpio_irq_api.c;
- Changed rx and tx buffers in serial module as local variables;
- Minor i2c & spi updates for github pull request;
- Added function definition for spi_master_block_write.
2017-10-09 17:13:58 +11:00
Pierre-Marie Ancele c476a600a2 remove sys.cpp file of the ARM_STD toolchain as done in the MR #4949 2017-10-06 11:37:03 +02:00
Pierre-Marie Ancele ed32f57070 fix can_s struct definition 2017-10-06 11:37:03 +02:00
adustm 4e83d7fb15 Fix for IAR tests 2017-10-06 11:35:16 +02:00
adustm 554125ef07 Align IAR files with mbed-os implementation (tests are still failing) 2017-10-06 11:35:16 +02:00
adustm 3ca0b64318 Replace tab by spaces 2017-10-06 11:35:16 +02:00
adustm fa54e1ecba Make ARM test pass on mbed-os5 tests 2017-10-06 11:35:16 +02:00
adustm 02df64b7d6 replace tab by spaces 2017-10-06 11:35:16 +02:00
Nabil Elqatib 507d05915d Remove analogin_s definition from objects.h
The structure being already defined in
targets/TARGET_STM/TARGET_STM32L4/common_objects.h#L119, there is a
redefinition conflict.
2017-10-06 11:35:16 +02:00
Pierre-Marie Ancele fb27107416 NUCLEO_L496ZG change LPUART1 clock source to fix crash on serial init 2017-10-06 11:35:16 +02:00
Pierre-Marie Ancele abb5e2d0d3 NUCLEO_L496ZG JSON Clock Configuration 2017-10-06 11:35:16 +02:00
Pierre-Marie Ancele 65fec215ab NUCLEO_L496ZG Fix IAR startup script 2017-10-06 11:35:16 +02:00
Pierre-Marie Ancele 4219ffc626 NUCLEO_L496ZG Fix ARM startup script 2017-10-06 11:35:16 +02:00
Pierre-Marie Ancele 3b2bc2d10c STM32L496xG fix objects.h to fit common_objects definition 2017-10-06 11:35:16 +02:00
Pierre-Marie Ancele 313a933c09 NUCLEO_L496ZG Update comments 2017-10-06 11:35:16 +02:00
Pierre-Marie Ancele cca32d8196 NUCLEO_L496ZG Use new alternative pins definition 2017-10-06 11:35:16 +02:00
Pierre-Marie Ancele aebc227c15 NUCLEO_L496ZG update date in file copyrights headers 2017-10-06 11:35:16 +02:00
Pierre-Marie Ancele 7c6c710ee1 NUCLEO_L496ZG Use correct linker script for IAR 2017-10-06 11:35:16 +02:00
Pierre-Marie Ancele 9630a38fb8 NUCLEO_L496ZG target inherits from FAMILY_STM32 2017-10-06 11:35:16 +02:00
Pierre-Marie Ancele eea667567e STM32L496ZG add IAR toolchain 2017-10-06 11:35:16 +02:00
Pierre-Marie Ancele dc2f29c86e STM32L496ZG add ARM_STD toolchain 2017-10-06 11:35:16 +02:00
Pierre-Marie Ancele 53d66bb013 STM32L496ZG add ARM_MICRO toolchain 2017-10-06 11:35:16 +02:00
Pierre-Marie Ancele 0cedd1862e NUCLEO_L496ZG add mbedOS 2 compatibility 2017-10-06 11:35:16 +02:00
Nabil Elqatib fd7008c779 Add BSP files for NUCLEO_L496ZG 2017-10-06 11:35:16 +02:00
Pierre-Marie Ancele 6d3e17cb3c add compatibility with STM32L496xG MCUs 2017-10-06 11:35:16 +02:00
Jimmy Brisson a0b624b62e Merge pull request #5038 from chrissnow/LPC1768-Bootloader
Lpc1768 bootloader support
2017-10-05 11:11:08 -05:00
bcostm 88b82e312d fix init struct analogout 2017-10-05 16:35:05 +02:00
andreas.larsson bc3fd12a0d Updated u-blox ODIN-W2 binaries to 2.2 rc1 2017-10-04 16:41:59 +02:00
Jimmy Brisson 2291644a01 Merge pull request #5162 from NXPmicro/Support_LPC54618
Change LPC54608 to LPC546XX to include support for LPC54608/18/28
2017-10-03 13:23:07 -05:00
Dave Wu d1b81b2161 Removed the custom app thread stack size. 2017-10-03 17:32:10 +11:00
Dave Wu c196ad241d Removed undefined spi slave related functions. 2017-10-03 15:00:42 +11:00
Dave Wu c942171a99 - Fixed an issue where the TRNG device is read even when it is not ready;
- Added a configuration call in trng_init to make sure the TRNG buffering mode is disabled, so only 8-bit bytes are returned;
- Moved the TRNG device handle into the trng_t structure;
- Fixed some formatting errors in the adc driver.
2017-10-03 14:21:37 +11:00
Chris Snow 82ae53a282 Simplify CRP placement. 2017-10-02 19:23:35 +01:00
Mahadevan Mahesh 880f106740 Change LPC54608 to LPC546XX to include support for LPC54608/18/28
Signed-off-by: Mahadevan Mahesh <Mahesh.Mahadevan@nxp.com>
2017-10-02 11:20:27 -05:00
Tony Wu d0de5f792e rtl8195am - fix ARMC6 guards
Fix ARMC6 guard typo introduced in commit 4f3f0cc9cc (Make Realtek link)

While at it, remove redundant ISR_STACK_SIZE assignment for ARMCC.

Signed-off-by: Tony Wu <tonywu@realtek.com>
2017-10-02 23:45:47 +08:00
andreas.larsson 120c9ad56c Moved STDIO_UART defines to targets.json for UBLOX_EVK_ODIN_W2 instead of hardcoded. 2017-10-02 17:45:41 +02:00
Jimmy Brisson c60194fdfd Merge pull request #5208 from jeromecoutant/PR_F7_RTC
STM32F7 : RTC Wake Up Timer issue
2017-10-02 10:41:31 -05:00
Jimmy Brisson 8a3abbc857 Merge pull request #5207 from nvlsianpu/fix_DigitalIn_use_gpiote_nrf5x
Fix: DigitalIn of nRF5x was allocating GPIOTE channel
2017-10-02 10:39:46 -05:00
Jimmy Brisson cc0b3d05aa Merge pull request #5130 from bcostm/freeze_timer_in_debug
STM32: Freeze master timer on stop/breakpoint
2017-10-02 10:38:57 -05:00
Jimmy Brisson 42dc4cf612 Merge pull request #5089 from jeromecoutant/HSE_XTAL
STM32 : Disable HSE XTAL choice from the default clock source
2017-10-02 10:36:08 -05:00
Piotr Grygorczuk 728a3a4a76 mbed LPC1768 & Xpresso LPC1769 unified
Target of LPC1769 links to mbed LPC1768.
The PinNames.h has conditional compile for the pin names.
LWIP lpc17xx emac driver modified to allow LPC1769 target
2017-10-02 11:05:39 +01:00
Tony Wu 5e36d32d86 rtl8195am - remove obsolete configs
The following configs were no longer necessary for RTX5.
    OS_TASKCNT
    OS_MAINSTKSIZE
    OS_CLOCK

Signed-off-by: Tony Wu <tonywu@realtek.com>
2017-10-02 14:37:05 +08:00
Dave Wu 7cf9bf5c3d - Added definiton for i2c_reset;
- Removed unneeded code from i2c and serial modules.
2017-10-02 15:34:19 +11:00
Dave Wu 86639587dd Fixed a merge error for LPC11U34_421. 2017-10-02 14:36:03 +11:00
Dave Wu ce580dde74 Fixed issues raised in the feedback from ARM for the ADuCM4050 platform. 2017-10-02 14:28:25 +11:00
Chris Snow d6404726dd Ensure CRP is set correctly for IAR, GCC and ARM
CRP value can be set through a macro in mbed_app such as
"macros": [
    "CRP=CRP_NONE"
]
2017-09-30 19:26:05 +01:00
Chris Snow f8f54837cd Linker update for bootloader support 2017-09-30 19:00:25 +01:00
Chris Snow a08fc2bb7a Move CRP out of startup and into CRP.c so it can be conditionally compiled 2017-09-30 19:00:25 +01:00
Chris Snow fc503b8daf Enable LPC1768 bootloader support 2017-09-30 19:00:25 +01:00
Jimmy Brisson b6b9daa6f5 Merge pull request #5176 from 0xc0170/fix_fire_efm32
EFM32: fix fire interrupt (set flags)
2017-09-29 10:14:07 -05:00
Jimmy Brisson f5bb15f773 Merge pull request #5152 from NXPmicro/Update_RTC_HAL_driver
Kinetis RTC HAL: Allow writing 0 to the seconds register
2017-09-29 10:12:22 -05:00
Jimmy Brisson 3b224252ef Merge pull request #5141 from NXPmicro/Fix_LPC54608_LEDMap
LPC54608: Swap LED pin connections to match naming on the board
2017-09-29 10:12:04 -05:00
Jimmy Brisson 60ca4e9615 Merge pull request #5029 from kegilbert/odin-pinNames-whitespace-adjust
Adjust whitespace in Odin PinNames file to fit verbose LED pin mappings
2017-09-29 10:07:46 -05:00
Seppe Stas 81cc5a4960 Fix analogin scaling for EFM32 target
Fixes #5115.

`analogin_read_u16` returns a value in the range `0x0000 - 0xFFF0`
since the resolution of the ADC is 12 bits. However, in
`analogin_read` this value gets divided by `0xFFFF` assuming the range
is `0x0000-0xFFFF`. This causes a small error in the value returned by
`AnalogIn::read` for the EFM32 target.
2017-09-29 16:07:33 +02:00
Jimmy Brisson 323dc93d89 Merge pull request #5050 from mbedNoobNinja/master
[RZ_A1H] Correct CAN Message ID and recetption rate in extended mode
2017-09-28 14:03:45 -05:00
bcostm fca97146cd Add ADC calibration for STM32F1 and F3 devices 2017-09-28 12:49:11 +02:00
Vincent Coubard 6cb1a23771 NRF52840: add the device configuration STCLK_OFF_DURING_SLEEP 2017-09-28 09:43:58 +01:00
Jimmy Brisson c06368a21e Merge pull request #5171 from jeromecoutant/PR_L432_RAM
STM32L432KC: increase RAM size from 48k to 64k
2017-09-27 15:35:44 -05:00
Jimmy Brisson 6cb0258344 Merge pull request #5026 from LMESTM/flash_init_issue_4967
STM32: Lock / Unlock flash for each operation
2017-09-27 15:17:26 -05:00
Jimmy Brisson c24fed135b Merge pull request #5032 from 0xc0170/fix_mts_debug
mts targets: fix debug() usage
2017-09-27 09:07:53 -05:00
Jimmy Brisson 760fc335c0 Merge pull request #4982 from NXPmicro/Update_K66_SDK22
Update K66F to SDK 2.2
2017-09-27 09:05:44 -05:00
Jimmy Brisson b562e4e131 Merge pull request #4979 from bcostm/usbdevice_clean-up
STM32: USBDevice files clean-up
2017-09-27 09:04:37 -05:00
Jimmy Brisson 4f1cafd0b7 Merge pull request #5197 from c1728p9/fix_lpc54114
Fix LPC54114 vector table size
2017-09-27 09:01:44 -05:00
bcostm 4824e18a95 STM32L4: add ADC calibration 2017-09-27 14:38:34 +02:00
Andrzej Puzdrowski 93fb667b6d Fix: DigitalIn of nRF5x was allocating GPIOTE channel
The allocation of GPIOTE channels for DigitalIn is unwanted behavior.
This caused early run-out of channels for InterruptPin.
This patch replacing input configuration that is using gpiote driver by configuration that is
using gpio hal.
2017-09-27 09:49:48 +02:00
jeromecoutant 1e36eb6fc9 STM32F7 : RTC Wake Up Timer issue 2017-09-26 17:04:29 +02:00
Andrzej Puzdrowski f861b37196 Extend nRF51 AnalogIn voltage range to 3.6 V
Previous the voltage range was set to 1.2 from SoC internal reference source.
This caused problem with testing. It is unexpected that range is much
shorter than vdd as well.

The voltage range was extended using SoC build in analog prescaler (set to 1/3).
2017-09-26 11:31:50 +02:00
Russ Butler c32890294e Fix LPC54114 vector table size
Correct the vector table size on the LPC54114. This fixes crashes
seen on boot when building with GCC.
2017-09-25 18:49:38 -05:00
Martin Kojtal 9a191de5f9 LPC1768: flash_hal removal duplication
IAP typedef duplication removal
2017-09-25 19:18:18 +02:00
Martin Kojtal 6a6561028e LPC1768: flash erase/write require a critical section
From RM:

32.3.2.6 Interrupts during IAP
The on-chip flash memory is not accessible during erase/write operations. When the user
application code starts executing the interrupt vectors from the user flash area are active.
The user should either disable interrupts, or ensure that user interrupt vectors are active in
RAM and that the interrupt handlers reside in RAM, before making a flash erase/write IAP
call. The IAP code does not use or disable interrupts.
2017-09-25 19:18:06 +02:00
Vincent Coubard d76a5a7eb9 Fix typo in DELTA_DFBM_NQ620 target
Replace `device_has_had` by `device_has_add`
2017-09-25 17:47:16 +01:00
Martin Kojtal c623e889c0 LPC1768: RAM end adjust fix
The topmost 32 bytes used by IAP functions, this was not included in the RAM
end previously.
2017-09-25 13:50:54 +01:00
Mahadevan Mahesh d9a8c63b53 K66F: Use DSPI SDK driver API's in spi block read
Signed-off-by: Mahadevan Mahesh <Mahesh.Mahadevan@nxp.com>
2017-09-24 08:14:59 -05:00
Mahadevan Mahesh 593fb3a6fb K66F: Update to SDK 2.2
Signed-off-by: Mahadevan Mahesh <Mahesh.Mahadevan@nxp.com>
2017-09-24 08:14:52 -05:00
Martin Kojtal 29988933aa EFM32: fix fire interrupt (set flags)
There's overflow counter that needs to be 0, and
CC0 flag set.

Fixes #5051
2017-09-22 14:45:30 +01:00
Martin Kojtal 81fde11dae Merge pull request #4968 from dlfryar/master
Add bootloader support for NXP FRDM-KW24D
2017-09-22 11:33:40 +01:00
Martin Kojtal a74e95fb26 Merge pull request #4973 from gorazdko/new-target-L-TEK-FF1705
Add new target: L-TEK FF1705
2017-09-22 11:32:50 +01:00
Chris Snow e2c42bb0a0 LPC1768 IAP Fix (#4993)
use IAP routines for the flash HAL implementation
2017-09-22 11:30:43 +01:00
ccli8 bf426b0771 [NUC472/M453/M487/NANO130] Remove dead power-down code with mbed OS 3
These power-down code are stale and would be superseded by sleep manager.
2017-09-22 09:42:51 +08:00
ccli8 4040211f9e [NANO130] Refine sleep code
1. Remove stale code with mbed OS 3.
2. Remove check for busy peripherals unorganizedly. This would be supported by e.g. official sleep manager.
2017-09-22 09:33:53 +08:00
Mahadevan Mahesh 1dadb055f7 RTC HAL: Allow writing 0 to the seconds register
Signed-off-by: Mahadevan Mahesh <Mahesh.Mahadevan@nxp.com>
2017-09-21 13:33:07 -05:00
ccli8 785413aa1e [NANO130] Fix RTC hour error with AM/PM 2017-09-21 16:42:00 +08:00
Jimmy Brisson a2cdb10bf7 Merge pull request #4932 from LMESTM/can_reset
Fix STM32 CAN reset to not lose context
2017-09-20 16:24:40 -05:00
ccli8 33070988de [NANO130] Fix lp_ticker wake-up is incorrectly disabled 2017-09-20 16:56:37 +08:00
ccli8 f553277198 [NANO130] Fix lp_ticker typo 2017-09-20 16:56:36 +08:00
ccli8 c4c902289f [NANO130] Change SW2/SW3 to SW1/SW2 to match target board 2017-09-20 16:56:35 +08:00
ccli8 443d18a18c [NANO130] Move target configuration from mbed_lib.json to targets.json 2017-09-20 16:56:34 +08:00
ccli8 d4af4ba3a7 [NUC472/M453/M487] Fix RTC hour error with AM/PM 2017-09-20 16:56:34 +08:00
ccli8 83fc132b97 [NUC472] Fix RTC macro function with no arguments in BSP 2017-09-20 16:56:33 +08:00
ccli8 6eb4e11b37 [NUC472/M453/M487] Refine sleep code
1. Remove stale code with mbed OS 3.
2. Remove check for busy peripherals unorganizedly. This would be supported by e.g. official sleep manager.
2017-09-20 16:56:32 +08:00
ccli8 52733fe7f6 [M487] Replace mktime/localtime with interrupt-safe version in rtc
The use of mktime was causing a fault when called in interrupt handler because on GCC it lock the mutex protecting the environment, To overcome this issue, this patch add dedicated routine to convert a time_t into a tm and vice versa.
In the process mktime has been optimized and is now an order of magnitude faster than the routines present in the C library.
2017-09-20 16:56:31 +08:00
Dave Wu 00b1e72e49 Added support for ADI EV-COG-AD4050LZ platform. 2017-09-20 14:37:22 +10:00
Tony Wu 6c1167844a rtl8195am - fix us_ticker porting
commit f7bc126 (Re-work Rtl8195AM ticker) tried to address ticker drifting
issue, but in fact broke ticker functionality. This patch adjusts us_ticker
porting to unbreak it, and to fix the following tests:

mbed-os-tests-mbed_drivers-ticker
mbed-os-tests-mbed_drivers-timeout
mbed-os-tests-mbedmicro-rtos-mbed-isr
mbed-os-features-frameworks-utest-tests-unit_tests-minimal_async_scheduler
mbed-os-features-frameworks-utest-tests-unit_tests-case_control_async
mbed-os-features-frameworks-utest-tests-unit_tests-case_async_validate

Changes are:

1. Dont disable timer after every us_ticker interrupt. That basically
   breaks ticker functionality.

2. Fine-tune us to tick conversion macro. Previous conversion method
   yields 1 tick drift every 2 ms.

3. Remove special placement of ticker objects. No longer necessary.

Signed-off-by: Tony Wu <tonywu@realtek.com>
2017-09-20 11:03:22 +08:00
Mahadevan Mahesh 82a37b0eb1 LPC54608: Swap LED pin connections to match naming on the board
Signed-off-by: Mahadevan Mahesh <Mahesh.Mahadevan@nxp.com>
2017-09-19 15:37:22 -05:00
jeromecoutant 8b0ee27819 STM32L432KC: increase RAM size from 48k to 64k
WARNING: you have to update ST-Link FW to V2J29M18
http://www.st.com/en/development-tools/stsw-link007.html
2017-09-19 15:11:23 +02:00
mbedNoobNinja 610c8c85fc CAN Extended mode fix 2017-09-19 15:26:10 +03:00
Anna Bridge 003dd7c47f Merge pull request #5044 from Archcady/Profile_debug
Realtek_RTL8195AM fix for debug profile
2017-09-19 10:43:25 +01:00
Anna Bridge f18d2d862a Merge pull request #5091 from theotherjimmy/fix-nordic-concat
Correct booting on Nordic devices with ARMC6
2017-09-19 10:24:54 +01: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
bcostm 9f86a32baf Add freeze timer on debug for all STM32 devices
This is a continuation of the work done on the STM32F401xE devices only.
2017-09-18 13:31:46 +02:00
Jimmy Brisson aeda7f7d28 Merge pull request #5069 from deepikabhavnani/assert_added
Changed error print to assert
2017-09-15 17:50:49 -05:00
Yuguo Zou f7bc12626d Re-work Rtl8195AM ticker
Remove intermediate variances and use uint64 instead;
Remove HalTimerIrqEn called in us_ticker.c
2017-09-15 18:53:24 +08:00
Laurent MEUNIER 076b096efe STM: I2C: Confifure pins in OpenDrainNoPull by default (no pullup)
As reported by MBED user Fran6Jack:
I2C bus are usually 5V tolerant on all STM32 processor.
If an external device on the I2C bus requires 5V operation,
we usually acheive it by using 5V external pull-ups on the bus.
Since signaling uses open-drain output on I2C for both signal SCL and SDA
any 5V tolerant MCU will work on a 5V I2C bus. Having pull-up activated on a 5V externally pull bus, cause the pin to clamp on the STM32 die diode and could damage the IC (There is a note in STM32 datasheet specifying this issue).
It is understood by all the community that I2C bus should always be
externally pulled by physical resistor. I2C initialization should then
be ALWAYS OpenDrainNoPull by default.

Up to now, this I2C driver was setting pull up by default as it helps
basic testing, like 1 master and 1 slave, conencted with 2 wires without
any external pull ups. This will not work anymore after this commit and
applications tests or examples needs to be modified to explicitely
configure pull ups ...  But it is safer to follow reference manual
guidelines.
2017-09-14 17:15:11 +02:00
Jimmy Brisson ca41a0f59d Correct uninit region for nordic targets 2017-09-13 14:51:27 -05:00
Jimmy Brisson 45b59b442b Correct long call macros for ARMC6 2017-09-13 09:48:55 -05:00
jeromecoutant 908ef68fc5 STM32 : Disable HSE XTAL choice from the default clock source 2017-09-13 14:49:25 +02:00
Anna Bridge 7b428916f5 Merge pull request #4949 from theotherjimmy/feature-armc5+armc6
NEW TOOLCHAIN: Add the ARMC6 Compiler
2017-09-13 10:39:15 +01:00
Vincent Coubard 682816d86e Sleep: Disallow sleep for targets turning of the systick clock at sleep entry.
When the RTOS is present and the tickless mode is not implemented, it is
expected that the next tick issued by the Systick timer will wake up the MCU.
However nothing prevents an implementation of the ARM architecture to gate the
systick clock signal upon sleep entry.

Therefore on those targets sleep shall be prohibited if the RTOS is present and the
tickless mode is not implemented.

To ease life of porters , a new option has been added in the device add list:
STCLK_OF_DURING_SLEEP. This option expose that the target turn of the systick
clock during sleep.

Targets which exhibit such behavior shall add this define in their device_has list.
2017-09-13 10:28:02 +01:00
adbridge 32bd25e8df Fix include file for ARMCC 6, should use cmsis_armclang.h 2017-09-12 16:41:11 +01:00
Anna Bridge 2955a0adc6 Merge pull request #5063 from 0xc0170/fix_lpticker_test
Fixing lp ticker and sleep manager tests
2017-09-11 22:28:52 +01:00
Jimmy Brisson d3b33d75a4 Correct NRF SDK11 assembly 2017-09-11 13:20:33 -05:00
Jimmy Brisson 4f3f0cc9cc Make Realtek link
There was some interesting stuff here.
 * ARMC6 treats assembly the same as GNU, but has a different startup
   function, so we branch the asm there
 * Incorrect discriminant, probably copied from other ports
2017-09-11 13:20:33 -05:00
Jimmy Brisson 91afbce18a Correct Nuvoton compiler detection logic 2017-09-11 13:20:33 -05:00
Jimmy Brisson fb53eb65d4 Correct Silabs NVIC selection
Again, the culprit was that the discriminant did not include armc6
2017-09-11 13:20:32 -05:00
Jimmy Brisson 0b7a9033b5 Enable many STM devices with ARMC6
Yet another incorrect arm vs gcc discriminant
2017-09-11 13:20:32 -05:00
Jimmy Brisson 4da4c1f5ce Correct compiler switching in Nordic code 2017-09-11 13:20:32 -05:00
Jimmy Brisson cd4fd86f1f Correct Freescale + NXP compiler detection macros
Also removes duplication of common files
2017-09-11 13:20:32 -05:00
Jimmy Brisson 15a9a0382b Enable Compiling with ARMC6 across all targets
remove duplicate sys.cpp
2017-09-11 13:20:32 -05:00
Deepika 65150b62b9 Added assert for malloc 2017-09-11 11:41:34 -05:00
Anna Bridge cab660d980 Merge pull request #4938 from deepikabhavnani/IAR_fixes
Update IAR to version 8
2017-09-11 17:28:38 +01:00
Russ Butler cf8d6c49a7 Fix errors on NCS36510 after deep sleep
Add NOPs after deep sleep to prevent unexpected behavior. It appears
that the first one or two instructions after deep sleep do not get
executed properly.

Note - This is a temporary workaround. For a more robust solution
the NCS36510 needs to investigate the root cause of this issue.
2017-09-10 22:25:12 -05:00
Russ Butler acf428200f Turn off tickless for the NCS36510
The NCS36510 is not suitable for tickless, since its LP ticker cannot
be scheduled fast enough. This is because it takes four 32KHz clock
cycles before these writes take effect - ~120us.
2017-09-09 20:43:37 -05:00
Jimmy Brisson 3f2e986256 Merge pull request #5012 from LMESTM/issue5004_ticker_16b
STM32_us_ticker_16b: keep code to cope with past event
2017-09-09 12:09:25 -05:00
Russ Butler 48a0489955 Enable tickless for a subset of devices
Enable tickless on nrf5x devices and the NCS36510.
2017-09-07 21:35:07 -05:00
Russ Butler 72f07ec4d9 Make room on stm32f07 for tickless
Decrease the interrupt stack from 2k down to 1k so there is enough
ram to build all the tests with tickless enabled. In general, targets
should not need an interrupt stack greater than 1k with mbed-os.
2017-09-07 21:35:06 -05:00
Russ Butler c3eae587eb Add tickless support for devices without SysTick
Some Cortex-M0 devices, such as the nrf51, don't have the SysTick.
Instead, these targets use a software interrupt to simulate SysTick.
Add the hooks in the tickless code to support these devices. Targets
which do not have SysTick should now define NO_SYSTICK in targets.json
and implement mbed_get_m0_tick_irqn to add os suport.

This patch also removes os tick handling from the existing devices
(nrf51) since this is now handled in common code.
2017-09-07 21:35:04 -05:00
Martin Kojtal 8dfb491bb1 Merge pull request #4958 from soramame21/master
Add bootloader support for DISCO_L476VG
2017-09-07 12:46:08 +01:00
Yuguo Zou ba3bb7ea35 Remove unused code
Clean rtl8195a_init.c a little bit
2017-09-07 15:10:08 +08:00
Yuguo Zou 2642ab321e Update wlan lib to fix debug profile
The issue of mutex returning osErrorISR with debug profile is fixed
2017-09-07 11:05:06 +08:00
Yuguo Zou 1d6a69b3e6 Update MSP setup
Use asm code to set MSP
2017-09-07 10:58:45 +08:00
Jimmy Brisson 22b183a42b Merge pull request #5037 from 0xc0170/fix_arch_pro_heap
Revert "Adjusting Stack size Allocation (IAR, LPC176x)"
2017-09-06 20:31:46 -05:00
Jimmy Brisson 7457bbbc5c Merge pull request #4665 from Archcady/enable_sdram
Enable sdram usage of REALTEK_RTL8195AM
2017-09-06 14:26:34 -05: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
Martin Kojtal 52f84810a7 mts targets: fix debug() usage
Instead of using #if NDEBUG, we can directly invoke debug() function. Fixes #5013
2017-09-06 15:56:01 +01:00
Deepika d12822f95a Resolved compiler error: constructor deleted
IAR 8.x compiler throws error for emac_interface_t constructor
rtw_emac.cpp@220,0: [Pe1790]: the default constructor of "emac_interface"
cannot be referenced -- it is a deleted function

Error is because new object is created of structure with constant member.
Resolved it by using malloc instead new.
2017-09-06 09:51:17 -05:00
Martin Kojtal bb26bd6d2d Revert "Adjusting Stack size Allocation (IAR, LPC176x)"
This reverts commit fce2ca2122.
2017-09-06 13:56:27 +01:00
Kevin Gilbert 6fa766da50 Adjust whitespace in Odin PinNames file to fit verbose LED pin mappings 2017-09-05 13:43:06 -05:00
Dexter Fryar ffe84bd3f3 Add bootloader support for NXP FRDM-KW24D 2017-09-05 13:28:44 -05:00
Jimmy Brisson 2f2da779cb Merge pull request #4924 from hasnainvirk/iar_fix_c027
Adjust Stack size Allocation (IAR, LPC176x)
2017-09-05 11:20:44 -05:00
Jimmy Brisson 5f9d984a22 Merge pull request #5013 from janjongboom/mts_printf
MTS targets: Don't use any printf() calls when NDEBUG is defined
2017-09-05 11:19:42 -05:00
Jimmy Brisson 34d41c5068 Merge pull request #4995 from kegilbert/odin-led-remap
Add LED color remapping definitions to Odin target
2017-09-05 11:17:42 -05:00
Jimmy Brisson e009d9f7be Merge pull request #4975 from LMESTM/STM32_SPI3W
Stm32 spi 3 wires mode support
2017-09-05 11:16:53 -05:00
Jimmy Brisson 94fb4a3aad Merge pull request #4929 from bcostm/adc_sampletime_vrefint
STM32F4: Increase ADC sample time for VREF
2017-09-05 11:15:53 -05:00
Laurent MEUNIER f5aa7c7c82 STM32: Lock / Unlock flash for each operation
Rather than Unlocking flash during flash object creation, and leaving
the flash possibly continuously unlocked a(s object might bever be freed),
we decide to Unlock then Lock again at each erase or program call.
2017-09-05 17:49:07 +02:00
Piotr Grygorczuk 9c77957798 LPCXpresso LPC1769 board ported
The blinky example compiles and runs.
The board has a different eth phy component than mbed LPC1768. It requires a driver.
2017-09-05 15:30:14 +01:00
bcostm e588011394 STM32 USBDevice: Add USB_STM_HAL macro for disco-f469ni 2017-09-05 14:08:51 +02:00
Yuguo Zou 67f1ee5343 Resolve including directory issue in GCC linker script for Ameba
Should not make assumption of specific directory when include .h from
linker script
2017-09-05 19:11:38 +08:00
Laurent MEUNIER f2eb77a81a STM32_us_ticker_16b: reset counter when fire interrupt
Fixing regression introduced in commit
"Ticker: add fire interrupt now function".

In above mentioned commit, the management of timestamp being in the past
has been moved to higher layer (hal/mbed_ticker_api.c), but the reset of
oc_int was missing when implementing the new us_ticker_fire_interrupt
function - which is fixed now.
2017-09-05 13:03:21 +02:00
Laurent MEUNIER 5997811d46 STM32: F2: put can_s struct under DEVICE_CAN option
In case of F2 devices without CAN support.
2017-09-05 10:27:21 +02:00
Laurent MEUNIER 04ac65a4e6 STM32: CAN: restore registers after can_reset
After reset the MCR register content needs to be restored so we're
introducing the can_registers_init function to be called at the first
init stage, but also after reset. We also store the can frequency to
go through the initialisation phase again.
2017-09-05 10:27:21 +02:00
Laurent MEUNIER 8357f6fe77 STM32: CAN: store the mode in object context
In order to apply the same mode in case of reset, we store the current
requested mode in the HAL structure.

To make storage in a single place, we also change can_monitor to call
can_mode function as they actually acting on same registers.
2017-09-05 10:27:21 +02:00
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