Commit Graph

2938 Commits (8540b1ea239192aa3c445b5868b6a39e350aee72)

Author SHA1 Message Date
Mahesh Mahadevan 87244a969b KW41Z: Update SDK TPM driver
Certain instances of the TPM are missing some registers, updated
TPM driver handles this variation. This issue was discovered when
running the PWMOUT tests using the ci-test-shield

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2018-05-01 14:48:12 -05:00
Mahesh Mahadevan 0fb2f01ce7 KL82Z: Fix clock selection for PWMOUT driver
This was verified using the ci-test shield

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2018-05-01 12:22:04 -05:00
Keyur Hariya ca4937d40d Add support for open drain leds 2018-04-30 15:27:07 -05:00
Jimmy Brisson d08c819830
Merge pull request #6746 from marcuschangarm/fix-vector-relocation
Fix vector table relocation for NRF52
2018-04-30 13:51:22 -05:00
Cruz Monrreal e1cc4559cf
Merge pull request #6748 from andrewleech/nrf52_serial_match_assert
nrf5x: Fix assert test on SERIAL_RESERVED_CHAR_MATCH
2018-04-30 11:50:05 -05:00
deepikabhavnani ba4aa3f3a6 Updating HEAP size
IAR 7.8 does not support dynamic heap, and some test/addition of new
feature fail on this device because of less static RAM memory.
Reducing the heap memory size for the same reason.
2018-04-27 15:48:52 -05:00
Marcus Chang bb14051588 Fix vector table relocation for NRF52
The vector table relocation sequence depends on:

1. Whether the SoftDevice is present.
2. The Application is a bootloader or not.

If the SoftDevice is present and the application is a bootloader
the MBR must be initialized to trap SoftDevice service calls
before setting the new vector table address.

The SCB->VTOR must be set to point at the MBR as well.

If the SoftDevice is not present the SCB->VTOR can point at the
new vector table directly.
2018-04-27 13:40:50 -07:00
Cruz Monrreal d06ad9b834
Merge pull request #6696 from hug-dev/cm3ds-cleaning
CM3DS Maintenance Pull Request: Cleaning
2018-04-26 20:20:31 -05:00
Cruz Monrreal 6ccc963b61
Merge pull request #6733 from maximmbed/fix-compiler-warnings
Fix compiler warnings for Maxim platforms
2018-04-26 20:18:32 -05:00
Cruz Monrreal 487576972b
Merge pull request #6720 from marcuschangarm/fix-sdk-spi
Fix bug in Nordic SDK 14.2 SPI driver
2018-04-26 20:17:36 -05:00
Cruz Monrreal 9d6d8c7273
Merge pull request #6721 from marcuschangarm/fix-sdk-i2c
Fix bug in Nordic SDK 14.2 I2C driver
2018-04-26 20:17:25 -05:00
Cruz Monrreal 4e1c04feba
Merge pull request #6734 from codeauroraforum/Fix_LPC54XXX_GPIO
LPC54XXX: Set the pin function to Digital mode
2018-04-26 20:17:07 -05:00
Andrew Leech 627d028f3e nrf5x: Add description to assert on SERIAL_RESERVED_CHAR_MATCH 2018-04-27 11:05:47 +10:00
Jammu Kekkonen d2cf341348 Add bootloader support for NUCLEO_F411RE target 2018-04-26 16:19:43 +03:00
Martin Kojtal 5ee2658dae
Merge pull request #6701 from SiliconLabs/feature/update-rail
Update to EFR32 15.4 driver
2018-04-25 13:17:33 +01:00
Martin Kojtal a858454451
Merge pull request #6717 from marcuschangarm/fix-spi-pins
Fix NRF52 SPI pin initialization
2018-04-25 13:17:05 +01:00
Martin Kojtal beb8da965c
Merge pull request #6735 from codeauroraforum/Add_GPIO_IRQ_Check
LPC546XX: Add check for GPIO IRQ
2018-04-25 13:16:01 +01:00
Mahesh Mahadevan 6513091173 LPC546XX: Add check for GPIO IRQ
GPIO IRQ is available on pins for Ports 0 & 1. Add
a check to return error for other ports.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2018-04-24 14:26:20 -05:00
Mahesh Mahadevan 2670f790ce LPC546XX: Set the pin function to Digital mode
We cannot rely on the default value as a pin could
be use for Analog purposes in which this bit is cleared

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2018-04-24 11:24:23 -05:00
Keyur Hariya fc7c70dbc6 Fix the initialization of a structure 2018-04-24 11:13:19 -05:00
jeromecoutant 7b5a79f56e STM32 RTC Init minor update 2018-04-24 13:50:57 +02:00
Marcus Chang 3edfc77949 Fix bug in Nordic SDK 14.2 I2C driver
Interrupts were not enabled before transmitting data leading to
missed interrupts.
2018-04-23 16:38:31 -07:00
Marcus Chang cba7e0df06 Fix bug in Nordic SDK 14.2 SPI driver
Interrupts were not enabled before transmitting data leading to
missed interrupts.
2018-04-23 16:08:44 -07:00
Keyur Hariya 0ca1a61ba0 Remove the redundant input parameter 2018-04-23 16:37:55 -05:00
Keyur Hariya 1f0809a56b Add the missing input parameter 2018-04-23 16:37:55 -05:00
Keyur Hariya 85bc74cc1d Fix the return type to allow returning error 2018-04-23 16:37:55 -05:00
Keyur Hariya 11cf79ecb0 Add type cast 2018-04-23 16:37:55 -05:00
Marcus Chang 6db4425351 Fix NRF52 SPI pin initialization
SPI pins are not initialized correctly according to the current
SPI mode.

This commit changes how the SPI instance is configured and ensures
that:

