Hardware Abstraction Layer
The Hardware Abstraction Layer (HAL) defines chip hardware access interfaces that users can use to access underlying hardware resources. HAL interfaces are compatible across different chip series, facilitating application portability across different chip platforms.
The SF32LB52x series has two CPUs: HCPU for high-performance computing, and LCPU runs the Bluetooth protocol stack and is not open to applications.
Software running on HCPU can typically access LCPU hardware resources, but needs to ensure that LCPU is in an active running state and LCPU is not using these resources. When HCPU/ACPU software uses LCPU hardware, it needs to wake up LCPU first during sleep-wake cycles to ensure access to LCPU hardware resources, otherwise it will cause system access failures and crashes.
Software running on LCPU cannot use HCPU hardware resources and can only access some HCPU registers when HCPU/ACPU is in an active running state. This type of access is not recommended.
HAL Porting
The following functions need to be implemented when porting to other real-time operating systems: