board.c
Go to the documentation of this file.
1 /*
2  * Copyright 2017-2019 NXP
3  * All rights reserved.
4  *
5  * SPDX-License-Identifier: BSD-3-Clause
6  */
7 
8 #include "fsl_common.h"
9 #include "fsl_debug_console.h"
10 #include "board.h"
11 #if defined(SDK_I2C_BASED_COMPONENT_USED) && SDK_I2C_BASED_COMPONENT_USED
12 #include "fsl_lpi2c.h"
13 #endif /* SDK_I2C_BASED_COMPONENT_USED */
14 #include "fsl_iomuxc.h"
15 /*******************************************************************************
16  * Variables
17  ******************************************************************************/
18 
19 /*******************************************************************************
20  * Code
21  ******************************************************************************/
22 
23 /* Get debug console frequency. */
25 {
26  uint32_t freq;
27 
28  /* To make it simple, we assume default PLL and divider settings, and the only variable
29  from application is use PLL3 source or OSC source */
30  if (CLOCK_GetMux(kCLOCK_UartMux) == 0) /* PLL3 div6 80M */
31  {
33  }
34  else
35  {
36  freq = CLOCK_GetOscFreq() / (CLOCK_GetDiv(kCLOCK_UartDiv) + 1U);
37  }
38 
39  return freq;
40 }
41 
42 /* Initialize debug console. */
44 {
45  uint32_t uartClkSrcFreq = BOARD_DebugConsoleSrcFreq();
46 
48 }
49 
50 #if defined(SDK_I2C_BASED_COMPONENT_USED) && SDK_I2C_BASED_COMPONENT_USED
51 void BOARD_LPI2C_Init(LPI2C_Type *base, uint32_t clkSrc_Hz)
52 {
53  lpi2c_master_config_t lpi2cConfig = {0};
54 
55  /*
56  * lpi2cConfig.debugEnable = false;
57  * lpi2cConfig.ignoreAck = false;
58  * lpi2cConfig.pinConfig = kLPI2C_2PinOpenDrain;
59  * lpi2cConfig.baudRate_Hz = 100000U;
60  * lpi2cConfig.busIdleTimeout_ns = 0;
61  * lpi2cConfig.pinLowTimeout_ns = 0;
62  * lpi2cConfig.sdaGlitchFilterWidth_ns = 0;
63  * lpi2cConfig.sclGlitchFilterWidth_ns = 0;
64  */
65  LPI2C_MasterGetDefaultConfig(&lpi2cConfig);
66  LPI2C_MasterInit(base, &lpi2cConfig, clkSrc_Hz);
67 }
68 
69 status_t BOARD_LPI2C_Send(LPI2C_Type *base,
70  uint8_t deviceAddress,
71  uint32_t subAddress,
72  uint8_t subAddressSize,
73  uint8_t *txBuff,
74  uint8_t txBuffSize)
75 {
77 
79  xfer.slaveAddress = deviceAddress;
80  xfer.direction = kLPI2C_Write;
81  xfer.subaddress = subAddress;
82  xfer.subaddressSize = subAddressSize;
83  xfer.data = txBuff;
84  xfer.dataSize = txBuffSize;
85 
86  return LPI2C_MasterTransferBlocking(base, &xfer);
87 }
88 
89 status_t BOARD_LPI2C_Receive(LPI2C_Type *base,
90  uint8_t deviceAddress,
91  uint32_t subAddress,
92  uint8_t subAddressSize,
93  uint8_t *rxBuff,
94  uint8_t rxBuffSize)
95 {
97 
99  xfer.slaveAddress = deviceAddress;
100  xfer.direction = kLPI2C_Read;
101  xfer.subaddress = subAddress;
102  xfer.subaddressSize = subAddressSize;
103  xfer.data = rxBuff;
104  xfer.dataSize = rxBuffSize;
105 
106  return LPI2C_MasterTransferBlocking(base, &xfer);
107 }
108 
109 status_t BOARD_LPI2C_SendSCCB(LPI2C_Type *base,
110  uint8_t deviceAddress,
111  uint32_t subAddress,
112  uint8_t subAddressSize,
113  uint8_t *txBuff,
114  uint8_t txBuffSize)
115 {
117 
119  xfer.slaveAddress = deviceAddress;
120  xfer.direction = kLPI2C_Write;
121  xfer.subaddress = subAddress;
122  xfer.subaddressSize = subAddressSize;
123  xfer.data = txBuff;
124  xfer.dataSize = txBuffSize;
125 
126  return LPI2C_MasterTransferBlocking(base, &xfer);
127 }
128 
129 status_t BOARD_LPI2C_ReceiveSCCB(LPI2C_Type *base,
130  uint8_t deviceAddress,
131  uint32_t subAddress,
132  uint8_t subAddressSize,
133  uint8_t *rxBuff,
134  uint8_t rxBuffSize)
135 {
136  status_t status;
138 
140  xfer.slaveAddress = deviceAddress;
141  xfer.direction = kLPI2C_Write;
142  xfer.subaddress = subAddress;
143  xfer.subaddressSize = subAddressSize;
144  xfer.data = NULL;
145  xfer.dataSize = 0;
146 
147  status = LPI2C_MasterTransferBlocking(base, &xfer);
148 
149  if (kStatus_Success == status)
150  {
151  xfer.subaddressSize = 0;
152  xfer.direction = kLPI2C_Read;
153  xfer.data = rxBuff;
154  xfer.dataSize = rxBuffSize;
155 
156  status = LPI2C_MasterTransferBlocking(base, &xfer);
157  }
158 
159  return status;
160 }
161 
162 void BOARD_Accel_I2C_Init(void)
163 {
165 }
166 
167 status_t BOARD_Accel_I2C_Send(uint8_t deviceAddress, uint32_t subAddress, uint8_t subaddressSize, uint32_t txBuff)
168 {
169  uint8_t data = (uint8_t)txBuff;
170 
171  return BOARD_LPI2C_Send(BOARD_ACCEL_I2C_BASEADDR, deviceAddress, subAddress, subaddressSize, &data, 1);
172 }
173 
174 status_t BOARD_Accel_I2C_Receive(
175  uint8_t deviceAddress, uint32_t subAddress, uint8_t subaddressSize, uint8_t *rxBuff, uint8_t rxBuffSize)
176 {
177  return BOARD_LPI2C_Receive(BOARD_ACCEL_I2C_BASEADDR, deviceAddress, subAddress, subaddressSize, rxBuff, rxBuffSize);
178 }
179 
180 void BOARD_Codec_I2C_Init(void)
181 {
183 }
184 
185 status_t BOARD_Codec_I2C_Send(
186  uint8_t deviceAddress, uint32_t subAddress, uint8_t subAddressSize, const uint8_t *txBuff, uint8_t txBuffSize)
187 {
188  return BOARD_LPI2C_Send(BOARD_CODEC_I2C_BASEADDR, deviceAddress, subAddress, subAddressSize, (uint8_t *)txBuff,
189  txBuffSize);
190 }
191 
192 status_t BOARD_Codec_I2C_Receive(
193  uint8_t deviceAddress, uint32_t subAddress, uint8_t subAddressSize, uint8_t *rxBuff, uint8_t rxBuffSize)
194 {
195  return BOARD_LPI2C_Receive(BOARD_CODEC_I2C_BASEADDR, deviceAddress, subAddress, subAddressSize, rxBuff, rxBuffSize);
196 }
197 
198 void BOARD_Camera_I2C_Init(void)
199 {
203 }
204 
205 status_t BOARD_Camera_I2C_Send(
206  uint8_t deviceAddress, uint32_t subAddress, uint8_t subAddressSize, const uint8_t *txBuff, uint8_t txBuffSize)
207 {
208  return BOARD_LPI2C_Send(BOARD_CAMERA_I2C_BASEADDR, deviceAddress, subAddress, subAddressSize, (uint8_t *)txBuff,
209  txBuffSize);
210 }
211 
212 status_t BOARD_Camera_I2C_Receive(
213  uint8_t deviceAddress, uint32_t subAddress, uint8_t subAddressSize, uint8_t *rxBuff, uint8_t rxBuffSize)
214 {
215  return BOARD_LPI2C_Receive(BOARD_CAMERA_I2C_BASEADDR, deviceAddress, subAddress, subAddressSize, rxBuff,
216  rxBuffSize);
217 }
218 
219 status_t BOARD_Camera_I2C_SendSCCB(
220  uint8_t deviceAddress, uint32_t subAddress, uint8_t subAddressSize, const uint8_t *txBuff, uint8_t txBuffSize)
221 {
222  return BOARD_LPI2C_SendSCCB(BOARD_CAMERA_I2C_BASEADDR, deviceAddress, subAddress, subAddressSize, (uint8_t *)txBuff,
223  txBuffSize);
224 }
225 
226 status_t BOARD_Camera_I2C_ReceiveSCCB(
227  uint8_t deviceAddress, uint32_t subAddress, uint8_t subAddressSize, uint8_t *rxBuff, uint8_t rxBuffSize)
228 {
229  return BOARD_LPI2C_ReceiveSCCB(BOARD_CAMERA_I2C_BASEADDR, deviceAddress, subAddress, subAddressSize, rxBuff,
230  rxBuffSize);
231 }
232 #endif /* SDK_I2C_BASED_COMPONENT_USED */
233 
234 /* MPU configuration. */
235 void BOARD_ConfigMPU(void)
236 {
237 #if defined(__CC_ARM) || defined(__ARMCC_VERSION)
238  extern uint32_t Image$$RW_m_ncache$$Base[];
239  /* RW_m_ncache_unused is a auxiliary region which is used to get the whole size of noncache section */
240  extern uint32_t Image$$RW_m_ncache_unused$$Base[];
241  extern uint32_t Image$$RW_m_ncache_unused$$ZI$$Limit[];
242  uint32_t nonCacheStart = (uint32_t)Image$$RW_m_ncache$$Base;
243  uint32_t size = ((uint32_t)Image$$RW_m_ncache_unused$$Base == nonCacheStart) ?
244  0 :
245  ((uint32_t)Image$$RW_m_ncache_unused$$ZI$$Limit - nonCacheStart);
246 #elif defined(__MCUXPRESSO)
247  extern uint32_t __base_NCACHE_REGION;
248  extern uint32_t __top_NCACHE_REGION;
249  uint32_t nonCacheStart = (uint32_t)(&__base_NCACHE_REGION);
250  uint32_t size = (uint32_t)(&__top_NCACHE_REGION) - nonCacheStart;
251 #elif defined(__ICCARM__) || defined(__GNUC__)
252  extern uint32_t __NCACHE_REGION_START[];
253  extern uint32_t __NCACHE_REGION_SIZE[];
254  uint32_t nonCacheStart = (uint32_t)__NCACHE_REGION_START;
255  uint32_t size = (uint32_t)__NCACHE_REGION_SIZE;
256 #endif
257  uint32_t i = 0;
258 
259  /* Disable I cache and D cache */
260  if (SCB_CCR_IC_Msk == (SCB_CCR_IC_Msk & SCB->CCR))
261  {
263  }
264  if (SCB_CCR_DC_Msk == (SCB_CCR_DC_Msk & SCB->CCR))
265  {
267  }
268 
269  /* Disable MPU */
270  ARM_MPU_Disable();
271 
272  /* MPU configure:
273  * Use ARM_MPU_RASR(DisableExec, AccessPermission, TypeExtField, IsShareable, IsCacheable, IsBufferable,
274  * SubRegionDisable, Size)
275  * API in mpu_armv7.h.
276  * param DisableExec Instruction access (XN) disable bit,0=instruction fetches enabled, 1=instruction fetches
277  * disabled.
278  * param AccessPermission Data access permissions, allows you to configure read/write access for User and
279  * Privileged mode.
280  * Use MACROS defined in mpu_armv7.h:
281  * ARM_MPU_AP_NONE/ARM_MPU_AP_PRIV/ARM_MPU_AP_URO/ARM_MPU_AP_FULL/ARM_MPU_AP_PRO/ARM_MPU_AP_RO
282  * Combine TypeExtField/IsShareable/IsCacheable/IsBufferable to configure MPU memory access attributes.
283  * TypeExtField IsShareable IsCacheable IsBufferable Memory Attribtue Shareability Cache
284  * 0 x 0 0 Strongly Ordered shareable
285  * 0 x 0 1 Device shareable
286  * 0 0 1 0 Normal not shareable Outer and inner write
287  * through no write allocate
288  * 0 0 1 1 Normal not shareable Outer and inner write
289  * back no write allocate
290  * 0 1 1 0 Normal shareable Outer and inner write
291  * through no write allocate
292  * 0 1 1 1 Normal shareable Outer and inner write
293  * back no write allocate
294  * 1 0 0 0 Normal not shareable outer and inner
295  * noncache
296  * 1 1 0 0 Normal shareable outer and inner
297  * noncache
298  * 1 0 1 1 Normal not shareable outer and inner write
299  * back write/read acllocate
300  * 1 1 1 1 Normal shareable outer and inner write
301  * back write/read acllocate
302  * 2 x 0 0 Device not shareable
303  * Above are normal use settings, if your want to see more details or want to config different inner/outter cache
304  * policy.
305  * please refer to Table 4-55 /4-56 in arm cortex-M7 generic user guide <dui0646b_cortex_m7_dgug.pdf>
306  * param SubRegionDisable Sub-region disable field. 0=sub-region is enabled, 1=sub-region is disabled.
307  * param Size Region size of the region to be configured. use ARM_MPU_REGION_SIZE_xxx MACRO in
308  * mpu_armv7.h.
309  */
310 
311  /*
312  * Add default region to deny access to whole address space to workaround speculative prefetch.
313  * Refer to Arm errata 1013783-B for more details.
314  *
315  */
316  /* Region 0 setting: Instruction access disabled, No data access permission. */
317  MPU->RBAR = ARM_MPU_RBAR(0, 0x00000000U);
318  MPU->RASR = ARM_MPU_RASR(1, ARM_MPU_AP_NONE, 2, 0, 0, 0, 0, ARM_MPU_REGION_SIZE_4GB);
319 
320  /* Region 1 setting: Memory with Device type, not shareable, non-cacheable. */
321  MPU->RBAR = ARM_MPU_RBAR(1, 0x80000000U);
322  MPU->RASR = ARM_MPU_RASR(0, ARM_MPU_AP_FULL, 2, 0, 0, 0, 0, ARM_MPU_REGION_SIZE_512MB);
323 
324  /* Region 2 setting: Memory with Device type, not shareable, non-cacheable. */
325  MPU->RBAR = ARM_MPU_RBAR(2, 0x60000000U);
326  MPU->RASR = ARM_MPU_RASR(0, ARM_MPU_AP_FULL, 2, 0, 0, 0, 0, ARM_MPU_REGION_SIZE_512MB);
327 
328 #if defined(XIP_EXTERNAL_FLASH) && (XIP_EXTERNAL_FLASH == 1)
329  /* Region 3 setting: Memory with Normal type, not shareable, outer/inner write back. */
330  MPU->RBAR = ARM_MPU_RBAR(3, 0x60000000U);
331  MPU->RASR = ARM_MPU_RASR(0, ARM_MPU_AP_RO, 0, 0, 1, 1, 0, ARM_MPU_REGION_SIZE_64MB);
332 #endif
333 
334  /* Region 4 setting: Memory with Device type, not shareable, non-cacheable. */
335  MPU->RBAR = ARM_MPU_RBAR(4, 0x00000000U);
336  MPU->RASR = ARM_MPU_RASR(0, ARM_MPU_AP_FULL, 2, 0, 0, 0, 0, ARM_MPU_REGION_SIZE_1GB);
337 
338  /* Region 5 setting: Memory with Normal type, not shareable, outer/inner write back */
339  MPU->RBAR = ARM_MPU_RBAR(5, 0x00000000U);
340  MPU->RASR = ARM_MPU_RASR(0, ARM_MPU_AP_FULL, 0, 0, 1, 1, 0, ARM_MPU_REGION_SIZE_128KB);
341 
342  /* Region 6 setting: Memory with Normal type, not shareable, outer/inner write back */
343  MPU->RBAR = ARM_MPU_RBAR(6, 0x20000000U);
344  MPU->RASR = ARM_MPU_RASR(0, ARM_MPU_AP_FULL, 0, 0, 1, 1, 0, ARM_MPU_REGION_SIZE_128KB);
345 
346  /* Region 7 setting: Memory with Normal type, not shareable, outer/inner write back */
347  MPU->RBAR = ARM_MPU_RBAR(7, 0x20200000U);
348  MPU->RASR = ARM_MPU_RASR(0, ARM_MPU_AP_FULL, 0, 0, 1, 1, 0, ARM_MPU_REGION_SIZE_256KB);
349 
350  /* Region 8 setting: Memory with Normal type, not shareable, outer/inner write back */
351  MPU->RBAR = ARM_MPU_RBAR(8, 0x80000000U);
352  MPU->RASR = ARM_MPU_RASR(0, ARM_MPU_AP_FULL, 0, 0, 1, 1, 0, ARM_MPU_REGION_SIZE_32MB);
353 
354  while ((size >> i) > 0x1U)
355  {
356  i++;
357  }
358 
359  if (i != 0)
360  {
361  /* The MPU region size should be 2^N, 5<=N<=32, region base should be multiples of size. */
362  assert(!(nonCacheStart % size));
363  assert(size == (uint32_t)(1 << i));
364  assert(i >= 5);
365 
366  /* Region 9 setting: Memory with Normal type, not shareable, non-cacheable */
367  MPU->RBAR = ARM_MPU_RBAR(9, nonCacheStart);
368  MPU->RASR = ARM_MPU_RASR(0, ARM_MPU_AP_FULL, 1, 0, 0, 0, 0, i - 1);
369  }
370 
371  /* Region 10 setting: Memory with Device type, not shareable, non-cacheable */
372  MPU->RBAR = ARM_MPU_RBAR(10, 0x40000000);
373  MPU->RASR = ARM_MPU_RASR(0, ARM_MPU_AP_FULL, 2, 0, 0, 0, 0, ARM_MPU_REGION_SIZE_4MB);
374 
375  /* Enable MPU */
376  ARM_MPU_Enable(MPU_CTRL_PRIVDEFENA_Msk);
377 
378  /* Enable I cache and D cache */
381 }
SCB
#define SCB
Definition: imxrt1050/imxrt1050-evkb/CMSIS/core_cm7.h:1778
fsl_common.h
LPI2C_MasterGetDefaultConfig
void LPI2C_MasterGetDefaultConfig(lpi2c_master_config_t *masterConfig)
Provides a default configuration for the LPI2C master peripheral.
Definition: fsl_lpi2c.c:356
BOARD_InitDebugConsole
void BOARD_InitDebugConsole(void)
Definition: board.c:43
_lpi2c_master_transfer::data
void * data
Definition: fsl_lpi2c.h:228
ARM_MPU_REGION_SIZE_256KB
#define ARM_MPU_REGION_SIZE_256KB
Definition: imxrt1050/imxrt1050-evkb/CMSIS/mpu_armv7.h:47
SCB_DisableICache
__STATIC_FORCEINLINE void SCB_DisableICache(void)
Disable I-Cache.
Definition: imxrt1050/imxrt1050-evkb/CMSIS/core_cm7.h:2262
ARM_MPU_REGION_SIZE_4MB
#define ARM_MPU_REGION_SIZE_4MB
Definition: imxrt1050/imxrt1050-evkb/CMSIS/mpu_armv7.h:51
_lpi2c_master_transfer::subaddress
uint32_t subaddress
Definition: fsl_lpi2c.h:226
NULL
#define NULL
Definition: porcupine/demo/c/dr_libs/tests/external/miniaudio/extras/speex_resampler/thirdparty/resample.c:92
BOARD_CAMERA_I2C_CLOCK_SOURCE_DIVIDER
#define BOARD_CAMERA_I2C_CLOCK_SOURCE_DIVIDER
Definition: board.h:139
ARM_MPU_Disable
__STATIC_INLINE void ARM_MPU_Disable(void)
Definition: imxrt1050/imxrt1050-evkb/CMSIS/mpu_armv7.h:203
ARM_MPU_REGION_SIZE_128KB
#define ARM_MPU_REGION_SIZE_128KB
Definition: imxrt1050/imxrt1050-evkb/CMSIS/mpu_armv7.h:46
kCLOCK_UartMux
@ kCLOCK_UartMux
Definition: fsl_clock.h:681
SCB_CCR_DC_Msk
#define SCB_CCR_DC_Msk
Definition: imxrt1050/imxrt1050-evkb/CMSIS/core_cm7.h:600
_lpi2c_master_transfer::slaveAddress
uint16_t slaveAddress
Definition: fsl_lpi2c.h:224
SCB_DisableDCache
__STATIC_FORCEINLINE void SCB_DisableDCache(void)
Disable D-Cache.
Definition: imxrt1050/imxrt1050-evkb/CMSIS/core_cm7.h:2365
CLOCK_GetPllFreq
uint32_t CLOCK_GetPllFreq(clock_pll_t pll)
Get current PLL output frequency.
Definition: fsl_clock.c:857
_lpi2c_master_config
Structure with settings to initialize the LPI2C master module.
Definition: fsl_lpi2c.h:137
BOARD_ACCEL_I2C_CLOCK_FREQ
#define BOARD_ACCEL_I2C_CLOCK_FREQ
Definition: board.h:129
SCB_EnableICache
__STATIC_FORCEINLINE void SCB_EnableICache(void)
Enable I-Cache.
Definition: imxrt1050/imxrt1050-evkb/CMSIS/core_cm7.h:2241
BOARD_CODEC_I2C_CLOCK_FREQ
#define BOARD_CODEC_I2C_CLOCK_FREQ
Definition: board.h:135
ARM_MPU_RBAR
#define ARM_MPU_RBAR(Region, BaseAddress)
Definition: imxrt1050/imxrt1050-evkb/CMSIS/mpu_armv7.h:75
ARM_MPU_REGION_SIZE_1GB
#define ARM_MPU_REGION_SIZE_1GB
Definition: imxrt1050/imxrt1050-evkb/CMSIS/mpu_armv7.h:59
ARM_MPU_RASR
#define ARM_MPU_RASR(DisableExec, AccessPermission, TypeExtField, IsShareable, IsCacheable, IsBufferable, SubRegionDisable, Size)
Definition: imxrt1050/imxrt1050-evkb/CMSIS/mpu_armv7.h:123
kLPI2C_Read
@ kLPI2C_Read
Definition: fsl_lpi2c.h:95
BOARD_CAMERA_I2C_CLOCK_SOURCE_SELECT
#define BOARD_CAMERA_I2C_CLOCK_SOURCE_SELECT
Definition: board.h:140
kLPI2C_Write
@ kLPI2C_Write
Definition: fsl_lpi2c.h:94
BOARD_ACCEL_I2C_BASEADDR
#define BOARD_ACCEL_I2C_BASEADDR
Definition: board.h:124
BOARD_CAMERA_I2C_BASEADDR
#define BOARD_CAMERA_I2C_BASEADDR
Definition: board.h:138
CLOCK_GetMux
static uint32_t CLOCK_GetMux(clock_mux_t mux)
Get CCM MUX value.
Definition: fsl_clock.h:995
CLOCK_SetMux
static void CLOCK_SetMux(clock_mux_t mux, uint32_t value)
Set CCM MUX node to certain value.
Definition: fsl_clock.h:969
_lpi2c_master_transfer::direction
lpi2c_direction_t direction
Definition: fsl_lpi2c.h:225
CLOCK_GetDiv
static uint32_t CLOCK_GetDiv(clock_div_t divider)
Get CCM DIV node value.
Definition: fsl_clock.h:1031
DbgConsole_Init
status_t DbgConsole_Init(uint8_t instance, uint32_t baudRate, serial_port_type_t device, uint32_t clkSrcFreq)
Initializes the peripheral used for debug messages.
Definition: fsl_debug_console.c:670
BOARD_DEBUG_UART_INSTANCE
#define BOARD_DEBUG_UART_INSTANCE
Definition: board.h:25
ARM_MPU_AP_RO
#define ARM_MPU_AP_RO
Definition: imxrt1050/imxrt1050-evkb/CMSIS/mpu_armv7.h:68
BOARD_CODEC_I2C_BASEADDR
#define BOARD_CODEC_I2C_BASEADDR
Definition: board.h:131
SCB_CCR_IC_Msk
#define SCB_CCR_IC_Msk
Definition: imxrt1050/imxrt1050-evkb/CMSIS/core_cm7.h:597
ARM_MPU_AP_NONE
#define ARM_MPU_AP_NONE
Definition: imxrt1050/imxrt1050-evkb/CMSIS/mpu_armv7.h:63
ARM_MPU_AP_FULL
#define ARM_MPU_AP_FULL
Definition: imxrt1050/imxrt1050-evkb/CMSIS/mpu_armv7.h:66
BOARD_CAMERA_I2C_CLOCK_FREQ
#define BOARD_CAMERA_I2C_CLOCK_FREQ
Definition: board.h:141
LPI2C_Type
Definition: MIMXRT1052.h:25094
CLOCK_SetDiv
static void CLOCK_SetDiv(clock_div_t divider, uint32_t value)
Set CCM DIV node to certain value.
Definition: fsl_clock.h:1006
BOARD_DEBUG_UART_TYPE
#define BOARD_DEBUG_UART_TYPE
Definition: board.h:23
_lpi2c_master_transfer::dataSize
size_t dataSize
Definition: fsl_lpi2c.h:229
SCB_EnableDCache
__STATIC_FORCEINLINE void SCB_EnableDCache(void)
Enable D-Cache.
Definition: imxrt1050/imxrt1050-evkb/CMSIS/core_cm7.h:2325
fsl_debug_console.h
ARM_MPU_REGION_SIZE_64MB
#define ARM_MPU_REGION_SIZE_64MB
Definition: imxrt1050/imxrt1050-evkb/CMSIS/mpu_armv7.h:55
kCLOCK_Lpi2cMux
@ kCLOCK_Lpi2cMux
Definition: fsl_clock.h:695
kCLOCK_UartDiv
@ kCLOCK_UartDiv
Definition: fsl_clock.h:771
BOARD_ConfigMPU
void BOARD_ConfigMPU(void)
Definition: board.c:235
board.h
kCLOCK_Lpi2cDiv
@ kCLOCK_Lpi2cDiv
Definition: fsl_clock.h:827
fsl_lpi2c.h
CLOCK_GetOscFreq
static uint32_t CLOCK_GetOscFreq(void)
Gets the OSC clock frequency.
Definition: fsl_clock.h:1092
kCLOCK_PllUsb1
@ kCLOCK_PllUsb1
Definition: fsl_clock.h:934
kLPI2C_TransferDefaultFlag
@ kLPI2C_TransferDefaultFlag
Definition: fsl_lpi2c.h:209
fsl_iomuxc.h
LPI2C_MasterTransferBlocking
status_t LPI2C_MasterTransferBlocking(LPI2C_Type *base, lpi2c_master_transfer_t *transfer)
Performs a master polling transfer on the I2C bus.
Definition: fsl_lpi2c.c:854
ARM_MPU_REGION_SIZE_32MB
#define ARM_MPU_REGION_SIZE_32MB
Definition: imxrt1050/imxrt1050-evkb/CMSIS/mpu_armv7.h:54
ARM_MPU_REGION_SIZE_512MB
#define ARM_MPU_REGION_SIZE_512MB
Definition: imxrt1050/imxrt1050-evkb/CMSIS/mpu_armv7.h:58
BOARD_DEBUG_UART_BAUDRATE
#define BOARD_DEBUG_UART_BAUDRATE
Definition: board.h:33
LPI2C_MasterInit
void LPI2C_MasterInit(LPI2C_Type *base, const lpi2c_master_config_t *masterConfig, uint32_t sourceClock_Hz)
Initializes the LPI2C master peripheral.
Definition: fsl_lpi2c.c:389
_lpi2c_master_transfer::flags
uint32_t flags
Definition: fsl_lpi2c.h:222
BOARD_DebugConsoleSrcFreq
uint32_t BOARD_DebugConsoleSrcFreq(void)
Definition: board.c:24
ARM_MPU_REGION_SIZE_4GB
#define ARM_MPU_REGION_SIZE_4GB
Definition: imxrt1050/imxrt1050-evkb/CMSIS/mpu_armv7.h:61
status_t
int32_t status_t
Type used for all status and error return values.
Definition: fsl_common.h:189
_lpi2c_master_transfer::subaddressSize
size_t subaddressSize
Definition: fsl_lpi2c.h:227
kStatus_Success
@ kStatus_Success
Definition: fsl_common.h:179
_lpi2c_master_transfer
Non-blocking transfer descriptor structure.
Definition: fsl_lpi2c.h:220
ARM_MPU_Enable
__STATIC_INLINE void ARM_MPU_Enable(uint32_t MPU_Control)
Definition: imxrt1050/imxrt1050-evkb/CMSIS/mpu_armv7.h:191


picovoice_driver
Author(s):
autogenerated on Fri Apr 1 2022 02:13:47