* remove stdio checks in serial init if no console is available
* STM32WL fix set preamble length to 8
* Add target support for XDOT_MAX32670
* TARGET_STM: only mask CAN rx interrupt after rx interrupt, not all CAN interrupts
* Sleep Radio in between DC scheduled
* Nuvoton HUSBD support endpoint write ZLP
* USBCDC: support ZLP
* Don't overlap STM32 FDCAN RAM sections
* allow to override antenna gain
* TFM: Fix undeclared function tfm_ns_interface_init
ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
* NUVOTON: CAN: Fix filter mask
NOTE: This fix only targets CAN (M453/M487), not CAN-FD (M467).
NOTE: NUC472 CAN doesn't support filter.
* NUVOTON: CAN: Fix Rx interrupt doesn't work
Major modifications:
1. Handle Rx interrupt based on Message Object interrupt (CAN_IIDR=0x0001~0x0020) instead of CAN_STATUS.RxOK
2. Also handle Tx interrupt following above for consistency
Other related modifications:
1. Fix signature type error in CAN_CLR_INT_PENDING_BIT()
2. Add CAN_CLR_INT_PENDING_ONLY_BIT() which doesn't clear NewDat flag so that user can fetch received message in thread context
NOTE: This fix only targets CAN (NUC472/M453/M487), not CAN-FD (M467).
* NUVOTON: CAN: Fix Message Object number for Tx and recognition of Rx interrupt
1. The same Message Object number cannot use for both Tx and Rx simultaneously.
For Tx, Message Object number 31 is reserved instead of 0.
For Rx, Message Object numbers 0~30 are used and for filters.
2. NewDat bit (CAN_IsNewDataReceived()) isn't exclusive to Rx.
Recognize Rx interrupt by Message Object number other than 31.
NOTE: This fix only targets CAN (NUC472/M453/M487), not CAN-FD (M467).
* NUVOTON: CAN: Fix filter mask being zero
On mask being zero, it means any match, not exact match.
NOTE: This fix only targets CAN (M453/M487), not CAN-FD (M467).
NOTE: NUC472 CAN doesn't support filter.
* Allow custom TCXO control parameter
Allow custom TCXO control parameter
* NUVOTON: EMAC: Fix undeclared function mbed_error_printf
ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
* NUVOTON: AnalogIn: Fix undeclared function gpio_set
ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
* NUVOTON: CAN: Fix undeclared function gpio_set
ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
* NUVOTON: AnalogOut: Fix undeclared function gpio_set
ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
* NUVOTON: SPI: Fix undeclared function gpio_set
ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
* NUVOTON: I2C: Fix undeclared function gpio_set
ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
* NUVOTON: Serial: Fix undeclared function gpio_set
ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
* Add separate flags for I2C slave transfer in progress
FixesARMmbed/mbed-os#15498
Adds 2 boolean flags to the STM32 `i2c_s` object
to indicate whether a transfer is in progress,
separate from the existing "transfer pending" flags.
`i2c_slave_write`, `i2c_slave_read` and their associated callbacks
are modified to use these flags in addition to the pending flags.
The original behavior of the pending flags is preserved.
* ESP8266: Fix accessing uninitialized variable
* Added missing delete
* Add ability to change number of status registers for macronix QSPIF devices
* correct scan parameters types
* skip CRC when initializing TDBStore
Problem: The build_ram_table() function of TDBStore loops over every entry, calculates the checksum and compares them to the stored checksum in the entry header to ensure integrity. For larger TDBStores (e.g. 8 MiB or more) in external single-SPI flash devices this check can take very long, thus rendering it unusable in some cases.
Solution: The suggested solution skips the time consuming CRC of the data. After reading the key and calculating its CRC, it sets next_offset to the beginning of the next entry, thereby skipping the data. While this skips the integrity check, it significantly reduces the initial building of the RAM table.
The data CRC can be enabled or disabled with a compiler flag.
Contribution is provided on behalf of BIOTRONIK.
* Added missing check for replay protection pointer before allocating new variable
Problem: If a key with write-once flag is being set in a SecureStore without rollback-protection store (i.e. _rbp_kv == NULL), additional memory will be allocated for the variable _ih->key. The memory will not be deleted, though, as the delete in line 434 only happens if a rollback-protection store exists (i.e. _rbp_kv != NULL)
Solution: Only allocate the memory if _rbp_kv != NULL
Contribution is provided on behalf of BIOTRONIK.
* Increase AT timeout to 10s in AT_CellularSMS::send_sms
For some devices sending can be slow (as an example see SIM800, it can be up to 60s), command is being run properly but default timeout is returning an invalid error.
See https://www.elecrow.com/wiki/images/2/20/SIM800_Series_AT_Command_Manual_V1.09.pdf
* Increase AT timeout to 10s in AT_CellularSMS::get_sms
When SMS list is big and baudrate is not fast enough, with default timeout we can suffer from timeout error while getting a sms because method is parsing the full list and this takes long.
* Fix AT_CellularSMS::list_messages breaking in text mode when CRLF is contained in SMS payload text
When parsing SMS, it can happen that we receive CRLF in the SMS payload (happened to me when receiving provider texts).
As an example, we can receive:
"""
Hello <CR><LF>
World!
"""
With previous implementation, second consume_to_stop_tag was stopping in <CR><LF> and rest of the code was failing for obvious reasons.
With this commit we consume the full payload as bytes.
* Add missing SPDX identifier to a bajillion Nuvoton source files + some others
* More license fixes, upgrade M451 legacy PinNames.h, add MCU description
* Fix some more legacy pin names
---------
Co-authored-by: Jost, Chris <79271064+chrJost@users.noreply.github.com>
Co-authored-by: Charles <hallard04@free.fr>
Co-authored-by: Leon Lindenfelser <llindenfelser@multitech.com>
Co-authored-by: Pavel Sorejs <sorejs@gmail.com>
Co-authored-by: cyliang tw <cyliang@nuvoton.com>
Co-authored-by: jmcloud <jmcloud@tesla.com>
Co-authored-by: Chun-Chieh Li <ccli8@nuvoton.com>
Co-authored-by: Adam Gausmann <adamg@esdemc.com>
Co-authored-by: Mingjie Shen <shen497@purdue.edu>
Co-authored-by: Matthias Goebel <matthias.goebel@biotronik.com>
Co-authored-by: danielzhang <danielzhang@mxic.com.cn>
Co-authored-by: Mathieu Camélique <mathieu.camelique@edu.hefr.ch>
Co-authored-by: David Alonso de la Torre <davidalto97@gmail.com>
With tickless mechanism hsem can be used for quite a long time
(time to set up PLL clock).
Also, if hsem is held to long, then this is not the current core which is faulty,
but probably the other (the one which hold the HSEM)
Add 2 targets for DISCO_H747I dualcore:
* DISCO_H747I -> for CM7 core
* DISCO_H747I_CM4 -> for CM4 core
Current restrictions:
* TICKLESS deactivated
* DeepSleep not supported (DeepSleep wrapped to sleep)
Warning: use of the same IP (example I2C1) by both core at the same time is not prevented,
but is strongly not recommended.
Some Hardware Semaphore are use for common IP, to manage concurrent access by both cores: Flash, GPIO, RCC.
Warning: Drag and drop of binary to DISCO_H747I will flash CM7.
In order to flash CM4, one can use STM32 CubeProgrammer tool.
As suggested by Russ Butler in mbed-os issue #7328, and until there is an
implementation of mbed-os issue #4408, we are implementing a workaround
at HAL level to check if there is any ongoing serial transfer (which happens
if HW FIFO is not yet empty).
In case a transfer is ongoing, we're not entering deep sleep and
return immediately.