Commit Graph

850 Commits (5a6aee43eb58c9ba3b1d2de7d178a3d68867a0da)

Author SHA1 Message Date
Jimmy Brisson adfed0f9de Merge pull request #4644 from 0xc0170/fix_ticker_delta_negative
Ticker: add fire interrupt now function
2017-07-17 11:05:46 -05:00
Jimmy Brisson 6593d5bc7f Merge pull request #4640 from chrissnow/xDot-Bootloader
STM32L1 Flash API and xDot bootloader support
2017-07-17 11:04:53 -05:00
Laurent MEUNIER b9d801fe72 STM32: L0: adc struct member does not exist anymore 2017-07-17 16:29:09 +02:00
jeromecoutant 7da7af6cc4 STM32F0 : remove unavailable pins
Pins used for STDIO_UART_TX and STDIO_UART_RX are not available
2017-07-17 16:19:15 +02:00
jeromecoutant a98594d132 DISCO_L475VG_IOT: remove unavailable pins 2017-07-17 14:09:01 +02:00
jeromecoutant e0e332f5d9 STM32L4 AnalogIn init issue with _ALT pins 2017-07-17 13:33:50 +02:00
Laurent MEUNIER ea33f8bf94 STM32: F2: adc; struct member not needed
Same as other families applied here
2017-07-17 13:27:22 +02:00
Laurent MEUNIER efbeb0d057 STM32: analogin: adc struct member not needed anymore
The adc in analogin_t has the same value as the Instance member of
ADC_HandleTypeDef. So we can only rely on the later one.
2017-07-17 13:27:22 +02:00
Laurent MEUNIER 8540e8a1dd STM32: Analogin - define handle in object not as a global
In this commit, the analogin_s structure is moved to commonn_objects.h file
to limit the duplicaion.

The ADC handle is moved from a global variable to a struct member of the
analogin object. This allows multiple ADC instances to work correctly.

Note that State needs to be explicitely set to HAL_ADC_STATE_RESET
because the object is not zero initialized.
2017-07-17 13:23:45 +02:00
Laurent MEUNIER b5cbaaa0d0 STM32: Serial - use TXE as tx_irq instead of TC
TXE indicates that a byte can be written to UART register for sending,
while TC indicates that last byte was completely sent. So the TXE flag
can be used in case of interrupt based Serial communication, to allow
faster and efficient application buffer emptying.

Also TXE flag will be erased from the interrupt when writing to register.
In case there is nothing to write in the register, the application is
expected to disable the interrupt.
2017-07-17 08:46:00 +02:00
Laurent MEUNIER 85711eb09e STM32: Serial - do no clear RXNE flag
The RXNE flag is getting cleared when reading Data Register so it should
not be cleared here. Especially in case of high data rate, another byte of
data could have received during irq_handler call and clearing the flag
would read and discard this data which would be lost for application.
2017-07-17 08:46:00 +02:00
Martin Kojtal 1e821499df Merge pull request #4668 from bcostm/update_f429zi_pinouts
DISCO/NUCLEO_F429ZI: Enable all alternate functions and pins
2017-07-13 16:45:59 +02:00
Martin Kojtal 42548f3dce Merge pull request #4691 from LMESTM/analogin_sample_time
STM32: F4: Increase ADC sampling time for VBAT
2017-07-13 16:43:40 +02:00
Rob Meades 1c7a7bc6a3 Add bootloader support for the UBLOX_C030 platforms. 2017-07-13 15:42:54 +01:00
Martin Kojtal 58d0aa5ce8 Merge pull request #4694 from bcostm/typo_pins_disco_l475vg
DISCO_L475VG_IOT01A: typo corrections in PeripheralPins.c
2017-07-13 16:42:00 +02:00
Martin Kojtal 29fefe8639 Merge pull request #4699 from jeromecoutant/PR_L0_InternalADC
STM32L0 : internal ADC channels
2017-07-13 16:40:54 +02:00
Martin Kojtal 59dd859210 Merge pull request #4707 from LMESTM/stm32_serial_it_source
STM32: serial: use proper macro to check  interrupt
2017-07-13 16:40:16 +02:00
Martin Kojtal 10ea63b8e7 Ticker: add fire interrupt now function
fire_interrupt function should be used for events in the past. As we have now
64bit timestamp, we can figure out what is in the past, and ask a target to invoke
an interrupt immediately. The previous attemps in the target HAL tickers were not ideal, as it can wrap around easily (16 or 32 bit counters). This new
functionality should solve this problem.

