* Attempt to increase RPi Pico PWM range and resolution to the max supported
* Fix copyright for pwmout_api.c
* Fix ADC implementation so it works! Fixes incorrect return type, adds +1 to top_count, fixes missing pwm_config_set_wrap() call.
* Revert printf change in this PR
* Start on STM32 DMA SPI
* Update all objects.hs, add interrupt function
* Initial DMA code should be ready to test out...
* Fix SPI interrupt-mode IRQ handlers, add SPI::transfer_and_wait
* Fix CMake error when building for STM32WL processors
* Now builds on all STM devices!
* Properly support STM32U5 / DMA IP v3
* Start on STM32F4 support, fix hardfault on IP v1 and v3 due to incorrect indexing
* Fix Rx-only transfers, add abort code, fix incorrect channel assignments for DMA IP v1 devices
* Start on STM32H7 SPI DMA
* Fixes for H7: Correctly manage data cache, keep SPI ISR enabled
* Implement DMA SPI header constants for all remaining STM32 families. Also add support for freeing DMA channels
* Try and fix build on STM32G0
* Fix build on STM32G0
* Add SPI_32BIT_WORDS label, start on fixing SPI docs
* SPI: Implement reference counting so that DMA channels get freed properly
* Fix issue where SPI data could get corrupted (by TI mode turning on) depending on memory layout (if your spis pointer & 0x10 was nonzero)
* Mark DMA channels as unallocated when SPI bus is freed
* Simplify spi_abort_asynch()
* Fix some rebase issues, fix failing to allocate DMA channel on STM32U5
* Fix DMA getting stuck on STM32F4, F7, and F2
* Initial import of python packages
* Move tests to subfolder, use tests in generate_configuration.cmake
* Bring python packages into the source tree instead of needing to be installed separately
* Use python3
* Just use distro default python
* Install all the requirements with apt-get
* unittests is part of Python now
* Add appdirs, set python version
* Add some missing dependencies
* Add more packages
* Add requirements.apt.txt files, fix relative paths with scancode_evaluate.py
* Fix return code handling for license scan errors
* ok let's try that again, also improve error output from scancode evaluate
* Add missing license headers
* Refactor flash setup for MIMXRT105x devices, adds flash support for MIMXRT1062 EVK
* Remove commented code
* Use BOARD_FLASH_SIZE in boot headers
* Fix setting which should be disabled in run mode
* Fix null pointer dereferencing
Add null check for return values of functions that are mostly (but not
always) checked for null.
E.g., since 98% of calls to protocol_stack_interface_info_get_by_id
check for null, it is likely that the function can return null values in
some cases, and omitting the check could crash the program.
* Update MAX32660 peripheral drivers with final ones that use by SDK
* Apply MAX32660 delta
Update mbed hal function as per of SDK update
Signed-off-by: Sadik.Ozer <sadik.ozer@analog.com>
* M2354: Fix debug failure in Mbed Studio
In Mbed Studio, debugging, based on pyOCD, requires Mbed OS application code starting on the sector boundary.
Modification list:
1. Update TF-M import assets with MCUboot header padding to sector aligned
2. Following above, change header size argument (-H) in wrapper.py command line
3. Following below, fix min-write-size (--align) to 4 (per flash_area_align()) in wrapper.py command line
https://docs.mcuboot.com/design.html#image-trailer
Related issue:
https://github.com/ARMmbed/mbed-os/issues/15417
* Do not clear interrupt flag during initialization
This causes issue for repeaded initialization while using BufferedSerial mode
Signed-off-by: Sadik.Ozer <sadik.ozer@analog.com>
* MAX32660, MAX32670 UART performance improvement
Signed-off-by: Sadik.Ozer <sadik.ozer@analog.com>
* Handle negative values passed to close()
Calling close() with negative numbers causes out-of-bounds indexing of the filehandles array. For example, this can happen if open() returns an error and the value is later passed to close().
* Moved a { to the same line as if
Moved a { to the same line as if
* add nullpointer check in LWIP::socket_close
* Fix crash when using FDCAN3 RX IRQ on STM32G473 (and others)
* connectivity: drivers: Update Nuvoton M467 EMAC DMA_IE ctl
In IRQ Handler, to disable some interrupt type of DMA error.
It could avoid unexpected repeated interrupt.The masked bit of
DMA_IE could be recovered in next EMAC IRQ event.
Signed-off-by: cyliang tw <cyliang@nuvoton.com>
* Add workaround for G474 hardfault
* update drivers STM32WL CUBE V1.3.0
* Changed static to weak
* Fix: Do not disable SPI for manual drive mode during transaction setup
It has been reported that disabling SPI module causes glitch for manual SS drive mode
Signed-off-by: Sadik.Ozer <sadik.ozer@analog.com>
* make cellular event queue size configurable
update unit tests
---------
Signed-off-by: Sadik.Ozer <sadik.ozer@analog.com>
Signed-off-by: cyliang tw <cyliang@nuvoton.com>
Co-authored-by: Mingjie Shen <shen497@purdue.edu>
Co-authored-by: Ahmet Polat <Ahmet.Polat@maximintegrated.com>
Co-authored-by: Sadik.Ozer <sadik.ozer@analog.com>
Co-authored-by: Chun-Chieh Li <ccli8@nuvoton.com>
Co-authored-by: alrvid <126816223+alrvid@users.noreply.github.com>
Co-authored-by: Jost, Chris <79271064+chrJost@users.noreply.github.com>
Co-authored-by: Joseph Duchesne <joseph@avidbots.com>
Co-authored-by: cyliang tw <cyliang@nuvoton.com>
Co-authored-by: Maxim Markin <mak22223@ya.ru>
Co-authored-by: Charles <hallard04@free.fr>
Co-authored-by: Lukas Karel <lukas.karel@world-direct.at>
* Make it so that SPI::select() works correctly with async stuff
* Add more overloads for SPI functions, make sure that SPI::abort_transfer() correctly toggles CS
* SPI: Implement reference counting so that DMA channels get freed properly
* Fix initialization of SPI peripheral structures
* Update docs a bit
* Use a mutex to protect SPI::_peripherals instead of a critical section, because spi_free() may not be ISR safe
* Style fixes
* Remove old pico SDK, import latest version using new importer script
* Add new importer script, update CMakeLists
* Merge changes from newer SDK into init assembly and linker script
* Update pico hal code for new SDK version
* Clean up linker script a bit, revert ram size
* Fix accidental breakage of watchdog-reset test from warning fixing! Also better document USB setup procedure and disable reset as part of the test runner.
* Attempt to fix declaring an OSPIFBlockDevice as a global object
* Astyle format
* Add B_U585_IOT02A upload method support and default OSPIF mappings. Guard against incorrect case on upload method
* Also fix the same error in QSPIFBlockDevice
* Fix compile error for mbed-wifi
* Provide ScopedMutexLock for unittests mode
* Add PICO SDK
* Add RP2040 HAL implementation
* Add target Raspberry Pi Pico and its Upload method
* Modified PICO SDK-RTC because of conflict in name
* Use USB from boot, fix USB linking
* Try removing redundant init call
* Add SWD upload configuration, copy most init code from Pico SDK
* Fix RTC linking, fix ram size constant, fix test warning
* Add upload support for RPi Pico devices using Picotool
* Fix implementation of Tx IRQ for serial ports. BufferedSerial works now!
* Make PinNames.h pass pin validation
* Fix us ticker not working when debugging
* Fix us ticker double-init and manual fire interrupt function, us ticker tests now pass!
* Fix writing to rtc and rtc double-init, RTC tests now pass (except rtc-reset)
* Fix panic() not working from a critical section or ISR
* Fix compile failure due to extra LED1 definition
* Fix style
* Fix flash_api detection of invalid parameters, fix reset_reason to advertise the correct capabilities and implement them correctly
* Fix watchdog test warnings, fix broken hal_watchdog_get_reload_value(), fix missing frequency field in watchdog features
* Fix watchdog_reset failing to compile on some devices
* Fix us ticker fire_interrupt() not being callable from an ISR
* Fix incorrect license header
---------
Co-authored-by: Johnk1987 <odiin@seznam.cz>
The workaround is not needed anymore (v32 is breaking this reindexing as they created new command to do that anyway).
Co-authored-by: Martin Kojtal <martin.kojtal@arm.com>
When IPv6 is prefered it will choose a link local address on a network
that lacks IPv6 over a working IPv4 network, breaking networking.
Change this behaviour to prefer a link local address only as a last
resort.
This also changes LWIP::get_ipv6_addr to not return link local
addresses. Use get_ipv6_link_local_addr instead for this.
* fix STM32L1 FLASH_SIZE for cat.3 devices with DEV_ID 0x436
* Fix mesh connect semaphore not releasing causing blockage
* Add support of NSAPI_ICMP sockets in Nanostack
* STM32F1: add MCU_STM32F103xD support
* STM32F1: add MCU_STM32F103xG support
* test: Disable failing tests due to echo server
Some tests are failing as echo.mbedcloudtesting.com is not serving TLS
requests anymore.
Signed-off-by: Saheer Babu <saheer.babu@arm.com>
* Check CAN DLC length value
* Fix default interface ID only being used partially
If user sets the default interface ID for a socket (e.g. using setsockopt
with SOCKET_INTERFACE_SELECT), the default interface should take over
other interface selection mechanisms as a interface is bound to the socket.
This applies for both IPv6 local and global scopes for unicast messages
but not for multicast messages as these are bound to a multicast interface
using SOCKET_IPV6_MULTICAST_IF socket option.
* Targets: NXP: IMXRT: Fixed GCC_ARM lds syntax.
Signed-off-by: Yilin Sun <imi415@imi.moe>
* CAN: read only up to 8 bytes
If HAL implementation writes more than 8 bytes of data, error immediately.
CANMessage defines only 8 bytes of data, lenght cannot be > 8.
This fixes https://github.com/ARMmbed/mbed-os/issues/15361
Signed-off-by: Martin Kojtal <martin.kojtal@arm.com>
* STM32F303xC: add RAM_CCM in GCC linker script
* fix(drivers/emac): Remove incorrect RMII RX ER initialization
* fix(drivers/emac): Add missing SPDX indetifier to ST driver files
* fixed compiler inline issue
* Update Mbed version block
* removed HSE speed limitation for STM32G431RB
* Added HSE range validation for STM32g431xB
* added support for 4, 8 and 16MHz
* M487: Remove unused variable 'u32EscapeFrame'
Remove unused variable 'u32EscapeFrame' in BSP m480_ccap.h to avoid warnings
* force FIFO IRQ for FDCan RX on H7
* Add hardware CRC support to STM32G4
* add support for Nucleo-H745ZI
* Update MAX32670 peripheral drivers with final ones that use by SDK
Signed-off-by: Sadik.Ozer <sadik.ozer@analog.com>
* MAX32670 apply mbed required changes on peripheral drivers
Signed-off-by: Sadik.Ozer <sadik.ozer@analog.com>
* M467: Support CAN bus
1. Update BSP CANFD driver
2. Notes for implementation
(1) Each CANFD instance supports two IRQ lines. Use only line 0. Line 1 is not used.
(2) For Rx disabling multiple filter handles,
1) Map all filter handles to filter handle 0
2) Use Rx FIFO 0 for filter handle 0
(3) For Rx enabling multiple filter handles,
1) Use Rx FIFO 0 for filter handle 0
2) Use Rx FIFO 1 for filter handle through first invoking can_filter()
3) Use dedicated Rx Buffer for other filter handles
NOTE: H/W supports mask on Rx FIFO 0/1 but not on dedicated Rx Buffer.
(4) For Tx, use only dedicated Tx Buffer. BSP CANFD driver doesn't support Tx FIFO/Queue.
(5) Support no CAN FD.
* Fix 'new[]' array freed with 'delete'
The array _scratch_buf is allocated using new[] in line 761 of
mbed-os/storage/kvstore/securestore/source/SecureStore.cpp.
But it was freed using delete.
* Define default parameters of functions of derived class the same as the base class
The member function bringup() of class ThreadInterface redefines
parameter stack's default value to IPV6_STACK from the inherited default value
DEFAULT_STACK (in Interface).
The default value will be resolved statically, not by dispatch, so this
can cause confusion.
Similar arguments apply to LoWPANNDInterface and WisunInterface.
* Avoid calling virtual functions from constructors and destructors
Virtual functions are resolved statically (not dynamically) in
constructors and destructors for the same class. The call should be made
explicitly static by qualifying it using the scope resolution operator.
* Fix potentially overrunning write of sprintf
Format string "%d" requires 12 bytes (including the null terminator).
Also, use snprintf instead of sprintf to prevent buffer overflow.
* Fix system_clock.c location
Signed-off-by: Jasper Jonker <jasper.jonker@wingtra.com>
* Fix variable name
Signed-off-by: Jasper <jasper.jonker@wingtra.com>
* Change storage-class of secret_buf to static
Storing the address of a local variable (`secret_buf`)
in non-local memory (`prf_ptr->secret`) can cause a
dangling pointer bug if the address is used after the function returns.
* fix compiling errors of FATFileSystem when exFAT was enabled
* Add OSPI support for STM32H7
* Nuvoton: Enable extending sampling time for ADC/EADC
For all Nuvoton targets, enable extending sampling time in ADC/EADC clocks on per-pin basis.
---------
Signed-off-by: Saheer Babu <saheer.babu@arm.com>
Signed-off-by: Yilin Sun <imi415@imi.moe>
Signed-off-by: Martin Kojtal <martin.kojtal@arm.com>
Signed-off-by: Sadik.Ozer <sadik.ozer@analog.com>
Signed-off-by: Jasper Jonker <jasper.jonker@wingtra.com>
Signed-off-by: Jasper <jasper.jonker@wingtra.com>
Co-authored-by: caodd <caodd1993@qq.com>
Co-authored-by: YannCharbon <yann.charbon@ik.me>
Co-authored-by: Jerome Coutant <jerome.coutant@st.com>
Co-authored-by: Saheer Babu <saheer.babu@arm.com>
Co-authored-by: Martyx00 <martin.petran@protonmail.com>
Co-authored-by: Yilin Sun <imi415@imi.moe>
Co-authored-by: Martin Kojtal <martin.kojtal@arm.com>
Co-authored-by: akiroz <akiroz.vectis@gmail.com>
Co-authored-by: Charles <hallard04@free.fr>
Co-authored-by: Leonard Chiang <leochiang2002@gmail.com>
Co-authored-by: Chun-Chieh Li <ccli8@nuvoton.com>
Co-authored-by: jmcloud <jmcloud@tesla.com>
Co-authored-by: Augusto Zanellato <augusto.zanellato@gmail.com>
Co-authored-by: Sadik.Ozer <sadik.ozer@analog.com>
Co-authored-by: Mingjie Shen <shen497@purdue.edu>
Co-authored-by: Jasper Jonker <jasper.jonker@wingtra.com>
Co-authored-by: wdx04 <wdx04@outlook.com>
* Add STM32F103xD, STM32F103xG series and fix STM32F103xE startup file
* Add system_clock.c file for STM32F103xD series
* Add STM32F103xD and STM32F103xG to targets.json
* Update CMakeLists.txt to add STM32F103xD and STM32F103xG series
add_subdirectory(TARGET_STM32F103xD EXCLUDE_FROM_ALL)
add_subdirectory(TARGET_STM32F103xG EXCLUDE_FROM_ALL)
* Add remaps for STM32F1 timers as in original mbed-os
Added extra remaps for timers 9 to 14 for STM32F1 needed in STM32F103xG series
#define AFIO_REMAP_TIM9_ENABLE 17
#define AFIO_REMAP_TIM10_ENABLE 18
#define AFIO_REMAP_TIM11_ENABLE 19
#define AFIO_REMAP_TIM13_ENABLE 20
#define AFIO_REMAP_TIM14_ENABLE 21
---------
Co-authored-by: Perez <maperez@hp.com>
* STM32F7: Unconditionally enable QSPI workarounds
On the STM32769NI at least this patch is required for stable QSPI use.
Enable it uncondtionally in case other boards need it too.
Further discussions:
https://github.com/ARMmbed/mbed-os/issues/10049https://github.com/ARMmbed/mbed-os/issues/15108https://github.com/STMicroelectronics/STM32CubeF7/issues/52https://github.com/STMicroelectronics/STM32CubeF7/issues/82
* QSPIF: Attempt 4-byte addressing on Macronix chips
mbed-os PR 11531 introduced 4-byte addressing in the QSPIF block device:
https://github.com/ARMmbed/mbed-os/pull/11531
During testing it was found that this code broke on the NRF52840_DK and
DISCO_F769NI.
The NRF52840_DK controller seems unable to handle 4-byte addressing at
all and has been disabled entirely in another code section.
The DISCO_F769NI breakage was attributed to the flash chip but after more
research I believe this is related to the QSPI controller, not the 4-byte
addressing itself.
Now that the QSPI controller has a workaround, enable 4-byte addressing
again and hope it works fine this time.
* Add STM32F103xD, STM32F103xG series and fix STM32F103xE startup file
* Add system_clock.c file for STM32F103xD series
* Add STM32F103xD and STM32F103xG to targets.json
---------
Co-authored-by: Perez <maperez@hp.com>
* Start porting to Teensy 4.1, also fix some compiler warnings in FSL HAL
* Add hardware init for Teensy, refactor phy drivers, rework IMX EMAC autonegotiate code
* Revert some testing changes
* Fix incorrect phy address used outside of low_level_init_successful()
* Ethernet operational!
* Turn off DEBUG_IMX_EMAC
* Style fixes
* Style again
* Bugfix: mbed_lib.json files in project source dir were not getting picked up
* Bugfix: CLion debug configurations not generated properly due to variables going out of scope
* Support Teensy OTP MAC address
* Add clock settings for H725xE
* Correction of memory mapping for H725xE
* Added new target WIO_H725AE
* Added WIO_H725 into targets.json
* Added upload methods file for WIO_H725
* Licence filled from original source file
* Space alignment
* Added macro MBED_SPLIT_HEAP for MCU_STM32H725xE
* Typo correction
* Correction of upload methods for WIO_H725AE
* Change all debug configurations to not reset and exit on error. Initial tasks.json implementation.
* st-util working on command line and VS Code!
* Convert STM32CUBE, fix spaces in GDB server task command
* pyocd working!
* Convert OpenOCD
* Convert JLINK
* Convert REDLINK upload method
* Fix CMake typo
* Try and fix some variable scope issues
* Initial CLion implementation. Need to test with hardware.
* Add a separate task that kicks off a build before each debug session