Commit Graph

343 Commits (e2048b06b2c4aeddc36be4353855f523a43427d6)

Author SHA1 Message Date
Chris Snow 82f4be0b4d SPDX identifier and license amended 2019-08-19 11:58:02 +01:00
Hugues Kamba 5cbc3e0497 Relocate USB target specific code to root `targets` directory
All target specific source and header files should be in the `targets`
directory located at the root of the Mbed OS repository.
2019-08-16 15:42:43 +01:00
Mahesh Mahadevan 43b4c0ab82 MIMXRT1050_EVK: Add TRNG support
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-08-15 16:51:18 -05:00
Chris Snow 7e2c2a98dd LPC1768 Reset Reason implementation 2019-08-14 15:50:11 +01:00
Chris Snow 2fcafb9c93 LPC1768 WDT implementation 2019-08-14 13:42:04 +01:00
Chris Snow 9825b0d915 remove CAN section form .ANY 2019-08-13 20:18:52 +01:00
Chris Snow f801a61138 Make use of the other 32K of RAM if not used by libraries, least priority is IRAM1 to help maximise heap availability.
Most beneficial when LWIP is not in use.
2019-08-13 13:41:18 +01:00
Mahesh Mahadevan eaace297dc MCUXpresso: Provide an API to wait till TX complete
Wait till the data is flushed out of TX buffer

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-08-12 10:57:04 -05:00
Mahesh Mahadevan df64e32aa3 MCUXpresso: Update Kinetis Sleep implementation
1. Use the updated API's provided by the SMC driver
2. Wait till debug UART has finished transmitting data

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-08-12 10:56:52 -05:00
Mahesh Mahadevan 10bbbd1565 Fix ANALOGIN support for LPC55S69
1. Update to handle 12-bit resolution
2. Properly handle the pin configuration
3. Update the pin setup to handle the ADC B channel

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-08-09 09:18:04 -05:00
David Rauschenbach d19c881a56 Define I²C related pin names for the L-Tek FF-LPC546XX target 2019-07-27 07:18:15 -07:00
Seppo Takalo 5aff943a84
Merge pull request #11064 from NXPmicro/Update_LPC_GPIO_IRQ
MCUXpresso: Fix the LPC GPIO IRQ driver
2019-07-22 11:42:46 +03:00
Seppo Takalo 94f434227d
Merge pull request #11060 from NXPmicro/LPC_Update_SPI_Driver
MCUXpresso: Update LPC spi driver
2019-07-22 11:37:20 +03:00
Mahesh Mahadevan 34619e55a6 MCUXpresso: Fix the LPC GPIO IRQ driver
The IRQ disable was always disabling both rising
and falling edges of the interrupt thereby causing
failures in cases when one of the two should stay enabled.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-07-17 15:18:59 -05:00
Seppo Takalo 4cdde1d07f
Merge pull request #11052 from NXPmicro/Update_LPC546XX_ADC
Update MCUXpresso AnalogIn driver for LPC devices
2019-07-17 23:14:35 +03:00
Seppo Takalo 987533859a
Merge pull request #10104 from kjbracey-arm/sleep_api
Sleep rework, RTOS API for bare metal, wait deprecations
2019-07-17 14:37:53 +03:00
Mahesh Mahadevan e50583459f LPC54114: Fix compile warnings
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-07-16 12:29:32 -05:00
Mahesh Mahadevan 55a2eddf8a MCUXpresso: Update LPC SPI HAL driver
Add support for different slave selects

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-07-16 12:10:34 -05:00
Mahesh Mahadevan 9b8a859883 MCUXpresso: Update the Analogin driver for LPC devices
1. Update the clock divider setting
2. ADC resolution is 12-bits, update the API return value
   to return 16-bit result
