Commit Graph

322 Commits (e3a34a57e1ae60a19699196291d4d1a656fdb156)

Author SHA1 Message Date
Przemyslaw Stekiel d75cc97d80 Explicit pinmap - fix style 2019-11-28 08:32:02 +01:00
Przemyslaw Stekiel 211356f307 K64F: Add constexpr pinmap tables 2019-11-28 08:32:01 +01:00
Przemyslaw Stekiel 3d719f7e35 K64F, NUCLEO_F429ZI: Use explicit pinmap for console 2019-11-28 08:32:00 +01:00
Przemyslaw Stekiel e82e190a66 K64F serial driver: Add explicit pinmap support 2019-11-28 08:32:00 +01:00
Przemyslaw Stekiel e0fdee9f0d TARGET_MCUXpresso_MCUS I2C driver: Add explicit pinmap support 2019-11-28 08:31:59 +01:00
Przemyslaw Stekiel 4a79e59ef6 K64F Analogout driver: Add explicit pinmap support 2019-11-28 08:31:58 +01:00
Przemyslaw Stekiel 640c0a0160 K64F Analogin driver: Add explicit pinmap support 2019-11-28 08:31:57 +01:00
Przemyslaw Stekiel 53d59adc11 K64F PWM driver: Add explicit pinmap support 2019-11-28 08:31:56 +01:00
Przemyslaw Stekiel 31bff30b64 K64F SPI driver: Add explicit pinmap support 2019-11-28 08:31:55 +01:00
Martin Kojtal 5f7ecea00b
Revert "MbedCRC and CRC HAL revisions" 2019-11-26 13:45:37 +00:00
Martin Kojtal 83fc580f79
Merge pull request #11773 from fkjagodzinski/fix-watchdog_reset_test
Fix watchdog reset test
2019-11-22 22:26:44 +01:00
Kevin Bracey 1f94428a56 Update HAL CRC API
* Change "is supported" check to be a macro, so it can be done at
  compile-time.
* Eliminate weird shift on 7-bit CRCs.
* Add support for 32-bit CRCs and reversals to TMPM3HQ.
2019-11-13 14:31:49 +02:00
Filip Jagodzinski 945a9b3ad5 K64F: Fix the watchdog mode settings
Enable the Watchdog Timer for the low-power stop modes of operation,
including the VLPS used in deepsleep.
Enable the Watchdog Timer for the Debug mode.
2019-11-04 19:35:01 +01:00
Martin Kojtal eea83007be
Merge pull request #11203 from Tharazi97/Watchdog_lower_limit_timeout_test
Add watchdog lower limit timeout test
2019-10-31 14:25:52 +01:00
Kevin Bracey fb6aa3ef4f Clean up ARM toolchain heap+stack setup in targets
ARM Compiler 6.13 testing revealed linker errors pointing out
conflicting use of `__user_setup_stackheap` and
`__user_initial_stackheap` in some targets. Remove the unwanted
`__user_initial_stackheap` from the targets - the setup is
centralised in the common platform code.

Looking into this, a number of other issues were highlighted

* Almost all targets had `__initial_sp` hardcoded in assembler,
  rather than getting it from the scatter file. This was behind
  issue #11313. Fix this generally.
* A few targets' `__initial_sp` values did not match the scatter
  file layout, in some cases meaning they were overlapping heap
  space. They now all use the area reserved in the scatter file.
  If any problems are seen, then there is an error in the
  scatter file.
* A number of targets were reserving unneeded space for heap and
  stack in their startup assembler, on top of the space reserved in
  the scatter file, so wasting a few K. A couple were using that
  space for the stack, rather than the space in the scatter file.

To clarify expected behaviour:

* Each scatter file contains empty regions `ARM_LIB_HEAP` and
  `ARM_LIB_STACK` to reserve space. `ARM_LIB_STACK` is sized
  by the macro `MBED_BOOT_STACK_SIZE`, which is set by the tools.
  `ARM_LIB_HEAP` is generally the space left over after static
  RAM and stack.
