AM263Px MCU+ SDK: fss.h Source File

| AM263Px MCU+ SDK 26.00.00 |

fss.h
Go to the documentation of this file.
1
2 /*
3 * Copyright (C) 2024 Texas Instruments Incorporated
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *
9 * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 *
12 * Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the
15 * distribution.
16 *
17 * Neither the name of Texas Instruments Incorporated nor the names of
18 * its contributors may be used to endorse or promote products derived
19 * from this software without specific prior written permission.
20 *
21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 */
33
44 #ifndef __FSS_H__
45 #define __FSS_H__
46
47 #ifdef __cplusplus
48 extern "C"
49 {
50 #endif
51
52 #include <stdint.h>
53 #include <kernel/dpl/SystemP.h>
54 #include <drivers/hw_include/cslr_fss.h>
55 #include <drivers/hw_include/hw_types.h>
56 #include <drivers/hw_include/csl_types.h>
57
62 #define Region_Index_0 ((uint32_t)(0))
63
68 #define Region_Index_1 ((uint32_t)(1))
69
74 #define Region_Index_2 ((uint32_t)(2))
75
80 #define Region_Index_3 ((uint32_t)(3))
81
82 typedef void* FSS_Handle;
83
84 typedef struct{
85 uint32_t size;
86 uint32_t startAddress;
87 uint32_t regionIndex;
88 }FSS_ECCRegionConfig;
89
90
91 typedef struct fss_config_s_t
92 {
93 uint32_t ipBaseAddress;
94 uint32_t extFlashSize;
95 }
96 FSS_Config;
97
114 int32_t FSS_addressBitMask(FSS_Handle handle, uint32_t bitMask, uint8_t segment);
115
122 int32_t FSS_disableAddressRemap(FSS_Handle handle);
123
130 int32_t FSS_selectRegionA(FSS_Handle handle);
131
138 int32_t FSS_selectRegionB(FSS_Handle handle);
139
146 uint32_t FSS_getBootRegion(FSS_Handle handle);
147
156 void FSS_enableECC(void);
157
162 void FSS_disableECC(void);
163
170 void FSS_setECCRegionSize(uint32_t regionIndex, uint32_t size_in_bytes);
171
178 void FSS_setECCRegionStart(uint32_t regionIndex, uint32_t ecc_reg_start);
179
186 int32_t FSS_configECCMRegion(FSS_ECCRegionConfig *parameter);
187
194 int32_t FSS_ConfigEccm(uint32_t numRegion, FSS_ECCRegionConfig *parameter);
195
196
197 #ifdef __cplusplus
198 }
199 #endif
200
201 #endif
202
FSS_Config
Definition: fss.h:92
FSS_configECCMRegion
int32_t FSS_configECCMRegion(FSS_ECCRegionConfig *parameter)
Configure en ECCM Region.
FSS_ConfigEccm
int32_t FSS_ConfigEccm(uint32_t numRegion, FSS_ECCRegionConfig *parameter)
Configure ECCM hardware.
SystemP.h
FSS_ECCRegionConfig::size
uint32_t size
Definition: fss.h:85
FSS_ECCRegionConfig::regionIndex
uint32_t regionIndex
Definition: fss.h:87
FSS_Config::ipBaseAddress
uint32_t ipBaseAddress
Definition: fss.h:93
FSS_ECCRegionConfig
Definition: fss.h:84
FSS_ECCRegionConfig::startAddress
uint32_t startAddress
Definition: fss.h:86
FSS_selectRegionB
int32_t FSS_selectRegionB(FSS_Handle handle)
Map region N of flash to initial position.
FSS_setECCRegionSize
void FSS_setECCRegionSize(uint32_t regionIndex, uint32_t size_in_bytes)
Set size of an ECCM region.
FSS_disableAddressRemap
int32_t FSS_disableAddressRemap(FSS_Handle handle)
Disable remap.
FSS_disableECC
void FSS_disableECC(void)
Disable ECC.
FSS_addressBitMask
int32_t FSS_addressBitMask(FSS_Handle handle, uint32_t bitMask, uint8_t segment)
Mask the address bits.
FSS_Config::extFlashSize
uint32_t extFlashSize
Definition: fss.h:94
FSS_Handle
void * FSS_Handle
Definition: fss.h:82
FSS_getBootRegion
uint32_t FSS_getBootRegion(FSS_Handle handle)
Which boot region is been selected.
FSS_setECCRegionStart
void FSS_setECCRegionStart(uint32_t regionIndex, uint32_t ecc_reg_start)
Set start address of an ECCM region.
FSS_enableECC
void FSS_enableECC(void)
Enable ECC for Flash.
FSS_selectRegionA
int32_t FSS_selectRegionA(FSS_Handle handle)
Map region A of flash to initial position.