set_interrupt for tickers in HAL code should not handle anything but the next match interrupt. If it was in the past is handled by the upper layer.

It is possible that we are setting next event to the close future, so once it is set it is already in the past. Therefore we add a check after set interrupt to verify it is in future.
If it is not, we fire interrupt immediately. This results in
two events - first one immediate, correct one. The second one might be scheduled in far future (almost entire ticker range),
that should be discarded.

The specification for the fire_interrupts are:
- should set pending bit for the ticker interrupt (as soon as possible),
the event we are scheduling is already in the past, and we do not want to skip
any events
- no arguments are provided, neither return value, not needed
- ticker should be initialized prior calling this function (no need to check if it is already initialized)

All our targets provide this new functionality, removing old misleading if (timestamp is in the past) checks.
2017-07-13 12:23:25 +01:00
andreas.larsson 969d44d833 Remove redundant ODIN-W2 target folder 2017-07-12 15:05:25 +02:00
Laurent MEUNIER be8024de28 STM32: serial: use proper GET_IT macro
Depending on families, different HAL macros are defined to check the
state of serial interrupts. In several cases, we can find only 1 macro:
__HAL_UART_GET_IT_SOURCE
Checks whether the specified UART interrupt has occurred or not

But in F0, F3, F7, L0, L4 there are 2 different macros
__HAL_UART_GET_IT
Checks whether the specified UART interrupt has occurred or not
__HAL_UART_GET_IT_SOURCE
Checks whether the specified UART interrupt source is enabled.

In the later case, __HAL_UART_GET_IT_SOURCE was being used so far,
but actually needs to be replaced by __HAL_UART_GET_IT. Using the right
macro, we also check the proper flags accordingly.
2017-07-11 17:22:33 +02:00
Jimmy Brisson 668d47305b Correct DAC pin assignment 2017-07-10 13:33:21 -05:00
Jimmy Brisson b38c85cafe Merge pull request #4525 from fahhem/patch-1
Improve the startup code on the STM32F070
2017-07-10 12:04:42 -05:00
Jimmy Brisson 3d86959dd8 Merge pull request #4485 from kegilbert/f429_sdk_flash_driver-rebase
Replace CMSIS flash driver by SDK flash driver
2017-07-10 12:03:03 -05:00
Rob Meades f920cc65af UBLOX_C030: correct UART 3 Tx & Rx pins (they were the wrong way around) and add the flow control lines for UART 3. 2017-07-08 11:32:46 +01:00
Laurent MEUNIER 61648a53f5 Fix alignement 2017-07-07 17:27:46 +02:00
Jimmy Brisson e0f56d1ab7 Merge pull request #4659 from jeromecoutant/PR_F767
Add the correct startup s file in TARGET_STM32F767
2017-07-06 10:18:08 -05:00
Bradley Scott 251459e8aa STM32: Remove i2c_read() and i2c_write() redirects to HAL_I2C_IsDeviceReady()
Some I2C devices require specific zero length read/write sequences which
the HAL_I2C_IsDeviceReady() redirect interferes with.  After Removing
these redirects, it was confirmed that zero length reads and writes
would both still work correctly for detecting presence/absence of an
I2C device on a bus.
2017-07-05 14:02:34 -04:00
bcostm 98aa178127 NUCLEO_F429ZI: comments corrections 2017-07-05 10:03:30 +02:00
bcostm a86fc17e99 DISCO_F429ZI: Typo correction 2017-07-05 10:03:27 +02:00
bcostm e8c817b105 NUCLEO_F429ZI: Add alternate pins and enable all pins 2017-07-05 10:03:23 +02:00
bcostm 20ef523195 DISCO_F429ZI: Typo corrections + add missing ALT pins 2017-07-05 10:03:21 +02:00
bcostm b11151a96d DISCO_F429ZI: Add missing ADC alternate pins 2017-07-05 10:03:17 +02:00
bcostm 3cdf90dc2f DISCO_F429ZI: Add alternate pins and enable all pins 2017-07-05 10:03:15 +02:00
bcostm 7b09a10360 DISCO_F429ZI: Add 'Connected to' comment 2017-07-05 10:03:11 +02:00
bcostm d58070b658 DISCO_L475VG_IOT01A: typo corrections in PeripheralPins.c 2017-07-03 16:12:14 +02:00
Laurent MEUNIER f8d6f95102 STM32: F4: Increase ADC sampling time
To get a valid VBAT measurement on F4 targets, it is required to increased
the sampling time to its maximum value.
2017-07-03 15:51:14 +02:00
bcostm bd8fd08fe4 STM: cleanup mbed_rtx.h file 2017-07-03 11:16:35 +02:00
Chris 2a2d904b91 Tidy from rebase 2017-06-30 22:31:21 +01:00
Chris a516dcac84 Code tidy 2017-06-30 22:28:06 +01:00
Chris e59c059d3f Incorrect comments removed. 2017-06-30 22:28:06 +01:00
Chris 8484467fdd GCC Bootloader support 2017-06-30 22:28:06 +01:00
Chris 82a33b2a70 IAR Bootloader support 2017-06-30 22:28:06 +01:00
Chris a4c7a29144 uArm Bootloader support 2017-06-30 22:28:06 +01:00
Chris ed51bcb1d0 Formatting tidy up. 2017-06-30 22:28:06 +01:00
Chris 65ab95572c added missing FLASH_FLAG_OPTVERR 2017-06-30 22:28:06 +01:00
Chris 5803bdd715 clear additional flags on erase to prevent errors 2017-06-30 22:28:06 +01:00
Chris 802000b059 GCC_ARM VTOR fixed, doesnt fit in the bootloader region though.. 2017-06-30 22:28:06 +01:00
Chris 0ff055115a VTOR bootloader aware
Attempt to add flash API but not working properly
2017-06-30 22:28:06 +01:00
Chris 18998411d8 added flash algorithm 2017-06-30 22:25:53 +01:00
Chris c1e32a75df initial commit of xDot bootloader 2017-06-30 22:25:53 +01:00
Jimmy Brisson d382d44f06 Merge pull request #4529 from LMESTM/issue_1083
Manage multiple instances of analog out
2017-06-30 13:53:46 -05:00
Laurent MEUNIER cea91306de STM32: Raise error in case of spurious interrupt
In case we've run through the entire GPIOs loop, withouth finding a
matching interrupt, we're in the case of a spurious interrupt, let's
raise an error to track it down.
2017-06-30 13:26:09 +02:00
Laurent MEUNIER ade981dc9e STM32: Store and restore rising falling config of gpio_irq
Now that rising / falling edge detection is disabled in the
gpio_irq_disable function, we also need to restore it when gpio_irq_enable
gets called.
2017-06-30 13:26:09 +02:00
Laurent MEUNIER 88770528bd STM32 Fuly disable GPIO irq settings
When disabling GPIO irq, also the falling / rising edge settings need
to be reset (EXTI_RTSR and EXTI_FTSR registers).

If not reset, the same EXTI line can be later enabled again with a wrong
Rising / Falling configuration. This was especially seen and reported in
ci-test tests-api-interruptin on NUCLEO_F446RE target where DIO2=PA_10 and
DIO6=PB_10 were successively tested: as they are sharing the same EXTI_LINE
(EXTI_10), this resulted in calling the irq_handler with wrong
IRQ_FALL/IRQ_RAISE parameter and donothing being called in loop.
2017-06-30 13:26:09 +02:00
jeromecoutant aefb13ab2a STM32L0 : internal ADC channels 2017-06-30 11:07:31 +02:00
adustm 90bc8ca7ae Replase CMSIS flash driver by SDK flash driver 2017-06-29 14:25:27 -05:00
adustm 4860e6a485 Rebase of: cb3907ef70
typo in flash_s struct
2017-06-29 14:24:40 -05:00
adustm e7fb5b4edd Rebase of: dfd0cf63e9
fix STM32F439 flash HAL
2017-06-29 14:24:40 -05:00
adustm 64e902edda Rebase: 0d1c6c2d34
This commit completely rewrote flash_api.c in a few places so kicked out changes from Master and accepted the branch changes.

