1 /* 2 * Copyright (c) 2024 Nordic Semiconductor ASA 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 #ifndef _NRF_HW_MODEL_CRACEN_CM_H 8 #define _NRF_HW_MODEL_CRACEN_CM_H 9 10 #include <stdint.h> 11 #include <stddef.h> 12 13 #ifdef __cplusplus 14 extern "C"{ 15 #endif 16 17 void nhw_CRACEN_CM_regw_sideeffects_CONFIG(void); 18 void nhw_CRACEN_CM_regw_sideeffects_START(void); 19 20 void nhw_CRACEN_CM_regw_sideeffects_INTEN(unsigned int inst); 21 void nhw_CRACEN_CM_regw_sideeffects_INTENSET(unsigned int inst); 22 void nhw_CRACEN_CM_regw_sideeffects_INTENCLR(unsigned int inst); 23 24 void nhw_CRACEN_CM_regw_sideeffects_INTSTARTCLR(unsigned int inst); 25 26 //Interface towards CRACEN wrap 27 void nhw_CRACEN_CM_init(void); 28 void nhw_CRACEN_CM_timer_triggered(void); 29 30 //Interface towards the CM crypto engines 31 void nhw_CRACEN_CM_update_timer(void); 32 void nhw_CRACEN_CM_give_pusher_data(char *data, size_t len); 33 void nhw_CRACEN_CM_fetcher_feed(void); 34 35 struct CM_tag { 36 uint8_t EngineSelect:4; 37 uint8_t DataOrConf:1; 38 uint8_t Last:1; 39 uint8_t DataType:2; 40 union { 41 uint8_t Invalid_bytes:6; 42 uint8_t OffsetStartAddr; 43 }; 44 } __attribute__ ((packed)); 45 46 #ifdef __cplusplus 47 } 48 #endif 49 50 #endif /* _NRF_HW_MODEL_CRACEN_CM_H */ 51