Skip to content

Make the CRC Platform Abstraction Layer multi-context-safe#90

Open
parmi93 wants to merge 1 commit into
STMicroelectronics:dev/1.2.0from
parmi93:dev/1.2.0
Open

Make the CRC Platform Abstraction Layer multi-context-safe#90
parmi93 wants to merge 1 commit into
STMicroelectronics:dev/1.2.0from
parmi93:dev/1.2.0

Conversation

@parmi93

@parmi93 parmi93 commented Jun 9, 2026

Copy link
Copy Markdown
Contributor
  • Introduces stse_crc16_context_t struct context.
  • Introduces stse_platform_Crc16_ContextInit() and stse_platform_Crc16_ContextRelease() PAL APIs.
  • Refactors stse_platform_Crc16_Accumulate() PAL API.
  • Removes stse_platform_Crc16_Calculate() PAL API.

These changes resolve issue #65 by allowing users to adapt the CRC16 PAL implementation to scenarios where communication with multiple STSAFE devices takes place concurrently.

Additionally, they make it possible to implement thread-safe CRC16 PAL APIs when CRC computation is performed by a shared hardware peripheral. This ensures that concurrent access from multiple threads can be managed safely, even when those threads are not necessarily communicating with different STSAFE devices.

@parmi93 parmi93 force-pushed the dev/1.2.0 branch 2 times, most recently from 22074e5 to 13a4548 Compare June 9, 2026 16:10
@parmi93

parmi93 commented Jun 10, 2026

Copy link
Copy Markdown
Contributor Author

I just realized that this PR targets the main branch instead of dev/1.2.0. I can't find an option to change the target branch on my side, so hopefully one of the maintainers has the necessary permissions to update it.

@nils-cercariolo-st nils-cercariolo-st changed the base branch from main to dev/1.2.0 June 11, 2026 01:37
@TofMassilia13320 TofMassilia13320 force-pushed the dev/1.2.0 branch 2 times, most recently from 71273fe to eda5991 Compare June 15, 2026 13:30
@TofMassilia13320 TofMassilia13320 self-requested a review June 16, 2026 09:39
@TofMassilia13320

Copy link
Copy Markdown
Contributor

Tx to solve conflicts.
I see:

  • multiple crc init
  • stse_platform_Crc16_Calculate presence

@parmi93 parmi93 force-pushed the dev/1.2.0 branch 2 times, most recently from 13a4548 to a709937 Compare June 16, 2026 10:18
@parmi93

parmi93 commented Jun 16, 2026

Copy link
Copy Markdown
Contributor Author

Fix the conflicts by rebasing my branch (dev/1.2.0) with the upstream/dev/1.2.0 branch, and I push forced to keep the git history clean.

@TofMassilia13320 TofMassilia13320 removed their request for review June 17, 2026 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants