* The Mbed platform and OS will reach end of life in July 2026,
when the Mbed website will be archived and it will no longer
be possible to build projects in our online tools.
* The device software - Mbed OS - is open source and will remain
publicly available, but is no longer actively maintained by Arm
* The Mbed TLS project is unaffected by this announcement and
continues to be supported as part of the TrustedFirmware
community project.
Signed-off-by: Hugues KAMBA MPIANA <hugues.kambampiana@arm.com>
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.
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.
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.
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.
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).
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).
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.
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.