3. Update IOMUX setup

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-07-15 14:40:55 -05:00
Mahesh Mahadevan f4648673cf LPC54114: Update the ADC SDK driver
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-07-15 14:40:55 -05:00
Mahesh Mahadevan 7b011e9fe2 LPC546XX: Update the ADC SDK driver
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-07-15 14:40:55 -05:00
Arto Kinnunen 5c45fa72a9
Merge pull request #11003 from NXPmicro/Fix_LPC_I2C
LPC MCUXpresso: Remove extra I2C transaction on byte write
2019-07-15 15:32:02 +03:00
Kevin Bracey a522dcfa0a Replace deprecated wait calls 2019-07-15 10:13:50 +03:00
Mahesh Mahadevan aef60d7edf LPC MCUXpresso: Remove extra I2C transaction on byte write
An extra start signal was observed on the bus which was
discovered by the FPGA test shield.
This is because the hardware sends out a transaction as soon
as a write to the START bit. Hence the write to the START
bit is delayed by using a flag.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-07-09 16:05:28 -05:00
Mahesh Mahadevan 58ba83b6e4 LPC546XX: Add pins to LPCXpresso restricted list
FPGA GPIO tests cannot be run on certain pins

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-07-09 15:40:55 -05:00
Martin Kojtal 279925b6fc
Merge pull request #10869 from mathias-arm/master
LPC55S69: fix cosFactor data size in header file
2019-07-01 09:27:57 +01:00
Martin Kojtal 201a264051
Merge pull request #10791 from hugueskamba/fix-lpc55s69-bootloader-segmentation
bootloader: Fix LPC55S69 bootloader segmentation
2019-06-27 10:22:55 +01:00
Hugues Kamba b0804c4a0d bootloader: Fix LPC55S69 bootloader segmentation
As the build tool in mbed-os 5.13 cannot appropriately deal with a segmented
bootloader when combining it with an application, this commit adjusts the
size reserved for interrupts (via the linker file) to avoid a bootloader
segmentation due to an unpopulated ROM area.

The microcontroller has a total of 60 vector interrupts + 16 exception
handlers. The allocated ROM flash for interrupts should be (60 + 16) x word
size in bytes = 76 x 4 = 304 = 0x130.

This commit changes the interrupt reserved space from 0x140 to 0x130.
2019-06-26 13:55:07 +01:00
Maciej Bocianski fcde82ba4f HAL I2C: adds missing DEVICE_I2C guards 2019-06-19 23:08:55 +02:00
Mathias Brossard ccbb26e2f3 LPC55S69: fix cosFactor data size in header file
The file 'fsl_powerquad_data.h' declares several dctXXX_cosFactor
arrays with sizes twice larger compared to the actual definitions in
'fsl_powerquad_data.c'.
2019-06-19 15:17:18 -05:00
Martin Kojtal 3ea1c56124
Merge pull request #10147 from kjbracey-arm/atomic_bitwise
Assembler atomics
2019-05-13 14:18:05 +01:00
Wajahat Abbas fd0a2c7e29 C027 Fix for modemOn flag 2019-05-03 14:34:28 +05:00
Mahesh Mahadevan 39975b818d LPC55S69: Add support for UART hardware flow control
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-04-29 14:18:35 -05:00
Kevin Bracey 87396e0bf6 Assembler atomics
Reimplement atomic code in inline assembly. This can improve
optimisation, and avoids potential architectural problems with using
LDREX/STREX intrinsics.

API further extended:
* Bitwise operations (fetch_and/fetch_or/fetch_xor)
* fetch_add and fetch_sub (like incr/decr, but returning old value -
  aligning with C++11)
* compare_exchange_weak
* Explicit memory order specification
* Basic freestanding template overloads for C++

This gives our existing C implementation essentially all the functionality
needed by C++11.

An actual Atomic<T> template based upon these C functions could follow.
2019-04-26 13:12:35 +03:00
Martin Kojtal b6a2c7b63f
Merge pull request #10019 from deepikabhavnani/uarm_fix
uARM - Move heap region after IRAM1
2019-04-18 12:49:56 +01:00
Martin Kojtal 3ec9c190d0
Merge pull request #10314 from kjbracey-arm/rt1050_dcache
i.MX RT1050: Reactivate data cache
2019-04-18 09:49:13 +01:00
Martin Kojtal 93dc5514f2
Merge pull request #10334 from NXPmicro/MXRT1050_FixTestFailure
MXRT1050_EVK: Fixes test failure seen with ARM & IAR toolchain
2019-04-16 08:45:46 +01:00
Kevin Bracey b1ba4fe7ec LPC55S69: Cast to cope with const mismatch 2019-04-11 14:57:20 +03:00
Kevin Bracey c89c2809ea LPC55S69: Fix APB bridge security programming
Spotted in compiler warnings - code was trying to access a non-existent
second security control block, rather than access the settings for the
second APB bridge in the first and only security control block.
2019-04-11 14:49:54 +03:00
Deepika 36c7b2de86 uARM - Move heap region after IRAM1
ARM_LIB_HEAP start is aligned to IRAM1 end, hence should be placed next to
RW_IRAM1 i.e. no other region in between.
2019-04-09 12:01:01 -05:00
Mahesh Mahadevan 5f7f71e7e5 MXRT1050_EVK: Fixes test failure seen with IAR and ARM toolchains
Fixes test failure seen with tests-mbed_hal-stack_size_unification
under IAR and ARM toolchain

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-04-08 13:42:46 -05:00
Kevin Bracey 6fe50763f3 i.MX RT1050: Reactivate data cache
Since commit 12c6b1bd8, the i.MX RT1050 has effectively had its data
cache disabled, as the SDRAM was marked Shareable; for the Cortex-M7,
shareable memory is not cached.

This was done to make the Ethernet driver work without any cache
maintenance code. This commit adds cache maintenance and memory barriers
to the Ethernet driver, and removes the Shareable attribute from the
SDRAM, so the data cache is used again.

Cache code in the base fsl_enet.c driver has not been activated - the
bulk of it is in higher-level Read and Write calls that we're not using,
and there is one flawed invalidate in its initialisation. Instead
imx_emac.cpp takes full cache responsibility.

This commit also marks the SDRAM as read/write-allocate. As the
Cortex-M7 has its "Dynamic read allocate mode" to automatically switch
back to read-allocate in cases where write allocate is working poorly
(eg large memset), this should result in a performance boost with no
downside.

