Commit Graph

271 Commits (079564b1744eb801cfa27882820379a7132e91f1)

Author SHA1 Message Date
jeromecoutant db7efabfd5 STM license file update
Some code have been copied from ST Cube deliveries.
ST copyright is then needed.
2019-09-10 14:24:48 +02:00
Martin Kojtal 96d9a8fea9 Merge branch 'MX25LM51245G_QSPI_test_config' of git://github.com/LMESTM/mbed into dev_rollup 2019-08-28 18:37:17 +01:00
jeromecoutant 8cd00b3468 STM32L4: Add OSPI IP support in fallback QSPI mode
For STM32 platforms that embed an OSPI IP, we're offering
a QSPI fallback support with this commit.

When OSPI is supported in mbed, we can consider adding full
OSPI support
2019-08-23 15:18:48 +02:00
Alexandre Bourdiol 7647b39adc TARGET_STM: I2C sequential communication revert PR #3324 to original cube HAL 2019-08-22 10:44:20 +02:00
Martin Kojtal de84004be1
Merge pull request #11189 from LMESTM/pwmout_cpp_guard
__cplusplus guard fixed pwmout_device.h for STM32 families
2019-08-13 11:19:24 +02:00
Laurent Meunier 319223ac16 __cplusplus guard fixed pwmout_device.h for STM32 families
This bug prevented using this header in cpp code directly.
2019-08-09 09:51:39 +02:00
Ireneusz Gaicki b9c4076741 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-07-24 11:40:49 +02:00
Yuan Cao 6ed21ee1c0 Fixed serial_device IRQ infinite loop bug due to uint8_t overflowing 2019-07-13 00:05:25 -04:00
Martin Kojtal ccb63d771e
Merge pull request #10857 from ARMmbed/feature-watchdog
Add Watchdog and ResetReason
2019-07-03 11:43:52 +01:00
Martin Kojtal 61c4d05ce9
Merge pull request #10824 from ABOSTM/PRSTM32_PWMWRTIE_GLITCH_10734
STM32: pwmout_write: configure channel only when not already enabled
2019-06-28 14:24:14 +01:00
Martin Kojtal 924af9481e
Merge pull request #10841 from VVESTM/vve_10827_spi_count
TARGET_STM: Add DEVICE_SPI_COUNT to use SPIs without interference
2019-06-26 09:09:38 +01:00
Martin Kojtal b0073bb70d
Merge pull request #10774 from fkjagodzinski/fix-uart_irq
Fix serial IRQ handling
2019-06-25 15:49:41 +01:00
Alexandre Bourdiol a339084684 STM32: pwmout_write: configure channel only when not already enabled
Fix PWM glitch on write(), TARGET_STM/pwmout_api.c, #10734
2019-06-20 17:49:16 +02:00
Vincent Veron 31eb49b918 TARGET_STM: Add DEVICE_SPI_COUNT to use SPIs without interference
Extend to all STM targets the work done on PR10752.

Signed-off-by: Vincent Veron <vincent.veron@st.com>
2019-06-14 14:15:56 +02:00
jeromecoutant 7d05f22b31 STM32F7 warning compilation
[-Wparentheses-equality]
[-Wsign-compare]
2019-06-07 18:10:03 +02:00
Filip Jagodzinski 84384162bb STM32F7: Fix serial IRQ handling
Check that the RX or TX interrupt is enabled before calling
a registered handler with RxIrq or TxIrq arg.
2019-06-07 15:17:07 +02:00
jeromecoutant d919498745 STM32: common cmsis.h and device.h 2019-05-27 16:27:41 +02:00
jeromecoutant 570e9b0bf4 STM32 WATCHDOG : increase timeout value 2019-05-24 11:35:42 +02:00
jeromecoutant 0352bbbd5b STM32 astyle updates 2019-05-10 15:32:05 +02:00
Vincent Veron 9856e86897 TARGET_STM32F7: Reset QSPI in default mode on abort for all versions.
This patch is missing in F7 HAL.
Fix #10049

