FuSa 8-Bit Libraries Safety Framework
Loading...
Searching...
No Matches
CCP Utility Driver

Contains assembly API prototypes for the CCP (Configuration Change Protection) utility driver. More...

Functions

void ASM_WriteCcp8 (register8_t *regAddr, uint8_t value)
 Writes value to a Configuration Change Protected (CCP) 8-bit register.
void ASM_WriteCcp16 (register16_t *regAddr, uint16_t value)
 Writes value to a Configuration Change Protected (CCP) 16-bit register.
void ASM_WriteCcp24 (register32_t *regAddr, uint32_t value)
 Writes value to a Configuration Change Protected (CCP) 24-bit register.

Detailed Description

Contains assembly API prototypes for the CCP (Configuration Change Protection) utility driver.

Version
1.0.0-alpha.1
UML Class Diagrams

UML Activity Diagrams

Function Documentation

◆ ASM_WriteCcp16()

void ASM_WriteCcp16 ( register16_t * regAddr,
uint16_t value )

Writes value to a Configuration Change Protected (CCP) 16-bit register.

This function writes the required CCP signature to unlock CCP-protected Special Function Registers (SFRs) before writing the specified value to it. Once unlocked, the protected register must be written to within the next four CPU instructions. To ensure the CCP sequence is correctly executed, the function is implemented in assembly.

Note
This function writes to 16-bit CCP protected SFRs. For 8-bit and 24-bit registers see ASM_WriteCcp8 and ASM_WriteCcp24.
An attempted write to CCP-protected SFRs outside the CCP sequence is discarded and issues a bus error.
Warning
It is the responsibility of the calling function to provide a valid SFR address and value. No input validation is performed.
Parameters
regAddrAddress of the CCP-protected register.
valueSpecifies the value to write to the CCP-protected register.

◆ ASM_WriteCcp24()

void ASM_WriteCcp24 ( register32_t * regAddr,
uint32_t value )

Writes value to a Configuration Change Protected (CCP) 24-bit register.

This function writes the required CCP signature to unlock CCP-protected Special Function Registers (SFRs) before writing the specified value to it. Once unlocked, the protected register must be written to within the next four CPU instructions. To ensure the CCP sequence is correctly executed, the function is implemented in assembly.

Note
This function writes to 24-bit CCP protected SFRs. For 8-bit and 16-bit registers see ASM_WriteCcp8 and ASM_WriteCcp16.
Warning
This function only writes the three least significant bytes and discards the most significant byte of the value input parameter.
Note
An attempted write to CCP-protected SFRs outside the CCP sequence is discarded and issues a bus error.
Warning
It is the responsibility of the calling function to provide a valid SFR address and value. No input validation is performed.
Parameters
regAddrAddress of the CCP-protected register.
valueSpecifies the value to write to the CCP-protected register.

◆ ASM_WriteCcp8()

void ASM_WriteCcp8 ( register8_t * regAddr,
uint8_t value )

Writes value to a Configuration Change Protected (CCP) 8-bit register.

This function writes the required CCP signature to unlock CCP-protected Special Function Registers (SFRs) before writing the specified value to it. Once unlocked, the protected register must be written to within the next four CPU instructions. To ensure the CCP sequence is correctly executed, the function is implemented in assembly.

Note
This function writes to 8-bit CCP protected SFRs. For 16-bit and 24-bit registers see ASM_WriteCcp16 and ASM_WriteCcp24.
An attempted write to CCP-protected SFRs outside the CCP sequence is discarded and issues a bus error.
Warning
It is the responsibility of the calling function to provide a valid SFR address and value. No input validation is performed.
Parameters
regAddrAddress of the CCP-protected register.
valueSpecifies the value to write to the CCP-protected register.