F429 + F439 : changes after code review
GetSector has been rewritten
2017-06-29 14:24:40 -05:00
adustm 565c3c11ad Allow UBLOX to use SDK flash driver 2017-06-29 14:24:40 -05:00
Jimmy Brisson 9b082fff55 Merge pull request #4656 from LMESTM/update_flash_comments
Correct comments in flash api for STM32 L0 targets
2017-06-29 11:09:23 -05:00
Jimmy Brisson 0c5fc5b05a Merge pull request #4641 from LMESTM/Increase_STM32L0_analogin_sampling_time
Increase L0 ADC sample time
2017-06-29 11:09:03 -05:00
Jimmy Brisson d52ed5394c Merge pull request #4632 from 0xc0170/fix_stm32_32bitticker
STM32: fix us ticker set event timestamp double ISR possibility
2017-06-29 11:08:42 -05:00
Jimmy Brisson 041737b248 Merge pull request #4577 from MultiTechSystems/xdot-enable-hsi
XDOT_L151CC: enable HSI after waking from stop mode so ADC functions
2017-06-29 11:07:17 -05:00
Jimmy Brisson ea5c2cf328 Merge pull request #4421 from jeromecoutant/PR_CONFIG_CLOCK
STM32 : Clock source selection in json config file
2017-06-29 11:04:24 -05:00
Jimmy Brisson 88268bd3eb Merge pull request #4625 from adustm/PULL_REQUEST_CUBE_UPDATE_F7_V1.7.0
Update STM32F7 cube from v1.6.0 to v1.7.0
2017-06-29 11:04:02 -05:00
jeromecoutant 2ae2d9896e STM32F4: json clock source configuration
- default value is the same as before patch
- system_stm32f4xx.c file is copied to family level with all other ST cube files
- specific clock configuration is now in a new file: system_clock.c
- nvic_addr.h file is now in TARGET_STM level, and can be used everywhere
2017-06-29 09:57:40 +02:00
Brad Perry f7d76b5d29 Fixing the problem where the CAN is initialized to the wrong frequency at startup regardless of the value set in the constructor. Issue #3863 2017-06-28 12:07:14 -07:00
jeromecoutant b5ef7a675a Add the correct startup s file in TARGET_STM32F767 2017-06-28 17:13:02 +02:00
Jimmy Brisson bb3bedad79 Merge pull request #4638 from bcostm/fix_cmsis5_disco_l475vg
DISCO_L475VG_IOT01A: Fix startup files for cmsis5
2017-06-28 09:20:05 -05:00
Laurent MEUNIER c5d76a2950 Correct comments in flash api for STM32 L0 targets
The initial comments were copied from L4 implementation but do not apply
to L0 targets where 1 sector is composed of a constant number of pages.
2017-06-28 09:41:52 +02:00
Jimmy Brisson e907079456 Merge pull request #4603 from jeromecoutant/PR_OVERRIDE
STM32 : mbed_overrides.c is common for all families
2017-06-27 14:59:24 -05:00
Martin Kojtal 0591b2bcd4 STM32: fix us ticker set event timestamp
While we are handling new timestamp, disable ticker's interrupt.
2017-06-27 09:54:29 +01:00
Laurent MEUNIER ca26db620b Increase L0 ADC sample time
With default sampling time, the MBED2 and CI test shield tests would fail
because the stabilization slope of ADC is relatively slow.
ERROR (out:0.8000) - (in:0.7407) = (0.0593)
ERROR (out:0.9000) - (in:0.8354) = (0.0646)
ERROR (out:1.0000) - (in:0.9289) = (0.0711)