Signed-off-by: Vincent Veron <vincent.veron@st.com>
2019-04-08 11:47:15 +02:00
Martin Kojtal 6081727cbf
Merge pull request #10115 from enebular/raven
Uhuru RAVEN: Adding platform HAL
2019-04-04 11:05:23 +02:00
Martin Kojtal 2a694cf1d9
Merge pull request #10143 from jeromecoutant/PR_ADC_RESETINTERNAL
STM32 ADC INTERNAL CHANNEL reset after read
2019-04-02 13:02:14 +02:00
jeromecoutant ec00ea5655 STM32 ADC INTERNAL CHANNEL reset after read
Internal channels use is enabling ADC "internal path"
which needs to be disabled after measurement
2019-03-29 14:30:49 +01:00
Vincent Veron 5765c4d0e0 TARGET_STM32F7: Refresh cache when erasing or programming flash
The cache must be refreshed when we erase or program flash memory.
It fix 2 issues :
    Fix #9934
    Fix #6380

This solution was initially proposed in #6380.

Signed-off-by: Vincent Veron <vincent.veron@st.com>
2019-03-28 14:48:12 +01:00
jk e44aa056c0 added SPDX identifier and
added the description of uhuru_raven_init function
2019-03-27 17:02:56 +09:00
jk 23cb826314 Add definition of RAVEN 2019-03-27 17:02:55 +09:00
Deepika 122549910e Add Crash report section to all uARM files 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 b598dc1f46 Target_STM: 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:28 -06:00
Cruz Monrreal e1736cd06f
Merge pull request #9571 from mprse/fix_9523_rtos_less_issue
Update to 2-region model for HEAP and Stack Memory
2019-02-26 22:50:19 -06:00
bcostm 28462d476a STM32F7 USB: add patch in CubeF7 hal driver 2019-02-22 10:53:22 -06:00
Deepika e522c4691e Target_STM:_sbrk updated to use limits from linker files no need to set defines
_sbrk uses the exports from linker file __end and __HeapLimit to allocate memory
in heap. Linker scripts were updated accordingly to set the limits.
2019-02-19 15:49:49 -06:00
Martin Kojtal 723236f855
Merge pull request #9307 from mtomczykmobica/ONME-3949
Configuration options for STM_EMAC buffer counts
2019-02-19 14:09:24 +01:00
Marcin Tomczyk a5f93e0b07 ONME-3949 Configuration options for STM_EMAC buffer counts 2019-02-19 08:18:18 +01: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
Martin Kojtal ed53fe1ed4
Merge pull request #9534 from jeromecoutant/PR_FLOW
STM32 Serial Flow Control
2019-02-04 14:35:47 +01:00
jeromecoutant eec7126d37 STM32 Serial Flow Control
Crash occured when RTS=CTS=NC
Now we chek if used pins are the same UART as TX and RX
2019-01-31 17:11:23 +01:00
Martin Kojtal 9265c19e2e
Merge pull request #9394 from jeromecoutant/PR_PERIPH
STM32: PeripheralPins files update from lastest CubeMX tool version
2019-01-31 11:21:09 +01:00
Martin Kojtal 489e52e428
Merge pull request #9410 from jeromecoutant/PR_F756_L486
STM32F756 and STM32L486 alignment with STM32F746 and STM32L476
2019-01-28 10:22:48 +01:00
jeromecoutant a5ef971402 STM32: PeripheralPins files minor update
Script version 1.4
CubeMX DB version DB.5.0.1
2019-01-24 10:51:30 +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
jeromecoutant 5ae13f9c7b STM32F756 / STM32F746 alignment 2019-01-17 11:15:39 -06:00
Przemyslaw Stekiel 58f6bf7292 [STM] Support boot stack size configuration option 2019-01-08 15:32:06 +01:00
Alastair D'Silva aa80b7c70a Don't use define checks on DEVICE_FOO macros (partner code)
The DEVICE_FOO macros are always defined (either 0 or 1).

This patch replaces any instances of a define check on a DEVICE_FOO
macro with value test instead.

Signed-off-by: Alastair D'Silva <alastair@d-silva.org>
2018-12-20 20:02:29 +11:00
jeromecoutant 40f6d58b89 STM32 QSPI: remove QUADSPI_BK2 as dual bank feature is not supported 2018-12-13 10:56:37 +01:00
jeromecoutant 4a6bc96345 STM32F769 : add QSPI definition 2018-12-13 10:56:29 +01:00
jeromecoutant 64f8cc472c NUCLEO_F746ZG : no embedded QSPI 2018-12-13 10:56:26 +01:00
jeromecoutant 7c8de3c4e1 STM32 : removed unused QSPI pin names 2018-12-13 10:56:25 +01:00
jeromecoutant 6b226ffcef STM32 RTC update for easy maintenance 2018-12-04 11:08:30 +01:00