1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
|
//*****************************************************************************
//
// am_reg_iomstr.h
//! @file
//!
//! @brief Register macros for the IOMSTR module
//
//*****************************************************************************
//*****************************************************************************
//
// Copyright (c) 2017, Ambiq Micro
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the copyright holder nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//
// This is part of revision 1.2.11 of the AmbiqSuite Development Package.
//
//*****************************************************************************
#ifndef AM_REG_IOMSTR_H
#define AM_REG_IOMSTR_H
//*****************************************************************************
//
// Instance finder. (6 instance(s) available)
//
//*****************************************************************************
#define AM_REG_IOMSTR_NUM_MODULES 6
#define AM_REG_IOMSTRn(n) \
(REG_IOMSTR_BASEADDR + 0x00001000 * n)
//*****************************************************************************
//
// Register offsets.
//
//*****************************************************************************
#define AM_REG_IOMSTR_FIFO_O 0x00000000
#define AM_REG_IOMSTR_FIFOPTR_O 0x00000100
#define AM_REG_IOMSTR_TLNGTH_O 0x00000104
#define AM_REG_IOMSTR_FIFOTHR_O 0x00000108
#define AM_REG_IOMSTR_CLKCFG_O 0x0000010C
#define AM_REG_IOMSTR_CMD_O 0x00000110
#define AM_REG_IOMSTR_CMDRPT_O 0x00000114
#define AM_REG_IOMSTR_STATUS_O 0x00000118
#define AM_REG_IOMSTR_CFG_O 0x0000011C
#define AM_REG_IOMSTR_INTEN_O 0x00000200
#define AM_REG_IOMSTR_INTSTAT_O 0x00000204
#define AM_REG_IOMSTR_INTCLR_O 0x00000208
#define AM_REG_IOMSTR_INTSET_O 0x0000020C
//*****************************************************************************
//
// IOMSTR_INTEN - IO Master Interrupts: Enable
//
//*****************************************************************************
// This is the arbitration loss interrupt. This error occurs if another master
// collides with an IO Master transfer. Generally, the IOM started an operation
// but found SDA already low.
#define AM_REG_IOMSTR_INTEN_ARB_S 10
#define AM_REG_IOMSTR_INTEN_ARB_M 0x00000400
#define AM_REG_IOMSTR_INTEN_ARB(n) (((uint32_t)(n) << 10) & 0x00000400)
// This is the STOP command interrupt. A STOP bit was detected by the IOM.
#define AM_REG_IOMSTR_INTEN_STOP_S 9
#define AM_REG_IOMSTR_INTEN_STOP_M 0x00000200
#define AM_REG_IOMSTR_INTEN_STOP(n) (((uint32_t)(n) << 9) & 0x00000200)
// This is the START command interrupt. A START from another master was
// detected. Software must wait for a STOP before proceeding.
#define AM_REG_IOMSTR_INTEN_START_S 8
#define AM_REG_IOMSTR_INTEN_START_M 0x00000100
#define AM_REG_IOMSTR_INTEN_START(n) (((uint32_t)(n) << 8) & 0x00000100)
// This is the illegal command interrupt. Software attempted to issue a CMD
// while another CMD was already in progress. Or an attempt was made to issue a
// non-zero-length write CMD with an empty FIFO.
#define AM_REG_IOMSTR_INTEN_ICMD_S 7
#define AM_REG_IOMSTR_INTEN_ICMD_M 0x00000080
#define AM_REG_IOMSTR_INTEN_ICMD(n) (((uint32_t)(n) << 7) & 0x00000080)
// This is the illegal FIFO access interrupt. An attempt was made to read the
// FIFO during a write CMD. Or an attempt was made to write the FIFO on a read
// CMD.
#define AM_REG_IOMSTR_INTEN_IACC_S 6
#define AM_REG_IOMSTR_INTEN_IACC_M 0x00000040
#define AM_REG_IOMSTR_INTEN_IACC(n) (((uint32_t)(n) << 6) & 0x00000040)
// This is the WTLEN interrupt.
#define AM_REG_IOMSTR_INTEN_WTLEN_S 5
#define AM_REG_IOMSTR_INTEN_WTLEN_M 0x00000020
#define AM_REG_IOMSTR_INTEN_WTLEN(n) (((uint32_t)(n) << 5) & 0x00000020)
// This is the I2C NAK interrupt. The expected ACK from the slave was not
// received by the IOM.
#define AM_REG_IOMSTR_INTEN_NAK_S 4
#define AM_REG_IOMSTR_INTEN_NAK_M 0x00000010
#define AM_REG_IOMSTR_INTEN_NAK(n) (((uint32_t)(n) << 4) & 0x00000010)
// This is the Write FIFO Overflow interrupt. An attempt was made to write the
// FIFO while it was full (i.e. while FIFOSIZ > 124).
#define AM_REG_IOMSTR_INTEN_FOVFL_S 3
#define AM_REG_IOMSTR_INTEN_FOVFL_M 0x00000008
#define AM_REG_IOMSTR_INTEN_FOVFL(n) (((uint32_t)(n) << 3) & 0x00000008)
// This is the Read FIFO Underflow interrupt. An attempt was made to read FIFO
// when empty (i.e. while FIFOSIZ less than 4).
#define AM_REG_IOMSTR_INTEN_FUNDFL_S 2
#define AM_REG_IOMSTR_INTEN_FUNDFL_M 0x00000004
#define AM_REG_IOMSTR_INTEN_FUNDFL(n) (((uint32_t)(n) << 2) & 0x00000004)
// This is the FIFO Threshold interrupt.
#define AM_REG_IOMSTR_INTEN_THR_S 1
#define AM_REG_IOMSTR_INTEN_THR_M 0x00000002
#define AM_REG_IOMSTR_INTEN_THR(n) (((uint32_t)(n) << 1) & 0x00000002)
// This is the Command Complete interrupt.
#define AM_REG_IOMSTR_INTEN_CMDCMP_S 0
#define AM_REG_IOMSTR_INTEN_CMDCMP_M 0x00000001
#define AM_REG_IOMSTR_INTEN_CMDCMP(n) (((uint32_t)(n) << 0) & 0x00000001)
//*****************************************************************************
//
// IOMSTR_INTSTAT - IO Master Interrupts: Status
//
//*****************************************************************************
// This is the arbitration loss interrupt. This error occurs if another master
// collides with an IO Master transfer. Generally, the IOM started an operation
// but found SDA already low.
#define AM_REG_IOMSTR_INTSTAT_ARB_S 10
#define AM_REG_IOMSTR_INTSTAT_ARB_M 0x00000400
#define AM_REG_IOMSTR_INTSTAT_ARB(n) (((uint32_t)(n) << 10) & 0x00000400)
// This is the STOP command interrupt. A STOP bit was detected by the IOM.
#define AM_REG_IOMSTR_INTSTAT_STOP_S 9
#define AM_REG_IOMSTR_INTSTAT_STOP_M 0x00000200
#define AM_REG_IOMSTR_INTSTAT_STOP(n) (((uint32_t)(n) << 9) & 0x00000200)
// This is the START command interrupt. A START from another master was
// detected. Software must wait for a STOP before proceeding.
#define AM_REG_IOMSTR_INTSTAT_START_S 8
#define AM_REG_IOMSTR_INTSTAT_START_M 0x00000100
#define AM_REG_IOMSTR_INTSTAT_START(n) (((uint32_t)(n) << 8) & 0x00000100)
// This is the illegal command interrupt. Software attempted to issue a CMD
// while another CMD was already in progress. Or an attempt was made to issue a
// non-zero-length write CMD with an empty FIFO.
#define AM_REG_IOMSTR_INTSTAT_ICMD_S 7
#define AM_REG_IOMSTR_INTSTAT_ICMD_M 0x00000080
#define AM_REG_IOMSTR_INTSTAT_ICMD(n) (((uint32_t)(n) << 7) & 0x00000080)
// This is the illegal FIFO access interrupt. An attempt was made to read the
// FIFO during a write CMD. Or an attempt was made to write the FIFO on a read
// CMD.
#define AM_REG_IOMSTR_INTSTAT_IACC_S 6
#define AM_REG_IOMSTR_INTSTAT_IACC_M 0x00000040
#define AM_REG_IOMSTR_INTSTAT_IACC(n) (((uint32_t)(n) << 6) & 0x00000040)
// This is the WTLEN interrupt.
#define AM_REG_IOMSTR_INTSTAT_WTLEN_S 5
#define AM_REG_IOMSTR_INTSTAT_WTLEN_M 0x00000020
#define AM_REG_IOMSTR_INTSTAT_WTLEN(n) (((uint32_t)(n) << 5) & 0x00000020)
// This is the I2C NAK interrupt. The expected ACK from the slave was not
// received by the IOM.
#define AM_REG_IOMSTR_INTSTAT_NAK_S 4
#define AM_REG_IOMSTR_INTSTAT_NAK_M 0x00000010
#define AM_REG_IOMSTR_INTSTAT_NAK(n) (((uint32_t)(n) << 4) & 0x00000010)
// This is the Write FIFO Overflow interrupt. An attempt was made to write the
// FIFO while it was full (i.e. while FIFOSIZ > 124).
#define AM_REG_IOMSTR_INTSTAT_FOVFL_S 3
#define AM_REG_IOMSTR_INTSTAT_FOVFL_M 0x00000008
#define AM_REG_IOMSTR_INTSTAT_FOVFL(n) (((uint32_t)(n) << 3) & 0x00000008)
// This is the Read FIFO Underflow interrupt. An attempt was made to read FIFO
// when empty (i.e. while FIFOSIZ less than 4).
#define AM_REG_IOMSTR_INTSTAT_FUNDFL_S 2
#define AM_REG_IOMSTR_INTSTAT_FUNDFL_M 0x00000004
#define AM_REG_IOMSTR_INTSTAT_FUNDFL(n) (((uint32_t)(n) << 2) & 0x00000004)
// This is the FIFO Threshold interrupt.
#define AM_REG_IOMSTR_INTSTAT_THR_S 1
#define AM_REG_IOMSTR_INTSTAT_THR_M 0x00000002
#define AM_REG_IOMSTR_INTSTAT_THR(n) (((uint32_t)(n) << 1) & 0x00000002)
// This is the Command Complete interrupt.
#define AM_REG_IOMSTR_INTSTAT_CMDCMP_S 0
#define AM_REG_IOMSTR_INTSTAT_CMDCMP_M 0x00000001
#define AM_REG_IOMSTR_INTSTAT_CMDCMP(n) (((uint32_t)(n) << 0) & 0x00000001)
//*****************************************************************************
//
// IOMSTR_INTCLR - IO Master Interrupts: Clear
//
//*****************************************************************************
// This is the arbitration loss interrupt. This error occurs if another master
// collides with an IO Master transfer. Generally, the IOM started an operation
// but found SDA already low.
#define AM_REG_IOMSTR_INTCLR_ARB_S 10
#define AM_REG_IOMSTR_INTCLR_ARB_M 0x00000400
#define AM_REG_IOMSTR_INTCLR_ARB(n) (((uint32_t)(n) << 10) & 0x00000400)
// This is the STOP command interrupt. A STOP bit was detected by the IOM.
#define AM_REG_IOMSTR_INTCLR_STOP_S 9
#define AM_REG_IOMSTR_INTCLR_STOP_M 0x00000200
#define AM_REG_IOMSTR_INTCLR_STOP(n) (((uint32_t)(n) << 9) & 0x00000200)
// This is the START command interrupt. A START from another master was
// detected. Software must wait for a STOP before proceeding.
#define AM_REG_IOMSTR_INTCLR_START_S 8
#define AM_REG_IOMSTR_INTCLR_START_M 0x00000100
#define AM_REG_IOMSTR_INTCLR_START(n) (((uint32_t)(n) << 8) & 0x00000100)
// This is the illegal command interrupt. Software attempted to issue a CMD
// while another CMD was already in progress. Or an attempt was made to issue a
// non-zero-length write CMD with an empty FIFO.
#define AM_REG_IOMSTR_INTCLR_ICMD_S 7
#define AM_REG_IOMSTR_INTCLR_ICMD_M 0x00000080
#define AM_REG_IOMSTR_INTCLR_ICMD(n) (((uint32_t)(n) << 7) & 0x00000080)
// This is the illegal FIFO access interrupt. An attempt was made to read the
// FIFO during a write CMD. Or an attempt was made to write the FIFO on a read
// CMD.
#define AM_REG_IOMSTR_INTCLR_IACC_S 6
#define AM_REG_IOMSTR_INTCLR_IACC_M 0x00000040
#define AM_REG_IOMSTR_INTCLR_IACC(n) (((uint32_t)(n) << 6) & 0x00000040)
// This is the WTLEN interrupt.
#define AM_REG_IOMSTR_INTCLR_WTLEN_S 5
#define AM_REG_IOMSTR_INTCLR_WTLEN_M 0x00000020
#define AM_REG_IOMSTR_INTCLR_WTLEN(n) (((uint32_t)(n) << 5) & 0x00000020)
// This is the I2C NAK interrupt. The expected ACK from the slave was not
// received by the IOM.
#define AM_REG_IOMSTR_INTCLR_NAK_S 4
#define AM_REG_IOMSTR_INTCLR_NAK_M 0x00000010
#define AM_REG_IOMSTR_INTCLR_NAK(n) (((uint32_t)(n) << 4) & 0x00000010)
// This is the Write FIFO Overflow interrupt. An attempt was made to write the
// FIFO while it was full (i.e. while FIFOSIZ > 124).
#define AM_REG_IOMSTR_INTCLR_FOVFL_S 3
#define AM_REG_IOMSTR_INTCLR_FOVFL_M 0x00000008
#define AM_REG_IOMSTR_INTCLR_FOVFL(n) (((uint32_t)(n) << 3) & 0x00000008)
// This is the Read FIFO Underflow interrupt. An attempt was made to read FIFO
// when empty (i.e. while FIFOSIZ less than 4).
#define AM_REG_IOMSTR_INTCLR_FUNDFL_S 2
#define AM_REG_IOMSTR_INTCLR_FUNDFL_M 0x00000004
#define AM_REG_IOMSTR_INTCLR_FUNDFL(n) (((uint32_t)(n) << 2) & 0x00000004)
// This is the FIFO Threshold interrupt.
#define AM_REG_IOMSTR_INTCLR_THR_S 1
#define AM_REG_IOMSTR_INTCLR_THR_M 0x00000002
#define AM_REG_IOMSTR_INTCLR_THR(n) (((uint32_t)(n) << 1) & 0x00000002)
// This is the Command Complete interrupt.
#define AM_REG_IOMSTR_INTCLR_CMDCMP_S 0
#define AM_REG_IOMSTR_INTCLR_CMDCMP_M 0x00000001
#define AM_REG_IOMSTR_INTCLR_CMDCMP(n) (((uint32_t)(n) << 0) & 0x00000001)
//*****************************************************************************
//
// IOMSTR_INTSET - IO Master Interrupts: Set
//
//*****************************************************************************
// This is the arbitration loss interrupt. This error occurs if another master
// collides with an IO Master transfer. Generally, the IOM started an operation
// but found SDA already low.
#define AM_REG_IOMSTR_INTSET_ARB_S 10
#define AM_REG_IOMSTR_INTSET_ARB_M 0x00000400
#define AM_REG_IOMSTR_INTSET_ARB(n) (((uint32_t)(n) << 10) & 0x00000400)
// This is the STOP command interrupt. A STOP bit was detected by the IOM.
#define AM_REG_IOMSTR_INTSET_STOP_S 9
#define AM_REG_IOMSTR_INTSET_STOP_M 0x00000200
#define AM_REG_IOMSTR_INTSET_STOP(n) (((uint32_t)(n) << 9) & 0x00000200)
// This is the START command interrupt. A START from another master was
// detected. Software must wait for a STOP before proceeding.
#define AM_REG_IOMSTR_INTSET_START_S 8
#define AM_REG_IOMSTR_INTSET_START_M 0x00000100
#define AM_REG_IOMSTR_INTSET_START(n) (((uint32_t)(n) << 8) & 0x00000100)
// This is the illegal command interrupt. Software attempted to issue a CMD
// while another CMD was already in progress. Or an attempt was made to issue a
// non-zero-length write CMD with an empty FIFO.
#define AM_REG_IOMSTR_INTSET_ICMD_S 7
#define AM_REG_IOMSTR_INTSET_ICMD_M 0x00000080
#define AM_REG_IOMSTR_INTSET_ICMD(n) (((uint32_t)(n) << 7) & 0x00000080)
// This is the illegal FIFO access interrupt. An attempt was made to read the
// FIFO during a write CMD. Or an attempt was made to write the FIFO on a read
// CMD.
#define AM_REG_IOMSTR_INTSET_IACC_S 6
#define AM_REG_IOMSTR_INTSET_IACC_M 0x00000040
#define AM_REG_IOMSTR_INTSET_IACC(n) (((uint32_t)(n) << 6) & 0x00000040)
// This is the WTLEN interrupt.
#define AM_REG_IOMSTR_INTSET_WTLEN_S 5
#define AM_REG_IOMSTR_INTSET_WTLEN_M 0x00000020
#define AM_REG_IOMSTR_INTSET_WTLEN(n) (((uint32_t)(n) << 5) & 0x00000020)
// This is the I2C NAK interrupt. The expected ACK from the slave was not
// received by the IOM.
#define AM_REG_IOMSTR_INTSET_NAK_S 4
#define AM_REG_IOMSTR_INTSET_NAK_M 0x00000010
#define AM_REG_IOMSTR_INTSET_NAK(n) (((uint32_t)(n) << 4) & 0x00000010)
// This is the Write FIFO Overflow interrupt. An attempt was made to write the
// FIFO while it was full (i.e. while FIFOSIZ > 124).
#define AM_REG_IOMSTR_INTSET_FOVFL_S 3
#define AM_REG_IOMSTR_INTSET_FOVFL_M 0x00000008
#define AM_REG_IOMSTR_INTSET_FOVFL(n) (((uint32_t)(n) << 3) & 0x00000008)
// This is the Read FIFO Underflow interrupt. An attempt was made to read FIFO
// when empty (i.e. while FIFOSIZ less than 4).
#define AM_REG_IOMSTR_INTSET_FUNDFL_S 2
#define AM_REG_IOMSTR_INTSET_FUNDFL_M 0x00000004
#define AM_REG_IOMSTR_INTSET_FUNDFL(n) (((uint32_t)(n) << 2) & 0x00000004)
// This is the FIFO Threshold interrupt.
#define AM_REG_IOMSTR_INTSET_THR_S 1
#define AM_REG_IOMSTR_INTSET_THR_M 0x00000002
#define AM_REG_IOMSTR_INTSET_THR(n) (((uint32_t)(n) << 1) & 0x00000002)
// This is the Command Complete interrupt.
#define AM_REG_IOMSTR_INTSET_CMDCMP_S 0
#define AM_REG_IOMSTR_INTSET_CMDCMP_M 0x00000001
#define AM_REG_IOMSTR_INTSET_CMDCMP(n) (((uint32_t)(n) << 0) & 0x00000001)
//*****************************************************************************
//
// IOMSTR_FIFO - FIFO Access Port
//
//*****************************************************************************
// FIFO access port.
#define AM_REG_IOMSTR_FIFO_FIFO_S 0
#define AM_REG_IOMSTR_FIFO_FIFO_M 0xFFFFFFFF
#define AM_REG_IOMSTR_FIFO_FIFO(n) (((uint32_t)(n) << 0) & 0xFFFFFFFF)
//*****************************************************************************
//
// IOMSTR_FIFOPTR - Current FIFO Pointers
//
//*****************************************************************************
// The number of bytes remaining in the FIFO (i.e. 128-FIFOSIZ if FULLDUP = 0 or
// 64-FIFOSIZ if FULLDUP = 1)).
#define AM_REG_IOMSTR_FIFOPTR_FIFOREM_S 16
#define AM_REG_IOMSTR_FIFOPTR_FIFOREM_M 0x00FF0000
#define AM_REG_IOMSTR_FIFOPTR_FIFOREM(n) (((uint32_t)(n) << 16) & 0x00FF0000)
// The number of bytes currently in the FIFO.
#define AM_REG_IOMSTR_FIFOPTR_FIFOSIZ_S 0
#define AM_REG_IOMSTR_FIFOPTR_FIFOSIZ_M 0x000000FF
#define AM_REG_IOMSTR_FIFOPTR_FIFOSIZ(n) (((uint32_t)(n) << 0) & 0x000000FF)
//*****************************************************************************
//
// IOMSTR_TLNGTH - Transfer Length
//
//*****************************************************************************
// Remaining transfer length.
#define AM_REG_IOMSTR_TLNGTH_TLNGTH_S 0
#define AM_REG_IOMSTR_TLNGTH_TLNGTH_M 0x00000FFF
#define AM_REG_IOMSTR_TLNGTH_TLNGTH(n) (((uint32_t)(n) << 0) & 0x00000FFF)
//*****************************************************************************
//
// IOMSTR_FIFOTHR - FIFO Threshold Configuration
//
//*****************************************************************************
// FIFO write threshold.
#define AM_REG_IOMSTR_FIFOTHR_FIFOWTHR_S 8
#define AM_REG_IOMSTR_FIFOTHR_FIFOWTHR_M 0x00007F00
#define AM_REG_IOMSTR_FIFOTHR_FIFOWTHR(n) (((uint32_t)(n) << 8) & 0x00007F00)
// FIFO read threshold.
#define AM_REG_IOMSTR_FIFOTHR_FIFORTHR_S 0
#define AM_REG_IOMSTR_FIFOTHR_FIFORTHR_M 0x0000007F
#define AM_REG_IOMSTR_FIFOTHR_FIFORTHR(n) (((uint32_t)(n) << 0) & 0x0000007F)
//*****************************************************************************
//
// IOMSTR_CLKCFG - I/O Clock Configuration
//
//*****************************************************************************
// Clock total count minus 1.
#define AM_REG_IOMSTR_CLKCFG_TOTPER_S 24
#define AM_REG_IOMSTR_CLKCFG_TOTPER_M 0xFF000000
#define AM_REG_IOMSTR_CLKCFG_TOTPER(n) (((uint32_t)(n) << 24) & 0xFF000000)
// Clock low count minus 1.
#define AM_REG_IOMSTR_CLKCFG_LOWPER_S 16
#define AM_REG_IOMSTR_CLKCFG_LOWPER_M 0x00FF0000
#define AM_REG_IOMSTR_CLKCFG_LOWPER(n) (((uint32_t)(n) << 16) & 0x00FF0000)
// Enable clock division by TOTPER.
#define AM_REG_IOMSTR_CLKCFG_DIVEN_S 12
#define AM_REG_IOMSTR_CLKCFG_DIVEN_M 0x00001000
#define AM_REG_IOMSTR_CLKCFG_DIVEN(n) (((uint32_t)(n) << 12) & 0x00001000)
#define AM_REG_IOMSTR_CLKCFG_DIVEN_DIS 0x00000000
#define AM_REG_IOMSTR_CLKCFG_DIVEN_EN 0x00001000
// Enable divide by 3.
#define AM_REG_IOMSTR_CLKCFG_DIV3_S 11
#define AM_REG_IOMSTR_CLKCFG_DIV3_M 0x00000800
#define AM_REG_IOMSTR_CLKCFG_DIV3(n) (((uint32_t)(n) << 11) & 0x00000800)
#define AM_REG_IOMSTR_CLKCFG_DIV3_DIS 0x00000000
#define AM_REG_IOMSTR_CLKCFG_DIV3_EN 0x00000800
// Select the input clock frequency.
#define AM_REG_IOMSTR_CLKCFG_FSEL_S 8
#define AM_REG_IOMSTR_CLKCFG_FSEL_M 0x00000700
#define AM_REG_IOMSTR_CLKCFG_FSEL(n) (((uint32_t)(n) << 8) & 0x00000700)
#define AM_REG_IOMSTR_CLKCFG_FSEL_MIN_PWR 0x00000000
#define AM_REG_IOMSTR_CLKCFG_FSEL_HFRC 0x00000100
#define AM_REG_IOMSTR_CLKCFG_FSEL_HFRC_DIV2 0x00000200
#define AM_REG_IOMSTR_CLKCFG_FSEL_HFRC_DIV4 0x00000300
#define AM_REG_IOMSTR_CLKCFG_FSEL_HFRC_DIV8 0x00000400
#define AM_REG_IOMSTR_CLKCFG_FSEL_HFRC_DIV16 0x00000500
#define AM_REG_IOMSTR_CLKCFG_FSEL_HFRC_DIV32 0x00000600
#define AM_REG_IOMSTR_CLKCFG_FSEL_HFRC_DIV64 0x00000700
//*****************************************************************************
//
// IOMSTR_CMD - Command Register
//
//*****************************************************************************
// This register holds the I/O Command
#define AM_REG_IOMSTR_CMD_CMD_S 0
#define AM_REG_IOMSTR_CMD_CMD_M 0xFFFFFFFF
#define AM_REG_IOMSTR_CMD_CMD(n) (((uint32_t)(n) << 0) & 0xFFFFFFFF)
//*****************************************************************************
//
// IOMSTR_CMDRPT - Command Repeat Register
//
//*****************************************************************************
// These bits hold the Command repeat count.
#define AM_REG_IOMSTR_CMDRPT_CMDRPT_S 0
#define AM_REG_IOMSTR_CMDRPT_CMDRPT_M 0x0000001F
#define AM_REG_IOMSTR_CMDRPT_CMDRPT(n) (((uint32_t)(n) << 0) & 0x0000001F)
//*****************************************************************************
//
// IOMSTR_STATUS - Status Register
//
//*****************************************************************************
// This bit indicates if the I/O state machine is IDLE.
#define AM_REG_IOMSTR_STATUS_IDLEST_S 2
#define AM_REG_IOMSTR_STATUS_IDLEST_M 0x00000004
#define AM_REG_IOMSTR_STATUS_IDLEST(n) (((uint32_t)(n) << 2) & 0x00000004)
#define AM_REG_IOMSTR_STATUS_IDLEST_IDLE 0x00000004
// This bit indicates if the I/O Command is active.
#define AM_REG_IOMSTR_STATUS_CMDACT_S 1
#define AM_REG_IOMSTR_STATUS_CMDACT_M 0x00000002
#define AM_REG_IOMSTR_STATUS_CMDACT(n) (((uint32_t)(n) << 1) & 0x00000002)
#define AM_REG_IOMSTR_STATUS_CMDACT_ACTIVE 0x00000002
// This bit indicates if an error interrupt has occurred.
#define AM_REG_IOMSTR_STATUS_ERR_S 0
#define AM_REG_IOMSTR_STATUS_ERR_M 0x00000001
#define AM_REG_IOMSTR_STATUS_ERR(n) (((uint32_t)(n) << 0) & 0x00000001)
#define AM_REG_IOMSTR_STATUS_ERR_ERROR 0x00000001
//*****************************************************************************
//
// IOMSTR_CFG - I/O Master Configuration
//
//*****************************************************************************
// This bit enables the IO Master.
#define AM_REG_IOMSTR_CFG_IFCEN_S 31
#define AM_REG_IOMSTR_CFG_IFCEN_M 0x80000000
#define AM_REG_IOMSTR_CFG_IFCEN(n) (((uint32_t)(n) << 31) & 0x80000000)
#define AM_REG_IOMSTR_CFG_IFCEN_DIS 0x00000000
#define AM_REG_IOMSTR_CFG_IFCEN_EN 0x80000000
// This bit selects the read flow control signal polarity.
#define AM_REG_IOMSTR_CFG_RDFCPOL_S 14
#define AM_REG_IOMSTR_CFG_RDFCPOL_M 0x00004000
#define AM_REG_IOMSTR_CFG_RDFCPOL(n) (((uint32_t)(n) << 14) & 0x00004000)
#define AM_REG_IOMSTR_CFG_RDFCPOL_HIGH 0x00000000
#define AM_REG_IOMSTR_CFG_RDFCPOL_LOW 0x00004000
// This bit selects the write flow control signal polarity.
#define AM_REG_IOMSTR_CFG_WTFCPOL_S 13
#define AM_REG_IOMSTR_CFG_WTFCPOL_M 0x00002000
#define AM_REG_IOMSTR_CFG_WTFCPOL(n) (((uint32_t)(n) << 13) & 0x00002000)
#define AM_REG_IOMSTR_CFG_WTFCPOL_HIGH 0x00000000
#define AM_REG_IOMSTR_CFG_WTFCPOL_LOW 0x00002000
// This bit selects the write mode flow control signal.
#define AM_REG_IOMSTR_CFG_WTFCIRQ_S 12
#define AM_REG_IOMSTR_CFG_WTFCIRQ_M 0x00001000
#define AM_REG_IOMSTR_CFG_WTFCIRQ(n) (((uint32_t)(n) << 12) & 0x00001000)
#define AM_REG_IOMSTR_CFG_WTFCIRQ_MISO 0x00000000
#define AM_REG_IOMSTR_CFG_WTFCIRQ_IRQ 0x00001000
// This bit must be left at the default value of 0.
#define AM_REG_IOMSTR_CFG_FCDEL_S 11
#define AM_REG_IOMSTR_CFG_FCDEL_M 0x00000800
#define AM_REG_IOMSTR_CFG_FCDEL(n) (((uint32_t)(n) << 11) & 0x00000800)
// This bit invewrts MOSI when flow control is enabled.
#define AM_REG_IOMSTR_CFG_MOSIINV_S 10
#define AM_REG_IOMSTR_CFG_MOSIINV_M 0x00000400
#define AM_REG_IOMSTR_CFG_MOSIINV(n) (((uint32_t)(n) << 10) & 0x00000400)
#define AM_REG_IOMSTR_CFG_MOSIINV_NORMAL 0x00000000
#define AM_REG_IOMSTR_CFG_MOSIINV_INVERT 0x00000400
// This bit enables read mode flow control.
#define AM_REG_IOMSTR_CFG_RDFC_S 9
#define AM_REG_IOMSTR_CFG_RDFC_M 0x00000200
#define AM_REG_IOMSTR_CFG_RDFC(n) (((uint32_t)(n) << 9) & 0x00000200)
#define AM_REG_IOMSTR_CFG_RDFC_DIS 0x00000000
#define AM_REG_IOMSTR_CFG_RDFC_EN 0x00000200
// This bit enables write mode flow control.
#define AM_REG_IOMSTR_CFG_WTFC_S 8
#define AM_REG_IOMSTR_CFG_WTFC_M 0x00000100
#define AM_REG_IOMSTR_CFG_WTFC(n) (((uint32_t)(n) << 8) & 0x00000100)
#define AM_REG_IOMSTR_CFG_WTFC_DIS 0x00000000
#define AM_REG_IOMSTR_CFG_WTFC_EN 0x00000100
// This bit selects the preread timing.
#define AM_REG_IOMSTR_CFG_STARTRD_S 4
#define AM_REG_IOMSTR_CFG_STARTRD_M 0x00000030
#define AM_REG_IOMSTR_CFG_STARTRD(n) (((uint32_t)(n) << 4) & 0x00000030)
#define AM_REG_IOMSTR_CFG_STARTRD_PRERD0 0x00000000
#define AM_REG_IOMSTR_CFG_STARTRD_PRERD1 0x00000010
#define AM_REG_IOMSTR_CFG_STARTRD_PRERD2 0x00000020
#define AM_REG_IOMSTR_CFG_STARTRD_PRERD3 0x00000030
// This bit selects full duplex mode.
#define AM_REG_IOMSTR_CFG_FULLDUP_S 3
#define AM_REG_IOMSTR_CFG_FULLDUP_M 0x00000008
#define AM_REG_IOMSTR_CFG_FULLDUP(n) (((uint32_t)(n) << 3) & 0x00000008)
#define AM_REG_IOMSTR_CFG_FULLDUP_NORMAL 0x00000000
#define AM_REG_IOMSTR_CFG_FULLDUP_FULLDUP 0x00000008
// This bit selects SPI phase.
#define AM_REG_IOMSTR_CFG_SPHA_S 2
#define AM_REG_IOMSTR_CFG_SPHA_M 0x00000004
#define AM_REG_IOMSTR_CFG_SPHA(n) (((uint32_t)(n) << 2) & 0x00000004)
#define AM_REG_IOMSTR_CFG_SPHA_SAMPLE_LEADING_EDGE 0x00000000
#define AM_REG_IOMSTR_CFG_SPHA_SAMPLE_TRAILING_EDGE 0x00000004
// This bit selects SPI polarity.
#define AM_REG_IOMSTR_CFG_SPOL_S 1
#define AM_REG_IOMSTR_CFG_SPOL_M 0x00000002
#define AM_REG_IOMSTR_CFG_SPOL(n) (((uint32_t)(n) << 1) & 0x00000002)
#define AM_REG_IOMSTR_CFG_SPOL_CLK_BASE_0 0x00000000
#define AM_REG_IOMSTR_CFG_SPOL_CLK_BASE_1 0x00000002
// This bit selects the I/O interface.
#define AM_REG_IOMSTR_CFG_IFCSEL_S 0
#define AM_REG_IOMSTR_CFG_IFCSEL_M 0x00000001
#define AM_REG_IOMSTR_CFG_IFCSEL(n) (((uint32_t)(n) << 0) & 0x00000001)
#define AM_REG_IOMSTR_CFG_IFCSEL_I2C 0x00000000
#define AM_REG_IOMSTR_CFG_IFCSEL_SPI 0x00000001
#endif // AM_REG_IOMSTR_H
|