This is related to the 10kOhms resistors used to connect Ain to
Aout mounted on the CI shileds, and internal capacitance of L0 targets.
If connecting Ain and Aout with wires, bypassing the resistors, the test
is passed. So we're increasing the sampling time to let the automated
ci shiled tests PASS.

OK    (out:0.8000) - (in:0.7863) = (0.0137)
OK    (out:0.9000) - (in:0.8869) = (0.0131)
OK    (out:1.0000) - (in:0.9844) = (0.0156)
2017-06-27 10:33:42 +02:00
Laurent MEUNIER 4238216ad8 STM32: STM32F413xH dac_s common definition
Fixing conflict as STM32F413xH target has been merged after the first
version of moving dac_s structure definition to common_ojects.h
2017-06-27 09:30:45 +02:00
Laurent MEUNIER 07575b33f0 STM32: STM32L475xG dac_s common definition
Fixing conflict as STM32L475xG target has been merged after the first
version of moving dac_s structure definition to common_ojects.h.
2017-06-27 09:27:46 +02:00
Laurent MEUNIER 024b3da5f1 STM32: analog_out: generalize code for multiple instance handling
Moving some code in common to be able to manage several ADC instances,
or several channels of an instance.

The change involves:
- moving dac_s structure definition to common_object.h
- create TARGET_STM/analogout_api.c and move fully common analog_out
functions in there
- rename analogout_api.c of each target family into analogout_device.c
to keep platform specific code
- update analogout_device.c to rely on obj->handle and obj->channel
- align analogout_init function as much as possible between families in
analogout_device.c files
2017-06-27 09:27:46 +02:00
Laurent MEUNIER b51d676dc0 STM32: analog_out: Enable Buffer and switch
ADC1 channel2 and ADC2 of few targets only have an output switch and no
buffer. This switch needs to be enabled, and also the buffer can be enabled
in order to reduce the output impedance on output, and to drive external
loads directly without having to add an external operational amplifier.
2017-06-27 09:27:46 +02:00
Laurent MEUNIER cdd581b244 STM32: analag_out: Use dynamic handle in object rather than static
This allows a proper handling of multiple instances. Also this commit
stores the channel in the HAL format so that it can be re-used more easily
and call to HAL are straightforward.
2017-06-27 09:27:46 +02:00
bcostm 03930b88f6 DISCO_L475VG_IOT01A: Add missing nvic_addr.h file 2017-06-26 20:14:08 +02:00
bcostm 72be051088 DISCO_L475VG_IOT01A: Update system init for cmsis5 2017-06-26 19:04:44 +02:00
bcostm bd6d7382a3 DISCO_L475VG_IOT01A: Update toolchain files for cmsis5 2017-06-26 19:02:52 +02:00
Jimmy Brisson fc39ad1625 Merge pull request #4422 from jeromecoutant/PR_F4_HSE_TIMEOUT
STM32F4 set HSE timeout value to 100ms
2017-06-26 10:29:13 -05:00
Jimmy Brisson d103979e92 Merge pull request #4572 from bcostm/add_usb_disco_l072cz
DISCO_L072CZ_LRWAN1: Add support of USB Device
2017-06-26 10:28:31 -05:00
Jimmy Brisson 50ec6db4d3 Merge pull request #4405 from arostm/Fix_Issue_4404
DISCO_L072CZ_LRWAN1: PC_13 definition missing in PinNames.h fix
2017-06-26 10:21:53 -05:00
Jimmy Brisson 0d2fb2d0a7 Merge pull request #4390 from mickeyln/patch-1
Nucleo-F070RB It doesn't work when use internal clock
2017-06-26 10:20:50 -05:00
Anna Bridge f1d0314783 Merge pull request #4410 from arostm/dev_disco_f413ZH
DISCO_F413ZH: Add new platform
2017-06-23 11:41:50 +01:00
Anna Bridge 55355d7374 Merge pull request #4401 from jeromecoutant/PR_USB_PIN
STM32 : Add USB used pins in PinNames.h files
2017-06-23 11:37:19 +01:00
Anna Bridge 4f5d4f040e Merge pull request #4375 from LMESTM/STM32_SPI_LL
Stm32 spi : use LL API to improve performances
2017-06-23 11:33:55 +01:00
adustm 8058e04238 F7 ST CUBE V1.7.0 2017-06-23 09:49:31 +02:00
arostm b5af4c40ec DISCO_F413ZH: Add include of LL timer file 2017-06-22 09:23:09 +02:00
arostm c0725aa3e8 DISCO_F413ZH: Deleted cmsis_nvic.c and modified cmsis_nvic.h 2017-06-22 09:23:08 +02:00
arostm 9a34c72bc5 DISCO_F413ZH: Remove hal_conf file
The board have to use th hal_conf file from F4/device directory
2017-06-22 09:23:08 +02:00
arostm 46949d054f DISCO_F413ZH: add UART9 and 10 in serial_api.c 2017-06-22 09:23:08 +02:00
bcostm 6426d277d2 DISCO_F413ZH: Change I2C and SPI instances for Arduino default pins
Needed to pass ci-test-shield tests.
2017-06-22 09:23:07 +02:00
bcostm 8e798a9f35 DISCO_F413ZH: typo corrections in peripheralpins.c 2017-06-22 09:23:07 +02:00
bcostm b62005ebb8 DISCO_F413ZH: Fix wrong NVIC RAM end address in IAR icf file 2017-06-22 09:23:07 +02:00
bcostm e8ceb3bfa1 DISCO_F413ZH: correct ram length in GCC ld file 2017-06-22 09:23:07 +02:00
bcostm a89c0ab1c0 DISCO_F413ZH: Add BUTTON1 definition 2017-06-22 09:16:32 +02:00
arostm b862b653d3 DISCO_F413ZH: corrections
- leds definition
- add sw4stm32 exporter
- recomment mco debug
2017-06-22 09:16:32 +02:00
arostm 4a87436db2 DISCO_F413ZH: modifications in peripheralPins.c 2017-06-22 09:16:32 +02:00
arostm 781db4f265 DISCO_F413ZH: add some files and modification (targets.json, rtx...) 2017-06-22 09:16:32 +02:00
arostm 5e3350ce38 DISCO_F413ZH: Modification needed to build 2017-06-22 09:07:00 +02:00
arostm af6f9aaee0 DISCO_F413ZH: Creation folders and files (pinout, startup, etc...) 2017-06-22 09:07:00 +02:00
jeromecoutant 18572cc65b STM32 : mbed_overrides.c is common for all families 2017-06-21 16:03:05 +02:00
Martin Kojtal d121a43e37 Merge pull request #4597 from theotherjimmy/travis-upcase-asm
Assert that all assembly files are named correctly in travis
2017-06-21 09:50:47 +02:00
Jimmy Brisson c7d6bbe295 Upcase all assembler file extensions 2017-06-20 14:50:08 -05:00
Anna Bridge 525debc63b Merge pull request #4567 from u-blox/ublox_odin_driver_os_5_v2.1_rc1
Updated u-blox ODIN-W2 driver binaries to 2.1 rc1
2017-06-20 17:09:13 +01:00
bcostm 2d294495e1 DISCO_L072CZ_LRWAN1: Update HSI clock config for USB 2017-06-20 16:07:07 +02:00
Anna Bridge 810e16f88e Merge pull request #4337 from u-blox/cellular_feature_br_ublox_pr1
Platform support for new CellularInterface in UBLOX_C027 and UBLOX_C030_U201.
2017-06-20 14:00:11 +01:00
Anna Bridge c5e1fa70d9 Merge pull request #4242 from bcostm/dev_disco-l475-iot
DISCO_L475VG_IOT01A : Add new target
2017-06-20 11:41:42 +01:00
Jimmy Brisson 3f464217f1 Merge pull request #4554 from LMESTM/L476RG_ld_file
Fix NUCLEO_L476RG linker scripts
2017-06-19 11:04:10 -05:00
Jimmy Brisson 737a64c988 Merge pull request #4502 from LMESTM/issue_899
STM32: serial: clear Overrun flag if it is set when checking if readable
2017-06-19 11:00:23 -05:00
Mike Fiore 1403dfc086 [XDOT_L151CC] enable HSI after waking from stop mode so ADC functions properly 2017-06-16 10:52:44 -05:00
andreas.larsson e12efc073d Moved u-blox ODIN-W2 cb_cert_utils.h to the correct place 2017-06-16 11:18:37 +02:00
andreas.larsson a33f65d5f5 Updated binaries to 2.1 rc1 2017-06-16 10:44:16 +02:00
Laurent MEUNIER 20bd774a6c STM32 SPI specific mode for higher performance
This commit implements a SPI mode which will offer better performance
thanks to usage of Lower Layer API which use fewer registers access,
at the cost of lower robustness (no error management).
2017-06-16 10:23:48 +02:00
Rob Meades fdf8a7980f Platform support for OnboardCellular modem and u-blox cellular interface drivers. This change allows the u-blox C027 and C030 boards to use both the mbed-os OnboardCellular modem driver and the u-blox cellular interface drivers (which support both PPP and AT data modes). 2017-06-15 14:32:09 +01:00
Andreas Larsson 6a270fb348 Moved ODIN target files into STM32F439xI folder to avoid duplicate code 2017-06-14 13:21:04 -05:00
Laurent MEUNIER 73eebaad19 NUCLEO_L476RG: FLASH size of 1MB, not 2MB
MBED_APP_SIZE was erroneously defined to 2MB for this target,
while it's only 1MB.
2017-06-14 16:52:08 +02:00
Laurent MEUNIER 1d802028cf NUCLEO_L476RG: GCC_ARM ld file fix
Following
Merge pull request #4063 from LMESTM/17q2_L4_bootloader
the NUCLEO_L476RG binairies could not boot anymore.

The change done in #4063 was derived from work on NUCLEO_L429ZI target
which supports uvisor. The VECTORS defintiion is introduced as part of
uvisor support and requires further changes in ld file which were missing.
As uvisor is not considered yet, we remove VECTORS for now and will
introduce only when needed.
2017-06-14 16:48:29 +02:00
Russ Butler 47b78a2d17 Fix STM32 crashes on boot due to unset VTOR
Remove HAL_Init and related code from SystemInit and move it to
mbed_sdk_init. The function SystemInit is called early in the boot
sequence before RAM is initialized or the VTOR is setup, so it should
not be used to perform the HAL initialization.

This fixes crashes due the vector table being used before it has been
relocated.
2017-06-13 12:12:20 -05:00
jeromecoutant 8301ee04ca STM32 Add USB pins name in PinNames.h files 2017-06-13 17:15:27 +02:00
bcostm 8ede14dac1 DISCO_L475VG_IOT01A: Add include of LL timer file 2017-06-12 17:12:57 +02:00
bcostm 66cbc8b452 DISCO_L475VG_IOT01A: Update device files after CubeL4 update 2017-06-12 17:03:12 +02:00
bcostm af2078f38d DISCO_L475VG_IOT01A: Update cmsis_nvic files 2017-06-12 17:03:12 +02:00
bcostm f6a48838ad DISCO_L475VG_IOT01A: Move USB device config files 2017-06-12 17:03:12 +02:00
bcostm 3519d535a0 DISCO_L475VG_IOT01A: Add generic buttons declaration 2017-06-12 17:03:12 +02:00
bcostm 2ed207efd4 DISCO_L475VG_IOT01A: change comment for 8-byte aligned adress for IAR .icf file 2017-06-12 17:03:12 +02:00
bcostm 7a2d1bd74a DISCO_L475VG_IOT01A: Move ADC internal channels in dedicated table. 2017-06-12 17:03:12 +02:00
bcostm 05c023bcad DISCO_L475VG_IOT01A: Add all pins even those not available on connectors. 2017-06-12 17:03:12 +02:00
bcostm a8ab839e2c DISCO_L475VG_IOT: Re-organize folder
- Move TARGET_DISCO_L475VG_IOT01A/ in TARGET_STM32L475xG/
- Add STM32L475xG extra label in targets.json
2017-06-12 17:03:12 +02:00
bcostm b40591f1e1 DISCO_L475VG_IOT: Add USB Device files 2017-06-12 17:03:12 +02:00
bcostm 2871545bd7 Assign LED4 definition same as LED3 2017-06-12 17:03:12 +02:00
bcostm b9cf7dbe69 Set ADC pins to MODE_ANALOG_ADC_CONTROL 2017-06-12 17:03:12 +02:00
bcostm ac27f8288d Add back PB_6/PB_7 pins definition used by STDIO_UART_TX/RX 2017-06-12 17:03:12 +02:00
bcostm 23140da035 Update PeripheralPins: add _ALTx pins and remove pins not available on connectors 2017-06-12 17:03:12 +02:00
bcostm 8c7000cce4 Add "01A" suffix in target name 2017-06-12 17:03:12 +02:00
bcostm 116d35ad9b Update PinNames.h and remove PortNames.h after rebase with master 2017-06-12 17:03:12 +02:00
bcostm 374f71ca66 Add DISCO_L475VG_IOT in mbed_rtx.h 2017-06-12 17:03:12 +02:00
bcostm 074e11dcc1 Add DISCO_L475VG_IOT specific files 2017-06-12 17:03:12 +02:00
Fahrzin Hemmati 28e8bc04e9 do while -> while 2017-06-12 05:12:45 -07:00
Fahrzin Hemmati 53f5f662ca Fix add -> adds typo 2017-06-12 05:11:48 -07:00
Fahrzin Hemmati 38b64ab927 Improve the startup code on the STM32F070
This reduces the number of loads inside of the .data copy loop by 3 by using one more register. It should work on any STM32 with at least 5 general-purpose registers. If only 4 are available, then 1 load could still be removed from the original implementation.
2017-06-12 05:05:41 -07:00
Martin Kojtal ecc737e14f Merge pull request #4484 from c1728p9/workshop_rebase_4058
STM32L4 Flash support
2017-06-09 15:05:46 +01:00
Laurent MEUNIER f77ecf4e12 STM32: Put some serial code in common between families 2017-06-09 13:30:54 +02:00
Russ Butler 805374ed89 Restore cmsis_nvic for Cortex-M0 targets
Restore cmsis_nvic (cmsis_nvic.c and cmsis_nvic.h) files for the
implementations which use a mechanism other than the VTOR to set
interrupts. These are vendor specific and were done for M0 devices
which do not have a VTOR.