* The address of the end of `ARM_LIB_STACK` is written into the
  vector table and on reset the CPU sets MSP to that address.
* The common platform code in Mbed OS provides `__user_setup_stackheap`
  for the ARM library. The ARM library calls this during startup, and
  it calls `__mbed_user_setup_stackheap`.
* The default weak definition of `__mbed_user_setup_stackheap` does not
  modify SP, so we remain on the boot stack, and the heap is set to
  the region described by `ARM_LIB_HEAP`. If `ARM_LIB_HEAP` doesn't
  exist, then the heap is the space from the end of the used data in
  `RW_IRAM1` to the start of `ARM_LIB_STACK`.
* Targets can override `__mbed_user_setup_stackheap` if they want.
  Currently only Renesas (ARMv7-A class) devices do.
* If microlib is in use, then it doesn't call `__user_setup_stackheap`.
  Instead it just finds and uses `ARM_LIB_STACK` and `ARM_LIB_HEAP`
  itself.
2019-10-23 14:53:49 +03:00
int_szyk 82e5952693 Add watchdog clock accuracy to Freescale targets. 2019-09-30 08:10:24 +02:00
Michal Paszta 551bc8a1f5 Enable async serial for K66F
Added DMA definitions and usage for UART, based on K64F's code.
2019-09-09 18:43:43 +03:00
Mahesh Mahadevan e65012e549 MCUXpresso: Update the Kinetis Serial driver for MBED_TICKLESS
We should not block in case the UART is busy transmitting. The
API has been updated to check the status of all UART's and return
1 in case any of them is busy transmitting.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-09-05 13:58:59 -05:00
Mahesh Mahadevan 6eca8d2e2e MCUXpresso: Change the Kinetis deep sleep implementation
The code checks if any of the UART's is still transmitting.
If so then prevent from entering deepsleep

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-09-05 13:58:58 -05:00
Martin Kojtal 27571bc2d7
Merge pull request #11309 from NXPmicro/Fix_Kinetis_Spi
MCUXpresso Kinetis SPI drive: Add a delay between CS assertion and first sclk edge
2019-08-29 08:49:49 +02:00
Martin Kojtal 7e0fb8fab9
Merge pull request #11293 from NXPmicro/K82F_Add_USBDevice
K82F: Add USBDEVICE support
2019-08-28 07:27:40 +02:00
Mahesh Mahadevan 5af80db8b6 MCUXpresso Kinetis SPI drive: Add a delay between CS assertion and first sclk edge
1. FPGA test shield requires at least half sclk period delay between
CS assertion and first sclk edge
2. Update Kinetis SPI drivers to match what is already done for K64F

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-08-23 07:11:43 -05:00
Mahesh Mahadevan c249d5fd54 K82F: Add USBDEVICE support
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-08-22 11:17:35 -05:00
Mahesh Mahadevan a85f0824be MCUXpresso: Update EDMA drivers to fix warnings
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-08-22 10:47:43 -05:00
Mahesh Mahadevan a184a86e90 MCUXpresso: Update the SDK LPUART drivers
Use the latest driver from K66F

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-08-22 08:26:11 -05:00
Mahesh Mahadevan bff287580c MCUXpresso: Update I2C SDK driver
Use the K66F driver that has the latest

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-08-22 07:48:29 -05:00
Mahesh Mahadevan 23bf7b74b0 MCUXpresso: Update SDK EDMA driver
Update to the latest version from K66F

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-08-22 07:48:29 -05:00
Mahesh Mahadevan 382696fc50 MCUXpresso: Use SDK API for spi_master_block_write
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-08-22 07:48:28 -05:00
Mahesh Mahadevan 33b66ffa60 MCUXpresso: Update Kinetis SPI SDK drivers
Added dummy data setup API to allow users to configure
the dummy data to be transferred.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-08-22 07:48:28 -05:00
Mahesh Mahadevan 4102114a72 MCUXpresso: Update Kinetis DSPI SDK drivers
- Added dummy data setup API to allow users to configure
  the dummy data to be transferred.
