![]() |
AVR SD Safety Framework 1.0.0
|
Contains assembly API prototypes for the CCP (Configuration Change Protection) utility driver. More...
Files | |
| file | driver_ccp_asm.h |
| Contains assembly API prototypes for the CCP (Configuration Change Protection) utility driver. | |
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. | |
Contains assembly API prototypes for the CCP (Configuration Change Protection) utility driver.
| 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.
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.
After calling this function, interrupts will be pending until the CCP period is over and this function has finished.
It is the responsibility of the calling function to provide a valid SFR address and value. No input validation is performed.
| regAddr | Address of the CCP-protected register. |
| value | Specifies the value to write to the CCP-protected register. |
| 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.
This function writes to 24-bit CCP protected SFRs. For 8-bit and 16-bit registers see ASM_WriteCcp8 and ASM_WriteCcp16.
This function only writes the three least significant bytes and discards the most significant byte of the value input parameter.
An attempted write to CCP-protected SFRs outside the CCP sequence is discarded and issues a bus error.
After calling this function, interrupts will be pending until the CCP period is over and this function has finished.
It is the responsibility of the calling function to provide a valid SFR address and value. No input validation is performed.
| regAddr | Address of the CCP-protected register. |
| value | Specifies the value to write to the CCP-protected register. |
| 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.
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.
After calling this function, interrupts will be pending until the CCP period is over and this function has finished.
It is the responsibility of the calling function to provide a valid SFR address and value. No input validation is performed.
| regAddr | Address of the CCP-protected register. |
| value | Specifies the value to write to the CCP-protected register. |