Note - There were two cmsis_nvic files which did not use the VTOR that
which not restored in this patch. This is because these targets were
not M0 devices and could use the new unified implementation instead.
These files are:
targets\TARGET_ARM_SSG\TARGET_MPS2\TARGET_MPS2_M0P\device\cmsis_nvic.c
targets\TARGET_ONSEMI\TARGET_NCS36510\device\cmsis_nvic.c

Note - cmsis_nvic.c and cmsis_nvic.h were initial removed in
(and restored from) the commit:
b97ffe8fdc -
"CMSIS5: Replace target defined NVIC_Set/GetVector with CMSIS implementation"
2017-06-08 22:50:23 -05:00
Sam Grove ee8bd05ff6 Merge pull request #4481 from kegilbert/add_bootloader_support_stm32f439xI-rebase
Add bootloader support stm32f439xI - Rebase
2017-06-08 15:55:59 -05:00
Sam Grove 434787b9a8 Merge pull request #4499 from c1728p9/fix_rtc_api_time_conversion
Fix rtc api time conversion
2017-06-08 15:49:00 -05:00
Sam Grove 64c6214f03 Merge pull request #4474 from kegilbert/stm32_l0_flash_api-rebase
STM32 L0: Add Flash API support - Rebase
2017-06-08 11:39:08 -05:00