Activating write-allocate is also an attempt to provoke any flaws in
cache maintenance - the Ethernet transmit buffers for example will be
more likely to have a little data in the cache that needs cleaning.
2019-04-04 12:06:24 +03:00
Mahesh Mahadevan 1b9531d1af LPC55S69: Update Flash driver to set clock frequency
This is to ensure the flash access time is set correctly

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-04-01 12:10:24 -05:00
Michael Schwarcz a91f17e824 LPC targets: Compile us_ticker.c only if USTICKER defined 2019-03-26 09:52:18 +02:00
David Saada eb5cef84fd Add bootloader support for the LPC55S69 board
bla
2019-03-16 00:13:40 +02:00
Oren Cohen 2ea13e6149 "Update secure binaries for LPC55S69_S" 2019-03-14 17:03:06 +02:00
Michael Schwarcz dca3ebe9f6 LPC55S69_S: reduce ITS size to 32KB
- Reduce LPC55S69 secure side ITS from 64KB to 32KB
2019-03-14 15:49:44 +02:00
Michael Schwarcz 546e33df7b Update NS IAR icf file 2019-03-13 18:21:37 +02:00
Michael Schwarcz f6ab217892 Reduce 32KB from LPC55S69_S binary size 2019-03-13 18:21:37 +02:00
Alexander Zilberkant 661613c998 Rename psa_system_reset to mbed_psa_system_reset
add noreturn attributes
update lifecycle service to use psa/error.h
fix doxygen
2019-03-11 10:43:19 +02:00
Mahesh Mahadevan 862961ced5 Updated the binaries
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-03-08 07:33:49 -06:00
Mahesh Mahadevan 4a2dbba7a1 Reduce the number of flash operation related veneer table entries
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-03-08 07:33:48 -06:00
Michael Schwarcz 401580f364 LPC55S69: Change post-build hook to create HEX 2019-03-08 07:33:48 -06:00
Michael Schwarcz ebd9dc83f7 LPC55S69: Use find_secure_image in post-build and add prebuilt secure images 2019-03-08 07:33:48 -06:00
Mahesh Mahadevan 2e9bb17596 MCUXpresso: Update Analogin support
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-03-08 07:28:59 -06:00
Mahesh Mahadevan 616fa49890 LPC55S69: Add a ctimer for usticker to be used in the secure domain
CTIMER 0 is used for the secure domain and CTIMER 1 is used for
the non-secure domain

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-03-08 07:28:59 -06:00
Mahesh Mahadevan 66eb3deca8 LPC55S69: Fix the I2C SDK driver
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-03-08 07:28:59 -06:00
Mahesh Mahadevan 3d82af0afe LPC55S69: Remove FPU_PRESENT and DSP_PRESENT defines
These are defined by mbed during compile

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-03-08 07:28:58 -06:00
Mahesh Mahadevan 98c8aa1ddd MCUXpresso: Update the sleep implementation for LPC55S69 differences
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-03-08 07:28:58 -06:00
Mahesh Mahadevan b4aaad0f14 Add support for LPC55S69
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-03-08 07:28:58 -06:00
Mahesh Mahadevan bb2a155ae5 MCUXpresso: Update LPC HAL flash driver
The flash driver for the LPC55S69 is different from
prior LPC family. Move the Flash HAL driver to SoC
specific folder

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-03-08 07:28:57 -06:00
Mahesh Mahadevan 5853af76ee MCUXpresso: Update LPC TRNG driver
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-03-08 07:28:57 -06:00
Mahesh Mahadevan dd21e6dc5a MCUXpresso: Update SPI driver
Move the clock setup and peripheral reset to the init function

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-03-08 07:28:57 -06:00
Mahesh Mahadevan 783c02d0a2 MCUXpresso: Update LPC I2C, SPI, UART HAL drivers
Use the individual IP count and not the FlexComm count

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-03-08 07:28:57 -06:00
Mahesh Mahadevan a934ba0b5a MCUXpresso: In pin_function() use mask macro instead of a hard-coded value
The mask size can vary based on the platform

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-03-08 07:28:57 -06:00
Mahesh Mahadevan a64b192081 MCUXpresso: Update the LPC GPIO drivers
Update to the latest SDK GPIO driver

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-03-08 07:28:57 -06:00
Mahesh Mahadevan c05a893111 MCUXpresso: Update usticker driver
Move clock frequency to a target specific function

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-03-08 07:28:56 -06:00
Deepika 6ab48b1863 Update linker scripts for LPC824 and Wiznet 2019-02-28 19:54:38 -06:00
deepikabhavnani 944483b0f7 Add missing SHEBANG = #! armcc -E 2019-02-28 19:54:38 -06:00
deepikabhavnani 75040535ed Addressed review comments to correct size values 2019-02-28 19:54:38 -06:00
deepikabhavnani 0ff2d42143 Heap and stack size picked from linker files,export symbols not needed 2019-02-28 19:54:38 -06:00
deepikabhavnani 0dc5561991 Guard RAM start and size defines 2019-02-28 19:54:38 -06:00
deepikabhavnani 4b95b51e1b Target_Freescale: Add ARM_LIB_STACK and ARM_LIB_HEAP section
Instead of user defined symbols in assembly files or C files,
use linker scripts to add heap and stack - this is inconsistent
with ARM std linker scripts
2019-02-28 19:54:38 -06:00
deepikabhavnani c91d35ccc8 Target_NXP: Add ARM_LIB_STACK and ARM_LIB_HEAP section
Instead of user defined symbols in assembly files or C files,
use linker scripts to add heap and stack - this is inconsistent
with ARM std linker scripts
2019-02-28 19:54:38 -06:00
deepikabhavnani 60e7a7da98 Add heap section to linker file 2019-02-19 15:49:49 -06:00
Deepika 57b9ccc517 Target_NXP: Setup heap limit and size 2019-02-19 15:49:49 -06:00
Cruz Monrreal 31519eff4a
Merge pull request #9667 from deepikabhavnani/NXP_linker
Linker files for LPC11U68 and LPC1549 updated
2019-02-15 11:39:55 -06:00
deepikabhavnani 818d38b6ae Only GCC_ARM toolchain is supported, removing legacy code 2019-02-13 16:26:22 -06:00
Deepika 80eb887f5b Update linker files and resolve build issue
Linker files for LPC11U68 and LPC1549 updated as Mbed OS memory model
1.	LPC1549
Has multiple memory banks, 4K bank used for stack exclusively and 16K for Heap
Its is mbed 2 only target hence 4K for stack.

2.	LPC11U68
Added Heap and Stack sections in linker files. Resolved build issues.
2019-02-11 14:44:41 -06:00
Russ Butler 800708569d Add testing pinmaps to LPC15XX and LPC8XX devices
Add pinmap tables to the LPC15XX and LPC8XX families to allow testing.
2019-02-08 09:10:49 -06:00
Russ Butler 8669417e7b Add HAL API for spi pinmap
Add the functions to get spi pinmaps to all targets.
2019-02-08 09:10:37 -06:00
Russ Butler 34c176654d Add HAL API for serial pinmap
Add the functions serial_tx_pinmap, serial_rx_pinmap, serial_cts_pinmap
and serial_rts_pinmap to all targets.
2019-02-08 09:10:28 -06:00
Russ Butler 2ed1dc2bfa Add HAL API for qspi pinmap
Add the functions qspi_master_sclk_pinmap, qspi_master_ssel_pinmap and
qspi_master_data0_pinmap-qspi_master_data3_pinmap to all targets with
qspi support.
2019-02-08 09:10:25 -06:00
Russ Butler be492fe07a Add HAL API for pwmout pinmap
Add the function pwm_pinmap to all targets.
2019-02-08 09:10:19 -06:00
Russ Butler 22a89773fa Add HAL API for i2c pinmap
Add the functions i2c_master_sda_pinmap, i2c_master_scl_pinmap,
i2c_slave_sda_pinmap and i2c_slave_scl_pinmap to all targets.
2019-02-08 09:10:12 -06:00
Russ Butler 7e8695a2c5 Add HAL API for can pinmap
Add the functions can_rd_pinmap and can_td_pinmap to all targets.
2019-02-08 09:10:10 -06:00
Russ Butler 3bd3aca6db Add HAL API for analog out pinmap
Add the function analogout_pinmap to all targets.
2019-02-08 09:10:05 -06:00
Russ Butler 4818f88d73 Add HAL API for analog in pinmap
Add the function analogin_pinmap to all targets.
2019-02-08 09:09:51 -06:00
Nir Sonnenschein 8c2ad14ace
Merge pull request #9568 from ARMmbed/feature-cellular-refactor
Merge feature cellular refactor
2019-02-07 18:17:32 +02:00
Martin Kojtal d7a442b717
Merge pull request #9593 from c1728p9/standard_form_factor
Standardize Arduino form factor
2019-02-05 10:51:32 +01:00
Russ Butler ba30a4aa24 Define Arduino pins for the LPC812
Define the unconnected Arduino pins to NC so they are all defined.
2019-02-02 10:56:27 -06:00
Russ Butler 3e10418015 Define USBTX and USBRX for targets missing it
Define USBTX and USBRX for the LPC11U37H and the MTS_MDOT_F405RG.
2019-02-02 09:46:29 -06:00
Mahesh Mahadevan 00477ddf68 LPC546XX, MIMXRT1050: Update to fix ARMC6 build failures
Fix for issue 9402

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-01-29 14:21:44 -06:00
Ari Parkkila 7578d5b174 Cellular: Fix mbed2-build of onboard-modems 2019-01-29 01:08:17 -08:00
Maciej Bocianski a1311f813c ARCH_PRO: add SPI pin definitions 2019-01-24 09:20:29 +01:00
Martin Kojtal a6509cf47f
Merge pull request #9438 from c1728p9/qspi_update
Use dedicated PinMap for each QSPI data line
2019-01-23 14:25:14 +01:00
Russ Butler 82b131aa59 Use dedicated PinMap for each QSPI data line
Split PinMap_QSPI_DATA into PinMap_QSPI_DATA0 - PinMap_QSPI_DATA3.
This allows pins to be selected more accurately.
2019-01-22 12:11:15 -06:00
Ari Parkkila af0d2cf61d Cellular: Update API description to match better onboard_modem_api 2019-01-22 02:24:45 -08:00
Ari Parkkila c4de2f2f0e Cellular: Power API updated to match onboard_modem_api 2019-01-22 02:24:45 -08:00
Ari Parkkila 269d151b12 Cellular: Default modem drivers with FF_ARDUINO 2019-01-22 02:24:45 -08:00