- Added new APIs for half-duplex transfer function. Users
  can send and receive data by one API in the polling/interrupt/EDMA way,
  and they can choose either to transmit first or to receive first.
  Additionally, the PCS pin can be configured as assert status in
  transmission (between transmit and receive) by setting the
  isPcsAssertInTransfer to true.
- Fix for MISRA issues

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-08-22 07:48:28 -05:00
Martin Kojtal edcde1ce8c
Merge pull request #10796 from NXPmicro/tickless
NXP: Enable MBED_TICKLESS on various NXP platforms
2019-08-22 10:30:14 +02: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 d68d8009d9 K64F: Update UART aynchronous API for tickless implementation
Do not allow entry to deep sleep mode when UART transfer is active

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-08-12 10:57:17 -05:00
Mahesh Mahadevan 72e1f415a9 K64F: Update SPI aynchronous API for tickless implementation
Do not allow entry to deep sleep mode when SPI transfer is active

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-08-12 10:57:14 -05: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 75608f6db2 MCUXpresso: Updated SMC SDK driver
Update includes allocating RAM region for code to enter
stop modes and execute this code in RAM, thus the flash
is idle and no prefetch is performed while entering stop
mode.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-08-12 10:56:56 -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
Martin Kojtal fd931a169d
Merge pull request #11168 from maciejbocianski/fix_qspi_write_k82f
Xpresso: qspi_write fix
2019-08-09 08:23:21 +01:00
Maciej Bocianski f2599f43eb Xpresso: qspi_write fix
Due to the data buffer is loaded in two steps the whole block needs protection from being interrupted
2019-08-06 14:55:29 +02:00
Maciej Bocianski b788541308 freescale: fix i2c_byte_read function 2019-07-31 19:44:23 +02:00
Seppo Takalo 3d5489a6f8
Merge pull request #10644 from fkjagodzinski/hal-gpio_pinmap
Add a gpio pinmap
2019-07-17 14:39:40 +03:00
Tymoteusz Bloch 878c93673b Reverted "K64F, STM32F429: IAR linker scripts dynamic heap fix"
due to side effect with K64F bootloader application jump after three consecutive HW resets.
2019-07-10 13:30:40 +02:00
Przemyslaw Stekiel 7d7c1416af K64F SPI driver: Add the delay between CS assertion and first sclk edge
FPGA test shield requires at lease half slck period delay between CS assertion and first sclk edge.
2019-07-08 14:54:33 +02:00
Arto Kinnunen 3d65ace77a
Merge pull request #10950 from artokin/Update_freescale_K6xF_linker_files
Enable split heap in K64F/K66F devices
2019-07-08 11:46:30 +03:00
Arto Kinnunen d7190c8af4 Adjust K66F GCC_ARM linker file
Move heap_0 after .data as it is also placed to m_data.
2019-07-05 14:59:35 +03:00
Martin Kojtal 608e4c245f
Merge pull request #10938 from tymoteuszblochmobica/iar
K64F, STM32F429: IAR linker scripts dynamic  heap fix
2019-07-03 12:00:35 +01:00
Martin Kojtal ccb63d771e
Merge pull request #10857 from ARMmbed/feature-watchdog
Add Watchdog and ResetReason
2019-07-03 11:43:52 +01:00
Kevin Bracey 810cb8de4a Enable split heap in K64F/K66F devices
-Enable MBED_SPLIT_HEAP for K64F and K66F
-Allow GCC_ARM toolchain to utilize remaining 64K memory area
-Make ARM toolchain to start memory filling from 64K region to leave
 more space to bigger 192K region.
2019-07-03 11:47:32 +03:00
Martin Kojtal 8b49ffc0c3
Merge pull request #10920 from NXPmicro/Update_Kinetis_SDK_Clock_Driver
Kinetis MCUXpresso: Update the clock drivers
2019-07-02 12:44:09 +01:00
Tymoteusz Bloch 83057c95d0 IAR icf linker scripts modified to use dynamic heap allocation of all available memory. 2019-07-01 17:57:40 +02:00