Commit Graph

5375 Commits (mbed-os-5.13.4)

Author SHA1 Message Date
Reda Maher 42db954d06 Add Riot Micro cellular module targets 2019-08-23 11:58:21 +01:00
Mahesh Mahadevan fddc2b1dd5 MCUXpresso: Update EDMA drivers to fix warnings
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-08-23 11:41:08 +01:00
Mahesh Mahadevan 1d9b067212 MCUXpresso: Update the SDK LPUART drivers
Use the latest driver from K66F

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-08-23 11:41:08 +01:00
Mahesh Mahadevan eda75fd02a MCUXpresso: Update I2C SDK driver
Use the K66F driver that has the latest

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-08-23 11:41:08 +01:00
Mahesh Mahadevan 8022ca918f MCUXpresso: Update SDK EDMA driver
Update to the latest version from K66F

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-08-23 11:41:08 +01:00
Mahesh Mahadevan cc70640ff4 MCUXpresso: Use SDK API for spi_master_block_write
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-08-23 11:41:08 +01:00
Mahesh Mahadevan 5691fc3b76 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-23 11:41:08 +01:00
Mahesh Mahadevan 6b846f8fea 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-23 11:41:08 +01:00
Chris Snow d66621e85d remove CAN section form .ANY 2019-08-23 11:41:08 +01:00
Chris Snow 53153ffa08 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-23 11:41:08 +01:00
Mahesh Mahadevan e78399db99 K22F: Add FlashIAP for storage
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-08-23 11:41:08 +01:00
int_szyk a59ad17d7a Tweak stm_spi_api Coverity issue.
Coverity warining: "memset fill truncated (NO_EFFECT)".
Changed SPI_FILL_WORD to SPI_FILL_CHAR.
2019-08-23 11:41:08 +01:00
Mahesh Mahadevan 6fb66f7ad8 K22: Add USBDEVICE support
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-08-23 11:41:08 +01:00
Mahesh Mahadevan 95b4c7c03c NXP MCUXpresso: optimize us_ticker for LPC platforms
Provide new optimizations for us_ticker and wait_us.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-08-23 11:37:41 +01:00
Mahesh Mahadevan 0eaf1c66bf MCUXpresso: Add TICKLESS support for LPC platforms
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-08-23 11:37:41 +01:00
Mahesh Mahadevan 4826098778 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-23 11:37:41 +01:00
Mahesh Mahadevan d079914242 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-23 11:37:41 +01:00
Mahesh Mahadevan 43dc222691 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-23 11:37:41 +01:00
Mahesh Mahadevan c7ee9fa3e2 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-23 11:37:41 +01:00
Mahesh Mahadevan b31be14eed 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-23 11:37:41 +01:00
Mahesh Mahadevan aaf7a13311 NXP: Enable MBED_TICKLESS on various NXP platforms
Enable for K22F, K64F, K66F, K82F, KL82Z, KW24D, KW41Z, MIMXRT1050, HEXIWEAR

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-08-23 11:37:41 +01:00
Vincent Veron e7716aef26 Move stm32xx_emac_config.h to family specific folder
This allows to specify which hal version to use for each family.
It can also be used to modify the thread stack size.

Signed-off-by: Vincent Veron <vincent.veron@st.com>
2019-08-23 11:37:41 +01:00
Vincent Veron fd70de0c86 STM32H7 : update linker script files to use right location for lwip_ram_heap
Signed-off-by: Vincent Veron <vincent.veron@st.com>
2019-08-23 11:37:41 +01:00
Vincent Veron d7b0d236fe Add EMAC support for NUCLEO_H743ZI
This port is based on :
    * CurryGuy ethernet branch :
        https://github.com/CurryGuy/mbed-os/tree/feature-stm32h7-emac
    * STM32 Cube example :
        Applications/LwIP/LwIP_HTTP_Server_Netconn_RTOS example

Signed-off-by: Vincent Veron <vincent.veron@st.com>
2019-08-23 11:37:41 +01:00
int_szyk 9cd2473caa Tweak STM watchdog implementation
Change the calculation method of rl so it is rounded up.
2019-08-23 11:37:41 +01:00
Vairamuthu Ramasamy 73d658d9a4 Updated nvram image for target CY8CMOD-062S2-43012 2019-08-23 11:37:41 +01:00
int_szyk aabd531d58 Fix TT_M3HQ build problem with SPI 2019-08-23 11:37:41 +01:00
int_szyk 08ffeba05d fix TT_M3HQ build problem with i2c 2019-08-23 11:37:41 +01:00
int_szyk a94c62267c Remove SERIAL_FC from target.json on TT_M3HQ
Development board TT_M3HQ doesn't have CTS/RTS on its pinout.
If that is not the case PinMap_UART_RTS should be created.
2019-08-23 11:37:41 +01:00
Chris Snow 4fc9190abf SPDX identifier and license amended 2019-08-23 11:37:41 +01:00
Chris Snow f077e992ab Enable WATCHDOG and RESET_REASON for other LPC1768 targets 2019-08-23 11:37:41 +01:00
Chris Snow a803a4de79 LPC1768 Reset Reason implementation 2019-08-23 11:37:41 +01:00
Chris Snow ac8e3da7bf LPC1768 WDT implementation 2019-08-23 11:37:41 +01:00
Mahesh Mahadevan fb109576f5 MIMXRT1050_EVK: Add TRNG support
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-08-23 11:37:41 +01:00
Mahesh Mahadevan ed8fc97388 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-23 11:37:41 +01:00
Ganesh Ramachandran 918519fb62 Added new features to TMPM46B 2019-08-23 11:37:41 +01:00
Lin Gao acd1d51a77 Cosmetic changes to incorporate review feedback 2019-08-23 11:37:41 +01:00
Lin Gao 4b32d29015 Fix a build break with ARM compiler 2019-08-23 11:37:41 +01:00
Lin Gao a968c041e5 Implement PWMOUT 2019-08-23 11:37:41 +01:00
Lin Gao 2334d5a3f1 Added missing pinmap definitions. Fixed target JSON config to avoid treating cc3220sf a target 2019-08-23 11:37:41 +01:00
Lin Gao 42c4d840c2 Add CC3220SF_Launchxl to Mbed OS 2019-08-23 11:37:41 +01:00
Chun-Chieh Li 027007110c Enlarge LPTICKER_DELAY_TICKS for safe
On Nuvoton targets, lp_ticker_set_interrupt(...) needs around 3 lp-ticker
ticks to take effect. It may miss when current tick and match tick are very
close (see hal/LowPowerTickerWrapper.cpp). Enlarge LPTICKER_DELAY_TICKS to
4 from 3 to address this boundary case.
2019-08-23 11:37:41 +01:00
Chun-Chieh Li 6b4745209e Fix mbedmicro-rtos-mbed-systimer/Wake up from deep sleep failing
This test requires total latency (tot = h/w + s/w) (wakeup from deepsleep) be
under 1ms. To check the issue, measure total latency on Nuvoton targets:

TARGET      EXP(us)     EXP+TOL(us) ACT(us)
NANO130     42000       43000       42939
NUC472      42000       43000       42236
M453        42000       43000       43274
M487        42000       43000       42877
M2351       42000       43000       43213

Checking h/w spec, h/w latency (wakeup time from normal power-down mode) on
M487/M2351 is just 1us (n/a on other targets). S/W latency plays the major
part here.

S/W latency relies on system performance. On Nuvoton targets, 'LPTICKER_DELAY_TICKS'
possibly complicates the test. Anyway, to pass the test, add extra 1ms latency
(deep-sleep-latency) in targets.json for Nuvoton targets.
2019-08-23 11:37:41 +01:00
Laurent Meunier 47b63e9b72 __cplusplus guard fixed pwmout_device.h for STM32 families
This bug prevented using this header in cpp code directly.
2019-08-23 11:37:41 +01:00
Martino Facchin be76717cf7 Add Arduino NANO33BLE 2019-08-23 11:37:41 +01:00
David Rauschenbach 378a7023c0 Define I²C related pin names for the L-Tek FF-LPC546XX target 2019-08-23 11:37:41 +01:00
Seth Itow ec35930848 stm32f413xh: add crash capture support for IAR 2019-08-12 12:54:49 +01:00
Seth Itow 748971d6ce stm32f413xh: add crash capture support for ARM_MICRO 2019-08-12 12:54:48 +01:00
Seth Itow cc5b134cac stm32f413xh: add crash capture support for GCC_ARM 2019-08-12 12:54:47 +01:00
Ireneusz Gaicki 5090d5c190 STM32F7: Do not generate redundant IN tokens
When STM32F746-DISCO board was being used in (unsupported) USBHost mode,
the communication was unreliable. Our investigation revealed that the
problem lied in redundant IN tokens that the host generated even though
it shouldn't. This could lead to endless high-frequency NAKs being
received from device, which caused watchdog reset as USBHost spent all
time in interrupt handlers.

In our application the clocks frequencies are:
  * HCLK = 48 MHz
  * APB1 = 6 MHz
  * APB2 = 12 MHz

We have captured the raw USB High-Speed traffic using OpenVizsla.
Without this change, when USB MSD device connected to the system
responded to IN with NAK, there were excessive IN tokens generated about
667 ns after the NAK. With this commit the IN tokens are generated no
sooner than 10 us after the NAK.

The high frequency of the IN/NAK pairs is not the biggest problem.
The biggest problem is that the USB Host did continue to send the IN token
after DATA and ACK packets were received from device - *without* any request
from upper layer (USB MSD).

The USB MSD devices won't have extra data available on Bulk IN endpoint
after the expected data was received by Host. In such case IN/NAK cycle
time is only houndreds of nanoseconds, the MCU has no time for anything else.

The problem manifested not only on Bulk endpoints, but also during
Control transfers. Example correct scenario (when this fix is applied):
  * SETUP stage
    * SETUP [host -> address 0 endpoint 0]
    * DATA0 [80 06 00 01 00 00 08 00] [CRC16: EB 94]
    * ACK
  * DATA stage
    * IN
    * NAK
    ... the IN/NAK repeated multiple time until device was ready
    * IN
    * DATA1 [12 01 10 02 00 00 00 40] [CRC16: 55 41]
    * ACK
  * STATUS stage
    * OUT
    * DATA1 ZLP
    * ACK

Without this commit, in DATA stage, after the ACK was received, the host
did send extra IN to which device responded with STALL. On bus it was:
  * DATA stage
    ...
    * IN
    * DATA1 [12 01 10 02 00 00 00 40] [CRC16: 55 41]
    * IN
    * STALL
    * IN
    * STALL
  * STATUS stage
    * OUT
    * DATA1 ZLP
    * STALL

In the fault case the next SETUP was sent only after 510 ms, which
indicates timeout in upper layer.

With this commit the next SETUP is sent 120 us after the STATUS stage ACK.
2019-08-12 12:54:47 +01:00