1. SPI pins are initialized on each object initialization.
2. SPI pins are reinitialized on each mode or object change.
3. SPI instance is only initialized when a change has occured.
2018-04-23 14:27:33 -07:00
Jimmy Brisson d0e09851ac Use rel path for the ONLY arm asm include statement 2018-04-23 15:23:35 -05:00
Cruz Monrreal b033a6e42e
Merge pull request #6703 from 0xc0170/fix_kl27z_flash
KL27Z: Flash protection macro addition
2018-04-23 15:14:13 -05:00
Cruz Monrreal a15c2f0b22
Merge pull request #6666 from bcostm/PULL_REQUEST_CUBE_UPDATE_L0_V1.10.0
STM32L0: Update with CubeL0 V1.10.0
2018-04-23 11:01:13 -05:00
Cruz Monrreal a27700da33
Merge pull request #6683 from ganesh-ramachandran/master
Add IAR export and nvstore page size fix for TMPM46B
2018-04-23 10:53:55 -05:00
Cruz Monrreal 8e2398520a
Merge pull request #6686 from maximmbed/max32620c-fix-i2c
Remove automatic I2C stop after each read
2018-04-23 10:52:51 -05:00
Cruz Monrreal 38846b2a6c
Merge pull request #6690 from li-ho/ev-cog-bootloader
ADI: Enable bootloader for EV_COG_AD3029LZ and EV_COG_AD4050LZ
2018-04-23 10:51:41 -05:00
Steven Cooreman 780c4c537a Revert file permissions to non-executable 2018-04-23 08:21:20 -05:00
Martin Kojtal 43d0f17740 KL27Z: Flash protection macro addition
PR #6468 updated flash driver, but not for KL27Z target (another CPU type).
It is missing and leads to build failure. This fixes it.
2018-04-23 10:57:20 +01:00
Steven Cooreman c0ee42a6e7 Update to EFR32 15.4 driver
* Updates driver library to v2.3.1 (2018q1) for bugfixes and convenience functions
* Provides library in correct format (2-byte wchar_t flag) for compiling with ARMCC (#6695 uncovered by #6577)
* Reverts to using a statically-allocated packet buffer since malloc is not thread-safe (and the asserts have been turned on)
2018-04-22 23:23:02 -05:00
Hugues de Valon e4b4a2fa45 CM3DS: switch us_ticker HAL to the tick domain
This commit changes the conversion function to do all the calculation
inside the HAL in ticks instead of microseconds.
The conversion will be done in Mbed OS side.
As SystemCoreClock is not a constant, it can not be used to initialise
the ticker_info_t structure.

Change-Id: I8fd4bf20dc5be8b965aca45f800a631275ccc724
Signed-off-by: Hugues de Valon <hugues.devalon@arm.com>
2018-04-20 16:52:29 +01:00
Hugues de Valon 17b3cb1cde CM3DS: fix compiler warnings
This commit changes the code to fix the compiler warnings on ARM,
GCC_ARM and IAR.

Change-Id: I92676d2cc85daacde9f43f1898377a2cea750c50
Signed-off-by: Hugues de Valon <hugues.devalon@arm.com>
2018-04-20 16:52:19 +01:00
Hugues de Valon b68ef3981d CM3DS: fix clock frequency value
This commit changes the clock frequency to the good value of 25 MHz.

Change-Id: I18e559718619e3b1942c42fda2413b690c7b5852
Signed-off-by: Hugues de Valon <hugues.devalon@arm.com>
2018-04-20 16:40:36 +01:00
Hugues de Valon 9f107d2c73 CM3DS: merge the two system header files into one
This commit does not bring functional changes.
Here is the list of changes:
- merge CMSDK_CM3DS.h and SMM_MPS2.h into CM3DS.h
- remove unused code
- split copyright headers from first comment of each file

Change-Id: I79b7ee01689439b7d2fde9d13035a5edf17f69ff
Signed-off-by: Hugues de Valon <hugues.devalon@arm.com>
2018-04-20 16:40:27 +01:00
Edmund Hsu e10ef5bd73 ADI: Enable bootloader for EV_COG_AD3029LZ and EV_COG_AD4050LZ 2018-04-20 16:20:02 +10:00
Edmund Hsu e2d9eb8b79 EV_COG_AD3029LZ: Rework linker scripts to support bootloader
- fix compiler warning message of flash_api.c
- eliminate absolute address of ROM tables
- add MBED_APP_START and MBED_APP_SIZE to linker scripts
2018-04-20 15:57:05 +10:00
Edmund Hsu beb6a38009 EV_COG_AD4050LZ: Rework linker scripts to support bootloader
- fix compiler warning message of flash_api.c
- fix compiler warning message of startup_ADuCM4050.c
- eliminate absolute address of ROM tables
- add MBED_APP_START and MBED_APP_SIZE to linker scripts
2018-04-20 15:45:26 +10:00
Keyur Hariya 3e7a909265 Remove automatic I2C stop after each read
Automatic stop prevents sending repeated start.
2018-04-19 13:20:14 -05:00
Marcus Chang b964420bbc Reorganize targets.json for NRF52 based targets
* Consolidated device_has and macros to the main MCU targets.
* Moved errata configuration to mbed_lib.json for HAL implementation.
* Moved clock configuration to mbed_lib.json for HAL implementation.
* Moved UART configuration to mbed_lib.json for HAL implementation.
2018-04-19 09:41:05 -07:00
Marcus Chang 2c651afd11 Updated target MTB_LAIRD_BL652 to use SDK 14.2 2018-04-19 09:40:41 -07:00
Marcus Chang b9f91b3839 Fix off-by-one error in NRF52 serial implementation 2018-04-19 09:40:41 -07:00
Marcus Chang 18fa9414cd Add resource management for serial for the NRF52 family
Instance counter keeps track of how many objects have been
initialized and freed. On the first object the instance is
enabled and on the last object the instance is disabled.
2018-04-19 09:40:41 -07:00
Marcus Chang cafa8ae752 Fix serial_putc bug in NRF52 family
serial_putc didn't work when called with interrupts disabled.
2018-04-19 09:40:41 -07:00
Marcus Chang 3663494bd9 Serial re-implementation for the NRF52 series
Serial implementation uses UARTE instead of UART peripheral:

* EasyDMA is used for reading and writing data.
* Triple buffering for receiving data.

See README for full description.
2018-04-19 09:40:41 -07:00
Marcus Chang 9502011d96 README file for NRF52 HAL implementation
Added SPI and I2C section.
2018-04-19 09:40:41 -07:00
Marcus Chang fc8f0e1aa4 I2C HAL update for NRF52
When possible, the I2C HAL will now use the TWI driver in SDK 14.

The manual I2C API still maps onto the old TWI peripheral directly
because the TWI driver doesn't provide the needed low-level functionality.
2018-04-19 09:40:41 -07:00
sarahmarshy c9d16e9e89 Implement SPI API for NRF52x
Implement spi_api.c for NRF52X boards using SDK14.

This driver does not implement SPI slave functions and does not use SPIM.
2018-04-19 09:40:41 -07:00
Marcus Chang d11f74cb4c NRF52 series PWM reimplementation for SDK 14.2
Driver uses new API in SDK 14.2
2018-04-19 09:40:41 -07:00
Marcus Chang cfb480447a NRF52: fix us_ticker IRQ handler
Applying PR to NRF52 SDK 14.2:
https://github.com/ARMmbed/mbed-os/pull/5046
2018-04-19 09:40:41 -07:00
Marcus Chang 8dd627621e Fix ISR stack size inconsistencies on NRF52 series
GCC and IAR ISR stack sizes have been set to 0x800.
(ARM compiler does not set stack size explicitly).
2018-04-19 09:40:41 -07:00
Marcus Chang 6db7e68db5 Helper functions for sharing hardware peripherals on NRF52
Common functions for getting and setting the instance owner of a
hardware peripheral. Used for reconfiguring SPI/I2C after change
of ownership.
2018-04-19 09:40:41 -07:00
Blackstone Engineering ea6c0078c7 Extended PeripheralPins and pinmap for NRF52 series
The NRF52 series can map digital signals to any physical pin which
makes it challenging to associate pin names with hardware instances.

pinmap_ex:
  Keep track of which hardware instance is in use and what pins are
  associated with it. Currently only supports I2C and SPI, but
  provides a mechanism for allocating the shared I2C/SPI hardware.

PeripheralPinsDefault:
  Optional pin map for pre-assigning hardware instances at compile
  time. This makes it easier to optimize hardware utilization.
2018-04-19 09:40:41 -07:00
Marcus Chang f0d1424768 Update analogin_api.c for NRF52 SDK 14.2
Use new SDK API and fixed return value to be normalized to 16 bit
as per the Mbed HAL specification.
2018-04-19 09:40:41 -07:00
Donatien Garnier 64baf717e8 Upgrade NRF52 BLE API to version 5
* Add NRF_SD_BLE_API_VERSION=5 macro to MCU_NRF52832 target
* Added initial Softdevice v5 API support for nRF5XPalGattClient.cpp
* Added initial Softdevice v5 API support for nRF5xGap.h
* Added initial Softdevice v5 API support for nRF5xGattServer.cpp
* Make sure the ah() hash function used by the security manager is declared with C linkage
* Removed 'ARM porting pending' checks in Nordic SDK
* Added BLE configuration to mbed_lib.json for NRF52x targets
* Migrated APIs and events model for Nordic SDK14.2 & SD API v5 in btle.cpp; adopted polling dispatch model
* Migrated APIs and events model for Nordic SDK14.2 & SD API v5 in nRF5xn.cpp
* Migrated APIs and events model for Nordic SDK14.2 & SD API v5 in nRF5xGap.cpp
* Added const qualifier to hwCallbacks's p_ble_evt parameter in nRF5xGattServer
* Add workaround to enable Radio Notification module from Nordic SDK
  * Disabled SWI1 interrupt manually from SWI driver module
    * Added missing include directive for "nrf_nvic.h" in ble_radio_notification.c
* Set correct number of custom UUIDs
* Adjust Softdevice RAM requirements for NRF52832/S132
  * RAM settings for the application were adjusted as follow:
    * Start: 0x20003800
    * Size: 0xC800
* Adjust Softdevice RAM requirements for NRF52840/S140
  * RAM settings for the application were adjusted as follow:
    * Start: 0x20003700 (was 0x20003000)
    * Size: 0xC900
* Added 3dBm as a permitted TX Power value for NRF52832
* Fix address type recovery in GAP
* Return min non-connectable adv interval compatible with infrastrcture's expectations
* Moved BLE driver from TARGET_SDK_14_2/FEATURE_BLE to TARGET_SDK_14_2/TARGET_SOFTDEVICE_COMMON/ble
2018-04-19 09:40:41 -07:00
Marcus Chang fa79e685fc Fix TRNG for NRF52
* When multiple TRNG objects are initialized, destroying the first
  object will turn the TRNG off for the other objects. This fix
  adds a counter to ensure that only when the last object is
  destroyed will it cause the TRNG to be disabled.

* The corner case where a user request 0 bytes is correctly handled
  and will now return immediately.
2018-04-19 09:40:41 -07:00
Marcus Chang 5d5277336a Fix NRF52 build error
This commit removes mbed 2 support for the NRF52 since the new build
system is incompatible with the old one.
2018-04-19 09:40:41 -07:00
Marcus Chang 3b9ec4932c Flash storage for NRF52
Add fstorage and fds from Nordic SDK for SoftDevice compatible
flash storage. Mbed HAL flash API mapped to use fstorage API
to ensure write and erase doesn't conflict with BLE operation.
2018-04-19 09:40:41 -07:00
Marcus Chang 2e7b5ba27b Fix linker scripts and startup code for NRF52
Various bug fixes:

 * Moved SPIM3 location in vector table based on new location in SDK 14.2.
 * Updated vector table entries and size in startup code and linker scripts.
 * Added missing vector table RAM section to IAR linker script.
2018-04-19 09:40:41 -07:00
Marcus Chang 00713342b9 Switch to managed bootloader for SoftDevice merge on NRF52
SoftDevice can be swapped even easier now:

    "target_overrides": {
        "*": {
            "target.extra_labels_remove": ["SOFTDEVICE_COMMON", "SOFTDEVICE_S140"],
            "target.extra_labels_add": ["SOFTDEVICE_NONE"]
        }
    }
2018-04-19 09:40:41 -07:00
Marcus Chang 39c69f146c Optional SoftDevice for the NRF52 series
Ability to swap SoftDevices using the mbed configuration system.

For example, build NRF52840_DK without SoftDevice:

    "target_overrides": {
        "*": {
            "target.MERGE_SOFT_DEVICE": false,
            "target.extra_labels_remove": ["SOFTDEVICE_COMMON", "SOFTDEVICE_S140"],
            "target.extra_labels_add": ["SOFTDEVICE_NONE"]
        }
    }

Pinned down vector table to beginningn of RAM.
2018-04-19 09:40:41 -07:00
Marcus Chang 770b1a326e Simplified critical_section_api.c for NRF52 series
Critical section enter/exit is now delegated to Nordic SDK's

sd_nvic_critical_region_enter
sd_nvic_critical_region_exit

When the SoftDevice is not included these functions map to

__disable_irq
__enable_irq
2018-04-19 09:40:41 -07:00
Marcus Chang 5c3e494a7e Renamed MCU_NRF52832 inheritance in MTB_UBLOX_NINA_B1 2018-04-19 09:40:41 -07:00
Marcus Chang c049921064 Add GCC linker sections for NRF52 SoftDevice 2018-04-19 09:40:41 -07:00
sarahmarshy 6827816454 Add TRNG device_has for NRF52_DK 2018-04-19 09:40:41 -07:00
Marcus Chang cf61c240bf Update critical section for NRF5x 2018-04-19 09:40:41 -07:00
Marcus Chang efa3461fd4 Change target.json to use new SDK and folder structure for NRF52 2018-04-19 09:40:41 -07:00
Marcus Chang 3940d3abaf Default SDK configuration for NRF52832 and NRF52840 2018-04-19 09:40:41 -07:00
Marcus Chang 0b40ddc530 Initial mbed HAL implementation for NRF5x family
Copied from previous location in targets/TARGET_NORDIC/TARGET_NRF5

Core functionality is working but some peripherals do not.
2018-04-19 09:40:41 -07:00
Marcus Chang d861bda214 Pin configurations for NRF52840 based boards 2018-04-19 09:40:41 -07:00
Marcus Chang 56cf0921ad Pin configurations for NRF52832 based boards 2018-04-19 09:40:41 -07:00
Marcus Chang ad1b986913 Linker scripts and startup files for NRF52840
Flash and RAM offsets have been modified to fit new SoftDevice
2018-04-19 09:40:41 -07:00
Marcus Chang bff552de6c Linker scripts and startup files for NRF52832
Flash and RAM offsets have been modified to fit new SoftDevice
2018-04-19 09:40:41 -07:00
Marcus Chang fc2760ad04 NRF52832 and NRF52840 upgraded to Nordic SDK 14 and SoftDevice 5.0
Initial commit for separating NRF52 code from the NRF51 and for
combining the NRF52832 and NRF52840 SDK to version 14.

nRF5_SDK_14.2.0_17b948a.zip has been used as baseline.

The folders in SDK/components:
 * ble
 * boards
 * device
 * drivers_nrf
 * libraries
 * softdevice

have been copied to TARGET_NORDIC/TARGET_NRF52/TARGET_SDK14.

Each folder contains a README.md file describing any modifications
made to that particular folder. Most common operation is deletion
of files.

If the need arise in the future the missing files can be added again.

The SoftDevices have been moved to TARGET_SOFTDEVICE_x folders for
flexible selection.

ble.h has been renamed to nrf_ble.h to avoid namespace clash with
mbed OS BLE.
2018-04-19 09:40:41 -07:00
Ganesh Ramachandran 38c5997e4c IAR export and page size fix for nvstore 2018-04-19 17:24:58 +05:30
Martin Kojtal cba28cc0ac
Merge pull request #6221 from codeauroraforum/Add_RNG_LPC54XXX
LPC546XX: Add TRNG support
2018-04-18 14:25:56 +02:00
Martin Kojtal f1738c9186
Merge pull request #6651 from tung7970/fix-warnings
rtl8195am - Fix more compiler warnings
2018-04-18 14:19:00 +02:00
bcostm 893b759663 L0 ST CUBE V1.10.0: change adc sampling time 2018-04-18 14:06:21 +02:00
bcostm 61576f8131 L0 ST CUBE V1.10.0: spi and i2c corrections 2018-04-18 14:06:20 +02:00
bcostm 8191487a4d L0 ST CUBE V1.10.0 2018-04-18 14:06:20 +02:00
Cruz Monrreal d680ceeba6
Merge pull request #6603 from marcuschangarm/fix-flowcontrol
Optional hardware flow control for STDOUT
2018-04-17 13:15:31 -05:00
Thomas Sailer 004724d4d9 add ncs36510 fib and trim generation 2018-04-17 18:28:41 +02:00
Cruz Monrreal 5d4762a02f
Merge pull request #6648 from li-ho/ev-cog-buttons
ADI: Add BUTTON pin names for EV_COG_AD4050LZ and EV_COG_AD3029LZ
2018-04-17 10:56:29 -05:00
Cruz Monrreal 1cc78f864c
Merge pull request #6647 from codeauroraforum/Fix_LPC54xxx_I2C
Fix MCUXpresso LPC I2C driver
2018-04-17 10:56:10 -05:00
Cruz Monrreal df5119677a
Merge pull request #6607 from maximmbed/max32630-fix-spi
Improve SPI block write
2018-04-17 10:55:00 -05:00
Cruz Monrreal 7489401044
Merge pull request #6468 from codeauroraforum/Fix_DeepSleep_Implementation
Fix deep sleep implementation
2018-04-17 10:53:27 -05:00
Tony Wu e7286bc094 rtl8195am - fix wifi_util.c warnings
Fix the following warnings:

[Warning] wifi_util.c@791,20: comparison between signed and unsigned integer expressions [-Wsign-compare]
[Warning] wifi_util.c@835,21: comparison between signed and unsigned integer expressions [-Wsign-compare]

Signed-off-by: Tony Wu <tonywu@realtek.com>
2018-04-17 16:42:05 +08:00
Tony Wu 71859debd6 rtl8195am - fix dhcps.c warnings
Fix the following errors:

[Warning] dhcps.c@158,1: label 'Exit' defined but not used [-Wunused-label]
[Warning] dhcps.c@161,13: 'dump_client_table' defined but not used [-Wunused-function]

Signed-off-by: Tony Wu <tonywu@realtek.com>
2018-04-17 16:34:48 +08:00
Tony Wu 7ac365c258 rtl8195am - fix wifi_promisc.c warnings
Fix the following warnings:

[Warning] wifi_promisc.c@113,61: missing braces around initializer [-Wmissing-braces]
[Warning] wifi_promisc.c@297,52: comparison between signed and unsigned integer expressions [-Wsign-compare]
[Warning] wifi_promisc.c@403,52: comparison between signed and unsigned integer expressions [-Wsign-compare]

Signed-off-by: Tony Wu <tonywu@realtek.com>
2018-04-17 16:31:58 +08:00
Tony Wu 13dd84ec3c rtl8195am - fix lwip_intf.c warnings
Fix the following warning:

[Warning] lwip_intf.c@134,5: this 'if' clause does not guard... [-Wmisleading-indentation]

Signed-off-by: Tony Wu <tonywu@realtek.com>
2018-04-17 16:27:37 +08:00
Tony Wu 8e4152cc06 rtl8195am - fix tcm_heap.c warnings
Fix the following warnings:

[Warning] tcm_heap.c@70,18: format '%x' expects argument of type 'unsigned int', but argument 2 has type 'MemChunk * {aka struct _MemChunk *}' [-Wformat=]
[Warning] tcm_heap.c@70,28: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'MemChunk * {aka struct _MemChunk *}' [-Wformat=]
[Warning] tcm_heap.c@336,6: unused variable 'i' [-Wunused-variable]

Signed-off-by: Tony Wu <tonywu@realtek.com>
2018-04-17 16:21:18 +08:00
Tony Wu 33cc3b7907 rtl8195am - fix rtw_emac.cpp warnings
Fix the following warnings:

[Warning] rtw_emac.cpp@62,104: format '%x' expects argument of type 'unsigned int*', but argument 3 has type 'uint8_t* {aka unsigned char*}' [-Wformat=]
[Warning] rtw_emac.cpp@62,104: format '%x' expects argument of type 'unsigned int*', but argument 4 has type 'uint8_t* {aka unsigned char*}' [-Wformat=]
[Warning] rtw_emac.cpp@62,104: format '%x' expects argument of type 'unsigned int*', but argument 5 has type 'uint8_t* {aka unsigned char*}' [-Wformat=]
[Warning] rtw_emac.cpp@62,104: format '%x' expects argument of type 'unsigned int*', but argument 6 has type 'uint8_t* {aka unsigned char*}' [-Wformat=]
[Warning] rtw_emac.cpp@62,104: format '%x' expects argument of type 'unsigned int*', but argument 7 has type 'uint8_t* {aka unsigned char*}' [-Wformat=]
[Warning] rtw_emac.cpp@62,104: format '%x' expects argument of type 'unsigned int*', but argument 8 has type 'uint8_t* {aka unsigned char*}' [-Wformat=]
[Warning] rtw_emac.cpp@201,101: format '%x' expects argument of type 'unsigned int*', but argument 3 has type 'char*' [-Wformat=]
[Warning] rtw_emac.cpp@201,101: format '%x' expects argument of type 'unsigned int*', but argument 4 has type 'char*' [-Wformat=]
[Warning] rtw_emac.cpp@201,101: format '%x' expects argument of type 'unsigned int*', but argument 5 has type 'char*' [-Wformat=]
[Warning] rtw_emac.cpp@201,101: format '%x' expects argument of type 'unsigned int*', but argument 6 has type 'char*' [-Wformat=]
[Warning] rtw_emac.cpp@201,101: format '%x' expects argument of type 'unsigned int*', but argument 7 has type 'char*' [-Wformat=]
[Warning] rtw_emac.cpp@201,101: format '%x' expects argument of type 'unsigned int*', but argument 8 has type 'char*' [-Wformat=]

Signed-off-by: Tony Wu <tonywu@realtek.com>
2018-04-17 16:18:03 +08:00
Tony Wu 93a5683f92 rtl8195am - fix wifi_conf.c warnings
Fix the following warnings:

[Warning] wifi_conf.c@326,28: suggest parentheses around comparison in operand of '|' [-Wparentheses]
[Warning] wifi_conf.c@451,39: format '%x' expects argument of type 'unsigned int *', but argument 3 has type 'u32 * {aka long unsigned int *}' [-Wformat=]
[Warning] wifi_conf.c@451,43: format '%x' expects argument of type 'unsigned int *', but argument 4 has type 'u32 * {aka long unsigned int *}' [-Wformat=]
[Warning] wifi_conf.c@451,47: format '%x' expects argument of type 'unsigned int *', but argument 5 has type 'u32 * {aka long unsigned int *}' [-Wformat=]
[Warning] wifi_conf.c@451,51: format '%x' expects argument of type 'unsigned int *', but argument 6 has type 'u32 * {aka long unsigned int *}' [-Wformat=]
[Warning] wifi_conf.c@451,55: format '%x' expects argument of type 'unsigned int *', but argument 7 has type 'u32 * {aka long unsigned int *}' [-Wformat=]
[Warning] wifi_conf.c@460,39: format '%x' expects argument of type 'unsigned int *', but argument 3 has type 'u32 * {aka long unsigned int *}' [-Wformat=]
[Warning] wifi_conf.c@460,43: format '%x' expects argument of type 'unsigned int *', but argument 4 has type 'u32 * {aka long unsigned int *}' [-Wformat=]
[Warning] wifi_conf.c@460,47: format '%x' expects argument of type 'unsigned int *', but argument 5 has type 'u32 * {aka long unsigned int *}' [-Wformat=]
[Warning] wifi_conf.c@460,51: format '%x' expects argument of type 'unsigned int *', but argument 6 has type 'u32 * {aka long unsigned int *}' [-Wformat=]
[Warning] wifi_conf.c@460,55: format '%x' expects argument of type 'unsigned int *', but argument 7 has type 'u32 * {aka long unsigned int *}' [-Wformat=]
[Warning] wifi_conf.c@460,59: format '%x' expects argument of type 'unsigned int *', but argument 8 has type 'u32 * {aka long unsigned int *}' [-Wformat=]
[Warning] wifi_conf.c@460,63: format '%x' expects argument of type 'unsigned int *', but argument 9 has type 'u32 * {aka long unsigned int *}' [-Wformat=]
[Warning] wifi_conf.c@460,35: format '%x' expects argument of type 'unsigned int *', but argument 10 has type 'u32 * {aka long unsigned int *}' [-Wformat=]
[Warning] wifi_conf.c@460,35: format '%x' expects argument of type 'unsigned int *', but argument 11 has type 'u32 * {aka long unsigned int *}' [-Wformat=]
[Warning] wifi_conf.c@460,35: format '%x' expects argument of type 'unsigned int *', but argument 12 has type 'u32 * {aka long unsigned int *}' [-Wformat=]
[Warning] wifi_conf.c@460,35: format '%x' expects argument of type 'unsigned int *', but argument 13 has type 'u32 * {aka long unsigned int *}' [-Wformat=]
[Warning] wifi_conf.c@460,35: format '%x' expects argument of type 'unsigned int *', but argument 14 has type 'u32 * {aka long unsigned int *}' [-Wformat=]
[Warning] wifi_conf.c@460,35: format '%x' expects argument of type 'unsigned int *', but argument 15 has type 'u32 * {aka long unsigned int *}' [-Wformat=]
[Warning] wifi_conf.c@831,16: format '%d' expects argument of type 'int *', but argument 3 has type 'rtw_security_t * {aka long unsigned int *}' [-Wformat=]
[Warning] wifi_conf.c@1335,2: suggest parentheses around assignment used as truth value [-Wparentheses]
[Warning] wifi_conf.c@1398,13: pointer targets in passing argument 1 of 'rtw_mfree' differ in signedness [-Wpointer-sign]
[Warning] wifi_conf.c@1724,7: variable 'ret' set but not used [-Wunused-but-set-variable]
[Warning] wifi_conf.c@1770,6: variable 'ret' set but not used [-Wunused-but-set-variable]

Signed-off-by: Tony Wu <tonywu@realtek.com>
2018-04-17 11:05:49 +08:00
Tony Wu 7ee2d2a862 rtl8195am - fix osdep_service.c warnings
Fix the following warnings:

[Warning] osdep_service.c@58,11: comparison between signed and unsigned integer expressions [-Wsign-compare]
[Warning] osdep_service.c@208,61: suggest braces around empty body in an 'else' statement [-Wempty-body]
[Warning] osdep_service.c@1063,16: pointer targets in passing argument 1 of '_rtw_mfree' differ in signedness [-Wpointer-sign]

Signed-off-by: Tony Wu <tonywu@realtek.com>
2018-04-17 10:51:25 +08:00
Tony Wu 03600f6ef3 rtl8195am - fix spi_api.c warnings
Fix the following warnings:

[Warning] hal_ssi.h@28,85: suggest braces around empty body in an 'if' statement [-Wempty-body]
[Warning] spi_api.c@87,27: comparison between signed and unsigned integer expressions [-Wsign-compare]
[Warning] spi_api.c@76,14: unused variable 'MaxSsiFreq' [-Wunused-variable]

Signed-off-by: Tony Wu <tonywu@realtek.com>
2018-04-17 10:51:22 +08:00
Tony Wu 7b0ff75f5c rtl8195am - fix pwmout_api.c warnings
Fix the following warning:

[Warning] pwmout_api.c@65,29: comparison between signed and unsigned integer expressions [-Wsign-compare]

Signed-off-by: Tony Wu <tonywu@realtek.com>
2018-04-17 10:41:27 +08:00
Tony Wu e5f0542436 rtl8195am - fix log_uart_api.c warnings
Fix the following warnings:

[Warning] log_uart_api.c@58,38: comparison between signed and unsigned integer expressions [-Wsign-compare]
[Warning] log_uart_api.c@151,38: comparison between signed and unsigned integer expressions [-Wsign-compare]
[Warning] log_uart_api.c@260,27: unused variable 'pUartAdapter' [-Wunused-variable]
[Warning] log_uart_api.c@268,27: unused variable 'pUartAdapter' [-Wunused-variable]
[Warning] log_uart_api.c@276,27: unused variable 'pUartAdapter' [-Wunused-variable]
[Warning] log_uart_api.c@290,27: unused variable 'pUartAdapter' [-Wunused-variable]
[Warning] log_uart_api.c@328,27: unused variable 'pUartAdapter' [-Wunused-variable]
[Warning] log_uart_api.c@338,27: unused variable 'pUartAdapter' [-Wunused-variable]
[Warning] log_uart_api.c@376,45: pointer targets in passing argument 2 of 'HalLogUartRecv' differ in signedness [-Wpointer-sign]
[Warning] log_uart_api.c@386,45: pointer targets in passing argument 2 of 'HalLogUartSend' differ in signedness [-Wpointer-sign]

Signed-off-by: Tony Wu <tonywu@realtek.com>
2018-04-17 10:40:11 +08:00
Tony Wu 1b815de4ac rtl8195am - fix i2c_api.c warnings
Fix the following warnings:

[Warning] i2c_api.c@94,26: comparison between signed and unsigned integer expressions [-Wsign-compare]
[Warning] i2c_api.c@231,5: implicit declaration of function 'memset' [-Wimplicit-function-declaration]
[Warning] i2c_api.c@460,14: unused variable 'i2c_default_addr' [-Wunused-variable]

Signed-off-by: Tony Wu <tonywu@realtek.com>
2018-04-17 10:33:48 +08:00
Edmund Hsu 3d37c26d28 Add BUTTON pin names for EV_COG_AD4050LZ and EV_COG_AD3029LZ
Apart from reset and boot buttons, EV_COG_AD4050LZ and
EV_COG_AD3029LZ have 2 more user defined buttons:

- BUTTON1
- BUTTON2
2018-04-17 10:53:11 +10:00
Mahesh Mahadevan 6e9f99ca93 MCUXpresso: Fix LPC I2C driver for byte operations
The ci-shield tests that manually generate the START, STOP
by calling the HAL functions were failing. The byte operation
HAL functions cannot use the MCUXpresso SDK driver API's.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2018-04-16 16:35:34 -05:00
Mahesh Mahadevan 69a950c6eb MCUXpresso: Fix SDK LPC driver
Poll the Pending bit after START and STOP operations to ensure
operation completion.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2018-04-16 16:35:34 -05:00
Cruz Monrreal f73415e9f8
Merge pull request #6466 from OpenNuvoton/nuvoton_fix_spi
Nuvoton: Fix issues with SPI
2018-04-16 10:47:51 -05:00
Cruz Monrreal 4ff1a49d17
Merge pull request #6541 from jorisa/lpc11c24-spfix
Add mbed-os 5 build support for LPC11C24
2018-04-16 10:45:06 -05:00
Cruz Monrreal fd756ef2f5
Merge pull request #6598 from embeddedartists/lpc4088_hardfault_fix
LPC4088: Fix hardfault occuring after power-cycle
2018-04-16 10:43:37 -05:00
Cruz Monrreal e2567e5dad
Merge pull request #6599 from jeromecoutant/PR_WARNING
STM32 compilation warning issues
2018-04-16 10:41:36 -05:00
Cruz Monrreal fe44dc0468
Merge pull request #6601 from KariHaapalehto/add_mtb_adv_wise_1530
Add new target MTB_ADV_WISE_1530
2018-04-16 10:40:12 -05:00
Cruz Monrreal 63412bbe1d
Merge pull request #6605 from maximmbed/max32625-rework-ticker
Rework us_ticker and rtc_api/lp_ticker | Fix compiler warning for spi_api
2018-04-16 10:39:11 -05:00
Cruz Monrreal b630691fdf
Merge pull request #6606 from maximmbed/max32630-fix-i2c
Fix I2C master
2018-04-16 10:38:10 -05:00
Cruz Monrreal 988a16b245
Merge pull request #6608 from maximmbed/max32630-rework-ticker
Rework us_ticker and rtc_api/lp_ticker
2018-04-16 10:37:51 -05:00
Cruz Monrreal 37f36a776f
Merge pull request #6609 from pauluap/compiler_warning_pcd_unsigned_signed
STM32 PCD negative numbers issue
2018-04-16 10:36:13 -05:00
Marcus Chang 7e6538ffed Optional hardware flow control for STDOUT
Some platforms have interface chips with hardware flow control
enabled by default. This commit adds configurable flow control to
STDOUT.

Usage:

* Define pin names STDIO_UART_RTS for Rx-flow-control and
  STDIO_UART_CTS for Tx-flow-control.
* Set target.console-uart-flow-control. Valid options are:
  null, RTS, CTS, and RTSCTS.
2018-04-15 20:12:14 -07:00
Keyur Hariya b08c752fcd Fix indentation 2018-04-13 15:20:00 -05:00
Keyur Hariya 16d38895d3 Improve SPI block write
Replace looping construct with actual block writes.
Transaction in spi_master_block_write funtion is protected by critical
section to ensure it is completed without interruption. A hardware
limitation may cause data corruption if the TX fifo is allowed to run
empty.
2018-04-13 15:14:10 -05:00
Paul Thompson 20f11bc13f Extend changes to other STM32 devices that have the PCD_WriteEmptyTxFifo() function 2018-04-13 05:27:03 -07:00
Paul Thompson b45d4233e1 Make the atomic_clr_u32 conditional use raw values rather than computed, remove need for guards 2018-04-13 04:44:43 -07:00
Paul Thompson 2211a27f53 Drop usage of ilen, just use len and cast it to int32_t as appropriate 2018-04-13 00:27:00 -07:00
Tony Wu d9c51b92fc rtl8195am - fix excessive compiler warnings
Fix hundreds of excessive compiler warnings due to out of enum type range

Examples shown as follows:
mbed-os.lib/targets/TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/fwlib/hal_i2c.h", Line: 329, Col: 34
mbed-os.lib/targets/TARGET_Realtek/TARGET_AMEBA/TARGET_RTL8195A/PinNames.h", Line: 172, Col: 11

Signed-off-by: Tony Wu <tonywu@realtek.com>
2018-04-13 13:48:59 +08:00
Cruz Monrreal 641e814048
Merge pull request #6169 from hug-dev/cm3ds-trng
CM3DS Maintenance Pull Request: TRNG support (3/4)
2018-04-12 18:38:15 -05:00
Cruz Monrreal 52340753e5
Merge pull request #6567 from bcostm/fix_xtal_disco_f769ni
DISCO_F769NI: set clock_source to USE_PLL_HSE_EXTC
2018-04-12 18:36:24 -05:00
Keyur Hariya b594ec20b8 Fix compiler warning for spi_api
Add mbed_critical include file to disable compiler warning messages.
2018-04-12 12:52:55 -05:00
Keyur Hariya 098c2cf756 Rework us_ticker and rtc_api/lp_ticker
Simplify tickers to stop emulating 1us ticks by using native timer resolutions.
Implement ticker get info functions.
Separate rtc and lp ticker init status by implementing separate functions.
2018-04-12 12:52:05 -05:00
Keyur Hariya 278707518c Revert "Rework us_ticker and rtc_api/lp_ticker | Fix compiler warnings for spi_api"
This reverts commit 840246a4d5.
2018-04-12 12:51:05 -05:00
Paul Thompson 8f4a5e2093 Revert to original fix concentrating on type correctness 2018-04-12 10:09:53 -07:00
Paul Thompson 430784b084 Initial work was for unsigned-signed comparison fix. Current work fixes negative number issues
Compile: stm32f7xx_hal_pcd.c
../targets/TARGET_STM/TARGET_STM32F7/device/stm32f7xx_hal_pcd.c: In function 'PCD_WriteEmptyTxFifo':
../targets/TARGET_STM/TARGET_STM32F7/device/stm32f7xx_hal_pcd.c:1310:11: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   if (len > ep->maxpacket)
           ^
../targets/TARGET_STM/TARGET_STM32F7/device/stm32f7xx_hal_pcd.c:1325:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (len > ep->maxpacket)
             ^
2018-04-12 09:43:18 -07:00
Paul Thompson c67f535fb3 Drop locking around TX and RX. The DMA channels are independent of each other 2018-04-12 09:42:28 -07:00
jeromecoutant 71d7d24bd6 STM32L4 : correct compilation warnings 2018-04-12 10:56:41 +02:00
jeromecoutant e7c4120550 STM32L1 : correct compilation warnings 2018-04-12 10:55:16 +02:00
jeromecoutant eeca430b23 STM32L0 : correct compilation warnings 2018-04-12 10:55:11 +02:00
jeromecoutant 2d0dce1db5 STM32F7 : correct compilation warnings 2018-04-12 10:55:02 +02:00
jeromecoutant 2fcf8d8990 STM32F4 : correct compilation warnings 2018-04-12 10:52:21 +02:00
jeromecoutant a540a21106 STM32F3 : correct compilation warnings 2018-04-12 10:51:33 +02:00
jeromecoutant 4e9e9f5c62 STM32F2 : correct compilation warnings 2018-04-12 10:51:18 +02:00
Keyur Hariya 534f570b0c Rework us_ticker and rtc_api/lp_ticker
Simplify tickers to stop emulating 1us ticks by using native timer resolutions.
Implement ticker get info functions.
Separate rtc and lp ticker init status by implementing separate functions.
2018-04-11 16:16:09 -05:00
Keyur Hariya e802b255be Remove automatic I2C stop after each read
Automatic stop prevents sending repeated start.
2018-04-11 15:07:52 -05:00
Keyur Hariya 840246a4d5 Rework us_ticker and rtc_api/lp_ticker | Fix compiler warnings for spi_api
Simplify tickers to stop emulating 1us ticks by using native timer resolutions.
Implement ticker get info functions.
Separate rtc and lp ticker init status by implementing separate functions.
Add mbed_critical include file to disable compiler warning messages.
2018-04-11 15:02:11 -05:00
Kari Haapalehto f2b37b7d42 Add new target MTB_ADV_WISE_1530.
MTB_ADV_WISE_1530 and MTB_USI_WM_BN_BM_22 includes same usi chip,
so common USI_WM_BN_BM_22 target has been created.
MTB_ADV_WISE_1530 and MTB_USI_WM_BN_BM_22 are inheting the common usi target
2018-04-11 15:50:28 +03:00
Andreas Rebert 01d06a9f51 LPC4088: Fix hardfault occuring after power-cycle
Since revision 5499db1 (mbed-os-5.6.0) a hardfault occurs after a power-cycle.
It doesn't occur after a reset when the application has been downloaded using
drag-and-drop or via debugger. This is probably the reason why this problem
isn't detected when testing new mbed releases.

The hardfault occured in hal_sleep(). Adding a __NOP after __WFI solves the
problem although I don't fully understand why.

- Revision ca661f9 is the last revision where the problem doesn't occur.
- The problem doesn't occur when compiling with GCC instead of ARM compiler
- This issue describes a similar, but not identical problem and led me to test adding a __NOP: https://github.com/ARMmbed/mbed-os/issues/5065
2018-04-11 11:13:43 +02:00
jeromecoutant b6a8a50a28 STM32F1 : correct compilation warnings 2018-04-11 11:06:44 +02:00
jeromecoutant c2ee8f34b6 STM32F0 : correct compilation warnings 2018-04-11 09:57:54 +02:00
Paul Thompson f41cf081c9 STM32 : correct compilation warnings 2018-04-11 09:53:15 +02:00
Cruz Monrreal 96a562ab7d
Merge pull request #6550 from theotherjimmy/remove-m1
Remove MPS2 M1
2018-04-10 18:08:57 -05:00
Cruz Monrreal e913e917c0
Merge pull request #6544 from ithinuel/add_rak811_adc
add ADC_AN0-2 mapped on PA_0-2
2018-04-10 18:08:03 -05:00
Cruz Monrreal d9e5c4ba8c
Merge pull request #6505 from netanelgonen/remove_target
remove MODULE_UBLOX_ODIN_W2 from targets.json
2018-04-10 18:07:41 -05:00
Mahesh Mahadevan 9a1e749780 LPC546XX: Fix deepsleep implementation
Add a check to return to 220MHz on LPC54628

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2018-04-10 08:16:41 -05:00