39 #ifndef LIBBSP_ARM_TMS570_ADC 40 #define LIBBSP_ARM_TMS570_ADC 100 uint32_t MAGINT2MASK;
102 uint32_t MAGINT3MASK;
103 uint8_t reserved1 [24];
104 uint32_t MAGTHRINTENASET;
105 uint32_t MAGTHRINTENACLR;
106 uint32_t MAGTHRINTFLG;
107 uint32_t MAGTHRINTOFFSET;
108 uint32_t GxFIFORESETCR[3];
109 uint32_t EVRAMWRADDR;
110 uint32_t G1RAMWRADDR;
111 uint32_t G2RAMWRADDR;
114 uint32_t PWRUPDLYCTRL;
120 #define TMS570_ADC_BUFx_G2_EMPTY_10bit_mode BSP_BIT32(15) 123 #define TMS570_ADC_BUFx_G2_CHID_10bit_mode(val) BSP_FLD32(val,10, 14) 124 #define TMS570_ADC_BUFx_G2_CHID_10bit_mode_GET(reg) BSP_FLD32GET(reg,10, 14) 125 #define TMS570_ADC_BUFx_G2_CHID_10bit_mode_SET(reg,val) BSP_FLD32SET(reg, val,10, 14) 128 #define TMS570_ADC_BUFx_G2_DR_10bit_mode(val) BSP_FLD32(val,0, 9) 129 #define TMS570_ADC_BUFx_G2_DR_10bit_mode_GET(reg) BSP_FLD32GET(reg,0, 9) 130 #define TMS570_ADC_BUFx_G2_DR_10bit_mode_SET(reg,val) BSP_FLD32SET(reg, val,0, 9) 133 #define TMS570_ADC_BUFx_G2_EMPTY_12bit_mode BSP_BIT32(31) 136 #define TMS570_ADC_BUFx_G2_CHID_12bit_mode(val) BSP_FLD32(val,16, 20) 137 #define TMS570_ADC_BUFx_G2_CHID_12bit_mode_GET(reg) BSP_FLD32GET(reg,16, 20) 138 #define TMS570_ADC_BUFx_G2_CHID_12bit_mode_SET(reg,val) BSP_FLD32SET(reg, val,16, 20) 141 #define TMS570_ADC_BUFx_G2_DR_12bit_mode(val) BSP_FLD32(val,0, 11) 142 #define TMS570_ADC_BUFx_G2_DR_12bit_mode_GET(reg) BSP_FLD32GET(reg,0, 11) 143 #define TMS570_ADC_BUFx_G2_DR_12bit_mode_SET(reg,val) BSP_FLD32SET(reg, val,0, 11) 148 #define TMS570_ADC_RSTCR_RESET BSP_BIT32(0) 153 #define TMS570_ADC_OPMODECR_10_12_BIT BSP_BIT32(31) 158 #define TMS570_ADC_CLOCKCR_PS(val) BSP_FLD32(val,0, 4) 159 #define TMS570_ADC_CLOCKCR_PS_GET(reg) BSP_FLD32GET(reg,0, 4) 160 #define TMS570_ADC_CLOCKCR_PS_SET(reg,val) BSP_FLD32SET(reg, val,0, 4) 165 #define TMS570_ADC_CALCR_SELF_TEST BSP_BIT32(24) 168 #define TMS570_ADC_CALCR_CAL_ST BSP_BIT32(16) 171 #define TMS570_ADC_CALCR_BRIDGE_EN BSP_BIT32(9) 174 #define TMS570_ADC_CALCR_HILO BSP_BIT32(8) 177 #define TMS570_ADC_CALCR_CAL_EN BSP_BIT32(0) 182 #define TMS570_ADC_GxMODECR_No_Reset_on_ChnSel BSP_BIT32(16) 185 #define TMS570_ADC_GxMODECR_EV_DATA_FMT(val) BSP_FLD32(val,8, 9) 186 #define TMS570_ADC_GxMODECR_EV_DATA_FMT_GET(reg) BSP_FLD32GET(reg,8, 9) 187 #define TMS570_ADC_GxMODECR_EV_DATA_FMT_SET(reg,val) BSP_FLD32SET(reg, val,8, 9) 192 #define TMS570_ADC_EVSRC_EV_EDG_BOTH BSP_BIT32(4) 195 #define TMS570_ADC_EVSRC_EV_EDG_SEL BSP_BIT32(3) 198 #define TMS570_ADC_EVSRC_EV_SRC(val) BSP_FLD32(val,0, 2) 199 #define TMS570_ADC_EVSRC_EV_SRC_GET(reg) BSP_FLD32GET(reg,0, 2) 200 #define TMS570_ADC_EVSRC_EV_SRC_SET(reg,val) BSP_FLD32SET(reg, val,0, 2) 205 #define TMS570_ADC_G1SRC_GI_EDG_BOTH BSP_BIT32(4) 208 #define TMS570_ADC_G1SRC_G1_EDG_SEL BSP_BIT32(3) 211 #define TMS570_ADC_G1SRC_G1_SRC(val) BSP_FLD32(val,0, 2) 212 #define TMS570_ADC_G1SRC_G1_SRC_GET(reg) BSP_FLD32GET(reg,0, 2) 213 #define TMS570_ADC_G1SRC_G1_SRC_SET(reg,val) BSP_FLD32SET(reg, val,0, 2) 218 #define TMS570_ADC_G2SRC_G2_EDG_BOTH BSP_BIT32(4) 221 #define TMS570_ADC_G2SRC_G2_EDG_SEL BSP_BIT32(3) 224 #define TMS570_ADC_G2SRC_G2_SRC(val) BSP_FLD32(val,0, 2) 225 #define TMS570_ADC_G2SRC_G2_SRC_GET(reg) BSP_FLD32GET(reg,0, 2) 226 #define TMS570_ADC_G2SRC_G2_SRC_SET(reg,val) BSP_FLD32SET(reg, val,0, 2) 231 #define TMS570_ADC_GxINTENA_EV_END_INT_EN BSP_BIT32(3) 234 #define TMS570_ADC_GxINTENA_EV_OVR_INT_EN BSP_BIT32(1) 237 #define TMS570_ADC_GxINTENA_EV_THR_INT_EN BSP_BIT32(0) 242 #define TMS570_ADC_GxINTFLG_EV_END BSP_BIT32(3) 245 #define TMS570_ADC_GxINTFLG_EV_MEM_EMPTY BSP_BIT32(2) 248 #define TMS570_ADC_GxINTFLG_EV_MEM_OVERRUN BSP_BIT32(1) 251 #define TMS570_ADC_GxINTFLG_EV_THR_INT_FLG BSP_BIT32(0) 256 #define TMS570_ADC_GxINTCR_Sign_Extension(val) BSP_FLD32(val,9, 15) 257 #define TMS570_ADC_GxINTCR_Sign_Extension_GET(reg) BSP_FLD32GET(reg,9, 15) 258 #define TMS570_ADC_GxINTCR_Sign_Extension_SET(reg,val) BSP_FLD32SET(reg, val,9, 15) 261 #define TMS570_ADC_GxINTCR_EV_THR(val) BSP_FLD32(val,0, 8) 262 #define TMS570_ADC_GxINTCR_EV_THR_GET(reg) BSP_FLD32GET(reg,0, 8) 263 #define TMS570_ADC_GxINTCR_EV_THR_SET(reg,val) BSP_FLD32SET(reg, val,0, 8) 268 #define TMS570_ADC_EVDMACR_EV_BLOCKS(val) BSP_FLD32(val,16, 24) 269 #define TMS570_ADC_EVDMACR_EV_BLOCKS_GET(reg) BSP_FLD32GET(reg,16, 24) 270 #define TMS570_ADC_EVDMACR_EV_BLOCKS_SET(reg,val) BSP_FLD32SET(reg, val,16, 24) 273 #define TMS570_ADC_EVDMACR_DMA_EV_END BSP_BIT32(3) 276 #define TMS570_ADC_EVDMACR_EV_BLK_XFER BSP_BIT32(2) 279 #define TMS570_ADC_EVDMACR_EV_DMA_EN BSP_BIT32(0) 284 #define TMS570_ADC_G1DMACR_G1_BLOCKS(val) BSP_FLD32(val,16, 24) 285 #define TMS570_ADC_G1DMACR_G1_BLOCKS_GET(reg) BSP_FLD32GET(reg,16, 24) 286 #define TMS570_ADC_G1DMACR_G1_BLOCKS_SET(reg,val) BSP_FLD32SET(reg, val,16, 24) 289 #define TMS570_ADC_G1DMACR_DMA_G1_END BSP_BIT32(3) 292 #define TMS570_ADC_G1DMACR_G1_BLK_XFER BSP_BIT32(2) 295 #define TMS570_ADC_G1DMACR_G1_DMA_EN BSP_BIT32(0) 300 #define TMS570_ADC_G2DMACR_G2_BLOCKS(val) BSP_FLD32(val,16, 24) 301 #define TMS570_ADC_G2DMACR_G2_BLOCKS_GET(reg) BSP_FLD32GET(reg,16, 24) 302 #define TMS570_ADC_G2DMACR_G2_BLOCKS_SET(reg,val) BSP_FLD32SET(reg, val,16, 24) 305 #define TMS570_ADC_G2DMACR_DMA_G2_END BSP_BIT32(3) 308 #define TMS570_ADC_G2DMACR_G2_BLK_XFER BSP_BIT32(2) 311 #define TMS570_ADC_G2DMACR_G2_DMA_EN BSP_BIT32(0) 316 #define TMS570_ADC_BNDCR_BNDA(val) BSP_FLD32(val,16, 24) 317 #define TMS570_ADC_BNDCR_BNDA_GET(reg) BSP_FLD32GET(reg,16, 24) 318 #define TMS570_ADC_BNDCR_BNDA_SET(reg,val) BSP_FLD32SET(reg, val,16, 24) 321 #define TMS570_ADC_BNDCR_BNDB(val) BSP_FLD32(val,0, 8) 322 #define TMS570_ADC_BNDCR_BNDB_GET(reg) BSP_FLD32GET(reg,0, 8) 323 #define TMS570_ADC_BNDCR_BNDB_SET(reg,val) BSP_FLD32SET(reg, val,0, 8) 328 #define TMS570_ADC_BNDEND_BUF_INIT_ACTIVE BSP_BIT32(16) 331 #define TMS570_ADC_BNDEND_BNDEND(val) BSP_FLD32(val,0, 2) 332 #define TMS570_ADC_BNDEND_BNDEND_GET(reg) BSP_FLD32GET(reg,0, 2) 333 #define TMS570_ADC_BNDEND_BNDEND_SET(reg,val) BSP_FLD32SET(reg, val,0, 2) 338 #define TMS570_ADC_EVSAMP_EV_ACQ(val) BSP_FLD32(val,0, 11) 339 #define TMS570_ADC_EVSAMP_EV_ACQ_GET(reg) BSP_FLD32GET(reg,0, 11) 340 #define TMS570_ADC_EVSAMP_EV_ACQ_SET(reg,val) BSP_FLD32SET(reg, val,0, 11) 345 #define TMS570_ADC_G1SAMP_G1_ACQ(val) BSP_FLD32(val,0, 11) 346 #define TMS570_ADC_G1SAMP_G1_ACQ_GET(reg) BSP_FLD32GET(reg,0, 11) 347 #define TMS570_ADC_G1SAMP_G1_ACQ_SET(reg,val) BSP_FLD32SET(reg, val,0, 11) 352 #define TMS570_ADC_G2SAMP_G2_ACQ(val) BSP_FLD32(val,0, 11) 353 #define TMS570_ADC_G2SAMP_G2_ACQ_GET(reg) BSP_FLD32GET(reg,0, 11) 354 #define TMS570_ADC_G2SAMP_G2_ACQ_SET(reg,val) BSP_FLD32SET(reg, val,0, 11) 359 #define TMS570_ADC_EVSR_EV_MEM_EMPTY BSP_BIT32(3) 362 #define TMS570_ADC_EVSR_EV_BUSY BSP_BIT32(2) 365 #define TMS570_ADC_EVSR_EV_STOP BSP_BIT32(1) 368 #define TMS570_ADC_EVSR_EV_END BSP_BIT32(0) 373 #define TMS570_ADC_G1SR_G1_MEM_EMPTY BSP_BIT32(3) 376 #define TMS570_ADC_G1SR_G1_BUSY BSP_BIT32(2) 379 #define TMS570_ADC_G1SR_G1_STOP BSP_BIT32(1) 382 #define TMS570_ADC_G1SR_G1_END BSP_BIT32(0) 387 #define TMS570_ADC_G2SR_G2_MEM_EMPTY BSP_BIT32(3) 390 #define TMS570_ADC_G2SR_G2_BUSY BSP_BIT32(2) 393 #define TMS570_ADC_G2SR_G2_STOP BSP_BIT32(1) 396 #define TMS570_ADC_G2SR_G2_END BSP_BIT32(0) 401 #define TMS570_ADC_GxSEL_EV_SEL(val) BSP_FLD32(val,0, 15) 402 #define TMS570_ADC_GxSEL_EV_SEL_GET(reg) BSP_FLD32GET(reg,0, 15) 403 #define TMS570_ADC_GxSEL_EV_SEL_SET(reg,val) BSP_FLD32SET(reg, val,0, 15) 408 #define TMS570_ADC_CALR_ADCALR(val) BSP_FLD32(val,0, 11) 409 #define TMS570_ADC_CALR_ADCALR_GET(reg) BSP_FLD32GET(reg,0, 11) 410 #define TMS570_ADC_CALR_ADCALR_SET(reg,val) BSP_FLD32SET(reg, val,0, 11) 415 #define TMS570_ADC_SMSTATE_LAST_CONV(val) BSP_FLD32(val,0, 23) 416 #define TMS570_ADC_SMSTATE_LAST_CONV_GET(reg) BSP_FLD32GET(reg,0, 23) 417 #define TMS570_ADC_SMSTATE_LAST_CONV_SET(reg,val) BSP_FLD32SET(reg, val,0, 23) 422 #define TMS570_ADC_LASTCONV_LAST_CONV(val) BSP_FLD32(val,0, 23) 423 #define TMS570_ADC_LASTCONV_LAST_CONV_GET(reg) BSP_FLD32GET(reg,0, 23) 424 #define TMS570_ADC_LASTCONV_LAST_CONV_SET(reg,val) BSP_FLD32SET(reg, val,0, 23) 429 #define TMS570_ADC_GxBUF_ADEVT_DIR BSP_BIT32(0) 434 #define TMS570_ADC_EVEMUBUFFER_ADEVT_DIR BSP_BIT32(0) 439 #define TMS570_ADC_G1EMUBUFFER_ADEVT_DIR BSP_BIT32(0) 444 #define TMS570_ADC_G2EMUBUFFER_ADEVT_DIR BSP_BIT32(0) 449 #define TMS570_ADC_EVTDIR_ADEVT_DIR BSP_BIT32(0) 454 #define TMS570_ADC_EVTOUT_ADEVT_OUT BSP_BIT32(0) 459 #define TMS570_ADC_EVTIN_ADEVT_IN BSP_BIT32(0) 464 #define TMS570_ADC_EVTSET_ADEVT_SET BSP_BIT32(0) 469 #define TMS570_ADC_EVTCLR_ADEVT_CLR BSP_BIT32(0) 474 #define TMS570_ADC_EVTPDR_ADEVT_PDR BSP_BIT32(0) 479 #define TMS570_ADC_EVTPDIS_ADEVT_PDIS BSP_BIT32(0) 484 #define TMS570_ADC_EVTPSEL_ADEVT_PSEL BSP_BIT32(0) 489 #define TMS570_ADC_EVSAMPDISEN_EV_SAMP_DIS_CYC(val) BSP_FLD32(val,8, 15) 490 #define TMS570_ADC_EVSAMPDISEN_EV_SAMP_DIS_CYC_GET(reg) BSP_FLD32GET(reg,8, 15) 491 #define TMS570_ADC_EVSAMPDISEN_EV_SAMP_DIS_CYC_SET(reg,val) BSP_FLD32SET(reg, val,8, 15) 494 #define TMS570_ADC_EVSAMPDISEN_EV_SAMP_DIS_EN BSP_BIT32(0) 499 #define TMS570_ADC_G1SAMPDISEN_G1_SAMP_DIS_CYC(val) BSP_FLD32(val,8, 15) 500 #define TMS570_ADC_G1SAMPDISEN_G1_SAMP_DIS_CYC_GET(reg) BSP_FLD32GET(reg,8, 15) 501 #define TMS570_ADC_G1SAMPDISEN_G1_SAMP_DIS_CYC_SET(reg,val) BSP_FLD32SET(reg, val,8, 15) 504 #define TMS570_ADC_G1SAMPDISEN_G1_SAMP_DIS_EN BSP_BIT32(0) 509 #define TMS570_ADC_G2SAMPDISEN_G2_SAMP_DIS_CYC(val) BSP_FLD32(val,8, 15) 510 #define TMS570_ADC_G2SAMPDISEN_G2_SAMP_DIS_CYC_GET(reg) BSP_FLD32GET(reg,8, 15) 511 #define TMS570_ADC_G2SAMPDISEN_G2_SAMP_DIS_CYC_SET(reg,val) BSP_FLD32SET(reg, val,8, 15) 514 #define TMS570_ADC_G2SAMPDISEN_G2_SAMP_DIS_EN BSP_BIT32(0) 519 #define TMS570_ADC_MAGINTCRx_MAG_CHID2(val) BSP_FLD32(val,26, 30) 520 #define TMS570_ADC_MAGINTCRx_MAG_CHID2_GET(reg) BSP_FLD32GET(reg,26, 30) 521 #define TMS570_ADC_MAGINTCRx_MAG_CHID2_SET(reg,val) BSP_FLD32SET(reg, val,26, 30) 524 #define TMS570_ADC_MAGINTCRx_MAG_THR2(val) BSP_FLD32(val,16, 25) 525 #define TMS570_ADC_MAGINTCRx_MAG_THR2_GET(reg) BSP_FLD32GET(reg,16, 25) 526 #define TMS570_ADC_MAGINTCRx_MAG_THR2_SET(reg,val) BSP_FLD32SET(reg, val,16, 25) 529 #define TMS570_ADC_MAGINTCRx_COMP_CHID2(val) BSP_FLD32(val,8, 12) 530 #define TMS570_ADC_MAGINTCRx_COMP_CHID2_GET(reg) BSP_FLD32GET(reg,8, 12) 531 #define TMS570_ADC_MAGINTCRx_COMP_CHID2_SET(reg,val) BSP_FLD32SET(reg, val,8, 12) 534 #define TMS570_ADC_MAGINTCRx_CHN_THR_COMP2 BSP_BIT32(1) 537 #define TMS570_ADC_MAGINTCRx_CMP_GE_LT2 BSP_BIT32(0) 542 #define TMS570_ADC_MAGINTxMASK_MAG_INT0_MASK(val) BSP_FLD32(val,0, 9) 543 #define TMS570_ADC_MAGINTxMASK_MAG_INT0_MASK_GET(reg) BSP_FLD32GET(reg,0, 9) 544 #define TMS570_ADC_MAGINTxMASK_MAG_INT0_MASK_SET(reg,val) BSP_FLD32SET(reg, val,0, 9) 549 #define TMS570_ADC_MAGTHRINTENASET_MAG_INT_ENA_SET(val) BSP_FLD32(val,0, 2) 550 #define TMS570_ADC_MAGTHRINTENASET_MAG_INT_ENA_SET_GET(reg) BSP_FLD32GET(reg,0, 2) 551 #define TMS570_ADC_MAGTHRINTENASET_MAG_INT_ENA_SET_SET(reg,val) BSP_FLD32SET(reg, val,0, 2) 556 #define TMS570_ADC_MAGTHRINTENACLR_MAG_INT_ENA_CLR(val) BSP_FLD32(val,0, 2) 557 #define TMS570_ADC_MAGTHRINTENACLR_MAG_INT_ENA_CLR_GET(reg) BSP_FLD32GET(reg,0, 2) 558 #define TMS570_ADC_MAGTHRINTENACLR_MAG_INT_ENA_CLR_SET(reg,val) BSP_FLD32SET(reg, val,0, 2) 563 #define TMS570_ADC_MAGTHRINTFLG_MAG_INT_FLG(val) BSP_FLD32(val,0, 2) 564 #define TMS570_ADC_MAGTHRINTFLG_MAG_INT_FLG_GET(reg) BSP_FLD32GET(reg,0, 2) 565 #define TMS570_ADC_MAGTHRINTFLG_MAG_INT_FLG_SET(reg,val) BSP_FLD32SET(reg, val,0, 2) 570 #define TMS570_ADC_MAGTHRINTOFFSET_MAG_INT_OFF(val) BSP_FLD32(val,0, 3) 571 #define TMS570_ADC_MAGTHRINTOFFSET_MAG_INT_OFF_GET(reg) BSP_FLD32GET(reg,0, 3) 572 #define TMS570_ADC_MAGTHRINTOFFSET_MAG_INT_OFF_SET(reg,val) BSP_FLD32SET(reg, val,0, 3) 577 #define TMS570_ADC_GxFIFORESETCR_EV_FIFO_RESET BSP_BIT32(0) 582 #define TMS570_ADC_EVRAMWRADDR_G1_RAM_ADDR(val) BSP_FLD32(val,0, 8) 583 #define TMS570_ADC_EVRAMWRADDR_G1_RAM_ADDR_GET(reg) BSP_FLD32GET(reg,0, 8) 584 #define TMS570_ADC_EVRAMWRADDR_G1_RAM_ADDR_SET(reg,val) BSP_FLD32SET(reg, val,0, 8) 589 #define TMS570_ADC_G1RAMWRADDR_G1_RAM_ADDR(val) BSP_FLD32(val,0, 8) 590 #define TMS570_ADC_G1RAMWRADDR_G1_RAM_ADDR_GET(reg) BSP_FLD32GET(reg,0, 8) 591 #define TMS570_ADC_G1RAMWRADDR_G1_RAM_ADDR_SET(reg,val) BSP_FLD32SET(reg, val,0, 8) 596 #define TMS570_ADC_G2RAMWRADDR_G2_RAM_ADDR(val) BSP_FLD32(val,0, 8) 597 #define TMS570_ADC_G2RAMWRADDR_G2_RAM_ADDR_GET(reg) BSP_FLD32GET(reg,0, 8) 598 #define TMS570_ADC_G2RAMWRADDR_G2_RAM_ADDR_SET(reg,val) BSP_FLD32SET(reg, val,0, 8) 603 #define TMS570_ADC_PARCR_TEST BSP_BIT32(8) 606 #define TMS570_ADC_PARCR_PARITY_ENA(val) BSP_FLD32(val,0, 3) 607 #define TMS570_ADC_PARCR_PARITY_ENA_GET(reg) BSP_FLD32GET(reg,0, 3) 608 #define TMS570_ADC_PARCR_PARITY_ENA_SET(reg,val) BSP_FLD32SET(reg, val,0, 3) 613 #define TMS570_ADC_PARADDR_ERROR_ADDRESS(val) BSP_FLD32(val,2, 11) 614 #define TMS570_ADC_PARADDR_ERROR_ADDRESS_GET(reg) BSP_FLD32GET(reg,2, 11) 615 #define TMS570_ADC_PARADDR_ERROR_ADDRESS_SET(reg,val) BSP_FLD32SET(reg, val,2, 11) 620 #define TMS570_ADC_PWRUPDLYCTRL_PWRUP_DLY(val) BSP_FLD32(val,0, 9) 621 #define TMS570_ADC_PWRUPDLYCTRL_PWRUP_DLY_GET(reg) BSP_FLD32GET(reg,0, 9) 622 #define TMS570_ADC_PWRUPDLYCTRL_PWRUP_DLY_SET(reg,val) BSP_FLD32SET(reg, val,0, 9)