Skip to content

hal: ambiq: apollo510: add CRC boundary-safe HAL extensions#65

Open
RichardSWheatley wants to merge 1 commit into
mainfrom
crc32-ambiq-udpate
Open

hal: ambiq: apollo510: add CRC boundary-safe HAL extensions#65
RichardSWheatley wants to merge 1 commit into
mainfrom
crc32-ambiq-udpate

Conversation

@RichardSWheatley
Copy link
Copy Markdown
Collaborator

Update AmbiqSuite SDK HAL for Apollo510 to SDK revision release_sdk5p2p0 and add CRC32 helper APIs required by the Zephyr hardware CRC driver:

  • am_hal_crc(): boundary-aware CRC32 with automatic transfer splitting at DTCM/SSRAM0/SSRAM1/SSRAM2 and TCM 4 KB (ERR014) boundaries
  • am_hal_crc_find_next_boundary(): returns the next problematic DMA boundary address for a given start/size
  • am_hal_crc_set_init() / am_hal_crc_finalize(): control re-seeding of the SECURITY->RESULT accumulator to allow streaming/chunked CRC sessions
  • Add explicit extern to all am_hal_security and am_hal_crc32 declarations in am_hal_security.h
  • Add DTCM_END, ITCM_END, SSRAM0/1/2 base/end address macros to am_reg_base_addresses.h for boundary calculations
  • Move arm_cmse.h include before apollo510.h in am_mcu_apollo.h; add MVE intrinsics guard block; update SDK revision string
  • Add am_hal_security.c to apollo510 CMakeLists.txt

Update AmbiqSuite SDK HAL for Apollo510 to SDK revision
release_sdk5p2p0 and add CRC32 helper APIs required by the
Zephyr hardware CRC driver:

- am_hal_crc(): boundary-aware CRC32 with automatic transfer
  splitting at DTCM/SSRAM0/SSRAM1/SSRAM2 and TCM 4 KB (ERR014)
  boundaries
- am_hal_crc_find_next_boundary(): returns the next problematic
  DMA boundary address for a given start/size
- am_hal_crc_set_init() / am_hal_crc_finalize(): control
  re-seeding of the SECURITY->RESULT accumulator to allow
  streaming/chunked CRC sessions
- Add explicit extern to all am_hal_security and am_hal_crc32
  declarations in am_hal_security.h
- Add DTCM_END, ITCM_END, SSRAM0/1/2 base/end address macros to
  am_reg_base_addresses.h for boundary calculations
- Move arm_cmse.h include before apollo510.h in am_mcu_apollo.h;
  add MVE intrinsics guard block; update SDK revision string
- Add am_hal_security.c to apollo510 CMakeLists.txt

Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>
Copy link
Copy Markdown
Contributor

@swift-tk swift-tk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The revision ids are different for each file. Are you sure these are from the same release?

@RichardSWheatley
Copy link
Copy Markdown
Collaborator Author

RichardSWheatley commented Jun 3, 2026

The revision ids are different for each file. Are you sure these are from the same release?

Since this is not Ambiqsuite, we only update the release IDs when the functionality of that file is changed.

@RichardSWheatley RichardSWheatley requested a review from swift-tk June 3, 2026 12:48
@RichardSWheatley RichardSWheatley added the enhancement New feature or request label Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants